1var BI=Object.defineProperty;var LC=s=>{throw TypeError(s)};var WI=(s,e,t)=>e in s?BI(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var be=(s,e,t)=>WI(s,typeof e!="symbol"?e+"":e,t),xw=(s,e,t)=>e.has(s)||LC("Cannot "+t);var m=(s,e,t)=>(xw(s,e,"read from private field"),t?t.call(s):e.get(s)),J=(s,e,t)=>e.has(s)?LC("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),z=(s,e,t,n)=>(xw(s,e,"write to private field"),n?n.call(s,t):e.set(s,t),t),oe=(s,e,t)=>(xw(s,e,"access private method"),t);var zn=(s,e,t,n)=>({set _(r){z(s,e,r,t)},get _(){return m(s,e,n)}});import{s as co,e as MN,d as jI,r as Ee,j as G,n as zI,f as Dp,q as HI,b as $I}from"./index-iegIeF45.js";import{s as KI}from"./stream.api-wELYZ5Ax.js";import{e as XI,c as VI}from"./use-file-upload-Cd9bjbC9.js";import{c as GI}from"./constants-wGmL6ORO.js";import{a as _w,b as wi,P as m0,g as wv,t as qI,D as YI,c as ZI,T as JI,i as QI,d as e4,e as BC,f as t4,u as WC}from"./editor-thread-store-BfFfPTRn.js";import{u as n4}from"./use-verifier-questions-DhfEZgOQ.js";import{u as r4,a as i4,A as s4}from"./use-chat-messages-CXvZjdj2.js";import{M as jC,r as zC}from"./index-C8eNEL7x.js";import{r as o4,t as a4,o as Kt,L as c4}from"./local-storage-persistence-plugin-To0I9ull.js";import"./useQuery-D6gZY3LU.js";import"./legal-abbreviations-D_joR8bX.js";const Xi=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),nT=[.001,0,0,.001,0,0],Tw=1.35,Ki={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},vc={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Jg="pdfjs_internal_editor_",yt={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},Rt={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},l4={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},au={TRIANGLES:1,LATTICE:2},Yn={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},y0={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},Kn={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},vd={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},xv={ERRORS:0,WARNINGS:1,INFOS:5},Qg={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},Qp={moveTo:0,lineTo:1,curveTo:2,quadraticCurveTo:3,closePath:4},u4={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let _v=xv.WARNINGS;function h4(s){Number.isInteger(s)&&(_v=s)}function d4(){return _v}function Tv(s){_v>=xv.INFOS&&console.info(`Info: ${s}`)}function _t(s){_v>=xv.WARNINGS&&console.warn(`Warning: ${s}`)}function zt(s){throw new Error(s)}function Dn(s,e){s||zt(e)}function f4(s){switch(s==null?void 0:s.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function PN(s,e=null,t=null){if(!s)return null;if(t&&typeof s=="string"){if(t.addDefaultProtocol&&s.startsWith("www.")){const r=s.match(/\./g);(r==null?void 0:r.length)>=2&&(s=`http://${s}`)}if(t.tryConvertEncoding)try{s=v4(s)}catch{}}const n=e?URL.parse(s,e):URL.parse(s);return f4(n)?n:null}function ON(s,e,t=!1){const n=URL.parse(s);
1return n?(n.hash=e,n.href):t&&PN(s,"http://example.com")?s.split("#",1)[0]+`${e?`#${e}`:""}`:""}function rT(s){return s.substring(s.lastIndexOf("/")+1)}function Tt(s,e,t,n=!1){return Object.defineProperty(s,e,{value:t,enumerable:!n,configurable:!0,writable:!1}),t}const Qh=(function(){function e(t,n){this.message=t,this.name=n}return e.prototype=new Error,e.constructor=e,e})();class HC extends Qh{constructor(e,t){super(e,"PasswordException"),this.code=t}}class Sw extends Qh{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}}class iT extends Qh{constructor(e){super(e,"InvalidPDFException")}}class h1 extends Qh{constructor(e,t,n){super(e,"ResponseException"),this.status=t,this.missing=n}}class p4 extends Qh{constructor(e){super(e,"FormatError")}}class Sl extends Qh{constructor(e){super(e,"AbortException")}}function g4(s){(typeof s!="object"||(s==null?void 0:s.length)===void 0)&&zt("Invalid argument for bytesToString");const e=s.length,t=8192;if(e<t)return String.fromCharCode.apply(null,s);const n=[];for(let r=0;r<e;r+=t){const i=Math.min(r+t,e),a=s.subarray(r,i);n.push(String.fromCharCode.apply(null,a))}return n.join("")}function Sv(s){typeof s!="string"&&zt("Invalid argument for stringToBytes");const e=s.length,t=new Uint8Array(e);for(let n=0;n<e;++n)t[n]=s.charCodeAt(n)&255;return t}function m4(s){return String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,s&255)}function y4(){const s=new Uint8Array(4);return s[0]=1,new Uint32Array(s.buffer,0,1)[0]===1}function b4(){try{return new Function(""),!0}catch{return!1}}class rr{static get isLittleEndian(){return Tt(this,"isLittleEndian",y4())}static get isEvalSupported(){return Tt(this,"isEvalSupported",b4())}static get isOffscreenCanvasSupported(){return Tt(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return Tt(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get isFloat16ArraySupported(){return Tt(this,"isFloat16ArraySupported",typeof Float16Array<"u")}static get isSanitizerSupported(){return Tt(this,"isSanitizerSupported",typeof Sanitizer<"u")}static get platform(){const{platform:e,userAgent:t}=navigator;return Tt(this,"platform",{isAndroid:t.includes("Android"),isLinux:e.includes("Linux"),isMac:e.includes("Mac"),isWindows:e.includes("Win"),isFirefox:t.includes("Firefox")})}static get isCSSRoundSupported(){var e,t;return Tt(this,"isCSSRoundSupported",(t=(e=globalThis.CSS)==null?void 0:e.supports)==null?void 0:t.call(e,"width: round(1.5px, 1px)"))}}const Ew=Array.from(Array(256).keys(),s=>s.toString(16).padStart(2,"0"));var ac,b0,sT;class Ge{static makeHexColor(e,t,n){return`#${Ew[e]}${Ew[t]}${Ew[n]}`}static domMatrixToTransform(e){return[e.a,e.b,e.c,e.d,e.e,e.f]}static scaleMinMax(e,t){let n;e[0]?(e[0]<0&&(n=t[0],t[0]=t[2],t[2]=n),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(n=t[1],t[1]=t[3],t[3]=n),t[1]*=e[3],t[3]*=e[3]):(n=t[0],t[0]=t[1],t[1]=n,n=t[2],t[2]=t[3],t[3]=n,e[1]<0&&(n=t[1],t[1]=t[3],t[3]=n),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(n=t[0],t[0]=t[2],t[2]=n),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static multiplyByDOMMatrix(e,t){return[e[0]*t.a+e[2]*t.b,e[1]*t.a+e[3]*t.b,e[0]*t.c+e[2]*t.d,e[1]*t.c+e[3]*t.d,e[0]*t.e+e[2]*t.f+e[4],e[1]*t.e+e[3]*t.f+e[5]]}static applyTransform(e,t,n=0){const r=e[n],i=e[n+1];e[n]=r*t[0]+i*t[2]+t[4],e[n+1]=r*t[1]+i*t[3]+t[5]}static applyTransformToBezier(e,t,n=0){const r=t[0],i=t[1],a=t[2],o=t[3],c=t[4],l=t[5];for(let u=0;u<6;u+=2){const d=e[n+u],h=e[n+u+1];e[n+u]=d*r+h*a+c,e[n+u+1]=d*i+h*o+l}}static applyInverseTransform(e,t){const n=e[0],r=e[1],i=t[0]*t[3]-t[1]*t[2];e[0]=(n*t[3]-r*t[2]+t[2]*t[5]-t[4]*t[3])/i,e[1]=(-n*t[1]+r*t[0]+t[4]*t[1]-t[5]*t[0])/i}static axialAlignedBoundingBox(e,t,n){const r=t[0],i=t[1],a=t[2],o=t[3],c=t[4],l=t[5],u=e[0],d=e[1],h=e[2],f=e[3];let p=r*u+c,y=p,g=r*h+c,b=g,v=o*d+l,x=v,w=o*f+l,_=w;if(i!==0||a!==0){const T=i*u,S=i*h,C=a*d,D=a*f;p+=C,b+=C,g+=D,y+=D,v+=T,_+=T,w+=S,x+=S}n[0]=Math.min(n[0],p,g,y,b),n[1]=Math.min(n[1],v,w,x,_),n[2]=Math.max(n[2],p,g,y,b),n[3]=Math.max(n[3],v,w,x,_)}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e,t){const n=e[0],r=e[1],i=e[2],a=e[3],o=n**2+r**2,c=n*i+r*a,l=i**2+a**2,u=(o+l)/2,d=Math.sqrt(u**2-(o*l-c**2));t[0]=Math.sqrt(u+d||1),t[1]=Math.sqrt(u-d||1)}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const n=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(n>r)return null;const i=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),a=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return i>a?null:[n,i,r,a]}static pointBoundingBox(e,t,n){n[0]=Math.min(n[0],e),n[1]=Math.min(n[1],t),n[2]=Math.max(n[2],e),n[3]=Math.max(n[3],t)}static rectBoundingBox(e,t,n,r,i){i[0]=Math.min(i[0],e,n),i[1]=Math.min(i[1],t,r),i[2]=Math.max(i[2],e,n),i[3]=Math.max(i[3],t,r)}static bezierBoundingBox(e,t,n,r,i,a,o,c,l){l[0]=Math.min(l[0],e,o),l[1]=Math.min(l[1],t,c),l[2]=Math.max(l[2],e,o),l[3]=Math.max(l[3],t,c),oe(this,ac,sT).call(this,e,n,i,o,t,r,a,c,3*(-e+3*(n-i)+o),6*(e-2*n+i),3*(n-e),l),oe(this,ac,sT).call(this,e,n,i,o,t,r,a,c,3*(-t+3*(r-a)+c),6*(t-2*r+a),3*(r-t),l)}}ac=new WeakSet,b0=function(e,t,n,r,i,a,o,c,l,u){if(l<=0||l>=1)return;const d=1-l,h=l*l,f=h*l,p=d*(d*(d*e+3*l*t)+3*h*n)+f*r,y=d*(d*(d*i+3*l*a)+3*h*o)+f*c;u[0]=Math.min(u[0],p),u[1]=Math.min(u[1],y),u[2]=Math.max(u[2],p),u[3]=Math.max(u[3],y)},sT=function(e,t,n,r,i,a,o,c,l,u,d,h){if(Math.abs(l)<1e-12){Math.abs(u)>=1e-12&&oe(this,ac,b0).call(this,e,t,n,r,i,a,o,c,-d/u,h);return}const f=u**2-4*d*l;if(f<0)return;const p=Math.sqrt(f),y=2*l;oe(this,ac,b0).call(this,e,t,n,r,i,a,o,c,(-u+p)/y,h),oe(this,ac,b0).call(this,e,t,n,r,i,a,o,c,(-u-p)/y,h)},J(Ge,ac);function v4(s){return decodeURIComponent(escape(s))}let Dw=null,$C=null;function w4(s){return Dw||(Dw=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,$C=new Map([["ï¬
","ſt"]])),s.replaceAll(Dw,(e,t,n)=>t?t.normalize("NFKC"):$C.get(n))}function LN(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const s=new Uint8Array(32);return crypto.getRandomValues(s),g4(s)}const Md="pdfjs_internal_id_";function x4(s,e,t){if(!Array.isArray(t)||t.length<2)return!1;const[n,r,...i]=t;if(!s(n)&&!Number.isInteger(n)||!e(r))return!1;const a=i.length;let o=!0;switch(r.name){case"XYZ":if(a<2||a>3)return!1;break;case"Fit":case"FitB":return a===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(a>1)return!1;break;case"FitR":if(a!==4)return!1;o=!1;break;default:return!1}for(const c of i)if(!(typeof c=="number"||o&&c===null))return!1;return!0}const kE=()=>[],NE=()=>new Map,oT=()=>Object.create(null);function fr(s,e,t){return Math.min(Math.max(s,e),t)}typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(s){return s.reduce((e,t)=>
1e+t,0)});class em{static textContent(e){const t=[],n={items:t,styles:Object.create(null)};function r(i){var c;if(!i)return;let a=null;const o=i.name;if(o==="#text")a=i.value;else if(em.shouldBuildText(o))(c=i==null?void 0:i.attributes)!=null&&c.textContent?a=i.attributes.textContent:i.value&&(a=i.value);else return;if(a!==null&&t.push({str:a}),!!i.children)for(const l of i.children)r(l)}return r(e),n}static shouldBuildText(e){return!(e==="textarea"||e==="input"||e==="option"||e==="select")}}class BN{static setupStorage(e,t,n,r,i){const a=r.getValue(t,{value:null});switch(n.name){case"textarea":if(a.value!==null&&(e.textContent=a.value),i==="print")break;e.addEventListener("input",o=>{r.setValue(t,{value:o.target.value})});break;case"input":if(n.attributes.type==="radio"||n.attributes.type==="checkbox"){if(a.value===n.attributes.xfaOn?e.setAttribute("checked",!0):a.value===n.attributes.xfaOff&&e.removeAttribute("checked"),i==="print")break;e.addEventListener("change",o=>{r.setValue(t,{value:o.target.checked?o.target.getAttribute("xfaOn"):o.target.getAttribute("xfaOff")})})}else{if(a.value!==null&&e.setAttribute("value",a.value),i==="print")break;e.addEventListener("input",o=>{r.setValue(t,{value:o.target.value})})}break;case"select":if(a.value!==null){e.setAttribute("value",a.value);for(const o of n.children)o.attributes.value===a.value?o.attributes.selected=!0:o.attributes.hasOwnProperty("selected")&&delete o.attributes.selected}e.addEventListener("input",o=>{const c=o.target.options,l=c.selectedIndex===-1?"":c[c.selectedIndex].value;r.setValue(t,{value:l})});break}}static setAttributes({html:e,element:t,storage:n=null,intent:r,linkService:i}){const{attributes:a}=t,o=e instanceof HTMLAnchorElement;a.type==="radio"&&(a.name=`${a.name}-${r}`);for(const[c,l]of Object.entries(a))if(l!=null)switch(c){case"class":l.length&&e.setAttribute(c,l.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",l);break;case"style":Object.assign(e.style,l);break;case"textContent":e.textContent=l;break;default:(!o||c!=="href"&&c!=="newWindow")&&e.setAttribute(c,l)}o&&i.addLinkAttributes(e,a.href,a.newWindow),n&&a.dataId&&this.setupStorage(e,a.dataId,t,n)}static render(e){var d,h;const t=e.annotationStorage,n=e.linkService,r=e.xfaHtml,i=e.intent||"display",a=document.createElement(r.name);r.attributes&&this.setAttributes({html:a,element:r,intent:i,linkService:n});const o=i!=="richText",c=e.div;if(c.append(a),e.viewport){const f=`matrix(${e.viewport.transform.join(",")})`;c.style.transform=f}o&&c.setAttribute("class","xfaLayer xfaFont");const l=[];if(r.children.length===0){if(r.value){const f=document.createTextNode(r.value);a.append(f),o&&em.shouldBuildText(r.name)&&l.push(f)}return{textDivs:l}}const u=[[r,-1,a]];for(;u.length>0;){const[f,p,y]=u.at(-1);if(p+1===f.children.length){u.pop();continue}const g=f.children[++u.at(-1)[1]];if(g===null)continue;const{name:b}=g;if(b==="#text"){const x=document.createTextNode(g.value);l.push(x),y.append(x);continue}const v=(d=g==null?void 0:g.attributes)!=null&&d.xmlns?document.createElementNS(g.attributes.xmlns,b):document.createElement(b);if(y.append(v),g.attributes&&this.setAttributes({html:v,element:g,storage:t,intent:i,linkService:n}),((h=g.children)==null?void 0:h.length)>0)u.push([g,-1,v]);else if(g.value){const x=document.createTextNode(g.value);o&&em.shouldBuildText(b)&&l.push(x),v.append(x)}}for(const f of c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))f.setAttribute("readOnly",!0);return{textDivs:l}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}const ha="http://www.w3.org/2000/svg",iu=class iu{};be(iu,"CSS",96),be(iu,"PDF",72),be(iu,"PDF_TO_CSS_UNITS",iu.CSS/iu.PDF);let El=iu;async function FE(s,e="text"){if(zg(s,document.baseURI)){const t=await fetch(s);if(!t.ok)throw new Error(t.statusText);switch(e){case"blob":return t.blob();case"bytes":return t.bytes();case"json":return t.json()}return t.text()}return new Promise((t,n)=>{const r=new XMLHttpRequest;r.open("GET",s,!0),r.responseType=e==="bytes"?"arraybuffer":e,r.onreadystatechange=()=>{if(r.readyState===XMLHttpRequest.DONE){if(r.status===200||r.status===0){switch(e){case"bytes":t(new
1Uint8Array(r.response));return;case"blob":case"json":t(r.response);return}t(r.responseText);return}n(new Error(r.statusText))}},r.send(null)})}class rb{constructor({viewBox:e,userUnit:t,scale:n,rotation:r,offsetX:i=0,offsetY:a=0,dontFlip:o=!1}){this.viewBox=e,this.userUnit=t,this.scale=n,this.rotation=r,this.offsetX=i,this.offsetY=a,n*=t;const c=(e[2]+e[0])/2,l=(e[3]+e[1])/2;let u,d,h,f;switch(r%=360,r<0&&(r+=360),r){case 180:u=-1,d=0,h=0,f=1;break;case 90:u=0,d=1,h=1,f=0;break;case 270:u=0,d=-1,h=-1,f=0;break;case 0:u=1,d=0,h=0,f=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(h=-h,f=-f);let p,y,g,b;u===0?(p=Math.abs(l-e[1])*n+i,y=Math.abs(c-e[0])*n+a,g=(e[3]-e[1])*n,b=(e[2]-e[0])*n):(p=Math.abs(c-e[0])*n+i,y=Math.abs(l-e[1])*n+a,g=(e[2]-e[0])*n,b=(e[3]-e[1])*n),this.transform=[u*n,d*n,h*n,f*n,p-u*n*c-h*n*l,y-d*n*c-f*n*l],this.width=g,this.height=b}get rawDims(){const e=this.viewBox;return Tt(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:n=this.offsetX,offsetY:r=this.offsetY,dontFlip:i=!1}={}){return new rb({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:i})}convertToViewportPoint(e,t){const n=[e,t];return Ge.applyTransform(n,this.transform),n}convertToViewportRectangle(e){const t=[e[0],e[1]];Ge.applyTransform(t,this.transform);const n=[e[2],e[3]];return Ge.applyTransform(n,this.transform),[t[0],t[1],n[0],n[1]]}convertToPdfPoint(e,t){const n=[e,t];return Ge.applyInverseTransform(n,this.transform),n}}class UE extends Qh{constructor(e,t=0){super(e,"RenderingCancelledException"),this.extraDelay=t}}function Ev(s){const e=s.length;let t=0;for(;t<e&&s[t].trim()==="";)t++;return s.substring(t,t+5).toLowerCase()==="data:"}function RE(s){return typeof s=="string"&&/\.pdf$/i.test(s)}function _4(s){return[s]=s.split(/[#?]/,1),rT(s)}function T4(s,e="document.pdf"){if(typeof s!="string")return e;if(Ev(s))return _t('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;const n=(o=>{try{return new URL(o)}catch{try{return new URL(decodeURIComponent(o))}catch{try{return new URL(o,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(o),"https://foo.bar")}catch{return null}}}}})(s);if(!n)return e;const r=o=>{try{let c=decodeURIComponent(o);return c.includes("/")&&(c=rT(c),/^\.pdf$/i.test(c))?o:c}catch{return o}},i=/\.pdf$/i,a=rT(n.pathname);if(i.test(a))return r(a);if(n.searchParams.size>0){const o=l=>[...l].findLast(u=>i.test(u)),c=o(n.searchParams.values())??o(n.searchParams.keys());if(c)return r(c)}if(n.hash){const c=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(n.hash);if(c)return r(c[0])}return e}var _c;class KC{constructor(){J(this,_c,new Map);be(this,"times",[])}time(e){m(this,_c).has(e)&&_t(`Timer is already running for ${e}`),m(this,_c).set(e,Date.now())}timeEnd(e){m(this,_c).has(e)||_t(`Timer has not been started for ${e}`),this.times.push({name:e,start:m(this,_c).get(e),end:Date.now()}),m(this,_c).delete(e)}toString(){const e=Math.max(...this.times.map(t=>t.name.length));return this.times.map(t=>`${t.name.padEnd(e)} ${t.end-t.start}ms 2`).join("")}}_c=new WeakMap;function zg(s,e){const t=e?URL.parse(s,e):URL.parse(s);return/https?:/.test((t==null?void 0:t.protocol)??"")}function Es(s){s.preventDefault()}function In(s){s.preventDefault(),s.stopPropagation()}function S4(s){console.log("Deprecated API usage: "+s)}var fm;class d1{static toDateObject(e){if(e instanceof Date)return e;if(!e||typeof e!="string")return null;m(this,fm)||z(this,fm,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=m(this,fm).exec(e);if(!t)return null;const n=parseInt(t[1],10);let r=parseInt(t[2],10);r=r>=1&&r<=12?r-1:0;let i=parseInt(t[3],10);i=i>=1&&i<=31?i:1;let a=parseInt(t[4],10);a=a>=0&&a<=23?a:0;let o=parseInt(t[5],10);o=o>=0&&o<=59?o:0;let c=parseInt(t[6],10);c=c>=0&&c<=59?c:0;const l=t[7]||"Z";let u=parseInt(t[8],10);u=u>=0&&u<=23?u:0;let d=parseInt(t[9],10)||0;return d=d>=0&&d<=59?d:0,l==="-"?(a+=u,o+=d):l==="+"&&(a-=u,o-=d),new Date(Date.UTC(n,r,i,a,o,c))}}fm=new WeakMap,J(d1,fm);function E4(s,{scale:e=1,rotation:t=0}){const{width:n,height:r}=s.attributes.style,i=[0,0,parseInt(n),parseInt(r)];return new rb({viewBox:i,userUnit:1,scale:e,rotation:t})}function ib(s){if(s.startsWith("#")){const e=parseInt(s.slice(1),16);return[(e&16711680)>>16,(e&65280)>>8,e&255]}return s.startsWith("rgb(")?s.slice(4,-1).split(",").map(e=>parseInt(e)):s.startsWith("rgba(")?s.slice(5,-1).split(",",3).map(e=>parseInt(e)):(_t(`Not a valid color format: "${s}"`),[0,0,0])}function D4(s){const e=document.createElement("span");e.style.visibility="hidden",e.style.colorScheme="only light",document.body.append(e);for(const t of s.keys()){e.style.color=t;
2const n=window.getComputedStyle(e).color;s.set(t,ib(n))}e.remove()}function Sn(s){const{a:e,b:t,c:n,d:r,e:i,f:a}=s.getTransform();return[e,t,n,r,i,a]}function lo(s){const{a:e,b:t,c:n,d:r,e:i,f:a}=s.getTransform().invertSelf();return[e,t,n,r,i,a]}function Ph(s,e,t=!1,n=!0){if(e instanceof rb){const{pageWidth:r,pageHeight:i}=e.rawDims,{style:a}=s,o=rr.isCSSRoundSupported,c=`var(--total-scale-factor) * ${r}px`,l=`var(--total-scale-factor) * ${i}px`,u=o?`round(down, ${c}, var(--scale-round-x))`:`calc(${c})`,d=o?`round(down, ${l}, var(--scale-round-y))`:`calc(${l})`;!t||e.rotation%180===0?(a.width=u,a.height=d):(a.width=d,a.height=u)}n&&s.setAttribute("data-main-rotation",e.rotation)}class Zo{constructor(){const{pixelRatio:e}=Zo;this.sx=e,this.sy=e}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(e,t,n,r,i=-1){let a=1/0,o=1/0,c=1/0;n=Zo.capPixels(n,i),n>0&&(a=Math.sqrt(n/(e*t))),r!==-1&&(o=r/e,c=r/t);const l=Math.min(a,o,c);return this.sx>l||this.sy>l?(this.sx=l,this.sy=l,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(e,t){if(t>=0){const n=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+t/100));return e>0?Math.min(e,n):n}return e}}const aT=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class C4{static get isDarkMode(){var e;return Tt(this,"isDarkMode",!!((e=window==null?void 0:window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches))}}class A4{static get commentForegroundColor(){const e=document.createElement("span");e.classList.add("comment","sidebar");const{style:t}=e;t.width=t.height="0",t.display="none",t.color="var(--comment-fg-color)",document.body.append(e);const{color:n}=window.getComputedStyle(e);return e.remove(),Tt(this,"commentForegroundColor",ib(n))}}function k4(s,e){e=fr(e??1,0,1);const t=255*(1-e);return s.map(n=>Math.round(n*e+t))}function XC(s,e){const t=s[0]/255,n=s[1]/255,r=s[2]/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)e[0]=e[1]=0;else{const c=i-a;switch(e[1]=o<.5?c/(i+a):c/(2-i-a),i){case t:e[0]=((n-r)/c+(n<r?6:0))*60;break;case n:e[0]=((r-t)/c+2)*60;break;case r:e[0]=((t-n)/c+4)*60;break}}e[2]=o}function cT(s,e){const t=s[0],n=s[1],r=s[2],i=(1-Math.abs(2*r-1))*n,a=i*(1-Math.abs(t/60%2-1)),o=r-i/2;switch(Math.floor(t/60)){case 0:e[0]=i+o,e[1]=a+o,e[2]=o;break;case 1:e[0]=a+o,e[1]=i+o,e[2]=o;break;case 2:e[0]=o,e[1]=i+o,e[2]=a+o;break;case 3:e[0]=o,e[1]=a+o,e[2]=i+o;break;case 4:e[0]=a+o,e[1]=o,e[2]=i+o;break;case 5:case 6:e[0]=i+o,e[1]=o,e[2]=a+o;break}}function VC(s){return s<=.03928?s/12.92:((s+.055)/1.055)**2.4}function GC(s,e,t){cT(s,t),t.map(VC);const n=.2126*t[0]+.7152*t[1]+.0722*t[2];cT(e,t),t.map(VC);const r=.2126*t[0]+.7152*t[1]+.0722*t[2];return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const qC=new Map;function N4(s,e){const t=s[0]+s[1]*256+s[2]*65536+e[0]*16777216+e[1]*4294967296+e[2]*1099511627776;let n=qC.get(t);if(n)return n;const r=new Float32Array(9),i=r.subarray(0,3),a=r.subarray(3,6);XC(s,a);const o=r.subarray(6,9);XC(e,o);const c=o[2]<.5,l=c?12:4.5;if(a[2]=c?Math.sqrt(a[2]):1-Math.sqrt(1-a[2]),GC(a,o,i)<l){let u,d;c?(u=a[2],d=1):(u=0,d=a[2]);const h=.005;for(;d-u>h;){const f=a[2]=(u+d)/2;c===GC(a,o,i)<l?u=f:d=f}a[2]=c?d:u}return cT(a,i),n=Ge.makeHexColor(Math.round(i[0]*255),Math.round(i[1]*255),Math.round(i[2]*255)),qC.set(t,n),n}function WN({html:s,dir:e,className:t},n){const r=document.createDocumentFragment();if(typeof s=="string"){const i=document.createElement("p");i.dir=e||"auto";const a=s.split(/(?:\r\n?|\n)/);for(let o=0,c=a.length;o<c;++o){const l=a[o];i.append(document.createTextNode(l)),o<c-1&&i.append(document.createElement("br"))}r.append(i)}else BN.render({xfaHtml:s,div:r,intent:"richText"});r.firstElementChild.classList.add("richText",t),n.append(r)}function jN(s){const e=new Path2D;if(!s)return e;for(let t=0,n=s.length;t<n;)switch(s[t++]){case Qp.moveTo:e.moveTo(s[t++],s[t++]);break;case Qp.lineTo:e.lineTo(s[t++],s[t++]);break;case Qp.curveTo:e.bezierCurveTo(s[t++],s[t++],s[t++],s[t++],s[t++],s[t++]);break;case Qp.quadraticCurveTo:e.quadraticCurveTo(s[t++],s[t++],s[t++],s[t++]);break;case Qp.closePath:e.closePath();break;default:_t(`Unrecognized drawing path operator: ${s[t-1]}`);break}return e}
2var Tc,Sc,ss,os,pm,Ec,Zd,Jd,vs,gm,Z1,zN,kr,HN,$N,wd,yg;let F4=(vs=class{constructor(e){J(this,kr);J(this,Tc,null);J(this,Sc,null);J(this,ss);J(this,os,null);J(this,pm,null);J(this,Ec,null);J(this,Zd,null);J(this,Jd,null);z(this,ss,e),m(vs,gm)||z(vs,gm,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"}))}render(){const e=z(this,Tc,document.createElement("div"));e.classList.add("editToolbar","hidden"),e.setAttribute("role","toolbar");const t=m(this,ss)._uiManager._signal;t instanceof AbortSignal&&!t.aborted&&(e.addEventListener("contextmenu",Es,{signal:t}),e.addEventListener("pointerdown",oe(vs,Z1,zN),{signal:t}));const n=z(this,os,document.createElement("div"));n.className="buttons",e.append(n);const r=m(this,ss).toolbarPosition;if(r){const{style:i}=e,a=m(this,ss)._uiManager.direction==="ltr"?1-r[0]:r[0];i.insetInlineEnd=`${100*a}%`,i.top=`calc(${100*r[1]}% + var(--editor-toolbar-vert-offset))`}return e}get div(){return m(this,Tc)}hide(){var e;m(this,Tc).classList.add("hidden"),(e=m(this,Sc))==null||e.hideDropdown()}show(){var e,t;m(this,Tc).classList.remove("hidden"),(e=m(this,pm))==null||e.shown(),(t=m(this,Ec))==null||t.shown()}addDeleteButton(){const{editorType:e,_uiManager:t}=m(this,ss),n=document.createElement("button");n.classList.add("basic","deleteButton"),n.tabIndex=0,n.setAttribute("data-l10n-id",m(vs,gm)[e]),oe(this,kr,wd).call(this,n)&&n.addEventListener("click",r=>{t.delete()},{signal:t._signal}),m(this,os).append(n)}async addAltText(e){const t=await e.render();oe(this,kr,wd).call(this,t),m(this,os).append(t,m(this,kr,yg)),z(this,pm,e)}addComment(e,t=null){if(m(this,Ec))return;const n=e.renderForToolbar();if(!n)return;oe(this,kr,wd).call(this,n);const r=z(this,Zd,m(this,kr,yg));t?(m(this,os).insertBefore(n,t),m(this,os).insertBefore(r,t)):m(this,os).append(n,r),z(this,Ec,e),e.toolbar=this}addColorPicker(e){if(m(this,Sc))return;z(this,Sc,e);const t=e.renderButton();oe(this,kr,wd).call(this,t),m(this,os).append(t,m(this,kr,yg))}async addEditSignatureButton(e){const t=z(this,Jd,await e.renderEditButton(m(this,ss)));oe(this,kr,wd).call(this,t),m(this,os).append(t,m(this,kr,yg))}removeButton(e){var t,n;switch(e){case"comment":(t=m(this,Ec))==null||t.removeToolbarCommentButton(),z(this,Ec,null),(n=m(this,Zd))==null||n.remove(),z(this,Zd,null);break}}async addButton(e,t){switch(e){case"colorPicker":t&&this.addColorPicker(t);break;case"altText":t&&await this.addAltText(t);break;case"editSignature":t&&await this.addEditSignatureButton(t);break;case"delete":this.addDeleteButton();break;case"comment":t&&this.addComment(t);break}}async addButtonBefore(e,t,n){if(!t&&e==="comment")return;const r=m(this,os).querySelector(n);r&&e==="comment"&&this.addComment(t,r)}updateEditSignatureButton(e){m(this,Jd)&&(m(this,Jd).title=e)}remove(){var e;m(this,Tc).remove(),(e=m(this,Sc))==null||e.destroy(),z(this,Sc,null)}},Tc=new WeakMap,Sc=new WeakMap,ss=new WeakMap,os=new WeakMap,pm=new WeakMap,Ec=new WeakMap,Zd=new WeakMap,Jd=new WeakMap,gm=new WeakMap,Z1=new WeakSet,zN=function(e){e.stopPropagation()},kr=new WeakSet,HN=function(e){m(this,ss)._focusEventsAllowed=!1,In(e)},$N=function(e){m(this,ss)._focusEventsAllowed=!0,In(e)},wd=function(e){const t=m(this,ss)._uiManager._signal;return!(t instanceof AbortSignal)||t.aborted?!1:(e.addEventListener("focusin",oe(this,kr,HN).bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",oe(this,kr,$N).bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",Es,{signal:t}),!0)},yg=function(){const e=document.createElement("div");return e.className="divider",e},J(vs,Z1),J(vs,gm,null),vs);var mm,du,ba,dc,KN,XN,lT;class U4{constructor(e){J(this,dc);J(this,mm,null);J(this,du,null);J(this,ba);z(this,ba,e)}show(e,t,n){const[r,i]=oe(this,dc,XN).call(this,t,n),{style:a}=m(this,du)||z(this,du,oe(this,dc,KN).call(this));e.append(m(this,du)),a.insetInlineEnd=`${100*r}%`,a.top=`calc(${100*i}% + var(--editor-toolbar-vert-offset))`}hide(){m(this,du).remove()}}mm=new WeakMap,du=new WeakMap,ba=new WeakMap,dc=new WeakSet,KN=function(){const e=z(this,du,document.createElement("div"));e.className="editToolbar",e.setAttribute("role","toolbar");const t=m(this,ba)._signal;t instanceof AbortSignal&&!t.aborted&&e.addEventListener("contextmenu",Es,{signal:t});const n=z(this,mm,document.createElement("div"));return n.className="buttons",e.append(n),m(this,ba).hasCommentManager()&&oe(this,dc,lT).call(this,"commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{m(this,ba).commentSelection("floating_button")}),oe(this,dc,lT).call(this,"highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{m(this,ba).highlightSelection("floating_button")}),e},XN=function(e,t){let n=0,r=0;for(const i of e){const a=i.y+i.height;if(a<n)continue;const o=i.x+(t?i.width:0);if(a>n){r=o,n=a;continue}t?o>r&&(r=o):o<r&&(r=o)}return[t?1-r:r,n]},lT=function(e,t,n,r){const i=document.createElement("button");i.classList.add("basic",e),i.tabIndex=0,i.setAttribute("data-l10n-id",t);const a=document.createElement("span");i.append(a),a.className="visuallyHidden",a.setAttribute("data-l10n-id",n);const o=m(this,ba)._signal;o instanceof AbortSignal&&!o.aborted&&(i.addEventListener("contextmenu",Es,{signal:o}),i.addEventListener("click",r,{signal:o})),m(this,mm).append(i)};function VN(s,e,t){for(const n of t)e.addEventListener(n,s[n].bind(s))}var fu,pu,Qd,gu;const Jt=class Jt{static initializeAndAddPointerId(e){(m(Jt,pu)||z(Jt,pu,new Set)).add(e)}static setPointer(e,t){m(Jt,fu)||z(Jt,fu,t),m(Jt,gu)??z(Jt,gu,e)}static setTimeStamp(e){z(Jt,Qd,e)}static isSamePointerId(e){return m(Jt,fu)===e}static isSamePointerIdOrRemove(e){var t;return m(Jt,fu)===e?!0:((t=m(Jt,pu))==null||t.delete(e),!1)}static isSamePointerType(e){return m(Jt,gu)===e}static isInitializedAndDifferentPointerType(e){return m(Jt,gu)!==null&&!Jt.isSamePointerType(e)}static isSameTimeStamp(e){return m(Jt,Qd)===e}static isUsingMultiplePointers(){var e;return((e=m(Jt,pu))==null?void 0:e.size)>=1}static clearPointerType(){z(Jt,gu,null)}static clearPointerIds(){z(Jt,fu,NaN),z(Jt,pu,null)}static clearTimeStamp(){z(Jt,Qd,NaN)}};fu=new WeakMap,pu=new WeakMap,Qd=new WeakMap,gu=new WeakMap,J(Jt,fu,NaN),J(Jt,pu,null),J(Jt,Qd,NaN),J(Jt,gu,null);let Rr=Jt;var J1;class R4{constructor(){J(this,J1,0)}get id(){return`${Jg}
2${zn(this,J1)._++}`}}J1=new WeakMap;var ef,ym,Ir,tf,v0;const JD=class JD{constructor(){J(this,tf);J(this,ef,LN());J(this,ym,0);J(this,Ir,null)}static get _isSVGFittingCanvas(){const e='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',n=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),r=new Image;r.src=e;const i=r.decode().then(()=>(n.drawImage(r,0,0,1,1,0,0,1,3),new Uint32Array(n.getImageData(0,0,1,1).data.buffer)[0]===0));return Tt(this,"_isSVGFittingCanvas",i)}async getFromFile(e){const{lastModified:t,name:n,size:r,type:i}=e;return oe(this,tf,v0).call(this,`${t}_${n}_${r}_${i}`,e)}async getFromUrl(e){return oe(this,tf,v0).call(this,e,e)}async getFromBlob(e,t){const n=await t;return oe(this,tf,v0).call(this,e,n)}async getFromId(e){m(this,Ir)||z(this,Ir,new Map);const t=m(this,Ir).get(e);if(!t)return null;if(t.bitmap)return t.refCounter+=1,t;if(t.file)return this.getFromFile(t.file);if(t.blobPromise){const{blobPromise:n}=t;return delete t.blobPromise,this.getFromBlob(t.id,n)}return this.getFromUrl(t.url)}getFromCanvas(e,t){m(this,Ir)||z(this,Ir,new Map);let n=m(this,Ir).get(e);if(n!=null&&n.bitmap)return n.refCounter+=1,n;const r=new OffscreenCanvas(t.width,t.height);return r.getContext("2d").drawImage(t,0,0),n={bitmap:r.transferToImageBitmap(),id:`image_${m(this,ef)}_${zn(this,ym)._++}`,refCounter:1,isSvg:!1},m(this,Ir).set(e,n),m(this,Ir).set(n.id,n),n}getSvgUrl(e){const t=m(this,Ir).get(e);return t!=null&&t.isSvg?t.svgUrl:null}deleteId(e){var r;m(this,Ir)||z(this,Ir,new Map);const t=m(this,Ir).get(e);if(!t||(t.refCounter-=1,t.refCounter!==0))return;const{bitmap:n}=t;if(!t.url&&!t.file){const i=new OffscreenCanvas(n.width,n.height);i.getContext("bitmaprenderer").transferFromImageBitmap(n),t.blobPromise=i.convertToBlob()}(r=n.close)==null||r.call(n),t.bitmap=null}isValidId(e){return e.startsWith(`image_${m(this,ef)}_`)}};ef=new WeakMap,ym=new WeakMap,Ir=new WeakMap,tf=new WeakSet,v0=async function(e,t){m(this,Ir)||z(this,Ir,new Map);let n=m(this,Ir).get(e);if(n===null)return null;if(n!=null&&n.bitmap)return n.refCounter+=1,n;try{n||(n={bitmap:null,id:`image_${m(this,ef)}_${zn(this,ym)._++}`,refCounter:0,isSvg:!1});let r;if(typeof t=="string"?(n.url=t,r=await FE(t,"blob")):t instanceof File?r=n.file=t:t instanceof Blob&&(r=t),r.type==="image/svg+xml"){const i=JD._isSVGFittingCanvas,a=new FileReader,o=new Image,c=new Promise((l,u)=>{o.onload=()=>{n.bitmap=o,n.isSvg=!0,l()},a.onload=async()=>{const d=n.svgUrl=a.result;o.src=await i?`${d}#svgView(preserveAspectRatio(none))`:d},o.onerror=a.onerror=u});a.readAsDataURL(r),await c}else n.bitmap=await createImageBitmap(r);n.refCounter=1}catch(r){_t(r),n=null}return m(this,Ir).set(e,n),n&&m(this,Ir).set(n.id,n),n};let uT=JD;var Mn,Dc,bm,_n;class I4{constructor(e=128){J(this,Mn,[]);J(this,Dc,!1);J(this,bm);J(this,_n,-1);z(this,bm,e)}add({cmd:e,undo:t,post:n,mustExec:r,type:i=NaN,overwriteIfSameType:a=!1,keepUndo:o=!1}){if(r&&e(),m(this,Dc))return;const c={cmd:e,undo:t,post:n,type:i};if(m(this,_n)===-1){m(this,Mn).length>0&&(m(this,Mn).length=0),z(this,_n,0),m(this,Mn).push(c);return}if(a&&m(this,Mn)[m(this,_n)].type===i){o&&(c.undo=m(this,Mn)[m(this,_n)].undo),m(this,Mn)[m(this,_n)]=c;return}const l=m(this,_n)+1;l===m(this,bm)?m(this,Mn).splice(0,1):(z(this,_n,l),l<m(this,Mn).length&&m(this,Mn).splice(l)),m(this,Mn).push(c)}undo(){if(m(this,_n)===-1)return;z(this,Dc,!0);const{undo:e,post:t}=m(this,Mn)[m(this,_n)];e(),t==null||t(),z(this,Dc,!1),z(this,_n,m(this,_n)-1)}redo(){if(m(this,_n)<m(this,Mn).length-1){z(this,_n,m(this,_n)+1),z(this,Dc,!0);const{cmd:e,post:t}=m(this,Mn)[m(this,_n)];e(),t==null||t(),z(this,Dc,!1)}}hasSomethingToUndo(){return m(this,_n)!==-1}hasSomethingToRedo(){return m(this,_n)<m(this,Mn).length-1}cleanType(e){if(m(this,_n)!==-1){for(let t=m(this,_n);t>=0;t--)if(m(this,Mn)[t].type!==e){m(this,Mn).splice(t+1,m(this,_n)-t),z(this,_n,t);return}m(this,Mn).length=0,z(this,_n,-1)}}destroy(){z(this,Mn,null)}}Mn=new WeakMap,Dc=new WeakMap,bm=new WeakMap,_n=new WeakMap;var Q1,GN;class sb{constructor(e){J(this,Q1);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=rr.platform;for(const[n,r,i={}]of e)for(const a of n){const o=a.startsWith("mac+");t&&o?(this.callbacks.set(a.slice(4),{callback:r,options:i}),this.allKeys.add(a.split("+").at(-1))):!t&&!o&&(this.callbacks.set(a,{callback:r,options:i}),this.allKeys.add(a.split("+").at(-1)))}}exec(e,t){if(!this.allKeys.has(t.key))return;const n=this.callbacks.get(oe(this,Q1,GN).call(this,t));if(!n)return;const{callback:r,options:{bubbles:i=!1,args:a=[],checker:o=null}}=n;o&&!o(e,t)||(r.bind(e,...a,t)(),i||In(t))}}Q1=new WeakSet,GN=function(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t};const ev=class ev{get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return D4(e),Tt(this,"_colors",e)}convert(e){const t=ib(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[n,r]of this._colors)if(r.every((i,a)=>i===t[a]))return ev._colorsMapping.get(n);return t}getHexCode(e){const t=this._colors.get(e);return t?Ge.makeHexColor(...t):e}};be(ev,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let hT=ev;var nf,Ai,rf,Nn,Tn,sf,of,qr,af,as,ir,Cc,Ac,kc,Nc,xo,cs,mu,vm,wm,cf,xm,_o,Fc,lf,Uc,To,tv,va,uf,_m,Rc,yu,hf,Ic,Tm,Xn,Vt,wa,Mc,Pc,Sm,df,Em,Oc,So,xa,Dm,Cm,ls,qe,w0,dT,qN,YN,ZN,bg,JN,QN,eF,fT,tF,nF,rF,iF,Xr,da,sF,oF,pT,aF,vg,gT;const Wd=class Wd{constructor(e,t,n,r,i,a,o,c,l,u,d,h,f,p,y,g){J(this,qe);J(this,nf,new AbortController);J(this,Ai,null);J(this,rf,null);J(this,Nn,new Map);J(this,Tn,new Map);J(this,sf,null);J(this,of,null);J(this,qr,null);J(this,af,null);J(this,as,new I4);J(this,ir,null);J(this,Cc,null);J(this,Ac,null);J(this,kc,0);J(this,Nc,new Set);J(this,xo,null);J(this,cs,null);J(this,mu,new Set);
2be(this,"_editorUndoBar",null);J(this,vm,!1);J(this,wm,!1);J(this,cf,!1);J(this,xm,null);J(this,_o,null);J(this,Fc,null);J(this,lf,null);J(this,Uc,!1);J(this,To,null);J(this,tv,new R4);J(this,va,!1);J(this,uf,!1);J(this,_m,!1);J(this,Rc,null);J(this,yu,null);J(this,hf,null);J(this,Ic,null);J(this,Tm,null);J(this,Xn,yt.NONE);J(this,Vt,new Set);J(this,wa,null);J(this,Mc,null);J(this,Pc,null);J(this,Sm,null);J(this,df,null);J(this,Em,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});J(this,Oc,[0,0]);J(this,So,null);J(this,xa,null);J(this,Dm,null);J(this,Cm,null);J(this,ls,null);const b=this._signal=m(this,nf).signal;z(this,xa,e),z(this,Dm,t),z(this,Cm,n),z(this,of,r),z(this,ir,i),z(this,Mc,a),z(this,df,c),this._eventBus=o,o._on("editingaction",this.onEditingAction.bind(this),{signal:b}),o._on("pagechanging",this.onPageChanging.bind(this),{signal:b}),o._on("scalechanging",this.onScaleChanging.bind(this),{signal:b}),o._on("rotationchanging",this.onRotationChanging.bind(this),{signal:b}),o._on("setpreference",this.onSetPreference.bind(this),{signal:b}),o._on("switchannotationeditorparams",v=>this.updateParams(v.type,v.value),{signal:b}),window.addEventListener("pointerdown",()=>{z(this,uf,!0)},{capture:!0,signal:b}),window.addEventListener("pointerup",()=>{z(this,uf,!1)},{capture:!0,signal:b}),window.addEventListener("beforeunload",oe(this,qe,qN).bind(this),{capture:!0,signal:b}),oe(this,qe,JN).call(this),oe(this,qe,iF).call(this),oe(this,qe,fT).call(this),z(this,qr,c.annotationStorage),z(this,xm,c.filterFactory),z(this,Pc,l),z(this,lf,u||null),z(this,vm,d),z(this,wm,h),z(this,cf,f),z(this,Tm,p||null),this.viewParameters={realScale:El.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=y||null,this._supportsPinchToZoom=g!==!1,i==null||i.setSidebarUiManager(this)}static get _keyboardManager(){const e=Wd.prototype,t=a=>m(a,xa).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&a.hasSomethingToControl(),n=(a,{target:o})=>{if(o instanceof HTMLInputElement){const{type:c}=o;return c!=="text"&&c!=="number"}return!0},r=this.TRANSLATE_SMALL,i=this.TRANSLATE_BIG;return Tt(this,"_keyboardManager",new sb([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:n}],[["ctrl+z","mac+meta+z"],e.undo,{checker:n}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:n}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:n}
2],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(a,{target:o})=>!(o instanceof HTMLButtonElement)&&m(a,xa).contains(o)&&!a.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(a,{target:o})=>!(o instanceof HTMLButtonElement)&&m(a,xa).contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-r,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-i,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[r,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[i,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-r],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-i],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,r],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,i],checker:t}]]))}destroy(){var e,t,n,r,i,a,o,c,l;(e=m(this,ls))==null||e.resolve(),z(this,ls,null),(t=m(this,nf))==null||t.abort(),z(this,nf,null),this._signal=null;for(const u of m(this,Tn).values())u.destroy();m(this,Tn).clear(),m(this,Nn).clear(),m(this,mu).clear(),(n=m(this,Ic))==null||n.clear(),z(this,Ai,null),m(this,Vt).clear(),m(this,as).destroy(),(r=m(this,of))==null||r.destroy(),(i=m(this,ir))==null||i.destroy(),(a=m(this,Mc))==null||a.destroy(),(o=m(this,To))==null||o.hide(),z(this,To,null),(c=m(this,hf))==null||c.destroy(),z(this,hf,null),z(this,rf,null),m(this,_o)&&(clearTimeout(m(this,_o)),z(this,_o,null)),m(this,So)&&(clearTimeout(m(this,So)),z(this,So,null)),(l=this._editorUndoBar)==null||l.destroy(),z(this,df,null)}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return m(this,Tm)}get useNewAltTextFlow(){return m(this,wm)}get useNewAltTextWhenAddingImage(){return m(this,cf)}get hcmFilter(){return Tt(this,"hcmFilter",m(this,Pc)?m(this,xm).addHCMFilter(m(this,Pc).foreground,m(this,Pc).background):"none")}get direction(){return Tt(this,"direction",getComputedStyle(m(this,xa)).direction)}get _highlightColors(){return Tt(this,"_highlightColors",m(this,lf)?new Map(m(this,lf).split(",").map(e=>(e=e.split("=").map(t=>t.trim()),e[1]=e[1].toUpperCase(),e))):null)}get highlightColors(){const{_highlightColors:e}=this;if(!e)return Tt(this,"highlightColors",null);const t=new Map,n=!!m(this,Pc);for(const[r,i]of e){const a=r.endsWith("_HCM");if(n&&a){t.set(r.replace("_HCM",""),i);continue}!n&&!a&&t.set(r,i)}return Tt(this,"highlightColors",t)}get highlightColorNames(){return Tt(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}getNonHCMColor(e){if(!this._highlightColors)return e;const t=this.highlightColorNames.get(e);return this._highlightColors.get(t)||e}getNonHCMColorName(e){return this.highlightColorNames.get(e)||e}setCurrentDrawingSession(e){e?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),z(this,Ac,e)}setMainHighlightColorPicker(e){z(this,hf,e)}editAltText(e,t=!1){var n;(n=m(this,of))==null||n.editAltText(this,e,t)}hasCommentManager(){return!!m(this,ir)}editComment(e,t,n,r){var i;(i=m(this,ir))==null||i.showDialog(this,e,t,n,r)}selectComment(e,t){const n=m(this,Tn).get(e),r=n==null?void 0:n.getEditorByUID(t);r==null||r.toggleComment(!0,!0)}updateComment(e){var t;(t=m(this,ir))==null||t.updateComment(e.getData())}updatePopupColor(e){var t;(t=m(this,ir))==null||t.updatePopupColor(e)}removeComment(e){var t;(t=m(this,ir))==null||t.removeComments([e.uid])}deleteComment(e,t){const n=()=>{e.comment=t},r=()=>{var i;(i=this._editorUndoBar)==null||i.show(n,"comment"),this.toggleComment(null),e.comment=null};this.addCommands({cmd:r,undo:n,mustExec:!0})}toggleComment(e,t,n=void 0){var r;(r=m(this,ir))==null||r.toggleCommentPopup(e,t,n)}makeCommentColor(e,t){var n;return e&&((n=m(this,ir))==null?void 0:n.makeCommentColor(e,t))||null}getCommentDialogElement(){var e;return((e=m(this,ir))==null?void 0:e.dialogElement)||null}async waitForEditorsRendered(e){if(m(this,Tn).has(e-1))return;const{resolve:t,promise:n}=Promise.withResolvers(),r=i=>{i.pageNumber===e&&(this._eventBus._off("editorsrendered",r),t())};this._eventBus.on("editorsrendered",r),await n}getSignature(e){var t;(t=m(this,Mc))==null||t.getSignature({uiManager:this,editor:e})}get signatureManager(){return m(this,Mc)}switchToMode(e,t){this._eventBus.on("annotationeditormodechanged",t,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e})}setPreference(e,t){this._eventBus.dispatch("setpreference",{source:this,name:e,value:t})}onSetPreference({name:e,value:t}){switch(e){case"enableNewAltTextWhenAddingImage":z(this,cf,t);break}}onPageChanging({pageNumber:e}){z(this,kc,e-1)}deletePage(e){for(const t of this.getEditors(e))t.remove();m(this,Tn).delete(e),m(this,kc)===e&&z(this,kc,0)}focusMainContainer(){m(this,xa).focus()}findParent(e,t){for(const n of m(this,Tn).values()){const{x:r,y:i,width:a,height:o}=n.div.getBoundingClientRect();if(e>=r&&e<=r+a&&t>=i&&t<=i+o)return n}return null}disableUserSelect(e=!1){m(this,Dm).classList.toggle("noUserSelect",e)}addShouldRescale(e){m(this,mu).add(e)}removeShouldRescale(e){m(this,mu).delete(e)}onScaleChanging({scale:e}){var t;this.commitOrRemove(),this.viewParameters.realScale=e*El.PDF_TO_CSS_UNITS;for(const n of m(this,mu))n.onScaleChanging();(t=m(this,Ac))==null||t.onScaleChanging()}
2onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}highlightSelection(e="",t=!1){const n=document.getSelection();if(!n||n.isCollapsed)return;const{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=n,c=n.toString(),u=oe(this,qe,w0).call(this,n).closest(".textLayer"),d=this.getSelectionBoxes(u);if(!d)return;n.empty();const h=oe(this,qe,dT).call(this,u),f=m(this,Xn)===yt.NONE,p=()=>{const y=h==null?void 0:h.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:d,anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o,text:c});f&&this.showAllEditors("highlight",!0,!0),t&&(y==null||y.editComment())};if(f){this.switchToMode(yt.HIGHLIGHT,p);return}p()}commentSelection(e=""){this.highlightSelection(e,!0)}getAndRemoveDataFromAnnotationStorage(e){if(!m(this,qr))return null;const t=`${Jg}${e}`,n=m(this,qr).getRawValue(t);return n&&m(this,qr).remove(t),n}addToAnnotationStorage(e){!e.isEmpty()&&m(this,qr)&&!m(this,qr).has(e.id)&&m(this,qr).setValue(e.id,e)}a11yAlert(e,t=null){const n=m(this,Cm);n&&(n.setAttribute("data-l10n-id",e),t?n.setAttribute("data-l10n-args",JSON.stringify(t)):n.removeAttribute("data-l10n-args"))}blur(){if(this.isShiftKeyDown=!1,m(this,Uc)&&(z(this,Uc,!1),oe(this,qe,bg).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const t of m(this,Vt))if(t.div.contains(e)){z(this,yu,[t,e]),t._focusEventsAllowed=!1;break}}focus(){if(!m(this,yu))return;const[e,t]=m(this,yu);z(this,yu,null),t.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:this._signal}),t.focus()}addEditListeners(){oe(this,qe,fT).call(this),this.setEditingState(!0)}removeEditListeners(){oe(this,qe,tF).call(this),this.setEditingState(!1)}dragOver(e){for(const{type:t}of e.dataTransfer.items)for(const n of m(this,cs))if(n.isHandlingMimeForPasting(t)){e.dataTransfer.dropEffect="copy",e.preventDefault();return}}drop(e){for(const t of e.dataTransfer.items)for(const n of m(this,cs))if(n.isHandlingMimeForPasting(t.type)){n.paste(t,this.currentLayer),e.preventDefault();return}}copy(e){var n;if(e.preventDefault(),(n=m(this,Ai))==null||n.commitOrRemove(),!this.hasSelection)return;const t=[];for(const r of m(this,Vt)){const i=r.serialize(!0);i&&t.push(i)}t.length!==0&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}async paste(e){e.preventDefault();const{clipboardData:t}=e;for(const i of t.items)for(const a of m(this,cs))if(a.isHandlingMimeForPasting(i.type)){a.paste(i,this.currentLayer);return}let n=t.getData("application/pdfjs");if(!n)return;try{n=JSON.parse(n)}catch(i){_t(`paste: "${i.message}".`);return}if(!Array.isArray(n))return;this.unselectAll();const r=this.currentLayer;try{const i=[];for(const c of n){const l=await r.deserialize(c);if(!l)return;i.push(l)}const a=()=>{for(const c of i)oe(this,qe,pT).call(this,c);oe(this,qe,gT).call(this,i)},o=()=>{for(const c of i)c.remove()};this.addCommands({cmd:a,undo:o,mustExec:!0})}catch(i){_t(`paste: "${i.message}".`)}}keydown(e){!this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!0),m(this,Xn)!==yt.NONE&&!this.isEditorHandlingKeyboard&&Wd._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!1,m(this,Uc)&&(z(this,Uc,!1),oe(this,qe,bg).call(this,"main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu");break}}updatePageIndex(e,t){for(const r of this.getEditors(e))r.pageIndex=t;const n=m(this,sf).get(e);n&&(n.pageIndex=t,m(this,Tn).set(t,n),m(this,va)?n.enable():n.disable())}startUpdatePages(){z(this,sf,new Map(m(this,Tn))),m(this,Tn).clear()}endUpdatePages(){z(this,sf,null)}clonePage(e,t){for(const n of this.getEditors(e)){const r=n.serialize(n.mode!==yt.HIGHLIGHT);r&&(r.pageIndex=t,r.id=this.getId(),r.isClone=!0,delete r.popupRef,m(this,qr).setValue(r.id,r))}}findClonesForPage(e){const t=[],{pageIndex:n}=e;for(const[r,i]of m(this,qr))i.pageIndex===n&&i.isClone&&(m(this,qr).remove(r),t.push(e.deserialize(i).then(a=>{a&&(a.isClone=!0,e.addOrRebuild(a))})));return Promise.all(t)}setEditingState(e){e?(oe(this,qe,QN).call(this),oe(this,qe,nF).call(this),oe(this,qe,Xr).call(this,{isEditing:m(this,Xn)!==yt.NONE,isEmpty:oe(this,qe,vg).call(this),hasSomethingToUndo:m(this,as).hasSomethingToUndo(),hasSomethingToRedo:m(this,as).hasSomethingToRedo(),hasSelectedEditor:!1})):(oe(this,qe,eF).call(this),oe(this,qe,rF).call(this),oe(this,qe,Xr).call(this,{isEditing:!1}),this.disableUserSelect(!1))}
2registerEditorTypes(e){if(!m(this,cs)){z(this,cs,e);for(const t of m(this,cs))oe(this,qe,da).call(this,t.defaultPropertiesToUpdate)}}getId(){return m(this,tv).id}get currentLayer(){return m(this,Tn).get(m(this,kc))}getLayer(e){return m(this,Tn).get(e)}get currentPageIndex(){return m(this,kc)}addLayer(e){m(this,Tn).set(e.pageIndex,e),m(this,va)?e.enable():e.disable()}removeLayer(e){m(this,Tn).delete(e.pageIndex)}async updateMode(e,t=null,n=!1,r=!1,i=!1,a=!1){var o,c,l,u,d,h;if(m(this,Xn)!==e&&!(m(this,ls)&&(await m(this,ls).promise,!m(this,ls)))){if(z(this,ls,Promise.withResolvers()),(o=m(this,Ac))==null||o.commitOrRemove(),m(this,Xn)===yt.POPUP&&((c=m(this,ir))==null||c.hideSidebar()),(l=m(this,ir))==null||l.destroyPopup(),z(this,Xn,e),e===yt.NONE){this.setEditingState(!1),oe(this,qe,oF).call(this);for(const f of m(this,Nn).values())f.hideStandaloneCommentButton();(u=this._editorUndoBar)==null||u.hide(),this.toggleComment(null),m(this,ls).resolve();return}for(const f of m(this,Nn).values())f.addStandaloneCommentButton();e===yt.SIGNATURE&&await((d=m(this,Mc))==null?void 0:d.loadSignatures()),n&&Rr.clearPointerType(),this.setEditingState(!0),await oe(this,qe,sF).call(this),this.unselectAll();for(const f of m(this,Tn).values())f.updateMode(e);if(e===yt.POPUP){m(this,rf)||z(this,rf,await m(this,df).getAnnotationsByType(new Set(m(this,cs).map(y=>y._editorType))));const f=new Set,p=[];for(const y of m(this,Nn).values()){const{annotationElementId:g,hasComment:b,deleted:v}=y;g&&f.add(g),b&&!v&&p.push(y.getData())}for(const y of m(this,rf)){const{id:g,popupRef:b,contentsObj:v}=y;b&&(v!=null&&v.str)&&!f.has(g)&&!m(this,Nc).has(g)&&p.push(y)}(h=m(this,ir))==null||h.showSidebar(p)}if(!t){r&&this.addNewEditorFromKeyboard(),m(this,ls).resolve();return}for(const f of m(this,Nn).values())f.uid===t?(this.setSelected(f),a?f.editComment():i?f.enterInEditMode():f.focus()):f.unselect();m(this,ls).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e.mode!==m(this,Xn)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...e})}updateParams(e,t){if(m(this,cs)){switch(e){case Rt.CREATE:this.currentLayer.addNewEditor(t);return;case Rt.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(m(this,Sm)||z(this,Sm,new Map)).set(e,t),this.showAllEditors("highlight",t);break}if(this.hasSelection)for(const n of m(this,Vt))n.updateParams(e,t);else for(const n of m(this,cs))n.updateDefaultParams(e,t)}}showAllEditors(e,t,n=!1){var i;for(const a of m(this,Nn).values())a.editorType===e&&a.show(t);(((i=m(this,Sm))==null?void 0:i.get(Rt.HIGHLIGHT_SHOW_ALL))??!0)!==t&&oe(this,qe,da).call(this,[[Rt.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(m(this,_m)!==e){z(this,_m,e);for(const t of m(this,Tn).values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}*getEditors(e){for(const t of m(this,Nn).values())t.pageIndex===e&&(yield t)}getEditor(e){return m(this,Nn).get(e)}addEditor(e){m(this,Nn).set(e.id,e)}removeEditor(e){var t,n;e.div.contains(document.activeElement)&&(m(this,_o)&&clearTimeout(m(this,_o)),z(this,_o,setTimeout(()=>{this.focusMainContainer(),z(this,_o,null)},0))),m(this,Nn).delete(e.id),e.annotationElementId&&((t=m(this,Ic))==null||t.delete(e.annotationElementId)),this.unselect(e),(!e.annotationElementId||!m(this,Nc).has(e.annotationElementId))&&((n=m(this,qr))==null||n.remove(e.id))}addDeletedAnnotationElement(e){m(this,Nc).add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return m(this,Nc).has(e)}removeDeletedAnnotationElement(e){m(this,Nc).delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}setActiveEditor(e){m(this,Ai)!==e&&(z(this,Ai,e),e&&oe(this,qe,da).call(this,e.propertiesToUpdate))}updateUI(e){m(this,qe,aF)===e&&oe(this,qe,da).call(this,e.propertiesToUpdate)}updateUIForDefaultProperties(e){oe(this,qe,da).call(this,e.defaultPropertiesToUpdate)}toggleSelected(e){if(m(this,Vt).has(e)){m(this,Vt).delete(e),e.unselect(),oe(this,qe,Xr).call(this,{hasSelectedEditor:this.hasSelection});return}m(this,Vt).add(e),e.select(),oe(this,qe,da).call(this,e.propertiesToUpdate),oe(this,qe,Xr).call(this,{hasSelectedEditor:!0})}setSelected(e){var t,n;this.updateToolbar({mode:e.mode,editId:e.uid}),(t=m(this,Ac))==null||t.commitOrRemove();for(const r of m(this,Vt))r!==e&&r.unselect();(n=m(this,ir))==null||n.destroyPopup(),m(this,Vt).clear(),m(this,Vt).add(e),e.select(),oe(this,qe,da).call(this,e.propertiesToUpdate),oe(this,qe,Xr).call(this,{hasSelectedEditor:!0})}isSelected(e){return m(this,Vt).has(e)}get firstSelectedEditor(){return m(this,Vt).values().next().value}unselect(e){e.unselect(),m(this,Vt).delete(e),oe(this,qe,Xr).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return m(this,Vt).size!==0}get isEnterHandled(){return m(this,Vt).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var e;m(this,as).undo(),oe(this,qe,Xr).call(this,{hasSomethingToUndo:m(this,as).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:oe(this,qe,vg).call(this)}),(e=this._editorUndoBar)==null||e.hide()}redo(){m(this,as).redo(),oe(this,qe,Xr).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:m(this,as).hasSomethingToRedo(),isEmpty:oe(this,qe,vg).call(this)})}addCommands(e){m(this,as).add(e),oe(this,qe,Xr).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:oe(this,qe,vg).call(this)})}cleanUndoStack(e){m(this,as).cleanType(e)}delete(){var i;this.commitOrRemove();const e=(i=this.currentLayer)==null?void 0:i.endDrawingSession(!0);if(!this.hasSelection&&!e)return;const t=e?[e]:[...m(this,Vt)],n=()=>{var a;(a=this._editorUndoBar)==null||a.show(r,t.length===1?t[0].editorType:t.length);for(const o of t)o.remove()},r=()=>{for(const a of t)oe(this,qe,pT).call(this,a)};this.addCommands({cmd:n,undo:r,mustExec:!0})}commitOrRemove(){var e;(e=m(this,Ai))==null||e.commitOrRemove()}hasSomethingToControl(){return m(this,Ai)||this.hasSelection}selectAll(){for(const e of m(this,Vt))e.commit();oe(this,qe,gT).call(this,m(this,Nn).values())}unselectAll(){var e,t;if(!(m(this,Ai)&&(m(this,Ai).commitOrRemove(),m(this,Xn)!==yt.NONE))&&!((e=m(this,Ac))!=null&&e.commitOrRemove())&&((t=m(this,ir))==null||t.destroyPopup(),!!this.hasSelection)){for(const n of m(this,Vt))n.unselect();m(this,Vt).clear(),oe(this,qe,Xr).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(e,t,n=!1){if(n||this.commitOrRemove(),!this.hasSelection)return;m(this,Oc)[0]+=e,m(this,Oc)[1]+=t;const[r,i]=m(this,Oc),a=[...m(this,Vt)],o=1e3;
2m(this,So)&&clearTimeout(m(this,So)),z(this,So,setTimeout(()=>{z(this,So,null),m(this,Oc)[0]=m(this,Oc)[1]=0,this.addCommands({cmd:()=>{for(const c of a)m(this,Nn).has(c.id)&&(c.translateInPage(r,i),c.translationDone())},undo:()=>{for(const c of a)m(this,Nn).has(c.id)&&(c.translateInPage(-r,-i),c.translationDone())},mustExec:!1})},o));for(const c of a)c.translateInPage(e,t),c.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),z(this,xo,new Map);for(const e of m(this,Vt))m(this,xo).set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!m(this,xo))return!1;this.disableUserSelect(!1);const e=m(this,xo);z(this,xo,null);let t=!1;for(const[{x:r,y:i,pageIndex:a},o]of e)o.newX=r,o.newY=i,o.newPageIndex=a,t||(t=r!==o.savedX||i!==o.savedY||a!==o.savedPageIndex);if(!t)return!1;const n=(r,i,a,o)=>{if(m(this,Nn).has(r.id)){const c=m(this,Tn).get(o);c?r._setParentAndPosition(c,i,a):(r.pageIndex=o,r.x=i,r.y=a)}};return this.addCommands({cmd:()=>{for(const[r,{newX:i,newY:a,newPageIndex:o}]of e)n(r,i,a,o)},undo:()=>{for(const[r,{savedX:i,savedY:a,savedPageIndex:o}]of e)n(r,i,a,o)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(m(this,xo))for(const n of m(this,xo).keys())n.drag(e,t)}rebuild(e){if(e.parent===null){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){var e;return((e=this.getActive())==null?void 0:e.shouldGetKeyboardEvents())||m(this,Vt).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return m(this,Ai)===e}getActive(){return m(this,Ai)}getMode(){return m(this,Xn)}isEditingMode(){return m(this,Xn)!==yt.NONE}get imageManager(){return Tt(this,"imageManager",new uT)}getSelectionBoxes(e){if(!e)return null;const t=document.getSelection();for(let l=0,u=t.rangeCount;l<u;l++)if(!e.contains(t.getRangeAt(l).commonAncestorContainer))return null;const{x:n,y:r,width:i,height:a}=e.getBoundingClientRect();let o;switch(e.getAttribute("data-main-rotation")){case"90":o=(l,u,d,h)=>({x:(u-r)/a,y:1-(l+d-n)/i,width:h/a,height:d/i});break;case"180":o=(l,u,d,h)=>({x:1-(l+d-n)/i,y:1-(u+h-r)/a,width:d/i,height:h/a});break;case"270":o=(l,u,d,h)=>({x:1-(u+h-r)/a,y:(l-n)/i,width:h/a,height:d/i});break;default:o=(l,u,d,h)=>({x:(l-n)/i,y:(u-r)/a,width:d/i,height:h/a});break}const c=[];for(let l=0,u=t.rangeCount;l<u;l++){const d=t.getRangeAt(l);if(!d.collapsed)for(const{x:h,y:f,width:p,height:y}of d.getClientRects())p===0||y===0||c.push(o(h,f,p,y))}return c.length===0?null:c}addChangedExistingAnnotation({annotationElementId:e,id:t}){(m(this,af)||z(this,af,new Map)).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){var t;(t=m(this,af))==null||t.delete(e)}renderAnnotationElement(e){var r;const t=(r=m(this,af))==null?void 0:r.get(e.data.id);if(!t)return;const n=m(this,qr).getRawValue(t);n&&(m(this,Xn)===yt.NONE&&!n.hasBeenModified||n.renderAnnotationElement(e))}setMissingCanvas(e,t,n){var i;const r=(i=m(this,Ic))==null?void 0:i.get(e);r&&(r.setCanvas(t,n),m(this,Ic).delete(e))}addMissingCanvas(e,t){(m(this,Ic)||z(this,Ic,new Map)).set(e,t)}};nf=new WeakMap,Ai=new WeakMap,rf=new WeakMap,Nn=new WeakMap,Tn=new WeakMap,sf=new WeakMap,of=new WeakMap,qr=new WeakMap,af=new WeakMap,as=new WeakMap,ir=new WeakMap,Cc=new WeakMap,Ac=new WeakMap,kc=new WeakMap,Nc=new WeakMap,xo=new WeakMap,cs=new WeakMap,mu=new WeakMap,vm=new WeakMap,wm=new WeakMap,cf=new WeakMap,xm=new WeakMap,_o=new WeakMap,Fc=new WeakMap,lf=new WeakMap,Uc=new WeakMap,To=new WeakMap,tv=new WeakMap,va=new WeakMap,uf=new WeakMap,_m=new WeakMap,Rc=new WeakMap,yu=new WeakMap,hf=new WeakMap,Ic=new WeakMap,Tm=new WeakMap,Xn=new WeakMap,Vt=new WeakMap,wa=new WeakMap,Mc=new WeakMap,Pc=new WeakMap,Sm=new WeakMap,df=new WeakMap,Em=new WeakMap,Oc=new WeakMap,So=new WeakMap,xa=new WeakMap,Dm=new WeakMap,Cm=new WeakMap,ls=new WeakMap,qe=new WeakSet,w0=function({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e},dT=function(e){const{currentLayer:t}=this;if(t.hasTextLayer(e))return t;for(const n of m(this,Tn).values())if(n.hasTextLayer(e))return n;return null},qN=function(e){var t;this.commitOrRemove(),(t=this.currentLayer)==null||t.endDrawingSession(!1)},YN=function(){const e=document.getSelection();if(!e||e.isCollapsed)return;const n=oe(this,qe,w0).call(this,e).closest(".textLayer"),r=this.getSelectionBoxes(n);r&&(m(this,To)||z(this,To,new U4(this)),m(this,To).show(n,r,this.direction==="ltr"))},ZN=function(){var i,a,o;const e=document.getSelection();if(!e||e.isCollapsed){m(this,wa)&&((i=m(this,To))==null||i.hide(),z(this,wa,null),oe(this,qe,Xr).call(this,{hasSelectedText:!1}));return}const{anchorNode:t}=e;if(t===m(this,wa))return;const r=oe(this,qe,w0).call(this,e).closest(".textLayer");if(!r){m(this,wa)&&((a=m(this,To))==null||a.hide(),z(this,wa,null),oe(this,qe,Xr).call(this,{hasSelectedText:!1}));return}if((o=m(this,To))==null||o.hide(),z(this,wa,t),oe(this,qe,Xr).call(this,{hasSelectedText:!0}),!(m(this,Xn)!==yt.HIGHLIGHT&&m(this,Xn)!==yt.NONE)&&(m(this,Xn)===yt.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),z(this,Uc,this.isShiftKeyDown),!this.isShiftKeyDown)){const c=m(this,Xn)===yt.HIGHLIGHT?oe(this,qe,dT).call(this,r):null;if(c==null||c.toggleDrawing(),m(this,uf)){const l=new AbortController,u=this.combinedSignal(l),d=h=>{h.type==="pointerup"&&h.button!==0||(l.abort(),c==null||c.toggleDrawing(!0),h.type==="pointerup"&&oe(this,qe,bg).call(this,"main_toolbar"))};window.addEventListener("pointerup",d,{signal:u}),window.addEventListener("blur",d,{signal:u})}else c==null||c.toggleDrawing(!0),oe(this,qe,bg).call(this,"main_toolbar")}},bg=function(e=""){m(this,Xn)===yt.HIGHLIGHT?this.highlightSelection(e):m(this,vm)&&oe(this,qe,YN).call(this)},JN=function(){document.addEventListener("selectionchange",oe(this,qe,ZN).bind(this),{signal:this._signal})},QN=function(){if(m(this,Fc))return;z(this,Fc,new AbortController);const e=this.combinedSignal(m(this,Fc));window.addEventListener("focus",this.focus.bind(this),{signal:e}),window.addEventListener("blur",this.blur.bind(this),{signal:e})},eF=function(){var e;(e=m(this,Fc))==null||e.abort(),z(this,Fc,null)},fT=function(){if(m(this,Rc))return;z(this,Rc,new AbortController);const e=this.combinedSignal(m(this,Rc));window.addEventListener("keydown",this.keydown.bind(this),{signal:e}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e})},tF=function(){var e;(e=m(this,Rc))==null||e.abort(),z(this,Rc,null)},nF=function(){if(m(this,Cc))return;z(this,Cc,new AbortController);const e=this.combinedSignal(m(this,Cc));document.addEventListener("copy",this.copy.bind(this),{signal:e}),document.addEventListener("cut",this.cut.bind(this),{signal:e}),document.addEventListener("paste",this.paste.bind(this),{signal:e})},rF=function(){var e;(e=m(this,Cc))==null||e.abort(),z(this,Cc,null)},iF=function(){const e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})},Xr=function(e){Object.entries(e).some(([n,r])=>m(this,Em)[n]!==r)&&(this._eventBus.dispatch("editingstateschanged",{source:this,details:Object.assign(m(this,Em),e)}),m(this,Xn)===yt.HIGHLIGHT&&e.hasSelectedEditor===!1&&oe(this,qe,da).call(this,[[Rt.HIGHLIGHT_FREE,!0]]))},da=function(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})},sF=async function(){if(!m(this,va)){z(this,va,!0);const e=[];for(const t of m(this,Tn).values())e.push(t.enable());await Promise.all(e);for(const t of m(this,Nn).values())t.enable()}},oF=function(){if(this.unselectAll(),m(this,va)){z(this,va,!1);for(const e of m(this,Tn).values())e.disable();for(const e of m(this,Nn).values())e.disable()}},pT=function(e){const t=m(this,Tn).get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))},aF=function(){let e=null;for(e of m(this,Vt));return e},vg=function(){if(m(this,Nn).size===0)return!0;
2if(m(this,Nn).size===1)for(const e of m(this,Nn).values())return e.isEmpty();return!1},gT=function(e){for(const t of m(this,Vt))t.unselect();m(this,Vt).clear();for(const t of e)t.isEmpty()||(m(this,Vt).add(t),t.select());oe(this,qe,Xr).call(this,{hasSelectedEditor:this.hasSelection})},be(Wd,"TRANSLATE_SMALL",1),be(Wd,"TRANSLATE_BIG",10);let Oh=Wd;var sr,Eo,Ms,ff,Do,ki,pf,Co,di,_a,bu,Ao,Lc,Zs,wg,x0;const Gr=class Gr{constructor(e){J(this,Zs);J(this,sr,null);J(this,Eo,!1);J(this,Ms,null);J(this,ff,null);J(this,Do,null);J(this,ki,null);J(this,pf,!1);J(this,Co,null);J(this,di,null);J(this,_a,null);J(this,bu,null);J(this,Ao,!1);z(this,di,e),z(this,Ao,e._uiManager.useNewAltTextFlow),m(Gr,Lc)||z(Gr,Lc,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(e){Gr._l10n??(Gr._l10n=e)}async render(){const e=z(this,Ms,document.createElement("button"));e.className="altText",e.tabIndex="0";const t=z(this,ff,document.createElement("span"));e.append(t),m(this,Ao)?(e.classList.add("new"),e.setAttribute("data-l10n-id",m(Gr,Lc).missing),t.setAttribute("data-l10n-id",m(Gr,Lc)["missing-label"])):(e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const n=m(this,di)._uiManager._signal;e.addEventListener("contextmenu",Es,{signal:n}),e.addEventListener("pointerdown",i=>i.stopPropagation(),{signal:n});const r=i=>{i.preventDefault(),m(this,di)._uiManager.editAltText(m(this,di)),m(this,Ao)&&m(this,di)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:m(this,Zs,wg)}})};return e.addEventListener("click",r,{capture:!0,signal:n}),e.addEventListener("keydown",i=>{i.target===e&&i.key==="Enter"&&(z(this,pf,!0),r(i))},{signal:n}),await oe(this,Zs,x0).call(this),e}finish(){m(this,Ms)&&(m(this,Ms).focus({focusVisible:m(this,pf)}),z(this,pf,!1))}isEmpty(){return m(this,Ao)?m(this,sr)===null:!m(this,sr)&&!m(this,Eo)}hasData(){return m(this,Ao)?m(this,sr)!==null||!!m(this,_a):this.isEmpty()}get guessedText(){return m(this,_a)}async setGuessedText(e){m(this,sr)===null&&(z(this,_a,e),z(this,bu,await Gr._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:e})),oe(this,Zs,x0).call(this))}toggleAltTextBadge(e=!1){var t;if(!m(this,Ao)||m(this,sr)){(t=m(this,Co))==null||t.remove(),z(this,Co,null);return}if(!m(this,Co)){const n=z(this,Co,document.createElement("div"));n.className="noAltTextBadge",m(this,di).div.append(n)}m(this,Co).classList.toggle("hidden",!e)}serialize(e){let t=m(this,sr);return!e&&m(this,_a)===t&&(t=m(this,bu)),{altText:t,decorative:m(this,Eo),guessedText:m(this,_a),textWithDisclaimer:m(this,bu)}}get data(){return{altText:m(this,sr),decorative:m(this,Eo)}}set data({altText:e,decorative:t,guessedText:n,textWithDisclaimer:r,cancel:i=!1}){n&&(z(this,_a,n),z(this,bu,r)),!(m(this,sr)===e&&m(this,Eo)===t)&&(i||(z(this,sr,e),z(this,Eo,t)),oe(this,Zs,x0).call(this))}toggle(e=!1){m(this,Ms)&&(!e&&m(this,ki)&&(clearTimeout(m(this,ki)),z(this,ki,null)),m(this,Ms).disabled=!e)}shown(){m(this,di)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:m(this,Zs,wg)}})}destroy(){var e,t;(e=m(this,Ms))==null||e.remove(),z(this,Ms,null),z(this,ff,null),z(this,Do,null),(t=m(this,Co))==null||t.remove(),z(this,Co,null)}};sr=new WeakMap,Eo=new WeakMap,Ms=new WeakMap,ff=new WeakMap,Do=new WeakMap,ki=new WeakMap,pf=new WeakMap,Co=new WeakMap,di=new WeakMap,_a=new WeakMap,bu=new WeakMap,Ao=new WeakMap,Lc=new WeakMap,Zs=new WeakSet,wg=function(){return m(this,sr)&&"added"||m(this,sr)===null&&this.guessedText&&"review"||"missing"},x0=async function(){var r,i,a;const e=m(this,Ms);if(!e)return;if(m(this,Ao)){if(e.classList.toggle("done",!!m(this,sr)),e.setAttribute("data-l10n-id",m(Gr,Lc)[m(this,Zs,wg)]),(r=m(this,ff))==null||r.setAttribute("data-l10n-id",m(Gr,Lc)[`${m(this,Zs,wg)}-label`]),!m(this,sr)){(i=m(this,Do))==null||i.remove();return}}else{if(!m(this,sr)&&!m(this,Eo)){e.classList.remove("done"),(a=m(this,Do))==null||a.remove();return}e.classList.add("done"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let t=m(this,Do);if(!t){z(this,Do,t=document.createElement("span")),t.className="tooltip",t.setAttribute("role","tooltip"),t.id=`alt-text-tooltip-${m(this,di).id}`;const o=100,c=m(this,di)._uiManager._signal;c.addEventListener("abort",()=>{clearTimeout(m(this,ki)),z(this,ki,null)},{once:!0}),e.addEventListener("mouseenter",()=>{z(this,ki,setTimeout(()=>{z(this,ki,null),m(this,Do).classList.add("show"),m(this,di)._reportTelemetry({action:"alt_text_tooltip"})},o))},{signal:c}),e.addEventListener("mouseleave",()=>{var l;m(this,ki)&&(clearTimeout(m(this,ki)),z(this,ki,null)),(l=m(this,Do))==null||l.classList.remove("show")},{signal:c})}m(this,Eo)?t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(t.removeAttribute("data-l10n-id"),t.textContent=m(this,sr)),t.parentNode||e.append(t);const n=m(this,di).getElementForAltText();n==null||n.setAttribute("aria-describedby",t.id)},J(Gr,Lc,null),be(Gr,"_l10n",null);let f1=Gr;var yr,us,vu,dn,Am,Bc,hs,Wc,jc,wu,km,mT,RN;let Eb=(RN=class{constructor(e){J(this,km);J(this,yr,null);J(this,us,null);J(this,vu,!1);J(this,dn,null);
2J(this,Am,null);J(this,Bc,null);J(this,hs,null);J(this,Wc,null);J(this,jc,!1);J(this,wu,null);z(this,dn,e)}renderForToolbar(){const e=z(this,us,document.createElement("button"));return e.className="comment",oe(this,km,mT).call(this,e,!1)}renderForStandalone(){const e=z(this,yr,document.createElement("button"));e.className="annotationCommentButton";const t=m(this,dn).commentButtonPosition;if(t){const{style:n}=e;n.insetInlineEnd=`calc(${100*(m(this,dn)._uiManager.direction==="ltr"?1-t[0]:t[0])}% - var(--comment-button-dim))`,n.top=`calc(${100*t[1]}% - var(--comment-button-dim))`;const r=m(this,dn).commentButtonColor;r&&(n.backgroundColor=r)}return oe(this,km,mT).call(this,e,!0)}focusButton(){setTimeout(()=>{var e;(e=m(this,yr)??m(this,us))==null||e.focus()},0)}onUpdatedColor(){if(!m(this,yr))return;const e=m(this,dn).commentButtonColor;e&&(m(this,yr).style.backgroundColor=e),m(this,dn)._uiManager.updatePopupColor(m(this,dn))}get commentButtonWidth(){var e;return(((e=m(this,yr))==null?void 0:e.getBoundingClientRect().width)??0)/m(this,dn).parent.boundingClientRect.width}get commentPopupPositionInLayer(){if(m(this,wu))return m(this,wu);if(!m(this,yr))return null;const{x:e,y:t,height:n}=m(this,yr).getBoundingClientRect(),{x:r,y:i,width:a,height:o}=m(this,dn).parent.boundingClientRect;return[(e-r)/a,(t+n-i)/o]}set commentPopupPositionInLayer(e){z(this,wu,e)}hasDefaultPopupPosition(){return m(this,wu)===null}removeStandaloneCommentButton(){var e;(e=m(this,yr))==null||e.remove(),z(this,yr,null)}removeToolbarCommentButton(){var e;(e=m(this,us))==null||e.remove(),z(this,us,null)}setCommentButtonStates({selected:e,hasPopup:t}){m(this,yr)&&(m(this,yr).classList.toggle("selected",e),m(this,yr).ariaExpanded=t)}edit(e){const t=this.commentPopupPositionInLayer;let n,r;if(t)[n,r]=t;else{[n,r]=m(this,dn).commentButtonPosition;const{width:u,height:d,x:h,y:f}=m(this,dn);n=h+n*u,r=f+r*d}const i=m(this,dn).parent.boundingClientRect,{x:a,y:o,width:c,height:l}=i;m(this,dn)._uiManager.editComment(m(this,dn),a+n*c,o+r*l,{...e,parentDimensions:i})}finish(){m(this,us)&&(m(this,us).focus({focusVisible:m(this,vu)}),z(this,vu,!1))}isDeleted(){return m(this,jc)||m(this,hs)===""}isEmpty(){return m(this,hs)===null}hasBeenEdited(){return this.isDeleted()||m(this,hs)!==m(this,Am)}serialize(){return this.data}get data(){return{text:m(this,hs),richText:m(this,Bc),date:m(this,Wc),deleted:this.isDeleted()}}set data(e){if(e!==m(this,hs)&&z(this,Bc,null),e===null){z(this,hs,""),z(this,jc,!0);return}z(this,hs,e),z(this,Wc,new Date),z(this,jc,!1)}restoreData({text:e,richText:t,date:n}){z(this,hs,e),z(this,Bc,t),z(this,Wc,n),z(this,jc,!1)}setInitialText(e,t=null){z(this,Am,e),this.data=e,z(this,Wc,null),z(this,Bc,t)}shown(){}destroy(){var e,t;(e=m(this,us))==null||e.remove(),z(this,us,null),(t=m(this,yr))==null||t.remove(),z(this,yr,null),z(this,hs,""),z(this,Bc,null),z(this,Wc,null),z(this,dn,null),z(this,vu,!1),z(this,jc,!1)}},yr=new WeakMap,us=new WeakMap,vu=new WeakMap,dn=new WeakMap,Am=new WeakMap,Bc=new WeakMap,hs=new WeakMap,Wc=new WeakMap,jc=new WeakMap,wu=new WeakMap,km=new WeakSet,mT=function(e,t){if(!m(this,dn)._uiManager.hasCommentManager())return null;e.tabIndex="0",e.ariaHasPopup="dialog",t?(e.ariaControls="commentPopup",e.setAttribute("data-l10n-id","pdfjs-show-comment-button")):(e.ariaControlsElements=[m(this,dn)._uiManager.getCommentDialogElement()],e.setAttribute("data-l10n-id","pdfjs-editor-add-comment-button"));const n=m(this,dn)._uiManager._signal;if(!(n instanceof AbortSignal)||n.aborted)return e;e.addEventListener("contextmenu",Es,{signal:n}),t&&(e.addEventListener("focusin",i=>{m(this,dn)._focusEventsAllowed=!1,In(i)},{capture:!0,signal:n}),e.addEventListener("focusout",i=>{m(this,dn)._focusEventsAllowed=!0,In(i)},{capture:!0,signal:n})),e.addEventListener("pointerdown",i=>i.stopPropagation(),{signal:n});const r=i=>{i.preventDefault(),e===m(this,us)?this.edit():m(this,dn).toggleComment(!0)};return e.addEventListener("click",r,{capture:!0,signal:n}),e.addEventListener("keydown",i=>{i.target===e&&i.key==="Enter"&&(z(this,vu,!0),r(i))},{signal:n}),e.addEventListener("pointerenter",()=>{m(this,dn).toggleComment(!1,!0)},{signal:n}),e.addEventListener("pointerleave",()=>{m(this,dn).toggleComment(!1,!1)},{signal:n}),e},RN);var gf,xu,Nm,Fm,Um,Rm,Im,Ta,_u,Sa,Tu,Ea,Il,cF,lF,uF;const QD=class QD{constructor({container:e,isPinchingDisabled:t=null,isPinchingStopped:n=null,onPinchStart:r=null,onPinching:i=null,onPinchEnd:a=null,signal:o}){J(this,Il);J(this,gf);J(this,xu,!1);J(this,Nm,null);J(this,Fm);J(this,Um);J(this,Rm);J(this,Im);J(this,Ta,null);J(this,_u);J(this,Sa,null);J(this,Tu);J(this,Ea,null);z(this,gf,e),z(this,Nm,n),z(this,Fm,t),z(this,Um,r),z(this,Rm,i),z(this,Im,a),z(this,Tu,new AbortController),z(this,_u,AbortSignal.any([o,m(this,Tu).signal])),e.addEventListener("touchstart",oe(this,Il,cF).bind(this),{passive:!1,signal:m(this,_u)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/Zo.pixelRatio}destroy(){var e,t;(e=m(this,Tu))==null||e.abort(),z(this,Tu,null),(t=m(this,Ta))==null||t.abort(),z(this,Ta,null)}};gf=new WeakMap,xu=new WeakMap,Nm=new WeakMap,Fm=new WeakMap,Um=new WeakMap,Rm=new WeakMap,Im=new WeakMap,Ta=new WeakMap,_u=new WeakMap,Sa=new WeakMap,Tu=new WeakMap,Ea=new WeakMap,Il=new WeakSet,cF=function(e){var r,i,a;if((r=m(this,Fm))!=null&&r.call(this))return;if(e.touches.length===1){if(m(this,Ta))return;const o=z(this,Ta,new AbortController),c=AbortSignal.any([m(this,_u),o.signal]),l=m(this,gf),u={capture:!0,signal:c,passive:!1},d=h=>{var f;h.pointerType==="touch"&&((f=m(this,Ta))==null||f.abort(),z(this,Ta,null))};l.addEventListener("pointerdown",h=>{h.pointerType==="touch"&&(In(h),d(h))},u),l.addEventListener("pointerup",d,u),l.addEventListener("pointercancel",d,u);return}if(!m(this,Ea)){z(this,Ea,new AbortController);const o=AbortSignal.any([m(this,_u),m(this,Ea).signal]),c=m(this,gf),l={signal:o,capture:!1,passive:!1};c.addEventListener("touchmove",oe(this,Il,lF).bind(this),l);const u=oe(this,Il,uF).bind(this);c.addEventListener("touchend",u,l),c.addEventListener("touchcancel",u,l),l.capture=!0,c.addEventListener("pointerdown",In,l),c.addEventListener("pointermove",In,l),c.addEventListener("pointercancel",In,l),c.addEventListener("pointerup",In,l),(i=m(this,Um))==null||i.call(this)}if(In(e),e.touches.length!==2||(a=m(this,Nm))!=null&&a.call(this)){z(this,Sa,null);return}let[t,n]=e.touches;t.identifier>n.identifier&&([t,n]=[n,t]),z(this,Sa,{touch0X:t.screenX,touch0Y:t.screenY,touch1X:n.screenX,touch1Y:n.screenY})},lF=function(e){var w;if(!m(this,Sa)||e.touches.length!==2)return;In(e);let[t,n]=e.touches;t.identifier>n.identifier&&([t,n]=[n,t]);const{screenX:r,screenY:i}=t,{screenX:a,screenY:o}=n,c=m(this,Sa),{touch0X:l,touch0Y:u,touch1X:d,touch1Y:h}=c,f=d-l,p=h-u,y=a-r,g=o-i,b=Math.hypot(y,g)||1,v=Math.hypot(f,p)||1;if(!m(this,xu)&&Math.abs(v-b)<=QD.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(c.touch0X=r,c.touch0Y=i,c.touch1X=a,c.touch1Y=o,!m(this,xu)){z(this,xu,!0);return}const x=[(r+a)/2,(i+o)/2];(w=m(this,Rm))==null||w.call(this,x,v,b)},uF=function(e){var t;e.touches.length>=2||(m(this,Ea)&&(m(this,Ea).abort(),z(this,Ea,null),(t=m(this,Im))==null||t.call(this)),m(this,Sa)&&(In(e),z(this,Sa,null),z(this,xu,!1)))};let p1=QD;var Su,Ps,bn,Gt,Da,mf,zc,Mm,br,Eu,Ca,ds,Hc,Pm,Du,Ni,Om,Cu,Aa,ko,yf,bf,fs,Au,Lm,nv,ht,yT,Bm,bT,_0,hF,dF,vT,T0,wT,fF,pF,gF,xT,mF,_T,yF,bF,vF,TT,xg;const wt=class wt{constructor(e){J(this,ht);J(this,Su,null);J(this,Ps,null);J(this,bn,null);J(this,Gt,null);J(this,Da,null);J(this,mf,!1);J(this,zc,null);J(this,Mm,"");J(this,br,null);J(this,Eu,null);J(this,Ca,null);J(this,ds,null);J(this,Hc,null);J(this,Pm,"");J(this,Du,!1);J(this,Ni,null);J(this,Om,!1);J(this,Cu,!1);J(this,Aa,!1);J(this,ko,null);J(this,yf,0);J(this,bf,0);J(this,fs,null);J(this,Au,null);be(this,"isSelected",!1);be(this,"_isCopy",!1);be(this,"_editToolbar",null);be(this,"_initialOptions",Object.create(null));be(this,"_initialData",null);be(this,"_isVisible",!0);be(this,"_uiManager",null);be(this,"_focusEventsAllowed",!0);J(this,Lm,!1);J(this,nv,wt._zIndex++);this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null,this.annotationElementId=e.annotationElementId||null,this.creationDate=e.creationDate||new Date,this.modificationDate=e.modificationDate||null,this.canAddComment=!0;const{rotation:t,rawDims:{pageWidth:n,pageHeight:r,pageX:i,pageY:a}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[n,r],this.pageTranslation=[i,a];const[o,c]=this.parentDimensions;this.x=e.x/o,this.y=e.y/c,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const e=wt.prototype._resizeWithKeyboard,t=Oh.TRANSLATE_SMALL,n=Oh.TRANSLATE_BIG;return Tt(this,"_resizerKeyboardManager",new sb([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-t,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-n,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[t,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[n,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-t]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-n]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,t]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,n]}],[["Escape","mac+Escape"],wt.prototype._stopResizingWithKeyboard]]))}updatePageIndex(e){this.pageIndex=e}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return Tt(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}
2static deleteAnnotationElement(e){const t=new M4({id:e._uiManager.getId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t){if(wt._l10n??(wt._l10n=e),wt._l10nResizer||(wt._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),wt._borderLineWidth!==-1)return;const n=getComputedStyle(document.documentElement);wt._borderLineWidth=parseFloat(n.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){zt("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return m(this,Lm)}set _isDraggable(e){var t;z(this,Lm,e),(t=this.div)==null||t.classList.toggle("draggable",e)}get uid(){return this.annotationElementId||this.id}get isEnterHandled(){return!0}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(e*2),this.y+=this.width*e/(t*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(e*2),this.y-=this.width*e/(t*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=m(this,nv)}setParent(e){var t;e!==null?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):(oe(this,ht,xg).call(this),(t=m(this,ds))==null||t.remove(),z(this,ds,null)),this.parent=e}focusin(e){this._focusEventsAllowed&&(m(this,Du)?z(this,Du,!1):this.parent.setSelected(this))}focusout(e){var n;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const t=e.relatedTarget;t!=null&&t.closest(`#${this.id}`)||(e.preventDefault(),(n=this.parent)!=null&&n.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,n,r){const[i,a]=this.parentDimensions;[n,r]=this.screenToPageTranslation(n,r),this.x=(e+n)/i,this.y=(t+r)/a,this.fixAndSetPosition()}_moveAfterPaste(e,t){if(this.isClone){delete this.isClone;return}const[n,r]=this.parentDimensions;this.setAt(e*n,t*r,this.width*n,this.height*r),this._onTranslated()}translate(e,t){oe(this,ht,yT).call(this,this.parentDimensions,e,t)}translateInPage(e,t){m(this,Ni)||z(this,Ni,[this.x,this.y,this.width,this.height]),oe(this,ht,yT).call(this,this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(e,t){m(this,Ni)||z(this,Ni,[this.x,this.y,this.width,this.height]);const{div:n,parentDimensions:[r,i]}=this;if(this.x+=e/r,this.y+=t/i,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:d,y:h}=this.div.getBoundingClientRect();this.parent.findNewParent(this,d,h)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:a,y:o}=this;const[c,l]=this.getBaseTranslation();a+=c,o+=l;const{style:u}=n;u.left=`${(100*a).toFixed(2)}%`,u.top=`${(100*o).toFixed(2)}%`,this._onTranslating(a,o),n.scrollIntoView({block:"nearest"})}_onTranslating(e,t){}_onTranslated(e,t){}get _hasBeenMoved(){return!!m(this,Ni)&&(m(this,Ni)[0]!==this.x||m(this,Ni)[1]!==this.y)}get _hasBeenResized(){return!!m(this,Ni)&&(m(this,Ni)[2]!==this.width||m(this,Ni)[3]!==this.height)}getBaseTranslation(){const[e,t]=this.parentDimensions,{_borderLineWidth:n}=wt,r=n/e,i=n/t;switch(this.rotation){case 90:return[-r,i];case 180:return[r,i];case 270:return[r,-i];default:return[-r,-i]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){const{div:{style:t},pageDimensions:[n,r]}=this;let{x:i,y:a,width:o,height:c}=this;if(o*=n,c*=r,i*=n,a*=r,this._mustFixPosition)switch(e){case 0:i=fr(i,0,n-o),a=fr(a,0,r-c);break;case 90:i=fr(i,0,n-c),a=fr(a,o,r);break;case 180:i=fr(i,o,n),a=fr(a,c,r);break;case 270:i=fr(i,c,n),a=fr(a,0,r-o);break}this.x=i/=n,this.y=a/=r;const[l,u]=this.getBaseTranslation();i+=l,a+=u,t.left=`${(100*i).toFixed(2)}%`,t.top=`${(100*a).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(e,t){var n;return oe(n=wt,Bm,bT).call(n,e,t,this.parentRotation)}pageTranslationToScreen(e,t){var n;return oe(n=wt,Bm,bT).call(n,e,t,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,n]}=this;return[t*e,n*e]}setDims(){const{div:{style:e},width:t,height:n}=this;e.width=`${(100*t).toFixed(2)}%`,e.height=`${(100*n).toFixed(2)}%`}getInitialTranslation(){return[0,0]}_onResized(){}static _round(e){return Math.round(e*1e4)/1e4}_onResizing(){}altTextFinish(){var e;(e=m(this,bn))==null||e.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||m(this,Cu))return this._editToolbar;
2this._editToolbar=new F4(this),this.div.append(this._editToolbar.render());const{toolbarButtons:e}=this;if(e)for(const[t,n]of e)await this._editToolbar.addButton(t,n);return this.hasComment||this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}addCommentButtonInToolbar(){var e;(e=this._editToolbar)==null||e.addButtonBefore("comment",this.addCommentButton(),".deleteButton")}removeCommentButtonFromToolbar(){var e;(e=this._editToolbar)==null||e.removeButton("comment")}removeEditToolbar(){var e,t;(e=this._editToolbar)==null||e.remove(),this._editToolbar=null,(t=m(this,bn))==null||t.destroy()}addContainer(e){var n;const t=(n=this._editToolbar)==null?void 0:n.div;t?t.before(e):this.div.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return m(this,bn)||(f1.initialize(wt._l10n),z(this,bn,new f1(this)),m(this,Su)&&(m(this,bn).data=m(this,Su),z(this,Su,null))),m(this,bn)}get altTextData(){var e;return(e=m(this,bn))==null?void 0:e.data}set altTextData(e){m(this,bn)&&(m(this,bn).data=e)}get guessedAltText(){var e;return(e=m(this,bn))==null?void 0:e.guessedText}async setGuessedAltText(e){var t;await((t=m(this,bn))==null?void 0:t.setGuessedText(e))}serializeAltText(e){var t;return(t=m(this,bn))==null?void 0:t.serialize(e)}hasAltText(){return!!m(this,bn)&&!m(this,bn).isEmpty()}hasAltTextData(){var e;return((e=m(this,bn))==null?void 0:e.hasData())??!1}focusCommentButton(){var e;(e=m(this,Gt))==null||e.focusButton()}addCommentButton(){return this.canAddComment?m(this,Gt)||z(this,Gt,new Eb(this)):null}addStandaloneCommentButton(){if(this._uiManager.hasCommentManager()){if(m(this,Da)){this._uiManager.isEditingMode()&&m(this,Da).classList.remove("hidden");return}this.hasComment&&(z(this,Da,m(this,Gt).renderForStandalone()),this.div.append(m(this,Da)))}}removeStandaloneCommentButton(){m(this,Gt).removeStandaloneCommentButton(),z(this,Da,null)}hideStandaloneCommentButton(){var e;(e=m(this,Da))==null||e.classList.add("hidden")}get comment(){if(!m(this,Gt))return null;const{data:{richText:e,text:t,date:n,deleted:r}}=m(this,Gt);return{text:t,richText:e,date:n,deleted:r,color:this.getNonHCMColor(),opacity:this.opacity??1}}set comment(e){m(this,Gt)||z(this,Gt,new Eb(this)),typeof e=="object"&&e!==null?m(this,Gt).restoreData(e):m(this,Gt).data=e,this.hasComment?(this.removeCommentButtonFromToolbar(),this.addStandaloneCommentButton(),this._uiManager.updateComment(this)):(this.addCommentButtonInToolbar(),this.removeStandaloneCommentButton(),this._uiManager.removeComment(this))}setCommentData({comment:e,popupRef:t,richText:n}){if(!t||(m(this,Gt)||z(this,Gt,new Eb(this)),m(this,Gt).setInitialText(e,n),!this.annotationElementId))return;const r=this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId);r&&this.updateFromAnnotationLayer(r)}get hasEditedComment(){var e;return(e=m(this,Gt))==null?void 0:e.hasBeenEdited()}get hasDeletedComment(){var e;return(e=m(this,Gt))==null?void 0:e.isDeleted()}get hasComment(){return!!m(this,Gt)&&!m(this,Gt).isEmpty()&&!m(this,Gt).isDeleted()}async editComment(e){m(this,Gt)||z(this,Gt,new Eb(this)),m(this,Gt).edit(e)}
2toggleComment(e,t=void 0){this.hasComment&&this._uiManager.toggleComment(this,e,t)}setSelectedCommentButton(e){m(this,Gt).setSelectedButton(e)}addComment(e){if(this.hasEditedComment){const[,,,r]=e.rect,[i]=this.pageDimensions,[a]=this.pageTranslation,o=a+i+1,c=r-100,l=o+180;e.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[o,c,l,r]}}}updateFromAnnotationLayer({popup:{contents:e,deleted:t}}){m(this,Gt).data=t?null:e}get parentBoundingClientRect(){return this.parent.boundingClientRect}render(){var a;const e=this.div=document.createElement("div");e.setAttribute("data-editor-rotation",(360-this.rotation)%360),e.className=this.name,e.setAttribute("id",this.id),e.tabIndex=m(this,mf)?-1:0,e.setAttribute("role","application"),this.defaultL10nId&&e.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||e.classList.add("hidden"),this.setInForeground(),oe(this,ht,_T).call(this);const[t,n]=this.parentDimensions;this.parentRotation%180!==0&&(e.style.maxWidth=`${(100*n/t).toFixed(2)}%`,e.style.maxHeight=`${(100*t/n).toFixed(2)}%`);const[r,i]=this.getInitialTranslation();return this.translate(r,i),VN(this,e,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(m(this,Au)||z(this,Au,new p1({container:e,isPinchingDisabled:()=>!this.isSelected,onPinchStart:oe(this,ht,fF).bind(this),onPinching:oe(this,ht,pF).bind(this),onPinchEnd:oe(this,ht,gF).bind(this),signal:this._uiManager._signal}))),this.addStandaloneCommentButton(),(a=this._uiManager._editorUndoBar)==null||a.hide(),e}pointerdown(e){const{isMac:t}=rr.platform;if(e.button!==0||e.ctrlKey&&t){e.preventDefault();return}if(z(this,Du,!0),this._isDraggable){oe(this,ht,mF).call(this,e);return}oe(this,ht,xT).call(this,e)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){m(this,ko)&&clearTimeout(m(this,ko)),z(this,ko,setTimeout(()=>{var e;z(this,ko,null),(e=this.parent)==null||e.moveEditorInDOM(this)},0))}_setParentAndPosition(e,t,n){e.changeParent(this),this.x=t,this.y=n,this.fixAndSetPosition(),this._onTranslated()}getRect(e,t,n=this.rotation){const r=this.parentScale,[i,a]=this.pageDimensions,[o,c]=this.pageTranslation,l=e/r,u=t/r,d=this.x*i,h=this.y*a,f=this.width*i,p=this.height*a;switch(n){case 0:return[d+l+o,a-h-u-p+c,d+l+f+o,a-h-u+c];case 90:return[d+u+o,a-h+l+c,d+u+p+o,a-h+l+f+c];case 180:return[d-l-f+o,a-h+u+c,d-l+o,a-h+u+p+c];case 270:return[d-u-p+o,a-h-l-f+c,d-u+o,a-h-l+c];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[n,r,i,a]=e,o=i-n,c=a-r;switch(this.rotation){case 0:return[n,t-a,o,c];case 90:return[n,t-r,c,o];case 180:return[i,t-r,o,c];case 270:return[i,t-a,c,o];default:throw new Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}getNonHCMColor(){return this.color&&wt._colorManager.convert(this._uiManager.getNonHCMColor(this.color))}onUpdatedColor(){var e;(e=m(this,Gt))==null||e.onUpdatedColor()}getData(){const{comment:{text:e,color:t,date:n,opacity:r,deleted:i,richText:a},uid:o,pageIndex:c,creationDate:l,modificationDate:u}=this;return{id:o,pageIndex:c,rect:this.getPDFRect(),richText:a,contentsObj:{str:e},creationDate:l,modificationDate:n||u,popupRef:!i,color:t,opacity:r}}onceAdded(e){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),z(this,Cu,!0),!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),z(this,Cu,!1),!0):!1}isInEditMode(){return m(this,Cu)}shouldGetKeyboardEvents(){return m(this,Aa)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:e,left:t,bottom:n,right:r}=this.getClientDimensions(),{innerHeight:i,innerWidth:a}=window;return t<a&&r>0&&e<i&&n>0}rebuild(){oe(this,ht,_T).call(this)}rotate(e){}resize(){}serializeDeleted(){var e;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((e=this._initialData)==null?void 0:e.popupRef)||""}}serialize(e=!1,t=null){var n;return{annotationType:this.mode,pageIndex:this.pageIndex,rect:this.getPDFRect(),rotation:this.rotation,structTreeParentId:this._structTreeParentId,popupRef:((n=this._initialData)==null?void 0:n.popupRef)||""}}static async deserialize(e,t,n){const r=new this.prototype.constructor({parent:t,id:n.getId(),uiManager:n,annotationElementId:e.annotationElementId,creationDate:e.creationDate,modificationDate:e.modificationDate});r.rotation=e.rotation,z(r,Su,e.accessibilityData),r._isCopy=e.isCopy||!1;const[i,a]=r.pageDimensions,[o,c,l,u]=r.getRectInCurrentCoords(e.rect,a);
2return r.x=o/i,r.y=c/a,r.width=l/i,r.height=u/a,r}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var e,t,n;if((e=m(this,Hc))==null||e.abort(),z(this,Hc,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.hideCommentPopup(),m(this,ko)&&(clearTimeout(m(this,ko)),z(this,ko,null)),oe(this,ht,xg).call(this),this.removeEditToolbar(),m(this,fs)){for(const r of m(this,fs).values())clearTimeout(r);z(this,fs,null)}this.parent=null,(t=m(this,Au))==null||t.destroy(),z(this,Au,null),(n=m(this,ds))==null||n.remove(),z(this,ds,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(oe(this,ht,hF).call(this),m(this,br).classList.remove("hidden"))}get toolbarPosition(){return null}get commentButtonPosition(){return this._uiManager.direction==="ltr"?[1,0]:[0,0]}get commentButtonPositionInPage(){const{commentButtonPosition:[e,t]}=this,[n,r,i,a]=this.getPDFRect();return[wt._round(n+(i-n)*e),wt._round(r+(a-r)*(1-t))]}get commentButtonColor(){return this._uiManager.makeCommentColor(this.getNonHCMColor(),this.opacity)}get commentPopupPosition(){return m(this,Gt).commentPopupPositionInLayer}set commentPopupPosition(e){m(this,Gt).commentPopupPositionInLayer=e}hasDefaultPopupPosition(){return m(this,Gt).hasDefaultPopupPosition()}get commentButtonWidth(){return m(this,Gt).commentButtonWidth}get elementBeforePopup(){return this.div}setCommentButtonStates(e){var t;(t=m(this,Gt))==null||t.setCommentButtonStates(e)}keydown(e){if(!this.isResizable||e.target!==this.div||e.key!=="Enter")return;this._uiManager.setSelected(this),z(this,Ca,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const t=m(this,br).children;if(!m(this,Ps)){z(this,Ps,Array.from(t));const a=oe(this,ht,yF).bind(this),o=oe(this,ht,bF).bind(this),c=this._uiManager._signal;for(const l of m(this,Ps)){const u=l.getAttribute("data-resizer-name");l.setAttribute("role","spinbutton"),l.addEventListener("keydown",a,{signal:c}),l.addEventListener("blur",o,{signal:c}),l.addEventListener("focus",oe(this,ht,vF).bind(this,u),{signal:c}),l.setAttribute("data-l10n-id",wt._l10nResizer[u])}}const n=m(this,Ps)[0];let r=0;for(const a of t){if(a===n)break;r++}const i=(360-this.rotation+this.parentRotation)%360/90*(m(this,Ps).length/4);if(i!==r){if(i<r)for(let o=0;o<r-i;o++)m(this,br).append(m(this,br).firstElementChild);else if(i>r)for(let o=0;o<i-r;o++)m(this,br).firstElementChild.before(m(this,br).lastElementChild);let a=0;for(const o of t){const l=m(this,Ps)[a++].getAttribute("data-resizer-name");o.setAttribute("data-l10n-id",wt._l10nResizer[l])}}oe(this,ht,TT).call(this,0),z(this,Aa,!0),m(this,br).firstElementChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}_resizeWithKeyboard(e,t){m(this,Aa)&&oe(this,ht,wT).call(this,m(this,Pm),{deltaX:e,deltaY:t,fromKeyboard:!0})}_stopResizingWithKeyboard(){oe(this,ht,xg).call(this),this.div.focus()}select(){var e,t,n;if(this.isSelected&&this._editToolbar){this._editToolbar.show();return}if(this.isSelected=!0,this.makeResizable(),(e=this.div)==null||e.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{var r,i;(r=this.div)!=null&&r.classList.contains("selectedEditor")&&((i=this._editToolbar)==null||i.show())});return}(t=this._editToolbar)==null||t.show(),(n=m(this,bn))==null||n.toggleAltTextBadge(!1)}focus(){this.div&&!this.div.contains(document.activeElement)&&setTimeout(()=>{var e;return(e=this.div)==null?void 0:e.focus({preventScroll:!0})},0)}unselect(){var e,t,n,r,i;this.isSelected&&(this.isSelected=!1,(e=m(this,br))==null||e.classList.add("hidden"),(t=this.div)==null||t.classList.remove("selectedEditor"),(n=this.div)!=null&&n.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(r=this._editToolbar)==null||r.hide(),(i=m(this,bn))==null||i.toggleAltTextBadge(!0),this.hideCommentPopup())}hideCommentPopup(){this.hasComment&&this._uiManager.toggleComment(null)}updateParams(e,t){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(e){e.target.nodeName!=="BUTTON"&&(this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.uid}))}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return m(this,Om)}set isEditing(e){z(this,Om,e),this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,t=!1){if(t){m(this,fs)||z(this,fs,new Map);const{action:n}=e;let r=m(this,fs).get(n);r&&clearTimeout(r),r=setTimeout(()=>{this._reportTelemetry(e),m(this,fs).delete(n),m(this,fs).size===0&&z(this,fs,null)},wt._telemetryTimeout),m(this,fs).set(n,r);return}e.type||(e.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),z(this,mf,!1)}disable(){this.div&&(this.div.tabIndex=-1),z(this,mf,!0)}updateFakeAnnotationElement(e){if(!m(this,ds)&&!this.deleted){z(this,ds,e.addFakeAnnotation(this));return}if(this.deleted){m(this,ds).remove(),z(this,ds,null);return}(this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized)&&m(this,ds).updateEdited({rect:this.getPDFRect(),popup:this.comment})}renderAnnotationElement(e){if(this.deleted)return e.hide(),null;let t=e.container.querySelector(".annotationContent");
2if(!t)t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);else if(t.nodeName==="CANVAS"){const n=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),n.before(t)}return t}resetAnnotationElement(e){const{firstElementChild:t}=e.container;(t==null?void 0:t.nodeName)==="DIV"&&t.classList.contains("annotationContent")&&t.remove()}};Su=new WeakMap,Ps=new WeakMap,bn=new WeakMap,Gt=new WeakMap,Da=new WeakMap,mf=new WeakMap,zc=new WeakMap,Mm=new WeakMap,br=new WeakMap,Eu=new WeakMap,Ca=new WeakMap,ds=new WeakMap,Hc=new WeakMap,Pm=new WeakMap,Du=new WeakMap,Ni=new WeakMap,Om=new WeakMap,Cu=new WeakMap,Aa=new WeakMap,ko=new WeakMap,yf=new WeakMap,bf=new WeakMap,fs=new WeakMap,Au=new WeakMap,Lm=new WeakMap,nv=new WeakMap,ht=new WeakSet,yT=function([e,t],n,r){[n,r]=this.screenToPageTranslation(n,r),this.x+=n/e,this.y+=r/t,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},Bm=new WeakSet,bT=function(e,t,n){switch(n){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}},_0=function(e){switch(e){case 90:{const[t,n]=this.pageDimensions;return[0,-t/n,n/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,n]=this.pageDimensions;return[0,t/n,-n/t,0]}default:return[1,0,0,1]}},hF=function(){if(m(this,br))return;z(this,br,document.createElement("div")),m(this,br).classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(const n of e){const r=document.createElement("div");m(this,br).append(r),r.classList.add("resizer",n),r.setAttribute("data-resizer-name",n),r.addEventListener("pointerdown",oe(this,ht,dF).bind(this,n),{signal:t}),r.addEventListener("contextmenu",Es,{signal:t}),r.tabIndex=-1}this.div.prepend(m(this,br))},dF=function(e,t){var u;t.preventDefault();const{isMac:n}=rr.platform;if(t.button!==0||t.ctrlKey&&n)return;(u=m(this,bn))==null||u.toggle(!1);const r=this._isDraggable;this._isDraggable=!1,z(this,Eu,[t.screenX,t.screenY]);const i=new AbortController,a=this._uiManager.combinedSignal(i);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",oe(this,ht,wT).bind(this,e),{passive:!0,capture:!0,signal:a}),window.addEventListener("touchmove",In,{passive:!1,signal:a}),window.addEventListener("contextmenu",Es,{signal:a}),z(this,Ca,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const o=this.parent.div.style.cursor,c=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const l=()=>{var d;i.abort(),this.parent.togglePointerEvents(!0),(d=m(this,bn))==null||d.toggle(!0),this._isDraggable=r,this.parent.div.style.cursor=o,this.div.style.cursor=c,oe(this,ht,T0).call(this)};window.addEventListener("pointerup",l,{signal:a}),window.addEventListener("blur",l,{signal:a})},vT=function(e,t,n,r){this.width=n,this.height=r,this.x=e,this.y=t,this.setDims(),this.fixAndSetPosition(),this._onResized()},T0=function(){if(!m(this,Ca))return;const{savedX:e,savedY:t,savedWidth:n,savedHeight:r}=m(this,Ca);z(this,Ca,null);const i=this.x,a=this.y,o=this.width,c=this.height;i===e&&a===t&&o===n&&c===r||this.addCommands({cmd:oe(this,ht,vT).bind(this,i,a,o,c),undo:oe(this,ht,vT).bind(this,e,t,n,r),mustExec:!0})},wT=function(e,t){const[n,r]=this.parentDimensions,i=this.x,a=this.y,o=this.width,c=this.height,l=wt.MIN_SIZE/n,u=wt.MIN_SIZE/r,d=oe(this,ht,_0).call(this,this.rotation),h=(he,j)=>[d[0]*he+d[2]*j,d[1]*he+d[3]*j],f=oe(this,ht,_0).call(this,360-this.rotation),p=(he,j)=>[f[0]*he+f[2]*j,f[1]*he+f[3]*j];let y,g,b=!1,v=!1;switch(e){case"topLeft":b=!0,y=(he,j)=>[0,0],g=(he,j)=>[he,j];break;case"topMiddle":y=(he,j)=>[he/2,0],g=(he,j)=>[he/2,j];break;case"topRight":b=!0,y=(he,j)=>[he,0],g=(he,j)=>[0,j];break;case"middleRight":v=!0,y=(he,j)=>[he,j/2],g=(he,j)=>[0,j/2];break;case"bottomRight":b=!0,y=(he,j)=>[he,j],g=(he,j)=>[0,0];break;case"bottomMiddle":y=(he,j)=>[he/2,j],g=(he,j)=>[he/2,0];break;case"bottomLeft":b=!0,y=(he,j)=>[0,j],g=(he,j)=>[he,0];break;case"middleLeft":v=!0,y=(he,j)=>[0,j/2],g=(he,j)=>[he,j/2];break}const x=y(o,c),w=g(o,c);let _=h(...w);const T=wt._round(i+_[0]),S=wt._round(a+_[1]);let C=1,D=1,N,M;if(t.fromKeyboard)({deltaX:N,deltaY:M}=t);else{const{screenX:he,screenY:j}=t,[ee,O]=m(this,Eu);[N,M]=this.screenToPageTranslation(he-ee,j-O),m(this,Eu)[0]=he,m(this,Eu)[1]=j}if([N,M]=p(N/n,M/r),b){const he=Math.hypot(o,c);C=D=Math.max(Math.min(Math.hypot(w[0]-x[0]-N,w[1]-x[1]-M)/he,1/o,1/c),l/o,u/c)}else v?C=fr(Math.abs(w[0]-x[0]-N),l,1)/o:D=fr(Math.abs(w[1]-x[1]-M),u,1)/c;const F=wt._round(o*C),L=wt._round(c*D);_=h(...g(F,L));const A=T-_[0],X=S-_[1];m(this,Ni)||z(this,Ni,[this.x,this.y,this.width,this.height]),this.width=F,this.height=L,this.x=A,this.y=X,this.setDims(),this.fixAndSetPosition(),this._onResizing()},fF=function(){var e;z(this,Ca,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(e=m(this,bn))==null||e.toggle(!1),this.parent.togglePointerEvents(!1)},pF=function(e,t,n){let i=.7*(n/t)+1-.7;
2if(i===1)return;const a=oe(this,ht,_0).call(this,this.rotation),o=(T,S)=>[a[0]*T+a[2]*S,a[1]*T+a[3]*S],[c,l]=this.parentDimensions,u=this.x,d=this.y,h=this.width,f=this.height,p=wt.MIN_SIZE/c,y=wt.MIN_SIZE/l;i=Math.max(Math.min(i,1/h,1/f),p/h,y/f);const g=wt._round(h*i),b=wt._round(f*i);if(g===h&&b===f)return;m(this,Ni)||z(this,Ni,[u,d,h,f]);const v=o(h/2,f/2),x=wt._round(u+v[0]),w=wt._round(d+v[1]),_=o(g/2,b/2);this.x=x-_[0],this.y=w-_[1],this.width=g,this.height=b,this.setDims(),this.fixAndSetPosition(),this._onResizing()},gF=function(){var e;(e=m(this,bn))==null||e.toggle(!0),this.parent.togglePointerEvents(!0),oe(this,ht,T0).call(this)},xT=function(e){const{isMac:t}=rr.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)},mF=function(e){const{isSelected:t}=this;this._uiManager.setUpDragSession();let n=!1;const r=new AbortController,i=this._uiManager.combinedSignal(r),a={capture:!0,passive:!1,signal:i},o=l=>{r.abort(),z(this,zc,null),z(this,Du,!1),this._uiManager.endDragSession()||oe(this,ht,xT).call(this,l),n&&this._onStopDragging()};t&&(z(this,yf,e.clientX),z(this,bf,e.clientY),z(this,zc,e.pointerId),z(this,Mm,e.pointerType),window.addEventListener("pointermove",l=>{n||(n=!0,this._uiManager.toggleComment(this,!0,!1),this._onStartDragging());const{clientX:u,clientY:d,pointerId:h}=l;if(h!==m(this,zc)){In(l);return}const[f,p]=this.screenToPageTranslation(u-m(this,yf),d-m(this,bf));z(this,yf,u),z(this,bf,d),this._uiManager.dragSelectedEditors(f,p)},a),window.addEventListener("touchmove",In,a),window.addEventListener("pointerdown",l=>{l.pointerType===m(this,Mm)&&(m(this,Au)||l.isPrimary)&&o(l),In(l)},a));const c=l=>{if(!m(this,zc)||m(this,zc)===l.pointerId){o(l);return}In(l)};window.addEventListener("pointerup",c,{signal:i}),window.addEventListener("blur",c,{signal:i})},_T=function(){if(m(this,Hc)||!this.div)return;z(this,Hc,new AbortController);const e=this._uiManager.combinedSignal(m(this,Hc));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})},yF=function(e){wt._resizerKeyboardManager.exec(this,e)},bF=function(e){var t;m(this,Aa)&&((t=e.relatedTarget)==null?void 0:t.parentNode)!==m(this,br)&&oe(this,ht,xg).call(this)},vF=function(e){z(this,Pm,m(this,Aa)?e:"")},TT=function(e){if(m(this,Ps))for(const t of m(this,Ps))t.tabIndex=e},xg=function(){z(this,Aa,!1),oe(this,ht,TT).call(this,-1),oe(this,ht,T0).call(this)},J(wt,Bm),be(wt,"_l10n",null),be(wt,"_l10nResizer",null),be(wt,"_borderLineWidth",-1),be(wt,"_colorManager",new hT),be(wt,"_zIndex",1),be(wt,"_telemetryTimeout",1e3);let pn=wt;class M4 extends pn{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const YC=3285377520,rs=4294901760,uo=65535;class wF{constructor(e){this.h1=e?e&4294967295:YC,this.h2=e?e&4294967295:YC}update(e){let t,n;if(typeof e=="string"){t=new Uint8Array(e.length*2),n=0;for(let y=0,g=e.length;y<g;y++){const b=e.charCodeAt(y);b<=255?t[n++]=b:(t[n++]=b>>>8,t[n++]=b&255)}}else if(ArrayBuffer.isView(e))t=e.slice(),n=t.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const r=n>>2,i=n-r*4,a=new Uint32Array(t.buffer,0,r);let o=0,c=0,l=this.h1,u=this.h2;const d=3432918353,h=461845907,f=d&uo,p=h&uo;for(let y=0;y<r;y++)y&1?(o=a[y],o=o*d&rs|o*f&uo,o=o<<15|o>>>17,o=o*h&rs|o*p&uo,l^=o,l=l<<13|l>>>19,l=l*5+3864292196):(c=a[y],c=c*d&rs|c*f&uo,c=c<<15|c>>>17,c=c*h&rs|c*p&uo,u^=c,u=u<<13|u>>>19,u=u*5+3864292196);switch(o=0,i){case 3:o^=t[r*4+2]<<16;case 2:o^=t[r*4+1]<<8;case 1:o^=t[r*4],o=o*d&rs|o*f&uo,o=o<<15|o>>>17,o=o*h&rs|o*p&uo,r&1?l^=o:u^=o}this.h1=l,this.h2=u}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=e*3981806797&rs|e*36045&uo,t=t*4283543511&rs|((t<<16|e>>>16)*2950163797&rs)>>>16,e^=t>>>1,e=e*444984403&rs|e*60499&uo,t=t*3301882366&rs|((t<<16|e>>>16)*3120437893&rs)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}const tm=Object.freeze({map:null,hash:"",transfer:void 0});var ku,Nu,ka,vr,rv,xF;class IE{constructor(){J(this,rv);J(this,ku,!1);J(this,Nu,null);J(this,ka,null);J(this,vr,new Map);be(this,"onSetModified",null);be(this,"onResetModified",null);be(this,"onAnnotationEditor",null)}getValue(e,t){const n=m(this,vr).get(e);return n===void 0?t:Object.assign(t,n)}getRawValue(e){return m(this,vr).get(e)}remove(e){var n;const t=m(this,vr).get(e);t!==void 0&&(t instanceof pn&&m(this,ka).delete(t.annotationElementId),m(this,vr).delete(e),m(this,vr).size===0&&this.resetModified(),!m(this,vr).values().some(r=>r instanceof pn)&&((n=this.onAnnotationEditor)==null||n.call(this,null)))}setValue(e,t){var i;const n=m(this,vr).get(e);let r=!1;
2if(n!==void 0)for(const[a,o]of Object.entries(t))n[a]!==o&&(r=!0,n[a]=o);else r=!0,m(this,vr).set(e,t);r&&oe(this,rv,xF).call(this),t instanceof pn&&((m(this,ka)||z(this,ka,new Map)).set(t.annotationElementId,t),(i=this.onAnnotationEditor)==null||i.call(this,t.constructor._type))}has(e){return m(this,vr).has(e)}get size(){return m(this,vr).size}resetModified(){var e;m(this,ku)&&(z(this,ku,!1),(e=this.onResetModified)==null||e.call(this))}get print(){return new _F(this)}get serializable(){if(m(this,vr).size===0)return tm;const e=new Map,t=new wF,n=[],r=Object.create(null);let i=!1;for(const[a,o]of m(this,vr)){const c=o instanceof pn?o.serialize(!1,r):o;o.page&&(o.pageIndex=o.page._pageIndex,delete o.page),c&&(e.set(a,c),t.update(`${a}:${JSON.stringify(c)}`),i||(i=!!c.bitmap))}if(i)for(const a of e.values())a.bitmap&&n.push(a.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:n}:tm}get editorStats(){let e=null;const t=new Map;let n=0,r=0;for(const i of m(this,vr).values()){if(!(i instanceof pn)){i.popup&&(i.popup.deleted?r+=1:n+=1);continue}i.isCommentDeleted?r+=1:i.hasEditedComment&&(n+=1);const a=i.telemetryFinalData;if(!a)continue;const{type:o}=a;t.has(o)||t.set(o,Object.getPrototypeOf(i).constructor),e||(e=Object.create(null));const c=e[o]||(e[o]=new Map);for(const[l,u]of Object.entries(a)){if(l==="type")continue;const d=c.getOrInsertComputed(l,NE);d.set(u,(d.get(u)??0)+1)}}if((r>0||n>0)&&(e||(e=Object.create(null)),e.comments={deleted:r,edited:n}),!e)return null;for(const[i,a]of t)e[i]=a.computeTelemetryFinalData(e[i]);return e}resetModifiedIds(){z(this,Nu,null)}updateEditor(e,t){var r;const n=(r=m(this,ka))==null?void 0:r.get(e);return n?(n.updateFromAnnotationLayer(t),!0):!1}getEditor(e){var t;return((t=m(this,ka))==null?void 0:t.get(e))||null}get modifiedIds(){if(m(this,Nu))return m(this,Nu);const e=[];if(m(this,ka))for(const t of m(this,ka).values())t.serialize()&&e.push(t.annotationElementId);return z(this,Nu,{ids:new Set(e),hash:e.join(",")})}[Symbol.iterator](){return m(this,vr).entries()}}ku=new WeakMap,Nu=new WeakMap,ka=new WeakMap,vr=new WeakMap,rv=new WeakSet,xF=function(){var e;m(this,ku)||(z(this,ku,!0),(e=this.onSetModified)==null||e.call(this))};var Wm;class _F extends IE{constructor(t){super();J(this,Wm,tm);const{serializable:n}=t;if(n===tm)return;const{map:r,hash:i,transfer:a}=n,o=structuredClone(r,a?{transfer:a}:null);z(this,Wm,{map:o,hash:i,transfer:[]})}get print(){zt("Should not call PrintAnnotationStorage.print")}get serializable(){return m(this,Wm)}get modifiedIds(){return Tt(this,"modifiedIds",{ids:new Set,hash:""})}}Wm=new WeakMap;const ld="__forcedDependency",{floor:ZC,ceil:JC}=Math;function QC(s,e,t,n,r,i){s[e*4+0]=Math.min(s[e*4+0],t),s[e*4+1]=Math.min(s[e*4+1],n),s[e*4+2]=Math.max(s[e*4+2],r),s[e*4+3]=Math.max(s[e*4+3],i)}const ST=new Uint32Array(new Uint8Array([255,255,0,0]).buffer)[0];var vf,$c;class P4{constructor(e,t){J(this,vf);J(this,$c);z(this,vf,e),z(this,$c,t)}get length(){return m(this,vf).length}isEmpty(e){return m(this,vf)[e]===ST}minX(e){return m(this,$c)[e*4+0]/256}minY(e){return m(this,$c)[e*4+1]/256}maxX(e){return(m(this,$c)[e*4+2]+1)/256}maxY(e){return(m(this,$c)[e*4+3]+1)/256}}vf=new WeakMap,$c=new WeakMap;const eA=(s,e)=>s==null?void 0:s.getOrInsertComputed(e,()=>({dependencies:new Set,isRenderingOperation:!1}));var Na,Wt,Qt,Fu,Uu,Ru,Mr,jm,ET;class O4{constructor(e,t){J(this,jm);J(this,Na,[[1,0,0,1,0,0]]);J(this,Wt,[-1/0,-1/0,1/0,1/0]);J(this,Qt,new Float64Array([1/0,1/0,-1/0,-1/0]));be(this,"_pendingBBoxIdx",-1);J(this,Fu);J(this,Uu);J(this,Ru);J(this,Mr);be(this,"_savesStack",[]);be(this,"_markedContentStack",[]);z(this,Fu,e.width),z(this,Uu,e.height),oe(this,jm,ET).call(this,t)}growOperationsCount(e){e>=m(this,Mr).length&&oe(this,jm,ET).call(this,e,m(this,Mr))}get clipBox(){return m(this,Wt)}save(e){return z(this,Wt,{__proto__:m(this,Wt)}),this._savesStack.push(e),this}restore(e,t){const n=Object.getPrototypeOf(m(this,Wt));if(n===null)return this;z(this,Wt,n);const r=this._savesStack.pop();return r!==void 0&&(t==null||t(r,e),m(this,Mr)[e]=m(this,Mr)[r]),this}recordOpenMarker(e){return this._savesStack.push(e),this}getOpenMarker(){return this._savesStack.length===0?null:this._savesStack.at(-1)}recordCloseMarker(e,t){const n=this._savesStack.pop();return n!==void 0&&(t==null||t(n,e),m(this,Mr)[e]=m(this,Mr)[n]),this}beginMarkedContent(e){return this._markedContentStack.push(e),this}endMarkedContent(e,t){const n=this._markedContentStack.pop();return n!==void 0&&(t==null||t(n,e),m(this,Mr)[e]=m(this,Mr)[n]),this}pushBaseTransform(e){return m(this,Na).push(Ge.multiplyByDOMMatrix(m(this,Na).at(-1),e.getTransform())),this}popBaseTransform(){return m(this,Na).length>1&&m(this,Na).pop(),this}
2resetBBox(e){return this._pendingBBoxIdx!==e&&(this._pendingBBoxIdx=e,m(this,Qt)[0]=1/0,m(this,Qt)[1]=1/0,m(this,Qt)[2]=-1/0,m(this,Qt)[3]=-1/0),this}recordClipBox(e,t,n,r,i,a){const o=Ge.multiplyByDOMMatrix(m(this,Na).at(-1),t.getTransform()),c=[1/0,1/0,-1/0,-1/0];Ge.axialAlignedBoundingBox([n,i,r,a],o,c);const l=Ge.intersect(m(this,Wt),c);return l?(m(this,Wt)[0]=l[0],m(this,Wt)[1]=l[1],m(this,Wt)[2]=l[2],m(this,Wt)[3]=l[3]):(m(this,Wt)[0]=m(this,Wt)[1]=1/0,m(this,Wt)[2]=m(this,Wt)[3]=-1/0),this}recordBBox(e,t,n,r,i,a){const o=m(this,Wt);if(o[0]===1/0)return this;const c=Ge.multiplyByDOMMatrix(m(this,Na).at(-1),t.getTransform());if(o[0]===-1/0)return Ge.axialAlignedBoundingBox([n,i,r,a],c,m(this,Qt)),this;const l=[1/0,1/0,-1/0,-1/0];return Ge.axialAlignedBoundingBox([n,i,r,a],c,l),m(this,Qt)[0]=Math.min(m(this,Qt)[0],Math.max(l[0],o[0])),m(this,Qt)[1]=Math.min(m(this,Qt)[1],Math.max(l[1],o[1])),m(this,Qt)[2]=Math.max(m(this,Qt)[2],Math.min(l[2],o[2])),m(this,Qt)[3]=Math.max(m(this,Qt)[3],Math.min(l[3],o[3])),this}recordFullPageBBox(e){return m(this,Qt)[0]=Math.max(0,m(this,Wt)[0]),m(this,Qt)[1]=Math.max(0,m(this,Wt)[1]),m(this,Qt)[2]=Math.min(m(this,Fu),m(this,Wt)[2]),m(this,Qt)[3]=Math.min(m(this,Uu),m(this,Wt)[3]),this}recordOperation(e,t=!1,n){if(this._pendingBBoxIdx!==e)return this;const r=ZC(m(this,Qt)[0]*256/m(this,Fu)),i=ZC(m(this,Qt)[1]*256/m(this,Uu)),a=JC(m(this,Qt)[2]*256/m(this,Fu)),o=JC(m(this,Qt)[3]*256/m(this,Uu));if(QC(m(this,Ru),e,r,i,a,o),n)for(const c of n)for(const l of c)l!==e&&QC(m(this,Ru),l,r,i,a,o);return t||(this._pendingBBoxIdx=-1),this}bboxToClipBoxDropOperation(e){return this._pendingBBoxIdx===e&&(this._pendingBBoxIdx=-1,m(this,Wt)[0]=Math.max(m(this,Wt)[0],m(this,Qt)[0]),m(this,Wt)[1]=Math.max(m(this,Wt)[1],m(this,Qt)[1]),m(this,Wt)[2]=Math.min(m(this,Wt)[2],m(this,Qt)[2]),m(this,Wt)[3]=Math.min(m(this,Wt)[3],m(this,Qt)[3])),this}take(){return new P4(m(this,Mr),m(this,Ru))}takeDebugMetadata(){throw new Error("Unreachable")}recordSimpleData(e,t){return this}recordIncrementalData(e,t){return this}resetIncrementalData(e,t){return this}recordNamedData(e,t){return this}recordSimpleDataFromNamed(e,t,n){return this}recordFutureForcedDependency(e,t){return this}inheritSimpleDataAsFutureForcedDependencies(e){return this}inheritPendingDependenciesAsFutureForcedDependencies(){return this}recordCharacterBBox(e,t,n,r=1,i=0,a=0,o){return this}getSimpleIndex(e){}recordDependencies(e,t){return this}recordNamedDependency(e,t){return this}recordShowTextOperation(e,t=!1){return this}}Na=new WeakMap,Wt=new WeakMap,Qt=new WeakMap,Fu=new WeakMap,Uu=new WeakMap,Ru=new WeakMap,Mr=new WeakMap,jm=new WeakSet,ET=function(e,t){const n=new ArrayBuffer(e*4);z(this,Ru,new Uint8ClampedArray(n)),z(this,Mr,new Uint32Array(n)),t&&t.length>0?(m(this,Mr).set(t),m(this,Mr).fill(ST,t.length)):m(this,Mr).fill(ST)};var fi,pi,Iu,Os,wf,Kc,Xc,en;class L4{constructor(e,t=!1){J(this,fi,{__proto__:null});J(this,pi,{__proto__:null,transform:[],moveText:[],sameLineText:[],[ld]:[]});J(this,Iu,new Map);J(this,Os,new Set);J(this,wf,new Map);J(this,Kc);J(this,Xc);J(this,en);z(this,en,e),t&&(z(this,Kc,new Map),z(this,Xc,(n,r)=>{eA(m(this,Kc),r).dependencies.add(n)}))}get clipBox(){return m(this,en).clipBox}growOperationsCount(e){m(this,en).growOperationsCount(e)}save(e){return z(this,fi,{__proto__:m(this,fi)}),z(this,pi,{__proto__:m(this,pi),transform:{__proto__:m(this,pi).transform},moveText:{__proto__:m(this,pi).moveText},sameLineText:{__proto__:m(this,pi).sameLineText},[ld]:{__proto__:m(this,pi)[ld]}}),m(this,en).save(e),this}restore(e){m(this,en).restore(e,m(this,Xc));const t=Object.getPrototypeOf(m(this,fi));return t===null?this:(z(this,fi,t),z(this,pi,Object.getPrototypeOf(m(this,pi))),this)}recordOpenMarker(e){return m(this,en).recordOpenMarker(e,m(this,Xc)),this}getOpenMarker(){return m(this,en).getOpenMarker()}recordCloseMarker(e){return m(this,en).recordCloseMarker(e,m(this,Xc)),this}beginMarkedContent(e){return m(this,en).beginMarkedContent(e),this}endMarkedContent(e){return m(this,en).endMarkedContent(e,m(this,Xc)),this}pushBaseTransform(e){return m(this,en).pushBaseTransform(e),this}popBaseTransform(){return m(this,en).popBaseTransform(),this}recordSimpleData(e,t){return m(this,fi)[e]=t,this}recordIncrementalData(e,t){return m(this,pi)[e].push(t),this}resetIncrementalData(e,t){return m(this,pi)[e].length=0,this}recordNamedData(e,t){return m(this,Iu).set(e,t),this}recordSimpleDataFromNamed(e,t,n){m(this,fi)[e]=m(this,Iu).get(t)??n}recordFutureForcedDependency(e,t){return this.recordIncrementalData(ld,t),this}inheritSimpleDataAsFutureForcedDependencies(e){for(const t of e)t in m(this,fi)&&this.recordFutureForcedDependency(t,m(this,fi)[t]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(const e of m(this,Os))this.recordFutureForcedDependency(ld,e);return this}resetBBox(e){return m(this,en).resetBBox(e),this}recordClipBox(e,t,n,r,i,a){return m(this,en).recordClipBox(e,t,n,r,i,a),this}recordBBox(e,t,n,r,i,a){return m(this,en).recordBBox(e,t,n,r,i,a),this}recordCharacterBBox(e,t,n,r=1,i=0,a=0,o){const c=n.bbox;let l,u;if(c&&(l=c[2]!==c[0]&&c[3]!==c[1]&&m(this,wf).get(n),l!==!1&&(u=[0,0,0,0],Ge.axialAlignedBoundingBox(c,n.fontMatrix,u),(r!==1||i!==0||a!==0)&&Ge.scaleMinMax([r,0,0,-r,i,a],u),l)))return this.recordBBox(e,t,u[0],u[2],u[1],u[3]);if(!o)return this.recordFullPageBBox(e);const d=o();return c&&u&&l===void 0&&(l=u[0]<=i-d.actualBoundingBoxLeft&&u[2]>=i+d.actualBoundingBoxRight&&u[1]<=a-d.actualBoundingBoxAscent&&u[3]>=a+d.actualBoundingBoxDescent,m(this,wf).set(n,l),l)?this.recordBBox(e,t,u[0],u[2],u[1],u[3]):this.recordBBox(e,t,i-d.actualBoundingBoxLeft,i+d.actualBoundingBoxRight,a-d.actualBoundingBoxAscent,a+d.actualBoundingBoxDescent)}recordFullPageBBox(e){return m(this,en).recordFullPageBBox(e),this}getSimpleIndex(e){return m(this,fi)[e]}recordDependencies(e,t){const n=m(this,Os),r=m(this,fi),i=m(this,pi);for(const a of t)a in m(this,fi)?n.add(r[a]):a in i&&i[a].forEac
2h(n.add,n);return this}recordNamedDependency(e,t){return m(this,Iu).has(t)&&m(this,Os).add(m(this,Iu).get(t)),this}recordOperation(e,t=!1){if(this.recordDependencies(e,[ld]),m(this,Kc)){const r=eA(m(this,Kc),e),{dependencies:i}=r;m(this,Os).forEach(i.add,i),m(this,en)._savesStack.forEach(i.add,i),m(this,en)._markedContentStack.forEach(i.add,i),i.delete(e),r.isRenderingOperation=!0}const n=!t&&e===m(this,en)._pendingBBoxIdx;return m(this,en).recordOperation(e,t,[m(this,Os),m(this,en)._savesStack,m(this,en)._markedContentStack]),n&&m(this,Os).clear(),this}recordShowTextOperation(e,t=!1){const n=Array.from(m(this,Os));this.recordOperation(e,t),this.recordIncrementalData("sameLineText",e);for(const r of n)this.recordIncrementalData("sameLineText",r);return this}bboxToClipBoxDropOperation(e,t=!1){const n=!t&&e===m(this,en)._pendingBBoxIdx;return m(this,en).bboxToClipBoxDropOperation(e),n&&m(this,Os).clear(),this}take(){return m(this,wf).clear(),m(this,en).take()}takeDebugMetadata(){return m(this,Kc)}}fi=new WeakMap,pi=new WeakMap,Iu=new WeakMap,Os=new WeakMap,wf=new WeakMap,Kc=new WeakMap,Xc=new WeakMap,en=new WeakMap;var tn,Fn,Ls,xf,_f;const eC=class eC{constructor(e,t,n){J(this,tn);J(this,Fn);J(this,Ls);J(this,xf,0);J(this,_f,0);if(e instanceof eC&&m(e,Ls)===!!n)return e;z(this,tn,e),z(this,Fn,t),z(this,Ls,!!n)}get clipBox(){return m(this,tn).clipBox}growOperationsCount(){throw new Error("Unreachable")}save(e){return zn(this,_f)._++,m(this,tn).save(m(this,Fn)),this}restore(e){return m(this,_f)>0&&(m(this,tn).restore(m(this,Fn)),zn(this,_f)._--),this}recordOpenMarker(e){return zn(this,xf)._++,this}getOpenMarker(){return m(this,xf)>0?m(this,Fn):m(this,tn).getOpenMarker()}recordCloseMarker(e){return zn(this,xf)._--,this}beginMarkedContent(e){return this}endMarkedContent(e){return this}pushBaseTransform(e){return m(this,tn).pushBaseTransform(e),this}popBaseTransform(){return m(this,tn).popBaseTransform(),this}recordSimpleData(e,t){return m(this,tn).recordSimpleData(e,m(this,Fn)),this}recordIncrementalData(e,t){return m(this,tn).recordIncrementalData(e,m(this,Fn)),this}resetIncrementalData(e,t){return m(this,tn).resetIncrementalData(e,m(this,Fn)),this}recordNamedData(e,t){return this}recordSimpleDataFromNamed(e,t,n){return m(this,tn).recordSimpleDataFromNamed(e,t,m(this,Fn)),this}recordFutureForcedDependency(e,t){return m(this,tn).recordFutureForcedDependency(e,m(this,Fn)),this}inheritSimpleDataAsFutureForcedDependencies(e){return m(this,tn).inheritSimpleDataAsFutureForcedDependencies(e),this}inheritPendingDependenciesAsFutureForcedDependencies(){return m(this,tn).inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(e){return m(this,Ls)||m(this,tn).resetBBox(m(this,Fn)),this}recordClipBox(e,t,n,r,i,a){return m(this,Ls)||m(this,tn).recordClipBox(m(this,Fn),t,n,r,i,a),this}recordBBox(e,t,n,r,i,a){return m(this,Ls)||m(this,tn).recordBBox(m(this,Fn),t,n,r,i,a),this}recordCharacterBBox(e,t,n,r,i,a,o){return m(this,Ls)||m(this,tn).recordCharacterBBox(m(this,Fn),t,n,r,i,a,o),this}recordFullPageBBox(e){return m(this,Ls)||m(this,tn).recordFullPageBBox(m(this,Fn)),this}getSimpleIndex(e){return m(this,tn).getSimpleIndex(e)}recordDependencies(e,t){return m(this,tn).recordDependencies(m(this,Fn),t),this}recordNamedDependency(e,t){return m(this,tn).recordNamedDependency(m(this,Fn),t),this}recordOperation(e){return m(this,tn).recordOperation(m(this,Fn),!0),this}recordShowTextOperation(e){return m(this,tn).recordShowTextOperation(m(this,Fn),!0),this}bboxToClipBoxDropOperation(e){return m(this,Ls)||m(this,tn).bboxToClipBoxDropOperation(m(this,Fn),!0),this}take(){throw new Error("Unreachable")}takeDebugMetadata(){throw new Error("Unreachable")}};tn=new WeakMap,Fn=new WeakMap,Ls=new WeakMap,xf=new WeakMap,_f=new WeakMap;let g1=eC;const is={stroke:["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],fill:["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],imageXObject:["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],rawFillPath:["f
2ilter","fillColor","fillAlpha"],showText:["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","fontObj","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation","sameLineText"],transform:["transform"],transformAndFill:["transform","fillColor"]};var Mu,Pu,Ou,Lu,Bu,zm;const Yg=class Yg{constructor(e){J(this,Mu);J(this,Pu);J(this,Ou,4);J(this,Lu,0);J(this,Bu,new(m(Yg,zm))(m(this,Ou)*6));z(this,Mu,e.width),z(this,Pu,e.height)}record(e,t,n,r){if(m(this,Lu)===m(this,Ou)){z(this,Ou,m(this,Ou)*2);const o=new(m(Yg,zm))(m(this,Ou)*6);o.set(m(this,Bu)),z(this,Bu,o)}const i=Ge.domMatrixToTransform(e.getTransform());let a;if(r[0]!==1/0){const o=[1/0,1/0,-1/0,-1/0];Ge.axialAlignedBoundingBox([0,-n,t,0],i,o);const c=Ge.intersect(r,o);if(!c)return;const[l,u,d,h]=c;if(l!==o[0]||u!==o[1]||d!==o[2]||h!==o[3]){const f=Math.atan2(i[1],i[0]),p=Math.abs(Math.sin(f)),y=Math.abs(Math.cos(f));if(p<1e-6||y<1e-6||Math.abs(p-y)<1e-6)a=[l,u,l,h,d,u];else{const g=d-l,b=h-u,v=p*p,x=y*y,w=y*p,_=x-v,T=(b*x-g*w)/_,S=(b*w-g*v)/_;a=[l+S,u,l,u+T,d,h-T]}}}a||(a=[0,-n,0,0,t,-n],Ge.applyTransform(a,i,0),Ge.applyTransform(a,i,2),Ge.applyTransform(a,i,4)),a[0]/=m(this,Mu),a[1]/=m(this,Pu),a[2]/=m(this,Mu),a[3]/=m(this,Pu),a[4]/=m(this,Mu),a[5]/=m(this,Pu),m(this,Bu).set(a,m(this,Lu)*6),zn(this,Lu)._++}take(){return m(this,Bu).subarray(0,m(this,Lu)*6)}};Mu=new WeakMap,Pu=new WeakMap,Ou=new WeakMap,Lu=new WeakMap,Bu=new WeakMap,zm=new WeakMap,J(Yg,zm,rr.isFloat16ArraySupported?Float16Array:Float32Array);let DT=Yg;var Tf;class B4{constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){J(this,Tf,new Set);this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),m(this,Tf).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,disableFontFace:t,_inspectFont:n}){if(!(!e||m(this,Tf).has(e.loadedName))){if(Dn(!t,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:r,src:i,style:a}=e,o=new FontFace(r,i,a);this.addNativeFontFace(o);try{await o.load(),m(this,Tf).add(r),n==null||n(e)}catch{_t(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(o)}return}zt("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){const n=e.createNativeFontFace();if(n){this.addNativeFontFace(n);try{await n.loaded}catch(r){throw _t(`Failed to load font '${n.family}': '${r}'.`),e.disableFontFace=!0,r}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(n=>{const r=this._queueLoadingCallback(n);this._prepareFontLoadEvent(e,r)})}}get isFontLoadingAPISupported(){var t;const e=!!((t=this._document)!=null&&t.fonts);return Tt(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){return Tt(this,"isSyncFontLoadingSupported",Xi||rr.platform.isFirefox)}_queueLoadingCallback(e){function t(){for(Dn(!r.done,"completeRequest() cannot be called twice."),r.done=!0;n.length>0&&n[0].done;){const i=n.shift();setTimeout(i.callback,0)}}const{loadingRequests:n}=this,r={done:!1,complete:t,callback:e};return n.push(r),r}get _loadTestFont(){const e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return Tt(this,"_loadTestFont",e)}
2_prepareFontLoadEvent(e,t){function n(w,_){return w.charCodeAt(_)<<24|w.charCodeAt(_+1)<<16|w.charCodeAt(_+2)<<8|w.charCodeAt(_+3)&255}function r(w,_,T,S){const C=w.substring(0,_),D=w.substring(_+T);return C+S+D}let i,a;const o=this._document.createElement("canvas");o.width=1,o.height=1;const c=o.getContext("2d");let l=0;function u(w,_){if(++l>30){_t("Load test font never loaded."),_();return}if(c.font="30px "+w,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0){_();return}setTimeout(u.bind(null,w,_))}const d=`lt${Date.now()}${this.loadTestFontId++}`;let h=this._loadTestFont;h=r(h,976,d.length,d);const p=16,y=1482184792;let g=n(h,p);for(i=0,a=d.length-3;i<a;i+=4)g=g-y+n(d,i)|0;i<d.length&&(g=g-y+n(d+"XXX",i)|0),h=r(h,p,4,m4(g));const b=`url(data:font/opentype;base64,${btoa(h)});`,v=`@font-face {font-family:"${d}";src:${b}}`;this.insertRule(v);const x=this._document.createElement("div");x.style.visibility="hidden",x.style.width=x.style.height="10px",x.style.position="absolute",x.style.top=x.style.left="0px";for(const w of[e.loadedName,d]){const _=this._document.createElement("span");_.textContent="Hi",_.style.fontFamily=w,x.append(_)}this._document.body.append(x),u(d,()=>{x.remove(),t.complete()})}}Tf=new WeakMap;var nn;class W4{constructor(e,t=null,n,r){be(this,"compiledGlyphs",Object.create(null));J(this,nn);z(this,nn,e),this._inspectFont=t,n&&(this.charProcOperatorList=n),r&&Object.assign(this,r)}createNativeFontFace(){var t;if(!this.data||this.disableFontFace)return null;let e;if(!this.cssFontInfo)e=new FontFace(this.loadedName,this.data,{});else{const n={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(n.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,n)}return(t=this._inspectFont)==null||t.call(this,this),e}createFontFaceRule(){var n;if(!this.data||this.disableFontFace)return null;const e=`url(data:${this.mimetype};base64,${this.data.toBase64()});`;let t;if(!this.cssFontInfo)t=`@font-face {font-family:"${this.loadedName}";src:${e}}`;else{let r=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(r+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),t=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${r}src:${e}}`}return(n=this._inspectFont)==null||n.call(this,this,e),t}getPathGenerator(e,t){if(this.compiledGlyphs[t]!==void 0)return this.compiledGlyphs[t];const n=this.loadedName+"_path_"+t;let r;try{r=e.get(n)}catch(a){_t(`getPathGenerator - ignoring character: "${a}".`)}const i=jN(r==null?void 0:r.path);return this.fontExtraProperties||e.delete(n),this.compiledGlyphs[t]=i}get black(){return m(this,nn).black}get bold(){return m(this,nn).bold}get disableFontFace(){return m(this,nn).disableFontFace}set disableFontFace(e){Tt(this,"disableFontFace",!!e)}get fontExtraProperties(){return m(this,nn).fontExtraProperties}get isInvalidPDFjsFont(){return m(this,nn).isInvalidPDFjsFont}get isType3Font(){return m(this,nn).isType3Font}get italic(){return m(this,nn).italic}get missingFile(){return m(this,nn).missingFile}get remeasure(){return m(this,nn).remeasure}get vertical(){return m(this,nn).vertical}get ascent(){return m(this,nn).ascent}get defaultWidth(){return m(this,nn).defaultWidth}get descent(){return m(this,nn).descent}get bbox(){return m(this,nn).bbox}get fontMatrix(){return m(this,nn).fontMatrix}get fallbackName(){return m(this,nn).fallbackName}get loadedName(){return m(this,nn).loadedName}get mimetype(){return m(this,nn).mimetype}get name(){return m(this,nn).name}get data(){return m(this,nn).data}clearData(){m(this,nn).clearData()}get cssFontInfo(){return m(this,nn).cssFontInfo}get systemFontInfo(){return m(this,nn).systemFontInfo}get defaultVMetrics(){return m(this,nn).defaultVMetrics}}nn=new WeakMap;class TF{}be(TF,"strings",["fontFamily","fontWeight","italicAngle"]);class SF{}be(SF,"strings",["css","loadedName","baseFontName","src"]);const Ur=class Ur{};be(Ur,"bools",["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"]),be(Ur,"numbers",["ascent","defaultWidth","descent"]),be(Ur,"strings",["fallbackName","loadedName","mimetype","name"]),be(Ur,"OFFSET_NUMBERS",Math.ceil(Ur.bools.length*2/8)),be(Ur,"OFFSET_BBOX",Ur.OFFSET_NUMBERS+Ur.numbers.length*8),be(Ur,"OFFSET_FONT_MATRIX",Ur.OFFSET_BBOX+1+8),be(Ur,"OFFSET_DEFAULT_VMETRICS",Ur.OFFSET_FONT_MATRIX+1+48),be(Ur,"OFFSET_STRINGS",Ur.OFFSET_DEFAULT_VMETRICS+1+6);let Di=Ur;class Lr{}be(Lr,"KIND",0),be(Lr,"HAS_BBOX",1),be(Lr,"HAS_BACKGROUND",2),be(Lr,"SHADING_TYPE",3),be(Lr,"N_COORD",4),be(Lr,"N_COLOR",8),be(Lr,"N_STOP",12),be(Lr,"N_FIGURES",16);var Hm,iv,Sf,Ef,S0;class j4{constructor(e){J(this,Ef);J(this,Hm);J(this,iv,new TextDecoder);J(this,Sf);z(this,Hm,e),z(this,Sf,new DataView(e))}get fontFamily(){return oe(this,Ef,S0).call(this,0)}get fontWeight(){return oe(this,Ef,S0).call(this,1)}get italicAngle(){return oe(this,Ef,S0).call(this,2)}}Hm=new WeakMap,iv=new WeakMap,Sf=new WeakMap,Ef=new WeakSet,S0=function(e){Dn(e<TF.strings.length,"Invalid string index");let t=0;for(let r=0;r<e;r++)t+=m(this,Sf).getUint32(t)+4;const n=m(this,Sf).getUint32(t);return m(this,iv).decode(new Uint8Array(m(this,Hm),t+4,n))};var Wu,Df,No,ju,_g;class z4{constructor(e){J(this,ju);J(this,Wu);J(this,Df,new TextDecoder);J(this,No);z(this,Wu,e),z(this,No,new DataView(e))}get guessFallback(){return m(this,No).getUint8(0)!==0}get css(){return oe(this,ju,_g).call(this,0)}get loadedName(){return oe(this,ju,_g).call(this,1)}get baseFontName(){return oe(this,ju,_g).call(this,2)}get src(){return oe(this,ju,_g).call(this,3)}get style(){let e=1;e+=4+m(this,No).getUint32(e);const t=m(this,No).getUint32(e),n=m(this,Df).decode(new Uint8Array(m(this,Wu),e+4,t));e+=4+t;const r=m(this,No).getUint32(e),i=m(this,Df).decode(new Uint8Array(m(this,Wu),e+4,r));return{style:n,weight:i}}}Wu=new WeakMap,Df=new WeakMap,No=new WeakMap,ju=new WeakSet,_g=function(e){Dn(e<SF.str
2ings.length,"Invalid string index");let t=5;for(let r=0;r<e;r++)t+=m(this,No).getUint32(t)+4;const n=m(this,No).getUint32(t);return m(this,Df).decode(new Uint8Array(m(this,Wu),t+4,n))};var Bs,sv,Pn,qt,Us,E0,D0,Tg,CT;class H4{constructor({buffer:e,extra:t}){J(this,qt);J(this,Bs);J(this,sv,new TextDecoder);J(this,Pn);z(this,Bs,e),z(this,Pn,new DataView(e)),t&&Object.assign(this,t)}get black(){return oe(this,qt,Us).call(this,0)}get bold(){return oe(this,qt,Us).call(this,1)}get disableFontFace(){return oe(this,qt,Us).call(this,2)}get fontExtraProperties(){return oe(this,qt,Us).call(this,3)}get isInvalidPDFjsFont(){return oe(this,qt,Us).call(this,4)}get isType3Font(){return oe(this,qt,Us).call(this,5)}get italic(){return oe(this,qt,Us).call(this,6)}get missingFile(){return oe(this,qt,Us).call(this,7)}get remeasure(){return oe(this,qt,Us).call(this,8)}get vertical(){return oe(this,qt,Us).call(this,9)}get ascent(){return oe(this,qt,E0).call(this,0)}get defaultWidth(){return oe(this,qt,E0).call(this,1)}get descent(){return oe(this,qt,E0).call(this,2)}get bbox(){return oe(this,qt,D0).call(this,Di.OFFSET_BBOX,4,"getInt16",2)}get fontMatrix(){return oe(this,qt,D0).call(this,Di.OFFSET_FONT_MATRIX,6,"getFloat64",8)}get defaultVMetrics(){return oe(this,qt,D0).call(this,Di.OFFSET_DEFAULT_VMETRICS,3,"getInt16",2)}get fallbackName(){return oe(this,qt,Tg).call(this,0)}get loadedName(){return oe(this,qt,Tg).call(this,1)}get mimetype(){return oe(this,qt,Tg).call(this,2)}get name(){return oe(this,qt,Tg).call(this,3)}get data(){const{offset:e,length:t}=oe(this,qt,CT).call(this);return t===0?void 0:new Uint8Array(m(this,Bs),e+4,t)}clearData(){const{offset:e,length:t}=oe(this,qt,CT).call(this);t!==0&&(m(this,Pn).setUint32(e,0),z(this,Bs,new Uint8Array(m(this,Bs),0,e+4).slice().buffer),z(this,Pn,new DataView(m(this,Bs))))}get cssFontInfo(){let e=Di.OFFSET_STRINGS;const t=m(this,Pn).getUint32(e);e+=4+t;const n=m(this,Pn).getUint32(e);e+=4+n;const r=m(this,Pn).getUint32(e);if(r===0)return null;const i=new Uint8Array(r);return i.set(new Uint8Array(m(this,Bs),e+4,r)),new j4(i.buffer)}get systemFontInfo(){let e=Di.OFFSET_STRINGS;const t=m(this,Pn).getUint32(e);e+=4+t;const n=m(this,Pn).getUint32(e);if(n===0)return null;const r=new Uint8Array(n);return r.set(new Uint8Array(m(this,Bs),e+4,n)),new z4(r.buffer)}}Bs=new WeakMap,sv=new WeakMap,Pn=new WeakMap,qt=new WeakSet,Us=function(e){Dn(e<Di.bools.length,"Invalid boolean index");const t=Math.floor(e/4),n=e*2%8,r=m(this,Pn).getUint8(t)>>n&3;return r===0?void 0:r===2},E0=function(e){return Dn(e<Di.numbers.length,"Invalid number index"),m(this,Pn).getFloat64(Di.OFFSET_NUMBERS+e*8)},D0=function(e,t,n,r){const i=m(this,Pn).getUint8(e);if(i===0)return;Dn(i===t,"Invalid array length."),e+=1;const a=new Array(i);for(let o=0;o<i;o++)a[o]=m(this,Pn)[n](e,!0),e+=r;return a},Tg=function(e){Dn(e<Di.strings.length,"Invalid string index");let t=Di.OFFSET_STRINGS+4;for(let r=0;r<e;r++)t+=m(this,Pn).getUint32(t)+4;const n=m(this,Pn).getUint32(t);return m(this,sv).decode(new Uint8Array(m(this,Bs),t+4,n))},CT=function(){let e=Di.OFFSET_STRINGS;const t=m(this,Pn).getUint32(e);e+=4+t;const n=m(this,Pn).getUint32(e);e+=4+n;const r=m(this,Pn).getUint32(e);e+=4+r;const i=m(this,Pn).getUint32(e);return{offset:e,length:i}};class $4{constructor(e){this.buffer=e,this.view=new DataView(e),this.data=new Uint8Array(e)}getIR(){const e=this.view,t=this.data[Lr.KIND],n=!!this.data[Lr.HAS_BBOX],r=!!this.data[Lr.HAS_BACKGROUND],i=e.getUint32(Lr.N_COORD,!0),a=e.getUint32(Lr.N_COLOR,!0),o=e.getUint32(Lr.N_STOP,!0),c=e.getUint32(Lr.N_FIGURES,!0);let l=20;const u=new Float32Array(this.buffer,l,i*2);l+=i*8;const d=new Uint8Array(this.buffer,l,a*3);l+=a*3;const h=[];for(let g=0;g<o;++g){const b=e.getFloat32(l,!0);l+=4;const v=e.getUint32(l,!0);l+=4,h.push([b,`#${v.toString(16).padStart(6,"0")}`])}let f=null;if(n){f=[];for(let g=0;g<4;++g)f.push(e.getFloat32(l,!0)),l+=4}let p=null;r&&(p=new Uint8Array(this.buffer,l,3),l+=3);const y=[];for(let g=0;g<c;++g){const b=e.getUint8(l);l+=1,l=Math.ceil(l/4)*4;const v=e.getUint32(l,!0);l+=4;const x=new Int32Array(this.buffer,l,v);l+=v*4;const w=e.getUint32(l,!0);l+=4;
2const _=new Int32Array(this.buffer,l,w);l+=w*4;const T={type:b,coords:x,colors:_};b===au.LATTICE&&(T.verticesPerRow=e.getUint32(l,!0),l+=4),y.push(T)}if(t===1)return["RadialAxial","axial",f,h,Array.from(u.slice(0,2)),Array.from(u.slice(2,4)),null,null];if(t===2)return["RadialAxial","radial",f,h,[u[0],u[1]],[u[3],u[4]],u[2],u[5]];if(t===3){const g=this.data[Lr.SHADING_TYPE];let b=null;if(u.length>0){b=[1/0,1/0,-1/0,-1/0];for(let v=0,x=u.length;v<x;v+=2)Ge.pointBoundingBox(u[v],u[v+1],b)}return["Mesh",g,u,d,y,b,f,p]}throw new Error(`Unsupported pattern kind: ${t}`)}}var Cf;class K4{constructor(e){J(this,Cf);z(this,Cf,e)}get path(){return rr.isFloat16ArraySupported?new Float16Array(m(this,Cf)):new Float32Array(m(this,Cf))}}Cf=new WeakMap;function X4(s){if(s instanceof URL)return s;if(typeof s=="string"){if(Xi){if(/^[a-z][a-z0-9\-+.]+:/i.test(s))return new URL(s);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(s))}const e=URL.parse(s,window.location);if(e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function V4(s){if(Xi&&typeof Buffer<"u"&&s instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength)return s;if(typeof s=="string")return Sv(s);if(s instanceof ArrayBuffer||ArrayBuffer.isView(s)||typeof s=="object"&&!isNaN(s==null?void 0:s.length))return new Uint8Array(s);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function Db(s){if(typeof s!="string")return null;if(s.endsWith("/"))return s;throw new Error(`Invalid factory url: "${s}" must include trailing slash.`)}const AT=s=>typeof s=="object"&&Number.isInteger(s==null?void 0:s.num)&&s.num>=0&&Number.isInteger(s==null?void 0:s.gen)&&s.gen>=0,G4=s=>typeof s=="object"&&typeof(s==null?void 0:s.name)=="string",q4=x4.bind(null,AT,G4);var Fa,ov;class Y4{constructor(){J(this,Fa,new Map);J(this,ov,Promise.resolve())}postMessage(e,t){const n={data:structuredClone(e,t?{transfer:t}:null)};m(this,ov).then(()=>{for(const[r]of m(this,Fa))r.call(this,n)})}addEventListener(e,t,n=null){let r=null;if((n==null?void 0:n.signal)instanceof AbortSignal){const{signal:i}=n;if(i.aborted){_t("LoopbackPort - cannot use an `aborted` signal.");return}const a=()=>this.removeEventListener(e,t);r=()=>i.removeEventListener("abort",a),i.addEventListener("abort",a)}m(this,Fa).set(t,r)}removeEventListener(e,t){const n=m(this,Fa).get(t);n==null||n(),m(this,Fa).delete(t)}terminate(){for(const[,e]of m(this,Fa))e==null||e();m(this,Fa).clear()}}Fa=new WeakMap,ov=new WeakMap;const Cb={DATA:1,ERROR:2},Hn={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function tA(){}function hi(s){if(s instanceof Sl||s instanceof iT||s instanceof HC||s instanceof h1||s instanceof Sw)return s;switch(s instanceof Error||typeof s=="object"&&s!==null||zt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),s.name){case"AbortException":return new Sl(s.message);case"InvalidPDFException":return new iT(s.message);case"PasswordException":return new HC(s.message,s.code);case"ResponseException":return new h1(s.message,s.status,s.missing);case"UnknownErrorException":return new Sw(s.message,s.details)}return new Sw(s.message,s.toString())}var Af,Ss,EF,DF,CF,C0;class Sg{constructor(e,t,n){J(this,Ss);J(this,Af,new AbortController);this.sourceName=e,this.targetName=t,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),n.addEventListener("message",oe(this,Ss,EF).bind(this),{signal:m(this,Af).signal})}on(e,t){const n=this.actionHandler;if(n[e])throw new Error(`There is already an actionName called "${e}"`);n[e]=t}send(e,t,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}sendWithPromise(e,t,n){const r=this.callbackId++,i=Promise.withResolvers();this.callbackCapabilities[r]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:r,data:t},n)}catch(a){i.reject(a)}return i.promise}sendWithStream(e,t,n,r){const i=this.streamId++,a=this.sourceName,o=this.targetName,c=this.comObj;return new ReadableStream({start:l=>{const u=Promise.withResolvers();return this.streamControllers[i]={controller:l,startCall:u,pullCall:null,cancelCall:null,isClosed:!1}
2,c.postMessage({sourceName:a,targetName:o,action:e,streamId:i,data:t,desiredSize:l.desiredSize},r),u.promise},pull:l=>{const u=Promise.withResolvers();return this.streamControllers[i].pullCall=u,c.postMessage({sourceName:a,targetName:o,stream:Hn.PULL,streamId:i,desiredSize:l.desiredSize}),u.promise},cancel:l=>{Dn(l instanceof Error,"cancel must have a valid reason");const u=Promise.withResolvers();return this.streamControllers[i].cancelCall=u,this.streamControllers[i].isClosed=!0,c.postMessage({sourceName:a,targetName:o,stream:Hn.CANCEL,streamId:i,reason:hi(l)}),u.promise}},n)}destroy(){var e;(e=m(this,Af))==null||e.abort(),z(this,Af,null)}}Af=new WeakMap,Ss=new WeakSet,EF=function({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream){oe(this,Ss,CF).call(this,e);return}if(e.callback){const n=e.callbackId,r=this.callbackCapabilities[n];if(!r)throw new Error(`Cannot resolve callback ${n}`);if(delete this.callbackCapabilities[n],e.callback===Cb.DATA)r.resolve(e.data);else if(e.callback===Cb.ERROR)r.reject(hi(e.reason));else throw new Error("Unexpected callback case");return}const t=this.actionHandler[e.action];if(!t)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const n=this.sourceName,r=e.sourceName,i=this.comObj;Promise.try(t,e.data).then(function(a){i.postMessage({sourceName:n,targetName:r,callback:Cb.DATA,callbackId:e.callbackId,data:a})},function(a){i.postMessage({sourceName:n,targetName:r,callback:Cb.ERROR,callbackId:e.callbackId,reason:hi(a)})});return}if(e.streamId){oe(this,Ss,DF).call(this,e);return}t(e.data)},DF=function(e){const t=e.streamId,n=this.sourceName,r=e.sourceName,i=this.comObj,a=this,o=this.actionHandler[e.action],c={enqueue(l,u=1,d){if(this.isCancelled)return;const h=this.desiredSize;this.desiredSize-=u,h>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),i.postMessage({sourceName:n,targetName:r,stream:Hn.ENQUEUE,streamId:t,chunk:l},d)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:r,stream:Hn.CLOSE,streamId:t}),delete a.streamSinks[t])},error(l){Dn(l instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:r,stream:Hn.ERROR,streamId:t,reason:hi(l)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[t]=c,Promise.try(o,e.data,c).then(function(){i.postMessage({sourceName:n,targetName:r,stream:Hn.START_COMPLETE,streamId:t,success:!0})},function(l){i.postMessage({sourceName:n,targetName:r,stream:Hn.START_COMPLETE,streamId:t,reason:hi(l)})})},CF=function(e){const t=e.streamId,n=this.sourceName,r=e.sourceName,i=this.comObj,a=this.streamControllers[t],o=this.streamSinks[t];switch(e.stream){case Hn.START_COMPLETE:e.success?a.startCall.resolve():a.startCall.reject(hi(e.reason));break;case Hn.PULL_COMPLETE:e.success?a.pullCall.resolve():a.pullCall.reject(hi(e.reason));break;case Hn.PULL:if(!o){i.postMessage({sourceName:n,targetName:r,stream:Hn.PULL_COMPLETE,streamId:t,success:!0});break}o.desiredSize<=0&&e.desiredSize>0&&o.sinkCapability.resolve(),o.desiredSize=e.desiredSize,Promise.try(o.onPull||tA).then(function(){i.postMessage({sourceName:n,targetName:r,stream:Hn.PULL_COMPLETE,streamId:t,success:!0})},function(l){i.postMessage({sourceName:n,targetName:r,stream:Hn.PULL_COMPLETE,streamId:t,reason:hi(l)})});break;case Hn.ENQUEUE:if(Dn(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(e.chunk);break;case Hn.CLOSE:if(Dn(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),oe(this,Ss,C0).call(this,a,t);break;case Hn.ERROR:Dn(a,"error should have stream controller"),a.controller.error(hi(e.reason)),oe(this,Ss,C0).call(this,a,t);break;case Hn.CANCEL_COMPLETE:e.success?a.cancelCall.resolve():a.cancelCall.reject(hi(e.reason)),oe(this,Ss,C0).call(this,a,t);break;case Hn.CANCEL:if(!o)break;const c=hi(e.reason);Promise.try(o.onCancel||tA,c).then(function(){i.postMessage({sourceName:n,targetName:r,stream
2:Hn.CANCEL_COMPLETE,streamId:t,success:!0})},function(l){i.postMessage({sourceName:n,targetName:r,stream:Hn.CANCEL_COMPLETE,streamId:t,reason:hi(l)})}),o.sinkCapability.reject(c),o.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}},C0=async function(e,t){var n,r,i;await Promise.allSettled([(n=e.startCall)==null?void 0:n.promise,(r=e.pullCall)==null?void 0:r.promise,(i=e.cancelCall)==null?void 0:i.promise]),delete this.streamControllers[t]};var av;class AF{constructor({cMapUrl:e=null,standardFontDataUrl:t=null,wasmUrl:n=null}){J(this,av,Object.freeze({cMapUrl:"CMap",standardFontDataUrl:"font",wasmUrl:"wasm"}));this.cMapUrl=e,this.standardFontDataUrl=t,this.wasmUrl=n}async fetch({kind:e,filename:t}){switch(e){case"cMapUrl":case"standardFontDataUrl":case"wasmUrl":break;default:zt(`Not implemented: ${e}`)}const n=this[e];if(!n)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const r=`${n}${t}`;return this._fetch(r,e).catch(i=>{throw new Error(`Unable to load ${m(this,av)[e]} data at: ${r}`)})}async _fetch(e,t){zt("Abstract method `_fetch` called.")}}av=new WeakMap;class nA extends AF{async _fetch(e,t){const n=t==="cMapUrl"&&!e.endsWith(".bcmap")?"text":"bytes",r=await FE(e,n);return r instanceof Uint8Array?r:Sv(r)}}var $m;class kF{constructor({enableHWA:e=!1}){J(this,$m,!1);z(this,$m,e)}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const n=this._createCanvas(e,t);return{canvas:n,context:n.getContext("2d",{willReadFrequently:!m(this,$m)})}}reset({canvas:e},t,n){if(!e)throw new Error("Canvas is not specified");if(t<=0||n<=0)throw new Error("Invalid canvas size");e.width=t,e.height=n}destroy(e){const{canvas:t}=e;if(!t)throw new Error("Canvas is not specified");t.width=t.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){zt("Abstract method `_createCanvas` called.")}}$m=new WeakMap;class Z4 extends kF{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){const n=this._document.createElement("canvas");return n.width=e,n.height=t,n}}class NF{addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,t,n,r,i){return"none"}destroy(e=!1){}}var zu,kf,Ua,Ra,Pr,Hu,$u,et,Fr,Eg,xd,A0,_d,FF,kT,Td,Dg,Cg,NT,Ag;class J4 extends NF{constructor({docId:t,ownerDocument:n=globalThis.document}){super();J(this,et);J(this,zu);J(this,kf);J(this,Ua);J(this,Ra);J(this,Pr);J(this,Hu);J(this,$u,0);z(this,Ra,t),z(this,Pr,n)}addFilter(t){if(!t)return"none";let n=m(this,et,Fr).get(t);if(n)return n;const[r,i,a]=oe(this,et,A0).call(this,t),o=t.length===1?r:`${r}${i}${a}`;if(n=m(this,et,Fr).get(o),n)return m(this,et,Fr).set(t,n),n;const c=`g_${m(this,Ra)}_transfer_map_${zn(this,$u)._++}`,l=oe(this,et,_d).call(this,c);m(this,et,Fr).set(t,l),m(this,et,Fr).set(o,l);const u=oe(this,et,Td).call(this,c);return oe(this,et,Cg).call(this,r,i,a,u),l}addHCMFilter(t,n){var p;const r=`${t}-${n}`,i="base";let a=m(this,et,Eg).get(i);if((a==null?void 0:a.key)===r||(a?((p=a.filter)==null||p.remove(),a.key=r,a.url="none",a.filter=null):(a={key:r,url:"none",filter:null},m(this,et,Eg).set(i,a)),!t||!n))return a.url;const o=oe(this,et,Ag).call(this,t);t=Ge.makeHexColor(...o);const c=oe(this,et,Ag).call(this,n);if(n=Ge.makeHexColor(...c),m(this,et,xd).style.color="",t==="#000000"&&n==="#ffffff"||t===n)return a.url;const l=new Array(256);for(let y=0;y<=255;y++){const g=y/255;l[y]=g<=.03928?g/12.92:((g+.055)/1.055)**2.4}const u=l.join(","),d=`g_${m(this,Ra)}_hcm_filter`,h=a.filter=oe(this,et,Td).call(this,d);oe(this,et,Cg).call(this,u,u,u,h),oe(this,et,kT).call(this,h);const f=(y,g)=>{const b=o[y]/255,v=c[y]/255,x=new Array(g+1);for(let w=0;w<=g;w++)x[w]=b+w/g*(v-b);return x.join(",")};return oe(this,et,Cg).call(this,f(0,5),f(1,5),f(2,5),h),a.url=oe(this,et,_d).call(this,d),a.url}addAlphaFilter(t){let n=m(this,et,Fr).get(t);if(n)return n;const[r]=oe(this,et,A0).call(this,[t]),i=`alpha_${r}`;if(n=m(this,et,Fr).get(i),n)return m(this,et,Fr).set(t,n),n;const a=`g_${m(this,Ra)}_alpha_map_${zn(this,$u)._++}`,o=oe(this,et,_d).call(this,a);m(this,et,Fr).set(t,o),m(this,et,Fr).set(i,o);const c=oe(this,et,Td).call(this,a);return oe(this,et,NT).call(this,r,c),o}addLuminosityFilter(t){let n=m(this,et,Fr).get(t||"luminosity");if(n)return n;let r,i;if(t?([r]=oe(this,et,A0).call(this,[t]),i=`luminosity_${r}`):i="luminosity",n=m(this,et,Fr).get(i),n)return m(this,et,Fr).set(t,n),n;const a=`g_${m(this,Ra)}_luminosity_map_${zn(this,$u)._++}`,o=oe(this,et,_d).call(this,a);m(this,et,Fr).set(t,o),m(this,et,Fr).set(i,o);const c=oe(this,et,Td).call(this,a);return oe(this,et,FF).call(this,c),t&&oe(this,et,NT).call(this,r,c),o}addHighlightHCMFilter(t,n,r,i,a){var v;const o=`${n}-${r}-${i}-${a}`;let c=m(this,et,Eg).get(t);if((c==null?void 0:c.key)===o||(c?((v=c.filter)==null||v.remove(),c.key=o,c.url="none",c.filter=null):(c={key:o,url:"none",filter:null},m(this,et,Eg).set(t,c)),!n||!r))return c.url;const[l,u]=[n,r].map(oe(this,et,Ag).bind(this));let d=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),h=Math.round(.2126*u[0]+.7152*u[1]+.0722*u[2]),[f,p]=[i,a].map(oe(this,et,Ag).bind(this));h<d&&([d,h,f,p]=[h,d,p,f]),m(this,et,xd).style.color="";const y=(x,w,_)=>{const T=new Array(256),S=(h-d)/_,C=x/255,D=(w-x)/(255*_);let N=0;for(let M=0;M<=_;M++){const F=Math.round(d+M*S),L=C+M*D;for(let A=N;A<=F;A++)T[A]=L;N=F+1}for(let M=N;M<256;M++)T[M]=T[N-1];return T.join(",")},g=`g_${m(this,Ra)}_hcm_${t}_filter`,b=c.filter=oe(this,et,Td).call(this,g);return oe(this,et,kT).call(this,b),oe(this,et,Cg).call(this,y(f[0],p[0],5),y(f[1],p[1],5),y(f[2],p[2],5),b),c.url=oe(this,et,_d).call(this,g),c.url}destroy(t=!1){var n,r,i,a;
2t&&((n=m(this,Hu))!=null&&n.size)||((r=m(this,Ua))==null||r.parentNode.parentNode.remove(),z(this,Ua,null),(i=m(this,kf))==null||i.clear(),z(this,kf,null),(a=m(this,Hu))==null||a.clear(),z(this,Hu,null),z(this,$u,0))}}zu=new WeakMap,kf=new WeakMap,Ua=new WeakMap,Ra=new WeakMap,Pr=new WeakMap,Hu=new WeakMap,$u=new WeakMap,et=new WeakSet,Fr=function(){return m(this,kf)||z(this,kf,new Map)},Eg=function(){return m(this,Hu)||z(this,Hu,new Map)},xd=function(){if(!m(this,Ua)){const t=m(this,Pr).createElement("div"),{style:n}=t;n.visibility="hidden",n.contain="strict",n.width=n.height=0,n.position="absolute",n.top=n.left=0,n.zIndex=-1;const r=m(this,Pr).createElementNS(ha,"svg");r.setAttribute("width",0),r.setAttribute("height",0),z(this,Ua,m(this,Pr).createElementNS(ha,"defs")),t.append(r),r.append(m(this,Ua)),m(this,Pr).body.append(t)}return m(this,Ua)},A0=function(t){if(t.length===1){const l=t[0],u=new Array(256);for(let h=0;h<256;h++)u[h]=l[h]/255;const d=u.join(",");return[d,d,d]}const[n,r,i]=t,a=new Array(256),o=new Array(256),c=new Array(256);for(let l=0;l<256;l++)a[l]=n[l]/255,o[l]=r[l]/255,c[l]=i[l]/255;return[a.join(","),o.join(","),c.join(",")]},_d=function(t){if(m(this,zu)===void 0){z(this,zu,"");const n=m(this,Pr).URL;n!==m(this,Pr).baseURI&&(Ev(n)?_t('#createUrl: ignore "data:"-URL for performance reasons.'):z(this,zu,ON(n,"")))}return`url(${m(this,zu)}#${t})`},FF=function(t){const n=m(this,Pr).createElementNS(ha,"feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(n)},kT=function(t){const n=m(this,Pr).createElementNS(ha,"feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(n)},Td=function(t){const n=m(this,Pr).createElementNS(ha,"filter");return n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("id",t),m(this,et,xd).append(n),n},Dg=function(t,n,r){const i=m(this,Pr).createElementNS(ha,n);i.setAttribute("type","discrete"),i.setAttribute("tableValues",r),t.append(i)},Cg=function(t,n,r,i){const a=m(this,Pr).createElementNS(ha,"feComponentTransfer");i.append(a),oe(this,et,Dg).call(this,a,"feFuncR",t),oe(this,et,Dg).call(this,a,"feFuncG",n),oe(this,et,Dg).call(this,a,"feFuncB",r)},NT=function(t,n){const r=m(this,Pr).createElementNS(ha,"feComponentTransfer");n.append(r),oe(this,et,Dg).call(this,r,"feFuncA",t)},Ag=function(t){return m(this,et,xd).style.color=t,ib(getComputedStyle(m(this,et,xd)).getPropertyValue("color"))};Xi&&_t("Please use the `legacy` build in Node.js environments.");async function Q4(s){const t=await process.getBuiltinModule("fs").promises.readFile(s);return new Uint8Array(t)}class eM extends NF{}class tM extends kF{_createCanvas(e,t){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(e,t)}}class nM extends AF{async _fetch(e,t){return Q4(e)}}const rM=` 3struct Uniforms { 4 offsetX : f32, 5 offsetY : f32, 6 scaleX : f32, 7 scaleY : f32, 8 paddedWidth : f32, 9 paddedHeight : f32, 10 borderSize : f32, 11 _pad : f32, 12}; 13 14@group(0) @binding(0) var<uniform> u : Uniforms; 15 16struct VertexInput { 17 @location(0) position : vec2<f32>, 18 @location(1) color : vec4<f32>, 19}; 20 21struct VertexOutput { 22 @builtin(position) position : vec4<f32>, 23 @location(0) color : vec3<f32>, 24}; 25 26@vertex 27fn vs_main(in : VertexInput) -> VertexOutput { 28 var out : VertexOutput; 29 let cx = (in.position.x + u.offsetX) * u.scaleX; 30 let cy = (in.position.y + u.offsetY) * u.scaleY; 31 out.position = vec4<f32>( 32 ((cx + u.borderSize) / u.paddedWidth) * 2.0 - 1.0, 33 1.0 - ((cy + u.borderSize) / u.paddedHeight) * 2.0, 34 0.0, 35 1.0 36 ); 37 out.color = in.color.rgb; 38 return out; 39} 40 41@fragment 42fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> { 43 return vec4<f32>(in.color, 1.0); 44} 45`;var Km,Nf,Ff,Uf,Bp,UF,RF;class iM{constructor(){J(this,Bp);J(this,Km,null);J(this,Nf,null);J(this,Ff,null);J(this,Uf,null)}init(){m(this,Km)===null&&z(this,Km,oe(this,Bp,UF).call(this))}get isReady(){return m(this,Nf)!==null}draw(e,t,n,r,i,a){const o=m(this,Nf),{offsetX:c,offsetY:l,scaleX:u,scaleY:d}=t,{posData:h,colData:f,vertexCount:p}=oe(this,Bp,RF).call(this,e,t),y=o.createBuffer({size:Math.max(h.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});h.byteLength>0&&o.queue.writeBuffer(y,0,h);const g=o.createBuffer({size:Math.max(f.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});f.byteLength>0&&o.queue.writeBuffer(g,0,f);const b=o.createBuffer({size:32,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST});o.queue.writeBuffer(b,0,new Float32Array([c,l,u,d,r,i,a,0]));const v=o.createBindGroup({layout:m(this,Ff).getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:b}}]}),x=new OffscreenCanvas(r,i),w=x.getContext("webgpu");w.configure({device:o,format:m(this,Uf),alphaMode:n?"opaque":"premultiplied"});const _=n?{r:n[0]/255,g:n[1]/255,b:n[2]/255,a:1}:{r:0,g:0,b:0,a:0},T=o.createCommandEncoder(),S=T.beginRenderPass({colorAttachments:[{view:w.getCurrentTexture().createView(),clearValue:_,loadOp:"clear",storeOp:"store"}]});return p>0&&(S.setPipeline(m(this,Ff)),S.setBindGroup(0,v),S.setVertexBuffer(0,y),S.setVertexBuffer(1,g),S.draw(p)),S.end(),o.queue.submit([T.finish()]),y.destroy(),g.destroy(),b.destroy(),x.transferToImageBitmap()}}Km=new WeakMap,Nf=new WeakMap,Ff=new WeakMap,Uf=new WeakMap,Bp=new WeakSet,UF=async function(){var e;if(!((e=globalThis.navigator)!=null&&e.gpu))return!1;try{const t=await navigator.gpu.requestAdapter();if(!t)return!1;
45z(this,Uf,navigator.gpu.getPreferredCanvasFormat());const n=z(this,Nf,await t.requestDevice()),r=n.createShaderModule({code:rM});return z(this,Ff,n.createRenderPipeline({layout:"auto",vertex:{module:r,entryPoint:"vs_main",buffers:[{arrayStride:8,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]},{arrayStride:4,attributes:[{shaderLocation:1,offset:0,format:"unorm8x4"}]}]},fragment:{module:r,entryPoint:"fs_main",targets:[{format:m(this,Uf)}]},primitive:{topology:"triangle-list"}})),!0}catch{return!1}},RF=function(e,t){const{coords:n,colors:r}=t;let i=0;for(const d of e){const h=d.coords;if(d.type===au.TRIANGLES)i+=h.length;else if(d.type===au.LATTICE){const f=d.verticesPerRow;i+=(Math.floor(h.length/f)-1)*(f-1)*6}}const a=new Float32Array(i*2),o=new Uint8Array(i*4);let c=0,l=0;const u=(d,h)=>{a[c++]=n[d*2],a[c++]=n[d*2+1],o[l++]=r[h*4],o[l++]=r[h*4+1],o[l++]=r[h*4+2],l++};for(const d of e){const h=d.coords,f=d.colors;if(d.type===au.TRIANGLES)for(let p=0,y=h.length;p<y;p+=3)u(h[p],f[p]),u(h[p+1],f[p+1]),u(h[p+2],f[p+2]);else if(d.type===au.LATTICE){const p=d.verticesPerRow,y=Math.floor(h.length/p)-1,g=p-1;for(let b=0;b<y;b++){let v=b*p;for(let x=0;x<g;x++,v++)u(h[v],f[v]),u(h[v+1],f[v+1]),u(h[v+p],f[v+p]),u(h[v+p+1],f[v+p+1]),u(h[v+1],f[v+1]),u(h[v+p],f[v+p])}}}return{posData:a,colData:o,vertexCount:i}};const ME=new iM;function sM(){ME.init()}function oM(){return ME.isReady}function aM(s,e,t,n,r,i){return ME.draw(s,e,t,n,r,i)}const Sr={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function k0(s,e){if(!e)return;const t=e[2]-e[0],n=e[3]-e[1],r=new Path2D;r.rect(e[0],e[1],t,n),s.clip(r)}class PE{isModifyingCurrentTransform(){return!1}getPattern(){zt("Abstract method `getPattern` called.")}}class cM extends PE{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}isOriginBased(){return this._p0[0]===0&&this._p0[1]===0&&(!this.isRadial()||this._p1[0]===0&&this._p1[1]===0)}isRadial(){return this._type==="radial"}_isCircleCenterOutside(){return!this.isRadial()||this._r0>this._r1?!1:Math.hypot(this._p0[0]-this._p1[0],this._p0[1]-this._p1[1])>this._r1}_createGradient(e,t=null){let n,r=this._p0,i=this._p1;if(t&&(r=r.slice(),i=i.slice(),Ge.applyTransform(r,t),Ge.applyTransform(i,t)),this._type==="axial")n=e.createLinearGradient(r[0],r[1],i[0],i[1]);else if(this._type==="radial"){let a=this._r0,o=this._r1;if(t){const c=new Float32Array(2);Ge.singularValueDecompose2dScale(t,c),a*=c[0],o*=c[0]}n=e.createRadialGradient(r[0],r[1],a,i[0],i[1],o)}for(const a of this._colorStops)n.addColorStop(a[0],a[1]);return n}_createReversedGradient(e,t=null){let n=this._p1,r=this._p0;t&&(n=n.slice(),r=r.slice(),Ge.applyTransform(n,t),Ge.applyTransform(r,t));let i=this._r1,a=this._r0;if(t){const l=new Float32Array(2);Ge.singularValueDecompose2dScale(t,l),i*=l[0],a*=l[0]}const o=e.createRadialGradient(n[0],n[1],i,r[0],r[1],a),c=this._colorStops.map(([l,u])=>[1-l,u]).reverse();for(const[l,u]of c)o.addColorStop(l,u);return o}getPattern(e,t,n,r){let i;if(r===Sr.STROKE||r===Sr.FILL){if(this.isOriginBased()){let h=Ge.transform(n,t.baseTransform);this.matrix&&(h=Ge.transform(h,this.matrix));const f=.001,p=Math.hypot(h[0],h[1]),y=Math.hypot(h[2],h[3]),g=(h[0]*h[2]+h[1]*h[3])/(p*y);if(Math.abs(g)<f)if(this.isRadial()){if(Math.abs(p-y)<f)return this._createGradient(e,h)}else return this._createGradient(e,h)}const a=t.current.getClippedPathBoundingBox(r,Sn(e))||[0,0,0,0],o=Math.ceil(a[2]-a[0])||1,c=Math.ceil(a[3]-a[1])||1,l=t.canvasFactory.create(o,c),u=l.context;u.clearRect(0,0,u.canvas.width,u.canvas.height),u.beginPath(),u.rect(0,0,u.canvas.width,u.canvas.height),u.translate(-a[0],-a[1]),n=Ge.transform(n,[1,0,0,1,a[0],a[1]]),u.transform(...t.baseTransform),this.matrix&&u.transform(...this.matrix),k0(u,this._bbox),this._isCircleCenterOutside()&&(u.fillStyle=this._createReversedGradient(u),u.fill()),u.fillStyle=this._createGradient(u),u.fill(),i=e.createPattern(l.canvas,"no-repeat"),t.canvasFactory.destroy(l);const d=new DOMMatrix(n);i.setTransform(d)}else this._isCircleCenterOutside()&&(e.save(),k0(e,this._bbox),e.fillStyle=this._createReversedGradient(e),e.fillRect(-1e10,-1e10,2e10,2e10),e.restore(
45)),k0(e,this._bbox),i=this._createGradient(e);return i}}function Cw(s,e,t,n,r,i,a,o){const c=e.coords,l=e.colors,u=s.data,d=s.width*4;let h;c[t*2+1]>c[n*2+1]&&(h=t,t=n,n=h,h=i,i=a,a=h),c[n*2+1]>c[r*2+1]&&(h=n,n=r,r=h,h=a,a=o,o=h),c[t*2+1]>c[n*2+1]&&(h=t,t=n,n=h,h=i,i=a,a=h);const f=(c[t*2]+e.offsetX)*e.scaleX,p=(c[t*2+1]+e.offsetY)*e.scaleY,y=(c[n*2]+e.offsetX)*e.scaleX,g=(c[n*2+1]+e.offsetY)*e.scaleY,b=(c[r*2]+e.offsetX)*e.scaleX,v=(c[r*2+1]+e.offsetY)*e.scaleY;if(p>=v)return;const x=l[i*4],w=l[i*4+1],_=l[i*4+2],T=l[a*4],S=l[a*4+1],C=l[a*4+2],D=l[o*4],N=l[o*4+1],M=l[o*4+2],F=Math.round(p),L=Math.round(v);let A,X,he,j,ee,O,pe,q;for(let B=F;B<=L;B++){if(B<g){const P=B<p?0:(p-B)/(p-g);A=f-(f-y)*P,X=x-(x-T)*P,he=w-(w-S)*P,j=_-(_-C)*P}else{let P;B>v?P=1:g===v?P=0:P=(g-B)/(g-v),A=y-(y-b)*P,X=T-(T-D)*P,he=S-(S-N)*P,j=C-(C-M)*P}let re;B<p?re=0:B>v?re=1:re=(p-B)/(p-v),ee=f-(f-b)*re,O=x-(x-D)*re,pe=w-(w-N)*re,q=_-(_-M)*re;const le=Math.round(Math.min(A,ee)),ge=Math.round(Math.max(A,ee));let ie=d*B+le*4;for(let P=le;P<=ge;P++)re=(A-P)/(A-ee),re<0?re=0:re>1&&(re=1),u[ie++]=X-(X-O)*re|0,u[ie++]=he-(he-pe)*re|0,u[ie++]=j-(j-q)*re|0,u[ie++]=255}}function lM(s,e,t){const n=e.coords,r=e.colors;let i,a;switch(e.type){case au.LATTICE:const o=e.verticesPerRow,c=Math.floor(n.length/o)-1,l=o-1;for(i=0;i<c;i++){let u=i*o;for(let d=0;d<l;d++,u++)Cw(s,t,n[u],n[u+1],n[u+o],r[u],r[u+1],r[u+o]),Cw(s,t,n[u+o+1],n[u+1],n[u+o],r[u+o+1],r[u+1],r[u+o])}break;case au.TRIANGLES:for(i=0,a=n.length;i<a;i+=3)Cw(s,t,n[i],n[i+1],n[i+2],r[i],r[i+1],r[i+2]);break;default:throw new Error("illegal figure")}}class uM extends PE{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[6],this._background=e[7],this.matrix=null}_createMeshCanvas(e,t,n){const o=Math.floor(this._bounds[0]),c=Math.floor(this._bounds[1]),l=Math.ceil(this._bounds[2])-o,u=Math.ceil(this._bounds[3])-c,d=Math.min(Math.ceil(Math.abs(l*e[0]*1.1)),3e3)||1,h=Math.min(Math.ceil(Math.abs(u*e[1]*1.1)),3e3)||1,f=l?l/d:1,p=u?u/h:1,y={coords:this._coords,colors:this._colors,offsetX:-o,offsetY:-c,scaleX:1/f,scaleY:1/p},g=d+4,b=h+4,v=n.create(g,b);if(oM())v.context.drawImage(aM(this._figures,y,t,g,b,2),0,0);else{const x=v.context.createImageData(d,h);if(t){const w=x.data;for(let _=0,T=w.length;_<T;_+=4)w[_]=t[0],w[_+1]=t[1],w[_+2]=t[2],w[_+3]=255}for(const w of this._figures)lM(x,w,y);v.context.putImageData(x,2,2)}return{canvas:v.canvas,offsetX:o-2*f,offsetY:c-2*p,scaleX:f,scaleY:p}}isModifyingCurrentTransform(){return!0}getPattern(e,t,n,r){k0(e,this._bbox);const i=new Float32Array(2);if(r===Sr.SHADING)Ge.singularValueDecompose2dScale(Sn(e),i);else if(this.matrix){Ge.singularValueDecompose2dScale(this.matrix,i);const[c,l]=i;Ge.singularValueDecompose2dScale(t.baseTransform,i),i[0]*=c,i[1]*=l}else Ge.singularValueDecompose2dScale(t.baseTransform,i);const a=this._createMeshCanvas(i,r===Sr.SHADING?null:this._background,t.canvasFactory);r!==Sr.SHADING&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(a.offsetX,a.offsetY),e.scale(a.scaleX,a.scaleY);const o=e.createPattern(a.canvas,"no-repeat");return t.canvasFactory.destroy(a),o}}class hM extends PE{getPattern(){return"hotpink"}}function dM(s){switch(s[0]){case"RadialAxial":return new cM(s);case"Mesh":return new uM(s);case"Dummy":return new hM}throw new Error(`Unknown IR type: ${s[0]}`)}const rA={COLORED:1,UNCOLORED:2},cv=class cv{constructor(e,t,n,r){this.color=e[1],this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.ctx=t,this.canvasGraphicsFactory=n,this.baseTransform=r}createPatternCanvas(e,t){var O,pe;const{bbox:n,operatorList:r,paintType:i,tilingType:a,color:o,canvasGraphicsFactory:c}=this;let{xstep:l,ystep:u}=this;l=Math.abs(l),u=Math.abs(u),Tv("TilingType: "+a);const d=n[0],h=n[1],f=n[2],p=n[3],y=f-d,g=p-h,b=new Float32Array(2);Ge.singularValueDecompose2dScale(this.matrix,b);const[v,x]=b;Ge.singularValueDecompose2dScale(this.baseTransform,b);const w=v*b[0],_=x*b[1];let T=y,S=g,C=!1,D=!1;const N=Math.ceil(l*w),M=Math.ceil(u*_),F=Math.ceil(y*w),L=Math.ceil(g*_);N>=F?T=l:C=!0,M>=L?S=u:D=!0;const A=this.getSizeAndScale(T,this.ctx.canvas.width,w),X=this.getSizeAndScale(S,this.ctx.canvas.height,_),he=e.canvasFactory.create(A.size,X.size),j=he.context,ee=c.createCanvasGraphics(j,t);if(ee.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(ee,i,o),j.translate(-A.scale*d,-X.scale*h),ee.transform(0,A.scale,0,0,X.scale,0,0),j.save(),(O=ee.dependencyTracker)==null||O.save(),this.clipBbox(ee,d,h,f,p),ee.baseTransform=Sn(ee.ctx),ee.executeOperatorList(r),ee.endDrawing(),(pe=ee.dependencyTracker)==null||pe.restore(
45),j.restore(),C||D){const q=he.canvas;C&&(T=l),D&&(S=u);const B=this.getSizeAndScale(T,this.ctx.canvas.width,w),re=this.getSizeAndScale(S,this.ctx.canvas.height,_),le=B.size,ge=re.size,ie=e.canvasFactory.create(le,ge),P=ie.context,W=C?Math.floor(y/l):0,te=D?Math.floor(g/u):0;for(let Y=0;Y<=W;Y++)for(let se=0;se<=te;se++)P.drawImage(q,le*Y,ge*se,le,ge,0,0,le,ge);return e.canvasFactory.destroy(he),{canvas:ie.canvas,canvasEntry:ie,scaleX:B.scale,scaleY:re.scale,offsetX:d,offsetY:h}}return{canvas:he.canvas,canvasEntry:he,scaleX:A.scale,scaleY:X.scale,offsetX:d,offsetY:h}}getSizeAndScale(e,t,n){const r=Math.max(cv.MAX_PATTERN_SIZE,t);let i=Math.ceil(e*n);return i>=r?i=r:n=i/e,{scale:n,size:i}}clipBbox(e,t,n,r,i){const a=r-t,o=i-n;e.ctx.rect(t,n,a,o),Ge.axialAlignedBoundingBox([t,n,r,i],Sn(e.ctx),e.current.minMax),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,n){const r=e.ctx,i=e.current;switch(t){case rA.COLORED:const{fillStyle:a,strokeStyle:o}=this.ctx;r.fillStyle=i.fillColor=a,r.strokeStyle=i.strokeColor=o;break;case rA.UNCOLORED:r.fillStyle=r.strokeStyle=n,i.fillColor=i.strokeColor=n;break;default:throw new p4(`Unsupported paint type: ${t}`)}}isModifyingCurrentTransform(){return!1}getPattern(e,t,n,r,i){let a=n;r!==Sr.SHADING&&(a=Ge.transform(a,t.baseTransform),this.matrix&&(a=Ge.transform(a,this.matrix)));const o=this.createPatternCanvas(t,i);let c=new DOMMatrix(a);c=c.translate(o.offsetX,o.offsetY),c=c.scale(1/o.scaleX,1/o.scaleY);const l=e.createPattern(o.canvas,"repeat");return t.canvasFactory.destroy(o.canvasEntry),l.setTransform(c),l}};be(cv,"MAX_PATTERN_SIZE",3e3);let FT=cv;function fM({src:s,srcPos:e=0,dest:t,width:n,height:r,nonBlackColor:i=4294967295,inverseDecode:a=!1}){const o=rr.isLittleEndian?4278190080:255,[c,l]=a?[i,o]:[o,i],u=n>>3,d=n&7,h=c^l,f=s.length;t=new Uint32Array(t.buffer);let p=0;for(let y=0;y<r;++y){for(const b=e+u;e<b;++e,p+=8){const v=s[e];t[p]=c^-(v>>7&1)&h,t[p+1]=c^-(v>>6&1)&h,t[p+2]=c^-(v>>5&1)&h,t[p+3]=c^-(v>>4&1)&h,t[p+4]=c^-(v>>3&1)&h,t[p+5]=c^-(v>>2&1)&h,t[p+6]=c^-(v>>1&1)&h,t[p+7]=c^-(v&1)&h}if(d===0)continue;const g=e<f?s[e++]:255;for(let b=0;b<d;++b,++p)t[p]=c^-(g>>7-b&1)&h}return{srcPos:e,destPos:p}}const iA=16,sA=100,pM=15,oA=10,bi=16,Aw=new DOMMatrix,Vi=new Float32Array(2),Pd=new Float32Array([1/0,1/0,-1/0,-1/0]);function gM(s,e){if(s._removeMirroring)throw new Error("Context is already forwarding operations.");s.__originalSave=s.save,s.__originalRestore=s.restore,s.__originalRotate=s.rotate,s.__originalScale=s.scale,s.__originalTranslate=s.translate,s.__originalTransform=s.transform,s.__originalSetTransform=s.setTransform,s.__originalResetTransform=s.resetTransform,s.__originalClip=s.clip,s.__originalMoveTo=s.moveTo,s.__originalLineTo=s.lineTo,s.__originalBezierCurveTo=s.bezierCurveTo,s.__originalRect=s.rect,s.__originalClosePath=s.closePath,s.__originalBeginPath=s.beginPath,s._removeMirroring=()=>{s.save=s.__originalSave,s.restore=s.__originalRestore,s.rotate=s.__originalRotate,s.scale=s.__originalScale,s.translate=s.__originalTranslate,s.transform=s.__originalTransform,s.setTransform=s.__originalSetTransform,s.resetTransform=s.__originalResetTransform,s.clip=s.__originalClip,s.moveTo=s.__originalMoveTo,s.lineTo=s.__originalLineTo,s.bezierCurveTo=s.__originalBezierCurveTo,s.rect=s.__originalRect,s.closePath=s.__originalClosePath,s.beginPath=s.__originalBeginPath,delete s._removeMirroring},s.save=function(){e.save(),this.__originalSave()},s.restore=function(){e.restore(),this.__originalRestore()},s.translate=function(t,n){e.translate(t,n),this.__originalTranslate(t,n)},s.scale=function(t,n){e.scale(t,n),this.__originalScale(t,n)},s.transform=function(t,n,r,i,a,o){e.transform(t,n,r,i,a,o),this.__originalTransform(t,n,r,i,a,o)},s.setTransform=function(t,n,r,i,a,o){e.setTransform(t,n,r,i,a,o),this.__originalSetTransform(t,n,r,i,a,o)},s.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},s.rotate=function(t){e.rotate(t),this.__originalRotate(t)},s.clip=function(t){e.clip(t),this.__originalClip(t)},s.moveTo=function(t,n){e.moveTo(t,n),this.__originalMoveTo(t,n)},s.lineTo=function(t,n){e.lineTo(t,n),this.__originalLineTo(t,n)},s.bezierCurveTo=function(t,n,r,i,a,o){e.bezierCurveTo(t,n,r,i,a,o),this.__originalBezierCurveTo(t,n,r,i,a,o)},s.rect=function(t,n,r,i){e.rect(t,n,r,i),this.__originalRect(t,n,r,i)},s.closePath=function(){e.closePath(),this.__originalClosePath()},s.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}function Ab(s,e,t,n,r,i,a,o,c,l){const[u,d,h,f,p,y]=Sn(s);if(d===0&&h===0){const v=a*u+p,x=Math.round(v),w=o*f+y,_=Math.round(w),T=(a+c)*u+p,S=Math.abs(Math.round(T)-x)||1,C=(o+l)*f+y,D=Math.abs(Math.round(C)-_)||1;return s.setTransform(Math.sign(u),0,0,Math.sign(f),x,_),s.drawImage(e,t,n,r,i,0,0,S,D),s.setTransform(u,d,h,f,p,y),[S,D]}if(u===0&&f===0){const v=o*h+p,x=Math.round(v),w=a*d+y,_=Math.round(w),T=(o+l)*h+p,S=Math.abs(Math.round(T)-x)||1,C=(a+c)*d+y,D=Math.abs(Math.round(C)-_)||1;return s.setTransform(0,Math.sign(d),Math.sign(h),0,x,_),s.drawImage(e,t,n,r,i,0,0,D,S),s.setTransform(u,d,h,f,p,y),[D,S]}s.drawImage(e,t,n,r,i,a,o,c,l);const g=Math.hypot(u,d),b=Math.hypot(h,f);return[g*c,b*l]}class aA{constructor(e,t){be(this,"alphaIsShape",!1);be(this,"fontSize",0);be(this,"fontSizeScale",1);be(this,"textMatrix",null);be(this,"textMatrixScale",1);be(this,"fontMatrix",nT);be(this,"leading",0);be(this,"x",0);be(this,"y",0);be(this,"lineX",0);be(this,"lineY",0);be(this,"charSpacing",0);be(this,"wordSpacing",0);be(this,"textHScale",1);be(this,"textRenderingMode",Yn.FILL);be(this,"textRise",0);be(this,"fillColor","#000000");be(this,"strokeColor","#000000");be(this,"patternFill",!1);be(this,"patternStroke",!1);be(this,"fillAlpha",1);be(this,"strokeAlpha",1);be(this,"lineWidth",1);be(this,"activeSMask",null);be(this,"transferMaps","none");
45be(this,"minMax",Pd.slice());this.clipBox=new Float32Array([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e.minMax=this.minMax.slice(),e}getPathBoundingBox(e=Sr.FILL,t=null){const n=this.minMax.slice();if(e===Sr.STROKE){t||zt("Stroke bounding box must include transform."),Ge.singularValueDecompose2dScale(t,Vi);const r=Vi[0]*this.lineWidth/2,i=Vi[1]*this.lineWidth/2;n[0]-=r,n[1]-=i,n[2]+=r,n[3]+=i}return n}updateClipFromPath(){const e=Ge.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(e){this.clipBox.set(e,0),this.minMax.set(Pd,0)}getClippedPathBoundingBox(e=Sr.FILL,t=null){return Ge.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function cA(s,e){if(e instanceof ImageData){s.putImageData(e,0,0);return}const t=e.height,n=e.width,r=t%bi,i=(t-r)/bi,a=r===0?i:i+1,o=s.createImageData(n,bi);let c=0,l;const u=e.data,d=o.data;let h,f,p,y;if(e.kind===y0.GRAYSCALE_1BPP){const g=u.byteLength,b=new Uint32Array(d.buffer,0,d.byteLength>>2),v=b.length,x=n+7>>3,w=4294967295,_=rr.isLittleEndian?4278190080:255;for(h=0;h<a;h++){for(p=h<i?bi:r,l=0,f=0;f<p;f++){const T=g-c;let S=0;const C=T>x?n:T*8-7,D=C&-8;let N=0,M=0;for(;S<D;S+=8)M=u[c++],b[l++]=M&128?w:_,b[l++]=M&64?w:_,b[l++]=M&32?w:_,b[l++]=M&16?w:_,b[l++]=M&8?w:_,b[l++]=M&4?w:_,b[l++]=M&2?w:_,b[l++]=M&1?w:_;for(;S<C;S++)N===0&&(M=u[c++],N=128),b[l++]=M&N?w:_,N>>=1}for(;l<v;)b[l++]=0;s.putImageData(o,0,h*bi)}}else if(e.kind===y0.RGBA_32BPP){for(f=0,y=n*bi*4,h=0;h<i;h++)d.set(u.subarray(c,c+y)),c+=y,s.putImageData(o,0,f),f+=bi;h<a&&(y=n*r*4,d.set(u.subarray(c,c+y)),s.putImageData(o,0,f))}else if(e.kind===y0.RGB_24BPP)for(p=bi,y=n*p,h=0;h<a;h++){for(h>=i&&(p=r,y=n*p),l=0,f=y;f--;)d[l++]=u[c++],d[l++]=u[c++],d[l++]=u[c++],d[l++]=255;s.putImageData(o,0,h*bi)}else throw new Error(`bad image kind: ${e.kind}`)}function lA(s,e){if(e.bitmap){s.drawImage(e.bitmap,0,0);return}const t=e.height,n=e.width,r=t%bi,i=(t-r)/bi,a=r===0?i:i+1,o=s.createImageData(n,bi);let c=0;const l=e.data,u=o.data;for(let d=0;d<a;d++){const h=d<i?bi:r;({srcPos:c}=fM({src:l,srcPos:c,dest:u,width:n,height:h,nonBlackColor:0})),s.putImageData(o,0,d*bi)}}function eg(s,e){const t=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const n of t)s[n]!==void 0&&(e[n]=s[n]);s.setLineDash!==void 0&&(e.setLineDash(s.getLineDash()),e.lineDashOffset=s.lineDashOffset)}function kb(s){s.strokeStyle=s.fillStyle="#000000",s.fillRule="nonzero",s.globalAlpha=1,s.lineWidth=1,s.lineCap="butt",s.lineJoin="miter",s.miterLimit=10,s.globalCompositeOperation="source-over",s.font="10px sans-serif",s.setLineDash!==void 0&&(s.setLineDash([]),s.lineDashOffset=0);const{filter:e}=s;e!=="none"&&e!==""&&(s.filter="none")}function uA(s,e){if(e)return!0;Ge.singularValueDecompose2dScale(s,Vi);const t=Math.fround(Zo.pixelRatio*El.PDF_TO_CSS_UNITS);return Vi[0]<=t&&Vi[1]<=t}const mM=["butt","round","square"],yM=["miter","round","bevel"],bM={},hA={};var io,UT,RT,IT;const tC=class tC{constructor(e,t,n,r,i,{optionalContentConfig:a,markedContentStack:o=null},c,l,u,d){J(this,io);this.ctx=e,this.current=new aA(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.commonObjs=t,this.objs=n,this.canvasFactory=r,this.filterFactory=i,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.smaskGroupCanvases=[],this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=o||[],this.optionalContentConfig=a,this.cachedPatterns=new Map,this.annotationCanvasMap=c,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=l,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map,this.dependencyTracker=u??null,this.imagesTracker=d??null}getObject(e,t,n=null){var r;return typeof t=="string"?((r=this.dependencyTracker)==null||r.recordNamedDependency(e,t),t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t)):n}beginDrawing({transform:e,viewport:t,transparency:n=!1,background:r=null}){const i=this.ctx.canvas.width,a=this.ctx.canvas.height,o=this.ctx.fillStyle;if(this.ctx.fillStyle=r||"#ffffff",this.ctx.fillRect(0,0,i,a),this.ctx.fillStyle=o,n){const c=this.transparentCanvasEntry=this.canvasFactory.create(i,a);this.compositeCtx=this.ctx,{canvas:this.transparentCanvas,context:this.ctx}=c,this.ctx.save(),this.ctx.transform(...Sn(this.compositeCtx))}
45this.ctx.save(),kb(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=Sn(this.ctx)}executeOperatorList(e,t,n,r,i){var b;const a=e.argsArray,o=e.fnArray;let c=t||0;const l=a.length;if(l===c)return c;const u=l-c>oA&&typeof n=="function",d=u?Date.now()+pM:0;let h=0;const f=this.commonObjs,p=this.objs;let y,g;for(;;){if(r!==void 0){if(c===r.nextBreakPoint)return r.breakIt(c,n),c;if(r.shouldSkip(c)){if(++c===l)return c;continue}}if(!i||i(c))if(y=o[c],g=a[c]??null,y!==Qg.dependency)g===null?this[y](c):this[y](c,...g);else for(const v of g){(b=this.dependencyTracker)==null||b.recordNamedData(v,c);const x=v.startsWith("g_")?f:p;if(!x.has(v))return x.get(v,n),c}if(c++,c===l)return c;if(u&&++h>oA){if(Date.now()>d)return n(),c;h=0}}}endDrawing(){oe(this,io,UT).call(this);for(const e of this.smaskGroupCanvases)this.canvasFactory.destroy(e);this.smaskGroupCanvases.length=0,this.tempSMask=null,this.smaskStack.length=0,this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),oe(this,io,RT).call(this)}_scaleImage(e,t){const n=e.width??e.displayWidth,r=e.height??e.displayHeight,i=Math.max(Math.hypot(t[0],t[1]),1),a=Math.max(Math.hypot(t[2],t[3]),1),o=[];let c=i,l=a,u=n,d=r;for(;c>2&&u>1||l>2&&d>1;){let b=u,v=d;c>2&&u>1&&(b=u>=16384?Math.floor(u/2)-1||1:Math.ceil(u/2),c/=u/b),l>2&&d>1&&(v=d>=16384?Math.floor(d/2)-1||1:Math.ceil(d)/2,l/=d/v),o.push({newWidth:b,newHeight:v}),u=b,d=v}if(o.length===0)return{img:e,paintWidth:n,paintHeight:r,tmpCanvas:null};if(o.length===1){const{newWidth:b,newHeight:v}=o[0],x=this.canvasFactory.create(b,v);return x.context.drawImage(e,0,0,n,r,0,0,b,v),{img:x.canvas,paintWidth:b,paintHeight:v,tmpCanvas:x}}let h=this.canvasFactory.create(1,1),f=this.canvasFactory.create(1,1),p=n,y=r,g=e;for(const{newWidth:b,newHeight:v}of o)this.canvasFactory.reset(f,b,v),f.context.drawImage(g,0,0,p,y,0,0,b,v),[h,f]=[f,h],g=h.canvas,p=b,y=v;return this.canvasFactory.destroy(f),{img:h.canvas,paintWidth:p,paintHeight:y,tmpCanvas:h}}_createMaskCanvas(e,t){var M,F;const n=this.ctx,{width:r,height:i}=t,a=this.current.fillColor,o=this.current.patternFill,c=Sn(n);let l,u,d,h;if((t.bitmap||t.data)&&t.count>1){const L=t.bitmap||t.data.buffer;u=JSON.stringify(o?c:[c.slice(0,4),a]),l=this._cachedBitmapsMap.getOrInsertComputed(L,NE);const A=l.get(u);if(A&&!o){const X=Math.round(Math.min(c[0],c[2])+c[4]),he=Math.round(Math.min(c[1],c[3])+c[5]);return(M=this.dependencyTracker)==null||M.recordDependencies(e,is.transformAndFill),{canvas:A,offsetX:X,offsetY:he}}d=A}d||(h=this.canvasFactory.create(r,i),lA(h.context,t));let f=Ge.transform(c,[1/r,0,0,-1/i,0,0]);f=Ge.transform(f,[1,0,0,1,0,-i]);const p=Pd.slice();Ge.axialAlignedBoundingBox([0,0,r,i],f,p);const[y,g,b,v]=p,x=Math.round(b-y)||1,w=Math.round(v-g)||1,_=this.canvasFactory.create(x,w),T=_.context,S=y,C=g;T.translate(-S,-C),T.transform(...f);let D=null;if(!d){const L=this._scaleImage(h.canvas,lo(T));d=L.img,D=L.tmpCanvas,d!==h.canvas&&(this.canvasFactory.destroy(h),h=null),l&&o&&(l.set(u,d),D=null,h=null)}T.imageSmoothingEnabled=uA(Sn(T),t.interpolate),Ab(T,d,0,0,d.width,d.height,0,0,r,i),D&&this.canvasFactory.destroy(D),h&&this.canvasFactory.destroy(h),T.globalCompositeOperation="source-in";const N=Ge.transform(lo(T),[1,0,0,1,-S,-C]);return T.fillStyle=o?a.getPattern(n,this,N,Sr.FILL,e):a,T.fillRect(0,0,r,i),l&&!o&&l.set(u,_.canvas),(F=this.dependencyTracker)==null||F.recordDependencies(e,is.transformAndFill),{canvas:_.canvas,canvasEntry:l&&!o?null:_,offsetX:Math.round(S),offsetY:Math.round(C)}}setLineWidth(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("lineWidth",e),t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("lineCap",e),this.ctx.lineCap=mM[t]}setLineJoin(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("lineJoin",e),this.ctx.lineJoin=yM[t]}setMiterLimit(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("miterLimit",e),this.ctx.miterLimit=t}setDash(e,t,n){var i;(i=this.dependencyTracker)==null||i.recordSimpleData("dash",e);const r=this.ctx;r.setLineDash!==void 0&&(r.setLineDash(t),r.lineDashOffset=n)}
45setRenderingIntent(e,t){}setFlatness(e,t){}setGState(e,t){var n,r,i,a,o;for(const[c,l]of t)switch(c){case"LW":this.setLineWidth(e,l);break;case"LC":this.setLineCap(e,l);break;case"LJ":this.setLineJoin(e,l);break;case"ML":this.setMiterLimit(e,l);break;case"D":this.setDash(e,l[0],l[1]);break;case"RI":this.setRenderingIntent(e,l);break;case"FL":this.setFlatness(e,l);break;case"Font":this.setFont(e,l[0],l[1]);break;case"CA":(n=this.dependencyTracker)==null||n.recordSimpleData("strokeAlpha",e),this.current.strokeAlpha=l;break;case"ca":(r=this.dependencyTracker)==null||r.recordSimpleData("fillAlpha",e),this.ctx.globalAlpha=this.current.fillAlpha=l;break;case"BM":(i=this.dependencyTracker)==null||i.recordSimpleData("globalCompositeOperation",e),this.ctx.globalCompositeOperation=l;break;case"SMask":(a=this.dependencyTracker)==null||a.recordSimpleData("SMask",e),this.current.activeSMask=l?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":(o=this.dependencyTracker)==null||o.recordSimpleData("filter",e),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(l);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(e){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,n=this.ctx.canvas.height,r=this.canvasFactory.create(t,n);this.smaskScratchCanvas=r,this.suspendedCtx=this.ctx;const i=this.ctx=r.context;i.setTransform(this.suspendedCtx.getTransform()),eg(this.suspendedCtx,i),gM(i,this.suspendedCtx),this.setGState(e,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),eg(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null,this.canvasFactory.destroy(this.smaskScratchCanvas),this.smaskScratchCanvas=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask,n=this.suspendedCtx;this.composeSMask(n,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(e,t,n,r){const i=r[0],a=r[1],o=r[2]-i,c=r[3]-a;o===0||c===0||(this.genericComposeSMask(t.context,n,o,c,t.subtype,t.backdrop,t.transferMap,i,a,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(n.canvas,0,0),e.restore())}genericComposeSMask(e,t,n,r,i,a,o,c,l,u,d){let h=e.canvas,f=c-u,p=l-d,y=null;if(a)if(f<0||p<0||f+n>h.width||p+r>h.height){y=this.canvasFactory.create(n,r);const b=y.context;b.drawImage(h,-f,-p),b.globalCompositeOperation="destination-atop",b.fillStyle=a,b.fillRect(0,0,n,r),b.globalCompositeOperation="source-over",h=y.canvas,f=p=0}else{e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const b=new Path2D;b.rect(f,p,n,r),e.clip(b),e.globalCompositeOperation="destination-atop",e.fillStyle=a,e.fillRect(f,p,n,r),e.restore()}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),i==="Alpha"&&o?t.filter=this.filterFactory.addAlphaFilter(o):i==="Luminosity"&&(t.filter=this.filterFactory.addLuminosityFilter(o));const g=new Path2D;g.rect(c,l,n,r),t.clip(g),t.globalCompositeOperation="destination-in",t.drawImage(h,f,p,n,r,c,l,n,r),t.restore(),y&&this.canvasFactory.destroy(y)}save(e){var n;this.inSMaskMode&&eg(this.ctx,this.suspendedCtx),this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone(),(n=this.dependencyTracker)==null||n.save(e)}restore(e){var t;if((t=this.dependencyTracker)==null||t.restore(e),this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&eg(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(e,t,n,r,i,a,o){var c;(c=this.dependencyTracker)==null||c.recordIncrementalData("transform",e),this.ctx.transform(t,n,r,i,a,o),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,n,r){let[i]=n;
45if(!r){i||(i=n[0]=new Path2D),this[t](e,i);return}if(this.dependencyTracker!==null){const a=t===Qg.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(e).recordBBox(e,this.ctx,r[0]-a,r[2]+a,r[1]-a,r[3]+a).recordDependencies(e,["transform"])}i instanceof Path2D||(i=n[0]=jN(i)),Ge.axialAlignedBoundingBox(r,Sn(this.ctx),this.current.minMax),this[t](e,i),this._pathStartIdx=e}closePath(e){this.ctx.closePath()}stroke(e,t,n=!0){var a;const r=this.ctx,i=this.current.strokeColor;if(r.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof i=="object"&&(i!=null&&i.getPattern)){const o=i.isModifyingCurrentTransform()?r.getTransform():null;if(r.save(),r.strokeStyle=i.getPattern(r,this,lo(r),Sr.STROKE,e),o){const c=new Path2D;c.addPath(t,r.getTransform().invertSelf().multiplySelf(o)),t=c}this.rescaleAndStroke(t,!1),r.restore()}else this.rescaleAndStroke(t,!0);(a=this.dependencyTracker)==null||a.recordDependencies(e,is.stroke),n&&this.consumePath(e,t,this.current.getClippedPathBoundingBox(Sr.STROKE,Sn(this.ctx))),r.globalAlpha=this.current.fillAlpha}closeStroke(e,t){this.stroke(e,t)}fill(e,t,n=!0){var l,u,d;const r=this.ctx,i=this.current.fillColor,a=this.current.patternFill;let o=!1;if(a){const h=i.isModifyingCurrentTransform()?r.getTransform():null;if((l=this.dependencyTracker)==null||l.save(e),r.save(),r.fillStyle=i.getPattern(r,this,lo(r),Sr.FILL,e),h){const f=new Path2D;f.addPath(t,r.getTransform().invertSelf().multiplySelf(h)),t=f}o=!0}const c=this.current.getClippedPathBoundingBox();this.contentVisible&&c!==null&&(this.pendingEOFill?(r.fill(t,"evenodd"),this.pendingEOFill=!1):r.fill(t)),(u=this.dependencyTracker)==null||u.recordDependencies(e,is.fill),o&&(r.restore(),(d=this.dependencyTracker)==null||d.restore(e)),n&&this.consumePath(e,t,c)}eoFill(e,t){this.pendingEOFill=!0,this.fill(e,t)}fillStroke(e,t){this.fill(e,t,!1),this.stroke(e,t,!1),this.consumePath(e,t)}eoFillStroke(e,t){this.pendingEOFill=!0,this.fillStroke(e,t)}closeFillStroke(e,t){this.fillStroke(e,t)}closeEOFillStroke(e,t){this.pendingEOFill=!0,this.fillStroke(e,t)}endPath(e,t){this.consumePath(e,t)}rawFillPath(e,t){var n;this.ctx.fill(t),(n=this.dependencyTracker)==null||n.recordDependencies(e,is.rawFillPath).recordOperation(e)}clip(e){var t;(t=this.dependencyTracker)==null||t.recordFutureForcedDependency("clipMode",e),this.pendingClip=bM}eoClip(e){var t;(t=this.dependencyTracker)==null||t.recordFutureForcedDependency("clipMode",e),this.pendingClip=hA}beginText(e){var t;this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,(t=this.dependencyTracker)==null||t.recordOpenMarker(e).resetIncrementalData("sameLineText").resetIncrementalData("moveText",e)}endText(e){const t=this.pendingTextPaths,n=this.ctx;if(this.dependencyTracker){const{dependencyTracker:r}=this;t!==void 0&&r.recordFutureForcedDependency("textClip",r.getOpenMarker()).recordFutureForcedDependency("textClip",e),r.recordCloseMarker(e)}if(t!==void 0){const r=new Path2D,i=n.getTransform().invertSelf();for(const{transform:a,x:o,y:c,fontSize:l,path:u}of t)u&&r.addPath(u,new DOMMatrix(a).preMultiplySelf(i).translate(o,c).scale(l,-l));n.clip(r)}delete this.pendingTextPaths}setCharSpacing(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("charSpacing",e),this.current.charSpacing=t}setWordSpacing(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("wordSpacing",e),this.current.wordSpacing=t}setHScale(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("hScale",e),this.current.textHScale=t/100}setLeading(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("leading",e),this.current.leading=-t}setFont(e,t,n){var d,h;(d=this.dependencyTracker)==null||d.recordSimpleData("font",e).recordSimpleDataFromNamed("fontObj",t,e);const r=this.commonObjs.get(t),i=this.current;if(!r)throw new Error(`Can't find font for ${t}`);if(i.fontMatrix=r.fontMatrix||nT,(i.fontMatrix[0]===0||i.fontMatrix[3]===0)&&_t("Invalid font matrix for font "+t),n<0?(n=-n,i.fontDirection=-1):i.fontDirection=1,this.current.font=r,this.current.fontSize=n,r.isType3Font)return;const a=r.loadedName||"sans-serif",o=((h=r.systemFontInfo)==null?void 0:h.css)||`"${a}", ${r.fallbackName}`;let c="normal";r.black?c="900":r.bold&&(c="bold");const l=r.italic?"italic":"normal";let u=n;
45n<iA?u=iA:n>sA&&(u=sA),this.current.fontSizeScale=n/u,this.ctx.font=`${l} ${c} ${u}px ${o}`}setTextRenderingMode(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("textRenderingMode",e),this.current.textRenderingMode=t}setTextRise(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("textRise",e),this.current.textRise=t}moveText(e,t,n){var r;(r=this.dependencyTracker)==null||r.resetIncrementalData("sameLineText").recordIncrementalData("moveText",e),this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=n}setLeadingMoveText(e,t,n){this.setLeading(e,-n),this.moveText(e,t,n)}setTextMatrix(e,t){var r;(r=this.dependencyTracker)==null||r.resetIncrementalData("sameLineText").recordSimpleData("textMatrix",e);const{current:n}=this;n.textMatrix=t,n.textMatrixScale=Math.hypot(t[0],t[1]),n.x=n.lineX=0,n.y=n.lineY=0}nextLine(e){var t;this.moveText(e,0,this.current.leading),(t=this.dependencyTracker)==null||t.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??e)}paintChar(e,t,n,r,i,a){var b,v,x,w;const o=this.ctx,c=this.current,l=c.font,u=c.textRenderingMode,d=c.fontSize/c.fontSizeScale,h=u&Yn.FILL_STROKE_MASK,f=!!(u&Yn.ADD_TO_PATH_FLAG),p=c.patternFill&&!l.missingFile,y=c.patternStroke&&!l.missingFile;let g;if((l.disableFontFace||f||p||y)&&!l.missingFile&&(g=l.getPathGenerator(this.commonObjs,t)),g&&(l.disableFontFace||p||y)){o.save(),o.translate(n,r),o.scale(d,-d),(b=this.dependencyTracker)==null||b.recordCharacterBBox(e,o,l);let _;if(h===Yn.FILL||h===Yn.FILL_STROKE)if(i){_=o.getTransform(),o.setTransform(...i);const T=oe(this,io,IT).call(this,g,_,i);o.fill(T)}else o.fill(g);if(h===Yn.STROKE||h===Yn.FILL_STROKE)if(a){_||(_=o.getTransform()),o.setTransform(...a);const{a:T,b:S,c:C,d:D}=_,N=Ge.inverseTransform(a),M=Ge.transform([T,S,C,D,0,0],N);Ge.singularValueDecompose2dScale(M,Vi),o.lineWidth*=Math.max(Vi[0],Vi[1])/d,o.stroke(oe(this,io,IT).call(this,g,_,a))}else o.lineWidth/=d,o.stroke(g);o.restore()}else(h===Yn.FILL||h===Yn.FILL_STROKE)&&(o.fillText(t,n,r),(v=this.dependencyTracker)==null||v.recordCharacterBBox(e,o,l,d,n,r,()=>o.measureText(t))),(h===Yn.STROKE||h===Yn.FILL_STROKE)&&(this.dependencyTracker&&((x=this.dependencyTracker)==null||x.recordCharacterBBox(e,o,l,d,n,r,()=>o.measureText(t)).recordDependencies(e,is.stroke)),o.strokeText(t,n,r));f&&((this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:Sn(o),x:n,y:r,fontSize:d,path:g}),(w=this.dependencyTracker)==null||w.recordCharacterBBox(e,o,l,d,n,r))}get isFontSubpixelAAEnabled(){const e=this.canvasFactory.create(10,10),t=e.context;t.scale(1.5,1),t.fillText("I",0,10);const n=t.getImageData(0,0,10,10).data;this.canvasFactory.destroy(e);let r=!1;for(let i=3;i<n.length;i+=4)if(n[i]>0&&n[i]<255){r=!0;break}return Tt(this,"isFontSubpixelAAEnabled",r)}showText(e,t){var M,F,L,A;this.dependencyTracker&&(this.dependencyTracker.recordDependencies(e,is.showText).resetBBox(e),this.current.textRenderingMode&Yn.ADD_TO_PATH_FLAG&&this.dependencyTracker.recordFutureForcedDependency("textClip",e).inheritPendingDependenciesAsFutureForcedDependencies());const n=this.current,r=n.font;if(r.isType3Font){this.showType3Text(e,t),(M=this.dependencyTracker)==null||M.recordShowTextOperation(e);return}const i=n.fontSize;if(i===0){(F=this.dependencyTracker)==null||F.recordOperation(e);return}const a=this.ctx,o=n.fontSizeScale,c=n.charSpacing,l=n.wordSpacing,u=n.fontDirection,d=n.textHScale*u,h=t.length,f=r.vertical,p=f?1:-1,y=r.defaultVMetrics,g=i*n.fontMatrix[0],b=n.textRenderingMode===Yn.FILL&&!r.disableFontFace&&!n.patternFill;a.save(),n.textMatrix&&a.transform(...n.textMatrix),a.translate(n.x,n.y+n.textRise),u>0?a.scale(d,-1):a.scale(d,1);let v,x;const w=n.textRenderingMode&Yn.FILL_STROKE_MASK,_=w===Yn.FILL||w===Yn.FILL_STROKE,T=w===Yn.STROKE||w===Yn.FILL_STROKE;if(_&&n.patternFill){a.save();const X=n.fillColor.getPattern(a,this,lo(a),Sr.FILL,e);v=Sn(a),a.restore(),a.fillStyle=X}if(T&&n.patternStroke){a.save();const X=n.strokeColor.getPattern(a,this,lo(a),Sr.STROKE,e);x=Sn(a),a.restore(),a.strokeStyle=X}let S=n.lineWidth;const C=n.textMatrixScale;if(C===0||S===0?T&&(S=this.getSinglePixelWidth()):S/=C,o!==1&&(a.scale(o,o),S/=o),a.lineWidth=S,r.isInvalidPDFjsFont){const X=[];let he=0;for(const ee of t)X.push(ee.unicode),he+=ee.width;const j=X.join("");if(a.fillText(j,0,0),this.dependencyTracker!==null){const ee=a.measureText(j);this.dependencyTracker.recordBBox(e,this.ctx,-ee.actualBoundingBoxLeft,ee.actualBoundingBoxRight,-ee.actualBoundingBoxAscent,ee.actualBoundingBoxDescent).recordShowTextOperation(e)}
45n.x+=he*g*d,a.restore(),this.compose();return}let D=0,N;for(N=0;N<h;++N){const X=t[N];if(typeof X=="number"){D+=p*X*i/1e3;continue}let he=!1;const j=(X.isSpace?l:0)+c,ee=X.fontChar,O=X.accent;let pe,q,B=X.width;if(f){const ge=X.vmetric||y,ie=-(X.vmetric?ge[1]:B*.5)*g,P=ge[2]*g;B=ge?-ge[0]:B,pe=ie/o,q=(D+P)/o}else pe=D/o,q=0;let re;if(r.remeasure&&B>0){re=a.measureText(ee);const ge=re.width*1e3/i*o;if(B<ge&&this.isFontSubpixelAAEnabled){const ie=B/ge;he=!0,a.save(),a.scale(ie,1),pe/=ie}else B!==ge&&(pe+=(B-ge)/2e3*i/o)}if(this.contentVisible&&(X.isInFont||r.missingFile)){if(b&&!O)a.fillText(ee,pe,q),(L=this.dependencyTracker)==null||L.recordCharacterBBox(e,a,re?{bbox:null}:r,i/o,pe,q,()=>re??a.measureText(ee));else if(this.paintChar(e,ee,pe,q,v,x),O){const ge=pe+i*O.offset.x/o,ie=q-i*O.offset.y/o;this.paintChar(e,O.fontChar,ge,ie,v,x)}}const le=f?B*g-j*u:B*g+j*u;D+=le,he&&a.restore()}f?n.y-=D:n.x+=D*d,a.restore(),this.compose(),(A=this.dependencyTracker)==null||A.recordShowTextOperation(e)}showType3Text(e,t){const n=this.ctx,r=this.current,i=r.font,a=r.fontSize,o=r.fontDirection,c=i.vertical?1:-1,l=r.charSpacing,u=r.wordSpacing,d=r.textHScale*o,h=r.fontMatrix||nT,f=t.length,p=r.textRenderingMode===Yn.INVISIBLE;let y,g,b,v;if(p||a===0)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,n.save(),r.textMatrix&&n.transform(...r.textMatrix),n.translate(r.x,r.y+r.textRise),n.scale(d,o);const x=this.dependencyTracker;for(this.dependencyTracker=x?new g1(x,e):null,y=0;y<f;++y){if(g=t[y],typeof g=="number"){v=c*g*a/1e3,this.ctx.translate(v,0),r.x+=v*d;continue}const w=(g.isSpace?u:0)+l,_=i.charProcOperatorList[g.operatorListId];_?this.contentVisible&&(this.save(),n.scale(a,a),n.transform(...h),this.executeOperatorList(_),this.restore()):_t(`Type3 character "${g.operatorListId}" is not available.`);const T=[g.width,0];Ge.applyTransform(T,h),b=T[0]*a+w,n.translate(b,0),r.x+=b*d}n.restore(),x&&(this.dependencyTracker=x)}setCharWidth(e,t,n){}setCharWidthAndBounds(e,t,n,r,i,a,o){var l;const c=new Path2D;c.rect(r,i,a-r,o-i),this.ctx.clip(c),(l=this.dependencyTracker)==null||l.recordBBox(e,this.ctx,r,a,i,o).recordClipBox(e,this.ctx,r,a,i,o),this.endPath(e)}getColorN_Pattern(e,t){let n;if(t[0]==="TilingPattern"){const r=this.baseTransform||Sn(this.ctx),i={createCanvasGraphics:(a,o)=>new tC(a,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new g1(this.dependencyTracker,o,!0):null)};n=new FT(t,this.ctx,i,r)}else n=this._getPattern(e,t[1],t[2]);return n}setStrokeColorN(e,...t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("strokeColor",e),this.current.strokeColor=this.getColorN_Pattern(e,t),this.current.patternStroke=!0}setFillColorN(e,...t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("fillColor",e),this.current.fillColor=this.getColorN_Pattern(e,t),this.current.patternFill=!0}setStrokeRGBColor(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("strokeColor",e),this.ctx.strokeStyle=this.current.strokeColor=t,this.current.patternStroke=!1}
45setStrokeTransparent(e){var t;(t=this.dependencyTracker)==null||t.recordSimpleData("strokeColor",e),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(e,t){var n;(n=this.dependencyTracker)==null||n.recordSimpleData("fillColor",e),this.ctx.fillStyle=this.current.fillColor=t,this.current.patternFill=!1}setFillTransparent(e){var t;(t=this.dependencyTracker)==null||t.recordSimpleData("fillColor",e),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e,t,n=null){let r;return this.cachedPatterns.has(t)?r=this.cachedPatterns.get(t):(r=dM(this.getObject(e,t)),this.cachedPatterns.set(t,r)),n&&(r.matrix=n),r}shadingFill(e,t){var a;if(!this.contentVisible)return;const n=this.ctx;this.save(e);const r=this._getPattern(e,t);n.fillStyle=r.getPattern(n,this,lo(n),Sr.SHADING,e);const i=lo(n);if(i){const{width:o,height:c}=n.canvas,l=Pd.slice();Ge.axialAlignedBoundingBox([0,0,o,c],i,l);const[u,d,h,f]=l;this.ctx.fillRect(u,d,h-u,f-d)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);(a=this.dependencyTracker)==null||a.resetBBox(e).recordFullPageBBox(e).recordDependencies(e,is.transform).recordDependencies(e,is.fill).recordOperation(e),this.compose(this.current.getClippedPathBoundingBox()),this.restore(e)}beginInlineImage(){zt("Should not call beginInlineImage")}beginImageData(){zt("Should not call beginImageData")}paintFormXObjectBegin(e,t,n){var r;if(this.contentVisible&&(this.save(e),this.baseTransformStack.push(this.baseTransform),t&&this.transform(e,...t),this.baseTransform=Sn(this.ctx),n)){Ge.axialAlignedBoundingBox(n,this.baseTransform,this.current.minMax);const[i,a,o,c]=n,l=new Path2D;l.rect(i,a,o-i,c-a),this.ctx.clip(l),(r=this.dependencyTracker)==null||r.recordClipBox(e,this.ctx,i,o,a,c),this.endPath(e)}}paintFormXObjectEnd(e){this.contentVisible&&(this.restore(e),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e,t){var f;if(!this.contentVisible)return;this.save(e),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const n=this.ctx;
45t.isolated||Tv("TODO: Support non-isolated groups."),t.knockout&&_t("Knockout groups not supported.");const r=Sn(n);t.matrix&&n.transform(...t.matrix);const i=[0,0,n.canvas.width,n.canvas.height];let a;t.bbox?(a=Pd.slice(),Ge.axialAlignedBoundingBox(t.bbox,Sn(n),a),a=Ge.intersect(a,i)||[0,0,0,0]):a=i;const o=Math.floor(a[0]),c=Math.floor(a[1]),l=Math.max(Math.ceil(a[2])-o,1),u=Math.max(Math.ceil(a[3])-c,1);this.current.startNewPathAndClipBox([0,0,l,u]),t.smask&&this.smaskCounter++;const d=this.canvasFactory.create(l,u);t.smask&&this.smaskGroupCanvases.push(d);const h=d.context;if(h.translate(-o,-c),h.transform(...r),t.bbox){let p=new Path2D;const[y,g,b,v]=t.bbox;if(p.rect(y,g,b-y,v-g),t.matrix){const x=new Path2D;x.addPath(p,new DOMMatrix(t.matrix)),p=x}h.clip(p)}t.smask&&this.smaskStack.push({canvas:d.canvas,context:h,offsetX:o,offsetY:c,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}),(!t.smask||this.dependencyTracker)&&(n.setTransform(1,0,0,1,0,0),n.translate(o,c),n.save()),eg(n,h),this.ctx=h,(f=this.dependencyTracker)==null||f.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(n),this.setGState(e,[["BM","source-over"],["ca",1],["CA",1],["TR",null]]),this.groupStack.push(n),this.groupLevel++}endGroup(e,t){var i;if(!this.contentVisible)return;this.groupLevel--;const n=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,(i=this.dependencyTracker)==null||i.popBaseTransform(),t.smask)this.tempSMask=this.smaskStack.pop(),this.restore(e),this.dependencyTracker&&this.ctx.restore();else{this.ctx.restore();const a=Sn(this.ctx);this.restore(e),this.ctx.save(),this.ctx.setTransform(...a);const o=Pd.slice();Ge.axialAlignedBoundingBox([0,0,n.canvas.width,n.canvas.height],a,o),this.ctx.drawImage(n.canvas,0,0),this.ctx.restore(),this.canvasFactory.destroy({canvas:n.canvas,context:n}),this.compose(o)}}beginAnnotation(e,t,n,r,i,a){if(oe(this,io,UT).call(this),kb(this.ctx),this.ctx.save(),this.save(e),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),n){const o=n[2]-n[0],c=n[3]-n[1];if(a&&this.annotationCanvasMap){r=r.slice(),r[4]-=n[0],r[5]-=n[1],n=n.slice(),n[0]=n[1]=0,n[2]=o,n[3]=c,Ge.singularValueDecompose2dScale(Sn(this.ctx),Vi);const{viewportScale:l}=this,u=Math.ceil(o*this.outputScaleX*l),d=Math.ceil(c*this.outputScaleY*l);this.annotationCanvas=this.canvasFactory.create(u,d);const{canvas:h,context:f}=this.annotationCanvas;this.annotationCanvasMap.set(t,h),this.annotationCanvas.savedCtx=this.ctx,this.ctx=f,this.ctx.save(),this.ctx.setTransform(Vi[0],0,0,-Vi[1],0,c*Vi[1]),kb(this.ctx)}else{kb(this.ctx),this.endPath(e);const l=new Path2D;l.rect(n[0],n[1],o,c),this.ctx.clip(l)}}this.current=new aA(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(e,...r),this.transform(e,...i)}endAnnotation(e){this.annotationCanvas&&(this.ctx.restore(),oe(this,io,RT).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e,t){var o;if(!this.contentVisible)return;const n=t.count;t=this.getObject(e,t.data,t),t.count=n;const r=this.ctx,i=this._createMaskCanvas(e,t),a=i.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(a,i.offsetX,i.offsetY),(o=this.dependencyTracker)==null||o.resetBBox(e).recordBBox(e,this.ctx,i.offsetX,i.offsetX+a.width,i.offsetY,i.offsetY+a.height).recordOperation(e),r.restore(),i.canvasEntry&&this.canvasFactory.destroy(i.canvasEntry),this.compose()}paintImageMaskXObjectRepeat(e,t,n,r=0,i=0,a,o){var d,h,f;if(!this.contentVisible)return;t=this.getObject(e,t.data,t);const c=this.ctx;c.save();const l=Sn(c);c.transform(n,r,i,a,0,0);const u=this._createMaskCanvas(e,t);c.setTransform(1,0,0,1,u.offsetX-l[4],u.offsetY-l[5]),(d=this.dependencyTracker)==null||d.resetBBox(e);for(let p=0,y=o.length;p<y;p+=2){const g=Ge.transform(l,[n,r,i,a,o[p],o[p+1]]);c.drawImage(u.canvas,g[4],g[5]),(h=this.dependencyTracker)==null||h.recordBBox(e,this.ctx,g[4],g[4]+u.canvas.width,g[5],g[5]+u.canvas.height)}
45c.restore(),u.canvasEntry&&this.canvasFactory.destroy(u.canvasEntry),this.compose(),(f=this.dependencyTracker)==null||f.recordOperation(e)}paintImageMaskXObjectGroup(e,t){var a,o,c;if(!this.contentVisible)return;const n=this.ctx,r=this.current.fillColor,i=this.current.patternFill;(a=this.dependencyTracker)==null||a.resetBBox(e).recordDependencies(e,is.transformAndFill);for(const l of t){const{data:u,width:d,height:h,transform:f}=l,p=this.canvasFactory.create(d,h),y=p.context;y.save();const g=this.getObject(e,u,l);lA(y,g),y.globalCompositeOperation="source-in",y.fillStyle=i?r.getPattern(y,this,lo(n),Sr.FILL,e):r,y.fillRect(0,0,d,h),y.restore(),n.save(),n.transform(...f),n.scale(1,-1),Ab(n,p.canvas,0,0,d,h,0,-1,1,1),this.canvasFactory.destroy(p),(o=this.dependencyTracker)==null||o.recordBBox(e,n,0,d,0,h),n.restore()}this.compose(),(c=this.dependencyTracker)==null||c.recordOperation(e)}paintImageXObject(e,t){if(!this.contentVisible)return;const n=this.getObject(e,t);if(!n){_t("Dependent image isn't ready yet");return}this.paintInlineImageXObject(e,n)}paintImageXObjectRepeat(e,t,n,r,i){if(!this.contentVisible)return;const a=this.getObject(e,t);if(!a){_t("Dependent image isn't ready yet");return}const o=a.width,c=a.height,l=[];for(let u=0,d=i.length;u<d;u+=2)l.push({transform:[n,0,0,r,i[u],i[u+1]],x:0,y:0,w:o,h:c});this.paintInlineImageXObjectGroup(e,a,l)}applyTransferMapsToCanvas(e){return this.current.transferMaps!=="none"&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if(this.current.transferMaps==="none")return{img:e.bitmap,canvasEntry:null};const{bitmap:t,width:n,height:r}=e,i=this.canvasFactory.create(n,r),a=i.context;return a.filter=this.current.transferMaps,a.drawImage(t,0,0),a.filter="none",{img:i.canvas,canvasEntry:i}}paintInlineImageXObject(e,t){var u;if(!this.contentVisible)return;const n=t.width,r=t.height,i=this.ctx;this.save(e);const{filter:a}=i;a!=="none"&&a!==""&&(i.filter="none"),i.scale(1/n,-1/r);let o,c=null;if(t.bitmap){const d=this.applyTransferMapsToBitmap(t);o=d.img,c=d.canvasEntry}else if(typeof HTMLElement=="function"&&t instanceof HTMLElement||!t.data)o=t;else{const d=this.canvasFactory.create(n,r);cA(d.context,t),o=this.applyTransferMapsToCanvas(d.context),c=d}const l=this._scaleImage(o,lo(i));i.imageSmoothingEnabled=uA(Sn(i),t.interpolate),this.dependencyTracker&&(this.dependencyTracker.resetBBox(e).recordBBox(e,i,0,n,-r,0).recordDependencies(e,is.imageXObject).recordOperation(e),(u=this.imagesTracker)==null||u.record(i,n,r,this.dependencyTracker.clipBox)),Ab(i,l.img,0,0,l.paintWidth,l.paintHeight,0,-r,n,r),l.tmpCanvas&&this.canvasFactory.destroy(l.tmpCanvas),c&&this.canvasFactory.destroy(c),this.compose(),this.restore(e)}paintInlineImageXObjectGroup(e,t,n){var o,c,l;if(!this.contentVisible)return;const r=this.ctx;let i,a=null;if(t.bitmap)i=t.bitmap;else{const u=t.width,d=t.height,h=this.canvasFactory.create(u,d);cA(h.context,t),i=this.applyTransferMapsToCanvas(h.context),a=h}(o=this.dependencyTracker)==null||o.resetBBox(e);for(const u of n)r.save(),r.transform(...u.transform),r.scale(1,-1),Ab(r,i,u.x,u.y,u.w,u.h,0,-1,1,1),(c=this.dependencyTracker)==null||c.recordBBox(e,r,0,1,-1,0),r.restore();a&&this.canvasFactory.destroy(a),(l=this.dependencyTracker)==null||l.recordOperation(e),this.compose()}paintSolidColorImageMask(e){var t;this.contentVisible&&((t=this.dependencyTracker)==null||t.resetBBox(e).recordBBox(e,this.ctx,0,1,0,1).recordDependencies(e,is.fill).recordOperation(e),this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e,t){}markPointProps(e,t,n){}beginMarkedContent(e,t){var n;(n=this.dependencyTracker)==null||n.beginMarkedContent(e),this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t,n){var r;(r=this.dependencyTracker)==null||r.beginMarkedContent(e),t==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(n)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(e){var t;(t=this.dependencyTracker)==null||t.endMarkedContent(e),this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(e){}endCompat(e){}consumePath(e,t,n){var a,o;const r=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(n);const i=this.ctx;this.pendingClip?(r||(this.pendingClip===hA?i.clip(t,"evenodd"):i.clip(t)),this.pendingClip=null,(a=this.dependencyTracker)==null||a.bboxToClipBoxDropOperation(e).recordFutureForcedDependency("clipPath",e)):(o=this.dependencyTracker)==null||o.recordOperation(e),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=Sn(this.ctx);if(e[1]===0&&e[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),n=Math.hypot(e[0],e[2]),r=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(n,r)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:e}=this.current,{a:t,b:n,c:r,d:i}=this.ctx.getTransform();let a,o;if(n===0&&r===0){const c=Math.abs(t),l=Math.abs(i);if(c===l)if(e===0)a=o=1/c;else{const u=c*e;a=o=u<1?1/u:1}else if(e===0)a=1/c,o=1/l;else{const u=c*e,d=l*e;a=u<1?1/u:1,o=d<1?1/d:1}}else{const c=Math.abs(t*i-n*r),l=Math.hypot(t,n),u=Math.hypot(r,i);if(e===0)a=u/c,o=l/c;else{const d=e*c;a=u>d?u/d:1,o=l>d?l/d:1}}this._cachedScaleForStroking[0]=a,this._cachedScaleForStroking[1]=o}return this._cachedScaleForStroking}rescaleAndStroke(e,t){const{ctx:n,current:{lineWidth:r}}=this,[i,a]=this.getScaleForStroking();if(i===a){n.lineWidth=(r||1)*i,n.stroke(e);return}const o=n.getLineDash();t&&n.save(),n.scale(i,a),Aw.a=1/i,Aw.d=1/a;const c=new Path2D;if(c.addPath(e,Aw),o.length>0){const l=Math.max(i,a);
45n.setLineDash(o.map(u=>u/l)),n.lineDashOffset/=l}n.lineWidth=r||1,n.stroke(c),t&&n.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};io=new WeakSet,UT=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.canvasFactory.destroy(this.transparentCanvasEntry),this.transparentCanvas=null,this.transparentCanvasEntry=null)},RT=function(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e!=="none"){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}},IT=function(e,t,n){const r=new Path2D;return r.addPath(e,new DOMMatrix(n).invertSelf().multiplySelf(t)),r};let zd=tC;for(const s in Qg)zd.prototype[s]!==void 0&&(zd.prototype[Qg[s]]=zd.prototype[s]);var Xm,Vm;class Dv{constructor(e,t,n){J(this,Xm,null);J(this,Vm,null);be(this,"_fullReader",null);be(this,"_rangeReaders",new Set);be(this,"_source",null);this._source=e,z(this,Xm,t),z(this,Vm,n)}get _progressiveDataLength(){var e;return((e=this._fullReader)==null?void 0:e._loaded)??0}getFullReader(){return Dn(!this._fullReader,"BasePDFStream.getFullReader can only be called once."),this._fullReader=new(m(this,Xm))(this)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=new(m(this,Vm))(this,e,t);return this._rangeReaders.add(n),n}cancelAllRequests(e){var t;(t=this._fullReader)==null||t.cancel(e);for(const n of new Set(this._rangeReaders))n.cancel(e)}}Xm=new WeakMap,Vm=new WeakMap;class Cv{constructor(e){be(this,"onProgress",null);be(this,"_contentLength",0);be(this,"_filename",null);be(this,"_headersCapability",Promise.withResolvers());be(this,"_isRangeSupported",!1);be(this,"_isStreamingSupported",!1);be(this,"_loaded",0);be(this,"_stream",null);this._stream=e}_callOnProgress(){var e;(e=this.onProgress)==null||e.call(this,{loaded:this._loaded,total:this._contentLength})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){zt("Abstract method `read` called")}cancel(e){zt("Abstract method `cancel` called")}}class Av{constructor(e,t,n){be(this,"_stream",null);this._stream=e}async read(){zt("Abstract method `read` called")}cancel(e){zt("Abstract method `cancel` called")}}function vM(s){let e=!0,t=n("filename\\*","i").exec(s);if(t){t=t[1];let u=o(t);return u=unescape(u),u=c(u),u=l(u),i(u)}if(t=a(s),t){const u=l(t);return i(u)}if(t=n("filename","i").exec(s),t){t=t[1];let u=o(t);return u=l(u),i(u)}function n(u,d){return new RegExp("(?:^|;)\\s*"+u+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',d)}function r(u,d){if(u){if(!/^[\x00-\xFF]+$/.test(d))return d;try{const h=new TextDecoder(u,{fatal:!0}),f=Sv(d);d=h.decode(f),e=!1}catch{}}return d}function i(u){return e&&/[\x80-\xff]/.test(u)&&(u=r("utf-8",u),e&&(u=r("iso-8859-1",u))),u}function a(u){const d=[];let h;const f=n("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(h=f.exec(u))!==null;){let[,y,g,b]=h;if(y=parseInt(y,10),y in d){if(y===0)break;continue}d[y]=[g,b]}const p=[];for(let y=0;y<d.length&&y in d;++y){let[g,b]=d[y];b=o(b),g&&(b=unescape(b),y===0&&(b=c(b))),p.push(b)}return p.join("")}function o(u){if(u.startsWith('"')){const d=u.slice(1).split('\\"');for(let h=0;h<d.length;++h){const f=d[h].indexOf('"');f!==-1&&(d[h]=d[h].slice(0,f),d.length=h+1),d[h]=d[h].replaceAll(/\\(.)/g,"$1")}u=d.join('"')}return u}function c(u){const d=u.indexOf("'");if(d===-1)return u;const h=u.slice(0,d),p=u.slice(d+1).replace(/^[^']*'/,"");return r(h,p)}function l(u){return!u.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(u)?u:u.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(d,h,f,p){if(f==="q"||f==="Q")return p=p.replaceAll("_"," "),p=p.replaceAll(/=([0-9a-fA-F]{2})/g,function(y,g){return String.fromCharCode(parseInt(g,16))}),r(h,p);try{p=atob(p)}catch{}return r(h,p)})}return""}function IF(s,e){const t=new Headers;if(!s||!e||typeof e!="object")return t;for(const n in e){const r=e[n];r!==void 0&&t.append(n,r)}return t}function kv(s){var e;return((e=URL.parse(s))==null?void 0:e.origin)??null}function MF({responseHeaders:s,isHttp:e,rangeChunkSize:t,disableRange:n}){const r={contentLength:0,isRangeSupported:!1},i=parseInt(s.get("Content-Length"),10);return!Number.isInteger(i)||(r.contentLength=i,i<=2*t)||n||!e||s.get("Accept-Ranges")!=="bytes"||(s.get("Content-Encoding")||"identity")==="identity"&&(r.isRangeSupported=!0),r}function PF(s){const e=s.get("Content-Disposition");if(e){let t=vM(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if(RE(t))return t}return null}
45function Nv(s,e){return new h1(`Unexpected server response (${s}) while retrieving PDF "${e.href}".`,s,s===404||s===0&&e.protocol==="file:")}function OF(s,e){if(s!==e)throw new Error(`Expected range response-origin "${s}" to match "${e}".`)}function LF(s,e,t,n){return fetch(s,{method:"GET",headers:e,signal:n.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"})}function BF(s,e){if(s!==200&&s!==206)throw Nv(s,e)}function Fv(s){if(s instanceof Uint8Array)return s.buffer;if(s instanceof ArrayBuffer)return s;throw new Error(`getArrayBuffer - unexpected data: ${s}`)}class wM extends Dv{constructor(t){super(t,xM,_M);be(this,"_responseOrigin",null);const{httpHeaders:n,url:r}=t;Dn(/https?:/.test(r.protocol),"PDFFetchStream only supports http(s):// URLs."),this.headers=IF(!0,n)}}class xM extends Cv{constructor(t){super(t);be(this,"_abortController",new AbortController);be(this,"_reader",null);const{disableRange:n,disableStream:r,rangeChunkSize:i,url:a,withCredentials:o}=t._source;this._isStreamingSupported=!r;const c=new Headers(t.headers);LF(a,c,o,this._abortController).then(l=>{t._responseOrigin=kv(l.url),BF(l.status,a),this._reader=l.body.getReader();const u=l.headers,{contentLength:d,isRangeSupported:h}=MF({responseHeaders:u,isHttp:!0,rangeChunkSize:i,disableRange:n});this._contentLength=d,this._isRangeSupported=h,this._filename=PF(u),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Sl("Streaming is disabled.")),this._headersCapability.resolve()}).catch(this._headersCapability.reject)}async read(){await this._headersCapability.promise;const{value:t,done:n}=await this._reader.read();return n?{value:t,done:n}:(this._loaded+=t.byteLength,this._callOnProgress(),{value:Fv(t),done:!1})}cancel(t){var n;(n=this._reader)==null||n.cancel(t),this._abortController.abort()}}class _M extends Av{constructor(t,n,r){super(t,n,r);be(this,"_abortController",new AbortController);be(this,"_readCapability",Promise.withResolvers());be(this,"_reader",null);const{url:i,withCredentials:a}=t._source,o=new Headers(t.headers);o.append("Range",`bytes=${n}-${r-1}`),LF(i,o,a,this._abortController).then(c=>{const l=kv(c.url);OF(l,t._responseOrigin),BF(c.status,i),this._reader=c.body.getReader(),this._readCapability.resolve()}).catch(this._readCapability.reject)}async read(){await this._readCapability.promise;const{value:t,done:n}=await this._reader.read();return n?{value:t,done:n}:{value:Fv(t),done:!1}}cancel(t){var n;(n=this._reader)==null||n.cancel(t),this._abortController.abort()}}function dA(s){return s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength?s.buffer:new Uint8Array(s).buffer}function Uv(){for(const s of this._requests)s.resolve({value:void 0,done:!0});this._requests.length=0}var Gm,MT;class TM extends Dv{constructor(t){super(t,SM,EM);J(this,Gm);be(this,"_progressiveDone",!1);be(this,"_queuedChunks",[]);const{pdfDataRangeTransport:n}=t,{initialData:r,progressiveDone:i}=n;if((r==null?void 0:r.length)>0){const a=dA(r);this._queuedChunks.push(a)}this._progressiveDone=i,n.addRangeListener((a,o)=>{oe(this,Gm,MT).call(this,a,o)}),n.addProgressiveReadListener(a=>{oe(this,Gm,MT).call(this,void 0,a)}),n.addProgressiveDoneListener(()=>{var a;(a=this._fullReader)==null||a.progressiveDone(),this._progressiveDone=!0}),n.transportReady()}getFullReader(){const t=super.getFullReader();return this._queuedChunks=null,t}getRangeReader(t,n){const r=super.getRangeReader(t,n);return r&&(r.onDone=()=>this._rangeReaders.delete(r),this._source.pdfDataRangeTransport.requestDataRange(t,n)),r}cancelAllRequests(t){super.cancelAllRequests(t),this._source.pdfDataRangeTransport.abort()}}Gm=new WeakSet,MT=function(t,n){const r=dA(n);if(t===void 0)this._fullReader?this._fullReader._enqueue(r):this._queuedChunks.push(r);else{const i=this._rangeReaders.keys().find(a=>a._begin===t);Dn(i,"#onReceiveData - no `PDFDataTransportStreamRangeReader` instance found."),i._enqueue(r)}};var qm;class SM extends Cv{constructor(t){super(t);J(this,qm,Uv.bind(this));be(this,"_done",!1);be(this,"_queuedChunks",null);be(this,"_requests",[]);const{pdfDataRangeTransport:n,disableRange:r,disableStream:i}=t._source,{length:a,contentDispositionFilename:o}=n;this._queuedChunks=t._queuedChunks||[];for(const l of this._queuedChunks)this._loaded+=l.byteLength;this._done=t._progressiveDone,this._contentLength=a,this._isStreamingSupported=!i,this._isRangeSupported=!r,RE(o)&&(this._filename=o),this._headersCapability.resolve();const c=this._loaded;Promise.resolve().then(()=>{c>0&&this._loaded===c&&this._callOnProgress()})}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength,this._callOnProgress())}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,m(this,qm).call(this)}progressiveDone(){this._done||(this._done=!0),this._queuedChunks.length===0&&m(this,qm).call(this)}}qm=new WeakMap;var Ym;class EM extends Av{constructor(t,n,r){super(t,n,r);J(this,Ym,Uv.bind(this));be(this,"onDone",null);be(this,"_begin",-1);be(this,"_done",!1);be(this,"_queuedChunk",null);be(this,"_requests",[]);this._begin=n}_enqueue(t){var n;this._done||(this._requests.length===0?this._queuedChunk=t:(this._requests.shift().resolve({value:t,done:!1}),m(this,Ym).call(this)),this._done=!0,(n=this.onDone)==null||n.call(this))}async read(){if(this._queuedChunk){const n=this._queuedChunk;return this._queuedChunk=null,{value:n,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){var n;this._done=!0,m(this,Ym).call(this),(n=this.onDone)==null||n.call(this)}}Ym=new WeakMap;const kw=200,fA=206;
45function DM(s){return typeof s!="string"?s:Sv(s).buffer}var Fo,Wp,WF,jF;class CM extends Dv{constructor(t){super(t,AM,kM);J(this,Wp);J(this,Fo,new WeakMap);be(this,"_responseOrigin",null);const{httpHeaders:n,url:r}=t;this.url=r,this.isHttp=/https?:/.test(r.protocol),this.headers=IF(this.isHttp,n)}_request(t){const n=new XMLHttpRequest,r={validateStatus:null,onHeadersReceived:t.onHeadersReceived,onDone:t.onDone,onError:t.onError,onProgress:t.onProgress};m(this,Fo).set(n,r),n.open("GET",this.url),n.withCredentials=this._source.withCredentials;for(const[i,a]of this.headers)n.setRequestHeader(i,a);return this.isHttp&&"begin"in t&&"end"in t?(n.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),r.validateStatus=i=>i===fA||i===kw):r.validateStatus=i=>i===kw,n.responseType="arraybuffer",Dn(t.onError,"Expected `onError` callback to be provided."),n.onerror=()=>t.onError(n.status),n.onreadystatechange=oe(this,Wp,jF).bind(this,n),n.onprogress=oe(this,Wp,WF).bind(this,n),n.send(null),n}_abortRequest(t){m(this,Fo).has(t)&&(m(this,Fo).delete(t),t.abort())}getRangeReader(t,n){const r=super.getRangeReader(t,n);return r&&(r.onClosed=()=>this._rangeReaders.delete(r)),r}}Fo=new WeakMap,Wp=new WeakSet,WF=function(t,n){var i;const r=m(this,Fo).get(t);(i=r==null?void 0:r.onProgress)==null||i.call(r,n)},jF=function(t,n){const r=m(this,Fo).get(t);if(!r||(t.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),t.readyState!==4)||!m(this,Fo).has(t))return;if(m(this,Fo).delete(t),t.status===0&&this.isHttp){r.onError(t.status);return}const i=t.status||kw;if(!r.validateStatus(i)){r.onError(t.status);return}const a=DM(t.response);if(i===fA){const o=t.getResponseHeader("Content-Range");/bytes (\d+)-(\d+)\/(\d+)/.test(o)?r.onDone(a):(_t('Missing or invalid "Content-Range" header.'),r.onError(0))}else a?r.onDone(a):r.onError(t.status)};var Zm,ea,zF,HF,$F,KF;class AM extends Cv{constructor(t){super(t);J(this,ea);J(this,Zm,Uv.bind(this));be(this,"_cachedChunks",[]);be(this,"_done",!1);be(this,"_requests",[]);be(this,"_storedError",null);this._fullRequestXhr=t._request({onHeadersReceived:oe(this,ea,zF).bind(this),onDone:oe(this,ea,HF).bind(this),onError:oe(this,ea,$F).bind(this),onProgress:oe(this,ea,KF).bind(this)})}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersCapability.reject(t),m(this,Zm).call(this),this._stream._abortRequest(this._fullRequestXhr),this._fullRequestXhr=null}}Zm=new WeakMap,ea=new WeakSet,zF=function(){const t=this._stream,{disableRange:n,rangeChunkSize:r}=t._source,i=this._fullRequestXhr;t._responseOrigin=kv(i.responseURL);const a=i.getAllResponseHeaders(),o=new Headers(a?a.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(u=>{const[d,...h]=u.split(": ");return[d,h.join(": ")]}):[]),{contentLength:c,isRangeSupported:l}=MF({responseHeaders:o,isHttp:t.isHttp,rangeChunkSize:r,disableRange:n});this._contentLength=c,this._isRangeSupported=l,this._filename=PF(o),this._isRangeSupported&&t._abortRequest(i),this._headersCapability.resolve()},HF=function(t){this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._cachedChunks.push(t),this._done=!0,this._cachedChunks.length===0&&m(this,Zm).call(this)},$F=function(t){this._storedError=Nv(t,this._stream.url),this._headersCapability.reject(this._storedError);for(const n of this._requests)n.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0},KF=function(t){var n;(n=this.onProgress)==null||n.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})};var Jm,fc,XF,VF,PT;class kM extends Av{constructor(t,n,r){super(t,n,r);J(this,fc);J(this,Jm,Uv.bind(this));be(this,"onClosed",null);be(this,"_done",!1);be(this,"_queuedChunk",null);be(this,"_requests",[]);be(this,"_storedError",null);this._requestXhr=t._request({begin:n,end:r,onHeadersReceived:oe(this,fc,XF).bind(this),onDone:oe(this,fc,VF).bind(this),onError:oe(this,fc,PT).bind(this),onProgress:null})}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const n=this._queuedChunk;return this._queuedChunk=null,{value:n,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){var n;
45this._done=!0,m(this,Jm).call(this),this._stream._abortRequest(this._requestXhr),(n=this.onClosed)==null||n.call(this)}}Jm=new WeakMap,fc=new WeakSet,XF=function(){var n;const t=kv((n=this._requestXhr)==null?void 0:n.responseURL);try{OF(t,this._stream._responseOrigin)}catch(r){this._storedError=r,oe(this,fc,PT).call(this,0)}},VF=function(t){var n;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,m(this,Jm).call(this),(n=this.onClosed)==null||n.call(this)},PT=function(t){this._storedError??(this._storedError=Nv(t,this._stream.url));for(const n of this._requests)n.reject(this._storedError);this._requests.length=0,this._queuedChunk=null};function GF(s){const{Readable:e}=process.getBuiltinModule("stream");return typeof e.toWeb=="function"?e.toWeb(s):process.getBuiltinModule("module").createRequire(import.meta.url)("node-readable-to-web-readable-stream").makeDefaultReadableStreamFromNodeReadable(s)}class NM extends Dv{constructor(e){super(e,FM,UM);const{url:t}=e;Dn(t.protocol==="file:","PDFNodeStream only supports file:// URLs.")}}class FM extends Cv{constructor(t){super(t);be(this,"_reader",null);const{disableRange:n,disableStream:r,rangeChunkSize:i,url:a}=t._source;this._isStreamingSupported=!r;const o=process.getBuiltinModule("fs");o.promises.lstat(a).then(c=>{const l=o.createReadStream(a),u=GF(l);this._reader=u.getReader();const{size:d}=c;this._contentLength=d,this._isRangeSupported=!n&&d>2*i,!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Sl("Streaming is disabled.")),this._headersCapability.resolve()}).catch(c=>{c.code==="ENOENT"&&(c=Nv(0,a)),this._headersCapability.reject(c)})}async read(){await this._headersCapability.promise;const{value:t,done:n}=await this._reader.read();return n?{value:t,done:n}:(this._loaded+=t.byteLength,this._callOnProgress(),{value:Fv(t),done:!1})}cancel(t){var n;(n=this._reader)==null||n.cancel(t)}}class UM extends Av{constructor(t,n,r){super(t,n,r);be(this,"_readCapability",Promise.withResolvers());be(this,"_reader",null);const{url:i}=t._source,a=process.getBuiltinModule("fs");try{const o=a.createReadStream(i,{start:n,end:r-1}),c=GF(o);this._reader=c.getReader(),this._readCapability.resolve()}catch(o){this._readCapability.reject(o)}}async read(){await this._readCapability.promise;const{value:t,done:n}=await this._reader.read();return n?{value:t,done:n}:{value:Fv(t),done:!1}}cancel(t){var n;(n=this._reader)==null||n.cancel(t)}}function RM(s){return zg(s)?wM:Xi?NM:CM}var Qm,ey;class Ko{static get workerPort(){return m(this,Qm)}static set workerPort(e){if(!(typeof Worker<"u"&&e instanceof Worker)&&e!==null)throw new Error("Invalid `workerPort` type.");z(this,Qm,e)}static get workerSrc(){return m(this,ey)}static set workerSrc(e){if(typeof e!="string")throw new Error("Invalid `workerSrc` type.");z(this,ey,e)}}Qm=new WeakMap,ey=new WeakMap,J(Ko,Qm,null),J(Ko,ey,"");var Rf,ty;class IM{constructor({parsedData:e,rawData:t}){J(this,Rf);J(this,ty);z(this,Rf,e),z(this,ty,t)}getRaw(){return m(this,ty)}get(e){return m(this,Rf).get(e)??null}[Symbol.iterator](){return m(this,Rf).entries()}}Rf=new WeakMap,ty=new WeakMap;const Sd=Symbol("INTERNAL");var ny,ry,iy,If;class MM{constructor(e,{name:t,intent:n,usage:r,rbGroups:i}){J(this,ny,!1);J(this,ry,!1);J(this,iy,!1);J(this,If,!0);z(this,ny,!!(e&Ki.DISPLAY)),z(this,ry,!!(e&Ki.PRINT)),this.name=t,this.intent=n,this.usage=r,this.rbGroups=i}get visible(){if(m(this,iy))return m(this,If);if(!m(this,If))return!1;const{print:e,view:t}=this.usage;return m(this,ny)?(t==null?void 0:t.viewState)!=="OFF":m(this,ry)?(e==null?void 0:e.printState)!=="OFF":!0}_setVisible(e,t,n=!1){e!==Sd&&zt("Internal method `_setVisible` called."),z(this,iy,n),z(this,If,t)}}ny=new WeakMap,ry=new WeakMap,iy=new WeakMap,If=new WeakMap;var Vc,rn,Mf,Pf,sy,OT;class PM{constructor(e,t=Ki.DISPLAY){J(this,sy);J(this,Vc,null);J(this,rn,new Map);J(this,Mf,null);J(this,Pf,null);if(this.renderingIntent=t,this.name=null,this.creator=null,e!==null){this.name=e.name,this.creator=e.creator,z(this,Pf,e.order);for(const n of e.groups)m(this,rn).set(n.id,new MM(t,n));if(e.baseState==="OFF")for(const n of m(this,rn).values())n._setVisible(Sd,!1);for(const n of e.on)m(this,rn).get(n)._setVisible(Sd,!0);for(const n of e.off)m(this,rn).get(n)._setVisible(Sd,!1);z(this,Mf,this.getHash())}}isVisible(e){if(m(this,rn).size===0)return!0;
45if(!e)return Tv("Optional content group not defined."),!0;if(e.type==="OCG")return m(this,rn).has(e.id)?m(this,rn).get(e.id).visible:(_t(`Optional content group not found: ${e.id}`),!0);if(e.type==="OCMD"){if(e.expression)return oe(this,sy,OT).call(this,e.expression);if(!e.policy||e.policy==="AnyOn"){for(const t of e.ids){if(!m(this,rn).has(t))return _t(`Optional content group not found: ${t}`),!0;if(m(this,rn).get(t).visible)return!0}return!1}else if(e.policy==="AllOn"){for(const t of e.ids){if(!m(this,rn).has(t))return _t(`Optional content group not found: ${t}`),!0;if(!m(this,rn).get(t).visible)return!1}return!0}else if(e.policy==="AnyOff"){for(const t of e.ids){if(!m(this,rn).has(t))return _t(`Optional content group not found: ${t}`),!0;if(!m(this,rn).get(t).visible)return!0}return!1}else if(e.policy==="AllOff"){for(const t of e.ids){if(!m(this,rn).has(t))return _t(`Optional content group not found: ${t}`),!0;if(m(this,rn).get(t).visible)return!1}return!0}return _t(`Unknown optional content policy ${e.policy}.`),!0}return _t(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0,n=!0){var i;const r=m(this,rn).get(e);if(!r){_t(`Optional content group not found: ${e}`);return}if(n&&t&&r.rbGroups.length)for(const a of r.rbGroups)for(const o of a)o!==e&&((i=m(this,rn).get(o))==null||i._setVisible(Sd,!1,!0));r._setVisible(Sd,!!t,!0),z(this,Vc,null)}setOCGState({state:e,preserveRB:t}){let n;for(const r of e){switch(r){case"ON":case"OFF":case"Toggle":n=r;continue}const i=m(this,rn).get(r);if(i)switch(n){case"ON":this.setVisibility(r,!0,t);break;case"OFF":this.setVisibility(r,!1,t);break;case"Toggle":this.setVisibility(r,!i.visible,t);break}}z(this,Vc,null)}get hasInitialVisibility(){return m(this,Mf)===null||this.getHash()===m(this,Mf)}getOrder(){return m(this,rn).size?m(this,Pf)?m(this,Pf).slice():[...m(this,rn).keys()]:null}getGroup(e){return m(this,rn).get(e)||null}getHash(){if(m(this,Vc)!==null)return m(this,Vc);const e=new wF;for(const[t,n]of m(this,rn))e.update(`${t}:${n.visible}`);return z(this,Vc,e.hexdigest())}[Symbol.iterator](){return m(this,rn).entries()}}Vc=new WeakMap,rn=new WeakMap,Mf=new WeakMap,Pf=new WeakMap,sy=new WeakSet,OT=function(e){const t=e.length;if(t<2)return!0;const n=e[0];for(let r=1;r<t;r++){const i=e[r];let a;if(Array.isArray(i))a=oe(this,sy,OT).call(this,i);else if(m(this,rn).has(i))a=m(this,rn).get(i).visible;else return _t(`Optional content group not found: ${i}`),!0;switch(n){case"And":if(!a)return!1;break;case"Or":if(a)return!0;break;case"Not":return!a;default:return!0}}return n==="And"};var On,Ws,wr,Ku,Uo,Wr,kg,Ng,N0;class OM{constructor(){J(this,Wr);J(this,On,null);J(this,Ws,null);J(this,wr,0);J(this,Ku,null);J(this,Uo,null)}get pagesNumber(){return m(this,wr)}set pagesNumber(e){m(this,wr)!==e&&(z(this,wr,e),z(this,On,null),z(this,Ws,null))}movePages(e,t,n){oe(this,Wr,kg).call(this);const r=m(this,On),i=oe(this,Wr,Ng).call(this),a=t.length,o=new Uint32Array(a);let c=0;for(let h=0;h<a;h++){const f=t[h]-1;o[h]=r[f],f<n&&c++}const l=m(this,wr),u=l-a,d=fr(n-c,0,u);for(let h=0,f=0;h<l;h++)e.has(h+1)||(r[f++]=r[h]);r.copyWithin(d+a,d,u),r.set(o,d),oe(this,Wr,N0).call(this,i),r.every((h,f)=>h===f+1)&&z(this,On,null)}deletePages(e){oe(this,Wr,kg).call(this);const t=m(this,On),n=oe(this,Wr,Ng).call(this);z(this,Uo,{pageNumberToId:t.slice(),pagesNumber:m(this,wr),prevPageNumbers:m(this,Ws).slice()});const r=m(this,wr)-e.length;z(this,wr,r);const i=z(this,On,new Uint32Array(r));z(this,Ws,new Int32Array(r));let a=0,o=0;for(const c of e){const l=c-1;l!==a&&(i.set(t.subarray(a,l),o),o+=l-a),a=l+1}a<t.length&&i.set(t.subarray(a),o),oe(this,Wr,N0).call(this,n,new Set(e))}cancelDelete(){m(this,Uo)&&(z(this,On,m(this,Uo).pageNumberToId),z(this,wr,m(this,Uo).pagesNumber),z(this,Ws,m(this,Uo).prevPageNumbers),z(this,Uo,null))}cleanSavedData(){z(this,Uo,null)}copyPages(e){oe(this,Wr,kg).call(this),z(this,Ku,{pageNumbers:e,pageIds:e.map(t=>m(this,On)[t-1])})}cancelCopy(){z(this,Ku,null)}pastePages(e){oe(this,Wr,kg).call(this);const t=m(this,On),n=oe(this,Wr,Ng).call(this),{pageNumbers:r,pageIds:i}=m(this,Ku),a=m(this,wr)+r.length;z(this,wr,a);const o=z(this,On,new Uint32Array(a));z(this,Ws,new Int32Array(a)),o.set(t.subarray(0,e),0),o.set(i,e),o.set(t.subarray(e),e+r.length),oe(this,Wr,N0).call(this,n,null,e,r),z(this,Ku,null)}hasBeenAltered(){return m(this,On)!==null}getPageMappingForSaving(e=null){e??(e=oe(this,Wr,Ng).call(this));let t=0;for(const r of e.values())t=Math.max(t,r.length);const n=new Array(t);for(let r=0;r<t;r++)n[r]={document:null,pageIndices:[],includePages:[]};for(const[r,i]of e)for(let a=0,o=i.length;a<o;a++)n[a].includePages.push([r-1,i[a]-1]);for(const{includePages:r,pageIndices:i}of n){r.sort((a,o)=>a[0]-o[0]);for(let a=0,o=r.length;a<o;a++)i.push(r[a][1]),r[a]=r[a][0]}return n}extractPages(e){e=Array.from(e).sort((n,r)=>n-r);const t=new Map;for(let n=0,r=e.length;n<r;n++){const i=this.getPageId(e[n]);t.getOrInsertComputed(i,kE).push(n+1)}return this.getPageMappingForSaving(t)}getPrevPageNumber(e){var t;return((t=m(this,Ws))==null?void 0:t[e-1])??0}getPageNumber(e){if(!m(this,On))return e;const t=m(this,On);for(let n=0,r=m(this,wr);n<r;n++)if(t[n]===e)return n+1;return 0}getPageId(e){var t;return((t=m(this,On))==null?void 0:t[e-1])??e}getMapping(){var e;return(e=m(this,On))==null?void 0:e.subarray(0,this.pagesNumber)}}On=new WeakMap,Ws=new WeakMap,wr=new WeakMap,Ku=new WeakMap,Uo=new WeakMap,Wr=new WeakSet,kg=function(){if(m(this,On))return;const e=m(this,wr),t=z(this,On,new Uint32Array(e));for(let n=0;n<e;n++)t[n]=n+1;z(this,Ws,new Int32Array(t))},Ng=function(){const e=new Map,t=m(this,On);for(let n=0,r=m(this,wr);n<r;n++){const i=t[n],a=e.get(i);a?a.push(n+1):e.set(i,[n+1])}return e},N0=function(e,t=null,n=-1,r=null){const i=m(this,Ws),a=m(this,On),o=n+((r==null?void 0:r.length)??0),c=new Map;for(let l=0,u=m(this,wr);l<u;l++){if(l>=n&&l<o){i[l]=-r[l-n];continue}const d=a[l],h=e.get(d);let f=c.get(d)||0;if(t&&h)for(;f<h.length&&t.has(h[f]);)f++;i[l]=h==null?void 0:h[f],c.set(d,f+1)}};const Ed=Symbol("INITIAL_DATA"),pA=()=>({...Promise.withResolvers(),data:Ed});var ps;class qF{constructor(){J(this,ps,new Map)}get(e,t=null){if(t){const r=m(this,ps).getOrInsertComputed(e,pA);return r.promise.then(()=>t(r.data)),null}const n=m(this,ps).get(e);if(!n||n.data===Ed)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return n.data}has(e){const t=m(this,ps).get(e);return!!t&&t.data!==Ed}delete(e){const t=m(this,ps).get(e);return!t||t.data===Ed?!1:(m(this,ps).delete(e),!0)}resolve(e,t=null){const n=m(this,ps).getOrInsertComputed(e,pA);if(n.data!==Ed)throw new Error(`Object already resolved ${e}.`);n.data=t,n.resolve()}clear(){var e;
45for(const{data:t}of m(this,ps).values())(e=t==null?void 0:t.bitmap)==null||e.close();m(this,ps).clear()}*[Symbol.iterator](){for(const[e,{data:t}]of m(this,ps))t!==Ed&&(yield[e,t])}}ps=new WeakMap;const LM=1e5,gA=30;var IN,Gc,Yr,oy,ay,Of,Xu,Ia,cy,ly,Vu,uy,Lf,qc,Bf,hy,Wf,Gu,dy,fy,jf,qu,py,zf,Hf,pc,YF,ZF,LT,Zi,F0,BT,JF,QF;const mr=class mr{constructor({textContentSource:e,images:t,container:n,viewport:r}){J(this,pc);J(this,Gc,Promise.withResolvers());J(this,Yr,null);J(this,oy,!1);J(this,ay,!!((IN=globalThis.FontInspector)!=null&&IN.enabled));J(this,Of,null);J(this,Xu,null);J(this,Ia,null);J(this,cy,0);J(this,ly,0);J(this,Vu,null);J(this,uy,null);J(this,Lf,0);J(this,qc,0);J(this,Bf,Object.create(null));J(this,hy,[]);J(this,Wf,null);J(this,Gu,[]);J(this,dy,new WeakMap);J(this,fy,null);var l;if(e instanceof ReadableStream)z(this,Wf,e);else if(typeof e=="object")z(this,Wf,new ReadableStream({start(u){u.enqueue(e),u.close()}}));else throw new Error('No "textContentSource" parameter specified.');z(this,Yr,z(this,uy,n)),z(this,Of,t),z(this,qc,r.scale*Zo.pixelRatio),z(this,Lf,r.rotation),z(this,Ia,{div:null,properties:null,ctx:null});const{pageWidth:i,pageHeight:a,pageX:o,pageY:c}=r.rawDims;z(this,fy,[1,0,0,-1,-o,c+a]),z(this,ly,i),z(this,cy,a),oe(l=mr,Zi,JF).call(l),n.style.setProperty("--min-font-size",m(mr,zf)),Ph(n,r),m(this,Gc).promise.finally(()=>{m(mr,Hf).delete(this),z(this,Ia,null),z(this,Bf,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:e,isFirefox:t}=rr.platform;return Tt(this,"fontFamilyMap",new Map([["sans-serif",`${e&&t?"Calibri, ":""}sans-serif`],["monospace",`${e&&t?"Lucida Console, ":""}monospace`]]))}render(){m(this,Of)&&m(this,Yr).append(m(this,Of).render());const e=()=>{m(this,Vu).read().then(({value:t,done:n})=>{if(n){m(this,Gc).resolve();return}m(this,Xu)??z(this,Xu,t.lang),Object.assign(m(this,Bf),t.styles),oe(this,pc,YF).call(this,t.items),e()},m(this,Gc).reject)};return z(this,Vu,m(this,Wf).getReader()),m(mr,Hf).add(this),e(),m(this,Gc).promise}update({viewport:e,onBefore:t=null}){var i;const n=e.scale*Zo.pixelRatio,r=e.rotation;if(r!==m(this,Lf)&&(t==null||t(),z(this,Lf,r),Ph(m(this,uy),{rotation:r})),n!==m(this,qc)){t==null||t(),z(this,qc,n);const a={div:null,properties:null,ctx:oe(i=mr,Zi,F0).call(i,m(this,Xu))};for(const o of m(this,Gu))a.properties=m(this,dy).get(o),a.div=o,oe(this,pc,LT).call(this,a)}}cancel(){var t;const e=new Sl("TextLayer task cancelled.");(t=m(this,Vu))==null||t.cancel(e).catch(()=>{}),z(this,Vu,null),m(this,Gc).reject(e)}get textDivs(){return m(this,Gu)}get textContentItemsStr(){return m(this,hy)}static cleanup(){if(!(m(this,Hf).size>0)){m(this,jf).clear();for(const{canvas:e}of m(this,qu).values())e.remove();m(this,qu).clear()}}};Gc=new WeakMap,Yr=new WeakMap,oy=new WeakMap,ay=new WeakMap,Of=new WeakMap,Xu=new WeakMap,Ia=new WeakMap,cy=new WeakMap,ly=new WeakMap,Vu=new WeakMap,uy=new WeakMap,Lf=new WeakMap,qc=new WeakMap,Bf=new WeakMap,hy=new WeakMap,Wf=new WeakMap,Gu=new WeakMap,dy=new WeakMap,fy=new WeakMap,jf=new WeakMap,qu=new WeakMap,py=new WeakMap,zf=new WeakMap,Hf=new WeakMap,pc=new WeakSet,YF=function(e){var r,i;if(m(this,oy))return;(i=m(this,Ia)).ctx??(i.ctx=oe(r=mr,Zi,F0).call(r,m(this,Xu)));const t=m(this,Gu),n=m(this,hy);for(const a of e){if(t.length>LM){_t("Ignoring additional textDivs for performance reasons."),z(this,oy,!0);return}if(a.str===void 0){if(a.type==="beginMarkedContentProps"||a.type==="beginMarkedContent"){const o=m(this,Yr);z(this,Yr,document.createElement("span")),m(this,Yr).classList.add("markedContent"),a.id&&m(this,Yr).setAttribute("id",`${a.id}`),a.tag==="Artifact"&&(m(this,Yr).ariaHidden=!0),o.append(m(this,Yr))}else a.type==="endMarkedContent"&&z(this,Yr,m(this,Yr).parentNode);continue}n.push(a.str),oe(this,pc,ZF).call(this,a)}},ZF=function(e){var p;const t=document.createElement("span"),n={angle:0,canvasWidth:0,hasText:e.str!=="",hasEOL:e.hasEOL,fontSize:0};m(this,Gu).push(t);const r=Ge.transform(m(this,fy),e.transform);let i=Math.atan2(r[1],r[0]);const a=m(this,Bf)[e.fontName];a.vertical&&(i+=Math.PI/2);let o=m(this,ay)&&a.fontSubstitution||a.fontFamily;o=mr.fontFamilyMap.get(o)||o;const c=Math.hypot(r[2],r[3]),l=c*oe(p=mr,Zi,QF).call(p,o,a,m(this,Xu));let u,d;i===0?(u=r[4],d=r[5]-l):(u=r[4]+l*Math.sin(i),d=r[5]-l*Math.cos(i));const h=t.style;h.left=`${(100*u/m(this,ly)).toFixed(2)}%`,h.top=`${(100*d/m(this,cy)).toFixed(2)}%`,h.setProperty("--font-height",`${c.toFixed(2)}px`),h.fontFamily=o,n.fontSize=c,t.setAttribute("role","presentation"),t.textContent=e.str,t.dir=e.dir,m(this,ay)&&(t.dataset.fontName=a.fontSubstitutionLoadedName||e.fontName),i!==0&&(n.angle=i*(180/Math.PI));let f=!1;if(e.str.length>1)f=!0;else if(e.str!==" "&&e.transform[0]!==e.transform[3]){const y=Math.abs(e.transform[0]),g=Math.abs(e.transform[3]);y!==g&&Math.max(y,g)/Math.min(y,g)>1.5&&(f=!0)}if(f&&(n.canvasWidth=a.vertical?e.height:e.width),m(this,dy).set(t,n),m(this,Ia).div=t,m(this,Ia).properties=n,oe(this,pc,LT).call(this,m(this,Ia)),n.hasText&&m(this,Yr).append(t),n.hasEOL){const y=document.createElement("br");y.setAttribute("role","presentation"),m(this,Yr).append(y)}},LT=function(e){var a;const{div:t,properties:n,ctx:r}=e,{style:i}=t;if(n.canvasWidth!==0&&n.hasText){const{fontFamily:o}=i,{canvasWidth:c,fontSize:l}=n;oe(a=mr,Zi,BT).call(a,r,l*m(this,qc),o);const{width:u}=r.measureText(t.textContent);u>0&&i.setProperty("--scale-x",c*m(this,qc)/u)}n.angle!==0&&i.setProperty("--rotate",`${n.angle}deg`)},Zi=new WeakSet,F0=function(e=null){let t=m(this,qu).get(e||(e=""));if(!t){const n=document.createElement("canvas");n.className="hiddenCanvasElement",n.lang=e,document.body.append(n),t=n.getContext("2d",{alpha:!1,willReadFrequently:!0}),m(this,qu).set(e,t),m(this,py).set(t,{size:0,family:""})}return t},BT=function(e,t,n){const r=m(this,py).get(e);t===r.size&&n===r.family||(e.font=`${t}px ${n}`,r.size=t,r.family=n)},JF=function(){if(m(this,zf)!==null)return;const e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),z(this,zf,e.getBoundingClientRect().height),e.remove()},QF=function(e,t,n){const r=m(this,jf).get(e);if(r)return r;const i=oe(this,Zi,F0).call(this,n);i.canvas.width=i.canvas.height=gA,oe(this,Zi,BT).call(this,i,gA,e);const a=i.measureText(""),o=a.fontBoundingBoxAscent,c=Math.abs(a.fontBoundingBoxDescent);i.canvas.width=i.canvas.height=0;let l=.8;return o?l=o/(o+c):(rr.platform.isFirefox&&_t("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),t.ascent?l=t.ascent:t.descent&&(l=1+t.descent)),m(this,jf).set(e,l),l},J(mr,Zi),J(mr,jf,new Map),J(mr,qu,new Map),J(mr,py,new WeakMap),J(mr,zf,null),J(mr,Hf,new Set);let nm=mr;const BM=100;function e3(s={}){typeof s=="string"||s instanceof URL?s={url:s}:(s instanceof ArrayBuffer||ArrayBuffer.isView(s))&&(s={data:s});const e=new WT,{docId:t}=e,n=s.url?X4(s.url):null,r=s.data?V4(s.data):null,i=s.httpHeaders||null,a=s.withCredentials===!0,o=s.password??null,c=s.range instanceof t3?s.range:null,l=Number.isInteger(s.rangeChunkSize)&&s.rangeChunkSize>0?s.rangeChunkSize:2**16;let u=s.worker instanceof rm?s.worker:null;const d=s.verbosity,h=typeof s.docBaseUrl=="string"&&!Ev(s.docBaseUrl)?s.docBaseUrl:null,f=Db(s.cMapUrl),p=s.cM
45apPacked!==!1,y=Db(s.iccUrl),g=Db(s.standardFontDataUrl),b=Db(s.wasmUrl),v=s.stopAtErrors!==!0,x=Number.isInteger(s.maxImageSize)&&s.maxImageSize>-1?s.maxImageSize:-1,w=s.isEvalSupported!==!1,_=typeof s.isOffscreenCanvasSupported=="boolean"?s.isOffscreenCanvasSupported:!Xi,T=typeof s.isImageDecoderSupported=="boolean"?s.isImageDecoderSupported:!Xi&&(rr.platform.isFirefox||!globalThis.chrome),S=Number.isInteger(s.canvasMaxAreaInBytes)?s.canvasMaxAreaInBytes:-1,C=typeof s.disableFontFace=="boolean"?s.disableFontFace:Xi,D=s.fontExtraProperties===!0,N=s.enableXfa===!0,M=s.ownerDocument||globalThis.document,F=s.disableRange===!0,L=s.disableStream===!0,A=s.disableAutoFetch===!0,X=s.pdfBug===!0,he=s.CanvasFactory||(Xi?tM:Z4),j=s.FilterFactory||(Xi?eM:J4),ee=s.BinaryDataFactory||(Xi?nM:nA),O=s.enableHWA===!0,pe=s.enableWebGPU===!0,q=s.useWasm!==!1,B=s.pagesMapper||new OM,re=typeof s.useSystemFonts=="boolean"?s.useSystemFonts:!Xi&&!C,le=typeof s.useWorkerFetch=="boolean"?s.useWorkerFetch:!!(ee===nA&&f&&p&&g&&b&&zg(f,document.baseURI)&&zg(g,document.baseURI)&&zg(b,document.baseURI)),ge=null;h4(d);const ie={canvasFactory:new he({ownerDocument:M,enableHWA:O}),filterFactory:new j({docId:t,ownerDocument:M}),binaryDataFactory:le?null:new ee({cMapUrl:f,standardFontDataUrl:g,wasmUrl:b})};u||(u=rm.create({verbosity:d,port:Ko.workerPort}),e._worker=u);const P={docId:t,apiVersion:"5.6.205",data:r,password:o,disableAutoFetch:A,rangeChunkSize:l,docBaseUrl:h,enableXfa:N,evaluatorOptions:{maxImageSize:x,disableFontFace:C,ignoreErrors:v,isEvalSupported:w,isOffscreenCanvasSupported:_,isImageDecoderSupported:T,canvasMaxAreaInBytes:S,fontExtraProperties:D,useSystemFonts:re,useWasm:q,useWorkerFetch:le,cMapUrl:f,cMapPacked:p,iccUrl:y,standardFontDataUrl:g,wasmUrl:b,enableWebGPU:pe}},W={ownerDocument:M,pdfBug:X,styleElement:ge,enableHWA:O,loadingParams:{disableAutoFetch:A,enableXfa:N}};return u.promise.then(function(){if(e.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const te=u.messageHandler.sendWithPromise("GetDocRequest",P,r?[r.buffer]:null);let Y;if(!r)if(c)Y=new TM({pdfDataRangeTransport:c,disableRange:F,disableStream:L});else if(n){const se=RM(n);Y=new se({url:n,httpHeaders:i,withCredentials:a,rangeChunkSize:l,disableRange:F,disableStream:L})}else throw new Error("getDocument - expected either `data`, `range`, or `url` parameter.");return te.then(se=>{if(e.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const ue=new Sg(t,se,u.port),we=new jM(ue,e,Y,W,ie,B);e._transport=we,ue.send("Ready",null)})}).catch(e._capability.reject),e}var lv;const uv=class uv{constructor(){be(this,"_capability",Promise.withResolvers());be(this,"_transport",null);be(this,"_worker",null);be(this,"docId",`d${zn(uv,lv)._++}`);be(this,"destroyed",!1);be(this,"onPassword",null);be(this,"onProgress",null)}get promise(){return this._capability.promise}async destroy(){var e,t,n,r;this.destroyed=!0;try{(e=this._worker)!=null&&e.port&&(this._worker._pendingDestroy=!0),await((t=this._transport)==null?void 0:t.destroy())}catch(i){throw(n=this._worker)!=null&&n.port&&delete this._worker._pendingDestroy,i}this._transport=null,(r=this._worker)==null||r.destroy(),this._worker=null}async getData(){return this._transport.getData()}};lv=new WeakMap,J(uv,lv,0);let WT=uv;var $f,gy,my,yy;class t3{constructor(e,t,n=!1,r=null){J(this,$f,Promise.withResolvers());J(this,gy,[]);J(this,my,[]);J(this,yy,[]);this.length=e,this.initialData=t,this.progressiveDone=n,this.contentDispositionFilename=r,Object.defineProperty(this,"onDataProgress",{value:()=>{S4("`PDFDataRangeTransport.prototype.onDataProgress` - method was removed, since loading progress is now reported automatically through the `PDFDataTransportStream` class (and related code).")}})}addRangeListener(e){m(this,yy).push(e)}addProgressiveReadListener(e){m(this,my).push(e)}addProgressiveDoneListener(e){m(this,gy).push(e)}onDataRange(e,t){for(const n of m(this,yy))n(e,t)}onDataProgressiveRead(e){m(this,$f).promise.then(()=>{for(const t of m(this,my))t(e)})}onDataProgressiveDone(){m(this,$f).promise.then(()=>{for(const e of m(this,gy))e()})}transportReady(){m(this,$f).resolve()}requestDataRange(e,t){zt("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}$f=new WeakMap,gy=new WeakMap,my=new WeakMap,yy=new WeakMap;class WM{constructor(e,t){this._pdfInfo=e,this._transport=t}get pagesMapper(){return this._transport.pagesMapper}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return Tt(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}
45getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getAnnotationsByType(e,t){return this._transport.getAnnotationsByType(e,t)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}extractPages(e){return this._transport.extractPages(e)}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getRawData(e){return this._transport.getRawData(e)}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var Ma,Yu,Zu,Fg;const nC=class nC{constructor(e,t,n,r,i=!1){J(this,Zu);J(this,Ma,!1);J(this,Yu,null);this._pageIndex=e,this._pageInfo=t,this._transport=n,this._stats=i?new KC:null,this._pdfBug=i,this.commonObjs=n.commonObjs,this.objs=new qF,this._intentStates=new Map,this.destroyed=!1,this.recordedBBoxes=null,z(this,Yu,r),this.imageCoordinates=null}clone(e){const t=new nC(e,this._pageInfo,this._transport,m(this,Yu),this._pdfBug);return t.clonedFromIndex=this.clonedFromIndex??this._pageIndex,this._transport.updatePage(t),t}get pageNumber(){return this._pageIndex+1}set pageNumber(e){this._pageIndex=e-1,this._transport.updatePage(this)}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:n=0,offsetY:r=0,dontFlip:i=!1}={}){return new rb({viewBox:this.view,userUnit:this.userUnit,scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:i})}getAnnotations({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return Tt(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var e;return((e=this._transport._htmlForXfa)==null?void 0:e.children[this._pageIndex])||null}render({canvasContext:e,canvas:t=e.canvas,viewport:n,intent:r="display",annotationMode:i=vc.ENABLE,transform:a=null,background:o=null,optionalContentConfigPromise:c=null,annotationCanvasMap:l=null,pageColors:u=null,printAnnotationStorage:d=null,isEditing:h=!1,recordImages:f=!1,recordOperations:p=!1,operationsFilter:y=null}){var L,A,X;(L=this._stats)==null||L.time("Overall");const g=this._transport.getRenderingIntent(r,i,d,h),{renderingIntent:b,cacheKey:v}=g;z(this,Ma,!1),c||(c=this._transport.getOptionalContentConfig(b));const x=this._intentStates.getOrInsertComputed(v,oT);x.streamReaderCancelTimeout&&(clearTimeout(x.streamReaderCancelTimeout),x.streamReaderCancelTimeout=null);const w=!!(b&Ki.PRINT);x.displayReadyCapability||(x.displayReadyCapability=Promise.withResolvers(),x.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(A=this._stats)==null||A.time("Page Request"),this._pumpOperatorList(g));const _=!!(this._pdfBug&&((X=globalThis.StepperManager)!=null&&X.enabled)),T=!!t&&!this.recordedBBoxes&&(p||_),S=!!t&&!this.imageCoordinates&&f,C=he=>{var j,ee,O,pe;if(x.renderTasks.delete(M),T){const q=(j=M.gfx)==null?void 0:j.dependencyTracker.take();q&&((ee=M.stepper)==null||ee.setOperatorBBoxes(q,M.gfx.dependencyTracker.takeDebugMetadata()),p&&(this.recordedBBoxes=q))}S&&!he&&(this.imageCoordinates=(O=M.gfx)==null?void 0:O.imagesTracker.take()),w&&z(this,Ma,!0),oe(this,Zu,Fg).call(this),he?(M.capability.reject(he),this._abortOperatorList({intentState:x,reason:he instanceof Error?he:new Error(he)})):M.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(pe=globalThis.Stats)!=null&&pe.enabled&&globalThis.Stats.add(this.pageNumber,this._stats)
45)};let D=null,N=null;(T||S)&&(N=new O4(t,x.operatorList.length)),T&&(D=new L4(N,_));const M=new zT({callback:C,params:{canvas:t,canvasContext:e,dependencyTracker:D??N,imagesTracker:S?new DT(t):null,viewport:n,transform:a,background:o},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:x.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!w,pdfBug:this._pdfBug,pageColors:u,enableHWA:this._transport.enableHWA,operationsFilter:y});(x.renderTasks||(x.renderTasks=new Set)).add(M);const F=M.task;return Promise.all([x.displayReadyCapability.promise,c]).then(([he,j])=>{var ee;if(this.destroyed){C();return}if((ee=this._stats)==null||ee.time("Rendering"),!(j.renderingIntent&b))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");M.initializeGraphics({transparency:he,optionalContentConfig:j}),M.operatorListChanged()}).catch(C),F}getOperatorList({intent:e="display",annotationMode:t=vc.ENABLE,printAnnotationStorage:n=null,isEditing:r=!1}={}){var l;function i(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(c))}const a=this._transport.getRenderingIntent(e,t,n,r,!0),o=this._intentStates.getOrInsertComputed(a.cacheKey,oT);let c;return o.opListReadCapability||(c=Object.create(null),c.operatorListChanged=i,o.opListReadCapability=Promise.withResolvers(),(o.renderTasks||(o.renderTasks=new Set)).add(c),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(l=this._stats)==null||l.time("Page Request"),this._pumpOperatorList(a)),o.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageId:m(this,Yu).getPageId(this._pageIndex+1)-1,pageIndex:this._pageIndex,includeMarkedContent:e===!0,disableNormalization:t===!0},{highWaterMark:100,size(r){return r.items.length}})}async getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(r=>em.textContent(r));const t=this.streamTextContent(e),n={items:[],styles:Object.create(null),lang:null};for await(const r of t)n.lang??(n.lang=r.lang),Object.assign(n.styles,r.styles),n.items.push(...r.items);return n}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const n of t.renderTasks)e.push(n.completed),n.cancel();return this.objs.clear(),z(this,Ma,!1),Promise.all(e)}cleanup(e=!1){z(this,Ma,!0);const t=oe(this,Zu,Fg).call(this);return e&&t&&this._stats&&(this._stats=new KC),t}_startRenderPage(e,t){var r,i;const n=this._intentStates.get(t);n&&((r=this._stats)==null||r.timeEnd("Page Request"),(i=n.displayReadyCapability)==null||i.resolve(e))}_renderPageChunk(e,t){for(let n=0,r=e.length;n<r;n++)t.operatorList.fnArray.push(e.fnArray[n]),t.operatorList.argsArray.push(e.argsArray[n]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const n of t.renderTasks)n.operatorListChanged();e.lastChunk&&oe(this,Zu,Fg).call(this)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:n,modifiedIds:r}){const{map:i,transfer:a}=n,c=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageId:m(this,Yu).getPageId(this._pageIndex+1)-1,pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:i,modifiedIds:r},void 0,a).getReader(),l=this._intentStates.get(t);l.streamReader=c;const u=()=>{c.read().then(({value:d,done:h})=>{if(h){l.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(d,l),u())},d=>{if(l.streamReader=null,!this._transport.destroyed){if(l.operatorList){l.operatorList.lastChunk=!0;for(const h of l.renderTasks)h.operatorListChanged();oe(this,Zu,Fg).call(this)}
45if(l.displayReadyCapability)l.displayReadyCapability.reject(d);else if(l.opListReadCapability)l.opListReadCapability.reject(d);else throw d}})};u()}_abortOperatorList({intentState:e,reason:t,force:n=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!n){if(e.renderTasks.size>0)return;if(t instanceof UE){let r=BM;t.extraDelay>0&&t.extraDelay<1e3&&(r+=t.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})},r);return}}if(e.streamReader.cancel(new Sl(t.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(const[r,i]of this._intentStates)if(i===e){this._intentStates.delete(r);break}this.cleanup()}}}get stats(){return this._stats}};Ma=new WeakMap,Yu=new WeakMap,Zu=new WeakSet,Fg=function(){if(!m(this,Ma)||this.destroyed)return!1;for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),z(this,Ma,!1),!0};let jT=nC;var Yc,js,Pa,Ju,hv,Qu,eh,ni,U0,n3,r3,Ug,Kf,R0;const kn=class kn{constructor({name:e=null,port:t=null,verbosity:n=d4()}={}){J(this,ni);J(this,Yc,Promise.withResolvers());J(this,js,null);J(this,Pa,null);J(this,Ju,null);if(this.name=e,this.destroyed=!1,this.verbosity=n,t){if(m(kn,eh).has(t))throw new Error("Cannot use more than one PDFWorker per port.");m(kn,eh).set(t,this),oe(this,ni,n3).call(this,t)}else oe(this,ni,r3).call(this)}get promise(){return m(this,Yc).promise}get port(){return m(this,Pa)}get messageHandler(){return m(this,js)}destroy(){var e,t;this.destroyed=!0,(e=m(this,Ju))==null||e.terminate(),z(this,Ju,null),m(kn,eh).delete(m(this,Pa)),z(this,Pa,null),(t=m(this,js))==null||t.destroy(),z(this,js,null)}static create(e){const t=m(this,eh).get(e==null?void 0:e.port);if(t){if(t._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new kn(e)}static get workerSrc(){if(Ko.workerSrc)return Ko.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return Tt(this,"_setupFakeWorkerGlobal",(async()=>m(this,Kf,R0)?m(this,Kf,R0):(await import(this.workerSrc)).WorkerMessageHandler)())}};Yc=new WeakMap,js=new WeakMap,Pa=new WeakMap,Ju=new WeakMap,hv=new WeakMap,Qu=new WeakMap,eh=new WeakMap,ni=new WeakSet,U0=function(){m(this,Yc).resolve(),m(this,js).send("configure",{verbosity:this.verbosity})},n3=function(e){z(this,Pa,e),z(this,js,new Sg("main","worker",e)),m(this,js).on("ready",()=>{}),oe(this,ni,U0).call(this)},r3=function(){if(m(kn,Qu)||m(kn,Kf,R0)){oe(this,ni,Ug).call(this);return}let{workerSrc:e}=kn;try{kn._isSameOrigin(window.location,e)||(e=kn._createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e,{type:"module"}),n=new Sg("main","worker",t),r=()=>{i.abort(),n.destroy(),t.terminate(),this.destroyed?m(this,Yc).reject(new Error("Worker was destroyed")):oe(this,ni,Ug).call(this)},i=new AbortController;t.addEventListener("error",()=>{m(this,Ju)||r()},{signal:i.signal}),n.on("test",o=>{if(i.abort(),this.destroyed||!o){r();return}z(this,js,n),z(this,Pa,t),z(this,Ju,t),oe(this,ni,U0).call(this)}),n.on("ready",o=>{if(i.abort(),this.destroyed){r();return}try{a()}catch{oe(this,ni,Ug).call(this)}});const a=()=>{const o=new Uint8Array;n.send("test",o,[o.buffer])};a();return}catch{Tv("The worker has been disabled.")}oe(this,ni,Ug).call(this)},Ug=function(){m(kn,Qu)||(_t("Setting up fake worker."),z(kn,Qu,!0)),kn._setupFakeWorkerGlobal.then(e=>{if(this.destroyed){m(this,Yc).reject(new Error("Worker was destroyed"));return}const t=new Y4;z(this,Pa,t);const n=`fake${zn(kn,hv)._++}`,r=new Sg(n+"_worker",n,t);e.setup(r,t),z(this,js,new Sg(n,n+"_worker",t)),oe(this,ni,U0).call(this)}).catch(e=>{m(this,Yc).reject(new Error(`Setting up fake worker failed: "${e.message}".`))})},Kf=new WeakSet,R0=function(){var e;try{return((e=globalThis.pdfjsWorker)==null?void 0:e.WorkerMessageHandler)||null}catch{return null}},J(kn,Kf),J(kn,hv,0),J(kn,Qu,!1),J(kn,eh,new WeakMap),Xi&&(z(kn,Qu,!0),Ko.workerSrc||
45(Ko.workerSrc="./pdf.worker.mjs")),kn._isSameOrigin=(e,t)=>{const n=URL.parse(e);if(!(n!=null&&n.origin)||n.origin==="null")return!1;const r=new URL(t,n);return n.origin===r.origin},kn._createCDNWrapper=e=>{const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};let rm=kn;var Fi,th,Oa,zs,nh,Xf,La,Js,Rg,I0;class jM{constructor(e,t,n,r,i,a){J(this,Js);be(this,"downloadInfoCapability",Promise.withResolvers());J(this,Fi,null);J(this,th,new Map);J(this,Oa,null);J(this,zs,new Map);J(this,nh,new Map);J(this,Xf,new Map);J(this,La,null);this.messageHandler=e,this.loadingTask=t,z(this,Oa,n),this.commonObjs=new qF,this.fontLoader=new B4({ownerDocument:r.ownerDocument,styleElement:r.styleElement}),this.enableHWA=r.enableHWA,this.loadingParams=r.loadingParams,this._params=r,this.canvasFactory=i.canvasFactory,this.filterFactory=i.filterFactory,this.binaryDataFactory=i.binaryDataFactory,this.pagesMapper=a,this.destroyed=!1,this.destroyCapability=null,this.setupMessageHandler()}updatePage(e){const{_pageIndex:t}=e;m(this,zs).set(t,e),m(this,nh).set(t,Promise.resolve(e))}get annotationStorage(){return Tt(this,"annotationStorage",new IE)}getRenderingIntent(e,t=vc.ENABLE,n=null,r=!1,i=!1){let a=Ki.DISPLAY,o=tm;switch(e){case"any":a=Ki.ANY;break;case"display":break;case"print":a=Ki.PRINT;break;default:_t(`getRenderingIntent - invalid intent: ${e}`)}const c=a&Ki.PRINT&&n instanceof _F?n:this.annotationStorage;switch(t){case vc.DISABLE:a+=Ki.ANNOTATIONS_DISABLE;break;case vc.ENABLE:break;case vc.ENABLE_FORMS:a+=Ki.ANNOTATIONS_FORMS;break;case vc.ENABLE_STORAGE:a+=Ki.ANNOTATIONS_STORAGE,o=c.serializable;break;default:_t(`getRenderingIntent - invalid annotationMode: ${t}`)}r&&(a+=Ki.IS_EDITING),i&&(a+=Ki.OPLIST);const{ids:l,hash:u}=c.modifiedIds,d=[a,o.hash,u];return{renderingIntent:a,cacheKey:d.join("_"),annotationStorageSerializable:o,modifiedIds:l}}destroy(){var n;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(n=m(this,La))==null||n.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const r of m(this,zs).values())e.push(r._destroy());m(this,zs).clear(),m(this,nh).clear(),m(this,Xf).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then(()=>{var r,i;this.commonObjs.clear(),this.fontLoader.clear(),m(this,th).clear(),this.filterFactory.destroy(),nm.cleanup(),(r=m(this,Oa))==null||r.cancelAllRequests(new Sl("Worker was terminated.")),(i=this.messageHandler)==null||i.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(n,r)=>{Dn(m(this,Oa),"GetReader - no `BasePDFStream` instance available."),z(this,Fi,m(this,Oa).getFullReader()),m(this,Fi).onProgress=i=>oe(this,Js,I0).call(this,i),r.onPull=()=>{m(this,Fi).read().then(function({value:i,done:a}){if(a){r.close();return}Dn(i instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(i),1,[i])}).catch(i=>{r.error(i)})},r.onCancel=i=>{m(this,Fi).cancel(i),r.ready.catch(a=>{if(!this.destroyed)throw a})}}),e.on("ReaderHeadersReady",async n=>{await m(this,Fi).headersReady;const{isStreamingSupported:r,isRangeSupported:i,contentLength:a}=m(this,Fi);return r&&i&&(m(this,Fi).onProgress=null),{isStreamingSupported:r,isRangeSupported:i,contentLength:a}}),e.on("GetRangeReader",(n,r)=>{Dn(m(this,Oa),"GetRangeReader - no `BasePDFStream` instance available.");const i=m(this,Oa).getRangeReader(n.begin,n.end);if(!i){r.close();return}r.onPull=()=>{i.read().then(function({value:a,done:o}){if(o){r.close();return}Dn(a instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(a),1,[a])}).catch(a=>{r.error(a)})},r.onCancel=a=>{i.cancel(a),r.ready.catch(o=>{if(!this.destroyed)throw o})}}),e.on("GetDoc",({pdfInfo:n})=>{this.pagesMapper.pagesNumber=n.numPages,this._numPages=n.numPages,this._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,t._capability.resolve(new WM(n,this))}),e.on("DocException",n=>{t._capability.reject(hi(n))}),e.on("PasswordRequest",n=>{z(this,La,Promise.withResolvers());try{if(!t.onPassword)throw hi(n);const r=i=>{i instanceof Error?m(this,La).reject(i):m(this,La).resolve({password:i})};t.onPassword(r,n.code)}catch(r){m(this,La).reject(r)}return m(this,La).promise}),e.on("DataLoaded",n=>{oe(this,Js,I0).call(this,{loaded:n.length,total:n.length}),this.downloadInfoCapability.resolve(n)}),e.on("StartRenderPage",n=>{if(this.destroyed)return;m(this,zs).get(n.pageIndex)._startRenderPage(n.transparency,n.cacheKey)}),e.on("commonobj",([n,r,i])=>{var a;if(this.destroyed||this.commonObjs.has(n))return null;switch(r){case"Font":if("error"in i){const h=i.error;_t(`Error during font loading: ${h}`),this.commonObjs.resolve(n,h);break}const o=new H4(i),c=this._params.pdfBug&&((a=globalThis.FontInspector)!=null&&a.enabled)?(h,f)=>globalThis.FontInspector.fontAdded(h,f):null,l=new W4(o,c,i.charProcOperatorList,i.extra);this.fontLoader.bind(l).catch(()=>
45e.sendWithPromise("FontFallback",{id:n})).finally(()=>{l.fontExtraProperties||l.clearData(),this.commonObjs.resolve(n,l)});break;case"CopyLocalImage":const{imageRef:u}=i;Dn(u,"The imageRef must be defined.");for(const h of m(this,zs).values())for(const[,f]of h.objs)if((f==null?void 0:f.ref)===u)return f.dataLen?(this.commonObjs.resolve(n,structuredClone(f)),f.dataLen):null;break;case"FontPath":this.commonObjs.resolve(n,new K4(i));break;case"Image":this.commonObjs.resolve(n,i);break;case"Pattern":const d=new $4(i);this.commonObjs.resolve(n,d.getIR());break;default:throw new Error(`Got unknown common object type ${r}`)}return null}),e.on("obj",([n,r,i,a])=>{var c;if(this.destroyed)return;const o=m(this,zs).get(r);if(!o.objs.has(n)){if(o._intentStates.size===0){(c=a==null?void 0:a.bitmap)==null||c.close();return}switch(i){case"Image":case"Pattern":o.objs.resolve(n,a);break;default:throw new Error(`Got unknown object type ${i}`)}}}),e.on("DocProgress",n=>{this.destroyed||oe(this,Js,I0).call(this,n)}),e.on("PrepareWebGPU",()=>{this.destroyed||sM()}),e.on("FetchBinaryData",async n=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.binaryDataFactory)throw new Error("`BinaryDataFactory` not initialized, see the `useWorkerFetch` parameter.");return this.binaryDataFactory.fetch(n)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var n;this.annotationStorage.size<=0&&_t("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:((n=m(this,Fi))==null?void 0:n.filename)??null},t).finally(()=>{this.annotationStorage.resetModified()})}extractPages(e){const t={pageInfos:e};let n;if(this.annotationStorage.size>0){const{map:r,transfer:i}=this.annotationStorage.serializable;t.annotationStorage=r,n=i}return this.messageHandler.sendWithPromise("ExtractPages",t,n).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this.pagesMapper.pagesNumber)return Promise.reject(new Error("Invalid page request."));const t=e-1,n=this.pagesMapper.getPageId(e)-1,r=m(this,nh).get(t);if(r)return r;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:n}).then(a=>{if(this.destroyed)throw new Error("Transport destroyed");a.refStr&&m(this,Xf).set(a.refStr,n);const o=new jT(t,a,this,this.pagesMapper,this._params.pdfBug);return m(this,zs).set(t,o),o});return m(this,nh).set(t,i),i}async getPageIndex(e){if(!AT(e))throw new Error("Invalid pageIndex request.");const t=await this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}),n=this.pagesMapper.getPageNumber(t+1);if(n===0)throw new Error("GetPageIndex: page has been removed.");return n-1}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:this.pagesMapper.getPageId(e+1)-1,intent:t})}getFieldObjects(){return oe(this,Js,Rg).call(this,"GetFieldObjects")}hasJSActions(){return oe(this,Js,Rg).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return typeof e!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getAnnotationsByType(e,t){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:e,pageIndexesToSkip:t})}getDocJSActions(){return oe(this,Js,Rg).call(this,"GetDocJSActions")}
45getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:this.pagesMapper.getPageId(e+1)-1})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:this.pagesMapper.getPageId(e+1)-1})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return oe(this,Js,Rg).call(this,"GetOptionalContentConfig").then(t=>new PM(t,e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata";return m(this,th).getOrInsertComputed(e,()=>this.messageHandler.sendWithPromise(e,null).then(t=>{var n,r;return{info:t[0],metadata:t[1]?new IM(t[1]):null,contentDispositionFilename:((n=m(this,Fi))==null?void 0:n.filename)??null,contentLength:((r=m(this,Fi))==null?void 0:r.contentLength)??null,hasStructTree:t[2]}}))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}getRawData(e){return this.messageHandler.sendWithPromise("GetRawData",e)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of m(this,zs).values())if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),m(this,th).clear(),this.filterFactory.destroy(!0),nm.cleanup()}}cachedPageNumber(e){if(!AT(e))return null;const t=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`,n=m(this,Xf).get(t);if(n>=0){const r=this.pagesMapper.getPageNumber(n+1);if(r!==0)return r}return null}}Fi=new WeakMap,th=new WeakMap,Oa=new WeakMap,zs=new WeakMap,nh=new WeakMap,Xf=new WeakMap,La=new WeakMap,Js=new WeakSet,Rg=function(e,t=null){return m(this,th).getOrInsertComputed(e,()=>this.messageHandler.sendWithPromise(e,t))},I0=function({loaded:e,total:t}){var n,r;(r=(n=this.loadingTask).onProgress)==null||r.call(n,{loaded:e,total:t,percent:t?fr(Math.round(e/t*100),0,100):NaN})};class zM{constructor(e){be(this,"_internalRenderTask",null);be(this,"onContinue",null);be(this,"onError",null);this._internalRenderTask=e}get promise(){return this._internalRenderTask.capability.promise}cancel(e=0){this._internalRenderTask.cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=this._internalRenderTask.operatorList;if(!e)return!1;const{annotationCanvasMap:t}=this._internalRenderTask;return e.form||e.canvas&&(t==null?void 0:t.size)>0}get imageCoordinates(){return this._internalRenderTask.imageCoordinates||null}}var Zc,rh;const su=class su{constructor({callback:e,params:t,objs:n,commonObjs:r,annotationCanvasMap:i,operatorList:a,pageIndex:o,canvasFactory:c,filterFactory:l,useRequestAnimationFrame:u=!1,pdfBug:d=!1,pageColors:h=null,enableHWA:f=!1,operationsFilter:p=null}){J(this,Zc,null);this.callback=e,this.params=t,this.objs=n,this.commonObjs=r,this.annotationCanvasMap=i,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=o,this.canvasFactory=c,this.filterFactory=l,this._pdfBug=d,this.pageColors=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=u===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new zM(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvas,this._canvasContext=t.canvas?null:t.canvasContext,this._enableHWA=f,this._dependencyTracker=t.dependencyTracker,this._imagesTracker=t.imagesTracker,this._operationsFilter=p}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){var l,u;if(this.cancelled)return;if(this._canvas){if(m(su,rh).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");m(su,rh).add(this._canvas)}this._pdfBug&&((l=globalThis.StepperManager)!=null&&l.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport:n,transform:r,background:i,dependencyTracker:a,imagesTracker:o}=this.params,c=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new zd(c,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors,a,o),this.gfx.beginDrawing({transform:r,viewport:n,transparency:e,background:i}
45),this.operatorListIdx=0,this.graphicsReady=!0,(u=this.graphicsReadyCallback)==null||u.call(this)}cancel(e=null,t=0){var n,r,i;this.running=!1,this.cancelled=!0,(n=this.gfx)==null||n.endDrawing(),m(this,Zc)&&(window.cancelAnimationFrame(m(this,Zc)),z(this,Zc,null)),m(su,rh).delete(this._canvas),e||(e=new UE(`Rendering cancelled, page ${this._pageIndex+1}`,t)),this.callback(e),(i=(r=this.task).onError)==null||i.call(r,e)}operatorListChanged(){var e,t;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(e=this.gfx.dependencyTracker)==null||e.growOperationsCount(this.operatorList.fnArray.length),(t=this.stepper)==null||t.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?z(this,Zc,window.requestAnimationFrame(()=>{z(this,Zc,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper,this._operationsFilter),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),m(su,rh).delete(this._canvas),this.callback())))}};Zc=new WeakMap,rh=new WeakMap,J(su,rh,new WeakSet);let zT=su;const HM="5.6.205",$M="ada343803";var Ui,ih,Vf,Jn,by,Gf,Ba,vy,Jc,Hs,Tr,wy,on,HT,$T,KT,Jl,s3,bc;let i3=(Tr=class{constructor({editor:e=null,uiManager:t=null}){J(this,on);J(this,Ui,null);J(this,ih,null);J(this,Vf);J(this,Jn,null);J(this,by,!1);J(this,Gf,!1);J(this,Ba,null);J(this,vy);J(this,Jc,null);J(this,Hs,null);var n,r;e?(z(this,Gf,!1),z(this,Ba,e)):z(this,Gf,!0),z(this,Hs,(e==null?void 0:e._uiManager)||t),z(this,vy,m(this,Hs)._eventBus),z(this,Vf,((n=e==null?void 0:e.color)==null?void 0:n.toUpperCase())||((r=m(this,Hs))==null?void 0:r.highlightColors.values().next().value)||"#FFFF98"),m(Tr,wy)||z(Tr,wy,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return Tt(this,"_keyboardManager",new sb([[["Escape","mac+Escape"],Tr.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],Tr.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],Tr.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],Tr.prototype._moveToPrevious],[["Home","mac+Home"],Tr.prototype._moveToBeginning],[["End","mac+End"],Tr.prototype._moveToEnd]]))}renderButton(){const e=z(this,Ui,document.createElement("button"));e.className="colorPicker",e.tabIndex="0",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),e.ariaHasPopup="true",m(this,Ba)&&(e.ariaControls=`${m(this,Ba).id}_colorpicker_dropdown`);const t=m(this,Hs)._signal;e.addEventListener("click",oe(this,on,Jl).bind(this),{signal:t}),e.addEventListener("keydown",oe(this,on,KT).bind(this),{signal:t});const n=z(this,ih,document.createElement("span"));return n.className="swatch",n.ariaHidden="true",n.style.backgroundColor=m(this,Vf),e.append(n),e}renderMainDropdown(){const e=z(this,Jn,oe(this,on,HT).call(this));return e.ariaOrientation="horizontal",e.ariaLabelledBy="highlightColorPickerLabel",e}_colorSelectFromKeyboard(e){if(e.target===m(this,Ui)){oe(this,on,Jl).call(this,e);return}const t=e.target.getAttribute("data-color");t&&oe(this,on,$T).call(this,t,e)}_moveToNext(e){var t,n;if(!m(this,on,bc)){oe(this,on,Jl).call(this,e);return}if(e.target===m(this,Ui)){(t=m(this,Jn).firstElementChild)==null||t.focus();return}(n=e.target.nextSibling)==null||n.focus()}_moveToPrevious(e){var t,n;if(e.target===((t=m(this,Jn))==null?void 0:t.firstElementChild)||e.target===m(this,Ui)){m(this,on,bc)&&this._hideDropdownFromKeyboard();return}m(this,on,bc)||oe(this,on,Jl).call(this,e),(n=e.target.previousSibling)==null||n.focus()}_moveToBeginning(e){var t;if(!m(this,on,bc)){oe(this,on,Jl).call(this,e);return}(t=m(this,Jn).firstElementChild)==null||t.focus()}_moveToEnd(e){var t;if(!m(this,on,bc)){oe(this,on,Jl).call(this,e);return}(t=m(this,Jn).lastElementChild)==null||t.focus()}hideDropdown(){var e,t;(e=m(this,Jn))==null||e.classList.add("hidden"),m(this,Ui).ariaExpanded="false",(t=m(this,Jc))==null||t.abort(),z(this,Jc,null)}_hideDropdownFromKeyboard(){var e;if(!m(this,Gf)){if(!m(this,on,bc)){(e=m(this,Ba))==null||e.unselect();return}this.hideDropdown(),m(this,Ui).focus({preventScroll:!0,focusVisible:m(this,by)})}}updateColor(e){if(m(this,ih)&&(m(this,ih).style.backgroundColor=e),!m(this,Jn))return;const t=m(this,Hs).highlightColors.values();for(const n of m(this,Jn).children)n.ariaSelected=t.next().value===e.toUpperCase()}destroy(){var e,t;(e=m(this,Ui))==null||e.remove(),z(this,Ui,null),z(this,ih,null),(t=m(this,Jn))==null||t.remove(),z(this,Jn,null)}},Ui=new WeakMap,ih=new WeakMap,Vf=new WeakMap,Jn=new WeakMap,by=new WeakMap,Gf=new WeakMap,Ba=new WeakMap,vy=new WeakMap,Jc=new WeakMap,Hs=new WeakMap,wy=new WeakMap,on=new WeakSet,HT=function(){const e=document.createElement("div"),t=m(this,Hs)._signal;e.addEventListener("contextmenu",Es,{signal:t}),e.className="dropdown",e.role="listbox",e.ariaMultiSelectable="false",e.ariaOrientation="vertical",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),m(this,Ba)&&(e.id=`${m(this,Ba).id}_colorpicker_dropdown`);for(const[n,r]of m(this,Hs).highlightColors){const i=document.createElement("button");i.tabIndex="0",i.role="option",i.setAttribute("data-color",r),i.title=n,i.setAttribute("data-l10n-id",m(Tr,wy)[n]);const a=document.createElement("span");i.append(a),a.className="swatch",a.style.backgroundColor=r,i.ariaSelected=r===m(this,Vf),i.addEventListener("click",oe(this,on,$T).bind(this,r),{signal:t}),e.append(i)}return e.addEventListener("keydown",oe(this,on,KT).bind(this),{signal:t}),e},$T=function(e,t){t.stopPropagation(),m(this,vy).dispatch("switchannotationeditorparams",{source:this,type:Rt.HIGHLIGHT_COLOR,value:e}),this.updateColor(e)},KT=function(e){Tr._keyboardManager.exec(this,e)},Jl=function(e){if(m(this,on,bc)){this.hideDropdown();return}if(z(this,by,e.detail===0),m(this,Jc)||(z(this,Jc,new AbortController),window.addEventListener("pointerdown",oe(this,on,s3).bind(this),{signal:m(this,Hs).combinedSignal(m(this,Jc))})),m(this,Ui).ariaExpanded="true",m(this,Jn)){m(this,Jn).classList.remove("hidden");return}const t=z(this,Jn,oe(this,on,HT).call(this));m(this,Ui).append(t)},s3=function(e){var t;(t=m(this,Jn))!=null&&t.contains(e.target)||this.hideDropdown()},bc=function(){return m(this,Jn)&&!m(this,Jn).classList.contains("hidden")},J(Tr,wy,null),Tr);var Ro,xy,qf,_y;const ou=class ou{constructor(e){J(this,Ro,null);J(this,xy,null);J(this,qf,null);z(this,xy,e),z(this,qf,e._uiManager),m(ou,_y)||z(ou,_y,Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"}))}renderButton(){if(m(this,Ro))return m(this,Ro);const{editorType:e,colorType:t,color:n}=m(this,xy),r=z(this,Ro,document.createElement("input"));return r.type="color",r.value=n||"#000000",r.className="basicColorPicker",r.tabIndex=0,r.setAttribute("data-l10n-id",m(ou,_y)[e]),r.addEventListener("input",()=>{m(this,qf).updateParams(t,r.value)},{signal:m(this,qf)._signal}),r}update(e){m(this,Ro)&&(m(this,Ro).value=e)}destroy(){var e;(e=m(this,Ro))==null||e.remove(),z(this,Ro,null)}hideDropdown(){}};Ro=new WeakMap,xy=new WeakMap,qf=new WeakMap,_y=new WeakMap,J(ou,_y,null);let m1=ou;function mA(s){return Math.floor(Math.max(0,Math.min(1,s))*255).toString(16).padStart(2,"0")}function tg(s){return Math.max(0,Math.min(255,255*s))}class yA{static CMYK_G([e,t,n,r]){return["G",1-Math.min(1,.3*e+.59*n+.11*t+r)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return e=tg(e),[e,e,e]}static G_HTML([e]){const t=mA(e);return`#${t}${t}${t}`}static RGB_G([e,t,n]){return["G",.3*e+.59*t+.11*n]}static RGB_rgb(e){return e.map(tg)}static RGB_HTML(e){return`#${e.map(mA).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,n,r]){return["RGB",1-Math.min(1,e+r),1-Math.min(1,n+r),1-Math.min(1,t+r)]}static CMYK_rgb([e,t,n,r]){return[tg(1-Math.min(1,e+r)),tg(1-Math.min(1,n+r)),tg(1-Math.min(1,t+r))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,n]){const r=1-e,i=1-t,a=1-n,o=Math.min(r,i,a);return["CMYK",r,i,a,o]}}class KM{create(e,t,n=!1){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),n||(r.setAttribute("width",`${e}px`),r.setAttribute("height",`${t}px`)),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox",`0 0 ${e} ${t}`),r}createElement(e){if(typeof e!="string")throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){zt("Abstract method `_createSVG` called.")}}class y1 extends KM{_createSVG(e){return document.createElementNS(ha,e)}}const XM=9,Lh=new WeakSet,VM=new Date().getTimezoneOffset()*60*1e3;class Nw{static create(e){switch(e.data.annotationType){case Kn.LINK:return new OE(e);case Kn.TEXT:return new qM(e);case Kn.WIDGET:switch(e.data.fieldType){case"Tx":return new YM(e);case"Btn":return e.data.radioButton?new c3(e):e.data.checkBox?new JM(e):new QM(e);case"Ch":return new eP(e);case"Sig":return new ZM(e)}return new ed(e);case Kn.POPUP:return new VT(e);case Kn.FREETEXT:return new f3(e);case Kn.LINE:return new nP(e);case Kn.SQUARE:return new rP(e);case Kn.CIRCLE:return new iP(e);case Kn.POLYLINE:return new p3(e);case Kn.CARET:return new oP(e);case Kn.INK:return new LE(e);case Kn.POLYGON:return new sP(e);case Kn.HIGHLIGHT:return new g3(e);case Kn.UNDERLINE:return new aP(e);case Kn.SQUIGGLY:return new cP(e);case Kn.STRIKEOUT:return new lP(e);case Kn.STAMP:return new m3(e);case Kn.FILEATTACHMENT:return new uP(e);default:return new Cn(e)}}}var sh,Yf,gs,Ty,XT;const rC=class rC{constructor(e,{isRenderable:t=!1,ignoreBorder:n=!1,createQuadrilaterals:r=!1}={}){J(this,Ty);J(this,sh,null);J(this,Yf,!1);J(this,gs,null);this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableComment=e.enableComment,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,this.hasOwnCommentButton=!1,t&&(this.contentElement=this.container=this._createContainer(n)),r&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:e,richText:t}){return!!(e!=null&&e.str||t!=null&&t.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return rC._hasPopupData(this.data)||this.enableComment&&!!this.commentText}get commentData(){var n;const{data:e}=this,t=(n=this.annotationStorage)==null?void 0:n.getEditor(e.id);return t?t.getData():e}get hasCommentButton(){return this.enableComment&&this.hasPopupElement}
45get commentButtonPosition(){var o;const e=(o=this.annotationStorage)==null?void 0:o.getEditor(this.data.id);if(e)return e.commentButtonPositionInPage;const{quadPoints:t,inkLists:n,rect:r}=this.data;let i=-1/0,a=-1/0;if((t==null?void 0:t.length)>=8){for(let c=0;c<t.length;c+=8)t[c+1]>a?(a=t[c+1],i=t[c+2]):t[c+1]===a&&(i=Math.max(i,t[c+2]));return[i,a]}if((n==null?void 0:n.length)>=1){for(const c of n)for(let l=0,u=c.length;l<u;l+=2)c[l+1]>a?(a=c[l+1],i=c[l]):c[l+1]===a&&(i=Math.max(i,c[l]));if(i!==1/0)return[i,a]}return r?[r[2],r[3]]:null}_normalizePoint(e){const{page:{view:t},viewport:{rawDims:{pageWidth:n,pageHeight:r,pageX:i,pageY:a}}}=this.parent;return e[1]=t[3]-e[1]+t[1],e[0]=100*(e[0]-i)/n,e[1]=100*(e[1]-a)/r,e}get commentText(){var t,n,r;const{data:e}=this;return((n=(t=this.annotationStorage.getRawValue(`${Jg}${e.id}`))==null?void 0:t.popup)==null?void 0:n.contents)||((r=e.contentsObj)==null?void 0:r.str)||""}set commentText(e){const{data:t}=this,n={deleted:!e,contents:e||""};this.annotationStorage.updateEditor(t.id,{popup:n})||this.annotationStorage.setValue(`${Jg}${t.id}`,{id:t.id,annotationType:t.annotationType,page:this.parent.page,popup:n,popupRef:t.popupRef,modificationDate:new Date}),e||this.removePopup()}removePopup(){var e,t;(t=((e=m(this,gs))==null?void 0:e.popup)||this.popup)==null||t.remove(),z(this,gs,this.popup=null)}updateEdited(e){var i;if(!this.container)return;e.rect&&(m(this,sh)||z(this,sh,{rect:this.data.rect.slice(0)}));const{rect:t,popup:n}=e;t&&oe(this,Ty,XT).call(this,t);let r=((i=m(this,gs))==null?void 0:i.popup)||this.popup;!r&&(n!=null&&n.text)&&(this._createPopup(n),r=m(this,gs).popup),r&&(r.updateEdited(e),n!=null&&n.deleted&&(r.remove(),z(this,gs,null),this.popup=null))}resetEdited(){var e;m(this,sh)&&(oe(this,Ty,XT).call(this,m(this,sh).rect),(e=m(this,gs))==null||e.popup.resetEdited(),z(this,sh,null))}_createContainer(e){const{data:t,parent:{page:n,viewport:r}}=this,i=document.createElement("section");i.setAttribute("data-annotation-id",t.id),!(this instanceof ed)&&!(this instanceof OE)&&(i.tabIndex=0);const{style:a}=i;if(a.zIndex=this.parent.zIndex,this.parent.zIndex+=2,t.alternativeText&&(i.title=t.alternativeText),t.noRotate&&i.classList.add("norotate"),!t.rect||this instanceof VT){const{rotation:y}=t;return!t.hasOwnCanvas&&y!==0&&this.setRotation(y,i),i}const{width:o,height:c}=this;if(!e&&t.borderStyle.width>0){a.borderWidth=`${t.borderStyle.width}px`;const y=t.borderStyle.horizontalCornerRadius,g=t.borderStyle.verticalCornerRadius;if(y>0||g>0){const v=`calc(${y}px * var(--total-scale-factor)) / calc(${g}px * var(--total-scale-factor))`;a.borderRadius=v}else if(this instanceof c3){const v=`calc(${o}px * var(--total-scale-factor)) / calc(${c}px * var(--total-scale-factor))`;a.borderRadius=v}switch(t.borderStyle.style){case vd.SOLID:a.borderStyle="solid";break;case vd.DASHED:a.borderStyle="dashed";break;case vd.BEVELED:_t("Unimplemented border style: beveled");break;case vd.INSET:_t("Unimplemented border style: inset");break;case vd.UNDERLINE:a.borderBottomStyle="solid";break}const b=t.borderColor||null;b?(z(this,Yf,!0),a.borderColor=Ge.makeHexColor(b[0]|0,b[1]|0,b[2]|0)):a.borderWidth=0}const l=Ge.normalizeRect([t.rect[0],n.view[3]-t.rect[1]+n.view[1],t.rect[2],n.view[3]-t.rect[3]+n.view[1]]),{pageWidth:u,pageHeight:d,pageX:h,pageY:f}=r.rawDims;a.left=`${100*(l[0]-h)/u}%`,a.top=`${100*(l[1]-f)/d}%`;const{rotation:p}=t;return t.hasOwnCanvas||p===0?(a.width=`${100*o/u}%`,a.height=`${100*c/d}%`):this.setRotation(p,i),i}setRotation(e,t=this.container){if(!this.data.rect)return;const{pageWidth:n,pageHeight:r}=this.parent.viewport.rawDims;let{width:i,height:a}=this;e%180!==0&&([i,a]=[a,i]),t.style.width=`${100*i/n}%`,t.style.height=`${100*a/r}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(t,n,r)=>{const i=r.detail[t],a=i[0],o=i.slice(1);r.target.style[n]=yA[`${a}_HTML`](o),this.annotationStorage.setValue(this.data.id,{[n]:yA[`${a}_rgb`](o)})};return Tt(this,"_commonActions",{display:t=>{const{display:n}=t.detail,r=n%2===1;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:r,noPrint:n===1||n===2})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:n}=t.detail;this.container.style.visibility=n?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:n,noView:n})},focus:t=>{setTimeout(()=>
45t.target.focus({preventScroll:!1}),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:t=>{const n=t.detail.rotation;this.setRotation(n),this.annotationStorage.setValue(this.data.id,{rotation:n})}})}_dispatchEventFromSandbox(e,t){const n=this._commonActions;for(const r of Object.keys(t.detail)){const i=e[r]||n[r];i==null||i(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const n=this._commonActions;for(const[r,i]of Object.entries(t)){const a=n[r];if(a){const o={detail:{[r]:i},target:e};a(o),delete t[r]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,n,r,i]=this.data.rect.map(y=>Math.fround(y));if(e.length===8){const[y,g,b,v]=e.subarray(2,6);if(r===y&&i===g&&t===b&&n===v)return}const{style:a}=this.container;let o;if(m(this,Yf)){const{borderColor:y,borderWidth:g}=a;a.borderWidth=0,o=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${y}" stroke-width="${g}">`],this.container.classList.add("hasBorder")}const c=r-t,l=i-n,{svgFactory:u}=this,d=u.createElement("svg");d.classList.add("quadrilateralsContainer"),d.setAttribute("width",0),d.setAttribute("height",0),d.role="none";const h=u.createElement("defs");d.append(h);const f=u.createElement("clipPath"),p=`clippath_${this.data.id}`;f.setAttribute("id",p),f.setAttribute("clipPathUnits","objectBoundingBox"),h.append(f);for(let y=2,g=e.length;y<g;y+=8){const b=e[y],v=e[y+1],x=e[y+2],w=e[y+3],_=u.createElement("rect"),T=(x-t)/c,S=(i-v)/l,C=(b-x)/c,D=(v-w)/l;_.setAttribute("x",T),_.setAttribute("y",S),_.setAttribute("width",C),_.setAttribute("height",D),f.append(_),o==null||o.push(`<rect vector-effect="non-scaling-stroke" x="${T}" y="${S}" width="${C}" height="${D}"/>`)}m(this,Yf)&&(o.push("</g></svg>')"),a.backgroundImage=o.join("")),this.container.append(d),this.container.style.clipPath=`url(#${p})`}_createPopup(e=null){const{data:t}=this;let n,r;e?(n={str:e.text},r=e.date):(n=t.contentsObj,r=t.modificationDate),z(this,gs,new VT({data:{color:t.color,titleObj:t.titleObj,modificationDate:r,contentsObj:n,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]}))}get hasPopupElement(){return!!(m(this,gs)||this.popup||this.data.popupRef)}get extraPopupElement(){return m(this,gs)}render(){zt("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const n=[];if(this._fieldObjects){const r=this._fieldObjects[e];if(r)for(const{page:i,id:a,exportValues:o}of r){if(i===-1||a===t)continue;const c=typeof o=="string"?o:null,l=document.querySelector(`[data-element-id="${a}"]`);if(l&&!Lh.has(l)){_t(`_getElementsByName - element not allowed: ${a}`);continue}n.push({id:a,exportValue:c,domElement:l})}return n}for(const r of document.getElementsByName(e)){const{exportValue:i}=r,a=r.getAttribute("data-element-id");a!==t&&Lh.has(r)&&n.push({id:a,exportValue:i,domElement:r})}return n}show(){var e;this.container&&(this.container.hidden=!1),(e=this.popup)==null||e.maybeShow()}hide(){var e;this.container&&(this.container.hidden=!0),(e=this.popup)==null||e.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",()=>{var n;(n=this.linkService.eventBus)==null||n.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}};sh=new WeakMap,Yf=new WeakMap,gs=new WeakMap,Ty=new WeakSet,XT=function(e){const{container:{style:t},data:{rect:n,rotation:r},parent:{viewport:{rawDims:{pageWidth:i,pageHeight:a,pageX:o,pageY:c}}}}=this;n==null||n.splice(0,4,...e),t.left=`${100*(e[0]-o)/i}%`,t.top=`${100*(a-e[3]+c)/a}%`,r===0?(t.width=`${100*(e[2]-e[0])/i}%`,t.height=`${100*(e[3]-e[1])/a}%`):this.setRotation(r)};let Cn=rC;class GM extends Cn{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.editor=e.editor}render(){return this.container.className="editorAnnotation",this.container}createOrUpdatePopup(){const{editor:e}=this;e.hasComment&&this._createPopup(e.comment)}get hasCommentButton(){return this.enableComment&&this.editor.hasComment}
45get commentButtonPosition(){return this.editor.commentButtonPositionInPage}get commentText(){return this.editor.comment.text}set commentText(e){this.editor.comment=e,e||this.removePopup()}get commentData(){return this.editor.getData()}remove(){this.parent.removeAnnotation(this.data.id),this.container.remove(),this.container=null,this.removePopup()}}var Gi,Ql,o3,a3;class OE extends Cn{constructor(t,n=null){super(t,{isRenderable:!0,ignoreBorder:!!(n!=null&&n.ignoreBorder),createQuadrilaterals:!0});J(this,Gi);this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:n}=this,r=document.createElement("a");r.setAttribute("data-element-id",t.id);let i=!1;return t.url?(n.addLinkAttributes(r,t.url,t.newWindow),i=!0):t.action?(this._bindNamedAction(r,t.action,t.overlaidText),i=!0):t.attachment?(oe(this,Gi,o3).call(this,r,t.attachment,t.overlaidText,t.attachmentDest),i=!0):t.setOCGState?(oe(this,Gi,a3).call(this,r,t.setOCGState,t.overlaidText),i=!0):t.dest?(this._bindLink(r,t.dest,t.overlaidText),i=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(r,t),i=!0),t.resetForm?(this._bindResetFormAction(r,t.resetForm),i=!0):this.isTooltipOnly&&!i&&(this._bindLink(r,""),i=!0)),this.container.classList.add("linkAnnotation"),i&&(this.contentElement=r,this.container.append(r)),this.container}_bindLink(t,n,r=""){t.href=this.linkService.getDestinationHash(n),t.onclick=()=>(n&&this.linkService.goToDestination(n),!1),(n||n==="")&&oe(this,Gi,Ql).call(this),r&&(t.title=r)}_bindNamedAction(t,n,r=""){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(n),!1),r&&(t.title=r),oe(this,Gi,Ql).call(this)}_bindJSAction(t,n){t.href=this.linkService.getAnchorUrl("");const r=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const i of Object.keys(n.actions)){const a=r.get(i);a&&(t[a]=()=>{var o;return(o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n.id,name:i}}),!1})}n.overlaidText&&(t.title=n.overlaidText),t.onclick||(t.onclick=()=>!1),oe(this,Gi,Ql).call(this)}_bindResetFormAction(t,n){const r=t.onclick;if(r||(t.href=this.linkService.getAnchorUrl("")),oe(this,Gi,Ql).call(this),!this._fieldObjects){_t('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),r||(t.onclick=()=>!1);return}t.onclick=()=>{var d;r==null||r();const{fields:i,refs:a,include:o}=n,c=[];if(i.length!==0||a.length!==0){const h=new Set(a);for(const f of i){const p=this._fieldObjects[f]||[];for(const{id:y}of p)h.add(y)}for(const f of Object.values(this._fieldObjects))for(const p of f)h.has(p.id)===o&&c.push(p)}else for(const h of Object.values(this._fieldObjects))c.push(...h);const l=this.annotationStorage,u=[];for(const h of c){const{id:f}=h;switch(u.push(f),h.type){case"text":{const y=h.defaultValue||"";l.setValue(f,{value:y});break}case"checkbox":case"radiobutton":{const y=h.defaultValue===h.exportValues;l.setValue(f,{value:y});break}case"combobox":case"listbox":{const y=h.defaultValue||"";l.setValue(f,{value:y});break}default:continue}const p=document.querySelector(`[data-element-id="${f}"]`);if(p){if(!Lh.has(p)){_t(`_bindResetFormAction - element not allowed: ${f}`);continue}}else continue;p.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((d=this.linkService.eventBus)==null||d.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:u,name:"ResetForm"}})),!1}}}Gi=new WeakSet,Ql=function(){this.container.setAttribute("data-internal-link","")},o3=function(t,n,r="",i=null){t.href=this.linkService.getAnchorUrl(""),n.description?t.title=n.description:r&&(t.title=r),t.onclick=()=>{var a;return(a=this.downloadManager)==null||a.openOrDownloadData(n.content,n.filename,i),!1},oe(this,Gi,Ql).call(this)},a3=function(t,n,r=""){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(n),!1),r&&(t.title=r),oe(this,Gi,Ql).call(this)};class qM extends Cn{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.append(e),this.container}}
45class ed extends Cn{render(){return this.container}showElementAndHideCanvas(e){var t;this.data.hasOwnCanvas&&(((t=e.previousSibling)==null?void 0:t.nodeName)==="CANVAS"&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return rr.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,n,r,i){n.includes("mouse")?e.addEventListener(n,a=>{var o;(o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:i(a),shift:a.shiftKey,modifier:this._getKeyModifier(a)}})}):e.addEventListener(n,a=>{var o;if(n==="blur"){if(!t.focused||!a.relatedTarget)return;t.focused=!1}else if(n==="focus"){if(t.focused)return;t.focused=!0}i&&((o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:i(a)}}))})}_setEventListeners(e,t,n,r){var i,a,o;for(const[c,l]of n)(l==="Action"||(i=this.data.actions)!=null&&i[l])&&((l==="Focus"||l==="Blur")&&(t||(t={focused:!1})),this._setEventListener(e,t,c,l,r),l==="Focus"&&!((a=this.data.actions)!=null&&a.Blur)?this._setEventListener(e,t,"blur","Blur",null):l==="Blur"&&!((o=this.data.actions)!=null&&o.Focus)&&this._setEventListener(e,t,"focus","Focus",null))}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=t===null?"transparent":Ge.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:n}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||XM,i=e.style;let a;const o=2,c=l=>Math.round(10*l)/10;if(this.data.multiLine){const l=Math.abs(this.data.rect[3]-this.data.rect[1]-o),u=Math.round(l/(Tw*r))||1,d=l/u;a=Math.min(r,c(d/Tw))}else{const l=Math.abs(this.data.rect[3]-this.data.rect[1]-o);a=Math.min(r,c(l/Tw))}i.fontSize=`calc(${a}px * var(--total-scale-factor))`,i.color=Ge.makeHexColor(n[0],n[1],n[2]),this.data.textAlignment!==null&&(i.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class YM extends ed{constructor(e){const t=e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue;super(e,{isRenderable:t})}setPropertyOnSiblings(e,t,n,r){const i=this.annotationStorage;
45for(const a of this._getElementsByName(e.name,e.id))a.domElement&&(a.domElement[t]=n),i.setValue(a.id,{[r]:n})}render(){var r,i;const e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let n=null;if(this.renderForms){const a=e.getValue(t,{value:this.data.fieldValue});let o=a.value||"";const c=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;c&&o.length>c&&(o=o.slice(0,c));let l=a.formattedValue||((r=this.data.textContent)==null?void 0:r.join(` 46`))||null;l&&this.data.comb&&(l=l.replaceAll(/\s+/g,""));const u={userValue:o,formattedValue:l,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(n=document.createElement("textarea"),n.textContent=l??o,this.data.doNotScroll&&(n.style.overflowY="hidden")):(n=document.createElement("input"),n.type=this.data.password?"password":"text",n.setAttribute("value",l??o),this.data.doNotScroll&&(n.style.overflowX="hidden")),this.data.hasOwnCanvas&&(n.hidden=!0),Lh.add(n),this.contentElement=n,n.setAttribute("data-element-id",t),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=0;const{datetimeFormat:d,datetimeType:h,timeStep:f}=this.data,p=!!h&&this.enableScripting;d&&(n.title=d),this._setRequired(n,this.data.required),c&&(n.maxLength=c),n.addEventListener("input",g=>{e.setValue(t,{value:g.target.value}),this.setPropertyOnSiblings(n,"value",g.target.value,"value"),u.formattedValue=null}),n.addEventListener("resetform",g=>{const b=this.data.defaultFieldValue??"";n.value=u.userValue=b,u.formattedValue=null});let y=g=>{const{formattedValue:b}=u;b!=null&&(g.target.value=b),g.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener("focus",b=>{var x;if(u.focused)return;const{target:v}=b;if(p&&(v.type=h,f&&(v.step=f)),u.userValue){const w=u.userValue;if(p)if(h==="time"){const _=new Date(w),T=[_.getHours(),_.getMinutes(),_.getSeconds()];v.value=T.map(S=>S.toString().padStart(2,"0")).join(":")}else v.value=new Date(w-VM).toISOString().split(h==="date"?"T":".",1)[0];else v.value=w}u.lastCommittedValue=v.value,u.commitKey=1,(x=this.data.actions)!=null&&x.Focus||(u.focused=!0)}),n.addEventListener("updatefromsandbox",b=>{this.showElementAndHideCanvas(b.target);const v={value(x){u.userValue=x.detail.value??"",p||e.setValue(t,{value:u.userValue.toString()}),x.target.value=u.userValue},formattedValue(x){const{formattedValue:w}=x.detail;u.formattedValue=w,w!=null&&x.target!==document.activeElement&&(x.target.value=w);const _={formattedValue:w};p&&(_.value=w),e.setValue(t,_)},selRange(x){x.target.setSelectionRange(...x.detail.selRange)},charLimit:x=>{var S;const{charLimit:w}=x.detail,{target:_}=x;if(w===0){_.removeAttribute("maxLength");return}_.setAttribute("maxLength",w);let T=u.userValue;!T||T.length<=w||(T=T.slice(0,w),_.value=u.userValue=T,e.setValue(t,{value:T}),(S=this.linkService.eventBus)==null||S.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:T,willCommit:!0,commitKey:1,selStart:_.selectionStart,selEnd:_.selectionEnd}}))}};this._dispatchEventFromSandbox(v,b)}),n.addEventListener("keydown",b=>{var w;u.commitKey=1;let v=-1;if(b.key==="Escape"?v=0:b.key==="Enter"&&!this.data.multiLine?v=2:b.key==="Tab"&&(u.commitKey=3),v===-1)return;const{value:x}=b.target;u.lastCommittedValue!==x&&(u.lastCommittedValue=x,u.userValue=x,(w=this.linkService.eventBus)==null||w.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:x,willCommit:!0,commitKey:v,selStart:b.target.selectionStart,selEnd:b.target.selectionEnd}}))});const g=y;y=null,n.addEventListener("blur",b=>{var w,_;if(!u.focused||!b.relatedTarget)return;(w=this.data.actions)!=null&&w.Blur||(u.focused=!1);const{target:v}=b;let{value:x}=v;if(p){if(x&&h==="time"){const T=x.split(":").map(S=>parseInt(S,10));x=new Date(2e3,0,1,T[0],T[1],T[2]||0).valueOf(),v.step=""}else x.includes("T")||(x=`${x}T00:00`),x=new Date(x).valueOf();v.type="text"}u.userValue=x,u.lastCommittedValue!==x&&((_=this.linkService.eventBus)==null||_.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:x,willCommit:!0,
46commitKey:u.commitKey,selStart:b.target.selectionStart,selEnd:b.target.selectionEnd}})),g(b)}),(i=this.data.actions)!=null&&i.Keystroke&&n.addEventListener("beforeinput",b=>{var D;u.lastCommittedValue=null;const{data:v,target:x}=b,{value:w,selectionStart:_,selectionEnd:T}=x;let S=_,C=T;switch(b.inputType){case"deleteWordBackward":{const N=w.substring(0,_).match(/\w*[^\w]*$/);N&&(S-=N[0].length);break}case"deleteWordForward":{const N=w.substring(_).match(/^[^\w]*\w*/);N&&(C+=N[0].length);break}case"deleteContentBackward":_===T&&(S-=1);break;case"deleteContentForward":_===T&&(C+=1);break}b.preventDefault(),(D=this.linkService.eventBus)==null||D.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:w,change:v||"",willCommit:!1,selStart:S,selEnd:C}})}),this._setEventListeners(n,u,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],b=>b.target.value)}if(y&&n.addEventListener("blur",y),this.data.comb){const b=(this.data.rect[2]-this.data.rect[0])/c;n.classList.add("comb"),n.style.letterSpacing=`calc(${b}px * var(--total-scale-factor) - 1ch)`}}else n=document.createElement("div"),n.textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell",this.data.hasOwnCanvas&&(n.hidden=!0);return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class ZM extends ed{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class JM extends ed{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,n=t.id;let r=e.getValue(n,{value:t.exportValue===t.fieldValue}).value;typeof r=="string"&&(r=r!=="Off",e.setValue(n,{value:r})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const i=document.createElement("input");return Lh.add(i),i.setAttribute("data-element-id",n),i.disabled=t.readOnly,this._setRequired(i,this.data.required),i.type="checkbox",i.name=t.fieldName,r&&i.setAttribute("checked",!0),i.setAttribute("exportValue",t.exportValue),i.tabIndex=0,i.addEventListener("change",a=>{const{name:o,checked:c}=a.target;for(const l of this._getElementsByName(o,n)){const u=c&&l.exportValue===t.exportValue;l.domElement&&(l.domElement.checked=u),e.setValue(l.id,{value:u})}e.setValue(n,{value:c})}),i.addEventListener("resetform",a=>{const o=t.defaultFieldValue||"Off";a.target.checked=o===t.exportValue}),this.enableScripting&&this.hasJSActions&&(i.addEventListener("updatefromsandbox",a=>{const o={value(c){c.target.checked=c.detail.value!=="Off",e.setValue(n,{value:c.target.checked})}};this._dispatchEventFromSandbox(o,a)}),this._setEventListeners(i,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class c3 extends ed{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,t=this.data,n=t.id;let r=e.getValue(n,{value:t.fieldValue===t.buttonValue}).value;if(typeof r=="string"&&(r=r!==t.buttonValue,e.setValue(n,{value:r})),r)for(const a of this._getElementsByName(t.fieldName,n))e.setValue(a.id,{value:!1});const i=document.createElement("input");if(Lh.add(i),i.setAttribute("data-element-id",n),i.disabled=t.readOnly,this._setRequired(i,this.data.required),i.type="radio",i.name=t.fieldName,r&&i.setAttribute("checked",!0),i.tabIndex=0,i.addEventListener("change",a=>{const{name:o,checked:c}=a.target;for(const l of this._getElementsByName(o,n))e.setValue(l.id,{value:!1});e.setValue(n,{value:c})}),i.addEventListener("resetform",a=>{const o=t.defaultFieldValue;a.target.checked=o!=null&&o===t.buttonValue}),this.enableScripting&&this.hasJSActions){const a=t.buttonValue;i.addEventListener("updatefromsandbox",o=>{const c={value:l=>{const u=a===l.detail.value;for(const d of this._getElementsByName(l.target.name)){const h=u&&d.id===n;d.domElement&&(d.domElement.checked=h),e.setValue(d.id,{value:h})}}};this._dispatchEventFromSandbox(c,o)}),this._setEventListeners(i,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],o=>o.target.checked)}
46return this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class QM extends OE{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",n=>{this._dispatchEventFromSandbox({},n)})),e}}class eP extends ed{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,t=this.data.id,n=e.getValue(t,{value:this.data.fieldValue}),r=document.createElement("select");Lh.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,this._setRequired(r,this.data.required),r.name=this.data.fieldName,r.tabIndex=0;let i=this.data.combo&&this.data.options.length>0;this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),r.addEventListener("resetform",d=>{const h=this.data.defaultFieldValue;for(const f of r.options)f.selected=f.value===h});const a=(d,h)=>{const f=h.replaceAll(" ","Â ");d.textContent=f,f!==h&&d.setAttribute("display-value",h)};for(const d of this.data.options){const h=document.createElement("option");a(h,d.displayValue),h.value=d.exportValue,n.value.includes(d.exportValue)&&(h.setAttribute("selected",!0),i=!1),r.append(h)}let o=null;if(i){const d=document.createElement("option");d.value=" ",d.setAttribute("hidden",!0),d.setAttribute("selected",!0),r.prepend(d),o=()=>{d.remove(),r.removeEventListener("input",o),o=null},r.addEventListener("input",o)}const c=d=>{const h=d?"value":"textContent",{options:f,multiple:p}=r;return p?Array.prototype.filter.call(f,y=>y.selected).map(y=>y[h]):f.selectedIndex===-1?null:f[f.selectedIndex][h]};let l=c(!1);const u=d=>{const h=d.target.options;return Array.prototype.map.call(h,f=>({displayValue:f.getAttribute("display-value")||f.textContent,exportValue:f.value}))};return this.enableScripting&&this.hasJSActions?(r.addEventListener("updatefromsandbox",d=>{const h={value(f){o==null||o();const p=f.detail.value,y=new Set(Array.isArray(p)?p:[p]);for(const g of r.options)g.selected=y.has(g.value);e.setValue(t,{value:c(!0)}),l=c(!1)},multipleSelection(f){r.multiple=!0},remove(f){const p=r.options,y=f.detail.remove;p[y].selected=!1,r.remove(y),p.length>0&&Array.prototype.findIndex.call(p,b=>b.selected)===-1&&(p[0].selected=!0),e.setValue(t,{value:c(!0),items:u(f)}),l=c(!1)},clear(f){for(;r.length!==0;)r.remove(0);e.setValue(t,{value:null,items:[]}),l=c(!1)},insert(f){const{index:p,displayValue:y,exportValue:g}=f.detail.insert,b=r.children[p],v=document.createElement("option");a(v,y),v.value=g,b?b.before(v):r.append(v),e.setValue(t,{value:c(!0),items:u(f)}),l=c(!1)},items(f){const{items:p}=f.detail;for(;r.length!==0;)r.remove(0);for(const y of p){const{displayValue:g,exportValue:b}=y,v=document.createElement("option");a(v,g),v.value=b,r.append(v)}r.options.length>0&&(r.options[0].selected=!0),e.setValue(t,{value:c(!0),items:u(f)}),l=c(!1)},indices(f){const p=new Set(f.detail.indices);for(const y of f.target.options)y.selected=p.has(y.index);e.setValue(t,{value:c(!0)}),l=c(!1)},editable(f){f.target.disabled=!f.detail.editable}};this._dispatchEventFromSandbox(h,d)}),r.addEventListener("input",d=>{var p;const h=c(!0),f=c(!1);e.setValue(t,{value:h}),d.preventDefault(),(p=this.linkService.eventBus)==null||p.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:l,change:f,changeEx:h,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(r,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],d=>d.target.value)):r.addEventListener("input",function(d){e.setValue(t,{value:c(!0)})}),this.data.combo&&this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}var Sy,GT;class VT extends Cn{constructor(t){const{data:n,elements:r,parent:i}=t,a=!!i._commentManager;super(t,{isRenderable:!a&&Cn._hasPopupData(n)});J(this,Sy);if(this.elements=r,a&&Cn._hasPopupData(n)){const o=this.popup=oe(this,Sy,GT).call(this);for(const c of r)c.popup=o}else this.popup=null}render(){const{container:t}=this;t.classList.add("popupAnnotation"),t.role="comment";
46const n=this.popup=oe(this,Sy,GT).call(this),r=[];for(const i of this.elements)i.popup=n,i.container.ariaHasPopup="dialog",r.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",r.map(i=>`${Md}${i}`).join(",")),this.container}}Sy=new WeakSet,GT=function(){return new tP({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open,commentManager:this.parent._commentManager})};var Ri,Qc,dv,fv,Zf,Jf,Un,Io,el,oh,Qf,ep,Mo,Ii,Wa,ja,Rn,za,tl,Ey,Ha,tp,ah,nl,or,rl,Ct,M0,qT,YT,ZT,P0,JT,l3,u3,h3,d3,O0,L0,QT;class tP{constructor({container:e,color:t,elements:n,titleObj:r,modificationDate:i,contentsObj:a,richText:o,parent:c,rect:l,parentRect:u,open:d,commentManager:h=null}){J(this,Ct);J(this,Ri,null);J(this,Qc,oe(this,Ct,h3).bind(this));J(this,dv,oe(this,Ct,QT).bind(this));J(this,fv,oe(this,Ct,L0).bind(this));J(this,Zf,oe(this,Ct,O0).bind(this));J(this,Jf,null);J(this,Un,null);J(this,Io,null);J(this,el,null);J(this,oh,null);J(this,Qf,null);J(this,ep,null);J(this,Mo,!1);J(this,Ii,null);J(this,Wa,null);J(this,ja,null);J(this,Rn,null);J(this,za,null);J(this,tl,null);J(this,Ey,null);J(this,Ha,null);J(this,tp,null);J(this,ah,null);J(this,nl,!1);J(this,or,null);J(this,rl,null);z(this,Un,e),z(this,tp,r),z(this,Io,a),z(this,Ha,o),z(this,Qf,c),z(this,Jf,t),z(this,Ey,l),z(this,ep,u),z(this,oh,n),z(this,Ri,h),z(this,or,n[0]),z(this,el,d1.toDateObject(i)),this.trigger=n.flatMap(f=>f.getElementsToTriggerPopup()),h||(oe(this,Ct,M0).call(this),m(this,Un).hidden=!0,d&&oe(this,Ct,O0).call(this))}renderCommentButton(){if(m(this,Rn)){m(this,Rn).parentNode||m(this,or).container.after(m(this,Rn));return}if(m(this,za)||oe(this,Ct,qT).call(this),!m(this,za))return;const{signal:e}=z(this,Wa,new AbortController),t=m(this,or).hasOwnCommentButton,n=()=>{m(this,Ri).toggleCommentPopup(this,!0,void 0,!t)},r=()=>{m(this,Ri).toggleCommentPopup(this,!1,!0,!t)},i=()=>{m(this,Ri).toggleCommentPopup(this,!1,!1)};if(t){z(this,Rn,m(this,or).container);for(const a of this.trigger)a.ariaHasPopup="dialog",a.ariaControls="commentPopup",a.addEventListener("keydown",m(this,Qc),{signal:e}),a.addEventListener("click",n,{signal:e}),a.addEventListener("pointerenter",r,{signal:e}),a.addEventListener("pointerleave",i,{signal:e}),a.classList.add("popupTriggerArea")}else{const a=z(this,Rn,document.createElement("button"));a.className="annotationCommentButton";const o=m(this,or).container;a.style.zIndex=o.style.zIndex+1,a.tabIndex=0,a.ariaHasPopup="dialog",a.ariaControls="commentPopup",a.setAttribute("data-l10n-id","pdfjs-show-comment-button"),oe(this,Ct,ZT).call(this),oe(this,Ct,YT).call(this),a.addEventListener("keydown",m(this,Qc),{signal:e}),a.addEventListener("click",n,{signal:e}),a.addEventListener("pointerenter",r,{signal:e}),a.addEventListener("pointerleave",i,{signal:e}),o.after(a)}}get commentButtonColor(){const{color:e,opacity:t}=m(this,or).commentData;return e?m(this,Qf)._commentManager.makeCommentColor(e,t):null}focusCommentButton(){setTimeout(()=>{var e;(e=m(this,Rn))==null||e.focus()},0)}
46getData(){const{richText:e,color:t,opacity:n,creationDate:r,modificationDate:i}=m(this,or).commentData;return{contentsObj:{str:this.comment},richText:e,color:t,opacity:n,creationDate:r,modificationDate:i}}get elementBeforePopup(){return m(this,Rn)}get comment(){return m(this,rl)||z(this,rl,m(this,or).commentText),m(this,rl)}set comment(e){e!==this.comment&&(m(this,or).commentText=z(this,rl,e))}focus(){var e;(e=m(this,or).container)==null||e.focus()}get parentBoundingClientRect(){return m(this,or).layer.getBoundingClientRect()}setCommentButtonStates({selected:e,hasPopup:t}){m(this,Rn)&&(m(this,Rn).classList.toggle("selected",e),m(this,Rn).ariaExpanded=t)}setSelectedCommentButton(e){m(this,Rn).classList.toggle("selected",e)}get commentPopupPosition(){if(m(this,tl))return m(this,tl);const{x:e,y:t,height:n}=m(this,Rn).getBoundingClientRect(),{x:r,y:i,width:a,height:o}=m(this,or).layer.getBoundingClientRect();return[(e-r)/a,(t+n-i)/o]}set commentPopupPosition(e){z(this,tl,e)}hasDefaultPopupPosition(){return m(this,tl)===null}get commentButtonPosition(){return m(this,za)}get commentButtonWidth(){return m(this,Rn).getBoundingClientRect().width/this.parentBoundingClientRect.width}editComment(e){const[t,n]=m(this,tl)||this.commentButtonPosition.map(l=>l/100),r=this.parentBoundingClientRect,{x:i,y:a,width:o,height:c}=r;m(this,Ri).showDialog(null,this,i+t*o,a+n*c,{...e,parentDimensions:r})}render(){var n,r;if(m(this,Ii))return;const e=z(this,Ii,document.createElement("div"));if(e.className="popup",m(this,Jf)){const i=e.style.outlineColor=Ge.makeHexColor(...m(this,Jf));e.style.backgroundColor=`color-mix(in srgb, ${i} 30%, white)`}const t=document.createElement("span");if(t.className="header",(n=m(this,tp))!=null&&n.str){const i=document.createElement("span");i.className="title",t.append(i),{dir:i.dir,str:i.textContent}=m(this,tp)}if(e.append(t),m(this,el)){const i=document.createElement("time");i.className="popupDate",i.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),i.setAttribute("data-l10n-args",JSON.stringify({dateObj:m(this,el).valueOf()})),i.dateTime=m(this,el).toISOString(),t.append(i)}WN({html:m(this,Ct,P0)||m(this,Io).str,dir:(r=m(this,Io))==null?void 0:r.dir,className:"popupContent"},e),m(this,Un).append(e)}updateEdited({rect:e,popup:t,deleted:n}){var r;if(m(this,Ri)){n?(this.remove(),z(this,rl,null)):t&&(t.deleted?this.remove():(oe(this,Ct,ZT).call(this),z(this,rl,t.text))),e&&(z(this,za,null),oe(this,Ct,qT).call(this),oe(this,Ct,YT).call(this));return}if(n||t!=null&&t.deleted){this.remove();return}oe(this,Ct,M0).call(this),m(this,ah)||z(this,ah,{contentsObj:m(this,Io),richText:m(this,Ha)}),e&&z(this,ja,null),t&&t.text&&(z(this,Ha,oe(this,Ct,u3).call(this,t.text)),z(this,el,d1.toDateObject(t.date)),z(this,Io,null)),(r=m(this,Ii))==null||r.remove(),z(this,Ii,null)}resetEdited(){var e;m(this,ah)&&({contentsObj:zn(this,Io)._,richText:zn(this,Ha)._}=m(this,ah),z(this,ah,null),(e=m(this,Ii))==null||e.remove(),z(this,Ii,null),z(this,ja,null))}remove(){var e,t,n;if((e=m(this,Wa))==null||e.abort(),z(this,Wa,null),(t=m(this,Ii))==null||t.remove(),z(this,Ii,null),z(this,nl,!1),z(this,Mo,!1),(n=m(this,Rn))==null||n.remove(),z(this,Rn,null),this.trigger)for(const r of this.trigger)r.classList.remove("popupTriggerArea")}forceHide(){z(this,nl,this.isVisible),m(this,nl)&&(m(this,Un).hidden=!0)}maybeShow(){m(this,Ri)||(oe(this,Ct,M0).call(this),m(this,nl)&&(m(this,Ii)||oe(this,Ct,L0).call(this),z(this,nl,!1),m(this,Un).hidden=!1))}get isVisible(){return m(this,Ri)?!1:m(this,Un).hidden===!1}}Ri=new WeakMap,Qc=new WeakMap,dv=new WeakMap,fv=new WeakMap,Zf=new WeakMap,Jf=new WeakMap,Un=new WeakMap,Io=new WeakMap,el=new WeakMap,oh=new WeakMap,Qf=new WeakMap,ep=new WeakMap,Mo=new WeakMap,Ii=new WeakMap,Wa=new WeakMap,ja=new WeakMap,Rn=new WeakMap,za=new WeakMap,tl=new WeakMap,Ey=new WeakMap,Ha=new WeakMap,tp=new WeakMap,ah=new WeakMap,nl=new WeakMap,or=new WeakMap,rl=new WeakMap,Ct=new WeakSet,M0=function(){var t;if(m(this,Wa))return;z(this,Wa,new AbortController);const{signal:e}=m(this,Wa);for(const n of this.trigger)n.addEventListener("click",m(this,Zf),{signal:e}),n.addEventListener("pointerenter",m(this,fv),{signal:e}),n.addEventListener("pointerleave",m(this,dv),{signal:e}),n.classList.add("popupTriggerArea");for(const n of m(this,oh))(t=n.container)==null||t.addEventListener("keydown",m(this,Qc),{signal:e})},qT=function(){const e=m(this,oh).find(t=>t.hasCommentButton);e&&z(this,za,e._normalizePoint(e.commentButtonPosition))},YT=function(){if(m(this,or).extraPopupElement&&!m(this,or).editor)return;m(this,Rn)||this.renderCommentButton();const[e,t]=m(this,za),{style:n}=m(this,Rn);n.left=`calc(${e}%)`,n.top=`calc(${t}% - var(--comment-button-dim))`},ZT=function(){m(this,or).extraPopupElement||(m(this,Rn)||this.renderCommentButton(),m(this,Rn).style.backgroundColor=this.commentButtonColor||"")},P0=function(){const e=m(this,Ha),t=m(this,Io);return e!=null&&e.str&&(!(t!=null&&t.str)||t.str===e.str)&&m(this,Ha).html||null},JT=function(){var e,t,n;return((n=(t=(e=m(this,Ct,P0))==null?void 0:e.attributes)==null?void 0:t.style)==null?void 0:n.fontSize)||0},l3=function(){var e,t,n;return((n=(t=(e=m(this,Ct,P0))==null?void 0:e.attributes)==null?void 0:t.style)==null?void 0:n.color)||null},u3=function(e){const t=[],n={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}},r={style:{color:m(this,Ct,l3),fontSize:m(this,Ct,JT)?`calc(${m(this,Ct,JT)}px * var(--total-scale-factor))`:""}};for(const i of e.split(` 47`))t.push({name:"span",value:i,attributes:r});return n},h3=function(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||(e.key==="Enter"||e.key==="Escape"&&m(this,Mo))&&oe(this,Ct,O0).call(this)},d3=function(){if(m(this,ja)!==null)return;const{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:n,pageX:r,pageY:i}}}=m(this,Qf);let a=!!m(this,ep),o=a?m(this,ep):m(this,Ey);for(const p of m(this,oh))if(!o||Ge.intersect(p.data.rect,o)!==null){o=p.data.rect,a=!0;break}const c=Ge.normalizeRect([o[0],e[3]-o[1]+e[1],o[2],e[3]-o[3]+e[1]]),u=a?o[2]-o[0]+5:0,d=c[0]+u,h=c[1];z(this,ja,[100*(d-r)/t,100*(h-i)/n]);const{style:f}=m(this,Un);f.left=`${m(this,ja)[0]}%`,f.top=`${m(this,ja)[1]}%`},O0=function(){if(m(this,Ri)){m(this,Ri).toggleCommentPopup(this,!1);return}z(this,Mo,!m(this,Mo)),m(this,Mo)?(oe(this,Ct,L0).call(this),m(this,Un).addEventListener("click",m(this,Zf)),m(this,Un).addEventListener("keydown",m(this,Qc))):(oe(this,Ct,QT).call(this),m(this,Un).removeEventListener("click",m(this,Zf)),m(this,Un).removeEventListener("keydown",m(this,Qc)))},L0=function(){m(this,Ii)||this.render(),this.isVisible?m(this,Mo)&&m(this,Un).classList.add("focused"):(oe(this,Ct,d3).call(this),m(this,Un).hidden=!1,m(this,Un).style.zIndex=parseInt(m(this,Un).style.zIndex)+1e3)},QT=function(){m(this,Un).classList.remove("focused"),!(m(this,Mo)||!this.isVisible)&&(m(this,Un).hidden=!0,m(this,Un).style.zIndex=parseInt(m(this,Un).style.zIndex)-1e3)};class f3 extends Cn{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=yt.FREETEXT}
47render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=this.contentElement=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const t of this.textContent){const n=document.createElement("span");n.textContent=t,e.append(n)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}}var Dy;class nP extends Cn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});J(this,Dy,null)}render(){this.container.classList.add("lineAnnotation");const{data:t,width:n,height:r}=this,i=this.svgFactory.create(n,r,!0),a=z(this,Dy,this.svgFactory.createElement("svg:line"));return a.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),a.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),a.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),a.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),a.setAttribute("stroke-width",t.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),i.append(a),this.container.append(i),!t.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return m(this,Dy)}addHighlightArea(){this.container.classList.add("highlightArea")}}Dy=new WeakMap;var Cy;class rP extends Cn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});J(this,Cy,null)}render(){this.container.classList.add("squareAnnotation");const{data:t,width:n,height:r}=this,i=this.svgFactory.create(n,r,!0),a=t.borderStyle.width,o=z(this,Cy,this.svgFactory.createElement("svg:rect"));return o.setAttribute("x",a/2),o.setAttribute("y",a/2),o.setAttribute("width",n-a),o.setAttribute("height",r-a),o.setAttribute("stroke-width",a||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),i.append(o),this.container.append(i),!t.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return m(this,Cy)}addHighlightArea(){this.container.classList.add("highlightArea")}}Cy=new WeakMap;var Ay;class iP extends Cn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});J(this,Ay,null)}render(){this.container.classList.add("circleAnnotation");const{data:t,width:n,height:r}=this,i=this.svgFactory.create(n,r,!0),a=t.borderStyle.width,o=z(this,Ay,this.svgFactory.createElement("svg:ellipse"));return o.setAttribute("cx",n/2),o.setAttribute("cy",r/2),o.setAttribute("rx",n/2-a/2),o.setAttribute("ry",r/2-a/2),o.setAttribute("stroke-width",a||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),i.append(o),this.container.append(i),!t.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return m(this,Ay)}addHighlightArea(){this.container.classList.add("highlightArea")}}Ay=new WeakMap;var ky;class p3 extends Cn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});J(this,ky,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,vertices:n,borderStyle:r,popupRef:i},width:a,height:o}=this;if(!n)return this.container;const c=this.svgFactory.create(a,o,!0);let l=[];for(let d=0,h=n.length;d<h;d+=2){const f=n[d]-t[0],p=t[3]-n[d+1];l.push(`${f},${p}`)}l=l.join(" ");const u=z(this,ky,this.svgFactory.createElement(this.svgElementName));return u.setAttribute("points",l),u.setAttribute("stroke-width",r.width||1),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),c.append(u),this.container.append(c),!i&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return m(this,ky)}addHighlightArea(){this.container.classList.add("highlightArea")}}ky=new WeakMap;class sP extends p3{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class oP extends Cn{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}}
47var Ny,ch,Fy,eS;class LE extends Cn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0});J(this,Fy);J(this,Ny,null);J(this,ch,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?yt.HIGHLIGHT:yt.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,rotation:n,inkLists:r,borderStyle:i,popupRef:a}}=this,{transform:o,width:c,height:l}=oe(this,Fy,eS).call(this,n,t),u=this.svgFactory.create(c,l,!0),d=z(this,Ny,this.svgFactory.createElement("svg:g"));u.append(d),d.setAttribute("stroke-width",i.width||1),d.setAttribute("stroke-linecap","round"),d.setAttribute("stroke-linejoin","round"),d.setAttribute("stroke-miterlimit",10),d.setAttribute("stroke","transparent"),d.setAttribute("fill","transparent"),d.setAttribute("transform",o);for(let h=0,f=r.length;h<f;h++){const p=this.svgFactory.createElement(this.svgElementName);m(this,ch).push(p),p.setAttribute("points",r[h].join(",")),d.append(p)}return!a&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.append(u),this._editOnDoubleClick(),this.container}updateEdited(t){super.updateEdited(t);const{thickness:n,points:r,rect:i}=t,a=m(this,Ny);if(n>=0&&a.setAttribute("stroke-width",n||1),r)for(let o=0,c=m(this,ch).length;o<c;o++)m(this,ch)[o].setAttribute("points",r[o].join(","));if(i){const{transform:o,width:c,height:l}=oe(this,Fy,eS).call(this,this.data.rotation,i);a.parentElement.setAttribute("viewBox",`0 0 ${c} ${l}`),a.setAttribute("transform",o)}}getElementsToTriggerPopup(){return m(this,ch)}addHighlightArea(){this.container.classList.add("highlightArea")}}Ny=new WeakMap,ch=new WeakMap,Fy=new WeakSet,eS=function(t,n){switch(t){case 90:return{transform:`rotate(90) translate(${-n[0]},${n[1]}) scale(1,-1)`,width:n[3]-n[1],height:n[2]-n[0]};case 180:return{transform:`rotate(180) translate(${-n[2]},${n[1]}) scale(1,-1)`,width:n[2]-n[0],height:n[3]-n[1]};case 270:return{transform:`rotate(270) translate(${-n[2]},${n[3]}) scale(1,-1)`,width:n[3]-n[1],height:n[2]-n[0]};default:return{transform:`translate(${-n[0]},${n[3]}) scale(1,-1)`,width:n[2]-n[0],height:n[3]-n[1]}}};class g3 extends Cn{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=yt.HIGHLIGHT}render(){const{data:{overlaidText:e,popupRef:t}}=this;if(!t&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),e){const n=document.createElement("mark");n.classList.add("overlaidText"),n.textContent=e,this.container.append(n)}return this.container}}class aP extends Cn{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:e,popupRef:t}}=this;if(!t&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("underlineAnnotation"),e){const n=document.createElement("u");n.classList.add("overlaidText"),n.textContent=e,this.container.append(n)}return this.container}}class cP extends Cn{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:e,popupRef:t}}=this;if(!t&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("squigglyAnnotation"),e){const n=document.createElement("u");n.classList.add("overlaidText"),n.textContent=e,this.container.append(n)}return this.container}}class lP extends Cn{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:e,popupRef:t}}=this;if(!t&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container.classList.add("strikeoutAnnotation"),e){const n=document.createElement("s");n.classList.add("overlaidText"),n.textContent=e,this.container.append(n)}return this.container}}class m3 extends Cn{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=yt.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}}
47var Uy,Ry,tS;class uP extends Cn{constructor(t){var r;super(t,{isRenderable:!0});J(this,Ry);J(this,Uy,null);const{file:n}=this.data;this.filename=n.filename,this.content=n.content,(r=this.linkService.eventBus)==null||r.dispatch("fileattachmentannotation",{source:this,...n})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:n}=this;let r;n.hasAppearance||n.fillAlpha===0?r=document.createElement("div"):(r=document.createElement("img"),r.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(n.name)?"paperclip":"pushpin"}.svg`,n.fillAlpha&&n.fillAlpha<1&&(r.style=`filter: opacity(${Math.round(n.fillAlpha*100)}%);`)),r.addEventListener("dblclick",oe(this,Ry,tS).bind(this)),z(this,Uy,r);const{isMac:i}=rr.platform;return t.addEventListener("keydown",a=>{a.key==="Enter"&&(i?a.metaKey:a.ctrlKey)&&oe(this,Ry,tS).call(this)}),!n.popupRef&&this.hasPopupData?(this.hasOwnCommentButton=!0,this._createPopup()):r.classList.add("popupTriggerArea"),t.append(r),t}getElementsToTriggerPopup(){return m(this,Uy)}addHighlightArea(){this.container.classList.add("highlightArea")}}Uy=new WeakMap,Ry=new WeakSet,tS=function(){var t;(t=this.downloadManager)==null||t.openOrDownloadData(this.content,this.filename)};var lh,uh,np,il,Iy,hh,Mi,My,cc,B0,rS;const iC=class iC{constructor({div:e,accessibilityManager:t,annotationCanvasMap:n,annotationEditorUIManager:r,page:i,viewport:a,structTreeLayer:o,commentManager:c,linkService:l,annotationStorage:u}){J(this,cc);J(this,lh,null);J(this,uh,null);J(this,np,null);J(this,il,new Map);J(this,Iy,null);J(this,hh,null);J(this,Mi,[]);J(this,My,!1);this.div=e,z(this,lh,t),z(this,uh,n),z(this,Iy,o||null),z(this,hh,l||null),z(this,np,u||new IE),this.page=i,this.viewport=a,this.zIndex=0,this._annotationEditorUIManager=r,this._commentManager=c||null}hasEditableAnnotations(){return m(this,il).size>0}async render(e){var o;const{annotations:t}=e,n=this.div;Ph(n,this.viewport);const r=new Map,i=[],a={data:null,layer:n,linkService:m(this,hh),downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:e.renderForms!==!1,svgFactory:new y1,annotationStorage:m(this,np),enableComment:e.enableComment===!0,enableScripting:e.enableScripting===!0,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const c of t){if(c.noHTML)continue;const l=c.annotationType===Kn.POPUP;if(l){const h=r.get(c.id);if(!h)continue;if(!this._commentManager){i.push(c);continue}a.elements=h}else if(c.rect[2]===c.rect[0]||c.rect[3]===c.rect[1])continue;a.data=c;const u=Nw.create(a);if(!u.isRenderable)continue;l||(m(this,Mi).push(u),c.popupRef&&r.getOrInsertComputed(c.popupRef,kE).push(u));const d=u.render();c.hidden&&(d.style.visibility="hidden"),u._isEditable&&(m(this,il).set(u.data.id,u),(o=this._annotationEditorUIManager)==null||o.renderAnnotationElement(u))}await oe(this,cc,B0).call(this);for(const c of i){const l=a.elements=r.get(c.id);a.data=c;const u=Nw.create(a);if(!u.isRenderable)continue;const d=u.render();u.contentElement.id=`${Md}${c.id}`,c.hidden&&(d.style.visibility="hidden"),l.at(-1).container.after(d)}oe(this,cc,rS).call(this)}async addLinkAnnotations(e){const t={data:null,layer:this.div,linkService:m(this,hh),svgFactory:new y1,parent:this};for(const n of e){n.borderStyle||(n.borderStyle=iC._defaultBorderStyle),t.data=n;const r=Nw.create(t);r.isRenderable&&(r.render(),r.contentElement.id=`${Md}${n.id}`,m(this,Mi).push(r))}await oe(this,cc,B0).call(this)}update({viewport:e}){const t=this.div;this.viewport=e,Ph(t,{rotation:e.rotation}),oe(this,cc,rS).call(this),t.hidden=!1}getEditableAnnotations(){return m(this,il).values()}getEditableAnnotation(e){return m(this,il).get(e)}addFakeAnnotation(e){const{div:t}=this,{id:n,rotation:r}=e,i=new GM({data:{id:n,rect:e.getPDFRect(),rotation:r},editor:e,layer:t,parent:this,enableComment:!!this._commentManager,linkService:m(this,hh),annotationStorage:m(this,np)});return i.render(),i.contentElement.id=`${Md}${n}`,i.createOrUpdatePopup(),m(this,Mi).push(i),i}removeAnnotation(e){var r;const t=m(this,Mi).findIndex(i=>i.data.id===e);if(t<0)return;const[n]=m(this,Mi).splice(t,1);(r=m(this,lh))==null||r.removePointerInTextLayer(n.contentElement)}updateFakeAnnotations(e){if(e.length!==0){for(const t of e)t.updateFakeAnnotationElement(this);oe(this,cc,B0).call(this)}}togglePointerEvents(e=!1){this.div.classList.toggle("disabled",!e)}static get _defaultBorderStyle(){return Tt(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:vd.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}};lh=new WeakMap,uh=new WeakMap,np=new WeakMap,il=new WeakMap,Iy=new WeakMap,hh=new WeakMap,Mi=new WeakMap,My=new WeakMap,cc=new WeakSet,B0=async function(){var n,r,i;if(m(this,Mi).length===0)return;this.div.replaceChildren();const e=[];
47if(!m(this,My)){z(this,My,!0);for(const{contentElement:a,data:{id:o}}of m(this,Mi)){const c=a.id=`${Md}${o}`;e.push((n=m(this,Iy))==null?void 0:n.getAriaAttributes(c).then(l=>{if(l)for(const[u,d]of l)a.setAttribute(u,d)}))}}m(this,Mi).sort(({data:{rect:[a,o,c,l]}},{data:{rect:[u,d,h,f]}})=>{if(a===c&&o===l)return 1;if(u===h&&d===f)return-1;const p=l,y=o,g=(o+l)/2,b=f,v=d,x=(d+f)/2;if(g>=b&&x<=y)return-1;if(x>=p&&g<=v)return 1;const w=(a+c)/2,_=(u+h)/2;return w-_});const t=document.createDocumentFragment();for(const a of m(this,Mi))t.append(a.container),this._commentManager?(i=((r=a.extraPopupElement)==null?void 0:r.popup)||a.popup)==null||i.renderCommentButton():a.extraPopupElement&&t.append(a.extraPopupElement.render());if(this.div.append(t),await Promise.all(e),m(this,lh))for(const a of m(this,Mi))m(this,lh).addPointerInTextLayer(a.contentElement,!1)},rS=function(){var t;if(!m(this,uh))return;const e=this.div;for(const[n,r]of m(this,uh)){const i=e.querySelector(`[data-annotation-id="${n}"]`);if(!i)continue;r.className="annotationContent";const{firstChild:a}=i;a?a.nodeName==="CANVAS"?a.replaceWith(r):a.classList.contains("annotationContent")?a.after(r):a.before(r):i.append(r);const o=m(this,il).get(n);o&&(o._hasNoCanvas?((t=this._annotationEditorUIManager)==null||t.setMissingCanvas(n,i.id,r),o._hasNoCanvas=!1):o.canvas=r)}m(this,uh).clear()};let nS=iC;const Nb=/\r\n?|\n/g;var Pi,Py,dh,Oi,qn,y3,b3,v3,W0,lc,j0,z0,w3,sS,x3;const gn=class gn extends pn{constructor(t){super({...t,name:"freeTextEditor"});J(this,qn);J(this,Pi,"");J(this,Py,`${this.id}-editor`);J(this,dh,null);J(this,Oi);be(this,"_colorPicker",null);this.color=t.color||gn._defaultColor||pn._defaultLineColor,z(this,Oi,t.fontSize||gn._defaultFontSize),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert"),this.canAddComment=!1}static get _keyboardManager(){const t=gn.prototype,n=a=>a.isEmpty(),r=Oh.TRANSLATE_SMALL,i=Oh.TRANSLATE_BIG;return Tt(this,"_keyboardManager",new sb([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-r,0],checker:n}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:n}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[r,0],checker:n}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[i,0],checker:n}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-r],checker:n}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:n}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,r],checker:n}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,i],checker:n}]]))}static initialize(t,n){pn.initialize(t,n);const r=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(r.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,n){switch(t){case Rt.FREETEXT_SIZE:gn._defaultFontSize=n;break;case Rt.FREETEXT_COLOR:gn._defaultColor=n;break}}updateParams(t,n){switch(t){case Rt.FREETEXT_SIZE:oe(this,qn,y3).call(this,n);break;case Rt.FREETEXT_COLOR:oe(this,qn,b3).call(this,n);break}}static get defaultPropertiesToUpdate(){return[[Rt.FREETEXT_SIZE,gn._defaultFontSize],[Rt.FREETEXT_COLOR,gn._defaultColor||pn._defaultLineColor]]}get propertiesToUpdate(){return[[Rt.FREETEXT_SIZE,m(this,Oi)],[Rt.FREETEXT_COLOR,this.color]]}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new m1(this)),[["colorPicker",this._colorPicker]]}get colorType(){return Rt.FREETEXT_COLOR}onUpdatedColor(){var t;this.editorDiv.style.color=this.color,(t=this._colorPicker)==null||t.update(this.color),super.onUpdatedColor()}_translateEmpty(t,n){this._uiManager.translateSelectedEditors(t,n,!0)}getInitialTranslation(){const t=this.parentScale;return[-gn._internalPadding*t,-(gn._internalPadding+m(this,Oi))*t]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),z(this,dh,new AbortController);const t=this._uiManager.combinedSignal(m(this,dh));return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:t}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:t}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:t}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:t}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:t}),!0}disableEditMode(){var t;return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",m(this,Py)),this._isDraggable=!0,(t=m(this,dh))==null||t.abort(),z(this,dh,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(t){var n;this.width||(this.enableEditMode(),t&&this.editorDiv.focus(),(n=this._initialOptions)!=null&&n.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=m(this,Pi),n=z(this,Pi,oe(this,qn,v3).call(this).trimEnd());if(t===n)return;const r=i=>{if(z(this,Pi,i),!i){this.remove();return}oe(this,qn,z0).call(this),this._uiManager.rebuild(this),oe(this,qn,W0).call(this)};this.addCommands({cmd:()=>{r(n)},undo:()=>{r(t)},mustExec:!1}),oe(this,qn,W0).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(t){t.target===this.div&&t.key==="Enter"&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){gn._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}
47render(){if(this.div)return this.div;let t,n;(this._isCopy||this.annotationElementId)&&(t=this.x,n=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",m(this,Py)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:r}=this.editorDiv;if(r.fontSize=`calc(${m(this,Oi)}px * var(--total-scale-factor))`,r.color=this.color,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[i,a]=this.parentDimensions;if(this.annotationElementId){const{position:o}=this._initialData;let[c,l]=this.getInitialTranslation();[c,l]=this.pageTranslationToScreen(c,l);const[u,d]=this.pageDimensions,[h,f]=this.pageTranslation;let p,y;switch(this.rotation){case 0:p=t+(o[0]-h)/u,y=n+this.height-(o[1]-f)/d;break;case 90:p=t+(o[0]-h)/u,y=n-(o[1]-f)/d,[c,l]=[l,-c];break;case 180:p=t-this.width+(o[0]-h)/u,y=n-(o[1]-f)/d,[c,l]=[-c,-l];break;case 270:p=t+(o[0]-h-this.height*d)/u,y=n+(o[1]-f-this.width*u)/d,[c,l]=[-l,c];break}this.setAt(p*i,y*a,c,l)}else this._moveAfterPaste(t,n);oe(this,qn,z0).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(t){var p,y,g;const n=t.clipboardData||window.clipboardData,{types:r}=n;if(r.length===1&&r[0]==="text/plain")return;t.preventDefault();const i=oe(p=gn,lc,sS).call(p,n.getData("text")||"").replaceAll(Nb,` 48`);if(!i)return;const a=window.getSelection();if(!a.rangeCount)return;this.editorDiv.normalize(),a.deleteFromDocument();const o=a.getRangeAt(0);if(!i.includes(` 49`)){o.insertNode(document.createTextNode(i)),this.editorDiv.normalize(),a.collapseToStart();return}const{startContainer:c,startOffset:l}=o,u=[],d=[];if(c.nodeType===Node.TEXT_NODE){const b=c.parentElement;if(d.push(c.nodeValue.slice(l).replaceAll(Nb,"")),b!==this.editorDiv){let v=u;for(const x of this.editorDiv.childNodes){if(x===b){v=d;continue}v.push(oe(y=gn,lc,j0).call(y,x))}}u.push(c.nodeValue.slice(0,l).replaceAll(Nb,""))}else if(c===this.editorDiv){let b=u,v=0;for(const x of this.editorDiv.childNodes)v++===l&&(b=d),b.push(oe(g=gn,lc,j0).call(g,x))}z(this,Pi,`${u.join(` 50`)}${i}${d.join(` 51`)}`),oe(this,qn,z0).call(this);const h=new Range;let f=Math.sumPrecise(u.map(b=>b.length));for(const{firstChild:b}of this.editorDiv.childNodes)if(b.nodeType===Node.TEXT_NODE){const v=b.nodeValue.length;if(f<=v){h.setStart(b,f),h.setEnd(b,f);break}f-=v}a.removeAllRanges(),a.addRange(h)}get contentDiv(){return this.editorDiv}getPDFRect(){const t=gn._internalPadding*this.parentScale;return this.getRect(t,t)}static async deserialize(t,n,r){var o;let i=null;if(t instanceof f3){const{data:{defaultAppearanceData:{fontSize:c,fontColor:l},rect:u,rotation:d,id:h,popupRef:f,richText:p,contentsObj:y,creationDate:g,modificationDate:b},textContent:v,textPosition:x,parent:{page:{pageNumber:w}}}=t;if(!v||v.length===0)return null;i=t={annotationType:yt.FREETEXT,color:Array.from(l),fontSize:c,value:v.join(` 52`),position:x,pageIndex:w-1,rect:u.slice(0),rotation:d,annotationElementId:h,id:h,deleted:!1,popupRef:f,comment:(y==null?void 0:y.str)||null,richText:p,creationDate:g,modificationDate:b}}const a=await super.deserialize(t,n,r);return z(a,Oi,t.fontSize),a.color=Ge.makeHexColor(...t.color),z(a,Pi,oe(o=gn,lc,sS).call(o,t.value)),a._initialData=i,t.comment&&a.setCommentData(t),a}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const n=pn._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),r=Object.assign(super.serialize(t),{color:n,fontSize:m(this,Oi),value:oe(this,qn,w3).call(this)});return this.addComment(r),t?(r.isCopy=!0,r):this.annotationElementId&&!oe(this,qn,x3).call(this,r)?null:(r.id=this.annotationElementId,r)}renderAnnotationElement(t){const n=super.renderAnnotationElement(t);if(!n)return null;const{style:r}=n;r.fontSize=`calc(${m(this,Oi)}px * var(--total-scale-factor))`,r.color=this.color,n.replaceChildren();for(const i of m(this,Pi).split(` 53`)){const a=document.createElement("div");a.append(i?document.createTextNode(i):document.createElement("br")),n.append(a)}return t.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:m(this,Pi)}}),n}resetAnnotationElement(t){super.resetAnnotationElement(t),t.resetEdited()}};Pi=new WeakMap,Py=new WeakMap,dh=new WeakMap,Oi=new WeakMap,qn=new WeakSet,y3=function(t){const n=i=>{this.editorDiv.style.fontSize=`calc(${i}px * var(--total-scale-factor))`,this.translate(0,-(i-m(this,Oi))*this.parentScale),z(this,Oi,i),oe(this,qn,W0).call(this)},r=m(this,Oi);this.addCommands({cmd:n.bind(this,t),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Rt.FREETEXT_S
53IZE,overwriteIfSameType:!0,keepUndo:!0})},b3=function(t){const n=i=>{this.color=i,this.onUpdatedColor()},r=this.color;this.addCommands({cmd:n.bind(this,t),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Rt.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},v3=function(){var r;const t=[];this.editorDiv.normalize();let n=null;for(const i of this.editorDiv.childNodes)(n==null?void 0:n.nodeType)===Node.TEXT_NODE&&i.nodeName==="BR"||(t.push(oe(r=gn,lc,j0).call(r,i)),n=i);return t.join(` 54`)},W0=function(){const[t,n]=this.parentDimensions;let r;if(this.isAttachedToDOM)r=this.div.getBoundingClientRect();else{const{currentLayer:i,div:a}=this,o=a.style.display,c=a.classList.contains("hidden");a.classList.remove("hidden"),a.style.display="hidden",i.div.append(this.div),r=a.getBoundingClientRect(),a.remove(),a.style.display=o,a.classList.toggle("hidden",c)}this.rotation%180===this.parentRotation%180?(this.width=r.width/t,this.height=r.height/n):(this.width=r.height/t,this.height=r.width/n),this.fixAndSetPosition()},lc=new WeakSet,j0=function(t){return(t.nodeType===Node.TEXT_NODE?t.nodeValue:t.innerText).replaceAll(Nb,"")},z0=function(){if(this.editorDiv.replaceChildren(),!!m(this,Pi))for(const t of m(this,Pi).split(` 55`)){const n=document.createElement("div");n.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(n)}},w3=function(){return m(this,Pi).replaceAll("Â "," ")},sS=function(t){return t.replaceAll(" ","Â ")},x3=function(t){const{value:n,fontSize:r,color:i,pageIndex:a}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||t.value!==n||t.fontSize!==r||t.color.some((o,c)=>o!==i[c])||t.pageIndex!==a},J(gn,lc),be(gn,"_freeTextDefaultContent",""),be(gn,"_internalPadding",0),be(gn,"_defaultColor",null),be(gn,"_defaultFontSize",10),be(gn,"_type","freetext"),be(gn,"_editorType",yt.FREETEXT);let iS=gn;class tt{toSVGPath(){zt("Abstract method `toSVGPath` must be implemented.")}get box(){zt("Abstract getter `box` must be implemented.")}serialize(e,t){zt("Abstract method `serialize` must be implemented.")}static _rescale(e,t,n,r,i,a){a||(a=new Float32Array(e.length));for(let o=0,c=e.length;o<c;o+=2)a[o]=t+e[o]*r,a[o+1]=n+e[o+1]*i;return a}static _rescaleAndSwap(e,t,n,r,i,a){a||(a=new Float32Array(e.length));for(let o=0,c=e.length;o<c;o+=2)a[o]=t+e[o+1]*r,a[o+1]=n+e[o]*i;return a}static _translate(e,t,n,r){r||(r=new Float32Array(e.length));for(let i=0,a=e.length;i<a;i+=2)r[i]=t+e[i],r[i+1]=n+e[i+1];return r}static svgRound(e){return Math.round(e*1e4)}static _normalizePoint(e,t,n,r,i){switch(i){case 90:return[1-t/n,e/r];case 180:return[1-e/n,1-t/r];case 270:return[t/n,1-e/r];default:return[e/n,t/r]}}static _normalizePagePoint(e,t,n){switch(n){case 90:return[1-t,e];case 180:return[1-e,1-t];case 270:return[t,1-e];default:return[e,t]}}static createBezierPoints(e,t,n,r,i,a){return[(e+5*n)/6,(t+5*r)/6,(5*n+i)/6,(5*r+a)/6,(n+i)/2,(r+a)/2]}}be(tt,"PRECISION",1e-4);var Li,$s,rp,ip,Po,kt,fh,ph,Oy,Ly,sp,op,sl,By,pv,gv,nr,Ig,_3,T3,S3,E3,D3,C3;const ya=class ya{constructor({x:e,y:t},n,r,i,a,o=0){J(this,nr);J(this,Li);J(this,$s,[]);J(this,rp);J(this,ip);J(this,Po,[]);J(this,kt,new Float32Array(18));J(this,fh);J(this,ph);J(this,Oy);J(this,Ly);J(this,sp);J(this,op);J(this,sl,[]);z(this,Li,n),z(this,op,i*r),z(this,ip,a),m(this,kt).set([NaN,NaN,NaN,NaN,e,t],6),z(this,rp,o),z(this,Ly,m(ya,By)*r),z(this,Oy,m(ya,gv)*r),z(this,sp,r),m(this,sl).push(e,t)}isEmpty(){return isNaN(m(this,kt)[8])}add({x:e,y:t}){var D;z(this,fh,e),z(this,ph,t);const[n,r,i,a]=m(this,Li);let[o,c,l,u]=m(this,kt).subarray(8,12);const d=e-l,h=t-u,f=Math.hypot(d,h);if(f<m(this,Oy))return!1;const p=f-m(this,Ly),y=p/f,g=y*d,b=y*h;let v=o,x=c;o=l,c=u,l+=g,u+=b,(D=m(this,sl))==null||D.push(e,t);const w=-b/p,_=g/p,T=w*m(this,op),S=_*m(this,op);return m(this,kt).set(m(this,kt).subarray(2,8),0),m(this,kt).set([l+T,u+S],4),m(this,kt).set(m(this,kt).subarray(14,18),12),m(this,kt).set([l-T,u-S],16),isNaN(m(this,kt)[6])?(m(this,Po).length===0&&(m(this,kt).set([o+T,c+S],2),m(this,Po).push(NaN,NaN,NaN,NaN,(o+T-n)/i,(c+S-r)/a),m(this,kt).set([o-T,c-S],14),m(this,$s).push(NaN,NaN,NaN,NaN,(o-T-n)/i,(c-S-r)/a)),m(this,kt).set([v,x,o,c,l,u],6),!this.isEmpty()):(m(this,kt).set([v,x,o,c,l,u],6),Math.abs(Math.atan2(x-c,v-o)-Math.atan2(b,g))<Math.PI/2?([o,c,l,u]=m(this,kt).subarray(2,6),m(this,Po).push(NaN,NaN,NaN,NaN,((o+l)/2-n)/i,((c+u)/2-r)/a),[o,c,v,x]=m(this,kt).subarray(14,18),m(this,$s).push(NaN,NaN,NaN,NaN,((v+o)/2-n)/i,((x+c)/2-r)/a),!0):([v,x,o,c,l,u]=m(this,kt).subarray(0,6),m(this,Po).push(((v+5*o)/6-n)/i,((x+5*c)/6-r)/a,((5*o+l)/6-n)/i,((5*c+u)/6-r)/a,((o+l)/2-n)/i,((c+u)/2-r)/a),[l,u,o,c,v,x]=m(this,kt).subarray(12,18),m(this,$s).push(((v+5*o)/6-n)/i,((x+5*c)/6-r)/a,((5*o+l)/6-n)/i,((5*c+u)/6-r)/a,((o+l)/2-n)/i,((c+u)/2-r)/a),!0))}toSVGPath(){if(this.isEmpty())return"";const e=m(this,Po),t=m(this,$s);if(isNaN(m(this,kt)[6])&&!this.isEmpty())return oe(this,nr,_3).call(this);const n=[];n.push(`M${e[4]} ${e[5]}`);for(let r=6;r<e.length;r+=6)isNaN(e[r])?n.push(`L${e[r+4]} ${e[r+5]}`):n.push(`C${e[r]} ${e[r+1]} ${e[r+2]} ${e[r+3]} ${e[r+4]} ${e[r+5]}`);oe(this,nr,S3).call(this,n);for(let r=t.length-6;r>=6;r-=6)isNaN(t[r])?n.push(`L${t[r+4]} ${t[r+5]}`):n.push(`C${t[r]} ${t[r+1]} ${t[r+2]} ${t[r+3]} ${t[r+4]} ${t[r+5]}`);return oe(this,nr,T3).call(this,n),n.join(" ")}newFreeDrawOutline(e,t,n,r,i,a){return new A3(e,t,n,r,i,a)}getOutlines(){var d;const e=m(this,Po),t=m(this,$s),n=m(this,kt),[r,i,a,o]=m(this,Li),c=new Float32Array((((d=m(this,sl))==null?void 0:d.length)??0)+2);for(let h=0,f=c.length-2;h<f;h+=2)c[h]=(m(this,sl)[h]-r)/a,c[h+1]=(m(this,sl)[h+1]-i)/o;
55if(c[c.length-2]=(m(this,fh)-r)/a,c[c.length-1]=(m(this,ph)-i)/o,isNaN(n[6])&&!this.isEmpty())return oe(this,nr,E3).call(this,c);const l=new Float32Array(m(this,Po).length+24+m(this,$s).length);let u=e.length;for(let h=0;h<u;h+=2){if(isNaN(e[h])){l[h]=l[h+1]=NaN;continue}l[h]=e[h],l[h+1]=e[h+1]}u=oe(this,nr,C3).call(this,l,u);for(let h=t.length-6;h>=6;h-=6)for(let f=0;f<6;f+=2){if(isNaN(t[h+f])){l[u]=l[u+1]=NaN,u+=2;continue}l[u]=t[h+f],l[u+1]=t[h+f+1],u+=2}return oe(this,nr,D3).call(this,l,u),this.newFreeDrawOutline(l,c,m(this,Li),m(this,sp),m(this,rp),m(this,ip))}};Li=new WeakMap,$s=new WeakMap,rp=new WeakMap,ip=new WeakMap,Po=new WeakMap,kt=new WeakMap,fh=new WeakMap,ph=new WeakMap,Oy=new WeakMap,Ly=new WeakMap,sp=new WeakMap,op=new WeakMap,sl=new WeakMap,By=new WeakMap,pv=new WeakMap,gv=new WeakMap,nr=new WeakSet,Ig=function(){const e=m(this,kt).subarray(4,6),t=m(this,kt).subarray(16,18),[n,r,i,a]=m(this,Li);return[(m(this,fh)+(e[0]-t[0])/2-n)/i,(m(this,ph)+(e[1]-t[1])/2-r)/a,(m(this,fh)+(t[0]-e[0])/2-n)/i,(m(this,ph)+(t[1]-e[1])/2-r)/a]},_3=function(){const[e,t,n,r]=m(this,Li),[i,a,o,c]=oe(this,nr,Ig).call(this);return`M${(m(this,kt)[2]-e)/n} ${(m(this,kt)[3]-t)/r} L${(m(this,kt)[4]-e)/n} ${(m(this,kt)[5]-t)/r} L${i} ${a} L${o} ${c} L${(m(this,kt)[16]-e)/n} ${(m(this,kt)[17]-t)/r} L${(m(this,kt)[14]-e)/n} ${(m(this,kt)[15]-t)/r} Z`},T3=function(e){const t=m(this,$s);e.push(`L${t[4]} ${t[5]} Z`)},S3=function(e){const[t,n,r,i]=m(this,Li),a=m(this,kt).subarray(4,6),o=m(this,kt).subarray(16,18),[c,l,u,d]=oe(this,nr,Ig).call(this);e.push(`L${(a[0]-t)/r} ${(a[1]-n)/i} L${c} ${l} L${u} ${d} L${(o[0]-t)/r} ${(o[1]-n)/i}`)},E3=function(e){const t=m(this,kt),[n,r,i,a]=m(this,Li),[o,c,l,u]=oe(this,nr,Ig).call(this),d=new Float32Array(36);return d.set([NaN,NaN,NaN,NaN,(t[2]-n)/i,(t[3]-r)/a,NaN,NaN,NaN,NaN,(t[4]-n)/i,(t[5]-r)/a,NaN,NaN,NaN,NaN,o,c,NaN,NaN,NaN,NaN,l,u,NaN,NaN,NaN,NaN,(t[16]-n)/i,(t[17]-r)/a,NaN,NaN,NaN,NaN,(t[14]-n)/i,(t[15]-r)/a],0),this.newFreeDrawOutline(d,e,m(this,Li),m(this,sp),m(this,rp),m(this,ip))},D3=function(e,t){const n=m(this,$s);return e.set([NaN,NaN,NaN,NaN,n[4],n[5]],t),t+=6},C3=function(e,t){const n=m(this,kt).subarray(4,6),r=m(this,kt).subarray(16,18),[i,a,o,c]=m(this,Li),[l,u,d,h]=oe(this,nr,Ig).call(this);return e.set([NaN,NaN,NaN,NaN,(n[0]-i)/o,(n[1]-a)/c,NaN,NaN,NaN,NaN,l,u,NaN,NaN,NaN,NaN,d,h,NaN,NaN,NaN,NaN,(r[0]-i)/o,(r[1]-a)/c],t),t+=24},J(ya,By,8),J(ya,pv,2),J(ya,gv,m(ya,By)+m(ya,pv));let b1=ya;var ap,gh,$a,Wy,Bi,jy,Ln,mv,k3;class A3 extends tt{constructor(t,n,r,i,a,o){super();J(this,mv);J(this,ap);J(this,gh,new Float32Array(4));J(this,$a);J(this,Wy);J(this,Bi);J(this,jy);J(this,Ln);z(this,Ln,t),z(this,Bi,n),z(this,ap,r),z(this,jy,i),z(this,$a,a),z(this,Wy,o),this.firstPoint=[NaN,NaN],this.lastPoint=[NaN,NaN],oe(this,mv,k3).call(this,o);const[c,l,u,d]=m(this,gh);for(let h=0,f=t.length;h<f;h+=2)t[h]=(t[h]-c)/u,t[h+1]=(t[h+1]-l)/d;for(let h=0,f=n.length;h<f;h+=2)n[h]=(n[h]-c)/u,n[h+1]=(n[h+1]-l)/d}toSVGPath(){const t=[`M${m(this,Ln)[4]} ${m(this,Ln)[5]}`];for(let n=6,r=m(this,Ln).length;n<r;n+=6){if(isNaN(m(this,Ln)[n])){t.push(`L${m(this,Ln)[n+4]} ${m(this,Ln)[n+5]}`);continue}t.push(`C${m(this,Ln)[n]} ${m(this,Ln)[n+1]} ${m(this,Ln)[n+2]} ${m(this,Ln)[n+3]} ${m(this,Ln)[n+4]} ${m(this,Ln)[n+5]}`)}return t.push("Z"),t.join(" ")}serialize([t,n,r,i],a){const o=r-t,c=i-n;let l,u;switch(a){case 0:l=tt._rescale(m(this,Ln),t,i,o,-c),u=tt._rescale(m(this,Bi),t,i,o,-c);break;case 90:l=tt._rescaleAndSwap(m(this,Ln),t,n,o,c),u=tt._rescaleAndSwap(m(this,Bi),t,n,o,c);break;case 180:l=tt._rescale(m(this,Ln),r,n,-o,c),u=tt._rescale(m(this,Bi),r,n,-o,c);break;case 270:l=tt._rescaleAndSwap(m(this,Ln),r,i,-o,-c),u=tt._rescaleAndSwap(m(this,Bi),r,i,-o,-c);break}return{outline:Array.from(l),points:[Array.from(u)]}}get box(){return m(this,gh)}newOutliner(t,n,r,i,a,o=0){return new b1(t,n,r,i,a,o)}getNewOutline(t,n){const[r,i,a,o]=m(this,gh),[c,l,u,d]=m(this,ap),h=a*u,f=o*d,p=r*u+c,y=i*d+l,g=this.newOutliner({x:m(this,Bi)[0]*h+p,y:m(this,Bi)[1]*f+y},m(this,ap),m(this,jy),t,m(this,Wy),n??m(this,$a));for(let b=2;b<m(this,Bi).length;b+=2)g.add({x:m(this,Bi)[b]*h+p,y:m(this,Bi)[b+1]*f+y});return g.getOutlines()}}ap=new WeakMap,gh=new WeakMap,$a=new WeakMap,Wy=new WeakMap,Bi=new WeakMap,jy=new WeakMap,Ln=new WeakMap,mv=new WeakSet,k3=function(t){const n=m(this,Ln);let r=n[4],i=n[5];const a=[r,i,r,i];let o=r,c=i,l=r,u=i;const d=t?Math.max:Math.min,h=new Float32Array(4);for(let p=6,y=n.length;p<y;p+=6){const g=n[p+4],b=n[p+5];isNaN(n[p])?(Ge.pointBoundingBox(g,b,a),c>b?(o=g,c=b):c===b&&(o=d(o,g)),u<b?(l=g,u=b):u===b&&(l=d(l,g))):(h[0]=h[1]=1/0,h[2]=h[3]=-1/0,Ge.bezierBoundingBox(r,i,...n.slice(p,p+6),h),Ge.rectBoundingBox(
55h[0],h[1],h[2],h[3],a),c>h[1]?(o=h[0],c=h[1]):c===h[1]&&(o=d(o,h[0])),u<h[3]?(l=h[2],u=h[3]):u===h[3]&&(l=d(l,h[2]))),r=g,i=b}const f=m(this,gh);f[0]=a[0]-m(this,$a),f[1]=a[1]-m(this,$a),f[2]=a[2]-a[0]+2*m(this,$a),f[3]=a[3]-a[1]+2*m(this,$a),this.firstPoint=[o,c],this.lastPoint=[l,u]};var zy,Hy,$y,ol,Ks,oi,N3,H0,F3,U3,aS;class oS{constructor(e,t=0,n=0,r=!0){J(this,oi);J(this,zy);J(this,Hy);J(this,$y);J(this,ol,[]);J(this,Ks,[]);const i=[1/0,1/0,-1/0,-1/0],a=10**-4;for(const{x:y,y:g,width:b,height:v}of e){const x=Math.floor((y-t)/a)*a,w=Math.ceil((y+b+t)/a)*a,_=Math.floor((g-t)/a)*a,T=Math.ceil((g+v+t)/a)*a,S=[x,_,T,!0],C=[w,_,T,!1];m(this,ol).push(S,C),Ge.rectBoundingBox(x,_,w,T,i)}const o=i[2]-i[0]+2*n,c=i[3]-i[1]+2*n,l=i[0]-n,u=i[1]-n;let d=r?-1/0:1/0,h=1/0;const f=m(this,ol).at(r?-1:-2),p=[f[0],f[2]];for(const y of m(this,ol)){const[g,b,v,x]=y;!x&&r?b<h?(h=b,d=g):b===h&&(d=Math.max(d,g)):x&&!r&&(b<h?(h=b,d=g):b===h&&(d=Math.min(d,g))),y[0]=(g-l)/o,y[1]=(b-u)/c,y[2]=(v-u)/c}z(this,zy,new Float32Array([l,u,o,c])),z(this,Hy,[d,h]),z(this,$y,p)}getOutlines(){m(this,ol).sort((t,n)=>t[0]-n[0]||t[1]-n[1]||t[2]-n[2]);const e=[];for(const t of m(this,ol))t[3]?(e.push(...oe(this,oi,aS).call(this,t)),oe(this,oi,F3).call(this,t)):(oe(this,oi,U3).call(this,t),e.push(...oe(this,oi,aS).call(this,t)));return oe(this,oi,N3).call(this,e)}}zy=new WeakMap,Hy=new WeakMap,$y=new WeakMap,ol=new WeakMap,Ks=new WeakMap,oi=new WeakSet,N3=function(e){const t=[],n=new Set;for(const a of e){const[o,c,l]=a;t.push([o,c,a],[o,l,a])}t.sort((a,o)=>a[1]-o[1]||a[0]-o[0]);for(let a=0,o=t.length;a<o;a+=2){const c=t[a][2],l=t[a+1][2];c.push(l),l.push(c),n.add(c),n.add(l)}const r=[];let i;for(;n.size>0;){const a=n.values().next().value;let[o,c,l,u,d]=a;n.delete(a);let h=o,f=c;for(i=[o,l],r.push(i);;){let p;if(n.has(u))p=u;else if(n.has(d))p=d;else break;n.delete(p),[o,c,l,u,d]=p,h!==o&&(i.push(h,f,o,f===c?c:l),h=o),f=f===c?l:c}i.push(h,f)}return new hP(r,m(this,zy),m(this,Hy),m(this,$y))},H0=function(e){const t=m(this,Ks);let n=0,r=t.length-1;for(;n<=r;){const i=n+r>>1,a=t[i][0];if(a===e)return i;a<e?n=i+1:r=i-1}return r+1},F3=function([,e,t]){const n=oe(this,oi,H0).call(this,e);m(this,Ks).splice(n,0,[e,t])},U3=function([,e,t]){const n=oe(this,oi,H0).call(this,e);for(let r=n;r<m(this,Ks).length;r++){const[i,a]=m(this,Ks)[r];if(i!==e)break;if(i===e&&a===t){m(this,Ks).splice(r,1);return}}for(let r=n-1;r>=0;r--){const[i,a]=m(this,Ks)[r];if(i!==e)break;if(i===e&&a===t){m(this,Ks).splice(r,1);return}}},aS=function(e){const[t,n,r]=e,i=[[t,n,r]],a=oe(this,oi,H0).call(this,r);for(let o=0;o<a;o++){const[c,l]=m(this,Ks)[o];for(let u=0,d=i.length;u<d;u++){const[,h,f]=i[u];if(!(l<=h||f<=c)){if(h>=c){if(f>l)i[u][1]=l;else{if(d===1)return[];i.splice(u,1),u--,d--}continue}i[u][2]=c,f>l&&i.push([t,l,f])}}}return i};var Ky,cp;class hP extends tt{constructor(t,n,r,i){super();J(this,Ky);J(this,cp);z(this,cp,t),z(this,Ky,n),this.firstPoint=r,this.lastPoint=i}toSVGPath(){const t=[];for(const n of m(this,cp)){let[r,i]=n;t.push(`M${r} ${i}`);for(let a=2;a<n.length;a+=2){const o=n[a],c=n[a+1];o===r?(t.push(`V${c}`),i=c):c===i&&(t.push(`H${o}`),r=o)}t.push("Z")}return t.join(" ")}serialize([t,n,r,i],a){const o=[],c=r-t,l=i-n;for(const u of m(this,cp)){const d=new Array(u.length);for(let h=0;h<u.length;h+=2)d[h]=t+u[h]*c,d[h+1]=i-u[h+1]*l;o.push(d)}return o}get box(){return m(this,Ky)}get classNamesForOutlining(){return["highlightOutline"]}}Ky=new WeakMap,cp=new WeakMap;class cS extends b1{newFreeDrawOutline(e,t,n,r,i,a){return new dP(e,t,n,r,i,a)}}class dP extends A3{newOutliner(e,t,n,r,i,a=0){return new cS(e,t,n,r,i,a)}}var lp,Xy,Ka,mh,Vy,gi,Gy,qy,yh,Wi,ji,xr,up,hp,Or,dp,ms,Yy,Dt,lS,$0,R3,I3,M3,uS,eu,ws,Dd,P3,K0,X0,O3,L3,B3,W3,j3;const Ot=class Ot extends pn{constructor(t){super({...t,name:"highlightEditor"});J(this,Dt);J(this,lp,null);J(this,Xy,0);J(this,Ka);J(this,mh,null);J(this,Vy,null);J(this,gi,null);J(this,Gy,null);J(this,qy,0);J(this,yh,null);J(this,Wi,null);J(this,ji,null);J(this,xr,!1);J(this,up,null);J(this,hp,null);J(this,Or,null);J(this,dp,"");J(this,ms);J(this,Yy,"");this.color=t.color||Ot._defaultColor,z(this,ms,t.thickness||Ot._defaultThickness),this.opacity=t.opacity||Ot._defaultOpacity,z(this,Ka,t.boxes||null),z(this,Yy,t.methodOfCreation||""),z(this,dp,t.text||""),this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",t.highlightId>-1?(z(this,xr,!0),oe(this,Dt,$0).call(this,t),oe(this,Dt,eu).call(this)):m(this,Ka)&&(z(this,lp,t.anchorNode),z(this,Xy,t.anchorOffset),z(this,Gy,t.focusNode),z(this,qy,t.focusOffset),oe(this,Dt,lS).call(this),oe(this,Dt,eu).call(this),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}static get _keyboardManager(){const t=Ot.prototype;return Tt(this,"_keyboardManager",new sb([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}get telemetryInitialData(){return{action:"added",type:m(this,xr)?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:m(this,ms),methodOfCreation:m(this,Yy)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}static computeTelemetryFinalData(t){return{numberOfColors:t.get("color").size}}static initialize(t,n){var r;pn.initialize(t,n),Ot._defaultColor||(Ot._defaultColor=((r=n.highlightColors)==null?void 0:r.values().next().value)||"#fff066")}static updateDefaultParams(t,n){switch(t){case Rt.HIGHLIGHT_COLOR:Ot._defaultColor=n;break;case Rt.HIGHLIGHT_THICKNESS:Ot._defaultThickness=n;break}}translateInPage(t,n){}get toolbarPosition(){return m(this,hp)}get commentButtonPosition(){return m(this,up)}updateParams(t,n){switch(t){case Rt.HIGHLIGHT_COLOR:oe(this,Dt,R3).call(this,n);break;case Rt.HIGHLIGHT_THICKNESS:oe(this,Dt,I3).call(this,n);break}}static get defaultPropertiesToUpdate(){return[[Rt.HIGHLIGHT_COLOR,Ot._defaultColor],[Rt.HIGHLIGHT_THICKNESS,Ot._defaultThickness]]}get propertiesToUpdate(){return[[Rt.HIGHLIGHT_COLOR,this.color||Ot._defaultColor],[Rt.HIGHLIGHT_THICKNESS,m(this,ms)||Ot._defaultThickness],[Rt.HIGHLIGHT_FREE,m(this,xr)]]}onUpdatedColor(){var t,n;(t=this.parent)==null||t.drawLayer.updateProperties(m(this,ji),{root:{fill:this.color,"fill-opacity":this.opacity}}),(n=m(this,Vy))==null||n.updateColor(this.color),super.onUpdatedColor()}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",z(this,Vy,new i3({editor:this}))]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(oe(this,Dt,X0).call(this))}getBaseTranslation(){return[0,0]}getRect(t,n){return super.getRect(t,n,oe(this,Dt,X0).call(this))}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),t&&this.div.focus()}remove(){oe(this,Dt,uS).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(oe(this,Dt,eu).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){var r;let n=!1;this.parent&&!t?oe(this,Dt,uS).call(this):t&&(oe(this,Dt,eu).call(this,t),n=!this.parent&&((r=this.div)==null?void 0:r.classList.contains("selectedEditor"))),super.setParent(t),this.show(this._isVisible),n&&this.select()}rotate(t){var i,a,o;const{drawLayer:n}=this.parent;let r;m(this,xr)?(t=(t-this.rotation+360)%360,r=oe(i=Ot,ws,Dd).call(i,m(this,Wi).box,t)):r=oe(a=Ot,ws,Dd).call(a,[this.x,this.y,this.width,this.height],t),n.updateProperties(m(this,ji),{bbox:r,root:{"data-main-rotation":t}}),n.updateProperties(m(this,Or),{bbox:oe(o=Ot,ws,Dd).call(o,m(this,gi).box,t),root:{"data-main-rotation":t}})}
55render(){if(this.div)return this.div;const t=super.render();m(this,dp)&&(t.setAttribute("aria-label",m(this,dp)),t.setAttribute("role","mark")),m(this,xr)?t.classList.add("free"):this.div.addEventListener("keydown",oe(this,Dt,P3).bind(this),{signal:this._uiManager._signal});const n=z(this,yh,document.createElement("div"));return t.append(n),n.setAttribute("aria-hidden","true"),n.className="internal",n.style.clipPath=m(this,mh),this.setDims(),VN(this,m(this,yh),["pointerover","pointerleave"]),this.enableEditing(),t}pointerover(){var t;this.isSelected||(t=this.parent)==null||t.drawLayer.updateProperties(m(this,Or),{rootClass:{hovered:!0}})}pointerleave(){var t;this.isSelected||(t=this.parent)==null||t.drawLayer.updateProperties(m(this,Or),{rootClass:{hovered:!1}})}_moveCaret(t){switch(this.parent.unselect(this),t){case 0:case 2:oe(this,Dt,K0).call(this,!0);break;case 1:case 3:oe(this,Dt,K0).call(this,!1);break}}select(){var t;super.select(),m(this,Or)&&((t=this.parent)==null||t.drawLayer.updateProperties(m(this,Or),{rootClass:{hovered:!1,selected:!0}}))}unselect(){var t;super.unselect(),m(this,Or)&&((t=this.parent)==null||t.drawLayer.updateProperties(m(this,Or),{rootClass:{selected:!1}}),m(this,xr)||oe(this,Dt,K0).call(this,!1))}get _mustFixPosition(){return!m(this,xr)}show(t=this._isVisible){super.show(t),this.parent&&(this.parent.drawLayer.updateProperties(m(this,ji),{rootClass:{hidden:!t}}),this.parent.drawLayer.updateProperties(m(this,Or),{rootClass:{hidden:!t}}))}static startHighlighting(t,n,{target:r,x:i,y:a}){const{x:o,y:c,width:l,height:u}=r.getBoundingClientRect(),d=new AbortController,h=t.combinedSignal(d),f=p=>{d.abort(),oe(this,ws,W3).call(this,t,p)};window.addEventListener("blur",f,{signal:h}),window.addEventListener("pointerup",f,{signal:h}),window.addEventListener("pointerdown",In,{capture:!0,passive:!1,signal:h}),window.addEventListener("contextmenu",Es,{signal:h}),r.addEventListener("pointermove",oe(this,ws,B3).bind(this,t),{signal:h}),this._freeHighlight=new cS({x:i,y:a},[o,c,l,u],t.scale,this._defaultThickness/2,n,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=t.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static async deserialize(t,n,r){var g,b,v,x;let i=null;if(t instanceof g3){const{data:{quadPoints:w,rect:_,rotation:T,id:S,color:C,opacity:D,popupRef:N,richText:M,contentsObj:F,creationDate:L,modificationDate:A},parent:{page:{pageNumber:X}}}=t;i=t={annotationType:yt.HIGHLIGHT,color:Array.from(C),opacity:D,quadPoints:w,boxes:null,pageIndex:X-1,rect:_.slice(0),rotation:T,annotationElementId:S,id:S,deleted:!1,popupRef:N,richText:M,comment:(F==null?void 0:F.str)||null,creationDate:L,modificationDate:A}}else if(t instanceof LE){const{data:{inkLists:w,rect:_,rotation:T,id:S,color:C,borderStyle:{rawWidth:D},popupRef:N,richText:M,contentsObj:F,creationDate:L,modificationDate:A},parent:{page:{pageNumber:X}}}=t;i=t={annotationType:yt.HIGHLIGHT,color:Array.from(C),thickness:D,inkLists:w,boxes:null,pageIndex:X-1,rect:_.slice(0),rotation:T,annotationElementId:S,id:S,deleted:!1,popupRef:N,richText:M,comment:(F==null?void 0:F.str)||null,creationDate:L,modificationDate:A}}const{color:a,quadPoints:o,inkLists:c,outlines:l,opacity:u}=t,d=await super.deserialize(t,n,r);d.color=Ge.makeHexColor(...a),d.opacity=u||1,c&&z(d,ms,t.thickness),d._initialData=i,t.comment&&d.setCommentData(t);const[h,f]=d.pageDimensions,[p,y]=d.pageTranslation;if(o){const w=z(d,Ka,[]);for(let _=0;_<o.length;_+=8)w.push({x:(o[_]-p)/h,y:1-(o[_+1]-y)/f,width:(o[_+2]-o[_])/h,height:(o[_+1]-o[_+5])/f});oe(g=d,Dt,lS).call(g),oe(b=d,Dt,eu).call(b),d.rotate(d.rotation)}else if(c||l){z(d,xr,!0);const w=(c||l.points)[0],_={x:w[0]-p,y:f-(w[1]-y)},T=new cS(_,[0,0,h,f],1,m(d,ms)/2,!0,.001);for(let D=0,N=w.length;D<N;D+=2)_.x=w[D]-p,_.y=f-(w[D+1]-y),T.add(_);const{id:S,clipPathId:C}=n.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:d.color,"fill-opacity":d._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:T.toSVGPath()}},!0,!0);oe(v=d,Dt,$0).call(v,{highlightOutlines:T.getOutlines(),highlightId:S,clipPathId:C}),oe(x=d,Dt,eu).call(x),d.rotate(d.parentRotation)}return d}serialize(t=!1){if(this.isEmpty()||t)return null;if(this.deleted)return this.serializeDeleted();const n=pn._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),r=super.serialize(t);return Object.assign(r,{color:n,opacity:this.opacity,thickness:m(this,ms),quadPoints:oe(this,Dt,O3).call(this),outlines:oe(this,Dt,L3).call(this,r.rect)}),this.addComment(r),this.annotationElementId&&!oe(this,Dt,j3).call(this,r)?null:(r.id=this.annotationElementId,r)}renderAnnotationElement(t){return this.deleted?(t.hide(),null):(t.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}static canCreateNewEmptyEditor(){return!1}};lp=new WeakMap,Xy=new WeakMap,Ka=new WeakMap,mh=new WeakMap,Vy=new WeakMap,gi=new WeakMap,Gy=new WeakMap,qy=new WeakMap,yh=new WeakMap,Wi=new WeakMap,ji=new WeakMap,xr=new WeakMap,up=new WeakMap,hp=new WeakMap,Or=new WeakMap,dp=new WeakMap,ms=new WeakMap,Yy=new WeakMap,Dt=new WeakSet,lS=function(){const t=new oS(m(this,Ka),.001);z(this,Wi,t.getOutlines()),[this.x,this.y,this.width,this.height]=m(this,Wi).box;const n=new oS(m(this,Ka),.0025,.001,this._uiManager.direction==="ltr");z(this,gi,n.getOutlines());const{firstPoint:r}=m(this,Wi);z(this,up,[(r[0]-this.x)/this.width,(r[1]-this.y)/this.height]);const{lastPoint:i}=m(this,gi);z(this,hp,[(i[0]-this.x)/this.width,(i[1]-this.y)/this.height])},$0=function({highlightOutlines:t,highlightId:n,clipPathId:r}){var h,f;if(z(this,Wi,t),z(this,gi,t.getNewOutline(m(this,ms)/2+1.5,.0025)),n>=0)z(this,ji,n),z(this,mh,r),this.parent.drawLayer.finalizeDraw(n,{bbox:t.box,path:{d:t.toSVGPath()}}),z(this,Or,this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:m(this,gi).box,path:{d:m(this,gi).toSVGPath()}},!0));else if(this.parent){const p=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(m(this,ji),{bbox:oe(h=Ot,ws,Dd).call(h,m(this,Wi).box,(p-this.rotation+360)%360),path:{d:t.toSVGPath()}}),this.parent.drawLayer.updateProperties(m(this,Or),{bbox:oe(f=Ot,ws,Dd).call(f,m(this,gi).box,p),path:{d:m(this,gi).toSVGPath()}})}const[a,o,c,l]=t.box;switch(this.rotation){case 0:this.x=a,this.y=o,this.width=c,this.height=l;break;case 90:{const[p,y]=this.parentDimensions;this.x=o,this.y=1-a,this.width=c*y/p,this.height=l*p/y;break}case 180:this.x=1-a,this.y=1-o,this.width=c,this.height=l;break;case 270:{const[p,y]=this.parentDimensions;this.x=1-o,this.y=a,this.width=c*y/p,this.height=l*p/y;break}}const{firstPoint:u}=t;z(this,up,[(u[0]-a)/c,(u[1]-o)/l]);const{lastPoint:d}=m(this,gi);z(this,hp,[(d[0]-a)/c,(d[1]-o)/l])},R3=function(t){const n=(a,o)=>{this.color=a,this.opacity=o,this.onUpdatedColor()},r=this.color,i=this.opacity;this.addCommands({cmd:n.bind(this,t,Ot._defaultOpacity),undo:n.bind(this,r,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Rt.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(t)},!0)},I3=function(t){const n=m(this,ms),r=i=>{z(this,ms,i),oe(this,Dt,M3).call(this,i)};this.addCommands({cmd:r.bind(this,t),undo:r.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Rt.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:t},!0)},M3=function(t){m(this,xr)&&(oe(this,Dt,$0).call(this,{highlightOutlines:m(this,Wi).getNewOutline(t/2)}),this.fixAndSetPosition(),this.setDims())},uS=function(){m(this,ji)===null||!this.parent||(this.parent.drawLayer.remove(m(this,ji)),z(this,ji,null),this.parent.drawLayer.remove(m(this,Or)),z(this,Or,null))},eu=function(t=this.parent){m(this,ji)===null&&({id:zn(this,ji)._,clipPathId:zn(this,mh)._}=t.drawLayer.draw({bbox:m(this,Wi).box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.opacity},rootClass:{highlight:!0,free:m(this,xr)},path:{d:m(this,Wi).toSVGPath()}},!1,!0),z(this,Or,t.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:m(this,xr)},bbox:m(this,gi).box,path:{d:m(this,gi).toSVGPath()}},m(this,xr))),m(this,yh)&&(m(this,yh).style.clipPath=m(this,mh)))},ws=new WeakSet,Dd=function([t,n,r,i],a){switch(a){case 90:return[1-n-i,t,i,r];case 180:return[1-t-r,1-n-i,r,i];case 270:return[n,1-t-r,i,r]}return[t,n,r,i]},P3=function(t){Ot._keyboardManager.exec(this,t)},K0=function(t){if(!m(this,lp))return;const n=window.getSelection();t?n.setPosition(m(this,lp),m(this,Xy)):n.setPosition(m(this,Gy),m(this,qy))},X0=function(){return m(this,xr)?this.rotation:0},O3=function(){if(m(this,xr))return null;const[t,n]=this.pageDimensions,[r,i]=this.pageTranslation,a=m(this,Ka),o=new Float32Array(a.length*8);let c=0;for(const{x:l,y:u,width:d,height:h}of a){const f=l*t+r,p=(1-u)*n+i;o[c]=o[c+4]=f,o[c+1]=o[c+3]=p,o[c+2]=o[c+6]=f+d*t,o[c+5]=o[c+7]=p-h*n,c+=8}return o},L3=function(t){return m(this,Wi).serialize(t,oe(this,Dt,X0).call(this))},B3=function(t,n){this._freeHighlight.add(n)&&t.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})},W3=function(t,n){this._freeHighlight.isEmpty()?t.drawLayer.remove(this._freeHighlightId):t.createAndAddNewEditor(n,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""},j3=function(t){const{color:n}=this._initialData;return this.hasEditedComment||t.color.some((r,i)=>r!==n[i])},J(Ot,ws),be(Ot,"_defaultColor",null),be(Ot,"_defaultOpacity",1),be(Ot,"_defaultThickness",12),be(Ot,"_type","highlight"),be(Ot,"_editorType",yt.HIGHLIGHT),be(Ot,"_freeHighlightId",-1),be(Ot,"_freeHighlight",null),be(Ot,"_freeHighlightClipId","");let v1=Ot;var bh;class z3{constructor(){J(this,bh,Object.create(null))}updateProperty(e,t){this[e]=t,this.updateSVGProperty(e,t)}updateProperties(e){if(e)for(const[t,n]of Object.entries(e))t.startsWith("_")||this.updateProperty(t,n)}updateSVGProperty(e,t){m(this,bh)[e]=t}toSVGProperties(){const e=m(this,bh);return z(this,bh,Object.create(null)),{root:e}}reset(){z(this,bh,Object.create(null))}updateAll(e=this){this.updateProperties(e)}clone(){zt("Not implemented")}}bh=new WeakMap;var zi,fp,ar,vh,wh,It,hS,dS,fS,Mg,H3,V0,Pg,Cd;const Ut=class Ut extends pn{constructor(t){super(t);J(this,It);J(this,zi,null);J(this,fp);be(this,"_colorPicker",null);be(this,"_drawId",null);z(this,fp,t.mustBeCommitted||!1),this._addOutlines(t)}onUpdatedColor(){var t;(t=this._colorPicker)==null||t.update(this.color),super.onUpdatedColor()}
55_addOutlines(t){t.drawOutlines&&(oe(this,It,hS).call(this,t),oe(this,It,Mg).call(this))}static _mergeSVGProperties(t,n){const r=new Set(Object.keys(t));for(const[i,a]of Object.entries(n))r.has(i)?Object.assign(t[i],a):t[i]=a;return t}static getDefaultDrawingOptions(t){zt("Not implemented")}static get typesMap(){zt("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(t,n){const r=this.typesMap.get(t);r&&this._defaultDrawingOptions.updateProperty(r,n),this._currentParent&&(m(Ut,ar).updateProperty(r,n),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(t,n){const r=this.constructor.typesMap.get(t);r&&this._updateProperty(t,r,n)}static get defaultPropertiesToUpdate(){const t=[],n=this._defaultDrawingOptions;for(const[r,i]of this.typesMap)t.push([r,n[i]]);return t}get propertiesToUpdate(){const t=[],{_drawingOptions:n}=this;for(const[r,i]of this.constructor.typesMap)t.push([r,n[i]]);return t}_updateProperty(t,n,r){const i=this._drawingOptions,a=i[n],o=c=>{var u;i.updateProperty(n,c);const l=m(this,zi).updateProperty(n,c);l&&oe(this,It,Pg).call(this,l),(u=this.parent)==null||u.drawLayer.updateProperties(this._drawId,i.toSVGProperties()),t===this.colorType&&this.onUpdatedColor()};this.addCommands({cmd:o.bind(this,r),undo:o.bind(this,a),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:t,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,Ut._mergeSVGProperties(m(this,zi).getPathResizingSVGProperties(oe(this,It,V0).call(this)),{bbox:oe(this,It,Cd).call(this)}))}_onResized(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,Ut._mergeSVGProperties(m(this,zi).getPathResizedSVGProperties(oe(this,It,V0).call(this)),{bbox:oe(this,It,Cd).call(this)}))}_onTranslating(t,n){var r;(r=this.parent)==null||r.drawLayer.updateProperties(this._drawId,{bbox:oe(this,It,Cd).call(this)})}_onTranslated(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,Ut._mergeSVGProperties(m(this,zi).getPathTranslatedSVGProperties(oe(this,It,V0).call(this),this.parentDimensions),{bbox:oe(this,It,Cd).call(this)}))}_onStartDragging(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){var t;(t=this.parent)==null||t.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,m(this,fp)&&(z(this,fp,!1),this.commit(),this.parent.setSelected(this),t&&this.isOnScreen&&this.div.focus())}remove(){oe(this,It,fS).call(this),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(oe(this,It,Mg).call(this),oe(this,It,Pg).call(this,m(this,zi).box),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){var r;let n=!1;this.parent&&!t?(this._uiManager.removeShouldRescale(this),oe(this,It,fS).call(this)):t&&(this._uiManager.addShouldRescale(this),oe(this,It,Mg).call(this,t),n=!this.parent&&((r=this.div)==null?void 0:r.classList.contains("selectedEditor"))),super.setParent(t),n&&this.select()}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,Ut._mergeSVGProperties({bbox:oe(this,It,Cd).call(this)},m(this,zi).updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&oe(this,It,Pg).call(this,m(this,zi).updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let t,n;this._isCopy&&(t=this.x,n=this.y);const r=super.render();r.classList.add("draw");const i=document.createElement("div");return r.append(i),i.setAttribute("aria-hidden","true"),i.className="internal",this.setDims(),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(t,n),r}static createDrawerInstance(t,n,r,i,a){zt("Not implemented")}static startDrawing(t,n,r,i){var g;const{target:a,offsetX:o,offsetY:c,pointerId:l,pointerType:u}=i;if(Rr.isInitializedAndDifferentPointerType(u))return;const{viewport:{rotation:d}}=t,{width:h,height:f}=a.getBoundingClientRect(),p=z(Ut,vh,new AbortController),y=t.combinedSignal(p);if(Rr.setPointer(u,l),window.addEventListener("pointerup",b=>{Rr.isSamePointerIdOrRemove(b.pointerId)&&this._endDraw(b)},{signal:y}),window.addEventListener("pointercancel",b=>{Rr.isSamePointerIdOrRemove(b.pointerId)&&this._currentParent.endDrawingSession()},{signal:y}),window.addEventListener("pointerdown",b=>{Rr.isSamePointerType(b.pointerType)&&(Rr.initializeAndAddPointerId(b.pointerId),m(Ut,ar).isCancellable()&&(m(Ut,ar).removeLastElement(),m(Ut,ar).isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:y}),window.addEventListener("contextmenu",Es,{signal:y}),a.addEventListener("pointermove",this._drawMove.bind(this),{signal:y}),a.addEventListener("touchmove",b=>{Rr.isSameTimeStamp(b.timeStamp)&&In(b)},{signal:y}),t.toggleDrawing(),(g=n._editorUndoBar)==null||g.hide(),m(Ut,ar)){t.drawLayer.updateProperties(this._currentDrawId,m(Ut,ar).startNew(o,c,h,f,d));return}n.updateUIForDefaultProperties(this),z(Ut,ar,this.createDrawerInstance(o,c,h,f,d)),z(Ut,wh,this.getDefaultDrawingOptions()),this._currentParent=t,{id:this._currentDrawId}=t.drawLayer.draw(this._mergeSVGProperties(m(Ut,wh).toSVGProperties(),m(Ut,ar).defaultSVGProperties),!0,!1)}static _drawMove(t){if(Rr.isSameTimeStamp(t.timeStamp),!m(Ut,ar))return;const{offsetX:n,offsetY:r,pointerId:i}=t;if(Rr.isSamePointerId(i)){if(Rr.isUsingMultiplePointers()){this._endDraw(t);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,m(Ut,ar).add(n,r)),Rr.setTimeStamp(t.timeStamp),In(t)}}static _cleanup(t){t&&(this._currentDrawId=-1,this._currentParent=null,z(Ut,ar,null),z(Ut,wh,null),Rr.clearTimeStamp()),m(Ut,vh)&&(m(Ut,vh).abort(),z(Ut,vh,null),Rr.clearPointerIds())}static _endDraw(t){const n=this._currentParent;if(n){if(n.toggleDrawing(!0),this._cleanup(!1),(t==null?void 0:t.target)===n.div&&n.drawLayer.updateProperties(this._currentDrawId,m(Ut,ar).end(t.offsetX,t.offsetY)),this.supportMultipleDrawings){const r=m(Ut,ar),i=this._currentDrawId,a=r.getLastElement();n.addCommands({cmd:()=>{n.drawLayer.updateProperties(i,r.setLastElement(a))},undo:()=>{n.drawLayer.updateProperties(i,r.removeLastElement())},mustExec:!1,type:Rt.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(t){const n=this._currentParent;if(!n)return null;if(n.toggleDrawing(!0),n.cleanUndoStack(Rt.DRAW_STEP),!m(Ut,ar).isEmpty()){const{pageDimensions:[r,i],scale:a}=n,o=n.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:m(Ut,ar).getOutlines(r*a,i*a,a,this._INNER_MARGIN),drawingOptions:m(Ut,wh),mustBeCommitted:!t});return this._cleanup(!0),o}return n.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(t){}static deserializeDraw(t,n,r,i,a,o){zt("Not implemented")}static async deserialize(t,n,r){var d,h;const{rawDims:{pageWidth:i,pageHeight:a,pageX:o,pageY:c}}=n.viewport,l=this.deserializeDraw(o,c,i,a,this._INNER_MARGIN,t),u=await super.deserialize(t,n,r);return u.createDrawingOptions(t),oe(d=u,It,hS).call(d,{drawOutlines:l}),oe(h=u,It,Mg).call(h),u.onScaleChanging(),u.rotate(),u}serializeDraw(t){const[n,r]=this.pageTranslation,[i,a]=this.pageDimensions;return m(this,zi).serialize([n,r,i,a],t)}renderAnnotationElement(t){return t.updateEdited({rect:this.getPDFRect()}),null}static canCreateNewEmptyEditor(){return!1}};zi=new WeakMap,fp=new WeakMap,ar=new WeakMap,vh=new WeakMap,wh=new WeakMap,It=new WeakSet,hS=function({drawOutlines:t,drawId:n,drawingOptions:r}){z(this,zi,t),this._drawingOptions||(this._drawingOptions=r),this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),n>=0?(this._drawId=n,this.parent.drawLayer.finalizeDraw(n,t.defaultProperties)):this._drawId=oe(this,It,dS).call(this,t,this.parent),oe(this,It,Pg).call(this,t.box)},dS=function(t,n){const{id:r}=n.drawLayer.draw(Ut._mergeSVGProperties(this._drawingOptions.toSVGProperties(),t.defaultSVGProperties),!1,!1);return r},fS=function(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())},Mg=function(t=this.parent){if(!(this._drawId!==null&&this.parent===t)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,t.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=oe(this,It,dS).call(this,m(this,zi),t)}},H3=function([t,n,r,i]){const{parentDimensions:[a,o],rotation:c}=this;switch(c){case 90:return[n,1-t,r*(o/a),i*(a/o)];case 180:return[1-t,1-n,r,i];case 270:return[1-n,t,r*(o/a),i*(a/o)];default:return[t,n,r,i]}},V0=function(){const{x:t,y:n,width:r,height:i,parentDimensions:[a,o],rotation:c}=this;switch(c){case 90:return[1-n,t,r*(a/o),i*(o/a)];case 180:return[1-t,1-n,r,i];case 270:return[n,1-t,r*(a/o),i*(o/a)];default:return[t,n,r,i]}},Pg=function(t){[this.x,this.y,this.width,this.height]=oe(this,It,H3).call(this,t),this.div&&(this.fixAndSetPosition(),this.setDims()),this._onResized()},Cd=function(){const{x:t,y:n,width:r,height:i,rotation:a,parentRotation:o,parentDimensions:[c,l]}=this;switch((a*4+o)/90){case 1:return[1-n-i,t,i,r];case 2:return[1-t-r,1-n-i,r,i];case 3:return[n,1-t-r,i,r];case 4:return[t,n-r*(c/l),i*(l/c),r*(c/l)];case 5:return[1-n,t,r*(c/l),i*(l/c)];case 6:return[1-t-i*(l/c),1-n,i*(l/c),r*(c/l)];case 7:return[n-r*(c/l),1-t-i*(l/c),r*(c/l),i*(l/c)];case 8:return[t-r,n-i,r,i];case 9:return[1-n,t-r,i,r];case 10:return[1-t,1-n,r,i];case 11:return[n-i,1-t,i,r];case 12:return[t-i*(l/c),n,i*(l/c),r*(c/l)];case 13:return[1-n-r*(c/l),t-i*(l/c),r*(c/l),i*(l/c)];case 14:return[1-t,1-n-r*(c/l),i*(l/c),r*(c/l)];case 15:return[n,1-t,r*(c/l),i*(l/c)];default:return[t,n,r,i]}},be(Ut,"_currentDrawId",-1),be(Ut,"_currentParent",null),J(Ut,ar,null),J(Ut,vh,null),J(Ut,wh,null),be(Ut,"_INNER_MARGIN",3);let w1=Ut;var Oo,cr,lr,xh,pp,Zr,_r,ys,_h,Th,Sh,gp,G0;class fP{constructor(e,t,n,r,i,a){J(this,gp);J(this,Oo,new Float64Array(6));J(this,cr);J(this,lr);J(this,xh);J(this,pp);J(this,Zr);J(this,_r,"");J(this,ys,0);J(this,_h,new ob);J(this,Th);J(this,Sh);z(this,Th,n),z(this,Sh,r),z(this,xh,i),z(this,pp,a),[e,t]=oe(this,gp,G0).call(this,e,t);const o=z(this,cr,[NaN,NaN,NaN,NaN,e,t]);z(this,Zr,[e,t]),z(this,lr,[{line:o,points:m(this,Zr)}]),m(this,Oo).set(o,0)}updateProperty(e,t){e==="stroke-width"&&z(this,pp,t)}isEmpty(){return!m(this,lr)||m(this,lr).length===0}isCancellable(){return m(this,Zr).length<=10}add(e,t){[e,t]=oe(this,gp,G0).call(this,e,t);const[n,r,i,a]=m(this,Oo).subarray(2,6),o=e-i,c=t-a;return Math.hypot(m(this,Th)*o,m(this,Sh)*c)<=2?null:(m(this,Zr).push(e,t),isNaN(n)?(m(this,Oo).set([i,a,e,t],2),m(this,cr).push(NaN,NaN,NaN,NaN,e,t),{path:{d:this.toSVGPath()}}):(isNaN(m(this,Oo)[0])&&m(this,cr).splice(6,6),m(this,Oo).set([n,r,i,a,e,t],0),m(this,cr).push(...tt.createBezierPoints(n,r,i,a,e,t)),{path:{d:this.toSVGPath()}}))}end(e,t){const n=this.add(e,t);return n||(m(this,Zr).length===2?{path:{d:this.toSVGPath()}}:null)}startNew(e,t,n,r,i){z(this,Th,n),z(this,Sh,r),z(this,xh,i),[e,t]=oe(this,gp,G0).call(this,e,t);const a=z(this,cr,[NaN,NaN,NaN,NaN,e,t]);z(this,Zr,[e,t]);const o=m(this,lr).at(-1);return o&&(o.line=new Float32Array(o.line),o.points=new Float32Array(o.points)),m(this,lr).push({line:a,points:m(this,Zr)}),m(this,Oo).set(a,0),z(this,ys,0),this.toSVGPath(),null}getLastElement(){return m(this,lr).at(-1)}setLastElement(e){return m(this,lr)?(m(this,lr).push(e),z(this,cr,e.line),z(this,Zr,e.points),z(this,ys,0),{path:{d:this.toSVGPath()}}):m(this,_h).setLastElement(e)}removeLastElement(){if(!m(this,lr))return m(this,_h).removeLastElement();m(this,lr).pop(),z(this,_r,"");for(let e=0,t=m(this,lr).length;e<t;e++){const{line:n,points:r}=m(this,lr)[e];z(this,cr,n),z(this,Zr,r),z(this,ys,0),this.toSVGPath()}return{path:{d:m(this,_r)}}}toSVGPath(){const e=tt.svgRound(m(this,cr)[4]),t=tt.svgRound(m(this,cr)[5]);if(m(this,Zr).length===2)return z(this,_r,`${m(this,_r)} M ${e} ${t} Z`),m(this,_r);if(m(this,Zr).length<=6){const r=m(this,_r).lastIndexOf("M");z(this,_r,`${m(this,_r).slice(0,r)} M ${e} ${t}`),z(this,ys,6)}if(m(this,Zr).length===4){const r=tt.svgRound(m(this,cr)[10]),i=tt.svgRound(m(this,cr)[11]);return z(this,_r,`${m(this,_r)} L ${r} ${i}`),z(this,ys,12),m(this,_r)}const n=[];m(this,ys)===0&&(n.push(`M ${e} ${t}`),z(this,ys,6));for(let r=m(this,ys),i=m(this,cr).length;r<i;r+=6){const[a,o,c,l,u,d]=m(this,cr).slice(r,r+6).map(tt.svgRound);n.push(`C${a} ${o} ${c} ${l} ${u} ${d}`)}return z(this,_r,m(this,_r)+n.join(" ")),z(this,ys,m(this,cr).length),m(this,_r)}getOutlines(e,t,n,r){const i=m(this,lr).at(-1);return i.line=new Float32Array(i.line),i.points=new Float32Array(i.points),m(this,_h).build(m(this,lr),e,t,n,m(this,xh),m(this,pp),r),z(this,Oo,null),z(this,cr,null),z(this,lr,null),z(this,_r,null),m(this,_h)}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}
55Oo=new WeakMap,cr=new WeakMap,lr=new WeakMap,xh=new WeakMap,pp=new WeakMap,Zr=new WeakMap,_r=new WeakMap,ys=new WeakMap,_h=new WeakMap,Th=new WeakMap,Sh=new WeakMap,gp=new WeakSet,G0=function(e,t){return tt._normalizePoint(e,t,m(this,Th),m(this,Sh),m(this,xh))};var Jr,Zy,Jy,Hi,Lo,Bo,mp,yp,Eh,Er,fa,$3,K3,X3;class ob extends tt{constructor(){super(...arguments);J(this,Er);J(this,Jr);J(this,Zy,0);J(this,Jy);J(this,Hi);J(this,Lo);J(this,Bo);J(this,mp);J(this,yp);J(this,Eh)}build(t,n,r,i,a,o,c){z(this,Lo,n),z(this,Bo,r),z(this,mp,i),z(this,yp,a),z(this,Eh,o),z(this,Jy,c??0),z(this,Hi,t),oe(this,Er,K3).call(this)}get thickness(){return m(this,Eh)}setLastElement(t){return m(this,Hi).push(t),{path:{d:this.toSVGPath()}}}removeLastElement(){return m(this,Hi).pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const t=[];for(const{line:n}of m(this,Hi)){if(t.push(`M${tt.svgRound(n[4])} ${tt.svgRound(n[5])}`),n.length===6){t.push("Z");continue}if(n.length===12&&isNaN(n[6])){t.push(`L${tt.svgRound(n[10])} ${tt.svgRound(n[11])}`);continue}for(let r=6,i=n.length;r<i;r+=6){const[a,o,c,l,u,d]=n.subarray(r,r+6).map(tt.svgRound);t.push(`C${a} ${o} ${c} ${l} ${u} ${d}`)}}return t.join("")}serialize([t,n,r,i],a){const o=[],c=[],[l,u,d,h]=oe(this,Er,$3).call(this);let f,p,y,g,b,v,x,w,_;switch(m(this,yp)){case 0:_=tt._rescale,f=t,p=n+i,y=r,g=-i,b=t+l*r,v=n+(1-u-h)*i,x=t+(l+d)*r,w=n+(1-u)*i;break;case 90:_=tt._rescaleAndSwap,f=t,p=n,y=r,g=i,b=t+u*r,v=n+l*i,x=t+(u+h)*r,w=n+(l+d)*i;break;case 180:_=tt._rescale,f=t+r,p=n,y=-r,g=i,b=t+(1-l-d)*r,v=n+u*i,x=t+(1-l)*r,w=n+(u+h)*i;break;case 270:_=tt._rescaleAndSwap,f=t+r,p=n+i,y=-r,g=-i,b=t+(1-u-h)*r,v=n+(1-l-d)*i,x=t+(1-u)*r,w=n+(1-l)*i;break}for(const{line:T,points:S}of m(this,Hi))o.push(_(T,f,p,y,g,a?new Array(T.length):null)),c.push(_(S,f,p,y,g,a?new Array(S.length):null));return{lines:o,points:c,rect:[b,v,x,w]}}static deserialize(t,n,r,i,a,{paths:{lines:o,points:c},rotation:l,thickness:u}){const d=[];let h,f,p,y,g;switch(l){case 0:g=tt._rescale,h=-t/r,f=n/i+1,p=1/r,y=-1/i;break;case 90:g=tt._rescaleAndSwap,h=-n/i,f=-t/r,p=1/i,y=1/r;break;case 180:g=tt._rescale,h=t/r+1,f=-n/i,p=-1/r,y=1/i;break;case 270:g=tt._rescaleAndSwap,h=n/i+1,f=t/r+1,p=-1/i,y=-1/r;break}if(!o){o=[];for(const v of c){const x=v.length;if(x===2){o.push(new Float32Array([NaN,NaN,NaN,NaN,v[0],v[1]]));continue}if(x===4){o.push(new Float32Array([NaN,NaN,NaN,NaN,v[0],v[1],NaN,NaN,NaN,NaN,v[2],v[3]]));continue}const w=new Float32Array(3*(x-2));o.push(w);let[_,T,S,C]=v.subarray(0,4);w.set([NaN,NaN,NaN,NaN,_,T],0);for(let D=4;D<x;D+=2){const N=v[D],M=v[D+1];w.set(tt.createBezierPoints(_,T,S,C,N,M),(D-2)*3),[_,T,S,C]=[S,C,N,M]}}}for(let v=0,x=o.length;v<x;v++)d.push({line:g(o[v].map(w=>w??NaN),h,f,p,y),points:g(c[v].map(w=>w??NaN),h,f,p,y)});const b=new this.prototype.constructor;return b.build(d,r,i,1,l,u,a),b}get box(){return m(this,Jr)}updateProperty(t,n){return t==="stroke-width"?oe(this,Er,X3).call(this,n):null}updateParentDimensions([t,n],r){const[i,a]=oe(this,Er,fa).call(this);z(this,Lo,t),z(this,Bo,n),z(this,mp,r);const[o,c]=oe(this,Er,fa).call(this),l=o-i,u=c-a,d=m(this,Jr);return d[0]-=l,d[1]-=u,d[2]+=2*l,d[3]+=2*u,d}updateRotation(t){return z(this,Zy,t),{path:{transform:this.rotationTransform}}}get viewBox(){return m(this,Jr).map(tt.svgRound).join(" ")}get defaultProperties(){const[t,n]=m(this,Jr);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${tt.svgRound(t)} ${tt.svgRound(n)}`}}}get rotationTransform(){const[,,t,n]=m(this,Jr);let r=0,i=0,a=0,o=0,c=0,l=0;switch(m(this,Zy)){case 90:i=n/t,a=-t/n,c=t;break;case 180:r=-1,o=-1,c=t,l=n;break;case 270:i=-n/t,a=t/n,l=n;break;default:return""}return`matrix(${r} ${i} ${a} ${o} ${tt.svgRound(c)} ${tt.svgRound(l)})`}getPathResizingSVGProperties([t,n,r,i]){const[a,o]=oe(this,Er,fa).call(this),[c,l,u,d]=m(this,Jr);if(Math.abs(u-a)<=tt.PRECISION||Math.abs(d-o)<=tt.PRECISION){const g=t+r/2-(c+u/2),b=n+i/2-(l+d/2);return{path:{"transform-origin":`${tt.svgRound(t)} ${tt.svgRound(n)}`,transform:`${this.rotationTransform} translate(${g} ${b})`}}}const h=(r-2*a)/(u-2*a),f=(i-2*o)/(d-2*o),p=u/r,y=d/i;return{path:{"transform-origin":`${tt.svgRound(c)} ${tt.svgRound(l)}`,transform:`${this.rotationTransform} scale(${p} ${y}) translate(${tt.svgRound(a)} ${tt.svgRound(o)}) scale(${h} ${f}) translate(${tt.svgRound(-a)} ${tt.svgRound(-o)})`}}}getPathResizedSVGProperties([t,n,r,i]){const[a,o]=oe(this,Er,fa).call(this),c=m(this,Jr),[l,u,d,h]=c;if(c[0]=t,c[1]=n,c[2]=r,c[3]=i,Math.abs(d-a)<=tt.PRECISION||Math.abs(h-o)<=tt.PRECISION){const b=t+r/2-(l+d/2),v=n+i/2-(u+h/2);for(const{line:x,points:w}of m(this,Hi))tt._translate(x,b,v,x),tt._translate(w,b,v,w);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${tt.svgRound(t)} ${tt.svgRound(n)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}
55const f=(r-2*a)/(d-2*a),p=(i-2*o)/(h-2*o),y=-f*(l+a)+t+a,g=-p*(u+o)+n+o;if(f!==1||p!==1||y!==0||g!==0)for(const{line:b,points:v}of m(this,Hi))tt._rescale(b,y,g,f,p,b),tt._rescale(v,y,g,f,p,v);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${tt.svgRound(t)} ${tt.svgRound(n)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([t,n],r){const[i,a]=r,o=m(this,Jr),c=t-o[0],l=n-o[1];if(m(this,Lo)===i&&m(this,Bo)===a)for(const{line:u,points:d}of m(this,Hi))tt._translate(u,c,l,u),tt._translate(d,c,l,d);else{const u=m(this,Lo)/i,d=m(this,Bo)/a;z(this,Lo,i),z(this,Bo,a);for(const{line:h,points:f}of m(this,Hi))tt._rescale(h,c,l,u,d,h),tt._rescale(f,c,l,u,d,f);o[2]*=u,o[3]*=d}return o[0]=t,o[1]=n,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${tt.svgRound(t)} ${tt.svgRound(n)}`}}}get defaultSVGProperties(){const t=m(this,Jr);return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${tt.svgRound(t[0])} ${tt.svgRound(t[1])}`,transform:this.rotationTransform||null},bbox:t}}}Jr=new WeakMap,Zy=new WeakMap,Jy=new WeakMap,Hi=new WeakMap,Lo=new WeakMap,Bo=new WeakMap,mp=new WeakMap,yp=new WeakMap,Eh=new WeakMap,Er=new WeakSet,fa=function(t=m(this,Eh)){const n=m(this,Jy)+t/2*m(this,mp);return m(this,yp)%180===0?[n/m(this,Lo),n/m(this,Bo)]:[n/m(this,Bo),n/m(this,Lo)]},$3=function(){const[t,n,r,i]=m(this,Jr),[a,o]=oe(this,Er,fa).call(this,0);return[t+a,n+o,r-2*a,i-2*o]},K3=function(){const t=z(this,Jr,new Float32Array([1/0,1/0,-1/0,-1/0]));for(const{line:i}of m(this,Hi)){if(i.length<=12){for(let c=4,l=i.length;c<l;c+=6)Ge.pointBoundingBox(i[c],i[c+1],t);continue}let a=i[4],o=i[5];for(let c=6,l=i.length;c<l;c+=6){const[u,d,h,f,p,y]=i.subarray(c,c+6);Ge.bezierBoundingBox(a,o,u,d,h,f,p,y,t),a=p,o=y}}const[n,r]=oe(this,Er,fa).call(this);t[0]=fr(t[0]-n,0,1),t[1]=fr(t[1]-r,0,1),t[2]=fr(t[2]+n,0,1),t[3]=fr(t[3]+r,0,1),t[2]-=t[0],t[3]-=t[1]},X3=function(t){const[n,r]=oe(this,Er,fa).call(this);z(this,Eh,t);const[i,a]=oe(this,Er,fa).call(this),[o,c]=[i-n,a-r],l=m(this,Jr);return l[0]-=o,l[1]-=c,l[2]+=2*o,l[3]+=2*c,l};class Rv extends z3{constructor(e){super(),this._viewParameters=e,super.updateProperties({fill:"none",stroke:pn._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(e,t){e==="stroke-width"&&(t??(t=this["stroke-width"]),t*=this._viewParameters.realScale),super.updateSVGProperty(e,t)}clone(){const e=new Rv(this._viewParameters);return e.updateAll(this),e}}var yv,V3;const jd=class jd extends w1{constructor(t){super({...t,name:"inkEditor"});J(this,yv);this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(t,n){pn.initialize(t,n),this._defaultDrawingOptions=new Rv(n.viewParameters)}static getDefaultDrawingOptions(t){const n=this._defaultDrawingOptions.clone();return n.updateProperties(t),n}static get supportMultipleDrawings(){return!0}static get typesMap(){return Tt(this,"typesMap",new Map([[Rt.INK_THICKNESS,"stroke-width"],[Rt.INK_COLOR,"stroke"],[Rt.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(t,n,r,i,a){return new fP(t,n,r,i,a,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(t,n,r,i,a,o){return ob.deserialize(t,n,r,i,a,o)}static async deserialize(t,n,r){let i=null;if(t instanceof LE){const{data:{inkLists:o,rect:c,rotation:l,id:u,color:d,opacity:h,borderStyle:{rawWidth:f},popupRef:p,richText:y,contentsObj:g,creationDate:b,modificationDate:v},parent:{page:{pageNumber:x}}}=t;i=t={annotationType:yt.INK,color:Array.from(d),thickness:f,opacity:h,paths:{points:o},boxes:null,pageIndex:x-1,rect:c.slice(0),rotation:l,annotationElementId:u,id:u,deleted:!1,popupRef:p,richText:y,comment:(g==null?void 0:g.str)||null,creationDate:b,modificationDate:v}}const a=await super.deserialize(t,n,r);return a._initialData=i,t.comment&&a.setCommentData(t),a}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new m1(this)),[["colorPicker",this._colorPicker]]}get colorType(){return Rt.INK_COLOR}get color(){return this._drawingOptions.stroke}get opacity(){return this._drawingOptions["stroke-opacity"]}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:t,_drawingOptions:n,parent:r}=this;
55n.updateSVGProperty("stroke-width"),r.drawLayer.updateProperties(t,n.toSVGProperties())}static onScaleChangingWhenDrawing(){const t=this._currentParent;t&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),t.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:t,thickness:n,opacity:r}){this._drawingOptions=jd.getDefaultDrawingOptions({stroke:Ge.makeHexColor(...t),"stroke-width":n,"stroke-opacity":r})}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:n,points:r}=this.serializeDraw(t),{_drawingOptions:{stroke:i,"stroke-opacity":a,"stroke-width":o}}=this,c=Object.assign(super.serialize(t),{color:pn._colorManager.convert(i),opacity:a,thickness:o,paths:{lines:n,points:r}});return this.addComment(c),t?(c.isCopy=!0,c):this.annotationElementId&&!oe(this,yv,V3).call(this,c)?null:(c.id=this.annotationElementId,c)}renderAnnotationElement(t){if(this.deleted)return t.hide(),null;const{points:n,rect:r}=this.serializeDraw(!1);return t.updateEdited({rect:r,thickness:this._drawingOptions["stroke-width"],points:n,popup:this.comment}),null}};yv=new WeakSet,V3=function(t){const{color:n,thickness:r,opacity:i,pageIndex:a}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||t.color.some((o,c)=>o!==n[c])||t.thickness!==r||t.opacity!==i||t.pageIndex!==a},be(jd,"_type","ink"),be(jd,"_editorType",yt.INK),be(jd,"_defaultDrawingOptions",null);let pS=jd;class gS extends ob{toSVGPath(){let e=super.toSVGPath();return e.endsWith("Z")||(e+="Z"),e}}const Fb=8,ng=3;var Dh,Ht,mS,Xs,G3,q3,yS,q0,Y3,Z3,J3,bS,vS,Q3;class Za{static extractContoursFromText(e,{fontFamily:t,fontStyle:n,fontWeight:r},i,a,o,c){let l=new OffscreenCanvas(1,1),u=l.getContext("2d",{alpha:!1});const d=200,h=u.font=`${n} ${r} ${d}px ${t}`,{actualBoundingBoxLeft:f,actualBoundingBoxRight:p,actualBoundingBoxAscent:y,actualBoundingBoxDescent:g,fontBoundingBoxAscent:b,fontBoundingBoxDescent:v,width:x}=u.measureText(e),w=1.5,_=Math.ceil(Math.max(Math.abs(f)+Math.abs(p)||0,x)*w),T=Math.ceil(Math.max(Math.abs(y)+Math.abs(g)||d,Math.abs(b)+Math.abs(v)||d)*w);l=new OffscreenCanvas(_,T),u=l.getContext("2d",{alpha:!0,willReadFrequently:!0}),u.font=h,u.filter="grayscale(1)",u.fillStyle="white",u.fillRect(0,0,_,T),u.fillStyle="black",u.fillText(e,_*(w-1)/2,T*(3-w)/2);const S=oe(this,Ht,bS).call(this,u.getImageData(0,0,_,T).data),C=oe(this,Ht,J3).call(this,S),D=oe(this,Ht,vS).call(this,C),N=oe(this,Ht,yS).call(this,S,_,T,D);return this.processDrawnLines({lines:{curves:N,width:_,height:T},pageWidth:i,pageHeight:a,rotation:o,innerMargin:c,mustSmooth:!0,areContours:!0})}static process(e,t,n,r,i){const[a,o,c]=oe(this,Ht,Q3).call(this,e),[l,u]=oe(this,Ht,Z3).call(this,a,o,c,Math.hypot(o,c)*m(this,Dh).sigmaSFactor,m(this,Dh).sigmaR,m(this,Dh).kernelSize),d=oe(this,Ht,vS).call(this,u),h=oe(this,Ht,yS).call(this,l,o,c,d);return this.processDrawnLines({lines:{curves:h,width:o,height:c},pageWidth:t,pageHeight:n,rotation:r,innerMargin:i,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:e,pageWidth:t,pageHeight:n,rotation:r,innerMargin:i,mustSmooth:a,areContours:o}){r%180!==0&&([t,n]=[n,t]);const{curves:c,width:l,height:u}=e,d=e.thickness??0,h=[],f=Math.min(t/l,n/u),p=f/t,y=f/n,g=[];for(const{points:v}of c){const x=a?oe(this,Ht,Y3).call(this,v):v;if(!x)continue;g.push(x);const w=x.length,_=new Float32Array(w),T=new Float32Array(3*(w===2?2:w-2));if(h.push({line:T,points:_}),w===2){_[0]=x[0]*p,_[1]=x[1]*y,T.set([NaN,NaN,NaN,NaN,_[0],_[1]],0);continue}let[S,C,D,N]=x;S*=p,C*=y,D*=p,N*=y,_.set([S,C,D,N],0),T.set([NaN,NaN,NaN,NaN,S,C],0);for(let M=4;M<w;M+=2){const F=_[M]=x[M]*p,L=_[M+1]=x[M+1]*y;T.set(tt.createBezierPoints(S,C,D,N,F,L),(M-2)*3),[S,C,D,N]=[D,N,F,L]}}if(h.length===0)return null;const b=o?new gS:new ob;return b.build(h,t,n,1,r,o?0:d,i),{outline:b,newCurves:g,areContours:o,thickness:d,width:l,height:u}}static async compressSignature({outlines:e,areContours:t,thickness:n,width:r,height:i}){let a=1/0,o=-1/0,c=0;for(const v of e){c+=v.length;for(let x=2,w=v.length;x<w;x++){const _=v[x]-v[x-2];a=Math.min(a,_),o=Math.max(o,_)}}let l;a>=-128&&o<=127?l=Int8Array:a>=-32768&&o<=32767?l=Int16Array:l=Int32Array;const u=e.length,d=Fb+ng*u,h=new Uint32Array(d);let f=0;h[f++]=d*Uint32Array.BYTES_PER_ELEMENT+(c-2*u)*l.BYTES_PER_ELEMENT,h[f++]=0,h[f++]=r,h[f++]=i,h[f++]=t?0:1,h[f++]=Math.max(0,Math.floor(n??0)),h[f++]=u,h[f++]=l.BYTES_PER_ELEMENT;for(const v of e)h[f++]=v.length-2,h[f++]=v[0],h[f++]=v[1];const p=new CompressionStream("deflate-raw"),y=p.writable.getWriter();await y.ready,y.write(h);const g=l.prototype.constructor;for(const v of e){const x=new g(v.length-2);for(let w=2,_=v.length;w<_;w++)x[w-2]=v[w]-v[w-2];y.write(x)}return y.close(),(await new Response(p.readable).bytes()).toBase64()}static async decompressSignature(e){try{const t=Uint8Array.fromBase64(e),{readable:n,writable:r}=new DecompressionStream("deflate-raw"),i=r.getWriter();await i.ready,i.write(t).then(async()=>{await i.ready,await i.close()}).catch(()=>{});let a=null,o=0;
55for await(const x of n)a||(a=new Uint8Array(new Uint32Array(x.buffer,0,4)[0])),a.set(x,o),o+=x.length;const c=new Uint32Array(a.buffer,0,a.length>>2),l=c[1];if(l!==0)throw new Error(`Invalid version: ${l}`);const u=c[2],d=c[3],h=c[4]===0,f=c[5],p=c[6],y=c[7],g=[],b=(Fb+ng*p)*Uint32Array.BYTES_PER_ELEMENT;let v;switch(y){case Int8Array.BYTES_PER_ELEMENT:v=new Int8Array(a.buffer,b);break;case Int16Array.BYTES_PER_ELEMENT:v=new Int16Array(a.buffer,b);break;case Int32Array.BYTES_PER_ELEMENT:v=new Int32Array(a.buffer,b);break}o=0;for(let x=0;x<p;x++){const w=c[ng*x+Fb],_=new Float32Array(w+2);g.push(_);for(let T=0;T<ng-1;T++)_[T]=c[ng*x+Fb+T+1];for(let T=0;T<w;T++)_[T+2]=_[T]+v[o++]}return{areContours:h,thickness:f,outlines:g,width:u,height:d}}catch(t){return _t(`decompressSignature: ${t}`),null}}}Dh=new WeakMap,Ht=new WeakSet,mS=function(e,t,n,r){return n-=e,r-=t,n===0?r>0?0:4:n===1?r+6:2-r},Xs=new WeakMap,G3=function(e,t,n,r,i,a,o){const c=oe(this,Ht,mS).call(this,n,r,i,a);for(let l=0;l<8;l++){const u=(-l+c-o+16)%8,d=m(this,Xs)[2*u],h=m(this,Xs)[2*u+1];if(e[(n+d)*t+(r+h)]!==0)return u}return-1},q3=function(e,t,n,r,i,a,o){const c=oe(this,Ht,mS).call(this,n,r,i,a);for(let l=0;l<8;l++){const u=(l+c+o+16)%8,d=m(this,Xs)[2*u],h=m(this,Xs)[2*u+1];if(e[(n+d)*t+(r+h)]!==0)return u}return-1},yS=function(e,t,n,r){const i=e.length,a=new Int32Array(i);for(let u=0;u<i;u++)a[u]=e[u]<=r?1:0;for(let u=1;u<n-1;u++)a[u*t]=a[u*t+t-1]=0;for(let u=0;u<t;u++)a[u]=a[t*n-1-u]=0;let o=1,c;const l=[];for(let u=1;u<n-1;u++){c=1;for(let d=1;d<t-1;d++){const h=u*t+d,f=a[h];if(f===0)continue;let p=u,y=d;if(f===1&&a[h-1]===0)o+=1,y-=1;else if(f>=1&&a[h+1]===0)o+=1,y+=1,f>1&&(c=f);else{f!==1&&(c=Math.abs(f));continue}const g=[d,u],b=y===d+1,v={isHole:b,points:g,id:o,parent:0};l.push(v);let x;for(const M of l)if(M.id===c){x=M;break}x?x.isHole?v.parent=b?x.parent:c:v.parent=b?c:x.parent:v.parent=b?c:0;const w=oe(this,Ht,G3).call(this,a,t,u,d,p,y,0);if(w===-1){a[h]=-o,a[h]!==1&&(c=Math.abs(a[h]));continue}let _=m(this,Xs)[2*w],T=m(this,Xs)[2*w+1];const S=u+_,C=d+T;p=S,y=C;let D=u,N=d;for(;;){const M=oe(this,Ht,q3).call(this,a,t,D,N,p,y,1);_=m(this,Xs)[2*M],T=m(this,Xs)[2*M+1];const F=D+_,L=N+T;g.push(L,F);const A=D*t+N;if(a[A+1]===0?a[A]=-o:a[A]===1&&(a[A]=o),F===u&&L===d&&D===S&&N===C){a[h]!==1&&(c=Math.abs(a[h]));break}else p=D,y=N,D=F,N=L}}}return l},q0=function(e,t,n,r){if(n-t<=4){for(let S=t;S<n-2;S+=2)r.push(e[S],e[S+1]);return}const i=e[t],a=e[t+1],o=e[n-4]-i,c=e[n-3]-a,l=Math.hypot(o,c),u=o/l,d=c/l,h=u*a-d*i,f=c/o,p=1/l,y=Math.atan(f),g=Math.cos(y),b=Math.sin(y),v=p*(Math.abs(g)+Math.abs(b)),x=p*(1-v+v**2),w=Math.max(Math.atan(Math.abs(b+g)*x),Math.atan(Math.abs(b-g)*x));let _=0,T=t;for(let S=t+2;S<n-2;S+=2){const C=Math.abs(h-u*e[S+1]+d*e[S]);C>_&&(T=S,_=C)}_>(l*w)**2?(oe(this,Ht,q0).call(this,e,t,T+2,r),oe(this,Ht,q0).call(this,e,T,n,r)):r.push(i,a)},Y3=function(e){const t=[],n=e.length;return oe(this,Ht,q0).call(this,e,0,n,t),t.push(e[n-2],e[n-1]),t.length<=4?null:t},Z3=function(e,t,n,r,i,a){const o=new Float32Array(a**2),c=-2*r**2,l=a>>1;for(let y=0;y<a;y++){const g=(y-l)**2;for(let b=0;b<a;b++)o[y*a+b]=Math.exp((g+(b-l)**2)/c)}const u=new Float32Array(256),d=-2*i**2;for(let y=0;y<256;y++)u[y]=Math.exp(y**2/d);const h=e.length,f=new Uint8Array(h),p=new Uint32Array(256);for(let y=0;y<n;y++)for(let g=0;g<t;g++){const b=y*t+g,v=e[b];let x=0,w=0;for(let T=0;T<a;T++){const S=y+T-l;if(!(S<0||S>=n))for(let C=0;C<a;C++){const D=g+C-l;if(D<0||D>=t)continue;const N=e[S*t+D],M=o[T*a+C]*u[Math.abs(N-v)];x+=N*M,w+=M}}const _=f[b]=Math.round(x/w);p[_]++}return[f,p]},J3=function(e){const t=new Uint32Array(256);for(const n of e)t[n]++;return t},bS=function(e){const t=e.length,n=new Uint8ClampedArray(t>>2);let r=-1/0,i=1/0;for(let o=0,c=n.length;o<c;o++){const l=n[o]=e[o<<2];r=Math.max(r,l),i=Math.min(i,l)}const a=255/(r-i);for(let o=0,c=n.length;o<c;o++)n[o]=(n[o]-i)*a;return n},vS=function(e){let t,n=-1/0,r=-1/0;const i=e.findIndex(c=>c!==0);let a=i,o=i;for(t=i;t<256;t++){const c=e[t];c>n&&(t-a>r&&(r=t-a,o=t-1),n=c,a=t)}for(t=o-1;t>=0&&!(e[t]>e[t+1]);t--);return t},Q3=function(e){const t=e,{width:n,height:r}=e,{maxDim:i}=m(this,Dh);let a=n,o=r;if(n>i||r>i){let h=n,f=r,p=Math.log2(Math.max(n,r)/i);const y=Math.floor(p);p=p===y?y-1:y;for(let b=0;b<p;b++){a=Math.ceil(h/2),o=Math.ceil(f/2);const v=new OffscreenCanvas(a,o);v.getContext("2d").drawImage(e,0,0,h,f,0,0,a,o),h=a,f=o,e!==t&&e.close(),e=v.transferToImageBitmap()}const g=Math.min(i/a,i/o);a=Math.round(a*g),o=Math.round(o*g)}const l=new OffscreenCanvas(a,o).getContext("2d",{willReadFrequently:!0});l.fillStyle="white",l.fillRect(0,0,a,o),l.filter="grayscale(1)",l.drawImage(e,0,0,e.width,e.height,0,0,a,o);const u=l.getImageData(0,0,a,o).data;return[oe(this,Ht,bS).call(this,u),a,o]},J(Za,Ht),J(Za,Dh,{maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16}),J(Za,Xs,new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]));class BE extends z3{constructor(){super(),super.updateProperties({fill:pn._defaultLineColor,"stroke-width":0})}clone(){const e=new BE;return e.updateAll(this),e}}class WE extends Rv{constructor(e){super(e),super.updateProperties({stroke:pn._defaultLineColor,"stroke-width":1})}clone(){const e=new WE(this._viewParameters);return e.updateAll(this),e}}var al,Wo,cl,Ch;const Ci=class Ci extends w1{constructor(t){super({...t,mustBeCommitted:!0,name:"signatureEditor"});J(this,al,!1);J(this,Wo,null);J(this,cl,null);J(this,Ch,null);this._willKeepAspectRatio=!0,z(this,cl,t.signatureData||null),z(this,Wo,null),this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(t,n){pn.initialize(t,n),this._defaultDrawingOptions=new BE,this._defaultDrawnSignatureOptions=new WE(n.viewParameters)}static getDefaultDrawingOptions(t){const n=this._defaultDrawingOptions.clone();return n.updateProperties(t),n}static get supportMultipleDrawings(){return!1}static get typesMap(){return Tt(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!m(this,Wo)}}static computeTelemetryFinalData(t){const n=t.get("hasDescription");return{hasAltText:n.get(!0)??0,hasNoAltText:n.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}
55render(){if(this.div)return this.div;let t,n;const{_isCopy:r}=this;if(r&&(this._isCopy=!1,t=this.x,n=this.y),super.render(),this._drawId===null)if(m(this,cl)){const{lines:i,mustSmooth:a,areContours:o,description:c,uuid:l,heightInPage:u}=m(this,cl),{rawDims:{pageWidth:d,pageHeight:h},rotation:f}=this.parent.viewport,p=Za.processDrawnLines({lines:i,pageWidth:d,pageHeight:h,rotation:f,innerMargin:Ci._INNER_MARGIN,mustSmooth:a,areContours:o});this.addSignature(p,u,c,l)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:m(this,Wo)||""}));return r&&(this._isCopy=!0,this._moveAfterPaste(t,n)),this.div}setUuid(t){z(this,Ch,t),this.addEditToolbar()}getUuid(){return m(this,Ch)}get description(){return m(this,Wo)}set description(t){z(this,Wo,t),this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:t})),super.addEditToolbar().then(n=>{n==null||n.updateEditSignatureButton(t)}))}getSignaturePreview(){const{newCurves:t,areContours:n,thickness:r,width:i,height:a}=m(this,cl),o=Math.max(i,a),c=Za.processDrawnLines({lines:{curves:t.map(l=>({points:l})),thickness:r,width:i,height:a},pageWidth:o,pageHeight:o,rotation:0,innerMargin:0,mustSmooth:!1,areContours:n});return{areContours:n,outline:c.outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(t,n,r,i){const{x:a,y:o}=this,{outline:c}=z(this,cl,t);z(this,al,c instanceof gS),this.description=r;let l;m(this,al)?l=Ci.getDefaultDrawingOptions():(l=Ci._defaultDrawnSignatureOptions.clone(),l.updateProperties({"stroke-width":c.thickness})),this._addOutlines({drawOutlines:c,drawingOptions:l});const[,u]=this.pageDimensions;let d=n/u;d=d>=1?.5:d,this.width*=d/this.height,this.width>=1&&(d*=.9/this.width,this.width=.9),this.height=d,this.setDims(),this.x=a,this.y=o,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(i),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!i,hasDescription:!!r}}),this.div.hidden=!1}getFromImage(t){const{rawDims:{pageWidth:n,pageHeight:r},rotation:i}=this.parent.viewport;return Za.process(t,n,r,i,Ci._INNER_MARGIN)}getFromText(t,n){const{rawDims:{pageWidth:r,pageHeight:i},rotation:a}=this.parent.viewport;return Za.extractContoursFromText(t,n,r,i,a,Ci._INNER_MARGIN)}getDrawnSignature(t){const{rawDims:{pageWidth:n,pageHeight:r},rotation:i}=this.parent.viewport;return Za.processDrawnLines({lines:t,pageWidth:n,pageHeight:r,rotation:i,innerMargin:Ci._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:t,thickness:n}){t?this._drawingOptions=Ci.getDefaultDrawingOptions():(this._drawingOptions=Ci._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":n}))}serialize(t=!1){if(this.isEmpty())return null;const{lines:n,points:r}=this.serializeDraw(t),{_drawingOptions:{"stroke-width":i}}=this,a=Object.assign(super.serialize(t),{isSignature:!0,areContours:m(this,al),color:[0,0,0],thickness:m(this,al)?0:i});return this.addComment(a),t?(a.paths={lines:n,points:r},a.uuid=m(this,Ch),a.isCopy=!0):a.lines=n,m(this,Wo)&&(a.accessibilityData={type:"Figure",alt:m(this,Wo)}),a}static deserializeDraw(t,n,r,i,a,o){return o.areContours?gS.deserialize(t,n,r,i,a,o):ob.deserialize(t,n,r,i,a,o)}static async deserialize(t,n,r){var a;const i=await super.deserialize(t,n,r);return z(i,al,t.areContours),i.description=((a=t.accessibilityData)==null?void 0:a.alt)||"",z(i,Ch,t.uuid),i}};al=new WeakMap,Wo=new WeakMap,cl=new WeakMap,Ch=new WeakMap,be(Ci,"_type","signature"),be(Ci,"_editorType",yt.SIGNATURE),be(Ci,"_defaultDrawingOptions",null);let wS=Ci;var vn,ur,ll,Xa,ul,bp,Va,Ah,jo,$i,vp,Mt,Og,Lg,Y0,Z0,J0,_S,Q0,eU;class xS extends pn{constructor(t){super({...t,name:"stampEditor"});J(this,Mt);J(this,vn,null);J(this,ur,null);J(this,ll,null);J(this,Xa,null);J(this,ul,null);J(this,bp,"");J(this,Va,null);J(this,Ah,!1);J(this,jo,null);J(this,$i,!1);J(this,vp,!1);z(this,Xa,t.bitmapUrl),z(this,ul,t.bitmapFile),this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(t,n){pn.initialize(t,n)}static isHandlingMimeForPasting(t){return aT.includes(t)}static paste(t,n){n.pasteEditor({mode:yt.STAMP},{bitmapFile:t.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){var t;return{type:"stamp",hasAltText:!!((t=this.altTextData)!=null&&t.altText)}}static computeTelemetryFinalData(t){const n=t.get("hasAltText");return{hasAltText:n.get(!0)??0,hasNoAltText:n.get(!1)??0}}async mlGuessAltText(t=null,n=!0){if(this.hasAltTextData())return null;const{mlManager:r}=this._uiManager;if(!r)throw new Error("No ML.");if(!await r.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:i,width:a,height:o}=t||this.copyCanvas(null,null,!0).imageData,c=await r.guess({name:"altText",request:{data:i,width:a,height:o,channels:i.length/(a*o)}});if(!c)throw new Error("No response from the AI service.");if(c.error)throw new Error("Error from the AI service.");if(c.cancel)return null;if(!c.output)throw new Error("No valid response from the AI service.");const l=c.output;return await this.setGuessedAltText(l),n&&!this.hasAltTextData()&&(this.altTextData={alt:l,decorative:!1}),l}remove(){var t;m(this,ur)&&(z(this,vn,null),this._uiManager.imageManager.deleteId(m(this,ur)),(t=m(this,Va))==null||t.remove(),z(this,Va,null),m(this,jo)&&(clearTimeout(m(this,jo)),z(this,jo,null))),super.remove()}rebuild(){if(!this.parent){m(this,ur)&&oe(this,Mt,Y0).call(this);return}super.rebuild(),this.div!==null&&(m(this,ur)&&m(this,Va)===null&&oe(this,Mt,Y0).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(t){this._isDraggable=!0,t&&this.div.focus()}isEmpty(){return!(m(this,ll)||m(this,vn)||m(this,Xa)||m(this,ul)||m(this,ur)||m(this,Ah))}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}
55render(){if(this.div)return this.div;let t,n;return this._isCopy&&(t=this.x,n=this.y),super.render(),this.div.hidden=!0,this.createAltText(),m(this,Ah)||(m(this,vn)?oe(this,Mt,Z0).call(this):oe(this,Mt,Y0).call(this)),this._isCopy&&this._moveAfterPaste(t,n),this._uiManager.addShouldRescale(this),this.div}setCanvas(t,n){const{id:r,bitmap:i}=this._uiManager.imageManager.getFromCanvas(t,n);n.remove(),r&&this._uiManager.imageManager.isValidId(r)&&(z(this,ur,r),i&&z(this,vn,i),z(this,Ah,!1),oe(this,Mt,Z0).call(this))}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;m(this,jo)!==null&&clearTimeout(m(this,jo)),z(this,jo,setTimeout(()=>{z(this,jo,null),oe(this,Mt,_S).call(this)},200))}copyCanvas(t,n,r=!1){t||(t=224);const{width:i,height:a}=m(this,vn),o=new Zo;let c=m(this,vn),l=i,u=a,d=null;if(n){if(i>n||a>n){const S=Math.min(n/i,n/a);l=Math.floor(i*S),u=Math.floor(a*S)}d=document.createElement("canvas");const f=d.width=Math.ceil(l*o.sx),p=d.height=Math.ceil(u*o.sy);m(this,$i)||(c=oe(this,Mt,J0).call(this,f,p));const y=d.getContext("2d");y.filter=this._uiManager.hcmFilter;let g="white",b="#cfcfd8";this._uiManager.hcmFilter!=="none"?b="black":C4.isDarkMode&&(g="#8f8f9d",b="#42414d");const v=15,x=v*o.sx,w=v*o.sy,_=new OffscreenCanvas(x*2,w*2),T=_.getContext("2d");T.fillStyle=g,T.fillRect(0,0,x*2,w*2),T.fillStyle=b,T.fillRect(0,0,x,w),T.fillRect(x,w,x,w),y.fillStyle=y.createPattern(_,"repeat"),y.fillRect(0,0,f,p),y.drawImage(c,0,0,c.width,c.height,0,0,f,p)}let h=null;if(r){let f,p;if(o.symmetric&&c.width<t&&c.height<t)f=c.width,p=c.height;else if(c=m(this,vn),i>t||a>t){const b=Math.min(t/i,t/a);f=Math.floor(i*b),p=Math.floor(a*b),m(this,$i)||(c=oe(this,Mt,J0).call(this,f,p))}const g=new OffscreenCanvas(f,p).getContext("2d",{willReadFrequently:!0});g.drawImage(c,0,0,c.width,c.height,0,0,f,p),h={width:f,height:p,data:g.getImageData(0,0,f,p).data}}return{canvas:d,width:l,height:u,imageData:h}}static async deserialize(t,n,r){var g;let i=null,a=!1;if(t instanceof m3){const{data:{rect:b,rotation:v,id:x,structParent:w,popupRef:_,richText:T,contentsObj:S,creationDate:C,modificationDate:D},container:N,parent:{page:{pageNumber:M}},canvas:F}=t;let L,A;F?(delete t.canvas,{id:L,bitmap:A}=r.imageManager.getFromCanvas(N.id,F),F.remove()):(a=!0,t._hasNoCanvas=!0);const X=((g=await n._structTree.getAriaAttributes(`${Md}${x}`))==null?void 0:g.get("aria-label"))||"";i=t={annotationType:yt.STAMP,bitmapId:L,bitmap:A,pageIndex:M-1,rect:b.slice(0),rotation:v,annotationElementId:x,id:x,deleted:!1,accessibilityData:{decorative:!1,altText:X},isSvg:!1,structParent:w,popupRef:_,richText:T,comment:(S==null?void 0:S.str)||null,creationDate:C,modificationDate:D}}const o=await super.deserialize(t,n,r),{rect:c,bitmap:l,bitmapUrl:u,bitmapId:d,isSvg:h,accessibilityData:f}=t;a?(r.addMissingCanvas(t.id,o),z(o,Ah,!0)):d&&r.imageManager.isValidId(d)?(z(o,ur,d),l&&z(o,vn,l)):z(o,Xa,u),z(o,$i,h);const[p,y]=o.pageDimensions;return o.width=(c[2]-c[0])/p,o.height=(c[3]-c[1])/y,f&&(o.altTextData=f),o._initialData=i,t.comment&&o.setCommentData(t),z(o,vp,!!i),o}serialize(t=!1,n=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const r=Object.assign(super.serialize(t),{bitmapId:m(this,ur),isSvg:m(this,$i)});if(this.addComment(r),t)return r.bitmapUrl=oe(this,Mt,Q0).call(this,!0),r.accessibilityData=this.serializeAltText(!0),r.isCopy=!0,r;const{decorative:i,altText:a}=this.serializeAltText(!1);if(!i&&a&&(r.accessibilityData={type:"Figure",alt:a}),this.annotationElementId){const c=oe(this,Mt,eU).call(this,r);return c.isSame?null:(c.isSameAltText?delete r.accessibilityData:r.accessibilityData.structParent=this._initialData.structParent??-1,r.id=this.annotationElementId,delete r.bitmapId,r)}if(n===null)return r;n.stamps||(n.stamps=new Map);const o=m(this,$i)?(r.rect[2]-r.rect[0])*(r.rect[3]-r.rect[1]):null;if(!n.stamps.has(m(this,ur)))n.stamps.set(m(this,ur),{area:o,serialized:r}),r.bitmap=oe(this,Mt,Q0).call(this,!1);else if(m(this,$i)){const c=n.stamps.get(m(this,ur));o>c.area&&(c.area=o,c.serialized.bitmap.close(),c.serialized.bitmap=oe(this,Mt,Q0).call(this,!1))}return r}renderAnnotationElement(t){return this.deleted?(t.hide(),null):(t.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}}vn=new WeakMap,ur=new WeakMap,ll=new WeakMap,Xa=new WeakMap,ul=new WeakMap,bp=new WeakMap,Va=new WeakMap,Ah=new WeakMap,jo=new WeakMap,$i=new WeakMap,vp=new WeakMap,Mt=new WeakSet,Og=function(t,n=!1){if(!t){this.remove();return}z(this,vn,t.bitmap),n||(z(this,ur,t.id),z(this,$i,t.isSvg)),t.file&&z(this,bp,t.file.name),oe(this,Mt,Z0).call(this)},Lg=function(){if(z(this,ll,null),this._uiManager.enableWaiting(!1),!!m(this,Va)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&m(this,vn)){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&m(this,vn)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}},Y0=function(){if(m(this,ur)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(m(this,ur)).then(r=>oe(this,Mt,Og).call(this,r,!0)).finally(()=>oe(this,Mt,Lg).call(this));return}if(m(this,Xa)){const r=m(this,Xa);z(this,Xa,null),this._uiManager.enableWaiting(!0),z(this,ll,this._uiManager.imageManager.getFromUrl(r).then(i=>oe(this,Mt,Og).call(this,i)).finally(()=>oe(this,Mt,Lg).call(this)));return}if(m(this,ul)){const r=m(this,ul);z(this,ul,null),this._uiManager.enableWaiting(!0),z(this,ll,this._uiManager.imageManager.getFromFile(r).then(i=>oe(this,Mt,Og).call(this,i)).finally(()=>oe(this,Mt,Lg).call(this)));return}const t=document.createElement("input");t.type="file",t.accept=aT.join(",");const n=this._uiManager._signal;z(this,ll,new Promise(r=>{t.addEventListener("change",async()=>
55{if(!t.files||t.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const i=await this._uiManager.imageManager.getFromFile(t.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),oe(this,Mt,Og).call(this,i)}r()},{signal:n}),t.addEventListener("cancel",()=>{this.remove(),r()},{signal:n})}).finally(()=>oe(this,Mt,Lg).call(this))),t.click()},Z0=function(){var l;const{div:t}=this;let{width:n,height:r}=m(this,vn);const[i,a]=this.pageDimensions,o=.75;if(this.width)n=this.width*i,r=this.height*a;else if(n>o*i||r>o*a){const u=Math.min(o*i/n,o*a/r);n*=u,r*=u}this._uiManager.enableWaiting(!1);const c=z(this,Va,document.createElement("canvas"));c.setAttribute("role","img"),this.addContainer(c),this.width=n/i,this.height=r/a,this.setDims(),(l=this._initialOptions)!=null&&l.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(t.hidden=!1),oe(this,Mt,_S).call(this),m(this,vp)||(this.parent.addUndoableEditor(this),z(this,vp,!0)),this._reportTelemetry({action:"inserted_image"}),m(this,bp)&&this.div.setAttribute("aria-description",m(this,bp)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")},J0=function(t,n){const{width:r,height:i}=m(this,vn);let a=r,o=i,c=m(this,vn);for(;a>2*t||o>2*n;){const l=a,u=o;a>2*t&&(a=a>=16384?Math.floor(a/2)-1:Math.ceil(a/2)),o>2*n&&(o=o>=16384?Math.floor(o/2)-1:Math.ceil(o/2));const d=new OffscreenCanvas(a,o);d.getContext("2d").drawImage(c,0,0,l,u,0,0,a,o),c=d.transferToImageBitmap()}return c},_S=function(){const[t,n]=this.parentDimensions,{width:r,height:i}=this,a=new Zo,o=Math.ceil(r*t*a.sx),c=Math.ceil(i*n*a.sy),l=m(this,Va);if(!l||l.width===o&&l.height===c)return;l.width=o,l.height=c;const u=m(this,$i)?m(this,vn):oe(this,Mt,J0).call(this,o,c),d=l.getContext("2d");d.filter=this._uiManager.hcmFilter,d.drawImage(u,0,0,u.width,u.height,0,0,o,c)},Q0=function(t){if(t){if(m(this,$i)){const i=this._uiManager.imageManager.getSvgUrl(m(this,ur));if(i)return i}const n=document.createElement("canvas");return{width:n.width,height:n.height}=m(this,vn),n.getContext("2d").drawImage(m(this,vn),0,0),n.toDataURL()}if(m(this,$i)){const[n,r]=this.pageDimensions,i=Math.round(this.width*n*El.PDF_TO_CSS_UNITS),a=Math.round(this.height*r*El.PDF_TO_CSS_UNITS),o=new OffscreenCanvas(i,a);return o.getContext("2d").drawImage(m(this,vn),0,0,m(this,vn).width,m(this,vn).height,0,0,i,a),o.transferToImageBitmap()}return structuredClone(m(this,vn))},eU=function(t){var o;const{pageIndex:n,accessibilityData:{altText:r}}=this._initialData,i=t.pageIndex===n,a=(((o=t.accessibilityData)==null?void 0:o.alt)||"")===r;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&i&&a,isSameAltText:a}},be(xS,"_type","stamp"),be(xS,"_editorType",yt.STAMP);var kh,wp,hl,dl,Ga,mi,fl,xp,_p,Vs,qa,hr,Ya,pl,Tp,rt,gl,ln,SS,tU,fo,ES,DS,e1;const Is=class Is{constructor({uiManager:e,pageIndex:t,div:n,structTreeLayer:r,accessibilityManager:i,annotationLayer:a,drawLayer:o,textLayer:c,viewport:l,l10n:u}){J(this,ln);J(this,kh);J(this,wp,!1);J(this,hl,null);J(this,dl,null);J(this,Ga,null);J(this,mi,new Map);J(this,fl,!1);J(this,xp,!1);J(this,_p,!1);J(this,Vs,null);J(this,qa,null);J(this,hr,null);J(this,Ya,null);J(this,pl,null);J(this,Tp,-1);J(this,rt);const d=[...m(Is,gl).values()];if(!Is._initialized){Is._initialized=!0;for(const h of d)h.initialize(u,e)}e.registerEditorTypes(d),z(this,rt,e),this.pageIndex=t,this.div=n,z(this,kh,i),z(this,hl,a),this.viewport=l,z(this,hr,c),this.drawLayer=o,this._structTree=r,m(this,rt).addLayer(this)}get isEmpty(){return m(this,mi).size===0}get isInvisible(){return this.isEmpty&&m(this,rt).getMode()===yt.NONE}updateToolbar(e){m(this,rt).updateToolbar(e)}updateMode(e=m(this,rt).getMode()){switch(oe(this,ln,e1).call(this),e){case yt.NONE:this.div.classList.toggle("nonEditing",!0),this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case yt.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case yt.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:t}=this.div;if(t.toggle("nonEditing",!1),e===yt.POPUP)t.toggle("commentEditing",!0);else{t.toggle("commentEditing",!1);for(const n of m(Is,gl).values())t.toggle(`${n._type}Editing`,e===n._editorType)}this.div.hidden=!1}hasTextLayer(e){var t;return e===((t=m(this,hr))==null?void 0:t.div)}setEditingState(e){m(this,rt).setEditingState(e)}addCommands(e){m(this,rt).addCommands(e)}cleanUndoStack(e){m(this,rt).cleanUndoStack(e)}toggleDrawing(e=!1){this.div.classList.toggle("drawing",!e)}togglePointerEvents(e=!1){this.div.classList.toggle("disabled",!e)}toggleAnnotationLayerPointerEvents(e=!1){var t;(t=m(this,hl))==null||t.togglePointerEvents(e)}async enable(){var n;z(this,_p,!0),this.div.tabIndex=0,this.togglePointerEvents(!0),this.div.classList.toggle("nonEditing",!1),(n=m(this,pl))==null||n.abort(),z(this,pl,null);const e=new Set;for(const r of m(this,ln,SS))r.enableEditing(),r.show(!0),r.annotationElementId&&(m(this,rt).removeChangedExistingAnnotation(r),e.add(r.annotationElementId));const t=m(this,hl);if(t)for(const r of t.getEditableAnnotations()){if(r.hide(),m(this,rt).isDeletedAnnotationElement(r.data.id)||e.has(r.data.id))continue;const i=await this.deserialize(r);i&&(this.addOrRebuild(i),i.enableEditing())}z(this,_p,!1),m(this,rt)._eventBus.dispatch("editorsrendered",{source:this,pageNumber:this.pageIndex+1})}disable(){var r;if(z(this,xp,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1),this.div.classList.toggle("nonEditing",!0),m(this,hr)&&!m(this,pl)){z(this,pl,new AbortController);const i=m(this,rt).combinedSignal(m(this,pl));m(this,hr).div.addEventListener("pointerdown",a=>{const{clientX:c,clientY:l,timeStamp:u}=a,d=m(this,Tp);if(u-d>500){z(this,Tp,u);return}z(this,Tp,-1);const{classList:h}=this.div;h.toggle("getElements",!0);const f=document.elementsFromPoint(c,l);if(h.toggle("getElements",!1),!this.div.contains(f[0]))return;let p;const y=new RegExp(`^${Jg}[0-9]+$`);for(const b of f)if(y.test(b.id)){p=b.id;break}if(!p)return;const g=m(this,mi).get(p);(g==null?void 0:g.annotationElementId)===null&&(a.stopPropagation(),a.preventDefault(),g.dblclick(a))},{signal:i,capture:!0})}const e=m(this,hl),t=[];if(e){const i=new Map,a=new Map;
55for(const o of m(this,ln,SS)){if(o.disableEditing(),!o.annotationElementId){t.push(o);continue}if(o.serialize()!==null){i.set(o.annotationElementId,o);continue}else a.set(o.annotationElementId,o);(r=this.getEditableAnnotation(o.annotationElementId))==null||r.show(),o.remove()}for(const o of e.getEditableAnnotations()){const{id:c}=o.data;if(m(this,rt).isDeletedAnnotationElement(c)){o.updateEdited({deleted:!0});continue}let l=a.get(c);if(l){l.resetAnnotationElement(o),l.show(!1),o.show();continue}l=i.get(c),l&&(m(this,rt).addChangedExistingAnnotation(l),l.renderAnnotationElement(o)&&l.show(!1)),o.show()}}oe(this,ln,e1).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:n}=this.div;for(const i of m(Is,gl).values())n.remove(`${i._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),e==null||e.updateFakeAnnotations(t),z(this,xp,!1)}getEditableAnnotation(e){var t;return((t=m(this,hl))==null?void 0:t.getEditableAnnotation(e))||null}setActiveEditor(e){m(this,rt).getActive()!==e&&m(this,rt).setActiveEditor(e)}enableTextSelection(){var e;if(this.div.tabIndex=-1,(e=m(this,hr))!=null&&e.div&&!m(this,Ya)){z(this,Ya,new AbortController);const t=m(this,rt).combinedSignal(m(this,Ya));m(this,hr).div.addEventListener("pointerdown",oe(this,ln,tU).bind(this),{signal:t}),m(this,hr).div.classList.add("highlighting")}}disableTextSelection(){var e;this.div.tabIndex=0,(e=m(this,hr))!=null&&e.div&&m(this,Ya)&&(m(this,Ya).abort(),z(this,Ya,null),m(this,hr).div.classList.remove("highlighting"))}enableClick(){if(m(this,dl))return;z(this,dl,new AbortController);const e=m(this,rt).combinedSignal(m(this,dl));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:e});const t=this.pointerup.bind(this);this.div.addEventListener("pointerup",t,{signal:e}),this.div.addEventListener("pointercancel",t,{signal:e})}disableClick(){var e;(e=m(this,dl))==null||e.abort(),z(this,dl,null)}attach(e){m(this,mi).set(e.id,e);const{annotationElementId:t}=e;t&&m(this,rt).isDeletedAnnotationElement(t)&&m(this,rt).removeDeletedAnnotationElement(e)}detach(e){var t;m(this,mi).delete(e.id),(t=m(this,kh))==null||t.removePointerInTextLayer(e.contentDiv),!m(this,xp)&&e.annotationElementId&&m(this,rt).addDeletedAnnotationElement(e)}remove(e){this.detach(e),m(this,rt).removeEditor(e),e.div.remove(),e.isAttachedToDOM=!1}changeParent(e){var t;e.parent!==this&&(e.parent&&e.annotationElementId&&(m(this,rt).addDeletedAnnotationElement(e),pn.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),(t=e.parent)==null||t.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}add(e){if(!(e.parent===this&&e.isAttachedToDOM)){if(this.changeParent(e),m(this,rt).addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(!m(this,_p)),m(this,rt).addToAnnotationStorage(e),e._reportTelemetry(e.telemetryInitialData)}}moveEditorInDOM(e){var n;if(!e.isAttachedToDOM)return;const{activeElement:t}=document;e.div.contains(t)&&!m(this,Ga)&&(e._focusEventsAllowed=!1,z(this,Ga,setTimeout(()=>{z(this,Ga,null),e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:m(this,rt)._signal}),t.focus())},0))),e._structTreeParentId=(n=m(this,kh))==null?void 0:n.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?(e.parent||(e.parent=this),e.rebuild(),e.show()):this.add(e)}addUndoableEditor(e){const t=()=>e._uiManager.rebuild(e),n=()=>{e.remove()};this.addCommands({cmd:t,undo:n,mustExec:!1})}getEditorByUID(e){for(const t of m(this,mi).values())if(t.uid===e)return t;return null}combinedSignal(e){return m(this,rt).combinedSignal(e)}canCreateNewEmptyEditor(){var e;return(e=m(this,ln,fo))==null?void 0:e.canCreateNewEmptyEditor()}async pasteEditor(e,t){this.updateToolbar(e),await m(this,rt).updateMode(e.mode);const{offsetX:n,offsetY:r}=oe(this,ln,DS).call(this),i=m(this,rt).getId(),a=oe(this,ln,ES).call(this,{parent:this,id:i,x:n,y:r,uiManager:m(this,rt),isCentered:!0,...t});a&&this.add(a)}async deserialize(e){var t;return await((t=m(Is,gl).get(e.annotationType??e.annotationEditorType))==null?void 0:t.deserialize(e,this,m(this,rt)))||null}createAndAddNewEditor(e,t,n={}){const r=m(this,rt).getId(),i=oe(this,ln,ES).call(this,{parent:this,id:r,x:e.offsetX,y:e.offsetY,uiManager:m(this,rt),isCentered:t,...n});return i&&this.add(i),i}get boundingClientRect(){return this.div.getBoundingClientRect()}addNewEditor(e={}){this.createAndAddNewEditor(oe(this,ln,DS).call(this),!0,e)}setSelected(e){m(this,rt).setSelected(e)}toggleSelected(e){m(this,rt).toggleSelected(e)}unselect(e){m(this,rt).unselect(e)}pointerup(e){var r;const{isMac:t}=rr.platform;if(e.button!==0||e.ctrlKey&&t||e.target!==this.div||!m(this,fl)||(z(this,fl,!1),(r=m(this,ln,fo))!=null&&r.isDrawer&&m(this,ln,fo).supportMultipleDrawings))return;if(!m(this,wp)){z(this,wp,!0);return}const n=m(this,rt).getMode();if(n===yt.STAMP||n===yt.POPUP||n===yt.SIGNATURE){m(this,rt).unselectAll();return}this.createAndAddNewEditor(e,!1)}pointerdown(e){var r;if(m(this,rt).getMode()===yt.HIGHLIGHT&&this.enableTextSelection(),m(this,fl)){z(this,fl,!1);return}const{isMac:t}=rr.platform;if(e.button!==0||e.ctrlKey&&t||e.target!==this.div)return;if(z(this,fl,!0),(r=m(this,ln,fo))!=null&&r.isDrawer){this.startDrawingSession(e);return}const n=m(this,rt).getActive();z(this,wp,!n||n.isEmpty())}startDrawingSession(e){if(this.div.focus({preventScroll:!0}),m(this,Vs)){m(this,ln,fo).startDrawing(this,m(this,rt),!1,e);return}m(this,rt).setCurrentDrawingSession(this),z(this,Vs,new AbortController);const t=m(this,rt).combinedSignal(m(this,Vs));this.div.addEventListener("blur",({relatedTarget:n})=>{n&&!this.div.contains(n)&&(z(this,qa,null),this.commitOrRemove())},{signal:t}),m(this,ln,fo).startDrawing(this,m(this,rt),!1,e)}pause(e){if(e){const{activeElement:t}=document;this.div.contains(t)&&z(this,qa,t);return}m(this,qa)&&setTimeout(()=>{var t;(t=m(this,qa))==null||t.focus(),z(this,qa,null)},0)}endDrawingSession(e=!1){return m(this,Vs)?(m(this,rt).setCurrentDrawingSession(null),m(this,Vs).abort(),z(this,Vs,null),z(this,qa,null),m(this,ln,fo).endDrawing(e)):null}findNewParent(e,t,n){const r=m(this,rt).findParent(t,n);return r===null||r===this?!1:(r.changeParent(e),!0)}commitOrRemove(){return m(this,Vs)?(this.endDrawingSession(),!0):!1}onScaleChanging(){m(this,Vs)&&m(this,ln,fo).onScaleChangingWhenDrawing(this)}destroy(){var e,t;this.commitOrRemove(),((e=m(this,rt).getActive())==null?void 0:e.parent)===this&&(m(this,rt).commitOrRemove(),m(this,rt).setActiveEditor(null)),m(this,Ga)&&(clearTimeout(m(this,Ga)),z(this,Ga,null));for(const n of m(this,mi).values())(t=m(this,kh))==null||t.removePointerInTextLayer(n.contentDiv),n.setParent(null),n.isAttachedToDOM=!1,n.div.remove();this.div=null,m(this,mi).clear(),m(this,rt).removeLayer(this)}async render({viewport:e}){this.viewport=e,Ph(this.div,e);for(const t of m(this,rt).getEditors(this.pageIndex))this.add(t),t.rebuild();await m(this,rt).findClonesForPage(this),this.div.hidden=this.isEmpty,this.updateMode()}update({viewport:e}){m(this,rt).commitOrRemove(),oe(this,ln,e1).call(this);const t=this.viewport.rotation,n=e.rotation;if(this.viewport=e,Ph(this.div,{rotation:n}),t!==n)for(const r of m(this,mi).values())r.rotate(n)}get pageDimensions(){const{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}get scale(){return m(this,rt).viewParameters.realScale}};kh=new WeakMap,wp=new WeakMap,hl=new WeakMap,dl=new WeakMap,Ga=new WeakMap,mi=new WeakMap,fl=new WeakMap,xp=new WeakMap,_p=new WeakMap,Vs=new WeakMap,qa=new WeakMap,hr=ne
55w WeakMap,Ya=new WeakMap,pl=new WeakMap,Tp=new WeakMap,rt=new WeakMap,gl=new WeakMap,ln=new WeakSet,SS=function(){return m(this,mi).size!==0?m(this,mi).values():m(this,rt).getEditors(this.pageIndex)},tU=function(e){m(this,rt).unselectAll();const{target:t}=e;if(t===m(this,hr).div||(t.getAttribute("role")==="img"||t.classList.contains("endOfContent"))&&m(this,hr).div.contains(t)){const{isMac:n}=rr.platform;if(e.button!==0||e.ctrlKey&&n)return;m(this,rt).showAllEditors("highlight",!0,!0),m(this,hr).div.classList.add("free"),this.toggleDrawing(),v1.startHighlighting(this,m(this,rt).direction==="ltr",{target:m(this,hr).div,x:e.x,y:e.y}),m(this,hr).div.addEventListener("pointerup",()=>{m(this,hr).div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:m(this,rt)._signal}),e.preventDefault()}},fo=function(){return m(Is,gl).get(m(this,rt).getMode())},ES=function(e){const t=m(this,ln,fo);return t?new t.prototype.constructor(e):null},DS=function(){const{x:e,y:t,width:n,height:r}=this.boundingClientRect,i=Math.max(0,e),a=Math.max(0,t),o=Math.min(window.innerWidth,e+n),c=Math.min(window.innerHeight,t+r),l=(i+o)/2-e,u=(a+c)/2-t,[d,h]=this.viewport.rotation%180===0?[l,u]:[u,l];return{offsetX:d,offsetY:h}},e1=function(){for(const e of m(this,mi).values())e.isEmpty()&&e.remove()},be(Is,"_initialized",!1),J(Is,gl,new Map([iS,pS,xS,v1,wS].map(e=>[e._editorType,e])));let TS=Is;var Gs,Qr,Nh,Qy,bv,nU,ta,AS,rU,kS;const Zn=class Zn{constructor(){J(this,ta);J(this,Gs,null);J(this,Qr,new Map);J(this,Nh,new Map)}setParent(e){if(!m(this,Gs)){z(this,Gs,e);return}if(m(this,Gs)!==e){if(m(this,Qr).size>0)for(const t of m(this,Qr).values())t.remove(),e.append(t);z(this,Gs,e)}}static get _svgFactory(){return Tt(this,"_svgFactory",new y1)}draw(e,t=!1,n=!1){const r=zn(Zn,Qy)._++,i=oe(this,ta,AS).call(this),a=Zn._svgFactory.createElement("defs");i.append(a);const o=Zn._svgFactory.createElement("path");a.append(o);const c=`path_${r}`;o.setAttribute("id",c),o.setAttribute("vector-effect","non-scaling-stroke"),t&&m(this,Nh).set(r,o);const l=n?oe(this,ta,rU).call(this,a,c):null,u=Zn._svgFactory.createElement("use");return i.append(u),u.setAttribute("href",`#${c}`),this.updateProperties(i,e),m(this,Qr).set(r,i),{id:r,clipPathId:`url(#${l})`}}drawOutline(e,t){const n=zn(Zn,Qy)._++,r=oe(this,ta,AS).call(this),i=Zn._svgFactory.createElement("defs");r.append(i);const a=Zn._svgFactory.createElement("path");i.append(a);const o=`path_${n}`;a.setAttribute("id",o),a.setAttribute("vector-effect","non-scaling-stroke");let c;if(t){const d=Zn._svgFactory.createElement("mask");i.append(d),c=`mask_${n}`,d.setAttribute("id",c),d.setAttribute("maskUnits","objectBoundingBox");const h=Zn._svgFactory.createElement("rect");d.append(h),h.setAttribute("width","1"),h.setAttribute("height","1"),h.setAttribute("fill","white");const f=Zn._svgFactory.createElement("use");d.append(f),f.setAttribute("href",`#${o}`),f.setAttribute("stroke","none"),f.setAttribute("fill","black"),f.setAttribute("fill-rule","nonzero"),f.classList.add("mask")}const l=Zn._svgFactory.createElement("use");r.append(l),l.setAttribute("href",`#${o}`),c&&l.setAttribute("mask",`url(#${c})`);const u=l.cloneNode();return r.append(u),l.classList.add("mainOutline"),u.classList.add("secondaryOutline"),this.updateProperties(r,e),m(this,Qr).set(n,r),n}finalizeDraw(e,t){m(this,Nh).delete(e),this.updateProperties(e,t)}updateProperties(e,t){var c;if(!t)return;const{root:n,bbox:r,rootClass:i,path:a}=t,o=typeof e=="number"?m(this,Qr).get(e):e;if(o){if(n&&oe(this,ta,kS).call(this,o,n),r&&oe(c=Zn,bv,nU).call(c,o,r),i){const{classList:l}=o;for(const[u,d]of Object.entries(i))l.toggle(u,d)}if(a){const u=o.firstElementChild.firstElementChild;oe(this,ta,kS).call(this,u,a)}}}updateParent(e,t){if(t===this)return;const n=m(this,Qr).get(e);n&&(m(t,Gs).append(n),m(this,Qr).delete(e),m(t,Qr).set(e,n))}remove(e){m(this,Nh).delete(e),m(this,Gs)!==null&&(m(this,Qr).get(e).remove(),m(this,Qr).delete(e))}destroy(){z(this,Gs,null);for(const e of m(this,Qr).values())e.remove();m(this,Qr).clear(),m(this,Nh).clear()}};Gs=new WeakMap,Qr=new WeakMap,Nh=new WeakMap,Qy=new WeakMap,bv=new WeakSet,nU=function(e,[t,n,r,i]){const{style:a}=e;a.top=`${100*n}%`,a.left=`${100*t}%`,a.width=`${100*r}%`,a.height=`${100*i}%`},ta=new WeakSet,AS=function(){const e=Zn._svgFactory.create(1,1,!0);return m(this,Gs).append(e),e.setAttribute("aria-hidden",!0),e},rU=function(e,t){const n=Zn._svgFactory.createElement("clipPath");e.append(n);const r=`clip_${t}`;n.setAttribute("id",r),n.setAttribute("clipPathUnits","objectBoundingBox");const i=Zn._svgFactory.createElement("use");return n.append(i),i.setAttribute("href",`#${t}`),i.classList.add("clip"),r},kS=function(e,t){for(const[n,r]of Object.entries(t))r===null?e.removeAttribute(n):e.setAttribute(n,r)},J(Zn,bv),J(Zn,Qy,0);let CS=Zn;function Ub(s){return`${(s*100).toFixed(2)}%`}var Sp,eb,tb,Ep,zo,Ho,nb,vv,iU;const Zg=class Zg{constructor(e,t,n,r){J(this,vv);J(this,Sp,[]);J(this,eb,new Map);J(this,tb,null);
55J(this,Ep,0);J(this,zo,0);J(this,Ho,0);z(this,Ep,e),z(this,Sp,t),z(this,zo,n.rawDims.pageWidth),z(this,Ho,n.rawDims.pageHeight),z(this,tb,r)}render(){const e=document.createElement("div");e.className="textLayerImages";for(let t=0;t<m(this,Sp).length;t+=6){const n=oe(this,vv,iU).call(this,m(this,Sp).subarray(t,t+6));n&&e.append(n)}return e.addEventListener("contextmenu",t=>{var b;if(!(t.target instanceof HTMLCanvasElement))return;const n=t.target,r=m(this,eb).get(n);if(!r)return;const i=(b=m(Zg,nb))==null?void 0:b.deref();if(i===n)return;i&&(i.width=0,i.height=0),z(Zg,nb,new WeakRef(n));const{inverseTransform:a,x1:o,y1:c,width:l,height:u}=r,d=m(this,tb).call(this),h=Math.ceil(o*d.width),f=Math.ceil(c*d.height),p=Math.floor((o+l/m(this,zo))*d.width),y=Math.floor((c+u/m(this,Ho))*d.height);n.width=p-h,n.height=y-f;const g=n.getContext("2d");g.setTransform(...a),g.translate(-h,-f),g.drawImage(d,0,0)}),e}};Sp=new WeakMap,eb=new WeakMap,tb=new WeakMap,Ep=new WeakMap,zo=new WeakMap,Ho=new WeakMap,nb=new WeakMap,vv=new WeakSet,iU=function([e,t,n,r,i,a]){const o=Math.hypot((i-e)*m(this,zo),(a-t)*m(this,Ho)),c=Math.hypot((n-e)*m(this,zo),(r-t)*m(this,Ho));if(o<m(this,Ep)||c<m(this,Ep))return null;const l=[(i-e)*m(this,zo)/o,(a-t)*m(this,Ho)/o,(n-e)*m(this,zo)/c,(r-t)*m(this,Ho)/c,0,0],u=Ge.inverseTransform(l),d=document.createElement("canvas");return d.className="textLayerImagePlaceholder",d.width=0,d.height=0,Object.assign(d.style,{opacity:0,position:"absolute",left:Ub(e),top:Ub(t),width:Ub(o/m(this,zo)),height:Ub(c/m(this,Ho)),transformOrigin:"0% 0%",transform:`matrix(${l.join(",")})`}),m(this,eb).set(d,{inverseTransform:u,width:o,height:c,x1:e,y1:t}),d},J(Zg,nb,null);let NS=Zg;globalThis._pdfjsTestingUtils={HighlightOutliner:oS};globalThis.pdfjsLib={AbortException:Sl,AnnotationEditorLayer:TS,AnnotationEditorParamsType:Rt,AnnotationEditorType:yt,AnnotationEditorUIManager:Oh,AnnotationLayer:nS,AnnotationMode:vc,AnnotationType:Kn,applyOpacity:k4,build:$M,ColorPicker:i3,createValidAbsoluteUrl:PN,CSSConstants:A4,DOMSVGFactory:y1,DrawLayer:CS,FeatureTest:rr,fetchData:FE,findContrastColor:N4,getDocument:e3,getFilenameFromUrl:_4,getPdfFilenameFromUrl:T4,getRGB:ib,getUuid:LN,getXfaPageViewport:E4,GlobalWorkerOptions:Ko,ImageKind:y0,InvalidPDFException:iT,isDataScheme:Ev,isPdfFile:RE,isValidExplicitDest:q4,makeArr:kE,makeMap:NE,makeObj:oT,MathClamp:fr,noContextMenu:Es,normalizeUnicode:w4,OPS:Qg,OutputScale:Zo,PasswordResponses:u4,PDFDataRangeTransport:t3,PDFDateString:d1,PDFWorker:rm,PermissionFlag:l4,PixelsPerInch:El,RenderingCancelledException:UE,renderRichText:WN,ResponseException:h1,setLayerDimensions:Ph,shadow:Tt,SignatureExtractor:Za,stopEvent:In,SupportedImageMimeTypes:aT,TextLayer:nm,TextLayerImages:NS,TouchManager:p1,updateUrlHash:ON,Util:Ge,VerbosityLevel:xv,version:HM,XfaLayer:BN};const pP=40,gP=2,mP=5,yP=20;function bP(s){var o,c,l;const e={},t=[];for(const u of s)Object.assign(e,u.content.styles),t.push(...u.textItems);const n=Object.keys(e);if(n.length===0)return{};const r={},i=/bold|demi|heavy|black|semibold|extrabold/i;for(const u of n){const d=((o=e[u])==null?void 0:o.fontFamily)??"";(i.test(d)||i.test(u))&&(r[u]=!0)}if(Object.values(r).some(Boolean))return console.log("[PDF bold] strategy 1 (regex):",JSON.stringify(r)),r;const a=new Set;for(const u of s)for(const d of n)if(!a.has(d))try{if((c=u.page.commonObjs)!=null&&c.has(d)){const h=u.page.commonObjs.get(d);if(h&&typeof h=="object"){if(!a.size){const f=Object.keys(h).slice(0,10);console.log("[PDF bold] commonObjs font object keys:",JSON.stringify(f))}typeof h.bold=="boolean"?(r[d]=h.bold,a.add(d)):h.name&&i.test(h.name)&&(r[d]=!0,a.add(d))}}}catch{}if(Object.values(r).some(Boolean))return console.log("[PDF bold] strategy 2 (commonObjs):",JSON.stringify(r)),r;if(n.length>=2){const u={};for(const f of n)u[f]=0;for(const f of t)u[f.fontName]=(u[f.fontName]??0)+1;const d=Object.entries(u).sort((f,p)=>p[1]-f[1])[0][0];for(const f of n)r[f]=f!==d;const h={};for(const f of n)h[f]=((l=e[f])==null?void 0:l.fontFamily)??"(unknown)";return console.log("[PDF bold] strategy 3 (frequency heuristic):",JSON.stringify(r),"| freq:",JSON.stringify(u),"| families:",JSON.stringify(h)),r}return console.log("[PDF bold] single font â no bold detection possible. fonts:",JSON.stringify(n)),r}function vP(s){if(s.length===0)return[];const e=[];let t={y:s[0].y,items:[s[0]]};for(let n=1;n<s.length;n++)Math.abs(s[n].y-t.y)<=mP?t.items.push(s[n]):(t.items.sort((r,i)=>r.x-i.x),e.push(t),t={y:s[n].y,items:[s[n]]});return t.items.sort((n,r)=>n.x-r.x),e.push(t),e}function Fw(s){if(s.items.length<2)return!1;for(let e=1;e<s.items.length;e++)if(s.items[e].x-s.items[e-1].x>pP)return!0;return!1}function wP(s){const e=[];for(const n of s)for(const r of n.items)e.push(r.x);e.sort((n,r)=>n-r);const t=[];for(const n of e)(t.length===0||n-t[t.length-1]>yP)&&t.push(n);return t}function bA(s,e){const t=e.map(()=>[]);for(const n of s.items){let r=0,i=Math.abs(n.x-e[0]);for(let a=1;a<e.length;a++){const o=Math.abs(n.x-e[a]);o<i&&(i=o,r=a)}t[r].push({text:n.text,bold:n.bold})}return t}function xP(s,e){if(e.length>8)return!1;const t=e.map(()=>0);for(const i of s){const a=new Set;for(const o of i.items){let c=0,l=Math.abs(o.x-e[0]);for(let u=1;u<e.length;u++){const d=Math.abs(o.x-e[u]);d<l&&(l=d,c=u)}a.add(c)}for(const o of a)t[o]=(t[o]??0)+1}const n=Math.max(2,Math.ceil(s.length*.5));return t.filter(i=>i>=n).length>=2}function _P(s){const e=[],t=[];for(let o=1;o<s.length;o++){const c=Math.abs(s[o].y-s[o-1].y);c>.5&&t.push(c)}t.sort((o,c)=>o-c);const r=(t.length>0?t[Math.floor(t.length/2)]:14)*1.5;let i=0,a=null;for(;i<s.length;){if(Fw(s[i])){let c=i+1;for(;c<s.length&&Fw(s[c]);)c++;if(c-i>=gP){const l=s.slice(i,c),u=wP(l);if(u.length>=2&&xP(l,u)){const d=Math.max(2,Math.ceil(l.length*.5)),h=u.map(()=>0);for(const y of l){const g=new Set;for(const b of y.items){let v=0,x=Math.abs(b.x-u[0]);for(let w=1;w<u.length;w++){const _=Math.abs(b.x-u[w]);
55_<x&&(x=_,v=w)}g.add(v)}for(const b of g)h[b]=(h[b]??0)+1}const f=u.filter((y,g)=>(h[g]??0)>=d),p=l.map(y=>bA(y,f));for(i=c;i<s.length&&!Fw(s[i]);){const y=bA(s[i],f);if(y[0].some(v=>v.text.trim())||!y.slice(1).some(v=>v.some(x=>x.text.trim()))||Math.abs(s[i].y-s[i-1].y)>r)break;const b=p[p.length-1];for(let v=1;v<f.length;v++)if(y[v].some(x=>x.text.trim())){const x=b[v],w=x.length>0?x[x.length-1]:null;w&&w.text.length>0&&!w.text.endsWith(" ")&&x.push({text:" ",bold:!1}),x.push(...y[v])}i++}e.push({type:"table",rows:p}),a=null;continue}}}const o=s[i].items.map(c=>({text:c.text,bold:c.bold}));if(o.some(c=>c.text.trim())){const c=e.length>0?e[e.length-1]:null,l=a!==null?Math.abs(s[i].y-a):1/0;if(c&&c.type==="paragraph"&&l<=r){const u=c.segments[c.segments.length-1];u&&u.text.length>0&&!u.text.endsWith(" ")&&c.segments.push({text:" ",bold:!1}),c.segments.push(...o)}else e.push({type:"paragraph",segments:o});a=s[i].y}i++}return e}async function TP(s){const e=await s.arrayBuffer(),t=await e3({data:e}).promise,n=[];for(let o=1;o<=t.numPages;o++){const c=await t.getPage(o),l=await c.getTextContent(),u=[];for(const d of l.items)"str"in d&&u.push(d);n.push({page:c,content:l,textItems:u})}const r=bP(n),i=[],a=[];for(const o of n){const c=[];for(const d of o.textItems)!d.str&&!d.hasEOL||c.push({x:Math.round(d.transform[4]),y:Math.round(d.transform[5]),text:d.str,bold:r[d.fontName]??!1});const l=vP(c),u=_P(l);i.push(...u);for(const d of u)if(d.type==="paragraph")a.push(d.segments.map(h=>h.text).join(""));else if(d.type==="table")for(const h of d.rows)a.push(h.map(f=>f.map(p=>p.text).join("")).join(" "))}return console.log("[PDF extraction] blocks:",i.length,"| paragraphs:",i.filter(o=>o.type==="paragraph").length,"| tables:",i.filter(o=>o.type==="table").length),{plainText:a.join(` 56`),blocks:i}}function Rb(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Uw={exports:{}},vA;function SP(){return vA||(vA=1,(function(s,e){(function(t){s.exports=t()})(function(){return(function t(n,r,i){function a(l,u){if(!r[l]){if(!n[l]){var d=typeof Rb=="function"&&Rb;if(!u&&d)return d(l,!0);if(o)return o(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var f=r[l]={exports:{}};n[l][0].call(f.exports,function(p){var y=n[l][1][p];return a(y||p)},f,f.exports,t,n,r,i)}return r[l].exports}for(var o=typeof Rb=="function"&&Rb,c=0;c<i.length;c++)a(i[c]);return a})({1:[function(t,n,r){function i(){function o(c){return a.reject(new Error("could not open external image: '"+c+`' 57cannot open linked files from a web browser`))}return{read:o}}var a=t("../../lib/promises");r.Files=i},{"../../lib/promises":23}],2:[function(t,n,r){function i(c){return c.arrayBuffer?a.resolve(o.openArrayBuffer(c.arrayBuffer)):a.reject(new Error("Could not find file in options"))}var a=t("../lib/promises"),o=t("../lib/zipfile");r.openZip=i},{"../lib/promises":23,"../lib/zipfile":40}],3:[function(t,n,r){function i(_){return{convertToHtml:function(T){var S=d.indexBy(T.type===f.types.document?T.comments:[],"commentId"),C=new a(_,S);return C.convertToHtml(T)}}}function a(_,T){function S(E){var Q=[],ce=D(E,Q,{}),V=[];u(ce,function(I){I.type==="deferred"&&V.push(I)});var k={};return h.mapSeries(V,function(I){return I.value().then(function($){k[I.id]=$})}).then(function(){function I(Z){return l(Z,function(ae){return ae.type==="deferred"?k[ae.id]:ae.children?[d.extend({},ae,{children:I(ae.children)})]:[ae]})}var $=v.writer({prettyPrint:_.prettyPrint,outputFormat:_.outputFormat});return b.write($,b.simplify(I(ce))),new y.Result($.asString(),Q)})}function C(E,Q,ce){return l(E,function(V){return D(V,Q,ce)})}function D(E,Q,ce){if(!ce)throw new Error("options not set");var V=R[E.type];return V?V(E,Q,ce):[]}function N(E,Q,ce){return M(E,Q).wrap(function(){var V=C(E.children,Q,ce);return H?V:[b.forceWrite].concat(V)})}function M(E,Q){var ce=X(E);return ce?ce.to:(E.styleId&&Q.push(c("paragraph",E)),_e)}function F(E,Q,ce){var V=function(){return C(E.children,Q,ce)},k=[];if(E.highlight!==null){var I=A({type:"highlight",color:E.highlight});I&&k.push(I)}E.isSmallCaps&&k.push(L("smallCaps")),E.isAllCaps&&k.push(L("allCaps")),E.isStrikethrough&&k.push(L("strikethrough","s")),E.isUnderline&&k.push(L("underline")),E.verticalAlignment===f.verticalAlignment.
vendor: 5,571 bytes, line 57
57subscript&&k.push(p.element("sub",{},{fresh:!1})),E.verticalAlignment===f.verticalAlignment.superscript&&k.push(p.element("sup",{},{fresh:!1})),E.isItalic&&k.push(L("italic","em")),E.isBold&&k.push(L("bold","strong"));var $=p.empty,Z=X(E);return Z?$=Z.to:E.styleId&&Q.push(c("run",E)),k.push($),k.forEach(function(ae){V=ae.wrap.bind(ae,V)}),V()}function L(E,Q){var ce=A({type:E});return ce||(Q?p.element(Q,{},{fresh:!1}):p.empty)}function A(E,Q){var ce=X(E);return ce?ce.to:Q}function X(E){for(var Q=0;Q<K.length;Q++)if(K[Q].from.matches(E))return K[Q]}function he(E){return function(Q,ce){return h.attempt(function(){return E(Q,ce)}).caught(function(V){return ce.push(y.error(V)),[]})}}function j(E){return O(E.noteType,E.noteId)}function ee(E){return pe(E.noteType,E.noteId)}function O(E,Q){return q(E+"-"+Q)}function pe(E,Q){return q(E+"-ref-"+Q)}function q(E){return we+E}function B(E,Q,ce){return A(E,U).wrap(function(){return re(E,Q,ce)})}function re(E,Q,ce){var V=d.findIndex(E.children,function(Z){return!Z.type===f.types.tableRow||!Z.isHeader});V===-1&&(V=E.children.length);var k;if(V===0)k=C(E.children,Q,d.extend({},ce,{isTableHeader:!1}));else{var I=C(E.children.slice(0,V),Q,d.extend({},ce,{isTableHeader:!0})),$=C(E.children.slice(V),Q,d.extend({},ce,{isTableHeader:!1}));k=[b.freshElement("thead",{},I),b.freshElement("tbody",{},$)]}return[b.forceWrite].concat(k)}function le(E,Q,ce){var V=C(E.children,Q,ce);return[b.freshElement("tr",{},[b.forceWrite].concat(V))]}function ge(E,Q,ce){var V=ce.isTableHeader?"th":"td",k=C(E.children,Q,ce),I={};return E.colSpan!==1&&(I.colspan=E.colSpan.toString()),E.rowSpan!==1&&(I.rowspan=E.rowSpan.toString()),[b.freshElement(V,I,[b.forceWrite].concat(k))]}function ie(E,Q,ce){return A(E,p.ignore).wrap(function(){var V=T[E.commentId],k=ue.length+1,I="["+w(V)+k+"]";return ue.push({label:I,comment:V}),[b.freshElement("a",{href:"#"+O("comment",E.commentId),id:pe("comment",E.commentId)},[b.text(I)])]})}function P(E,Q,ce){var V=E.label,k=E.comment,I=C(k.body,Q,ce).concat([b.nonFreshElement("p",{},[b.text(" "),b.freshElement("a",{href:"#"+pe("comment",k.commentId)},[b.text("â")])])]);return[b.freshElement("dt",{id:O("comment",k.commentId)},[b.text("Comment "+V)]),b.freshElement("dd",{},I)]}function W(E,Q,ce){return te(E).wrap(function(){return[]})}function te(E){var Q=X(E);return Q?Q.to:E.breakType==="line"?p.topLevelElement("br"):p.empty}var Y=1,se=[],ue=[];_=d.extend({ignoreEmptyParagraphs:!0},_);var we=_.idPrefix===void 0?"":_.idPrefix,H=_.ignoreEmptyParagraphs,_e=p.topLevelElement("p"),K=_.styleMap||[],U=p.elements([p.element("table",{},{fresh:!0})]),R={document:function(E,Q,ce){var V=C(E.children,Q,ce),k=se.map(function($){return E.notes.resolve($)}),I=C(k,Q,ce);return V.concat([b.freshElement("ol",{},I),b.freshElement("dl",{},l(ue,function($){return P($,Q,ce)}))])},paragraph:N,run:F,text:function(E,Q,ce){return[b.text(E.value)]},tab:function(E,Q,ce){return[b.text(" ")]},hyperlink:function(E,Q,ce){var V=E.anchor?"#"+q(E.anchor):E.href,k={href:V};E.targetFrame!=null&&(k.target=E.targetFrame);var I=C(E.children,Q,ce);return[b.nonFreshElement("a",k,I)]},checkbox:function(E){var Q={type:"checkbox"};return E.checked&&(Q.checked="checked"),[b.freshElement("input",Q)]},bookmarkStart:function(E,Q,ce){var V=b.freshElement("a",{id:q(E.name)},[b.forceWrite]);return[V]},noteReference:function(E,Q,ce){se.push(E);var V=b.freshElement("a",{href:"#"+j(E),id:ee(E)},[b.text("["+Y+++"]")]);return[b.freshElement("sup",{},[V])]},note:function(E,Q,ce){var V=C(E.body,Q,ce),k=b.elementWithTag(p.element("p",{},{fresh:!1}),[b.text(" "),b.freshElement("a",{href:"#"+ee(E)},[b.text("â")])]),I=V.concat([k]);return b.freshElement("li",{id:j(E)},I)},commentReference:ie,comment:P,image:o(he(_.convertImage||g.dataUri)),table:B,tableRow:le,tableCell:ge,break:W};return{convertToHtml:S}}function o(_){return function(T,S,C){return[{type:"deferred",id:x++,value:function(){return _(T,S,C)}}]}}function c(_,T){return y.warning("Unrecognised "+_+" style: '"+T.styleName+"' (Style ID: "+T.styleId+")")}function l(_,T){return d.flatten(_.map(T),!0)}function u(_,T){_.forEach(function(S){T(S),S.children&&u(S.children,T)})}var d=t("underscore"),h=t("./promises"),f=t("./documents"),p=t("./styles/html-paths"),y=t("./results"),g=t("./images"),b=t("./html"),v=t("./writers");r.DocumentConverter=i;var x=1,w=r.commentAuthorLabel=function(_){return _.authorInitials||""}},{"./documents":4,"./html":18,"./images":20,"./promises":23,"./results":25,"./styles/html-paths":28,"./writers":33,underscore:102}],4:[function(t,n,r){(function(i){function a(F,L){return L=L||{},{type:N.document,children:F,notes:L.notes||new p({}),comments:L.comments||[]}}function o(F,L){L=L||{};var A=L.indent||{};return{type:N.paragraph,children:F,styleId:L.styleId||null,styleName:L.styleName||null,numbering:L.numbering||null,alignment:L.alignment||null,indent:{start:A.start||null,end:A.end||null,firstLine:A.firstLine||null,hanging:A.hanging||null}}}function c(F,L){return L=L||{},{type:N.run,children:F,styleId:L.styleId||null,styleName:L.styleName||null,isBold:!!L.isBold,isUnderline:!!L.isUnderline,isItalic:!!L.isItalic,isStrikethrough:!!L.isStrikethrough,isAllCaps:!!L.isAllCaps,isSmallCaps:!!L.isSmallCaps,verticalAlignment:L.verticalAlignment||M.baseline,font:L.font||null,fontSize:L.fontSize||null,highlight:L.highlight||null}}function l(F){return{type:N.text,value:F}}function u(){return{type:N.tab}}function d(F){return{type:N.checkbox,checked:F.checked}}function h(F,L){return{type:N.hyperlink,children:F,href:L.href,anchor:L.anch
57or,targetFrame:L.targetFrame}}function f(F){return{type:N.noteReference,noteType:F.noteType,noteId:F.noteId}}function p(F){this._notes=D.indexBy(F,function(L){return v(L.noteType,L.noteId)})}function y(F){return{type:N.note,noteType:F.noteType,noteId:F.noteId,body:F.body}}function g(F){return{type:N.commentReference,commentId:F.commentId}}function b(F){return{type:N.comment,commentId:F.commentId,body:F.body,authorName:F.authorName,authorInitials:F.authorInitials}}function v(F,L){return F+"-"+L}function x(F){return{type:N.image,read:function(L){return L?F.readImage(L):F.readImage().then(function(A){return i.from(A)})},readAsArrayBuffer:function(){return F.readImage()},readAsBase64String:function(){return F.readImage("base64")},readAsBuffer:function(){return F.readImage().then(function(L){return i.from(L)})},altText:F.altText,contentType:F.contentType}}function w(F,L){return L=L||{},{type:N.table,children:F,styleId:L.styleId||null,styleName:L.styleName||null}}function _(F,L){return L=L||{},{type:N.tableRow,children:F,isHeader:L.isHeader||!1}}function T(F,L){return L=L||{},{type:N.tableCell,children:F,colSpan:L.colSpan==null?1:L.colSpan,rowSpan:L.rowSpan==null?1:L.rowSpan}}function S(F){return{type:N.break,breakType:F}}function C(F){return{type:N.bookmarkStart,name:F.name}}var D=t("underscore"),N=r.types={document:"document",paragraph:"paragraph",run:"run",text:"text",tab:"tab",checkbox:"checkbox",hyperlink:"hyperlink",noteReference:"noteReference",image:"image",note:"note",commentReference:"commentReference",comment:"comment",table:"table",tableRow:"tableRow",tableCell:"tableCell",break:"break",bookmarkStart:"bookmarkStart"},M={baseline:"baseline",superscript:"superscript",subscript:"subscript"};p.prototype.resolve=function(F){return this.findNoteByKey(v(F.noteType,F.noteId))},p.prototype.findNoteByKey=function(F){return this._notes[F]||null},r.document=r.Document=a,r.paragraph=r.Paragraph=o,r.run=r.Run=c,r.text=r.Text=l,r.tab=r.Tab=u,r.checkbox=r.Checkbox=d,r.Hyperlink=h,r.noteReference=r.NoteReference=f,r.Notes=p,r.Note=y,r.commentReference=g,r.comment=b,r.Image=x,r.Table=w,r.TableRow=_,r.TableCell=T,r.lineBreak=S("line"),r.pageBreak=S("page"),r.columnBreak=S("column"),r.BookmarkStart=C,r.verticalAlignment=M}).call(this,t("buffer").Buffer)},{buffer:83,underscore:102}],5:[function(t,n,r){function i(N){return{readXmlElement:function(M){return new a(N).readXmlElement(M)},readXmlElements:function(M){return new a(N).readXmlElements(M)}}}function a(N){function M(Ae){var Le=Ae.map(F);return f(Le)}function F(Ae){if(Ae.type==="element"){var Le=dt[Ae.name];if(Le)return Le(Ae);if(!Object.prototype.hasOwnProperty.call(D,Ae.name)){var He=w("An unrecognised element was ignored: "+Ae.name);return c([He])}}return l()}function L(Ae){return pe(Ae).map(function(Le){return{type:"paragraphProperties",styleId:Le.styleId,styleName:Le.name,alignment:Ae.firstOrEmpty("w:jc").attributes["w:val"],numbering:o(Le.styleId,Ae.firstOrEmpty("w:numPr"),nt),indent:A(Ae.firstOrEmpty("w:ind"))}})}function A(Ae){return{start:Ae.attributes["w:start"]||Ae.attributes["w:left"],end:Ae.attributes["w:end"]||Ae.attributes["w:right"],firstLine:Ae.attributes["w:firstLine"],hanging:Ae.attributes["w:hanging"]}}function X(Ae){return q(Ae).map(function(Le){var He=Ae.firstOrEmpty("w:sz").attributes["w:val"],Ze=/^[0-9]+$/.test(He)?parseInt(He,10)/2:null;return{type:"runProperties",styleId:Le.styleId,styleName:Le.name,verticalAlignment:Ae.firstOrEmpty("w:vertAlign").attributes["w:val"],font:Ae.firstOrEmpty("w:rFonts").attributes["w:ascii"],fontSize:Ze,isBold:j(Ae.first("w:b")),isUnderline:he(Ae.first("w:u")),isItalic:j(Ae.first("w:i")),isStrikethrough:j(Ae.first("w:strike")),isAllCaps:j(Ae.first("w:caps")),isSmallCaps:j(Ae.first("w:smallCaps")),highlight:O(Ae.firstOrEmpty("w:highlight").attributes["w:val"])}})}function he(Ae){if(Ae){var Le=Ae.attributes["w:val"];return Le!==void 0&&Le!=="false"&&Le!=="0"&&Le!=="none"}return!1}function j(Ae){if(Ae){var Le=Ae.attributes["w:val"];return Le!=="false"&&Le!=="0"}return!1}function ee(Ae){return Ae!=="false"&&Ae!=="0"}function O(Ae){return Ae&&Ae!=="none"?Ae:null}function pe(Ae){return re(Ae,"w:pStyle","Paragraph",Ye.findParagraphStyleById)}function q(Ae){return re(Ae,"w:rStyle","Run",Ye.findCharacterStyleById)}function B(Ae){return re(Ae,"w:tblStyle","Table",Ye.findTableStyleById)}function re(Ae,Le,He,Ze){var Qe=[],it=Ae.first(Le),bt=null,xn=null;if(it&&(bt=it.attributes["w:val"])){var an=Ze(bt);
57an?xn=an.name:Qe.push(ae(He,bt))}return d({styleId:bt,name:xn},Qe)}function le(Ae){var Le=Ae.attributes["w:fldCharType"];if(Le==="begin")ye.push({type:"begin",fldChar:Ae}),me=[];else if(Le==="end"){var He=ye.pop();if(He.type==="begin"&&(He=ie(He)),He.type==="checkbox")return u(v.checkbox({checked:He.checked}))}else if(Le==="separate"){var Ze=ye.pop(),Qe=ie(Ze);ye.push(Qe)}return l()}function ge(){var Ae=b.last(ye.filter(function(Le){return Le.type==="hyperlink"}));return Ae?Ae.options:null}function ie(Ae){return P(me.join(""),Ae.type==="begin"?Ae.fldChar:_.emptyElement)}function P(Ae,Le){var He=/^\s*HYPERLINK\s+(\\l\s+)?(?:"(.*)"|([^\\]\S*))/.exec(Ae);if(He){var Ze=He[2]===void 0?He[3]:He[2],Qe=He[1]===void 0?{href:Ze}:{anchor:Ze};return{type:"hyperlink",options:Qe}}var it=/\s*FORMCHECKBOX\s*/.exec(Ae);if(it){var bt=Le.firstOrEmpty("w:ffData").firstOrEmpty("w:checkBox"),xn=bt.first("w:checked"),an=j(xn??bt.first("w:default"));return{type:"checkbox",checked:an}}return{type:"unknown"}}function W(Ae){return me.push(Ae.text()),l()}function te(Ae){var Le=Ae.attributes["w:font"],He=Ae.attributes["w:char"],Ze=g.hex(Le,He);return Ze==null&&/^F0..$/.test(He)&&(Ze=g.hex(Le,He.substring(2))),Ze==null?c([w("A w:sym element with an unsupported character was ignored: char "+He+" in font "+Le)]):u(new v.Text(Ze.string))}function Y(Ae){return function(Le){var He=Le.attributes["w:id"];return u(new v.NoteReference({noteType:Ae,noteId:He}))}}function se(Ae){return u(v.commentReference({commentId:Ae.attributes["w:id"]}))}function ue(Ae){return M(Ae.children)}function we(Ae){var Le=H(Ae.firstOrEmpty("w:tblPr"));return M(Ae.children).flatMap(R).flatMap(function(He){return Le.map(function(Ze){return v.Table(He,Ze)})})}function H(Ae){return B(Ae).map(function(Le){return{styleId:Le.styleId,styleName:Le.name}})}function _e(Ae){var Le=Ae.firstOrEmpty("w:trPr"),He=!!Le.first("w:del");if(He)return l();var Ze=!!Le.first("w:tblHeader");return M(Ae.children).map(function(Qe){return v.TableRow(Qe,{isHeader:Ze})})}function K(Ae){return M(Ae.children).map(function(Le){var He=Ae.firstOrEmpty("w:tcPr"),Ze=He.firstOrEmpty("w:gridSpan").attributes["w:val"],Qe=Ze?parseInt(Ze,10):1,it=v.TableCell(Le,{colSpan:Qe});return it._vMerge=U(He),it})}function U(Ae){var Le=Ae.first("w:vMerge");if(Le){var He=Le.attributes["w:val"];return He==="continue"||!He}return null}function R(Ae){var Le=b.any(Ae,function(Qe){return Qe.type!==v.types.tableRow});if(Le)return E(Ae),d(Ae,[w("unexpected non-row element in table, cell merging may be incorrect")]);var He=b.any(Ae,function(Qe){return b.any(Qe.children,function(it){return it.type!==v.types.tableCell})});if(He)return E(Ae),d(Ae,[w("unexpected non-cell element in table row, cell merging may be incorrect")]);var Ze={};return Ae.forEach(function(Qe){var it=0;Qe.children.forEach(function(bt){bt._vMerge&&Ze[it]?Ze[it].rowSpan++:(Ze[it]=bt,bt._vMerge=!1),it+=bt.colSpan})}),Ae.forEach(function(Qe){Qe.children=Qe.children.filter(function(it){return!it._vMerge}),Qe.children.forEach(function(it){delete it._vMerge})}),u(Ae)}function E(Ae){Ae.forEach(function(Le){var He=T.getDescendantsOfType(Le,v.types.tableCell);He.forEach(function(Ze){delete Ze._vMerge})})}function Q(Ae){var Le=Ae.getElementsByTagName("a:graphic").getElementsByTagName("a:graphicData").getElementsByTagName("pic:pic").getElementsByTagName("pic:blipFill").getElementsByTagName("a:blip");return f(Le.map(ce.bind(null,Ae)))}function ce(Ae,Le){var He=Ae.firstOrEmpty("wp:docPr"),Ze=He.attributes,Qe=V(Ze.descr)?Ze.title:Ze.descr,it=k(Le);return it===null?c([w("Could not find image file for a:blip element")]):Z(it,Qe).map(function(bt){var xn=He.firstOrEmpty("a:hlinkClick"),an=xn.attributes["r:id"];if(an){var de=De.findTargetByRelationshipId(an);return new v.Hyperlink([bt],{href:de})}return bt})}function V(Ae){return Ae==null||/^\s*$/.test(Ae)}function k(Ae){var Le=Ae.attributes["r:embed"],He=Ae.attributes["r:link"];if(Le)return $(Le);if(He){var Ze=De.findTargetByRelationshipId(He);return{path:Ze,read:Ke.read.bind(Ke,Ze)}}return null}function I(Ae){var Le=Ae.attributes["r:id"];return Le?Z($(Le),Ae.attributes["o:title"]):c([w("A v:imagedata element without a relationship ID was ignored")])}function $(Ae){var Le=S.uriToZipEntryName("word",De.findTargetByRelationshipId(Ae));return{path:Le,read:Ue.read.bind(Ue,Le)}}function Z(Ae,Le){var He=Re.findContentType(Ae.path),Ze=v.Image({readImage:Ae.read,altText:Le,contentType:He}),Qe=C[He]?[]:w("Image of type "+He+" is unlikely to display in web browsers");return d(Ze,Qe)}function ae(Ae,Le){return w(Ae+" style with ID "+Le+" was referenced but not defined in the document")}var ye=[],me=[],xe=[],De=N.relationships,Re=N.contentTypes,Ue=N.docxFile,Ke=N.files,nt=N.numbering,Ye=N.styles,dt={"w:p":function(Ae){var Le=Ae.firstOrEmpty("w:pPr"),He=!!Le.firstOrEmpty("w:rPr").first("w:del");
vendor: 4,882 bytes, line 57
57if(He)return Ae.children.forEach(function(Qe){xe.push(Qe)}),l();var Ze=Ae.children;return xe.length>0&&(Ze=xe.concat(Ze),xe=[]),h.map(L(Le),M(Ze),function(Qe,it){return new v.Paragraph(it,Qe)}).insertExtra()},"w:r":function(Ae){return h.map(X(Ae.firstOrEmpty("w:rPr")),M(Ae.children),function(Le,He){var Ze=ge();return Ze!==null&&(He=[new v.Hyperlink(He,Ze)]),new v.Run(He,Le)})},"w:fldChar":le,"w:instrText":W,"w:t":function(Ae){return u(new v.Text(Ae.text()))},"w:tab":function(Ae){return u(new v.Tab)},"w:noBreakHyphen":function(){return u(new v.Text("â"))},"w:softHyphen":function(Ae){return u(new v.Text("Â"))},"w:sym":te,"w:hyperlink":function(Ae){var Le=Ae.attributes["r:id"],He=Ae.attributes["w:anchor"];return M(Ae.children).map(function(Ze){function Qe(bt){var xn=Ae.attributes["w:tgtFrame"]||null;return new v.Hyperlink(Ze,b.extend({targetFrame:xn},bt))}if(Le){var it=De.findTargetByRelationshipId(Le);return He&&(it=S.replaceFragment(it,He)),Qe({href:it})}return He?Qe({anchor:He}):Ze})},"w:tbl":we,"w:tr":_e,"w:tc":K,"w:footnoteReference":Y("footnote"),"w:endnoteReference":Y("endnote"),"w:commentReference":se,"w:br":function(Ae){var Le=Ae.attributes["w:type"];return Le==null||Le==="textWrapping"?u(v.lineBreak):Le==="page"?u(v.pageBreak):Le==="column"?u(v.columnBreak):c([w("Unsupported break type: "+Le)])},"w:bookmarkStart":function(Ae){var Le=Ae.attributes["w:name"];return Le==="_GoBack"?l():u(new v.BookmarkStart({name:Le}))},"mc:AlternateContent":function(Ae){return ue(Ae.firstOrEmpty("mc:Fallback"))},"w:sdt":function(Ae){var Le=M(Ae.firstOrEmpty("w:sdtContent").children);return Le.map(function(He){var Ze=Ae.firstOrEmpty("w:sdtPr").first("wordml:checkbox");if(Ze){var Qe=Ze.first("wordml:checked"),it=!!Qe&&ee(Qe.attributes["wordml:val"]),bt=v.checkbox({checked:it}),xn=!1,an=He.map(T._elementsOfType(v.types.text,function(de){return de.value.length>0&&!xn?(xn=!0,bt):de}));return xn?an:bt}return He})},"w:ins":ue,"w:object":ue,"w:smartTag":ue,"w:drawing":ue,"w:pict":function(Ae){return ue(Ae).toExtra()},"v:roundrect":ue,"v:shape":ue,"v:textbox":ue,"w:txbxContent":ue,"wp:inline":Q,"wp:anchor":Q,"v:imagedata":I,"v:group":ue,"v:rect":ue};return{readXmlElement:F,readXmlElements:M}}function o(N,M,F){var L=M.firstOrEmpty("w:ilvl").attributes["w:val"],A=M.firstOrEmpty("w:numId").attributes["w:val"];if(L!==void 0&&A!==void 0)return F.findLevel(A,L);if(N!=null){var X=F.findLevelByParagraphStyleId(N);if(X!=null)return X}return A!==void 0?F.findLevel(A,"0"):null}function c(N){return new h(null,null,N)}function l(){return new h(null)}function u(N){return new h(N)}function d(N,M){return new h(N,null,M)}function h(N,M,F){this.value=N||[],this.extra=M||[],this._result=new x({element:this.value,extra:M},F),this.messages=this._result.messages}function f(N){var M=x.combine(b.pluck(N,"_result"));return new h(b.flatten(b.pluck(M.value,"element")),b.filter(b.flatten(b.pluck(M.value,"extra")),y),M.messages)}function p(N,M){return b.flatten([N,M])}function y(N){return N}r.createBodyReader=i,r._readNumberingProperties=o;var g=t("dingbat-to-unicode"),b=t("underscore"),v=t("../documents"),x=t("../results").Result,w=t("../results").warning,_=t("../xml"),T=t("../transforms"),S=t("./uris"),C={"image/png":!0,"image/gif":!0,"image/jpeg":!0,"image/svg+xml":!0,"image/tiff":!0},D={"office-word:wrap":!0,"v:shadow":!0,"v:shapetype":!0,"w:annotationRef":!0,"w:bookmarkEnd":!0,"w:sectPr":!0,"w:proofErr":!0,"w:lastRenderedPageBreak":!0,"w:commentRangeStart":!0,"w:commentRangeEnd":!0,"w:del":!0,"w:footnoteRef":!0,"w:endnoteRef":!0,"w:pPr":!0,"w:rPr":!0,"w:tblPr":!0,"w:tblGrid":!0,"w:trPr":!0,"w:tcPr":!0};h.prototype.toExtra=function(){return new h(null,p(this.extra,this.value),this.messages)},h.prototype.insertExtra=function(){var N=this.extra;return N&&N.length?new h(p(this.value,N),null,this.messages):this},h.prototype.map=function(N){var M=this._result.map(function(F){return N(F.element)});return new h(M.value,this.extra,M.messages)},h.prototype.flatMap=function(N){var M=this._result.flatMap(function(F){return N(F.element)._result});return new h(M.value.element,p(this.extra,M.value.extra),M.messages)},h.map=function(N,M,F){return new h(F(N.value,M.value),p(N.extra,M.extra),N.messages.concat(M.messages))}},{"../documents":4,"../results":25,"../transforms":30,"../xml":35,"./uris":16,"dingbat-to-unicode":85,underscore:102}],6:[function(t,n,r){function i(c){function l(d){return o.combine(d.getElementsByTagName("w:comment").map(u))}function u(d){function h(p){return(d.attributes[p]||"").trim()||null}var f=d.attributes["w:id"];return c.readXmlElements(d.children).map(function(p){return a.comment({commentId:f,body:p,authorName:h("w:author"),authorInitials:h("w:initials")})})}return l}var a=t("../documents"),o=t("../results").Result;r.createCommentsReader=i},{"../documents":4,"../results":25}],7:[function(t,n,r){function i(c){var l={},u={};
57return c.children.forEach(function(d){if(d.name==="content-types:Default"&&(l[d.attributes.Extension]=d.attributes.ContentType),d.name==="content-types:Override"){var h=d.attributes.PartName;h.charAt(0)==="/"&&(h=h.substring(1)),u[h]=d.attributes.ContentType}}),a(u,l)}function a(c,l){return{findContentType:function(u){var d=c[u];if(d)return d;var h=u.split("."),f=h[h.length-1];if(l.hasOwnProperty(f))return l[f];var p=o[f.toLowerCase()];return p?"image/"+p:null}}}r.readContentTypesFromXml=i;var o={png:"png",gif:"gif",jpeg:"jpeg",jpg:"jpeg",tif:"tiff",tiff:"tiff",bmp:"bmp"};r.defaultContentTypes=a({},{})},{}],8:[function(t,n,r){function i(c){function l(d){var h=d.first("w:body");if(h==null)throw new Error("Could not find the body element: are you sure this is a docx file?");var f=u.readXmlElements(h.children).map(function(p){return new a.Document(p,{notes:c.notes,comments:c.comments})});return new o(f.value,f.messages)}var u=c.bodyReader;return{convertXmlToDocument:l}}r.DocumentXmlReader=i;var a=t("../documents"),o=t("../results").Result},{"../documents":4,"../results":25}],9:[function(t,n,r){function i(A,X,he){X=X||{},he=he||{};var j=new M({externalFileAccess:he.externalFileAccess,relativeToFile:X.path});return p.props({contentTypes:F(A),partPaths:a(A),docxFile:A,files:j}).also(function(ee){return{styles:f(A,ee.partPaths.styles)}}).also(function(ee){return{numbering:h(A,ee.partPaths.numbering,ee.styles)}}).also(function(ee){return{footnotes:u(ee.partPaths.footnotes,ee,function(O,pe){return pe?D.createFootnotesReader(O)(pe):new g([])}),endnotes:u(ee.partPaths.endnotes,ee,function(O,pe){return pe?D.createEndnotesReader(O)(pe):new g([])}),comments:u(ee.partPaths.comments,ee,function(O,pe){return pe?N.createCommentsReader(O)(pe):new g([])})}}).also(function(ee){return{notes:ee.footnotes.flatMap(function(O){return ee.endnotes.map(function(pe){return new y.Notes(O.concat(pe))})})}}).then(function(ee){return u(ee.partPaths.mainDocument,ee,function(O,pe){return ee.notes.flatMap(function(q){return ee.comments.flatMap(function(B){var re=new w({bodyReader:O,notes:q,comments:B});return re.convertXmlToDocument(pe)})})})})}function a(A){return L(A).then(function(X){var he=o({docxFile:A,relationships:X,relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",basePath:"",fallbackPath:"word/document.xml"});if(!A.exists(he))throw new Error("Could not find main document part. Are you sure this is a valid .docx file?");return l({filename:d(he),readElement:_.readRelationships,defaultValue:_.defaultValue})(A).then(function(j){function ee(O){return o({docxFile:A,relationships:j,relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/"+O,basePath:b.splitPath(he).dirname,fallbackPath:"word/"+O+".xml"})}return{mainDocument:he,comments:ee("comments"),endnotes:ee("endnotes"),footnotes:ee("footnotes"),numbering:ee("numbering"),styles:ee("styles")}})})}function o(A){var X=A.docxFile,he=A.relationships,j=A.relationshipType,ee=A.basePath,O=A.fallbackPath,pe=he.findTargetsByType(j),q=pe.map(function(re){return c(b.joinPath(ee,re),"/")}),B=q.filter(function(re){return X.exists(re)});return B.length===0?O:B[0]}function c(A,X){return A.substring(0,X.length)===X?A.substring(X.length):A}function l(A){return function(X){return v(X,A.filename).then(function(he){return he?A.readElement(he):A.defaultValue})}}function u(A,X,he){var j=l({filename:d(A),readElement:_.readRelationships,defaultValue:_.defaultValue});return j(X.docxFile).then(function(ee){var O=new x({relationships:ee,contentTypes:X.contentTypes,docxFile:X.docxFile,numbering:X.numbering,styles:X.styles,files:X.files});return v(X.docxFile,A).then(function(pe){return he(O,pe)})})}function d(A){var X=b.splitPath(A);return b.joinPath(X.dirname,"_rels",X.basename+".rels")}function h(A,X,he){return l({filename:X,readElement:function(j){return S.readNumberingXml(j,{styles:he})},defaultValue:S.defaultNumbering})(A)}function f(A,X){return l({filename:X,readElement:C.readStylesXml,defaultValue:C.defaultStyles})(A)}r.read=i,r._findPartPaths=a;var p=t("../promises"),y=t("../documents"),g=t("../results").Result,b=t("../zipfile"),v=t("./office-xml-reader").readXmlFromZipFile,x=t("./body-reader").createBodyReader,w=t("./document-xml-reader").DocumentXmlReader,_=t("./relationships-reader"),T=t("./content-types-reader"),S=t("./numbering-xml"),C=t("./styles-reader"),D=t("./notes-reader"),N=t("./comments-reader"),M=t("./files").Files,F=l({filename:"[Content_Types].xml",readElement:T.readContentTypesFromXml,defaultValue:T.defaultContentTypes}),L=l({filename:"_rels/.rels",readElement:_.readRelationships,defaultValue:_.defaultValue})},{"../documents":4,"../promises":23,"../results":25,"../zipfile":40,"./body-reader":5,"./comments-reader":6,"./content-types-reader":7,"./document-xml-reader":8,"./files":1,"./notes-reader":10,"./numbering-xml":11,"./office-xml-reader":12,"./relationships-reader":13,"./styles-reader":15}],10:[function(t,n,r){function i(c,l){function u(f){return o.combine(f.getElementsByTagName("w:"+c).filter(d).map(h))}function d(f){var p=f.attributes["w:type"];return p!=="continuationSeparator"&&p!=="separator"}function h(f){var p=f.attributes["w:id"];return l.readXmlElements(f.children).map(function(y){return a.Note({noteType:c,noteId:p,body:y})})}return u}var a=t("../documents"),o=t("../results").Result;r.createFootnotesReader=i.bind(this,"footnote"),r.createEndnotesReader=i.bind(this,"endnote")},{"../documents":4,"../results":25}],11:[function(t,n,r){function i(d,h,f){function p(v,x){var w=d[v];if(w){var _=h[w.abstractNumId];if(_){if(_.numStyleLink==null)return h[w.abstractNumId].levels[x];var T=f.findNumberingStyleById(_.numStyleLink);return p(T.numId,x)}return null}return null}function y(v){return b[v]||null}var g=u.flatten(u.values(h).map(function(v){return u.values(v.levels)})),b=u.indexBy(g.filter(function(v){return v.paragraphStyleId!=null}),"paragraphStyleId");return{findLevel:p,findLevelByParagraphStyleId:y}}
57function a(d,h){if(!h||!h.styles)throw new Error("styles is missing");var f=o(d),p=l(d);return new i(p,f,h.styles)}function o(d){var h={};return d.getElementsByTagName("w:abstractNum").forEach(function(f){var p=f.attributes["w:abstractNumId"];h[p]=c(f)}),h}function c(d){var h={},f=null;d.getElementsByTagName("w:lvl").forEach(function(y){var g=y.attributes["w:ilvl"],b=y.firstOrEmpty("w:numFmt").attributes["w:val"],v=b!=="bullet",x=y.firstOrEmpty("w:pStyle").attributes["w:val"];g===void 0?f={isOrdered:v,level:"0",paragraphStyleId:x}:h[g]={isOrdered:v,level:g,paragraphStyleId:x}}),f!==null&&h[f.level]===void 0&&(h[f.level]=f);var p=d.firstOrEmpty("w:numStyleLink").attributes["w:val"];return{levels:h,numStyleLink:p}}function l(d){var h={};return d.getElementsByTagName("w:num").forEach(function(f){var p=f.attributes["w:numId"],y=f.first("w:abstractNumId").attributes["w:val"];h[p]={abstractNumId:y}}),h}var u=t("underscore");r.readNumberingXml=a,r.Numbering=i,r.defaultNumbering=new i({},{})},{underscore:102}],12:[function(t,n,r){function i(f){return d.readString(f,h).then(function(p){return c(p)[0]})}function a(f,p){return f.exists(p)?f.read(p,"utf-8").then(o).then(i):u.resolve(null)}function o(f){return f.replace(/^\uFEFF/g,"")}function c(f){return f.type==="element"?f.name==="mc:AlternateContent"?f.firstOrEmpty("mc:Fallback").children:(f.children=l.flatten(f.children.map(c,!0)),[f]):[f]}var l=t("underscore"),u=t("../promises"),d=t("../xml");r.read=i,r.readXmlFromZipFile=a;var h={"http://schemas.openxmlformats.org/wordprocessingml/2006/main":"w","http://schemas.openxmlformats.org/officeDocument/2006/relationships":"r","http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing":"wp","http://schemas.openxmlformats.org/drawingml/2006/main":"a","http://schemas.openxmlformats.org/drawingml/2006/picture":"pic","http://purl.oclc.org/ooxml/wordprocessingml/main":"w","http://purl.oclc.org/ooxml/officeDocument/relationships":"r","http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing":"wp","http://purl.oclc.org/ooxml/drawingml/main":"a","http://purl.oclc.org/ooxml/drawingml/picture":"pic","http://schemas.openxmlformats.org/package/2006/content-types":"content-types","http://schemas.openxmlformats.org/package/2006/relationships":"relationships","http://schemas.openxmlformats.org/markup-compatibility/2006":"mc","urn:schemas-microsoft-com:vml":"v","urn:schemas-microsoft-com:office:word":"office-word","http://schemas.microsoft.com/office/word/2010/wordml":"wordml"}},{"../promises":23,"../xml":35,underscore:102}],13:[function(t,n,r){function i(o){var c=[];return o.children.forEach(function(l){if(l.name==="relationships:Relationship"){var u={relationshipId:l.attributes.Id,target:l.attributes.Target,type:l.attributes.Type};c.push(u)}}),new a(c)}function a(o){var c={};o.forEach(function(u){c[u.relationshipId]=u.target});var l={};return o.forEach(function(u){l[u.type]||(l[u.type]=[]),l[u.type].push(u.target)}),{findTargetByRelationshipId:function(u){return c[u]},findTargetsByType:function(u){return l[u]||[]}}}r.readRelationships=i,r.defaultValue=new a([]),r.Relationships=a},{}],14:[function(t,n,r){function i(g,b){return g.write(p,b),a(g).then(function(){return o(g)})}function a(g){var b="word/_rels/document.xml.rels",v="http://schemas.openxmlformats.org/package/2006/relationships",x="{"+v+"}Relationship";return g.read(b,"utf8").then(h.readString).then(function(w){var _=w.children;c(_,x,"Id",{Id:"rMammothStyleMap",Type:f,Target:y});var T={"":v};return g.write(b,h.writeString(w,T))})}function o(g){var b="[Content_Types].xml",v="http://schemas.openxmlformats.org/package/2006/content-types",x="{"+v+"}Override";return g.read(b,"utf8").then(h.readString).then(function(w){var _=w.children;c(_,x,"PartName",{PartName:y,ContentType:"text/prs.mammoth.style-map"});var T={"":v};return g.write(b,h.writeString(w,T))})}function c(g,b,v,x){var w=u.find(g,function(_){return _.name===b&&_.attributes[v]===x[v]});w?w.attributes=x:g.push(h.element(b,x))}function l(g){return g.exists(p)?g.read(p,"utf8"):d.resolve(null)}var u=t("underscore"),d=t("../promises"),h=t("../xml");r.writeStyleMap=i,r.readStyleMap=l;
57var f="http://schemas.zwobble.org/mammoth/style-map",p="mammoth/style-map",y="/"+p},{"../promises":23,"../xml":35,underscore:102}],15:[function(t,n,r){function i(d,h,f,p){return{findParagraphStyleById:function(y){return d[y]},findCharacterStyleById:function(y){return h[y]},findTableStyleById:function(y){return f[y]},findNumberingStyleById:function(y){return p[y]}}}function a(d){var h={},f={},p={},y={},g={paragraph:h,character:f,table:p,numbering:y};return d.getElementsByTagName("w:style").forEach(function(b){var v=o(b),x=g[v.type];x&&x[v.styleId]===void 0&&(x[v.styleId]=v)}),new i(h,f,p,y)}function o(d){var h=d.attributes["w:type"];if(h==="numbering")return l(h,d);var f=u(d),p=c(d);return{type:h,styleId:f,name:p}}function c(d){var h=d.first("w:name");return h?h.attributes["w:val"]:null}function l(d,h){var f=u(h),p=h.firstOrEmpty("w:pPr").firstOrEmpty("w:numPr").firstOrEmpty("w:numId").attributes["w:val"];return{type:d,numId:p,styleId:f}}function u(d){return d.attributes["w:styleId"]}r.readStylesXml=a,r.Styles=i,r.defaultStyles=new i({},{}),i.EMPTY=new i({},{},{},{})},{}],16:[function(t,n,r){function i(o,c){return c.charAt(0)==="/"?c.substr(1):o+"/"+c}function a(o,c){var l=o.indexOf("#");return l!==-1&&(o=o.substring(0,l)),o+"#"+c}r.uriToZipEntryName=i,r.replaceFragment=a},{}],17:[function(t,n,r){function i(f,p,y){return o(u.element(f,p,{fresh:!1}),y)}function a(f,p,y){var g=u.element(f,p,{fresh:!0});return o(g,y)}function o(f,p){return{type:"element",tag:f,children:p||[]}}function c(f){return{type:"text",value:f}}function l(f){return f.children.length===0&&h[f.tag.tagName]}var u=t("../styles/html-paths"),d={type:"forceWrite"};r.freshElement=a,r.nonFreshElement=i,r.elementWithTag=o,r.text=c,r.forceWrite=d;var h={br:!0,hr:!0,img:!0,input:!0};r.isVoidElement=l},{"../styles/html-paths":28}],18:[function(t,n,r){function i(d,h){h.forEach(function(f){a(d,f)})}function a(d,h){u[h.type](d,h)}function o(d,h){l.isVoidElement(h)?d.selfClosing(h.tag.tagName,h.tag.attributes):(d.open(h.tag.tagName,h.tag.attributes),i(d,h.children),d.close(h.tag.tagName))}function c(d,h){d.text(h.value)}var l=t("./ast");r.freshElement=l.freshElement,r.nonFreshElement=l.nonFreshElement,r.elementWithTag=l.elementWithTag,r.text=l.text,r.forceWrite=l.forceWrite,r.simplify=t("./simplify");var u={element:o,text:c,forceWrite:function(){}};r.write=i},{"./ast":17,"./simplify":19}],19:[function(t,n,r){function i(w){return a(d(w))}function a(w){var _=[];return w.map(o).forEach(function(T){u(_,T)}),_}function o(w){return v[w.type](w)}function c(w){return b.elementWithTag(w.tag,a(w.children))}function l(w){return w}function u(w,_){var T=w[w.length-1];_.type==="element"&&!_.tag.fresh&&T&&T.type==="element"&&_.tag.matchesElement(T.tag)?(_.tag.separator&&u(T.children,b.text(_.tag.separator)),_.children.forEach(function(S){u(T.children,S)})):w.push(_)}function d(w){return h(w,function(_){return x[_.type](_)})}function h(w,_){return g.flatten(g.map(w,_),!0)}function f(w){return[w]}function p(w){var _=d(w.children);return _.length!==0||b.isVoidElement(w)?[b.elementWithTag(w.tag,_)]:[]}function y(w){return w.value.length===0?[]:[w]}var g=t("underscore"),b=t("./ast"),v={element:c,text:l,forceWrite:l},x={element:p,text:y,forceWrite:f};n.exports=i},{"./ast":17,underscore:102}],20:[function(t,n,r){function i(l){return function(u,d){return o.when(l(u)).then(function(h){var f={};return u.altText&&(f.alt=u.altText),a.extend(f,h),[c.freshElement("img",f)]})}}var a=t("underscore"),o=t("./promises"),c=t("./html");r.imgElement=i,r.inline=r.imgElement,r.dataUri=i(function(l){return l.readAsBase64String().then(function(u){return{src:"data:"+l.contentType+";base64,"+u}})})},{"./html":18,"./promises":23,underscore:102}],21:[function(t,n,r){(function(i){function a(S,C){return c(S,C)}function o(S,C){var D=Object.create(C||{});return D.outputFormat="markdown",c(S,D)}function c(S,C){return C=w(C),_.openZip(S).tap(function(D){return g.readStyleMap(D).then(function(N){C.embeddedStyleMap=N})}).then(function(D){return y.read(D,S,C).then(function(N){return N.map(C.transformDocument)}).then(function(N){return u(N,C)})})}function l(S){return _.openZip(S).then(g.readStyleMap)}function u(S,C){var D=d(C.readStyleMap()),N=p.extend({},C,{styleMap:D.value}),M=new b(N);return S.flatMapThen(function(F){return D.flatMapThen(function(L){return M.convertToHtml(F)})})}function d(S){return T.combine((S||[]).map(x)).map(function(C){return C.filter(function(D){return!!D})})}function h(S){return _.openZip(S).then(y.read).then(function(C){return C.map(v)})}function f(S,C){return _.openZip(S).tap(function(D){return g.writeStyleMap(D,C)}).then(function(D){return D.toArrayBuffer()}).then(function(D){return{toArrayBuffer:function(){return D},toBuffer:function(){return i.from(D)}}})}var p=t("underscore"),y=t("./docx/docx-reader"),g=t("./docx/style-map"),b=t("./document-to-html").DocumentConverter,v=t("./raw-text").convertElementToRawText,x=t("./style-reader").readStyle,w=t("./options-reader").readOptions,_=t("./unzip"),T=t("./results").Result;r.convertToHtml=a,r.convertToMarkdown=o,r.convert=c,r.extractRawText=h,r.images=t("./images"),r.transforms=t("./transforms"),r.underline=t("./underline"),r.embedStyleMap=f,r.readEmbeddedStyleMap=l,r.styleMapping=function(){throw new Error(`Use a raw string instead of mammoth.styleMapping e.g. "p[style-name='Title'] => h1" instead of mammoth.styleMapping("p[style-name='Title'] => h1")`)}}).call(this,t("buffer").Buffer)},{"./document-to-html":3,"./docx/docx-reader":9,"./docx/style-map":14,"./images":20,"./options-reader":22,"./raw-text":24,"./results":25,"./style-reader":26,"./transforms":30,"./underline":31,"./unzip":2,buffer:83,underscore:102}],22:[function(t,n,r){function i(d){return d=d||{},c.extend({},u,d,{customStyleMap:a(d.styleMap),readStyleMap:function(){var h=this.customStyleMap;return this.includeEmbeddedStyleMap&&(h=h.concat(a(this.embeddedStyleMap))),this.includeDefaultStyleMap&&(h=h.concat(l)),h}})}function a(d){return d?c.isString(d)?d.split(` 58`).map(function(h){return h.trim()}).filter(function(h){return h!==""&&h.charAt(0)!=="#"}):d:[]}function o(d){return d}r.readOptions=i;var c=t("underscore"),l=r._defaultStyleMap=["p.Heading1 => h1:fresh","p.Heading2 => h2:fresh","p.Heading3 => h3:fresh","p.Heading4 => h4:fresh","p.Heading5 => h5:fresh","p.Heading6 => h6:fresh","p[style-name='Heading 1'] => h1:fresh","p[style-name='Heading 2'] => h2:fresh","p[style-name='Heading 3'] => h3:fresh","p[style-name='Heading 4'] => h4:fresh","p[style-name='Heading 5'] => h5:fresh","p[style-name='Heading 6'] => h6:fresh","p[style-name='heading 1'] => h1:fresh","p[style-name='heading 2'] => h2:fresh","p[style-name='heading 3'] => h3:fresh","p[style-name='heading 4'] => h4:fresh","p[style-name='heading 5'] => h5:fresh","p[style-name='heading 6'] => h6:fresh","p.Heading => h1:fresh","p[style-name='Heading'] => h1:fresh","r[style-name='Strong'] => strong","p[style-name='footnote text'] => p:fresh","r[style-name='footnote reference'] =>","p[style-name='endnote text'] => p:fresh","r[style-name='endnote reference'] =>","p[style-name='annotation text'] => p:fresh","r[style-name='annotation reference'] =>","p[style-name='Footnote'] => p:fresh","r[style-name='Footnote anchor'] =>","p[style-name='Endnote'] => p:fresh","r[style-name='Endnote anchor'] =>","p:unordered-list(1) => ul > li:fresh","p:unordered-list(2) => ul|ol > li > ul > li:fresh","p:unordered-list(3) => ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:ordered-list(1) => ol > li:fresh","p:ordered-list(2) => ul|ol > li > ol > li:fresh","p:ordered-list(3) => ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ol >
58 li:fresh","r[style-name='Hyperlink'] =>","p[style-name='Normal'] => p:fresh","p.Body => p:fresh","p[style-name='Body'] => p:fresh"],u=r._standardOptions={externalFileAccess:!1,transformDocument:o,includeDefaultStyleMap:!0,includeEmbeddedStyleMap:!0}},{underscore:102}],23:[function(t,n,r){function i(){var c,l,u=new o.Promise(function(d,h){c=d,l=h});return{resolve:c,reject:l,promise:u}}var a=t("underscore"),o=t("bluebird/js/release/promise")();r.defer=i,r.when=o.resolve,r.resolve=o.resolve,r.all=o.all,r.props=o.props,r.reject=o.reject,r.promisify=o.promisify,r.mapSeries=o.mapSeries,r.attempt=o.attempt,r.nfcall=function(c){var l=Array.prototype.slice.call(arguments,1),u=o.promisify(c);return u.apply(null,l)},o.prototype.fail=o.prototype.caught,o.prototype.also=function(c){return this.then(function(l){var u=a.extend({},l,c(l));return o.props(u)})}},{"bluebird/js/release/promise":68,underscore:102}],24:[function(t,n,r){function i(o){if(o.type==="text")return o.value;if(o.type===a.types.tab)return" ";var c=o.type==="paragraph"?` 59 60`:"";return(o.children||[]).map(i).join("")+c}var a=t("./documents");r.convertElementToRawText=i},{"./documents":4}],25:[function(t,n,r){function i(f,p){this.value=f,this.messages=p||[]}function a(f){return new i(f,[])}function o(f){return{type:"warning",message:f}}function c(f){return{type:"error",message:f.message,error:f}}function l(f){var p=[];return h.flatten(h.pluck(f,"messages"),!0).forEach(function(y){u(p,y)||p.push(y)}),p}function u(f,p){return h.find(f,d.bind(null,p))!==void 0}function d(f,p){return f.type===p.type&&f.message===p.message}var h=t("underscore");r.Result=i,r.success=a,r.warning=o,r.error=c,i.prototype.map=function(f){return new i(f(this.value),this.messages)},i.prototype.flatMap=function(f){var p=f(this.value);return new i(p.value,l([this,p]))},i.prototype.flatMapThen=function(f){var p=this;return f(this.value).then(function(y){return new i(y.value,l([p,y]))})},i.combine=function(f){var p=h.flatten(h.pluck(f,"value")),y=l(f);return new i(p,y)}},{underscore:102}],26:[function(t,n,r){function i(L){return h(F,L)}function a(){return g.rules.sequence(g.rules.sequence.capture(c()),g.rules.tokenOfType("whitespace"),g.rules.tokenOfType("arrow"),g.rules.sequence.capture(g.rules.optional(g.rules.sequence(g.rules.tokenOfType("whitespace"),g.rules.sequence.capture(u())).head())),g.rules.tokenOfType("end")).map(function(L,A){return{from:L,to:A.valueOrElse(v.empty)}})}function o(L){return h(c(),L)}function c(){function L(_e){var K=g.rules.firstOf.apply(g.rules.firstOf,["matcher suffix"].concat(_e)),U=g.rules.zeroOrMore(K);return g.rules.then(U,function(R){var E={};return R.forEach(function(Q){y.extend(E,Q)}),E})}var A=g.rules.sequence,X=function(_e,K){return g.rules.then(g.rules.token("identifier",_e),function(){return K})},he=X("p",b.paragraph),j=X("r",b.run),ee=g.rules.firstOf("p or r or table",he,j),O=g.rules.sequence(g.rules.tokenOfType("dot"),g.rules.sequence.cut(),g.rules.sequence.capture(_)).map(function(_e){return{styleId:_e}}),pe=g.rules.firstOf("style name matcher",g.rules.then(g.rules.sequence(g.rules.tokenOfType("equals"),g.rules.sequence.cut(),g.rules.sequence.capture(S)).head(),function(_e){return{styleName:b.equalTo(_e)}}),g.rules.then(g.rules.sequence(g.rules.tokenOfType("startsWith"),g.rules.sequence.cut(),g.rules.sequence.capture(S)).head(),function(_e){return{styleName:b.startsWith(_e)}})),q=g.rules.sequence(g.rules.tokenOfType("open-square-bracket"),g.rules.sequence.cut(),g.rules.token("identifier","style-name"),g.rules.sequence.capture(pe),g.rules.tokenOfType("close-square-bracket")).head(),B=g.rules.firstOf("list type",X("ordered-list",{isOrdered:!0}),X("unordered-list",{isOrdered:!1})),re=A(g.rules.tokenOfType("colon"),A.capture(B),A.cut(),g.rules.tokenOfType("open-paren"),A.capture(T),g.rules.tokenOfType("close-paren")).map(function(_e,K){return{list:{isOrdered:_e.isOrdered,levelIndex:K-1}}}),le=A(A.capture(ee),A.capture(L([O,q,re]))).map(function(_e,K){return _e(K)}),ge=A(g.rules.token("identifier","table"),A.capture(L([O,q]))).map(function(_e){return b.table(_e)}),ie=X("b",b.bold),P=X("i",b.italic),W=X("u",b.underline),te=X("strike",b.strikethrough),Y=X("all-caps",b.allCaps),se=X("small-caps",b.smallCaps),ue=A(g.rules.token("identifier","highlight"),g.rules.sequence.capture(g.rules.optional(g.rules.sequence(g.rules.tokenOfType("open-square-bracket"),g.rules.sequence.cut(),g.rules.token("identifier","color"),g.rules.tokenOfType("equals"),g.rules.sequence.capture(S),g.rules.tokenOfType("close-square-bracket")).head()))).map(function(_e){return b.highlight({color:_e.valueOrElse(void 0)})}),we=X("comment-reference",b.commentReference),H=A(g.rules.token("identifier","br"),A.cut(),g.rules.tokenOfType("open-square-bracket"),g.rules.token("identifier","type"),g.rules.tokenOfType("equals"),A.capture(S),g.rules.tokenOfType("close-square-bracket")).map(function(_e){switch(_e){case"line":return b.lineBreak;case"page":return b.pageBreak;case"column":return b.columnBreak}});return g.rules.firstOf("element type",le,ge,ie,P,W,te,Y,se,ue,we,H)}function l(L){return h(u(),L)}function u(){var L=g.rules.sequence.capture,A=g.rules.tokenOfType("whitespace"),X=g.rules.then(g.rules.optional(g.rules.sequence(g.rules.tokenOfType("colon"),g.rules.token("identifier","fresh"))),function(O){return O.map(function(){return!0}).valueOrElse(!1)}),he=g.rules.then(g.rules.optional(g.rules.sequence(g.rules.tokenOfType("colon"),g.rules.token("identifier","separator"),g.rules.tokenOfType("open-paren"),L(S),g.rules.tokenOfType("close-paren")).head()),function(O){return O.valueOrElse("")}),j=g.rules.oneOrMoreWithSeparator(_,g.rules.tokenOfType("choice")),ee=g.rules.sequence(L(j),L(g.rules.zeroOrMore(M)),L(X),L(he)).map(function(O,pe,q,B){var re={},le={};return pe.forEach(function(ge){ge.append&&re[ge.name]?re[ge.name]+=" "+ge.value:re[ge.name]=ge.value}),q&&(le.fresh=!0),B&&(le.separator=B),v.element(O,re,le)});return g.rules.firstOf("html path",g.rules.then(g.rules.tokenOfType("bang"),function(){return v.ignore}),g.rules.then(g.rules.zeroOrMoreWithSeparator(ee,g.rules.sequence(A,g.rules.tokenOfType("gt"),A)),v.elements))}function d(L){return L.replace(/\\(.)/g,function(A,X){return C[X]||X})}function h(L,A){var X=x(A),he=g.Parser(),j=he.parseTokens(L,X);return j.isSuccess()?w.success(j.value()):new w.Result(null,[w.warning(f(A,j))])}
60function f(L,A){return"Did not understand this style mapping, so ignored it: "+L+` 61`+A.errors().map(p).join(` 62`)}function p(L){return"Error was at character number "+L.characterNumber()+": Expected "+L.expected+" but got "+L.actual}var y=t("underscore"),g=t("lop"),b=t("./styles/document-matchers"),v=t("./styles/html-paths"),x=t("./styles/parser/tokeniser").tokenise,w=t("./results");r.readHtmlPath=l,r.readDocumentMatcher=o,r.readStyle=i;var _=g.rules.then(g.rules.tokenOfType("identifier"),d),T=g.rules.tokenOfType("integer"),S=g.rules.then(g.rules.tokenOfType("string"),d),C={n:` 63`,r:"\r",t:" "},D=g.rules.sequence(g.rules.tokenOfType("open-square-bracket"),g.rules.sequence.cut(),g.rules.sequence.capture(_),g.rules.tokenOfType("equals"),g.rules.sequence.capture(S),g.rules.tokenOfType("close-square-bracket")).map(function(L,A){return{name:L,value:A,append:!1}}),N=g.rules.sequence(g.rules.tokenOfType("dot"),g.rules.sequence.cut(),g.rules.sequence.capture(_)).map(function(L){return{name:"class",value:L,append:!0}}),M=g.rules.firstOf("attribute or class",D,N),F=a()},{"./results":25,"./styles/document-matchers":27,"./styles/html-paths":28,"./styles/parser/tokeniser":29,lop:89,underscore:102}],27:[function(t,n,r){function i(b){return new l("paragraph",b)}function a(b){return new l("run",b)}function o(b){return new l("table",b)}function c(b){return new u(b)}function l(b,v){v=v||{},this._elementType=b,this._styleId=v.styleId,this._styleName=v.styleName,v.list&&(this._listIndex=v.list.levelIndex,this._listIsOrdered=v.list.isOrdered)}function u(b){b=b||{},this._color=b.color}function d(b){b=b||{},this._breakType=b.breakType}function h(b,v,x){return b.numbering&&b.numbering.level==v&&b.numbering.isOrdered==x}function f(b){return{operator:y,operand:b}}function p(b){return{operator:g,operand:b}}function y(b,v){return b.toUpperCase()===v.toUpperCase()}function g(b,v){return v.toUpperCase().indexOf(b.toUpperCase())===0}r.paragraph=i,r.run=a,r.table=o,r.bold=new l("bold"),r.italic=new l("italic"),r.underline=new l("underline"),r.strikethrough=new l("strikethrough"),r.allCaps=new l("allCaps"),r.smallCaps=new l("smallCaps"),r.highlight=c,r.commentReference=new l("commentReference"),r.lineBreak=new d({breakType:"line"}),r.pageBreak=new d({breakType:"page"}),r.columnBreak=new d({breakType:"column"}),r.equalTo=f,r.startsWith=p,l.prototype.matches=function(b){return b.type===this._elementType&&(this._styleId===void 0||b.styleId===this._styleId)&&(this._styleName===void 0||b.styleName&&this._styleName.operator(this._styleName.operand,b.styleName))&&(this._listIndex===void 0||h(b,this._listIndex,this._listIsOrdered))&&(this._breakType===void 0||this._breakType===b.breakType)},u.prototype.matches=function(b){return b.type==="highlight"&&(this._color===void 0||b.color===this._color)},d.prototype.matches=function(b){return b.type==="break"&&(this._breakType===void 0||b.breakType===this._breakType)}},{}],28:[function(t,n,r){function i(h,f){return a([c(h,f,{fresh:!0})])}function a(h){return new o(h.map(function(f){return u.isString(f)?c(f):f}))}function o(h){this._elements=h}function c(h,f,p){return p=p||{},new l(h,f,p)}function l(h,f,p){var y={};u.isArray(h)?(h.forEach(function(g){y[g]=!0}),h=h[0]):y[h]=!0,this.tagName=h,this.tagNames=y,this.attributes=f||{},this.fresh=p.fresh,this.separator=p.separator}var u=t("underscore"),d=t("../html");r.topLevelElement=i,r.elements=a,r.element=c,o.prototype.wrap=function(h){for(var f=h(),p=this._elements.length-1;p>=0;p--)f=this._elements[p].wrapNodes(f);return f},l.prototype.matchesElement=function(h){return this.tagNames[h.tagName]&&u.isEqual(this.attributes||{},h.attributes||{})},l.prototype.wrap=function(h){return this.wrapNodes(h())},l.prototype.wrapNodes=function(h){return[d.elementWithTag(this,h)]},r.empty=a([]),r.ignore={wrap:function(){return[]}}},{"../html":18,underscore:102}],29:[function(t,n,r){function i(l){var u="(?:[a-zA-Z\\-_]|\\\\.)",d=new o([{name:"identifier",regex:new RegExp("("+u+"(?:"+u+"|[0-9])*)")},{name:"dot",regex:/\./},{name:"colon",regex:/:/},{name:"gt",regex:/>/},{name:"whitespace",regex:/\s+/},{name:"arrow",regex:/=>/},{name:"equals",regex:/=/},{name:"startsWith",regex:/\^=/},{name:"open-paren",regex:/\(/},{name:"close-paren",regex:/\)/},{name:"open-square-bracket",regex:/\[/},{name:"close-square-bracket",regex:/\]/},{name:"string",regex:new RegExp(c+"'")},{name:"unterminated-string",regex:new RegExp(c)},{name:"integer",regex:/([0-9]+)/},{name:"choice",regex:/\|/},{name:"bang",regex:/(!)/}]);return d.tokenise(l)}var a=t("lop"),o=a.RegexTokeniser;r.tokenise=i;var c="'((?:\\\\.|[^'])*)"},{lop:89}],30:[function(t,n,r){function i(f){return o("paragraph",f)}function a(f){return o("run",f)}function o(f,p){return c(function(y){return y.type===f?p(y):y})}function c(f){return function p(y){if(y.children){var g=h.map(y.children,p);y=h.extend(y,{children:g})}return f(y)}}function l(f,p){return u(f).filter(function(y){return y.type===p})}function u(f){var p=[];return d(f,function(y){p.push(y)}),p}
63function d(f,p){f.children&&f.children.forEach(function(y){d(y,p),p(y)})}var h=t("underscore");r.paragraph=i,r.run=a,r._elements=c,r._elementsOfType=o,r.getDescendantsOfType=l,r.getDescendants=u},{underscore:102}],31:[function(t,n,r){function i(c){return function(l){return o.elementWithTag(a.element(c),[l])}}var a=t("./styles/html-paths"),o=t("./html");r.element=i},{"./html":18,"./styles/html-paths":28}],32:[function(t,n,r){function i(h){return h=h||{},h.prettyPrint?a():o()}function a(){function h(N,M){d[N]&&v(),T.push(N),D.open(N,M),d[N]&&w++,S=!1}function f(N){d[N]&&(w--,v()),T.pop(),D.close(N)}function p(N){b();var M=x()?N:N.replace(` 64`,` 65`+_);D.text(M)}function y(N,M){v(),D.selfClosing(N,M)}function g(){return T.length===0||d[T[T.length-1]]}function b(){C||(v(),C=!0)}function v(){if(C=!1,!S&&g()&&!x()){D._append(` 66`);for(var N=0;w>N;N++)D._append(_)}}function x(){return u.some(T,function(N){return N==="pre"})}var w=0,_=" ",T=[],S=!0,C=!1,D=o();return{asString:D.asString,open:h,close:f,text:p,selfClosing:y}}function o(){function h(w,_){var T=y(_);x.push("<"+w+T+">")}function f(w){x.push("</"+w+">")}function p(w,_){var T=y(_);x.push("<"+w+T+" />")}function y(w){return u.map(w,function(_,T){return" "+T+'="'+l(_)+'"'}).join("")}function g(w){x.push(c(w))}function b(w){x.push(w)}function v(){return x.join("")}var x=[];return{asString:v,open:h,close:f,text:g,selfClosing:p,_append:b}}function c(h){return h.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function l(h){return h.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}var u=t("underscore");r.writer=i;var d={div:!0,p:!0,ul:!0,li:!0}},{underscore:102}],33:[function(t,n,r){function i(c){return c=c||{},c.outputFormat==="markdown"?o.writer():a.writer(c)}var a=t("./html-writer"),o=t("./markdown-writer");r.writer=i},{"./html-writer":32,"./markdown-writer":34}],34:[function(t,n,r){function i(g){return a(g,g)}function a(g,b){return function(){return{start:g,end:b}}}function o(g){var b=g.href||"";return b?{start:"[",end:"]("+b+")",anchorPosition:"before"}:{}}function c(g){var b=g.src||"",v=g.alt||"";return b||v?{start:""}:{}}function l(g){return function(b,v){return{start:v?` 67`:"",end:v?"":` 68`,list:{isOrdered:g.isOrdered,indent:v?v.indent+1:0,count:0}}}}function u(g,b,v){b=b||{indent:0,isOrdered:!1,count:0},b.count++,v.hasClosed=!1;var x=b.isOrdered?b.count+".":"-",w=d(" ",b.indent)+x+" ";return{start:w,end:function(){return v.hasClosed?void 0:(v.hasClosed=!0,` 69`)}}}function d(g,b){return new Array(b+1).join(g)}function h(){function g(N,M){M=M||{};var F=y[N]||function(){return{}},L=F(M,C,D);S.push({end:L.end,list:C}),L.list&&(C=L.list);var A=L.anchorPosition==="before";A&&b(M),T.push(L.start||""),A||b(M)}function b(N){N.id&&T.push('<a id="'+N.id+'"></a>')}function v(N){var M=S.pop();C=M.list;var F=p.isFunction(M.end)?M.end():M.end;T.push(F||"")}function x(N,M){g(N,M),v()}function w(N){T.push(f(N))}function _(){return T.join("")}var T=[],S=[],C=null,D={};return{asString:_,open:g,close:v,text:w,selfClosing:x}}function f(g){return g.replace(/\\/g,"\\\\").replace(/([\`\*_\{\}\[\]\(\)\#\+\-\.\!])/g,"\\$1")}var p=t("underscore"),y={p:a("",` 70 71`),br:a("",` 72`),ul:l({isOrdered:!1}),ol:l({isOrdered:!0}),li:u,strong:i("__"),em:i("*"),a:o,img:c};(function(){for(var g=1;6>=g;g++)y["h"+g]=a(d("#",g)+" ",` 73 74`)})(),r.writer=h},{underscore:102}],35:[function(t,n,r){var i=t("./nodes");r.Element=i.Element,r.element=i.element,r.emptyElement=i.emptyElement,r.text=i.text,r.readString=t("./reader").readString,r.writeString=t("./writer").writeString},{"./nodes":36,"./reader":37,"./writer":38}],36:[function(t,n,r){function i(u,d,h){this.type="element",this.name=u,this.attributes=d||{},this.children=h||[]}function a(u){return o.extend(u,l)}var o=t("underscore");r.Element=i,r.element=function(u,d,h){return new i(u,d,h)},r.text=function(u){return{type:"text",value:u}};var c=r.emptyElement={first:function(){return null},firstOrEmpty:function(){return c},attributes:{},children:[]};i.prototype.first=function(u){return o.find(this.children,function(d){return d.name===u})},i.prototype.firstOrEmpty=function(u){return this.first(u)||c},i.prototype.getElementsByTagName=function(u){var d=o.filter(this.children,function(h){return h.name===u});return a(d)},i.prototype.text=function(){if(this.children.length===0)return"";if(this.children.length!==1||this.children[0].type!=="text")throw new Error("Not implemented");return this.children[0].value};var l={getElementsByTagName:function(u){return a(o.flatten(this.map(function(d){return d.getElementsByTagName(u)},!0)))}}},{underscore:102}
74],37:[function(t,n,r){function i(h,f){function p(v){switch(v.nodeType){case d.ELEMENT_NODE:return y(v);case d.TEXT_NODE:return l.text(v.nodeValue)}}function y(v){var x=g(v),w=[];o.forEach(v.childNodes,function(T){var S=p(T);S&&w.push(S)});var _={};return o.forEach(v.attributes,function(T){_[g(T)]=T.value}),new u(x,_,w)}function g(v){if(v.namespaceURI){var x,w=f[v.namespaceURI];return x=w?w+":":"{"+v.namespaceURI+"}",x+v.localName}return v.localName}f=f||{};try{var b=c.parseFromString(h,"text/xml")}catch(v){return a.reject(v)}return b.documentElement.tagName==="parsererror"?a.resolve(new Error(b.documentElement.textContent)):a.resolve(p(b.documentElement))}var a=t("../promises"),o=t("underscore"),c=t("./xmldom"),l=t("./nodes"),u=l.Element;r.readString=i;var d=c.Node},{"../promises":23,"./nodes":36,"./xmldom":39,underscore:102}],38:[function(t,n,r){function i(l,u){function d(b,v){return g[v.type](b,v)}function h(b,v){var x=b.element(f(v.name),v.attributes);v.children.forEach(function(w){d(x,w)})}function f(b){var v=/^\{(.*)\}(.*)$/.exec(b);if(v){var x=y[v[1]];return x+(x===""?"":":")+v[2]}return b}function p(b){var v=c.create(f(b.name),{version:"1.0",encoding:"UTF-8",standalone:!0});return o.forEach(u,function(x,w){var _="xmlns"+(w===""?"":":"+w);v.attribute(_,x)}),b.children.forEach(function(x){d(v,x)}),v.end()}var y=o.invert(u),g={element:h,text:a};return p(l)}function a(l,u){l.text(u.value)}var o=t("underscore"),c=t("xmlbuilder");r.writeString=i},{underscore:102,xmlbuilder:124}],39:[function(t,n,r){function i(c){var l=null,u=new a.DOMParser({errorHandler:function(h,f){l={level:h,message:f}}}),d=u.parseFromString(c);if(l===null)return d;throw new Error(l.level+": "+l.message)}var a=t("@xmldom/xmldom"),o=t("@xmldom/xmldom/lib/dom");r.parseFromString=i,r.Node=o.Node},{"@xmldom/xmldom":45,"@xmldom/xmldom/lib/dom":43}],40:[function(t,n,r){function i(u){return l.loadAsync(u).then(function(d){function h(g){return d.file(g)!==null}function f(g,b){return d.file(g).async("uint8array").then(function(v){if(b==="base64")return c.fromByteArray(v);if(b){var x=new TextDecoder(b);return x.decode(v)}return v})}function p(g,b){d.file(g,b)}function y(){return d.generateAsync({type:"arraybuffer"})}return{exists:h,read:f,write:p,toArrayBuffer:y}})}function a(u){var d=u.lastIndexOf("/");return d===-1?{dirname:"",basename:u}:{dirname:u.substring(0,d),basename:u.substring(d+1)}}function o(){var u=Array.prototype.filter.call(arguments,function(h){return h}),d=[];return u.forEach(function(h){/^\//.test(h)?d=[h]:d.push(h)}),d.join("/")}var c=t("base64-js"),l=t("jszip");r.openArrayBuffer=i,r.splitPath=a,r.joinPath=o},{"base64-js":47,jszip:88}],41:[function(t,n,r){function i(u,d,h){if(h===void 0&&(h=Array.prototype),u&&typeof h.find=="function")return h.find.call(u,d);for(var f=0;f<u.length;f++)if(Object.prototype.hasOwnProperty.call(u,f)){var p=u[f];if(d.call(void 0,p,f,u))return p}}function a(u,d){return d===void 0&&(d=Object),d&&typeof d.freeze=="function"?d.freeze(u):u}function o(u,d){if(u===null||typeof u!="object")throw new TypeError("target is not an object");for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&(u[h]=d[h]);return u}var c=a({HTML:"text/html",isHTML:function(u){return u===c.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),l=a({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(u){return u===l.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});r.assign=o,r.find=i,r.freeze=a,r.MIME_TYPE=c,r.NAMESPACE=l},{}],42:[function(t,n,r){function i(_){return _.replace(/\r[\n\u0085]/g,` 75`).replace(/[\r\u0085\u2028]/g,` 76`)}function a(_){this.options=_||{locator:{}}}function o(_,T,S){function C(M){var F=_[M];!F&&N&&(F=_.length==2?function(L){_(M,L)}:_),D[M]=F&&function(L){F("[xmldom "+M+"] "+L+u(S))}||function(){}}if(!_){if(T instanceof c)return T;_=T}var D={},N=_ instanceof Function;return S=S||{},C("warning"),C("error"),C("fatalError"),D}function c(){this.cdata=!1}function l(_,T){T.lineNumber=_.lineNumber,T.columnNumber=_.columnNumber}function u(_){return _?` 77@`+(_.systemId||"")+"#[line:"+_.lineNumber+",col:"+_.columnNumber+"]":void 0}function d(_,T,S){return typeof _=="string"?_.substr(T,S):_.length>=T+S||T?new java.lang.String(_,T,S)+"":_}function h(_,T){_.currentElement?_.currentElement.appendChild(T):_.doc.appendChild(T)}var f=t("./conventions"),p=t("./dom"),y=t("./entities"),g=t("./sax"),b=p.DOMImplementation,v=f.NAMESPACE,x=g.ParseError,w=g.XMLReader;a.prototype.parseFromString=function(_,T){var S=this.options,C=new w,D=S.domBuilder||new c,N=S.errorHandler,M=S.locator,F=S.xmlns||{},L=/\/x?html?$/.test(T),A=L?y.HTML_ENTITIES:y.XML_ENTITIES;M&&D.setDocumentLocator(M),C.errorHandler=o(N,D,M),C.domBuilder=S.domBuilder||D,L&&(F[""]=v.HTML),F.xml=F.xml||v.XML;var X=S.normalizeLineEndings||i;return _&&typeof _=="string"?C.parse(X(_),F,A):C.errorHandler.error("invalid doc source"),D.doc},c.prototype={startDocument:function(){this.doc=new b().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(_,T,S,C){var D=this.doc,N=D.createElementNS(_,S||T),M=C.length;h(this,N),this.currentElement=N,this.locator&&l(this.locator,N);for(var F=0;M>F;F++){var _=C.getURI(F),L=C.getValue(F),S=C.getQName(F),A=D.createAttributeNS(_,S);this.locator&&l(C.getLocator(F),A),A.value=A.nodeValue=L,N.setAttributeNode(A)}},endElement:function(_,T,S){var C=this.currentElement;C.tagName,this.currentElement=C.parentNode},startPrefixMapping:function(_,T){},endPrefixMapping:function(_){},processingInstruction:function(_,T){var S=this.doc.createProcessingInstruction(_,T);this.locator&&l(this.locator,S),h(this,S)},ignorableWhitespace:function(_,T,S){},characters:function(_,T,S){if(_=d.apply(this,arguments)){if(this.cdata)var C=this.doc.createCDATASection(_);else var C=this.doc.createTextNode(_);this.currentElement?this.currentElement.appendChild(C):/^\s*$/.test(_)&&this.doc.appendChild(C),this.locator&&l(this.locator,C)}},skippedEntity:function(_){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(_){(this.locator=_)&&(_.lineNumber=0)},comment:function(_,T,S){_=d.apply(this,arguments);var C=this.doc.createComment(_);this.locator&&l(this.locator,C),h(this,C)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(_,T,S){var C=this.doc.implementation;if(C&&C.createDocumentType){var D=C.createDocumentType(_,T,S);this.locator&&l(this.locator,D),h(this,D),this.doc.doctype=D}},warning:function(_){console.warn("[xmldom warning] "+_,u(this.locator))},error:function(_){console.error("[xmldom error] "+_,u(this.locator))},fatalError:function(_){throw new x(_,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(_){c.prototype[_]=function(){return null}}),r.__DOMHandler=c,r.normalizeLineEndings=i,r.DOMParser=a},{"./conventions":41,"./dom":43,"./entities":44,"./sax":46}],43:[function(t,n,r){function i(de){return de!==""}function a(de){return de?de.split(/[\t\n\f\r ]+/).filter(i):[]}
vendor: 4,256 bytes, line 77
77function o(de,ve){return de.hasOwnProperty(ve)||(de[ve]=!0),de}function c(de){if(!de)return[];var ve=a(de);return Object.keys(ve.reduce(o,{}))}function l(de){return function(ve){return de&&de.indexOf(ve)!==-1}}function u(de,ve){for(var Ce in de)Object.prototype.hasOwnProperty.call(de,Ce)&&(ve[Ce]=de[Ce])}function d(de,ve){function Ce(){}var Me=de.prototype;Me instanceof ve||(Ce.prototype=ve.prototype,Ce=new Ce,u(Me,Ce),de.prototype=Me=Ce),Me.constructor!=de&&(typeof de!="function"&&console.error("unknown Class:"+de),Me.constructor=de)}function h(de,ve){if(ve instanceof Error)var Ce=ve;else Ce=this,Error.call(this,it[de]),this.message=it[de],Error.captureStackTrace&&Error.captureStackTrace(this,h);return Ce.code=de,ve&&(this.message=this.message+": "+ve),Ce}function f(){}function p(de,ve){this._node=de,this._refresh=ve,y(this)}function y(de){var ve=de._node._inc||de._node.ownerDocument._inc;if(de._inc!=ve){var Ce=de._refresh(de._node);I(de,"length",Ce.length),u(Ce,de),de._inc=ve}}function g(){}function b(de,ve){for(var Ce=de.length;Ce--;)if(de[Ce]===ve)return Ce}function v(de,ve,Ce,Me){if(Me?ve[b(ve,Me)]=Ce:ve[ve.length++]=Ce,de){Ce.ownerElement=de;var Xe=de.ownerDocument;Xe&&(Me&&N(Xe,de,Me),D(Xe,de,Ce))}}function x(de,ve,Ce){var Me=b(ve,Ce);if(!(Me>=0))throw new h(xn,new Error(de.tagName+"@"+Ce));for(var Xe=ve.length-1;Xe>Me;)ve[Me]=ve[++Me];if(ve.length=Xe,de){var pt=de.ownerDocument;pt&&(N(pt,de,Ce),Ce.ownerElement=null)}}function w(){}function _(){}function T(de){return de=="<"&&"<"||de==">"&&">"||de=="&"&&"&"||de=='"'&&"""||"&#"+de.charCodeAt()+";"}function S(de,ve){if(ve(de))return!0;if(de=de.firstChild)do if(S(de,ve))return!0;while(de=de.nextSibling)}function C(){this.ownerDocument=this}function D(de,ve,Ce){de&&de._inc++;var Me=Ce.namespaceURI;Me===ye.XMLNS&&(ve._nsMap[Ce.prefix?Ce.localName:""]=Ce.value)}function N(de,ve,Ce,Me){de&&de._inc++;var Xe=Ce.namespaceURI;Xe===ye.XMLNS&&delete ve._nsMap[Ce.prefix?Ce.localName:""]}function M(de,ve,Ce){if(de&&de._inc){de._inc++;var Me=ve.childNodes;if(Ce)Me[Me.length++]=Ce;else{for(var Xe=ve.firstChild,pt=0;Xe;)Me[pt++]=Xe,Xe=Xe.nextSibling;Me.length=pt,delete Me[Me.length]}}}function F(de,ve){var Ce=ve.previousSibling,Me=ve.nextSibling;return Ce?Ce.nextSibling=Me:de.firstChild=Me,Me?Me.previousSibling=Ce:de.lastChild=Ce,ve.parentNode=null,ve.previousSibling=null,ve.nextSibling=null,M(de.ownerDocument,de),ve}function L(de){return de&&(de.nodeType===_.DOCUMENT_NODE||de.nodeType===_.DOCUMENT_FRAGMENT_NODE||de.nodeType===_.ELEMENT_NODE)}function A(de){return de&&(he(de)||j(de)||X(de)||de.nodeType===_.DOCUMENT_FRAGMENT_NODE||de.nodeType===_.COMMENT_NODE||de.nodeType===_.PROCESSING_INSTRUCTION_NODE)}function X(de){return de&&de.nodeType===_.DOCUMENT_TYPE_NODE}function he(de){return de&&de.nodeType===_.ELEMENT_NODE}function j(de){return de&&de.nodeType===_.TEXT_NODE}function ee(de,ve){var Ce=de.childNodes||[];if(ae(Ce,he)||X(ve))return!1;var Me=ae(Ce,X);return!(ve&&Me&&Ce.indexOf(Me)>Ce.indexOf(ve))}function O(de,ve){function Ce(pt){return he(pt)&&pt!==ve}var Me=de.childNodes||[];if(ae(Me,Ce))return!1;var Xe=ae(Me,X);return!(ve&&Xe&&Me.indexOf(Xe)>Me.indexOf(ve))}function pe(de,ve,Ce){if(!L(de))throw new h(bt,"Unexpected parent node type "+de.nodeType);if(Ce&&Ce.parentNode!==de)throw new h(xn,"child not in parent");if(!A(ve)||X(ve)&&de.nodeType!==_.DOCUMENT_NODE)throw new h(bt,"Unexpected node type "+ve.nodeType+" for parent node type "+de.nodeType)}function q(de,ve,Ce){var Me=de.childNodes||[],Xe=ve.childNodes||[];if(ve.nodeType===_.DOCUMENT_FRAGMENT_NODE){var pt=Xe.filter(he);if(pt.length>1||ae(Xe,j))throw new h(bt,"More than one element or text in fragment");if(pt.length===1&&!ee(de,Ce))throw new h(bt,"Element in fragment can not be inserted before doctype")}if(he(ve)&&!ee(de,Ce))throw new h(bt,"Only one element can be added and only after doctype");if(X(ve)){if(ae(Me,X))throw new h(bt,"Only one doctype is allowed");var Ft=ae(Me,he);if(Ce&&Me.indexOf(Ft)<Me.indexOf(Ce))throw new h(bt,"Doctype can only be inserted before an element");if(!Ce&&Ft)throw new h(bt,"Doctype can not be appended since element is present")}}function B(de,ve,Ce){function Me(es){return X(es)&&es!==Ce}var Xe=de.childNodes||[],pt=ve.childNodes||[];
vendor: 4,112 bytes, line 77
77if(ve.nodeType===_.DOCUMENT_FRAGMENT_NODE){var Ft=pt.filter(he);if(Ft.length>1||ae(pt,j))throw new h(bt,"More than one element or text in fragment");if(Ft.length===1&&!O(de,Ce))throw new h(bt,"Element in fragment can not be inserted before doctype")}if(he(ve)&&!O(de,Ce))throw new h(bt,"Only one element can be added and only after doctype");if(X(ve)){if(ae(Xe,Me))throw new h(bt,"Only one doctype is allowed");var Bt=ae(Xe,he);if(Ce&&Xe.indexOf(Bt)<Xe.indexOf(Ce))throw new h(bt,"Doctype can only be inserted before an element")}}function re(de,ve,Ce,Me){pe(de,ve,Ce),de.nodeType===_.DOCUMENT_NODE&&(Me||q)(de,ve,Ce);var Xe=ve.parentNode;if(Xe&&Xe.removeChild(ve),ve.nodeType===He){var pt=ve.firstChild;if(pt==null)return ve;var Ft=ve.lastChild}else pt=Ft=ve;var Bt=Ce?Ce.previousSibling:de.lastChild;pt.previousSibling=Bt,Ft.nextSibling=Ce,Bt?Bt.nextSibling=pt:de.firstChild=pt,Ce==null?de.lastChild=Ft:Ce.previousSibling=Ft;do pt.parentNode=de;while(pt!==Ft&&(pt=pt.nextSibling));return M(de.ownerDocument||de,de),ve.nodeType==He&&(ve.firstChild=ve.lastChild=null),ve}function le(de,ve){return ve.parentNode&&ve.parentNode.removeChild(ve),ve.parentNode=de,ve.previousSibling=de.lastChild,ve.nextSibling=null,ve.previousSibling?ve.previousSibling.nextSibling=ve:de.firstChild=ve,de.lastChild=ve,M(de.ownerDocument,de,ve),ve}function ge(){this._nsMap={}}function ie(){}function P(){}function W(){}function te(){}function Y(){}function se(){}function ue(){}function we(){}function H(){}function _e(){}function K(){}function U(){}function R(de,ve){var Ce=[],Me=this.nodeType==9&&this.documentElement||this,Xe=Me.prefix,pt=Me.namespaceURI;if(pt&&Xe==null){var Xe=Me.lookupPrefix(pt);if(Xe==null)var Ft=[{namespace:pt,prefix:null}]}return ce(this,Ce,de,ve,Ft),Ce.join("")}function E(de,ve,Ce){var Me=de.prefix||"",Xe=de.namespaceURI;if(!Xe||Me==="xml"&&Xe===ye.XML||Xe===ye.XMLNS)return!1;for(var pt=Ce.length;pt--;){var Ft=Ce[pt];if(Ft.prefix===Me)return Ft.namespace!==Xe}return!0}function Q(de,ve,Ce){de.push(" ",ve,'="',Ce.replace(/[<>&"\t\n\r]/g,T),'"')}function ce(de,ve,Ce,Me,Xe){if(Xe||(Xe=[]),Me){if(de=Me(de),!de)return;if(typeof de=="string")return void ve.push(de)}switch(de.nodeType){case xe:var pt=de.attributes,Ft=pt.length,Bt=de.firstChild,es=de.tagName;Ce=ye.isHTML(de.namespaceURI)||Ce;var ks=es;if(!Ce&&!de.prefix&&de.namespaceURI){for(var Ns,$l=0;$l<pt.length;$l++)if(pt.item($l).name==="xmlns"){Ns=pt.item($l).value;break}if(!Ns)for(var ra=Xe.length-1;ra>=0;ra--){var ia=Xe[ra];if(ia.prefix===""&&ia.namespace===de.namespaceURI){Ns=ia.namespace;break}}if(Ns!==de.namespaceURI)for(var ra=Xe.length-1;ra>=0;ra--){var ia=Xe[ra];if(ia.namespace===de.namespaceURI){ia.prefix&&(ks=ia.prefix+":"+es);break}}}ve.push("<",ks);for(var ts=0;Ft>ts;ts++){var ns=pt.item(ts);ns.prefix=="xmlns"?Xe.push({prefix:ns.localName,namespace:ns.value}):ns.nodeName=="xmlns"&&Xe.push({prefix:"",namespace:ns.value})}for(var ts=0;Ft>ts;ts++){var ns=pt.item(ts);if(E(ns,Ce,Xe)){var sa=ns.prefix||"",Kl=ns.namespaceURI;Q(ve,sa?"xmlns:"+sa:"xmlns",Kl),Xe.push({prefix:sa,namespace:Kl})}ce(ns,ve,Ce,Me,Xe)}if(es===ks&&E(de,Ce,Xe)){var sa=de.prefix||"",Kl=de.namespaceURI;Q(ve,sa?"xmlns:"+sa:"xmlns",Kl),Xe.push({prefix:sa,namespace:Kl})}if(Bt||Ce&&!/^(?:meta|link|img|br|hr|input)$/i.test(es)){if(ve.push(">"),Ce&&/^script$/i.test(es))for(;Bt;)Bt.data?ve.push(Bt.data):ce(Bt,ve,Ce,Me,Xe.slice()),Bt=Bt.nextSibling;else for(;Bt;)ce(Bt,ve,Ce,Me,Xe.slice()),Bt=Bt.nextSibling;ve.push("</",ks,">")}else ve.push("/>");return;case Ae:case He:for(var Bt=de.firstChild;Bt;)ce(Bt,ve,Ce,Me,Xe.slice()),Bt=Bt.nextSibling;return;case De:return Q(ve,de.name,de.value);case Re:return ve.push(de.data.replace(/[<&>]/g,T));case Ue:return ve.push("<![CDATA[",de.data,"]]>");case dt:return ve.push("<!--",de.data,"-->");case Le:var qp=de.publicId,ao=de.systemId;if(ve.push("<!DOCTYPE ",de.name),qp)ve.push(" PUBLIC ",qp),ao&&ao!="."&&ve.push(" ",ao),ve.push(">");else if(ao&&ao!=".")ve.push(" SYSTEM ",ao,">");else{var Xl=de.internalSubset;Xl&&ve.push(" [",Xl,"]"),ve.push(">")}return;case Ye:return ve.push("<?",de.target," ",de.data,"?>");
vendor: 11,400 bytes, line 77
77case Ke:return ve.push("&",de.nodeName,";");default:ve.push("??",de.nodeName)}}function V(de,ve,Ce){var Me;switch(ve.nodeType){case xe:Me=ve.cloneNode(!1),Me.ownerDocument=de;case He:break;case De:Ce=!0}if(Me||(Me=ve.cloneNode(!1)),Me.ownerDocument=de,Me.parentNode=null,Ce)for(var Xe=ve.firstChild;Xe;)Me.appendChild(V(de,Xe,Ce)),Xe=Xe.nextSibling;return Me}function k(de,ve,Ce){var Me=new ve.constructor;for(var Xe in ve)if(Object.prototype.hasOwnProperty.call(ve,Xe)){var pt=ve[Xe];typeof pt!="object"&&pt!=Me[Xe]&&(Me[Xe]=pt)}switch(ve.childNodes&&(Me.childNodes=new f),Me.ownerDocument=de,Me.nodeType){case xe:var Ft=ve.attributes,Bt=Me.attributes=new g,es=Ft.length;Bt._ownerElement=Me;for(var ks=0;es>ks;ks++)Me.setAttributeNode(k(de,Ft.item(ks),!0));break;case De:Ce=!0}if(Ce)for(var Ns=ve.firstChild;Ns;)Me.appendChild(k(de,Ns,Ce)),Ns=Ns.nextSibling;return Me}function I(de,ve,Ce){de[ve]=Ce}function $(de){switch(de.nodeType){case xe:case He:var ve=[];for(de=de.firstChild;de;)de.nodeType!==7&&de.nodeType!==8&&ve.push($(de)),de=de.nextSibling;return ve.join("");default:return de.nodeValue}}var Z=t("./conventions"),ae=Z.find,ye=Z.NAMESPACE,me={},xe=me.ELEMENT_NODE=1,De=me.ATTRIBUTE_NODE=2,Re=me.TEXT_NODE=3,Ue=me.CDATA_SECTION_NODE=4,Ke=me.ENTITY_REFERENCE_NODE=5,nt=me.ENTITY_NODE=6,Ye=me.PROCESSING_INSTRUCTION_NODE=7,dt=me.COMMENT_NODE=8,Ae=me.DOCUMENT_NODE=9,Le=me.DOCUMENT_TYPE_NODE=10,He=me.DOCUMENT_FRAGMENT_NODE=11,Ze=me.NOTATION_NODE=12,Qe={},it={},bt=(Qe.INDEX_SIZE_ERR=(it[1]="Index size error",1),Qe.DOMSTRING_SIZE_ERR=(it[2]="DOMString size error",2),Qe.HIERARCHY_REQUEST_ERR=(it[3]="Hierarchy request error",3)),xn=(Qe.WRONG_DOCUMENT_ERR=(it[4]="Wrong document",4),Qe.INVALID_CHARACTER_ERR=(it[5]="Invalid character",5),Qe.NO_DATA_ALLOWED_ERR=(it[6]="No data allowed",6),Qe.NO_MODIFICATION_ALLOWED_ERR=(it[7]="No modification allowed",7),Qe.NOT_FOUND_ERR=(it[8]="Not found",8)),an=(Qe.NOT_SUPPORTED_ERR=(it[9]="Not supported",9),Qe.INUSE_ATTRIBUTE_ERR=(it[10]="Attribute in use",10));Qe.INVALID_STATE_ERR=(it[11]="Invalid state",11),Qe.SYNTAX_ERR=(it[12]="Syntax error",12),Qe.INVALID_MODIFICATION_ERR=(it[13]="Invalid modification",13),Qe.NAMESPACE_ERR=(it[14]="Invalid namespace",14),Qe.INVALID_ACCESS_ERR=(it[15]="Invalid access",15),h.prototype=Error.prototype,u(Qe,h),f.prototype={length:0,item:function(de){return this[de]||null},toString:function(de,ve){for(var Ce=[],Me=0;Me<this.length;Me++)ce(this[Me],Ce,de,ve);return Ce.join("")},filter:function(de){return Array.prototype.filter.call(this,de)},indexOf:function(de){return Array.prototype.indexOf.call(this,de)}},p.prototype.item=function(de){return y(this),this[de]},d(p,f),g.prototype={length:0,item:f.prototype.item,getNamedItem:function(de){for(var ve=this.length;ve--;){var Ce=this[ve];if(Ce.nodeName==de)return Ce}},setNamedItem:function(de){var ve=de.ownerElement;if(ve&&ve!=this._ownerElement)throw new h(an);var Ce=this.getNamedItem(de.nodeName);return v(this._ownerElement,this,de,Ce),Ce},setNamedItemNS:function(de){var ve,Ce=de.ownerElement;if(Ce&&Ce!=this._ownerElement)throw new h(an);return ve=this.getNamedItemNS(de.namespaceURI,de.localName),v(this._ownerElement,this,de,ve),ve},removeNamedItem:function(de){var ve=this.getNamedItem(de);return x(this._ownerElement,this,ve),ve},removeNamedItemNS:function(de,ve){var Ce=this.getNamedItemNS(de,ve);return x(this._ownerElement,this,Ce),Ce},getNamedItemNS:function(de,ve){for(var Ce=this.length;Ce--;){var Me=this[Ce];if(Me.localName==ve&&Me.namespaceURI==de)return Me}return null}},w.prototype={hasFeature:function(de,ve){return!0},createDocument:function(de,ve,Ce){var Me=new C;if(Me.implementation=this,Me.childNodes=new f,Me.doctype=Ce||null,Ce&&Me.appendChild(Ce),ve){var Xe=Me.createElementNS(de,ve);Me.appendChild(Xe)}return Me},createDocumentType:function(de,ve,Ce){var Me=new se;return Me.name=de,Me.nodeName=de,Me.publicId=ve||"",Me.systemId=Ce||"",Me}},_.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(de,ve){return re(this,de,ve)},replaceChild:function(de,ve){re(this,de,ve,B),ve&&this.removeChild(ve)},removeChild:function(de){return F(this,de)},appendChild:function(de){return this.insertBefore(de,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(de){return k(this.ownerDocument||this,this,de)},normalize:function(){for(var de=this.firstChild;de;){var ve=de.nextSibling;ve&&ve.nodeType==Re&&de.nodeType==Re?(this.removeChild(ve),de.appendData(ve.data)):(de.normalize(),de=ve)}},isSupported:function(de,ve){return this.ownerDocument.implementation.hasFeature(de,ve)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(de){for(var ve=this;ve;){var Ce=ve._nsMap;if(Ce){for(var Me in Ce)if(Object.prototype.hasOwnProperty.call(Ce,Me)&&Ce[Me]===de)return Me}ve=ve.nodeType==De?ve.ownerDocument:ve.parentNode}return null},lookupNamespaceURI:function(de){for(var ve=this;ve;){var Ce=ve._nsMap;if(Ce&&Object.prototype.hasOwnProperty.call(Ce,de))return Ce[de];ve=ve.nodeType==De?ve.ownerDocument:ve.parentNode}return null},isDefaultNamespace:function(de){var ve=this.lookupPrefix(de);return ve==null}},u(me,_),u(me,_.prototype),C.prototype={nodeName:"#document",nodeType:Ae,doctype:null,documentElement:null,_inc:1,insertBefore:function(de,ve){if(de.nodeType==He){for(var Ce=de.firstChild;Ce;){var Me=Ce.nextSibling;this.insertBefore(Ce,ve),Ce=Me}return de}return re(this,de,ve),de.ownerDocument=this,this.documentElement===null&&de.nodeType===xe&&(this.documentElement=de),de},removeChild:function(de){return this.documentElement==de&&(this.documentElement=null),F(this,de)},replaceChild:function(de,ve){re(this,de,ve,B),de.ownerDocument=this,ve&&this.removeChild(ve),he(de)&&(this.documentElement=de)},importNode:function(de,ve){return V(this,de,ve)},getElementById:function(de){var ve=null;return S(this.documentElement,function(Ce){return Ce.nodeType==xe&&Ce.getAttribute("id")==de?(ve=Ce,!0):void 0}),ve},getElementsByClassName:function(de){var ve=c(de);return new p(this,function(Ce){var Me=[];return ve.length>0&&S(Ce.documentElement,function(Xe){if(Xe!==Ce&&Xe.nodeType===xe){var pt=Xe.getAttribute("class");if(pt){var Ft=de===pt;if(!Ft){var Bt=c(pt);Ft=ve.every(l(Bt))}Ft&&Me.push(Xe)}}}),Me})},createElement:function(de){var ve=new ge;ve.ownerDocument=this,ve.nodeName=de,ve.tagName=de,ve.localName=de,ve.childNodes=new f;var Ce=ve.attributes=new g;return Ce._ownerElement=ve,ve},createDocumentFragment:function(){var de=new _e;return de.ownerDocument=this,de.childNodes=new f,de},createTextNode:function(de){var ve=new W;return ve.ownerDocument=this,ve.appendData(de),ve},createComment:function(de){var ve=new te;return ve.ownerDocument=this,ve.appendData(de),ve},createCDATASection:function(de){var ve=new Y;return ve.ownerDocument=this,ve.appendData(de),ve},createProcessingInstruction:function(de,ve){var Ce=new K;return Ce.ownerDocument=this,Ce.tagName=Ce.target=de,Ce.nodeValue=Ce.data=ve,Ce},createAttribute:function(de){var ve=new ie;return ve.ownerDocument=this,ve.name=de,ve.nodeName=de,ve.localName=de,ve.specified=!0,ve},createEntityReference:function(de){var ve=new H;return ve.ownerDocument=this,ve.nodeName=de,ve},createElementNS:function(de,ve){var Ce=new ge,Me=ve.split(":"),Xe=Ce.attributes=new g;return Ce.childNodes=new f,Ce.ownerDocument=this,Ce.nodeName=ve,Ce.tagName=ve,Ce.namespaceURI=de,Me.length==2?(Ce.prefix=Me[0],Ce.localName=Me[1]):Ce.localName=ve,Xe._ownerElement=Ce,Ce},createAttributeNS:function(de,ve){var Ce=new ie,Me=ve.split(":");return Ce.ownerDocument=this,Ce.nodeName=ve,Ce.name=ve,Ce.namespaceURI=de,Ce.specified=!0,Me.length==2?(Ce.prefix=Me[0],Ce.localName=Me[1]):Ce.localName=ve,Ce}},d(C,_),ge.prototype={nodeType:xe,hasAttribute:function(de){return this.getAttributeNode(de)!=null},getAttribute:function(de){var ve=this.getAttributeNode(de);return ve&&ve.value||""},getAttributeNode:function(de){return this.attributes.getNamedItem(de)},setAttribute:function(de,ve){var Ce=this.ownerDocument.createAttribute(de);Ce.value=Ce.nodeValue=""+ve,this.setAttributeNode(Ce)},removeAttribute:function(de){var ve=this.getAttributeNode(de);ve&&this.removeAttributeNode(ve)},appendChild:function(de){return de.nodeType===He?this.insertBefore(de,null):le(this,de)},setAttributeNode:function(de){return this.attributes.setNamedItem(de)},setAttributeNodeNS:function(de){return this.attributes.setNamedItemNS(de)},removeAttributeNode:function(de){return this.attributes.removeNamedItem(de.nodeName)},removeAttributeNS:function(de,ve){var Ce=this.getAttributeNodeNS(de,ve);Ce&&this.removeAttributeNode(Ce)},hasAttributeNS:function(de,ve){return this.getAttributeNodeNS(de,ve)!=null},getAttributeNS:function(de,ve){var Ce=this.getAttributeNodeNS(de,ve);return Ce&&Ce.value||""},setAttributeNS:function(de,ve,Ce){var Me=this.ownerDocument.createAttributeNS(de,ve);Me.value=Me.nodeValue=""+Ce,this.setAttributeNode(Me)},getAttributeNodeNS:function(de,ve){return this.attributes.getNamedItemNS(de,ve)},getElementsByTagName:function(de){return new p(this,function(ve){var Ce=[];return S(ve,function(Me){Me===ve||Me.nodeType!=xe||de!=="*"&&Me.tagName!=de||Ce.push(Me)}),Ce})},getElementsByTagNameNS:function(de,ve){return new p(this,function(Ce){var Me=[];return S(Ce,function(Xe){Xe===Ce||Xe.nodeType!==xe||de!=="*"&&Xe.namespaceURI!==de||ve!=="*"&&Xe.localName!=ve||Me.push(Xe)}),Me})}},C.prototype.getElementsByTagName=ge.prototype.getElementsByTagName,C.prototype.getElementsByTagNameNS=ge.prototype.getElementsByTagNameNS,d(ge,_),ie.prototype.nodeType=De,d(ie,_),P.prototype={data:"",substringData:function(de,ve){return this.data.substring(de,de+ve)},appendData:function(de){de=this.data+de,this.nodeValue=this.data=de,this.length=de.length},insertData:function(de,ve){this.replaceData(de,0,ve)},appendChild:function(de){throw new Error(it[bt])},deleteData:function(de,ve){this.replaceData(de,ve,"")},replaceData:function(de,ve,Ce){var Me=this.data.substring(0,de),Xe=this.data.substring(de+ve);Ce=Me+Ce+Xe,this.nodeValue=this.data=Ce,this.length=Ce.length}},d(P,_),W.prototype={nodeName:"#text",nodeType:Re,splitText:function(de){var ve=this.data,Ce=ve.substring(de);ve=ve.substring(0,de),this.data=this.nodeValue=ve,this.length=ve.length;var Me=this.ownerDocument.createTextNode(Ce);return this.parentNode&&this.parentNode.insertBefore(Me,this.nextSibling),Me}},d(W,P),te.prototype={nodeName:"#comment",nodeType:dt},d(te,P),Y.prototype={nodeName:"#cdata-section",nodeType:Ue},d(Y,P),se.prototype.nodeType=Le,d(se,_),ue.prototype.nodeType=Ze,d(ue,_),we.prototype.nodeType=nt,d(we,_),H.prototype.nodeType=Ke,d(H,_),_e.prototype.nodeName="#document-fragment",_e.prototype.nodeType=He,d(_e,_),K.prototype.nodeType=Ye,d(K,_),U.prototype.serializeToString=function(de,ve,Ce){return R.call(de,ve,Ce)},_.prototype.toString=R;try{Object.defineProperty&&(Object.defineProperty(p.prototype,"length",{get:function(){return y(this),this.$$length}}),Object.defineProperty(_.prototype,"textContent",{get:function(){return $(this)},set:function(de){switch(this.nodeType){case xe:case He:for(;this.firstChild;)this.removeChild(this.firstChild);(de||String(de))&&this.appendChild(this.ownerDocument.createTextNode(de));break;default:this.data=de,this.value=de,this.nodeValue=de}}
77}),I=function(de,ve,Ce){de["$$"+ve]=Ce})}catch{}r.DocumentType=se,r.DOMException=h,r.DOMImplementation=w,r.Element=ge,r.Node=_,r.NodeList=f,r.XMLSerializer=U},{"./conventions":41}],44:[function(t,n,r){var i=t("./conventions").freeze;r.XML_ENTITIES=i({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=i({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"Ã",Aacute:"Ã",Acirc:"Ã",Atilde:"Ã",Auml:"Ã",Aring:"Ã
",AElig:"Ã",Ccedil:"Ã",Egrave:"Ã",Eacute:"Ã",Ecirc:"Ã",Euml:"Ã",Igrave:"Ã",Iacute:"Ã",Icirc:"Ã",Iuml:"Ã",ETH:"Ã",Ntilde:"Ã",Ograve:"Ã",Oacute:"Ã",Ocirc:"Ã",Otilde:"Ã",Ouml:"Ã",Oslash:"Ã",Ugrave:"Ã",Uacute:"Ã",Ucirc:"Ã",Uuml:"Ã",Yacute:"Ã",THORN:"Ã",szlig:"Ã",agrave:"à ",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"Ã¥",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"Ã",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"Â¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"ÂÂ",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"Ã",divide:"÷",forall:"â",part:"â",exist:"â",empty:"â
",nabla:"â",isin:"â",notin:"â",ni:"â",prod:"â",sum:"â",minus:"â",lowast:"â",radic:"â",prop:"â",infin:"â",ang:"â ",and:"â§",or:"â¨",cap:"â©",cup:"âª",int:"â«",there4:"â´",sim:"â¼",cong:"â
",asymp:"â",ne:"â ",equiv:"â¡",le:"â¤",ge:"â¥",sub:"â",sup:"â",nsub
vendor: 5,727 bytes, line 77
77:"â",sube:"â",supe:"â",oplus:"â",otimes:"â",perp:"â¥",sdot:"â
",Alpha:"Î",Beta:"Î",Gamma:"Î",Delta:"Î",Epsilon:"Î",Zeta:"Î",Eta:"Î",Theta:"Î",Iota:"Î",Kappa:"Î",Lambda:"Î",Mu:"Î",Nu:"Î",Xi:"Î",Omicron:"Î",Pi:"Î ",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Î¥",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"Ï",rho:"Ï",sigmaf:"Ï",sigma:"Ï",tau:"Ï",upsilon:"Ï
",phi:"Ï",chi:"Ï",psi:"Ï",omega:"Ï",thetasym:"Ï",upsih:"Ï",piv:"Ï",OElig:"Å",oelig:"Å",Scaron:"Å ",scaron:"Å¡",Yuml:"Ÿ",fnof:"Æ",circ:"Ë",tilde:"Ë",ensp:"â",emsp:"â",thinsp:"â",zwnj:"â",zwj:"â",lrm:"â",rlm:"â",ndash:"â",mdash:"â",lsquo:"â",rsquo:"â",sbquo:"â",ldquo:"â",rdquo:"â",bdquo:"â",dagger:"â ",Dagger:"â¡",bull:"â¢",hellip:"â¦",permil:"â°",prime:"â²",Prime:"â³",lsaquo:"â¹",rsaquo:"âº",oline:"â¾",euro:"â¬",trade:"â¢",larr:"â",uarr:"â",rarr:"â",darr:"â",harr:"â",crarr:"âµ",lceil:"â",rceil:"â",lfloor:"â",rfloor:"â",loz:"â",spades:"â ",clubs:"â£",hearts:"â¥",diams:"â¦"}),r.entityMap=r.HTML_ENTITIES},{"./conventions":41}],45:[function(t,n,r){var i=t("./dom");r.DOMImplementation=i.DOMImplementation,r.XMLSerializer=i.XMLSerializer,r.DOMParser=t("./dom-parser").DOMParser},{"./dom":43,"./dom-parser":42}],46:[function(t,n,r){function i(A,X){this.message=A,this.locator=X,Error.captureStackTrace&&Error.captureStackTrace(this,i)}function a(){}function o(A,X,he,j,ee){function O(Z){if(Z>65535){Z-=65536;var ae=55296+(Z>>10),ye=56320+(1023&Z);return String.fromCharCode(ae,ye)}return String.fromCharCode(Z)}function pe(Z){var ae=Z.slice(1,-1);return Object.hasOwnProperty.call(he,ae)?he[ae]:ae.charAt(0)==="#"?O(parseInt(ae.substr(1).replace("x","0x"))):(ee.error("entity not found:"+Z),Z)}function q(Z){if(Z>te){var ae=A.substring(te,Z).replace(/&#?\w+;/g,pe);ie&&B(te),j.characters(ae,0,Z-te),te=Z}}function B(Z,ae){for(;Z>=le&&(ae=ge.exec(A));)re=ae.index,le=re+ae[0].length,ie.lineNumber++;ie.columnNumber=Z-re+1}for(var re=0,le=0,ge=/.*(?:\r\n?|\n)|.*$/g,ie=j.locator,P=[{currentNSMap:X}],W={},te=0;;){try{var Y=A.indexOf("<",te);if(0>Y){if(!A.substr(te).match(/^\s*$/)){var se=j.doc,ue=se.createTextNode(A.substr(te));se.appendChild(ue),j.currentElement=ue}return}switch(Y>te&&q(Y),A.charAt(Y+1)){case"/":var ce=A.indexOf(">",Y+3),we=A.substring(Y+2,ce).replace(/[ \t\n\r]+$/g,""),H=P.pop();0>ce?(we=A.substring(Y+2).replace(/[\s<].*/,""),ee.error("end tag name: "+we+" is not complete:"+H.tagName),ce=Y+1+we.length):we.match(/\s</)&&(we=we.replace(/[\s<].*/,""),ee.error("end tag name: "+we+" maybe not complete"),ce=Y+1+we.length);var _e=H.localNSMap,K=H.tagName==we,U=K||H.tagName&&H.tagName.toLowerCase()==we.toLowerCase();if(U){if(j.endElement(H.uri,H.localName,we),_e)for(var R in _e)Object.prototype.hasOwnProperty.call(_e,R)&&j.endPrefixMapping(R);K||ee.fatalError("end tag name: "+we+" is not match the current start tagName:"+H.tagName)}else P.push(H);ce++;break;case"?":ie&&B(Y),ce=y(A,Y,j);break;case"!":ie&&B(Y),ce=p(A,Y,j,ee);break;default:ie&&B(Y);var E=new g,Q=P[P.length-1].currentNSMap,ce=l(A,Y,E,Q,pe,ee),V=E.length;if(!E.closed&&h(A,ce,E.tagName,W)&&(E.closed=!0,he.nbsp||ee.warning("unclosed xml attribute")),ie&&V){for(var k=c(ie,{}),I=0;V>I;I++){var $=E[I];B($.offset),$.locator=c(ie,{})}j.locator=k,u(E,j,Q)&&P.push(E),j.locator=ie}else u(E,j,Q)&&P.push(E);v.isHTML(E.uri)&&!E.closed?ce=d(A,ce,E.tagName,pe,j):ce++}}catch(Z){if(Z instanceof i)throw Z;ee.error("element parse error: "+Z),ce=-1}ce>te?te=ce:q(Math.max(Y,te)+1)}}function c(A,X){return X.lineNumber=A.lineNumber,X.columnNumber=A.columnNumber,X}function l(A,X,he,j,ee,O){function pe(ie,P,W){he.attributeNames.hasOwnProperty(ie)&&O.fatalError("Attribute "+ie+" redefined"),he.addValue(ie,P.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,ee),W)}for(var q,B,re=++X,le=T;;){var ge=A.charAt(re);switch(ge){case"=":if(le===S)q=A.slice(X,re),le=D;else{if(le!==C)throw new Error("attribute equal must after attrName");le=D}break;case"'":case'"':if(le===D||le===S){if(le===S&&(O.warning('attribute value must after "="'),q=A.slice(X,re)),X=re+1,re=A.indexOf(ge,X),!(re>0))throw new Error("attribute value no end '"+ge+"' match");B=A.slice(X,re),pe(q,B,X-1),le=M}else{if(le!=N)throw new Error('attribute value must after "="');B=A.slice(X,re),pe(q,B,X),O.warning('attribute "'+q+'" missed start quot('+ge+")!!"),X=re+1,le=M}break;case"/":switch(le){case T:he.setTagName(A.slice(X,re));case M:case F:case L:le=L,he.closed=!0;case N:case S:case C:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return O.error("unexpected end of input"),le==T&&he.setTagName(A.slice(X,re)),re;case">":switch(le){case T:he.setTagName(A.slice(X,re));case M:case F:case L:break;case N:case S:B=A.slice(X,re),B.slice(-1)==="/"&&(he.closed=!0,B=B.slice(0,-1));case C:le===C&&(B=q),le==N?(O.warning('attribute "'+B+'" missed quot(")!'),pe(q,B,X)):(v.isHTML(j[""])&&B.match(/^(?:disabled|checked|selected)$/i)||O.warning('attribute "'+B+'" missed value!! "'+B+'" instead!!'),pe(B,B,X));break;case D:throw new Error("attribute value missed!!")}return re;case"Â":ge=" ";default:if(" ">=ge)switch(le){case T:he.setTagName(A.slice(X,re)),le=F;break;case S:q=A.slice(X,re),le=C;break;case N:var B=A.slice(X,re);O.warning('attribute "'+B+'" missed quot(")!!'),pe(q,B,X);case M:le=F}else switch(le){case C:he.tagName,v.isHTML(j[""])&&q.match(/^(?:disabled|checked|selected)$/i)||O.warning('attribute "'+q+'" missed value!! "'+q+'" instead2!!'),pe(q,q,X),X=re,le=S;break;case M:O.warning('attribute space is required"'+q+'"!!');
77case F:le=S,X=re;break;case D:le=N,X=re;break;case L:throw new Error("elements closed character '/' and '>' must be connected to")}}re++}}function u(A,X,he){for(var j=A.tagName,ee=null,O=A.length;O--;){var pe=A[O],q=pe.qName,B=pe.value,ie=q.indexOf(":");if(ie>0)var re=pe.prefix=q.slice(0,ie),le=q.slice(ie+1),ge=re==="xmlns"&≤else le=q,re=null,ge=q==="xmlns"&&"";pe.localName=le,ge!==!1&&(ee==null&&(ee={},f(he,he={})),he[ge]=ee[ge]=B,pe.uri=v.XMLNS,X.startPrefixMapping(ge,B))}for(var O=A.length;O--;){pe=A[O];var re=pe.prefix;re&&(re==="xml"&&(pe.uri=v.XML),re!=="xmlns"&&(pe.uri=he[re||""]))}var ie=j.indexOf(":");ie>0?(re=A.prefix=j.slice(0,ie),le=A.localName=j.slice(ie+1)):(re=null,le=A.localName=j);var P=A.uri=he[re||""];if(X.startElement(P,le,j,A),!A.closed)return A.currentNSMap=he,A.localNSMap=ee,!0;if(X.endElement(P,le,j),ee)for(re in ee)Object.prototype.hasOwnProperty.call(ee,re)&&X.endPrefixMapping(re)}function d(A,X,he,j,ee){if(/^(?:script|textarea)$/i.test(he)){var O=A.indexOf("</"+he+">",X),pe=A.substring(X+1,O);if(/[&<]/.test(pe))return/^script$/i.test(he)?(ee.characters(pe,0,pe.length),O):(pe=pe.replace(/&#?\w+;/g,j),ee.characters(pe,0,pe.length),O)}return X+1}function h(A,X,he,j){var ee=j[he];return ee==null&&(ee=A.lastIndexOf("</"+he+">"),X>ee&&(ee=A.lastIndexOf("</"+he)),j[he]=ee),X>ee}function f(A,X){for(var he in A)Object.prototype.hasOwnProperty.call(A,he)&&(X[he]=A[he])}function p(A,X,he,j){var ee=A.charAt(X+2);switch(ee){case"-":if(A.charAt(X+3)==="-"){var O=A.indexOf("-->",X+4);return O>X?(he.comment(A,X+4,O-X-4),O+3):(j.error("Unclosed comment"),-1)}return-1;default:if(A.substr(X+3,6)=="CDATA["){var O=A.indexOf("]]>",X+9);return he.startCDATA(),he.characters(A,X+9,O-X-9),he.endCDATA(),O+3}var pe=b(A,X),q=pe.length;if(q>1&&/!doctype/i.test(pe[0][0])){var B=pe[1][0],re=!1,le=!1;q>3&&(/^public$/i.test(pe[2][0])?(re=pe[3][0],le=q>4&&pe[4][0]):/^system$/i.test(pe[2][0])&&(le=pe[3][0]));var ge=pe[q-1];return he.startDTD(B,re,le),he.endDTD(),ge.index+ge[0].length}}return-1}function y(A,X,he){var j=A.indexOf("?>",X);if(j){var ee=A.substring(X,j).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return ee?(ee[0].length,he.processingInstruction(ee[1],ee[2]),j+2):-1}return-1}function g(){this.attributeNames={}}function b(A,X){var he,j=[],ee=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(ee.lastIndex=X,ee.exec(A);he=ee.exec(A);)if(j.push(he),he[1])return j}var v=t("./conventions").NAMESPACE,x=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,w=new RegExp("[\\-\\.0-9"+x.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),_=new RegExp("^"+x.source+w.source+"*(?::"+x.source+w.source+"*)?$"),T=0,S=1,C=2,D=3,N=4,M=5,F=6,L=7;i.prototype=new Error,i.prototype.name=i.name,a.prototype={parse:function(A,X,he){var j=this.domBuilder;j.startDocument(),f(X,X={}),o(A,X,he,j,this.errorHandler),j.endDocument()}},g.prototype={setTagName:function(A){if(!_.test(A))throw new Error("invalid tagName:"+A);this.tagName=A},addValue:function(A,X,he){if(!_.test(A))throw new Error("invalid attribute:"+A);this.attributeNames[A]=this.length,this[this.length++]={qName:A,value:X,offset:he}},length:0,getLocalName:function(A){return this[A].localName},getLocator:function(A){return this[A].locator},getQName:function(A){return this[A].qName},getURI:function(A){return this[A].uri},getValue:function(A){return this[A].value}},r.XMLReader=a,r.ParseError=i},{"./conventions":41}],47:[function(t,n,r){function i(v){var x=v.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=v.indexOf("=");w===-1&&(w=x);var _=w===x?0:4-w%4;return[w,_]}function a(v){var x=i(v),w=x[0],_=x[1];return 3*(w+_)/4-_}function o(v,x,w){return 3*(x+w)/4-w}function c(v){var x,w,_=i(v),T=_[0],S=_[1],C=new p(o(v,T,S)),D=0,N=S>0?T-4:T;for(w=0;N>w;w+=4)x=f[v.charCodeAt(w)]<<18|f[v.charCodeAt(w+1)]<<12|f[v.charCodeAt(w+2)]<<6|f[v.charCodeAt(w+3)],C[D++]=x>>16&255,C[D++]=x>>8&255,C[D++]=255&x;return S===2&&(x=f[v.charCodeAt(w)]<<2|f[v.charCodeAt(w+1)]>>4,C[D++]=255&x),S===1&&(x=f[v.charCodeAt(w)]<<10|f[v.charCodeAt(w+1)]<<4|f[v.charCodeAt(w+2)]>>2,C[D++]=x>>
778&255,C[D++]=255&x),C}function l(v){return h[v>>18&63]+h[v>>12&63]+h[v>>6&63]+h[63&v]}function u(v,x,w){for(var _,T=[],S=x;w>S;S+=3)_=(v[S]<<16&16711680)+(v[S+1]<<8&65280)+(255&v[S+2]),T.push(l(_));return T.join("")}function d(v){for(var x,w=v.length,_=w%3,T=[],S=16383,C=0,D=w-_;D>C;C+=S)T.push(u(v,C,C+S>D?D:C+S));return _===1?(x=v[w-1],T.push(h[x>>2]+h[x<<4&63]+"==")):_===2&&(x=(v[w-2]<<8)+v[w-1],T.push(h[x>>10]+h[x>>4&63]+h[x<<2&63]+"=")),T.join("")}r.byteLength=a,r.toByteArray=c,r.fromByteArray=d;for(var h=[],f=[],p=typeof Uint8Array<"u"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,b=y.length;b>g;++g)h[g]=y[g],f[y.charCodeAt(g)]=g;f[45]=62,f[95]=63},{}],48:[function(t,n,r){n.exports=function(i){function a(c){var l=new o(c),u=l.promise();return l.setHowMany(1),l.setUnwrap(),l.init(),u}var o=i._SomePromiseArray;i.any=function(c){return a(c)},i.prototype.any=function(){return a(this)}}},{}],49:[function(t,n,r){(function(i){function a(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new h(16),this._normalQueue=new h(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var p=this;this.drainQueues=function(){p._drainQueues()},this._schedule=d}function o(p,y,g){this._lateQueue.push(p,y,g),this._queueTick()}function c(p,y,g){this._normalQueue.push(p,y,g),this._queueTick()}function l(p){this._normalQueue._pushOne(p),this._queueTick()}var u;try{throw new Error}catch(p){u=p}var d=t("./schedule"),h=t("./queue"),f=t("./util");a.prototype.setScheduler=function(p){var y=this._schedule;return this._schedule=p,this._customScheduler=!0,y},a.prototype.hasCustomScheduler=function(){return this._customScheduler},a.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},a.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},a.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},a.prototype.fatalError=function(p,y){y?(i.stderr.write("Fatal "+(p instanceof Error?p.stack:p)+` 78`),i.exit(2)):this.throwLater(p)},a.prototype.throwLater=function(p,y){if(arguments.length===1&&(y=p,p=function(){throw y}),typeof setTimeout<"u")setTimeout(function(){p(y)},0);else try{this._schedule(function(){p(y)})}catch{throw new Error(`No async scheduler available 79 80 See http://goo.gl/MqrFmX 81`)}},f.hasDevTools?(a.prototype.invokeLater=function(p,y,g){this._trampolineEnabled?o.call(this,p,y,g):this._schedule(function(){setTimeout(function(){p.call(y,g)},100)})},a.prototype.invoke=function(p,y,g){this._trampolineEnabled?c.call(this,p,y,g):this._schedule(function(){p.call(y,g)})},a.prototype.settlePromises=function(p){this._trampolineEnabled?l.call(this,p):this._schedule(function(){p._settlePromises()})}):(a.prototype.invokeLater=o,a.prototype.invoke=c,a.prototype.settlePromises=l),a.prototype._drainQueue=function(p){for(;p.length()>0;){var y=p.shift();if(typeof y=="function"){var g=p.shift(),b=p.shift();y.call(g,b)}else y._settlePromises()}},a.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1}
81,n.exports=a,n.exports.firstLineError=u}).call(this,t("_process"))},{"./queue":72,"./schedule":75,"./util":82,_process:101}],50:[function(t,n,r){n.exports=function(i,a,o,c){var l=!1,u=function(p,y){this._reject(y)},d=function(p,y){y.promiseRejectionQueued=!0,y.bindingPromise._then(u,u,null,this,p)},h=function(p,y){(50397184&this._bitField)===0&&this._resolveCallback(y.target)},f=function(p,y){y.promiseRejectionQueued||this._reject(p)};i.prototype.bind=function(p){l||(l=!0,i.prototype._propagateFrom=c.propagateFromFunction(),i.prototype._boundValue=c.boundValueFunction());var y=o(p),g=new i(a);g._propagateFrom(this,1);var b=this._target();if(g._setBoundTo(y),y instanceof i){var v={promiseRejectionQueued:!1,promise:g,target:b,bindingPromise:y};b._then(a,d,void 0,g,v),y._then(h,f,void 0,g,v),g._setOnCancel(y)}else g._resolveCallback(b);return g},i.prototype._setBoundTo=function(p){p!==void 0?(this._bitField=2097152|this._bitField,this._boundTo=p):this._bitField=-2097153&this._bitField},i.prototype._isBound=function(){return(2097152&this._bitField)===2097152},i.bind=function(p,y){return i.resolve(y).bind(p)}}},{}],51:[function(t,n,r){var i=Object.create;if(i){var a=i(null),o=i(null);a[" size"]=o[" size"]=0}n.exports=function(c){function l(_,T){var S;if(_!=null&&(S=_[T]),typeof S!="function"){var C="Object "+y.classString(_)+" has no method '"+y.toString(T)+"'";throw new c.TypeError(C)}return S}function u(_){var T=this.pop(),S=l(_,T);return S.apply(_,this)}function d(_){return _[this]}function h(_){var T=+this;return 0>T&&(T=Math.max(0,T+_.length)),_[T]}var f,p,y=t("./util"),g=y.canEvaluate,b=y.isIdentifier,v=function(_){return new Function("ensureMethod",` 82 return function(obj) { 83 'use strict' 84 var len = this.length; 85 ensureMethod(obj, 'methodName'); 86 switch(len) { 87 case 1: return obj.methodName(this[0]); 88 case 2: return obj.methodName(this[0], this[1]); 89 case 3: return obj.methodName(this[0], this[1], this[2]); 90 case 0: return obj.methodName(); 91 default: 92 return obj.methodName.apply(obj, this); 93 } 94 }; 95 `.replace(/methodName/g,_))(l)},x=function(_){return new Function("obj",` 96 'use strict'; 97 return obj.propertyName; 98 `.replace("propertyName",_))},w=function(_,T,S){var C=S[_];if(typeof C!="function"){if(!b(_))return null;if(C=T(_),S[_]=C,S[" size"]++,S[" size"]>512){for(var D=Object.keys(S),N=0;256>N;++N)delete S[D[N]];S[" size"]=D.length-256}}return C};f=function(_){return w(_,v,a)},p=function(_){return w(_,x,o)},c.prototype.call=function(_){for(var T=arguments.length,S=new Array(Math.max(T-1,0)),C=1;T>C;++C)S[C-1]=arguments[C];if(g){var D=f(_);if(D!==null)return this._then(D,void 0,void 0,S,void 0)}return S.push(_),this._then(u,void 0,void 0,S,void 0)},c.prototype.get=function(_){var T,S=typeof _=="number";if(S)T=h;else if(g){var C=p(_);T=C!==null?C:d}else T=d;return this._then(T,void 0,void 0,_,void 0)}}},{"./util":82}],52:[function(t,n,r){n.exports=function(i,a,o,c){var l=t("./util"),u=l.tryCatch,d=l.errorObj,h=i._async;i.prototype.break=i.prototype.cancel=function(){if(!c.cancellation())return this._warn("cancellation is disabled");for(var f=this,p=f;f._isCancellable();){if(!f._cancelBy(p)){p._isFollowing()?p._followee().cancel():p._cancelBranched();break}var y=f._cancellationParent;if(y==null||!y._isCancellable()){f._isFollowing()?f._followee().cancel():f._cancelBranched();break}f._isFollowing()&&f._followee().cancel(),f._setWillBeCancelled(),p=f,f=y}},i.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},i.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},i.prototype._cancelBy=function(f){return f===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},i.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},i.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),h.invoke(this._cancelPromises,this,void 0))},i.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},i.prototype._unsetOnCancel=function(){this._onCancelField=void 0},i.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},i.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},i.prototype._doInvokeOnCancel=function(f,p){if(l.isArray(f))for(var y=0;y<f.length;++y)this._doInvokeOnCancel(f[y],p);else if(f!==void 0)if(typeof f=="function"){if(!p){var g=u(f).call(this._boundValue());g===d&&(this._attachExtraTrace(g.e),h.throwLater(g.e))}}else f._resultCancelled(this)},i.prototype._invokeOnCancel=function(){var f=this._onCancel();this._unsetOnCancel(),h.invoke(this._doInvokeOnCancel,this,f)},i.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},i.prototype._resultCancelled=function(){this.cancel()}}},{"./util":82}],53:[function(t,n,r){n.exports=function(i){function a(d,h,f){return function(p){var y=f._boundValue();e:for(var g=0;g<d.length;++g){var b=d[g];if(b===Error||b!=null&&b.prototype instanceof Error){if(p instanceof b)return l(h).call(y,p)}else if(typeof b=="function"){var v=l(b).call(y,p);if(v===u)return v;if(v)return l(h).call(y,p)}else if(o.isObject(p)){for(var x=c(b),w=0;w<x.length;++w){var _=x[w];if(b[_]!=p[_])continue e}return l(h).call(y,p)}}return i}}var o=t("./util"),c=t("./es5").keys,l=o.tryCatch,u=o.errorObj;return a}}
98,{"./es5":59,"./util":82}],54:[function(t,n,r){n.exports=function(i){function a(){this._trace=new a.CapturedTrace(c())}function o(){return l?new a:void 0}function c(){var d=u.length-1;return d>=0?u[d]:void 0}var l=!1,u=[];return i.prototype._promiseCreated=function(){},i.prototype._pushContext=function(){},i.prototype._popContext=function(){return null},i._peekContext=i.prototype._peekContext=function(){},a.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,u.push(this._trace))},a.prototype._popContext=function(){if(this._trace!==void 0){var d=u.pop(),h=d._promiseCreated;return d._promiseCreated=null,h}return null},a.CapturedTrace=null,a.create=o,a.deactivateLongStackTraces=function(){},a.activateLongStackTraces=function(){var d=i.prototype._pushContext,h=i.prototype._popContext,f=i._peekContext,p=i.prototype._peekContext,y=i.prototype._promiseCreated;a.deactivateLongStackTraces=function(){i.prototype._pushContext=d,i.prototype._popContext=h,i._peekContext=f,i.prototype._peekContext=p,i.prototype._promiseCreated=y,l=!1},l=!0,i.prototype._pushContext=a.prototype._pushContext,i.prototype._popContext=a.prototype._popContext,i._peekContext=i.prototype._peekContext=c,i.prototype._promiseCreated=function(){var g=this._peekContext();g&&g._promiseCreated==null&&(g._promiseCreated=this)}},a}},{}],55:[function(t,n,r){(function(i){n.exports=function(a,o){function c(me,xe){return{promise:xe}}function l(){return!1}function u(me,xe,De){var Re=this;try{me(xe,De,function(Ue){if(typeof Ue!="function")throw new TypeError("onCancel must be a function, got: "+P.toString(Ue));Re._attachCancellationCallback(Ue)})}catch(Ue){return Ue}}function d(me){if(!this._isCancellable())return this;var xe=this._onCancel();xe!==void 0?P.isArray(xe)?xe.push(me):this._setOnCancel([xe,me]):this._setOnCancel(me)}function h(){return this._onCancelField}function f(me){this._onCancelField=me}function p(){this._cancellationParent=void 0,this._onCancelField=void 0}function y(me,xe){if((1&xe)!==0){this._cancellationParent=me;var De=me._branchesRemainingToCancel;De===void 0&&(De=0),me._branchesRemainingToCancel=De+1}(2&xe)!==0&&me._isBound()&&this._setBoundTo(me._boundTo)}function g(me,xe){(2&xe)!==0&&me._isBound()&&this._setBoundTo(me._boundTo)}function b(){var me=this._boundTo;return me!==void 0&&me instanceof a?me.isFulfilled()?me.value():void 0:me}function v(){this._trace=new pe(this._peekContext())}function x(me,xe){if(W(me)){var De=this._trace;if(De!==void 0&&xe&&(De=De._parent),De!==void 0)De.attachExtraTrace(me);else if(!me.__stackCleaned__){var Re=F(me);P.notEnumerableProp(me,"stack",Re.message+` 99`+Re.stack.join(` 100`)),P.notEnumerableProp(me,"__stackCleaned__",!0)}}}function w(me,xe,De,Re,Ue){if(me===void 0&&xe!==null&&R){if(Ue!==void 0&&Ue._returnedNonUndefined()||(65535&Re._bitField)===0)return;De&&(De+=" ");var Ke="",nt="";if(xe._trace){for(var Ye=xe._trace.stack.split(` 101`),dt=N(Ye),Ae=dt.length-1;Ae>=0;--Ae){var Le=dt[Ae];if(!Y.test(Le)){var He=Le.match(se);He&&(Ke="at "+He[1]+":"+He[2]+":"+He[3]+" ");break}}if(dt.length>0){for(var Ze=dt[0],Ae=0;Ae<Ye.length;++Ae)if(Ye[Ae]===Ze){Ae>0&&(nt=` 102`+Ye[Ae-1]);break}}}var Qe="a promise was created in a "+De+"handler "+Ke+"but was not returned from it, see http://goo.gl/rRqMUw"+nt;Re._warn(Qe,!0,xe)}}function _(me,xe){var De=me+" is deprecated and will be removed in a future version.";return xe&&(De+=" Use "+xe+" instead."),T(De)}function T(me,xe,De){if(ye.warnings){var Re,Ue=new ie(me);if(xe)De._attachExtraTrace(Ue);else if(ye.longStackTraces&&(Re=a._peekContext()))Re.attachExtraTrace(Ue);else{var Ke=F(Ue);Ue.stack=Ke.message+` 103`+Ke.stack.join(` 104`)}k("warning",Ue)||L(Ue,"",!0)}}function S(me,xe){for(var De=0;De<xe.length-1;++De)xe[De].push("From previous event:"),xe[De]=xe[De].join(` 105`);return De<xe.length&&(xe[De]=xe[De].join(` 106`)),me+` 107`+xe.join(` 108`)}function C(me){for(var xe=0;xe<me.length;++xe)(me[xe].length===0||xe+1<me.length&&me[xe][0]===me[xe+1][0])&&(me.splice(xe,1),xe--)}function D(me){for(var xe=me[0],De=1;De<me.length;++De){for(var Re=me[De],Ue=xe.length-1,Ke=xe[Ue],nt=-1,Ye=Re.length-1;Ye>=0;--Ye)if(Re[Ye]===Ke){nt=Ye;break}for(var Ye=nt;Ye>=0;--Ye){var dt=Re[Ye];if(xe[Ue]!==dt)break;xe.pop(),Ue--}xe=Re}}function N(me){for(var xe=[],De=0;De<me.length;++De){var Re=me[De],Ue=Re===" (No stack trace)"||ue.test(Re),Ke=Ue&&$(Re);Ue&&!Ke&&(H&&Re.charAt(0)!==" "&&(Re=" "+Re),xe.push(Re))}return xe}function M(me){for(var xe=me.stack.replace(/\s+$/g,"").split(` 109`),De=0;De<xe.length;++De){var Re=xe[De];if(Re===" (No stack trace)"||ue.test(Re))break}return De>0&&me.name!="SyntaxError"&&(xe=xe.slice(De)),xe}function F(me){var xe=me.stack,De=me.toString();return xe=typeof xe=="string"&&xe.length>0?M(me):[" (No stack trace)"],{message:De,stack:me.name=="SyntaxError"?xe:N(xe)}}function L(me,xe,De){if(typeof console<"u"){var Re;if(P.isObject(me)){var Ue=me.stack;Re=xe+we(Ue,me)}else Re=xe+String(me);typeof re=="function"?re(Re,De):(typeof console.log=="function"||typeof console.log=="object")&&console.log(Re)}}function A(me,xe,De,Re){var Ue=!1;try{typeof xe=="function"&&(Ue=!0,me==="rejectionHandled"?xe(Re):xe(De,Re))}catch(Ke){ge.throwLater(Ke)}me==="unhandledRejection"?k(me,De,Re)||Ue||L(De,"Unhandled rejection "):k(me,Re)}function X(me){var xe;if(typeof me=="function")xe="[function "+(me.name||"anonymous")+"]";else{xe=me&&typeof me.toString=="function"?me.toString():P.toString(me);var De=/\[object [a-zA-Z0-9$_]+\]/;if(De.test(xe))try{var Re=JSON.stringify(me);xe=Re}catch{}xe.length===0&&(xe="(empty array)")}return"(<"+he(xe)+">, no stack trace)"}function he(me){var xe=41;return me.length<xe?me:me.substr(0,xe-3)+"..."}function j(){return typeof ae=="function"}function ee(me){var xe=me.match(Z);return xe?{fileName:xe[1],line:parseInt(xe[2],10)}:void 0}function O(me,xe){if(j()){for(var De,Re,Ue=me.stack.split(` 110`),Ke=xe.stack.split(` 111`),nt=-1,Ye=-1,dt=0;dt<Ue.length;++dt){var Ae=ee(Ue[dt]);if(Ae){De=Ae.fileName,nt=Ae.line;break}}for(var dt=0;dt<Ke.length;++dt){var Ae=ee(Ke[dt]);if(Ae){Re=Ae.fileName,Ye=Ae.line;break}}0>nt||0>Ye||!De||!Re||De!==Re||nt>=Ye||($=function(Le){if(te.test(Le))return!0;var He=ee(Le);return!!(He&&He.fileName===De&&nt<=He.line&&He.line<=Ye)})}}function pe(me){this._parent=me,this._promisesCreated=0;var xe=this._length=1+(me===void 0?0:me._length);ae(this,pe),xe>32&&this.uncycle()}var q,B,re,le=a._getDomain,ge=a._async,ie=t("./errors").Warning,P=t("./util"),W=P.canAttachTrace,te=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,Y=/\((?:timers\.js):\d+:\d+\)/,se=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,ue=null,we=null,H=!1,_e=!(P.env("BLUEBIRD_DEBUG")==0||!P.env("BLUEBIRD_DEBUG")&&P.env("NODE_ENV")!=="development"),K=!(P.env("BLUEBIRD_WARNINGS")==0||!_e&&!P.env("BLUEBIRD_WARNINGS")),U=!(P.env("BLUEBIRD_LONG_STACK_TRACES")==0||!_e&&!P.env("BLUEBIRD_LONG_STACK_TRACES")),R=P.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(K||!!P.env("BLUEBIRD_W_FORGOTTEN_RETURN"));a.prototype.suppressUnhandledRejections=function(){var me=this._target();me._bitField=-1048577&me._bitField|524288},a.prototype._ensurePossibleRejectionHandled=function(){(524288&this._bitField)===0&&(this._setRejectionIsUnhandled(),ge.invokeLater(this._notifyUnhandledRejection,this,void 0))},a.prototype._notifyUnhandledRejectionIsHandled=function(){A("rejectionHandled",q,void 0,this)},a.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},a.prototype._returnedNonUndefined=function(){return(268435456&this._bitField)!==0},a.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var me=this._settledValue();this._setUnhandledRejectionIsNotified(),A("unhandledRejection",B,me,this)}},a.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},a.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField}
111,a.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},a.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},a.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},a.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},a.prototype._warn=function(me,xe,De){return T(me,xe,De||this)},a.onPossiblyUnhandledRejection=function(me){var xe=le();B=typeof me=="function"?xe===null?me:P.domainBind(xe,me):void 0},a.onUnhandledRejectionHandled=function(me){var xe=le();q=typeof me=="function"?xe===null?me:P.domainBind(xe,me):void 0};var E=function(){};a.longStackTraces=function(){if(ge.haveItemsQueued()&&!ye.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created 112 113 See http://goo.gl/MqrFmX 114`);if(!ye.longStackTraces&&j()){var me=a.prototype._captureStackTrace,xe=a.prototype._attachExtraTrace;ye.longStackTraces=!0,E=function(){if(ge.haveItemsQueued()&&!ye.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created 115 116 See http://goo.gl/MqrFmX 117`);a.prototype._captureStackTrace=me,a.prototype._attachExtraTrace=xe,o.deactivateLongStackTraces(),ge.enableTrampoline(),ye.longStackTraces=!1},a.prototype._captureStackTrace=v,a.prototype._attachExtraTrace=x,o.activateLongStackTraces(),ge.disableTrampolineIfNecessary()}},a.hasLongStackTraces=function(){return ye.longStackTraces&&j()};var Q=(function(){try{if(typeof CustomEvent=="function"){var me=new CustomEvent("CustomEvent");return P.global.dispatchEvent(me),function(De,Re){var Ue=new CustomEvent(De.toLowerCase(),{detail:Re,cancelable:!0});return!P.global.dispatchEvent(Ue)}}if(typeof Event=="function"){var me=new Event("CustomEvent");return P.global.dispatchEvent(me),function(De,Re){var Ue=new Event(De.toLowerCase(),{cancelable:!0});return Ue.detail=Re,!P.global.dispatchEvent(Ue)}}var me=document.createEvent("CustomEvent");return me.initCustomEvent("testingtheevent",!1,!0,{}),P.global.dispatchEvent(me),function(xe,De){var Re=document.createEvent("CustomEvent");return Re.initCustomEvent(xe.toLowerCase(),!1,!0,De),!P.global.dispatchEvent(Re)}}catch{}return function(){return!1}})(),ce=(function(){return P.isNode?function(){return i.emit.apply(i,arguments)}:P.global?function(me){var xe="on"+me.toLowerCase(),De=P.global[xe];return De?(De.apply(P.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}
117)(),V={promiseCreated:c,promiseFulfilled:c,promiseRejected:c,promiseResolved:c,promiseCancelled:c,promiseChained:function(me,xe,De){return{promise:xe,child:De}},warning:function(me,xe){return{warning:xe}},unhandledRejection:function(me,xe,De){return{reason:xe,promise:De}},rejectionHandled:c},k=function(me){var xe=!1;try{xe=ce.apply(null,arguments)}catch(Re){ge.throwLater(Re),xe=!0}var De=!1;try{De=Q(me,V[me].apply(null,arguments))}catch(Re){ge.throwLater(Re),De=!0}return De||xe};a.config=function(me){if(me=Object(me),"longStackTraces"in me&&(me.longStackTraces?a.longStackTraces():!me.longStackTraces&&a.hasLongStackTraces()&&E()),"warnings"in me){var xe=me.warnings;ye.warnings=!!xe,R=ye.warnings,P.isObject(xe)&&"wForgottenReturn"in xe&&(R=!!xe.wForgottenReturn)}if("cancellation"in me&&me.cancellation&&!ye.cancellation){if(ge.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");a.prototype._clearCancellationData=p,a.prototype._propagateFrom=y,a.prototype._onCancel=h,a.prototype._setOnCancel=f,a.prototype._attachCancellationCallback=d,a.prototype._execute=u,I=y,ye.cancellation=!0}return"monitoring"in me&&(me.monitoring&&!ye.monitoring?(ye.monitoring=!0,a.prototype._fireEvent=k):!me.monitoring&&ye.monitoring&&(ye.monitoring=!1,a.prototype._fireEvent=l)),a},a.prototype._fireEvent=l,a.prototype._execute=function(me,xe,De){try{me(xe,De)}catch(Re){return Re}},a.prototype._onCancel=function(){},a.prototype._setOnCancel=function(me){},a.prototype._attachCancellationCallback=function(me){},a.prototype._captureStackTrace=function(){},a.prototype._attachExtraTrace=function(){},a.prototype._clearCancellationData=function(){},a.prototype._propagateFrom=function(me,xe){};var I=g,$=function(){return!1},Z=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;P.inherits(pe,Error),o.CapturedTrace=pe,pe.prototype.uncycle=function(){var me=this._length;if(!(2>me)){for(var xe=[],De={},Re=0,Ue=this;Ue!==void 0;++Re)xe.push(Ue),Ue=Ue._parent;me=this._length=Re;for(var Re=me-1;Re>=0;--Re){var Ke=xe[Re].stack;De[Ke]===void 0&&(De[Ke]=Re)}for(var Re=0;me>Re;++Re){var nt=xe[Re].stack,Ye=De[nt];if(Ye!==void 0&&Ye!==Re){Ye>0&&(xe[Ye-1]._parent=void 0,xe[Ye-1]._length=1),xe[Re]._parent=void 0,xe[Re]._length=1;var dt=Re>0?xe[Re-1]:this;me-1>Ye?(dt._parent=xe[Ye+1],dt._parent.uncycle(),dt._length=dt._parent._length+1):(dt._parent=void 0,dt._length=1);for(var Ae=dt._length+1,Le=Re-2;Le>=0;--Le)xe[Le]._length=Ae,Ae++;return}}}},pe.prototype.attachExtraTrace=function(me){if(!me.__stackCleaned__){this.uncycle();for(var xe=F(me),De=xe.message,Re=[xe.stack],Ue=this;Ue!==void 0;)Re.push(N(Ue.stack.split(` 118`))),Ue=Ue._parent;D(Re),C(Re),P.notEnumerableProp(me,"stack",S(De,Re)),P.notEnumerableProp(me,"__stackCleaned__",!0)}};var ae=(function(){var me=/^\s*at\s*/,xe=function(Ke,nt){return typeof Ke=="string"?Ke:nt.name!==void 0&&nt.message!==void 0?nt.toString():X(nt)};if(typeof Error.stackTraceLimit=="number"&&typeof Error.captureStackTrace=="function"){Error.stackTraceLimit+=6,ue=me,we=xe;var De=Error.captureStackTrace;return $=function(Ke){return te.test(Ke)},function(Ke,nt){Error.stackTraceLimit+=6,De(Ke,nt),Error.stackTraceLimit-=6}}var Re=new Error;if(typeof Re.stack=="string"&&Re.stack.split(` 119`)[0].indexOf("stackDetection@")>=0)return ue=/@/,we=xe,H=!0,function(Ke){Ke.stack=new Error().stack};var Ue;try{throw new Error}catch(Ke){Ue="stack"in Ke}return"stack"in Re||!Ue||typeof Error.stackTraceLimit!="number"?(we=function(Ke,nt){return typeof Ke=="string"?Ke:typeof nt!="object"&&typeof nt!="function"||nt.name===void 0||nt.message===void 0?X(nt):nt.toString()},null):(ue=me,we=xe,function(Ke){Error.stackTraceLimit+=6;try{throw new Error}catch(nt){Ke.stack=nt.stack}Error.stackTraceLimit-=6})})();typeof console<"u"&&typeof console.warn<"u"&&(re=function(me){console.warn(me)},P.isNode&&i.stderr.isTTY?re=function(me,xe){var De=xe?"\x1B[33m":"\x1B[31m";console.warn(De+me+`\x1B[0m 120`)}:P.isNode||typeof new Error().stack!="string"||(re=function(me,xe){console.warn("%c"+me,xe?"color: darkorange":"color: red")}));var ye={warnings:K,longStackTraces:!1,cancellation:!1,monitoring:!1};return U&&a.longStackTraces(),{longStackTraces:function(){return ye.longStackTraces},warnings:function(){return ye.warnings},cancellation:function(){return ye.cancellation},monitoring:function(){return ye.monitoring},propagateFromFunction:function(){return I},boundValueFunction:function(){return b}
vendor: 1,476 bytes, line 120
120,checkForgottenReturns:w,setBounds:O,warn:T,deprecated:_,CapturedTrace:pe,fireDomEvent:Q,fireGlobalEvent:ce}}}).call(this,t("_process"))},{"./errors":58,"./util":82,_process:101}],56:[function(t,n,r){n.exports=function(i){function a(){return this.value}function o(){throw this.reason}i.prototype.return=i.prototype.thenReturn=function(c){return c instanceof i&&c.suppressUnhandledRejections(),this._then(a,void 0,void 0,{value:c},void 0)},i.prototype.throw=i.prototype.thenThrow=function(c){return this._then(o,void 0,void 0,{reason:c},void 0)},i.prototype.catchThrow=function(c){if(arguments.length<=1)return this._then(void 0,o,void 0,{reason:c},void 0);var l=arguments[1],u=function(){throw l};return this.caught(c,u)},i.prototype.catchReturn=function(c){if(arguments.length<=1)return c instanceof i&&c.suppressUnhandledRejections(),this._then(void 0,a,void 0,{value:c},void 0);var l=arguments[1];l instanceof i&&l.suppressUnhandledRejections();var u=function(){return l};return this.caught(c,u)}}},{}],57:[function(t,n,r){n.exports=function(i,a){function o(){return u(this)}function c(d,h){return l(d,h,a,a)}var l=i.reduce,u=i.all;i.prototype.each=function(d){return l(this,d,a,0)._then(o,void 0,void 0,this,void 0)},i.prototype.mapSeries=function(d){return l(this,d,a,a)},i.each=function(d,h){return l(d,h,a,0)._then(o,void 0,void 0,d,void 0)},i.mapSeries=c}},{}],58:[function(t,n,r){function i(T,S){function C(D){return this instanceof C?(f(this,"message",typeof D=="str
120ing"?D:S),f(this,"name",T),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new C(D)}return h(C,Error),C}function a(T){return this instanceof a?(f(this,"name","OperationalError"),f(this,"message",T),this.cause=T,this.isOperational=!0,void(T instanceof Error?(f(this,"message",T.message),f(this,"stack",T.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new a(T)}var o,c,l=t("./es5"),u=l.freeze,d=t("./util"),h=d.inherits,f=d.notEnumerableProp,p=i("Warning","warning"),y=i("CancellationError","cancellation error"),g=i("TimeoutError","timeout error"),b=i("AggregateError","aggregate error");try{o=TypeError,c=RangeError}catch{o=i("TypeError","type error"),c=i("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),x=0;x<v.length;++x)typeof Array.prototype[v[x]]=="function"&&(b.prototype[v[x]]=Array.prototype[v[x]]);l.defineProperty(b.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),b.prototype.isOperational=!0;var w=0;b.prototype.toString=function(){var T=Array(4*w+1).join(" "),S=` 121`+T+`AggregateError of: 122`;w++,T=Array(4*w+1).join(" ");for(var C=0;C<this.length;++C){for(var D=this[C]===this?"[Circular AggregateError]":this[C]+"",N=D.split(` 123`),M=0;M<N.length;++M)N[M]=T+N[M];D=N.join(` 124`),S+=D+` 125`}return w--,S},h(a,Error);var _=Error.__BluebirdErrorTypes__;_||(_=u({CancellationError:y,TimeoutError:g,OperationalError:a,RejectionError:a,AggregateError:b}),l.defineProperty(Error,"__BluebirdErrorTypes__",{value:_,writable:!1,enumerable:!1,configurable:!1})),n.exports={Error,TypeError:o,RangeError:c,CancellationError:_.CancellationError,OperationalError:_.OperationalError,TimeoutError:_.TimeoutError,AggregateError:_.AggregateError,Warning:p}},{"./es5":59,"./util":82}],59:[function(t,n,r){var i=(function(){return this===void 0})();if(i)n.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:i,propertyIsWritable:function(y,g){var b=Object.getOwnPropertyDescriptor(y,g);return!(b&&!b.writable&&!b.set)}};else{var a={}.hasOwnProperty,o={}.toString,c={}.constructor.prototype,l=function(y){var g=[];for(var b in y)a.call(y,b)&&g.push(b);return g},u=function(y,g){return{value:y[g]}},d=function(y,g,b){return y[g]=b.value,y},h=function(y){return y},f=function(y){try{return Object(y).constructor.prototype}catch{return c}},p=function(y){try{return o.call(y)==="[object Array]"}catch{return!1}};n.exports={isArray:p,keys:l,names:l,defineProperty:d,getDescriptor:u,freeze:h,getPrototypeOf:f,isES5:i,propertyIsWritable:function(){return!0}}}},{}],60:[function(t,n,r){n.exports=function(i,a){var o=i.map;i.prototype.filter=function(c,l){return o(this,c,l,a)},i.filter=function(c,l,u){return o(c,l,u,a)}}},{}],61:[function(t,n,r){n.exports=function(i,a){function o(g,b,v){this.promise=g,this.type=b,this.handler=v,this.called=!1,this.cancelPromise=null}function c(g){this.finallyHandler=g}function l(g,b){return g.cancelPromise!=null?(arguments.length>1?g.cancelPromise._reject(b):g.cancelPromise._cancel(),g.cancelPromise=null,!0):!1}function u(){return h.call(this,this.promise._target()._settledValue())}function d(g){return l(this,g)?void 0:(y.e=g,y)}function h(g){var b=this.promise,v=this.handler;if(!this.called){this.called=!0;var x=this.isFinallyHandler()?v.call(b._boundValue()):v.call(b._boundValue(),g);if(x!==void 0){b._setReturnedNonUndefined();var w=a(x,b);if(w instanceof i){if(this.cancelPromise!=null){if(w._isCancelled()){var _=new p("late cancellation observer");return b._attachExtraTrace(_),y.e=_,y}w.isPending()&&w._attachCancellationCallback(new c(this))}return w._then(u,d,void 0,this,void 0)}}}return b.isRejected()?(l(this),y.e=g,y):(l(this),g)}var f=t("./util"),p=i.CancellationError,y=f.errorObj;return o.prototype.isFinallyHandler=function(){return this.type===0},c.prototype._resultCancelled=function(){l(this.finallyHandler)},i.prototype._passThrough=function(g,b,v,x){return typeof g!="function"?this.then():this._then(v,x,void 0,new o(this,b,g),void 0)},i.prototype.lastly=i.prototype.finally=function(g){return this._passThrough(g,0,h,h)},i.prototype.tap=function(g){return this._passThrough(g,1,h)},o}},{"./util":82}],62:[function(t,n,r){n.exports=function(i,a,o,c,l,u){function d(x,w,_){for(var T=0;T<w.length;++T){_._pushContext();var S=b(w[T])(x);if(_._popContext(),S===g){_._pushContext();var C=i.reject(g.e);return _._popContext(),C}var D=c(S,_);if(D instanceof i)return D}return null}function h(x,w,_,T){if(u.cancellation()){var S=new i(o),C=this._finallyPromise=new i(o);this._promise=S.lastly(function(){return C}),S._captureStackTrace(),S._setOnCancel(this)}else{var D=this._promise=new i(o);D._captureStackTrace()}this._stack=T,this._generatorFunction=x,this._receiver=w,this._generator=void 0,this._yieldHandlers=typeof _=="function"?[_].concat(v):v,this._yieldedPromise=null,this._cancellationPhase=!1}var f=t("./errors"),p=f.TypeError,y=t("./util"),g=y.errorObj,b=y.tryCatch,v=[];y.inherits(h,l),h.prototype._isResolved=function(){return this._promise===null},h.prototype._cleanup=function(){this._promise=this._generator=null,u.cancellation()&&this._finallyPromise!==null&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},h.prototype._promiseCancelled=function(){if(!this._isResolved()){var x,w=typeof this._generator.return<"u";
125if(w)this._promise._pushContext(),x=b(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var _=new i.CancellationError("generator .return() sentinel");i.coroutine.returnSentinel=_,this._promise._attachExtraTrace(_),this._promise._pushContext(),x=b(this._generator.throw).call(this._generator,_),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(x)}},h.prototype._promiseFulfilled=function(x){this._yieldedPromise=null,this._promise._pushContext();var w=b(this._generator.next).call(this._generator,x);this._promise._popContext(),this._continue(w)},h.prototype._promiseRejected=function(x){this._yieldedPromise=null,this._promise._attachExtraTrace(x),this._promise._pushContext();var w=b(this._generator.throw).call(this._generator,x);this._promise._popContext(),this._continue(w)},h.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof i){var x=this._yieldedPromise;this._yieldedPromise=null,x.cancel()}},h.prototype.promise=function(){return this._promise},h.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},h.prototype._continue=function(x){var w=this._promise;if(x===g)return this._cleanup(),this._cancellationPhase?w.cancel():w._rejectCallback(x.e,!1);var _=x.value;if(x.done===!0)return this._cleanup(),this._cancellationPhase?w.cancel():w._resolveCallback(_);var T=c(_,this._promise);if(!(T instanceof i)&&(T=d(T,this._yieldHandlers,this._promise),T===null))return void this._promiseRejected(new p(`A value %s was yielded that could not be treated as a promise 126 127 See http://goo.gl/MqrFmX 128 129`.replace("%s",_)+`From coroutine: 130`+this._stack.split(` 131`).slice(1,-7).join(` 132`)));T=T._target();var S=T._bitField;(50397184&S)===0?(this._yieldedPromise=T,T._proxy(this,null)):(33554432&S)!==0?i._async.invoke(this._promiseFulfilled,this,T._value()):(16777216&S)!==0?i._async.invoke(this._promiseRejected,this,T._reason()):this._promiseCancelled()},i.coroutine=function(x,w){if(typeof x!="function")throw new p(`generatorFunction must be a function 133 134 See http://goo.gl/MqrFmX 135`);var _=Object(w).yieldHandler,T=h,S=new Error().stack;return function(){var C=x.apply(this,arguments),D=new T(void 0,void 0,_,S),N=D.promise();return D._generator=C,D._promiseFulfilled(void 0),N}},i.coroutine.addYieldHandler=function(x){if(typeof x!="function")throw new p("expecting a function but got "+y.classString(x));v.push(x)},i.spawn=function(x){if(u.deprecated("Promise.spawn()","Promise.coroutine()"),typeof x!="function")return a(`generatorFunction must be a function 136 137 See http://goo.gl/MqrFmX 138`);var w=new h(x,this),_=w.promise();return w._run(i.spawn),_}}},{"./errors":58,"./util":82}],63:[function(t,n,r){n.exports=function(i,a,o,c,l,u){var d,h=t("./util"),f=h.canEvaluate,p=h.tryCatch,y=h.errorObj;if(f){for(var g=function(S){return new Function("value","holder",` 139 'use strict'; 140 holder.pIndex = value; 141 holder.checkFulfillment(this); 142 `.replace(/Index/g,S))},b=function(S){return new Function("promise","holder",` 143 'use strict'; 144 holder.pIndex = promise; 145 `.replace(/Index/g,S))},v=function(S){for(var C=new Array(S),D=0;D<C.length;++D)C[D]="this.p"+(D+1);var N=C.join(" = ")+" = null;",M=`var promise; 146`+C.map(function(X){return` 147 promise = `+X+`; 148 if (promise instanceof Promise) { 149 promise.cancel(); 150 } 151 `}).join(` 152`),F=C.join(", "),L="Holder$"+S,A=`return function(tryCatch, errorObj, Promise, async) { 153 'use strict'; 154 function [TheName](fn) { 155 [TheProperties] 156 this.fn = fn; 157 this.asyncNeeded = true; 158 this.now = 0; 159 } 160 161 [TheName].prototype._callFunction = function(promise) { 162 promise._pushContext(); 163 var ret = tryCatch(this.fn)([ThePassedArguments]); 164 promise._popContext(); 165 if (ret === errorObj) { 166 promise._rejectCallback(ret.e, false); 167 } else { 168 promise._resolveCallback(ret); 169 } 170 }; 171 172 [TheName].prototype.checkFulfillment = function(promise) { 173 var now = ++this.now; 174 if (now === [TheTotal]) { 175 if (this.asyncNeeded) { 176 async.invoke(this._callFunction, this, promise); 177 } else { 178 this._callFunction(promise); 179 } 180 181 } 182 }; 183 184 [TheName].prototype._resultCancelled = function() { 185 [CancellationCode] 186 }; 187 188 return [TheName]; 189 }(tryCatch, errorObj, Promise, async); 190 `;return A=A.replace(/\[TheName\]/g,L).replace(/\[TheTotal\]/g,S).replace(/\[ThePassedArguments\]/g,F).replace(/\[TheProperties\]/g,N).replace(/\[CancellationCode\]/g,M),new Function("tryCatch","errorObj","Promise","async",A)(p,y,i,l)},x=[],w=[],_=[],T=0;8>T;++T)x.push(v(T+1)),w.push(g(T+1)),_.push(b(T+1));d=function(S){this._reject(S)}}i.join=function(){var S,C=arguments.length-1;if(C>0&&typeof arguments[C]=="function"&&(S=arguments[C],8>=C&&f)){var O=new i(c);O._captureStackTrace();for(var D=x[C-1],N=new D(S),M=w,F=0;C>F;++F){var L=o(arguments[F],O);if(L instanceof i){L=L._target();var A=L._bitField;(50397184&A)===0?(L._then(M[F],d,void 0,O,N),_[F](L,N),N.asyncNeeded=!1):(33554432&A)!==0?M[F].call(O,L._value(
190),N):(16777216&A)!==0?O._reject(L._reason()):O._cancel()}else M[F].call(O,L,N)}if(!O._isFateSealed()){if(N.asyncNeeded){var X=u();X!==null&&(N.fn=h.domainBind(X,N.fn))}O._setAsyncGuaranteed(),O._setOnCancel(N)}return O}for(var he=arguments.length,j=new Array(he),ee=0;he>ee;++ee)j[ee]=arguments[ee];S&&j.pop();var O=new a(j).promise();return S!==void 0?O.spread(S):O}}},{"./util":82}],64:[function(t,n,r){n.exports=function(i,a,o,c,l,u){function d(v,x,w,_){this.constructor$(v),this._promise._captureStackTrace();var T=f();this._callback=T===null?x:p.domainBind(T,x),this._preservedValues=_===l?new Array(this.length()):null,this._limit=w,this._inFlight=0,this._queue=[],b.invoke(this._asyncInit,this,void 0)}function h(v,x,w,_){if(typeof x!="function")return o("expecting a function but got "+p.classString(x));var T=0;if(w!==void 0){if(typeof w!="object"||w===null)return i.reject(new TypeError("options argument must be an object but it is "+p.classString(w)));if(typeof w.concurrency!="number")return i.reject(new TypeError("'concurrency' must be a number but it is "+p.classString(w.concurrency)));T=w.concurrency}return T=typeof T=="number"&&isFinite(T)&&T>=1?T:0,new d(v,x,T,_).promise()}var f=i._getDomain,p=t("./util"),y=p.tryCatch,g=p.errorObj,b=i._async;p.inherits(d,a),d.prototype._asyncInit=function(){this._init$(void 0,-2)},d.prototype._init=function(){},d.prototype._promiseFulfilled=function(v,x){var w=this._values,_=this.length(),T=this._preservedValues,S=this._limit;if(0>x){if(x=-1*x-1,w[x]=v,S>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(S>=1&&this._inFlight>=S)return w[x]=v,this._queue.push(x),!1;T!==null&&(T[x]=v);var C=this._promise,D=this._callback,N=C._boundValue();C._pushContext();var M=y(D).call(N,v,x,_),F=C._popContext();if(u.checkForgottenReturns(M,F,T!==null?"Promise.filter":"Promise.map",C),M===g)return this._reject(M.e),!0;var L=c(M,this._promise);if(L instanceof i){L=L._target();var A=L._bitField;if((50397184&A)===0)return S>=1&&this._inFlight++,w[x]=L,L._proxy(this,-1*(x+1)),!1;if((33554432&A)===0)return(16777216&A)!==0?(this._reject(L._reason()),!0):(this._cancel(),!0);M=L._value()}w[x]=M}var X=++this._totalResolved;return X>=_?(T!==null?this._filter(w,T):this._resolve(w),!0):!1},d.prototype._drainQueue=function(){for(var v=this._queue,x=this._limit,w=this._values;v.length>0&&this._inFlight<x;){if(this._isResolved())return;var _=v.pop();this._promiseFulfilled(w[_],_)}},d.prototype._filter=function(v,x){for(var w=x.length,_=new Array(w),T=0,S=0;w>S;++S)v[S]&&(_[T++]=x[S]);_.length=T,this._resolve(_)},d.prototype.preservedValues=function(){return this._preservedValues},i.prototype.map=function(v,x){return h(this,v,x,null)},i.map=function(v,x,w,_){return h(v,x,w,_)}}},{"./util":82}],65:[function(t,n,r){n.exports=function(i,a,o,c,l){var u=t("./util"),d=u.tryCatch;i.method=function(h){if(typeof h!="function")throw new i.TypeError("expecting a function but got "+u.classString(h));return function(){var f=new i(a);f._captureStackTrace(),f._pushContext();var p=d(h).apply(this,arguments),y=f._popContext();return l.checkForgottenReturns(p,y,"Promise.method",f),f._resolveFromSyncValue(p),f}},i.attempt=i.try=function(h){if(typeof h!="function")return c("expecting a function but got "+u.classString(h));var f=new i(a);f._captureStackTrace(),f._pushContext();var p;if(arguments.length>1){l.deprecated("calling Promise.try with more than 1 argument");var y=arguments[1],g=arguments[2];p=u.isArray(y)?d(h).apply(g,y):d(h).call(g,y)}else p=d(h)();var b=f._popContext();return l.checkForgottenReturns(p,b,"Promise.try",f),f._resolveFromSyncValue(p),f},i.prototype._resolveFromSyncValue=function(h){h===u.errorObj?this._rejectCallback(h.e,!1):this._resolveCallback(h,!0)}}},{"./util":82}],66:[function(t,n,r){function i(p){return p instanceof Error&&h.getPrototypeOf(p)===Error.prototype}function a(p){var y;if(i(p)){y=new d(p),y.name=p.name,y.message=p.message,y.stack=p.stack;for(var g=h.keys(p),b=0;b<g.length;++b){var v=g[b];f.test(v)||(y[v]=p[v])}return y}return c.markAsOriginatingFromRejection(p),p}function o(p,y){return function(g,b){if(p!==null){if(g){var v=a(l(g));p._attachExtraTrace(v),p._reject(v)}else if(y){for(var x=arguments.length,w=new Array(Math.max(x-1,0)),_=1;x>_;++_)w[_-1]=arguments[_];p._fulfill(w)}else p._fulfill(b);p=null}}}var c=t("./util"),l=c.maybeWrapAsError,u=t("./errors"),d=u.OperationalError,h=t("./e
190s5"),f=/^(?:name|message|stack|cause)$/;n.exports=o},{"./errors":58,"./es5":59,"./util":82}],67:[function(t,n,r){n.exports=function(i){function a(f,p){var y=this;if(!l.isArray(f))return o.call(y,f,p);var g=d(p).apply(y._boundValue(),[null].concat(f));g===h&&u.throwLater(g.e)}function o(f,p){var y=this,g=y._boundValue(),b=f===void 0?d(p).call(g,null):d(p).call(g,null,f);b===h&&u.throwLater(b.e)}function c(f,p){var y=this;if(!f){var g=new Error(f+"");g.cause=f,f=g}var b=d(p).call(y._boundValue(),f);b===h&&u.throwLater(b.e)}var l=t("./util"),u=i._async,d=l.tryCatch,h=l.errorObj;i.prototype.asCallback=i.prototype.nodeify=function(f,p){if(typeof f=="function"){var y=o;p!==void 0&&Object(p).spread&&(y=a),this._then(y,c,void 0,this,f)}return this}}},{"./util":82}],68:[function(t,n,r){(function(i){n.exports=function(){function a(){}function o(q,B){if(typeof B!="function")throw new T("expecting a function but got "+b.classString(B));if(q.constructor!==c)throw new T(`the promise constructor cannot be invoked directly 191 192 See http://goo.gl/MqrFmX 193`)}function c(q){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,q!==C&&(o(this,q),this._resolveFromExecutor(q)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function l(q){this.promise._resolveCallback(q)}function u(q){this.promise._rejectCallback(q,!1)}function d(q){var B=new c(C);B._fulfillmentHandler0=q,B._rejectionHandler0=q,B._promise0=q,B._receiver0=q}var h,f=function(){return new T(`circular promise resolution chain 194 195 See http://goo.gl/MqrFmX 196`)},p=function(){return new c.PromiseInspection(this._target())},y=function(q){return c.reject(new T(q))},g={},b=t("./util");h=b.isNode?function(){var q=i.domain;return q===void 0&&(q=null),q}:function(){return null},b.notEnumerableProp(c,"_getDomain",h);var v=t("./es5"),x=t("./async"),w=new x;v.defineProperty(c,"_async",{value:w});var _=t("./errors"),T=c.TypeError=_.TypeError;c.RangeError=_.RangeError;var S=c.CancellationError=_.CancellationError;c.TimeoutError=_.TimeoutError,c.OperationalError=_.OperationalError,c.RejectionError=_.OperationalError,c.AggregateError=_.AggregateError;var C=function(){},D={},N={},M=t("./thenables")(c,C),F=t("./promise_array")(c,C,M,y,a),L=t("./context")(c),A=L.create,X=t("./debuggability")(c,L),he=(X.CapturedTrace,t("./finally")(c,M)),j=t("./catch_filter")(N),ee=t("./nodeback"),O=b.errorObj,pe=b.tryCatch;return c.prototype.toString=function(){return"[object Promise]"},c.prototype.caught=c.prototype.catch=function(q){var B=arguments.length;if(B>1){var re,le=new Array(B-1),ge=0;for(re=0;B-1>re;++re){var ie=arguments[re];if(!b.isObject(ie))return y("expecting an object but got A catch statement predicate "+b.classString(ie));le[ge++]=ie}return le.length=ge,q=arguments[re],this.then(void 0,j(le,q,this))}return this.then(void 0,q)},c.prototype.reflect=function(){return this._then(p,p,void 0,this,void 0)},c.prototype.then=function(q,B){if(X.warnings()&&arguments.length>0&&typeof q!="function"&&typeof B!="function"){var re=".then() only accepts functions but was passed: "+b.classString(q);arguments.length>1&&(re+=", "+b.classString(B)),this._warn(re)}return this._then(q,B,void 0,void 0,void 0)},c.prototype.done=function(q,B){var re=this._then(q,B,void 0,void 0,void 0);re._setIsFinal()},c.prototype.spread=function(q){return typeof q!="function"?y("expecting a function but got "+b.classString(q)):this.all()._then(q,void 0,void 0,D,void 0)},c.prototype.toJSON=function(){var q={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(q.fulfillmentValue=this.value(),q.isFulfilled=!0):this.isRejected()&&(q.rejectionReason=this.reason(),q.isRejected=!0),q},c.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new F(this).promise()},c.prototype.error=function(q){return this.caught(b.originatesFromRejection,q)},c.getNewLibraryCopy=n.exports,c.is=function(q){return q instanceof c},c.fromNode=c.fromCallback=function(q){var B=new c(C);B._captureStackTrace();var re=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,le=pe(q)(ee(B,re));return le===O&&B._rejectCallback(le.e,!0),B._isFateSealed()||B._setAsyncGuaranteed(),B},c.all=function(q){return new F(q).promise()},c.cast=function(q){var B=M(q);return B instanceof c||(B=new c(C),B._captureStackTrace(),B._setFulfilled(),B._rejectionHandler0=q),B},c.resolve=c.fulfilled=c.cast,c.reject=c.rejected=function(q){var B=new c(C);return B._captureStackTrace(),B._rejectCallback(q,!0),B}
196,c.setScheduler=function(q){if(typeof q!="function")throw new T("expecting a function but got "+b.classString(q));return w.setScheduler(q)},c.prototype._then=function(q,B,re,le,ge){var ie=ge!==void 0,P=ie?ge:new c(C),W=this._target(),te=W._bitField;ie||(P._propagateFrom(this,3),P._captureStackTrace(),le===void 0&&(2097152&this._bitField)!==0&&(le=(50397184&te)!==0?this._boundValue():W===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,P));var Y=h();if((50397184&te)!==0){var se,ue,we=W._settlePromiseCtx;(33554432&te)!==0?(ue=W._rejectionHandler0,se=q):(16777216&te)!==0?(ue=W._fulfillmentHandler0,se=B,W._unsetRejectionIsUnhandled()):(we=W._settlePromiseLateCancellationObserver,ue=new S("late cancellation observer"),W._attachExtraTrace(ue),se=B),w.invoke(we,W,{handler:Y===null?se:typeof se=="function"&&b.domainBind(Y,se),promise:P,receiver:le,value:ue})}else W._addCallbacks(q,B,P,le,Y);return P},c.prototype._length=function(){return 65535&this._bitField},c.prototype._isFateSealed=function(){return(117506048&this._bitField)!==0},c.prototype._isFollowing=function(){return(67108864&this._bitField)===67108864},c.prototype._setLength=function(q){this._bitField=-65536&this._bitField|65535&q},c.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},c.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},c.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},c.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},c.prototype._isFinal=function(){return(4194304&this._bitField)>0},c.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},c.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},c.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},c.prototype._setAsyncGuaranteed=function(){w.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},c.prototype._receiverAt=function(q){var B=q===0?this._receiver0:this[4*q-4+3];return B===g?void 0:B===void 0&&this._isBound()?this._boundValue():B},c.prototype._promiseAt=function(q){return this[4*q-4+2]},c.prototype._fulfillmentHandlerAt=function(q){return this[4*q-4+0]},c.prototype._rejectionHandlerAt=function(q){return this[4*q-4+1]},c.prototype._boundValue=function(){},c.prototype._migrateCallback0=function(q){var B=(q._bitField,q._fulfillmentHandler0),re=q._rejectionHandler0,le=q._promise0,ge=q._receiverAt(0);ge===void 0&&(ge=g),this._addCallbacks(B,re,le,ge,null)},c.prototype._migrateCallbackAt=function(q,B){var re=q._fulfillmentHandlerAt(B),le=q._rejectionHandlerAt(B),ge=q._promiseAt(B),ie=q._receiverAt(B);ie===void 0&&(ie=g),this._addCallbacks(re,le,ge,ie,null)},c.prototype._addCallbacks=function(q,B,re,le,ge){var ie=this._length();if(ie>=65531&&(ie=0,this._setLength(0)),ie===0)this._promise0=re,this._receiver0=le,typeof q=="function"&&(this._fulfillmentHandler0=ge===null?q:b.domainBind(ge,q)),typeof B=="function"&&(this._rejectionHandler0=ge===null?B:b.domainBind(ge,B));else{var P=4*ie-4;this[P+2]=re,this[P+3]=le,typeof q=="function"&&(this[P+0]=ge===null?q:b.domainBind(ge,q)),typeof B=="function"&&(this[P+1]=ge===null?B:b.domainBind(ge,B))}return this._setLength(ie+1),ie},c.prototype._proxy=function(q,B){this._addCallbacks(void 0,void 0,B,q,null)},c.prototype._resolveCallback=function(q,B){if((117506048&this._bitField)===0){if(q===this)return this._rejectCallback(f(),!1);var re=M(q,this);if(!(re instanceof c))return this._fulfill(q);B&&this._propagateFrom(re,2);var le=re._target();if(le===this)return void this._reject(f());var ge=le._bitField;if((50397184&ge)===0){var ie=this._length();ie>0&&le._migrateCallback0(this);for(var P=1;ie>P;++P)le._migrateCallbackAt(this,P);this._setFollowing(),this._setLength(0),this._setFollowee(le)}else if((33554432&ge)!==0)this._fulfill(le._value());else if((16777216&ge)!==0)this._reject(le._reason());else{var W=new S("late cancellation observer");le._attachExtraTrace(W),this._reject(W)}}},c.prototype._rejectCallback=function(q,B,re){var le=b.ensureErrorObject(q),ge=le===q;if(!ge&&!re&&X.warnings()){var ie="a promise was rejected with a non-error: "+b.classString(q);this._warn(ie,!0)}this._attachExtraTrace(le,B?ge:!1),this._reject(q)},c.prototype._resolveFromExecutor=function(q){var B=this;this._captureStackTrace(),this._pushContext();var re=!0,le=this._execute(q,function(ge){B._resolveCallback(ge)},function(ge){B._rejectCallback(ge,re)});re=!1,this._popContext(),le!==void 0&&B._rejectCallback(le,!0)},c.prototype._settlePromiseFromHandler=function(q,B,re,le){var ge=le._bitField;if((65536&ge)===0){le._pushContext();var ie;B===D?re&&typeof re.length=="number"?ie=pe(q).apply(this._boundValue(),re):(ie=O,ie.e=new T("cannot .spread() a non-array: "+b.classString(re))):ie=pe(q).call(B,re);var P=le._popContext();ge=le._bitField,(65536&ge)===0&&(ie===N?le._reject(re):ie===O?le._rejectCallback(ie.e,!1):(X.checkForgottenReturns(ie,P,"",le,this),le._resolveCallback(ie)))}},c.prototype._target=function(){for(var q=this;q._isFollowing();)q=q._followee();return q},c.prototype._followee=function(){return this._rejectionHandler0},c.prototype._setFollowee=function(q){this._rejectionHandler0=q},c.prototype._settlePromise=function(q,B,re,le){var ge=q instanceof c,ie=this._bitField,P=(134217728&ie)!==0;(65536&ie)!==0?(ge&&q._invokeInternalOnCancel(),re instanceof he&&re.isFinallyHandler()?(re.cancelPromise=q,pe(B).call(re,le)===O&&q._reject(O.e)):B===p?q._fulfill(p.call(re)):re instanceof a?re._promiseCancelled(q):ge||q instanceof F?q._cancel():re.cancel()):typeof B=="function"?ge?(P&&q._setAsyncGuaranteed(),this._settlePromiseFromHandler(B,re,le,q)):B.call(re,le,q):re instanceof a?re._isResolved()||((33554432&ie)!==0?re._promiseFulfilled(le,q):re._promiseRe
196jected(le,q)):ge&&(P&&q._setAsyncGuaranteed(),(33554432&ie)!==0?q._fulfill(le):q._reject(le))},c.prototype._settlePromiseLateCancellationObserver=function(q){var B=q.handler,re=q.promise,le=q.receiver,ge=q.value;typeof B=="function"?re instanceof c?this._settlePromiseFromHandler(B,le,ge,re):B.call(le,ge,re):re instanceof c&&re._reject(ge)},c.prototype._settlePromiseCtx=function(q){this._settlePromise(q.promise,q.handler,q.receiver,q.value)},c.prototype._settlePromise0=function(q,B,re){var le=this._promise0,ge=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(le,q,ge,B)},c.prototype._clearCallbackDataAtIndex=function(q){var B=4*q-4;this[B+2]=this[B+3]=this[B+0]=this[B+1]=void 0},c.prototype._fulfill=function(q){var B=this._bitField;if(!((117506048&B)>>>16)){if(q===this){var re=f();return this._attachExtraTrace(re),this._reject(re)}this._setFulfilled(),this._rejectionHandler0=q,(65535&B)>0&&((134217728&B)!==0?this._settlePromises():w.settlePromises(this))}},c.prototype._reject=function(q){var B=this._bitField;if(!((117506048&B)>>>16))return this._setRejected(),this._fulfillmentHandler0=q,this._isFinal()?w.fatalError(q,b.isNode):void((65535&B)>0?w.settlePromises(this):this._ensurePossibleRejectionHandled())},c.prototype._fulfillPromises=function(q,B){for(var re=1;q>re;re++){var le=this._fulfillmentHandlerAt(re),ge=this._promiseAt(re),ie=this._receiverAt(re);this._clearCallbackDataAtIndex(re),this._settlePromise(ge,le,ie,B)}},c.prototype._rejectPromises=function(q,B){for(var re=1;q>re;re++){var le=this._rejectionHandlerAt(re),ge=this._promiseAt(re),ie=this._receiverAt(re);this._clearCallbackDataAtIndex(re),this._settlePromise(ge,le,ie,B)}},c.prototype._settlePromises=function(){var q=this._bitField,B=65535&q;if(B>0){if((16842752&q)!==0){var re=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,re,q),this._rejectPromises(B,re)}else{var le=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,le,q),this._fulfillPromises(B,le)}this._setLength(0)}this._clearCancellationData()},c.prototype._settledValue=function(){var q=this._bitField;return(33554432&q)!==0?this._rejectionHandler0:(16777216&q)!==0?this._fulfillmentHandler0:void 0},c.defer=c.pending=function(){X.deprecated("Promise.defer","new Promise");var q=new c(C);return{promise:q,resolve:l,reject:u}},b.notEnumerableProp(c,"_makeSelfResolutionError",f),t("./method")(c,C,M,y,X),t("./bind")(c,C,M,X),t("./cancel")(c,F,y,X),t("./direct_resolve")(c),t("./synchronous_inspection")(c),t("./join")(c,F,M,C,w,h),c.Promise=c,c.version="3.4.7",t("./map.js")(c,F,y,M,C,X),t("./call_get.js")(c),t("./using.js")(c,y,M,A,C,X),t("./timers.js")(c,C,X),t("./generators.js")(c,y,C,M,a,X),t("./nodeify.js")(c),t("./promisify.js")(c,C),t("./props.js")(c,F,M,y),t("./race.js")(c,C,M,y),t("./reduce.js")(c,F,y,M,C,X),t("./settle.js")(c,F,X),t("./some.js")(c,F,y),t("./filter.js")(c,C),t("./each.js")(c,C),t("./any.js")(c),b.toFastProperties(c),b.toFastProperties(c.prototype),d({a:1}),d({b:2}),d({c:3}),d(1),d(function(){}),d(void 0),d(!1),d(new c(C)),X.setBounds(x.firstLineError,b.lastLineError),c}}).call(this,t("_process"))},{"./any.js":48,"./async":49,"./bind":50,"./call_get.js":51,"./cancel":52,"./catch_filter":53,"./context":54,"./debuggability":55,"./direct_resolve":56,"./each.js":57,"./errors":58,"./es5":59,"./filter.js":60,"./finally":61,"./generators.js":62,"./join":63,"./map.js":64,"./method":65,"./nodeback":66,"./nodeify.js":67,"./promise_array":69,"./promisify.js":70,"./props.js":71,"./race.js":73,"./reduce.js":74,"./settle.js":76,"./some.js":77,"./synchronous_inspection":78,"./thenables":79,"./timers.js":80,"./using.js":81,"./util":82,_process:101}],69:[function(t,n,r){n.exports=function(i,a,o,c,l){function u(f){switch(f){case-2:return[];case-3:return{}}}function d(f){var p=this._promise=new i(a);f instanceof i&&p._propagateFrom(f,3),p._setOnCancel(this),this._values=f,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var h=t("./util");return h.isArray,h.inherits(d,l),d.prototype.length=function(){return this._length},d.prototype.promise=function(){return this._promise},d.prototype._init=function f(p,y){var g=o(this._values,this._promise);if(g instanceof i){g=g._target();var b=g._bitField;if(this._values=g,(50397184&b)===0)return this._promise._setAsyncGuaranteed(),g._then(f,this._reject,void 0,this,y);if((33554432&b)===0)return(16777216&b)!==0?this._reject(g._reason()):this._cancel();g=g._value()}if(g=h.asArray(g),g===null){var v=c("expecting an array or an iterable object but got "+h.classString(g)).reason();return void this._promise._rejectCallback(v,!1)}return g.length===0?void(y===-5?this._resolveEmptyArray():this._resolve(u(y))):void this._iterate(g)},d.prototype._iterate=function(f){var p=this.getActualLength(f.length);this._length=p,this._values=this.shouldCopyValues()?new Array(p):this._values;for(var y=this._promise,g=!1,b=null,v=0;p>v;++v){var x=o(f[v],y);x instanceof i?(x=x._target(),b=x._bitField):b=null,g?b!==null&&x.suppressUnhandledRejections():b!==null?(50397184&b)===0?(x._proxy(this,v),this._values[v]=x):g=(33554432&b)!==0?this._promiseFulfilled(x._value(
196),v):(16777216&b)!==0?this._promiseRejected(x._reason(),v):this._promiseCancelled(v):g=this._promiseFulfilled(x,v)}g||y._setAsyncGuaranteed()},d.prototype._isResolved=function(){return this._values===null},d.prototype._resolve=function(f){this._values=null,this._promise._fulfill(f)},d.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},d.prototype._reject=function(f){this._values=null,this._promise._rejectCallback(f,!1)},d.prototype._promiseFulfilled=function(f,p){this._values[p]=f;var y=++this._totalResolved;return y>=this._length?(this._resolve(this._values),!0):!1},d.prototype._promiseCancelled=function(){return this._cancel(),!0},d.prototype._promiseRejected=function(f){return this._totalResolved++,this._reject(f),!0},d.prototype._resultCancelled=function(){if(!this._isResolved()){var f=this._values;if(this._cancel(),f instanceof i)f.cancel();else for(var p=0;p<f.length;++p)f[p]instanceof i&&f[p].cancel()}},d.prototype.shouldCopyValues=function(){return!0},d.prototype.getActualLength=function(f){return f},d}},{"./util":82}],70:[function(t,n,r){n.exports=function(i,a){function o(ee){return!N.test(ee)}function c(ee){try{return ee.__isPromisified__===!0}catch{return!1}}function l(ee,O,pe){var q=b.getDataPropertyOrDefault(ee,O+pe,C);return q?c(q):!1}function u(ee,O,pe){for(var q=0;q<ee.length;q+=2){var B=ee[q];if(pe.test(B)){for(var re=B.replace(pe,""),le=0;le<ee.length;le+=2)if(ee[le]===re)throw new T(`Cannot promisify an API that has normal methods with '%s'-suffix 197 198 See http://goo.gl/MqrFmX 199`.replace("%s",O))}}}function d(ee,O,pe,q){for(var B=b.inheritedDataKeys(ee),re=[],le=0;le<B.length;++le){var ge=B[le],ie=ee[ge],P=q===M?!0:M(ge);typeof ie!="function"||c(ie)||l(ee,ge,O)||!q(ge,ie,ee,P)||re.push(ge,ie)}return u(re,O,pe),re}function h(ee,O,pe,q,B,re){function le(){var P=O;O===g&&(P=this);var W=new i(a);W._captureStackTrace();var te=typeof ie=="string"&&this!==ge?this[ie]:ee,Y=v(W,re);try{te.apply(P,x(arguments,Y))}catch(se){W._rejectCallback(w(se),!0,!0)}return W._isFateSealed()||W._setAsyncGuaranteed(),W}var ge=(function(){return this})(),ie=ee;return typeof ie=="string"&&(ee=q),b.notEnumerableProp(le,"__isPromisified__",!0),le}function f(ee,O,pe,q,B){for(var re=new RegExp(F(O)+"$"),le=d(ee,O,re,pe),ge=0,ie=le.length;ie>ge;ge+=2){var P=le[ge],W=le[ge+1],te=P+O;if(q===j)ee[te]=j(P,g,P,W,O,B);else{var Y=q(W,function(){return j(P,g,P,W,O,B)});b.notEnumerableProp(Y,"__isPromisified__",!0),ee[te]=Y}}return b.toFastProperties(ee),ee}function p(ee,O,pe){return j(ee,O,void 0,ee,null,pe)}var y,g={},b=t("./util"),v=t("./nodeback"),x=b.withAppended,w=b.maybeWrapAsError,_=b.canEvaluate,T=t("./errors").TypeError,S="Async",C={__isPromisified__:!0},D=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],N=new RegExp("^(?:"+D.join("|")+")$"),M=function(ee){return b.isIdentifier(ee)&&ee.charAt(0)!=="_"&&ee!=="constructor"},F=function(ee){return ee.replace(/([$])/,"\\$")},L=function(ee){for(var O=[ee],pe=Math.max(0,ee-1-3),q=ee-1;q>=pe;--q)O.push(q);for(var q=ee+1;3>=q;++q)O.push(q);return O},A=function(ee){return b.filledRange(ee,"_arg","")},X=function(ee){return b.filledRange(Math.max(ee,3),"_arg","")},he=function(ee){return typeof ee.length=="number"?Math.max(Math.min(ee.length,1024),0):0};y=function(ee,O,pe,q,B,re){function le(se){var ue,we=A(se).join(", "),H=se>0?", ":"";return ue=W?`ret = callback.call(this, {{args}}, nodeback); break; 200`:O===void 0?`ret = callback({{args}}, nodeback); break; 201`:`ret = callback.call(receiver, {{args}}, nodeback); break; 202`,ue.replace("{{args}}",we).replace(", ",H)}function ge(){for(var se="",ue=0;ue<P.length;++ue)se+="case "+P[ue]+":"+le(P[ue]);return se+=` 203 default: 204 var args = new Array(len + 1); 205 var i = 0; 206 for (var i = 0; i < len; ++i) { 207 args[i] = arguments[i]; 208 } 209 args[i] = nodeback; 210 [CodeForCall] 211 break; 212 `.replace("[CodeForCall]",W?`ret = callback.apply(this, args); 213`:`ret = callback.apply(receiver, args); 214`)}var ie=Math.max(0,he(q)-1),P=L(ie),W=typeof ee=="string"||O===g,te=typeof ee=="string"?"this != null ? this['"+ee+"'] : fn":"fn",Y=`'use strict'; 215 var ret = function (Parameters) { 216 'use strict'; 217 var len = arguments.length; 218 var promise = new Promise(INTERNAL); 219 promise._captureStackTrace(); 220 var nodeback = nodebackForPromise(promise, `+re+`); 221 var ret; 222 var callback = tryCatch([GetFunctionCode]); 223 switch(len) { 224 [CodeForSwitchCase] 225 } 226 if (ret === errorObj) { 227 promise._rejectCallback(maybeWrapAsError(ret.e), true, true); 228 } 229 if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); 230 return promise; 231 }; 232 notEnumerableProp(ret, '__isPromisified__', true); 233 return ret; 234 `.replace("[CodeForSwitchCase]",ge()).replace("[GetFunctionCode]",te);return Y=Y.replace("Parameters",X(ie)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",Y)(i,q,O,x,w,v,b.tryCatch,b.errorObj,b.notEnumerableProp,a)};var j=_?y:h;i.promisify=function(ee,O){if(typeof ee!="function")throw new T("expecting a function but got "+b.classString(ee));if(c(ee))return ee;O=Object(O);var pe=O.context===void 0?g:O.context,q=!!O.multiArgs,B=p(ee,pe,q);return b.copyDescriptors(ee,B,o),B},i.promisifyAll=function(ee,O){if(typeof ee!="function"&&typeof ee!="object")throw new T(`the target of promisifyAll must be an object or a function 235 236 See http://goo.gl/MqrFmX 237`);O=Object(O);var pe=!!O.multiArgs,q=O.suffix;typeof q!="string"&&(q=S);var B=O.filter;typeof B!="function"&&(B=M);var re=O.promisifier;if(typeof re!="function"&&(re=j),!b.isIdentifier(q))throw new RangeError(`suffix must be a valid identifier 238 239 See http://goo.gl/MqrFmX 240`);for(var le=b.inheritedDataKeys(ee),ge=0;ge<le.length;++ge){var ie=ee[le[ge]];le[ge]!=="constructor"&&b.isClass(ie)&&(f(ie.prototype,q,B,re,pe),f(ie,q,B,re,pe))}return f(ee,q,B,re,pe)}}},{"./errors":58,"./nodeback":66,"./util":82}],71:[function(t,n,r){n.exports=function(i,a,o,c){function l(b){var v,x=!1;if(d!==void 0&&b instanceof d)v=y(b),x=!0;else{var w=p.keys(b),_=w.length;v=new Array(2*_);for(var T=0;_>T;++T){var S=w[T];v[T]=b[S],v[T+_]=S}}this.constructor$(v),this._isMap=x,this._init$(void 0,-3)}function u(b){var v,x=o(b);return f(x)?(v=x instanceof i?x._then(i.props,void 0,void 0,void 0,void 0):new l(x).promise(),x instanceof i&&v._propagateFrom(x,2),v):c(`cannot await properties of a non-object 241 242 See http://goo.gl/MqrFmX 243`)}
243var d,h=t("./util"),f=h.isObject,p=t("./es5");typeof Map=="function"&&(d=Map);var y=(function(){function b(w,_){this[v]=w,this[v+x]=_,v++}var v=0,x=0;return function(w){x=w.size,v=0;var _=new Array(2*w.size);return w.forEach(b,_),_}})(),g=function(b){for(var v=new d,x=b.length/2|0,w=0;x>w;++w){var _=b[x+w],T=b[w];v.set(_,T)}return v};h.inherits(l,a),l.prototype._init=function(){},l.prototype._promiseFulfilled=function(b,v){this._values[v]=b;var x=++this._totalResolved;if(x>=this._length){var w;if(this._isMap)w=g(this._values);else{w={};for(var _=this.length(),T=0,S=this.length();S>T;++T)w[this._values[T+_]]=this._values[T]}return this._resolve(w),!0}return!1},l.prototype.shouldCopyValues=function(){return!1},l.prototype.getActualLength=function(b){return b>>1},i.prototype.props=function(){return u(this)},i.props=function(b){return u(b)}}},{"./es5":59,"./util":82}],72:[function(t,n,r){function i(o,c,l,u,d){for(var h=0;d>h;++h)l[h+u]=o[h+c],o[h+c]=void 0}function a(o){this._capacity=o,this._length=0,this._front=0}a.prototype._willBeOverCapacity=function(o){return this._capacity<o},a.prototype._pushOne=function(o){var c=this.length();this._checkCapacity(c+1);var l=this._front+c&this._capacity-1;this[l]=o,this._length=c+1},a.prototype.push=function(o,c,l){var u=this.length()+3;if(this._willBeOverCapacity(u))return this._pushOne(o),this._pushOne(c),void this._pushOne(l);var d=this._front+u-3;this._checkCapacity(u);var h=this._capacity-1;this[d+0&h]=o,this[d+1&h]=c,this[d+2&h]=l,this._length=u},a.prototype.shift=function(){var o=this._front,c=this[o];return this[o]=void 0,this._front=o+1&this._capacity-1,this._length--,c},a.prototype.length=function(){return this._length},a.prototype._checkCapacity=function(o){this._capacity<o&&this._resizeTo(this._capacity<<1)},a.prototype._resizeTo=function(o){var c=this._capacity;this._capacity=o;var l=this._front,u=this._length,d=l+u&c-1;i(this,0,this,c,d)},n.exports=a},{}],73:[function(t,n,r){n.exports=function(i,a,o,c){function l(h,f){var p=o(h);if(p instanceof i)return d(p);if(h=u.asArray(h),h===null)return c("expecting an array or an iterable object but got "+u.classString(h));var y=new i(a);f!==void 0&&y._propagateFrom(f,3);for(var g=y._fulfill,b=y._reject,v=0,x=h.length;x>v;++v){var w=h[v];(w!==void 0||v in h)&&i.cast(w)._then(g,b,void 0,y,null)}return y}var u=t("./util"),d=function(h){return h.then(function(f){return l(f,h)})};i.race=function(h){return l(h,void 0)},i.prototype.race=function(){return l(this,void 0)}}},{"./util":82}],74:[function(t,n,r){n.exports=function(i,a,o,c,l,u){function d(x,w,_,T){this.constructor$(x);var S=g();this._fn=S===null?w:b.domainBind(S,w),_!==void 0&&(_=i.resolve(_),_._attachCancellationCallback(this)),this._initialValue=_,this._currentCancellable=null,T===l?this._eachValues=Array(this._length):T===0?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function h(x,w){this.isFulfilled()?w._resolve(x):w._reject(x)}function f(x,w,_,T){if(typeof w!="function")return o("expecting a function but got "+b.classString(w));var S=new d(x,w,_,T);return S.promise()}function p(x){this.accum=x,this.array._gotAccum(x);var w=c(this.value,this.array._promise);return w instanceof i?(this.array._currentCancellable=w,w._then(y,void 0,void 0,this,void 0)):y.call(this,w)}function y(x){var w=this.array,_=w._promise,T=v(w._fn);_._pushContext();var S;S=w._eachValues!==void 0?T.call(_._boundValue(),x,this.index,this.length):T.call(_._boundValue(),this.accum,x,this.index,this.length),S instanceof i&&(w._currentCancellable=S);var C=_._popContext();return u.checkForgottenReturns(S,C,w._eachValues!==void 0?"Promise.each":"Promise.reduce",_),S}var g=i._getDomain,b=t("./util"),v=b.tryCatch;b.inherits(d,a),d.prototype._gotAccum=function(x){this._eachValues!==void 0&&this._eachValues!==null&&x!==l&&this._eachValues.push(x)},d.prototype._eachComplete=function(x){return this._eachValues!==null&&this._eachValues.push(x),this._eachValues},d.prototype._init=function(){},d.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},d.prototype.shouldCopyValues=function(){return!1},d.prototype._resolve=function(x){this._promise._resolveCallback(x),this._values=null},d.prototype._resultCancelled=function(x){return x===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof i&&this._currentCancellable.cancel(),this._initialValue instanceof i&&this._initialValue.cancel()))},d.prototype._iterate=function(x){this._values=x;var w,_,T=x.length;if(this._initialValue!==void 0?(w=this._initialValue,_=0):(w=i.resolve(x[0]),_=1),this._currentCancellable=w,!w.isRejected())for(;T>_;++_){var S={accum:null,value:x[_],index:_,length:T,array:this};w=w._then(p,void 0,void 0,S,void 0)}this._eachValues!==void 0&&(w=w._then(this._eachComplete,void 0,void 0,this,void 0)),w._then(h,h,void 0,w,this)},i.prototype.reduce=function(x,w){return f(this,x,w,null)},i.reduce=function(x,w,_,T){return f(x,w,_,T)}}},{"./util":82}],75:[function(t,n,r){(function(i,a){var o,c=t("./util"),l=function(){throw new Error(`No async scheduler available 244 245 See http://goo.gl/MqrFmX 246`)},u=c.getNativePromise();if(c.isNode&&typeof MutationObserver>"u"){var d=a.setImmediate,h=i.nextTick;o=c.isRecentNode?function(p){d.call(a,p)}:function(p){h.call(i,p)}}else if(typeof u=="function"&&typeof u.resolve=="function"){var f=u.resolve();o=function(p){f.then(p)}}else o=typeof MutationObserver>"u"||typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)?typeof setImmediate<"u"?function(p){setImmediate(p)}:typeof setTimeout<"u"?function(p){setTimeout(p,0)}:l:(function(){var p=document.createElement("div"),y={attributes:!0},g=!1,b=document.createElement("div"),v=new MutationObserver(function(){p.classList.toggle("foo"),g=!1});v.observe(b,y);var x=function(){g||(g=!0,b.classList.toggle("foo"))};return function(w){var _=new MutationObserver(function(){_.disconnect(),w()});_.observe(p,y),x()}})();n.exports=o}).call(this,t("_process"),typeof co<"u"?co:typeof self<"u"?self:typeof window<"u"?window:{})},{"./util":82,_process:101}],76:[function(t,n,r){n.exports=function(i,a,o){function c(d){this.constructor$(d)}var l=i.PromiseInspection,u=t("./util");u.inherits(c,a),c.prototype._promiseResolved=function(d,h){this._values[d]=h;var f=++this._totalResolved;return f>=this._length?(this._resolve(this._values),!0):!1},c.prototype._promiseFulfilled=function(d,h){var f=new l;return f._bitField=33554432,f._settledValueField=d,this._promiseResolved(h,f)}
246,c.prototype._promiseRejected=function(d,h){var f=new l;return f._bitField=16777216,f._settledValueField=d,this._promiseResolved(h,f)},i.settle=function(d){return o.deprecated(".settle()",".reflect()"),new c(d).promise()},i.prototype.settle=function(){return i.settle(this)}}},{"./util":82}],77:[function(t,n,r){n.exports=function(i,a,o){function c(y){this.constructor$(y),this._howMany=0,this._unwrap=!1,this._initialized=!1}function l(y,g){if((0|g)!==g||0>g)return o(`expecting a positive integer 247 248 See http://goo.gl/MqrFmX 249`);var b=new c(y),v=b.promise();return b.setHowMany(g),b.init(),v}var u=t("./util"),d=t("./errors").RangeError,h=t("./errors").AggregateError,f=u.isArray,p={};u.inherits(c,a),c.prototype._init=function(){if(this._initialized){if(this._howMany===0)return void this._resolve([]);this._init$(void 0,-5);var y=f(this._values);!this._isResolved()&&y&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(y){this._howMany=y},c.prototype._promiseFulfilled=function(y){return this._addFulfilled(y),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1}
249,c.prototype._promiseRejected=function(y){return this._addRejected(y),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof i||this._values==null?this._cancel():(this._addRejected(p),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var y=new h,g=this.length();g<this._values.length;++g)this._values[g]!==p&&y.push(this._values[g]);return y.length>0?this._reject(y):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(y){this._values.push(y)},c.prototype._addFulfilled=function(y){this._values[this._totalResolved++]=y},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(y){var g="Input array must contain at least "+this._howMany+" items but contains only "+y+" items";return new d(g)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},i.some=function(y,g){return l(y,g)},i.prototype.some=function(y){return l(this,y)},i._SomePromiseArray=c}},{"./errors":58,"./util":82}],78:[function(t,n,r){n.exports=function(i){function a(f){f!==void 0?(f=f._target(),this._bitField=f._bitField,this._settledValueField=f._isFateSealed()?f._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}a.prototype._settledValue=function(){return this._settledValueField};var o=a.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(`cannot get fulfillment value of a non-fulfilled promise 250 251 See http://goo.gl/MqrFmX 252`);return this._settledValue()},c=a.prototype.error=a.prototype.reason=function(){if(!this.isRejected())throw new TypeError(`cannot get rejection reason of a non-rejected promise 253 254 See http://goo.gl/MqrFmX 255`);return this._settledValue()},l=a.prototype.isFulfilled=function(){return(33554432&this._bitField)!==0},u=a.prototype.isRejected=function(){return(16777216&this._bitField)!==0},d=a.prototype.isPending=function(){return(50397184&this._bitField)===0},h=a.prototype.isResolved=function(){return(50331648&this._bitField)!==0};a.prototype.isCancelled=function(){return(8454144&this._bitField)!==0},i.prototype.__isCancelled=function(){return(65536&this._bitField)===65536},i.prototype._isCancelled=function(){return this._target().__isCancelled()},i.prototype.isCancelled=function(){return(8454144&this._target()._bitField)!==0},i.prototype.isPending=function(){return d.call(this._target())},i.prototype.isRejected=function(){return u.call(this._target())},i.prototype.isFulfilled=function(){return l.call(this._target())},i.prototype.isResolved=function(){return h.call(this._target())},i.prototype.value=function(){return o.call(this._target())},i.prototype.reason=function(){var f=this._target();return f._unsetRejectionIsUnhandled(),c.call(f)},i.prototype._value=function(){return this._settledValue()},i.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},i.PromiseInspection=a}},{}],79:[function(t,n,r){n.exports=function(i,a){function o(g,b){if(p(g)){if(g instanceof i)return g;var v=l(g);if(v===f){b&&b._pushContext();var x=i.reject(v.e);return b&&b._popContext(),x}if(typeof v=="function"){if(u(g)){var x=new i(a);return g._then(x._fulfill,x._reject,void 0,x,null),x}return d(g,v,b)}}return g}function c(g){return g.then}function l(g){try{return c(g)}catch(b){return f.e=b,f}}function u(g){try{return y.call(g,"_promise0")}catch{return!1}}function d(g,b,v){function x(D){_&&(_._resolveCallback(D),_=null)}function w(D){_&&(_._rejectCallback(D,S,!0),_=null)}var _=new i(a),T=_;v&&v._pushContext(),_._captureStackTrace(),v&&v._popContext();var S=!0,C=h.tryCatch(b).call(g,x,w);return S=!1,_&&C===f&&(_._rejectCallback(C.e,!0,!0),_=null),T}var h=t("./util"),f=h.errorObj,p=h.isObject,y={}.hasOwnProperty;return o}},{"./util":82}],80:[function(t,n,r){n.exports=function(i,a,o){function c(g){this.handle=g}function l(g){return clearTimeout(this.handle),g}function u(g){throw clearTimeout(this.handle),g}var d=t("./util"),h=i.TimeoutError;c.prototype._resultCancelled=function(){clearTimeout(this.handle)};var f=function(g){return p(+this).thenReturn(g)},p=i.delay=function(g,b){var v,x;return b!==void 0?(v=i.resolve(b)._then(f,null,null,g,void 0),o.cancellation()&&b instanceof i&&v._setOnCancel(b)):(v=new i(a),x=setTimeout(function(){v._fulfill()},+g),o.cancellation()&&v._setOnCancel(new c(x)),v._captureStackTrace()),v._setAsyncGuaranteed(),v};i.prototype.delay=function(g){return p(g,this)};var y=function(g,b,v){var x;x=typeof b!="string"?b instanceof Error?b:new h("operation timed out"):new h(b),d.markAsOriginatingFromRejection(x),g._attachExtraTrace(x),g._reject(x),v!=null&&v.cancel()};i.prototype.timeout=function(g,b){g=+g;var v,x,w=new c(setTimeout(function(){v.isPending()&&y(v,b,x)},g));
255return o.cancellation()?(x=this.then(),v=x._then(l,u,void 0,w,void 0),v._setOnCancel(w)):v=this._then(l,u,void 0,w,void 0),v}}},{"./util":82}],81:[function(t,n,r){n.exports=function(i,a,o,c,l,u){function d(C){setTimeout(function(){throw C},0)}function h(C){var D=o(C);return D!==C&&typeof C._isDisposable=="function"&&typeof C._getDisposer=="function"&&C._isDisposable()&&D._setDisposable(C._getDisposer()),D}function f(C,D){function N(){if(M>=F)return L._fulfill();var A=h(C[M++]);if(A instanceof i&&A._isDisposable()){try{A=o(A._getDisposer().tryDispose(D),C.promise)}catch(X){return d(X)}if(A instanceof i)return A._then(N,d,null,null,null)}N()}var M=0,F=C.length,L=new i(l);return N(),L}function p(C,D,N){this._data=C,this._promise=D,this._context=N}function y(C,D,N){this.constructor$(C,D,N)}function g(C){return p.isDisposer(C)?(this.resources[this.index]._setDisposable(C),C.promise()):C}function b(C){this.length=C,this.promise=null,this[C-1]=null}var v=t("./util"),x=t("./errors").TypeError,w=t("./util").inherits,_=v.errorObj,T=v.tryCatch,S={};p.prototype.data=function(){return this._data},p.prototype.promise=function(){return this._promise},p.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():S},p.prototype.tryDispose=function(C){var D=this.resource(),N=this._context;N!==void 0&&N._pushContext();var M=D!==S?this.doDispose(D,C):null;return N!==void 0&&N._popContext(),this._promise._unsetDisposable(),this._data=null,M},p.isDisposer=function(C){return C!=null&&typeof C.resource=="function"&&typeof C.tryDispose=="function"},w(y,p),y.prototype.doDispose=function(C,D){var N=this.data();return N.call(C,C,D)},b.prototype._resultCancelled=function(){for(var C=this.length,D=0;C>D;++D){var N=this[D];N instanceof i&&N.cancel()}},i.using=function(){var C=arguments.length;if(2>C)return a("you must pass at least 2 arguments to Promise.using");var D=arguments[C-1];if(typeof D!="function")return a("expecting a function but got "+v.classString(D));var N,M=!0;C===2&&Array.isArray(arguments[0])?(N=arguments[0],C=N.length,M=!1):(N=arguments,C--);for(var F=new b(C),L=0;C>L;++L){var A=N[L];if(p.isDisposer(A)){var X=A;A=A.promise(),A._setDisposable(X)}else{var he=o(A);he instanceof i&&(A=he._then(g,null,null,{resources:F,index:L},void 0))}F[L]=A}for(var j=new Array(F.length),L=0;L<j.length;++L)j[L]=i.resolve(F[L]).reflect();var ee=i.all(j).then(function(pe){for(var q=0;q<pe.length;++q){var B=pe[q];if(B.isRejected())return _.e=B.error(),_;if(!B.isFulfilled())return void ee.cancel();pe[q]=B.value()}O._pushContext(),D=T(D);var re=M?D.apply(void 0,pe):D(pe),le=O._popContext();return u.checkForgottenReturns(re,le,"Promise.using",O),re}),O=ee.lastly(function(){var pe=new i.PromiseInspection(ee);return f(F,pe)});return F.promise=O,O._setOnCancel(F),O},i.prototype._setDisposable=function(C){this._bitField=131072|this._bitField,this._disposer=C},i.prototype._isDisposable=function(){return(131072&this._bitField)>0},i.prototype._getDisposer=function(){return this._disposer},i.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},i.prototype.disposer=function(C){if(typeof C=="function")return new y(C,this,c());throw new x}}},{"./errors":58,"./util":82}],82:[function(t,n,r){(function(i,a){function o(){try{var te=j;return j=null,te.apply(this,arguments)}catch(Y){return he.e=Y,he}}function c(te){return j=te,o}function l(te){return te==null||te===!0||te===!1||typeof te=="string"||typeof te=="number"}function u(te){return typeof te=="function"||typeof te=="object"&&te!==null}function d(te){return l(te)?new Error(w(te)):te}function h(te,Y){var se,ue=te.length,we=new Array(ue+1);for(se=0;ue>se;++se)we[se]=te[se];return we[se]=Y,we}function f(te,Y,se){if(!A.isES5)return{}.hasOwnProperty.call(te,Y)?te[Y]:void 0;var ue=Object.getOwnPropertyDescriptor(te,Y);return ue!=null?ue.get==null&&ue.set==null?ue.value:se:void 0}function p(te,Y,se){if(l(te))return te;var ue={value:se,configurable:!0,enumerable:!1,writable:!0};return A.defineProperty(te,Y,ue),te}function y(te){throw te}function g(te){try{if(typeof te=="function"){var Y=A.names(te.prototype),se=A.isES5&&Y.length>1,ue=Y.length>0&&!(Y.length===1&&Y[0]==="constructor"),we=q.test(te+"")&&A.names(te).length>0;if(se||ue||we)return!0}return!1}catch{return!1}}function b(te){return te}function v(te){return B.test(te)}function x(te,Y,se){for(var ue=new Array(te),we=0;te>we;++we)ue[we]=Y+we+se;return ue}function w(te){try{return te+""}
255catch{return"[no string representation]"}}function _(te){return te!==null&&typeof te=="object"&&typeof te.message=="string"&&typeof te.name=="string"}function T(te){try{p(te,"isOperational",!0)}catch{}}function S(te){return te==null?!1:te instanceof Error.__BluebirdErrorTypes__.OperationalError||te.isOperational===!0}function C(te){return _(te)&&A.propertyIsWritable(te,"stack")}function D(te){return{}.toString.call(te)}function N(te,Y,se){for(var ue=A.names(te),we=0;we<ue.length;++we){var H=ue[we];if(se(H))try{A.defineProperty(Y,H,A.getDescriptor(te,H))}catch{}}}function M(te){return P?i.env[te]:void 0}function F(){if(typeof Promise=="function")try{var te=new Promise(function(){});if({}.toString.call(te)==="[object Promise]")return Promise}catch{}}function L(te,Y){return te.bind(Y)}var A=t("./es5"),X=typeof navigator>"u",he={e:{}},j,ee=typeof self<"u"?self:typeof window<"u"?window:typeof a<"u"?a:this!==void 0?this:null,O=function(te,Y){function se(){this.constructor=te,this.constructor$=Y;for(var we in Y.prototype)ue.call(Y.prototype,we)&&we.charAt(we.length-1)!=="$"&&(this[we+"$"]=Y.prototype[we])}var ue={}.hasOwnProperty;return se.prototype=Y.prototype,te.prototype=new se,te.prototype},pe=(function(){var te=[Array.prototype,Object.prototype,Function.prototype],Y=function(we){for(var H=0;H<te.length;++H)if(te[H]===we)return!0;return!1};if(A.isES5){var se=Object.getOwnPropertyNames;return function(we){for(var H=[],_e=Object.create(null);we!=null&&!Y(we);){var K;try{K=se(we)}catch{return H}for(var U=0;U<K.length;++U){var R=K[U];if(!_e[R]){_e[R]=!0;var E=Object.getOwnPropertyDescriptor(we,R);E!=null&&E.get==null&&E.set==null&&H.push(R)}}we=A.getPrototypeOf(we)}return H}}var ue={}.hasOwnProperty;return function(we){if(Y(we))return[];var H=[];e:for(var _e in we)if(ue.call(we,_e))H.push(_e);else{for(var K=0;K<te.length;++K)if(ue.call(te[K],_e))continue e;H.push(_e)}return H}})(),q=/this\s*\.\s*\S+\s*=/,B=/^[a-z$_][a-z$_0-9]*$/i,re=(function(){return"stack"in new Error?function(te){return C(te)?te:new Error(w(te))}:function(te){if(C(te))return te;try{throw new Error(w(te))}catch(Y){return Y}}})(),le=function(te){return A.isArray(te)?te:null};if(typeof Symbol<"u"&&Symbol.iterator){var ge=typeof Array.from=="function"?function(te){return Array.from(te)}:function(te){for(var Y,se=[],ue=te[Symbol.iterator]();!(Y=ue.next()).done;)se.push(Y.value);return se};le=function(te){return A.isArray(te)?te:te!=null&&typeof te[Symbol.iterator]=="function"?ge(te):null}}var ie=typeof i<"u"&&D(i).toLowerCase()==="[object process]",P=typeof i<"u"&&typeof i.env<"u",W={isClass:g,isIdentifier:v,inheritedDataKeys:pe,getDataPropertyOrDefault:f,thrower:y,isArray:A.isArray,asArray:le,notEnumerableProp:p,isPrimitive:l,isObject:u,isError:_,canEvaluate:X,errorObj:he,tryCatch:c,inherits:O,withAppended:h,maybeWrapAsError:d,toFastProperties:b,filledRange:x,toString:w,canAttachTrace:C,ensureErrorObject:re,originatesFromRejection:S,markAsOriginatingFromRejection:T,classString:D,copyDescriptors:N,hasDevTools:typeof chrome<"u"&&chrome&&typeof chrome.loadTimes=="function",isNode:ie,hasEnvVariables:P,env:M,global:ee,getNativePromise:F,domainBind:L};W.isRecentNode=W.isNode&&(function(){var te=i.versions.node.split(".").map(Number);return te[0]===0&&te[1]>10||te[0]>0})(),W.isNode&&W.toFastProperties(i);try{throw new Error}catch(te){W.lastLineError=te}n.exports=W}).call(this,t("_process"),typeof co<"u"?co:typeof self<"u"?self:typeof window<"u"?window:{})},{"./es5":59,_process:101}],83:[function(t,n,r){(function(i){function a(){try{var k=new Uint8Array(1);return k.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},k.foo()===42&&typeof k.subarray=="function"&&k.subarray(1,1).byteLength===0}catch{return!1}}function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(k,I){if(o()<I)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(k=new Uint8Array(I),k.__proto__=l.prototype):(k===null&&(k=new l(I)),k.length=I),k}function l(k,I,$){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(k,I,$);
255if(typeof k=="number"){if(typeof I=="string")throw new Error("If encoding is specified then the first argument must be a string");return f(this,k)}return u(this,k,I,$)}function u(k,I,$,Z){if(typeof I=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&I instanceof ArrayBuffer?g(k,I,$,Z):typeof I=="string"?p(k,I,$):b(k,I)}function d(k){if(typeof k!="number")throw new TypeError('"size" argument must be a number');if(0>k)throw new RangeError('"size" argument must not be negative')}function h(k,I,$,Z){return d(I),0>=I?c(k,I):$!==void 0?typeof Z=="string"?c(k,I).fill($,Z):c(k,I).fill($):c(k,I)}function f(k,I){if(d(I),k=c(k,0>I?0:0|v(I)),!l.TYPED_ARRAY_SUPPORT)for(var $=0;I>$;++$)k[$]=0;return k}function p(k,I,$){if((typeof $!="string"||$==="")&&($="utf8"),!l.isEncoding($))throw new TypeError('"encoding" must be a valid string encoding');var Z=0|w(I,$);k=c(k,Z);var ae=k.write(I,$);return ae!==Z&&(k=k.slice(0,ae)),k}function y(k,I){var $=I.length<0?0:0|v(I.length);k=c(k,$);for(var Z=0;$>Z;Z+=1)k[Z]=255&I[Z];return k}function g(k,I,$,Z){if(I.byteLength,0>$||I.byteLength<$)throw new RangeError("'offset' is out of bounds");if(I.byteLength<$+(Z||0))throw new RangeError("'length' is out of bounds");return I=$===void 0&&Z===void 0?new Uint8Array(I):Z===void 0?new Uint8Array(I,$):new Uint8Array(I,$,Z),l.TYPED_ARRAY_SUPPORT?(k=I,k.__proto__=l.prototype):k=y(k,I),k}function b(k,I){if(l.isBuffer(I)){var $=0|v(I.length);return k=c(k,$),k.length===0||I.copy(k,0,0,$),k}if(I){if(typeof ArrayBuffer<"u"&&I.buffer instanceof ArrayBuffer||"length"in I)return typeof I.length!="number"||U(I.length)?c(k,0):y(k,I);if(I.type==="Buffer"&&Q(I.data))return y(k,I.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(k){if(k>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|k}function x(k){return+k!=k&&(k=0),l.alloc(+k)}function w(k,I){if(l.isBuffer(k))return k.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(k)||k instanceof ArrayBuffer))return k.byteLength;typeof k!="string"&&(k=""+k);var $=k.length;if($===0)return 0;for(var Z=!1;;)switch(I){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":case void 0:return ue(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$;case"hex":return $>>>1;case"base64":return _e(k).length;default:if(Z)return ue(k).length;I=(""+I).toLowerCase(),Z=!0}}function _(k,I,$){var Z=!1;if((I===void 0||0>I)&&(I=0),I>this.length||(($===void 0||$>this.length)&&($=this.length),0>=$)||($>>>=0,I>>>=0,I>=$))return"";for(k||(k="utf8");;)switch(k){case"hex":return pe(this,I,$);case"utf8":case"utf-8":return he(this,I,$);case"ascii":return ee(this,I,$);case"latin1":case"binary":return O(this,I,$);case"base64":return X(this,I,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,I,$);default:if(Z)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),Z=!0}}function T(k,I,$){var Z=k[I];k[I]=k[$],k[$]=Z}function S(k,I,$,Z,ae){if(k.length===0)return-1;if(typeof $=="string"?(Z=$,$=0):$>2147483647?$=2147483647:-2147483648>$&&($=-2147483648),$=+$,isNaN($)&&($=ae?0:k.length-1),0>$&&($=k.length+$),$>=k.length){if(ae)return-1;$=k.length-1}else if(0>$){if(!ae)return-1;$=0}if(typeof I=="string"&&(I=l.from(I,Z)),l.isBuffer(I))return I.length===0?-1:C(k,I,$,Z,ae);if(typeof I=="number")return I=255&I,l.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ae?Uint8Array.prototype.indexOf.call(k,I,$):Uint8Array.prototype.lastIndexOf.call(k,I,$):C(k,[I],$,Z,ae);throw new TypeError("val must be string, number or Buffer")}function C(k,I,$,Z,ae){function ye(Ye,dt){return me===1?Ye[dt]:Ye.readUInt16BE(dt*me)}var me=1,xe=k.length,De=I.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(k.length<2||I.length<2)return-1;me=2,xe/=2,De/=2,$/=2}var Re;if(ae){var Ue=-1;for(Re=$;xe>Re;Re++)if(ye(k,Re)===ye(I,Ue===-1?0:Re-Ue)){if(Ue===-1&&(Ue=Re),Re-Ue+1===De)return Ue*me}else Ue!==-1&&(Re-=Re-Ue),Ue=-1}else for($+De>xe&&($=xe-De),Re=$;Re>=0;Re--){for(var Ke=!0,nt=0;De>nt;nt++)if(ye(k,Re+nt)!==ye(I,nt)){Ke=!1;break}if(Ke)return Re}return-1}function D(k,I,$,Z){$=Number($)||0;var ae=k.length-$;Z?(Z=Number(Z),Z>ae&&(Z=ae)):Z=ae;var ye=I.length;if(ye%2!==0)throw new TypeError("Invalid hex string");Z>ye/2&&(Z=ye/2);for(var me=0;Z>me;++me){var xe=parseInt(I.substr(2*me,2),16);if(isNaN(xe))return me;k[$+me]=xe}return me}function N(k,I,$,Z){return K(ue(I,k.length-$),k,$,Z)}function M(k,I,$,Z){return K(we(I),k,$,Z)}function F(k,I,$,Z){return M(k,I,$,Z)}function L(k,I,$,Z){return K(_e(I),k,$,Z)}function A(k,I,$,Z){return K(H(I,k.length-$),k,$,Z)}function X(k,I,$){return I===0&&$===k.length?R.fromByteArray(k):R.fromByteArray(k.slice(I,$))}function he(k,I,$){$=Math.min(k.length,$);for(var Z=[],ae=I;$>ae;){var ye=k[ae],me=null,xe=ye>239?4:ye>223?3:ye>191?2:1;if($>
255=ae+xe){var De,Re,Ue,Ke;switch(xe){case 1:128>ye&&(me=ye);break;case 2:De=k[ae+1],(192&De)===128&&(Ke=(31&ye)<<6|63&De,Ke>127&&(me=Ke));break;case 3:De=k[ae+1],Re=k[ae+2],(192&De)===128&&(192&Re)===128&&(Ke=(15&ye)<<12|(63&De)<<6|63&Re,Ke>2047&&(55296>Ke||Ke>57343)&&(me=Ke));break;case 4:De=k[ae+1],Re=k[ae+2],Ue=k[ae+3],(192&De)===128&&(192&Re)===128&&(192&Ue)===128&&(Ke=(15&ye)<<18|(63&De)<<12|(63&Re)<<6|63&Ue,Ke>65535&&1114112>Ke&&(me=Ke))}}me===null?(me=65533,xe=1):me>65535&&(me-=65536,Z.push(me>>>10&1023|55296),me=56320|1023&me),Z.push(me),ae+=xe}return j(Z)}function j(k){var I=k.length;if(ce>=I)return String.fromCharCode.apply(String,k);for(var $="",Z=0;I>Z;)$+=String.fromCharCode.apply(String,k.slice(Z,Z+=ce));return $}function ee(k,I,$){var Z="";$=Math.min(k.length,$);for(var ae=I;$>ae;++ae)Z+=String.fromCharCode(127&k[ae]);return Z}function O(k,I,$){var Z="";$=Math.min(k.length,$);for(var ae=I;$>ae;++ae)Z+=String.fromCharCode(k[ae]);return Z}function pe(k,I,$){var Z=k.length;(!I||0>I)&&(I=0),(!$||0>$||$>Z)&&($=Z);for(var ae="",ye=I;$>ye;++ye)ae+=se(k[ye]);return ae}function q(k,I,$){for(var Z=k.slice(I,$),ae="",ye=0;ye<Z.length;ye+=2)ae+=String.fromCharCode(Z[ye]+256*Z[ye+1]);return ae}function B(k,I,$){if(k%1!==0||0>k)throw new RangeError("offset is not uint");if(k+I>$)throw new RangeError("Trying to access beyond buffer length")}function re(k,I,$,Z,ae,ye){if(!l.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(I>ae||ye>I)throw new RangeError('"value" argument is out of bounds');if($+Z>k.length)throw new RangeError("Index out of range")}function le(k,I,$,Z){0>I&&(I=65535+I+1);for(var ae=0,ye=Math.min(k.length-$,2);ye>ae;++ae)k[$+ae]=(I&255<<8*(Z?ae:1-ae))>>>8*(Z?ae:1-ae)}function ge(k,I,$,Z){0>I&&(I=4294967295+I+1);for(var ae=0,ye=Math.min(k.length-$,4);ye>ae;++ae)k[$+ae]=I>>>8*(Z?ae:3-ae)&255}function ie(k,I,$,Z,ae,ye){if($+Z>k.length)throw new RangeError("Index out of range");if(0>$)throw new RangeError("Index out of range")}function P(k,I,$,Z,ae){return ae||ie(k,I,$,4),E.write(k,I,$,Z,23,4),$+4}function W(k,I,$,Z,ae){return ae||ie(k,I,$,8),E.write(k,I,$,Z,52,8),$+8}function te(k){if(k=Y(k).replace(V,""),k.length<2)return"";for(;k.length%4!==0;)k+="=";return k}function Y(k){return k.trim?k.trim():k.replace(/^\s+|\s+$/g,"")}function se(k){return 16>k?"0"+k.toString(16):k.toString(16)}function ue(k,I){I=I||1/0;for(var $,Z=k.length,ae=null,ye=[],me=0;Z>me;++me){if($=k.charCodeAt(me),$>55295&&57344>$){if(!ae){if($>56319){(I-=3)>-1&&ye.push(239,191,189);continue}if(me+1===Z){(I-=3)>-1&&ye.push(239,191,189);continue}ae=$;continue}if(56320>$){(I-=3)>-1&&ye.push(239,191,189),ae=$;continue}$=(ae-55296<<10|$-56320)+65536}else ae&&(I-=3)>-1&&ye.push(239,191,189);if(ae=null,128>$){if((I-=1)<0)break;ye.push($)}else if(2048>$){if((I-=2)<0)break;ye.push($>>6|192,63&$|128)}else if(65536>$){if((I-=3)<0)break;ye.push($>>12|224,$>>6&63|128,63&$|128)}else{if(!(1114112>$))throw new Error("Invalid code point");if((I-=4)<0)break;ye.push($>>18|240,$>>12&63|128,$>>6&63|128,63&$|128)}}return ye}function we(k){for(var I=[],$=0;$<k.length;++$)I.push(255&k.charCodeAt($));return I}function H(k,I){for(var $,Z,ae,ye=[],me=0;me<k.length&&!((I-=2)<0);++me)$=k.charCodeAt(me),Z=$>>8,ae=$%256,ye.push(ae),ye.push(Z);return ye}function _e(k){return R.toByteArray(te(k))}function K(k,I,$,Z){for(var ae=0;Z>ae&&!(ae+$>=I.length||ae>=k.length);++ae)I[ae+$]=k[ae];return ae}function U(k){return k!==k}var R=t("base64-js"),E=t("ieee754"),Q=t("isarray");r.Buffer=l,r.SlowBuffer=x,r.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=i.TYPED_ARRAY_SUPPORT!==void 0?i.TYPED_ARRAY_SUPPORT:a(),r.kMaxLength=o(),l.poolSize=8192,l._augment=function(k){return k.__proto__=l.prototype,k},l.from=function(k,I,$){return u(null,k,I,$)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(k,I,$){return h(null,k,I,$)},l.allocUnsafe=function(k){return f(null,k)},l.allocUnsafeSlow=function(k){return f(null,k)},l.isBuffer=function(k){return!(k==null||!k._isBuffer)},l.compare=function(k,I){if(!l.isBuffer(k)||!l.isBuffer(I))throw new TypeError("Arguments must be Buffers");if(k===I)return 0;for(var $=k.length,Z=I.length,ae=0,ye=Math.min($,Z);ye>ae;++ae)if(k[ae]!==I[ae]){$=k[ae],Z=I[ae];break}return Z>$?-1:$>Z?1:0},l.isEncoding=function(k){switch(String(k).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}},l.concat=function(k,I){if(!Q(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return l.alloc(0);var $;if(I===void 0)for(I=0,$=0;$<k.length;++$)I+=k[$].length;var Z=l.allocUnsafe(I),ae=0;for($=0;$<k.length;++$){var ye=k[$];if(!l.isBuffer(ye))throw new TypeError('"list" argument must be an Array of Buffers');ye.copy(Z,ae),ae+=ye.length}return Z},l.byteLength=w,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var k=this.length;if(k%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var I=0;k>I;I+=2)T(this,I,I+1);return this},l.prototype.swap32=function(){var k=this.length;if(k%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var I=0;k>I;I+=4)T(this,I,I+3),T(this,I+1,I+2);return this},l.prototype.swap64=function(){var k=this.length;if(k%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var I=0;k>I;I+=8)T(this,I,I+7),T(this,I+1,I+6),T(this,I+2,I+5),T(this,I+3,I+4);return this},l.prototype.toString=function(){var k=0|this.length;return k===0?"":arguments.length===0?he(this,0,k):_.apply(this,arguments)},l.prototype.equals=function(k){if(!l.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k?!0:l.compare(this,k)===0},l.prototype.inspect=function(){var k="",I=r.INSPECT_MAX_BYTES;return this.length>0&&(k=this.toString("hex",0,I).match(/.{2}/g).join(" "),this.length>I&&(k+=" ... ")),"<Buffer "+k+">"},l.prototype.compare=function(k,I,$,Z,ae){if(!l.isBuffer(k))throw new TypeError("Argument must be a Buffer");if(I===void 0&&(I=0),$===void 0&&($=k?k.length:0),Z===void 0&&(Z=0),ae===void 0&&(ae=this.length),0>I||$>k.length||0>Z||ae>this.length)throw new RangeError("out of range index");if(Z>=ae&&I>=$)return 0;if(Z>=ae)return-1;if(I>=$)return 1;if(I>>>=0,$>>>=0,Z>>>=0,ae>>>=0,this===k)return 0;for(var ye=ae-Z,me=$-I,xe=Math.min(ye,me),De=this.slice(Z,ae),Re=k.slice(I,$),Ue=0;xe>Ue;++Ue)if(De[Ue]!==Re[Ue]){ye=De[Ue],me=Re[Ue];break}return me>ye?-1:ye>me?1:0},l.prototype.includes=function(k,I,$){return this.indexOf(k,I,$)!==-1},l.prototype.indexOf=function(k,I,$){return S(this,k,I,$,!0)},l.prototype.lastIndexOf=function(k,I,$){return S(this,k,I,$,!1)},l.prototype.write=function(k,I,$,Z){if(I===void 0)Z="utf8",$=this.length,I=0;
vendor: 6,435 bytes, line 255
255else if($===void 0&&typeof I=="string")Z=I,$=this.length,I=0;else{if(!isFinite(I))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");I=0|I,isFinite($)?($=0|$,Z===void 0&&(Z="utf8")):(Z=$,$=void 0)}var ae=this.length-I;if(($===void 0||$>ae)&&($=ae),k.length>0&&(0>$||0>I)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");Z||(Z="utf8");for(var ye=!1;;)switch(Z){case"hex":return D(this,k,I,$);case"utf8":case"utf-8":return N(this,k,I,$);case"ascii":return M(this,k,I,$);case"latin1":case"binary":return F(this,k,I,$);case"base64":return L(this,k,I,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,k,I,$);default:if(ye)throw new TypeError("Unknown encoding: "+Z);Z=(""+Z).toLowerCase(),ye=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ce=4096;l.prototype.slice=function(k,I){var $=this.length;k=~~k,I=I===void 0?$:~~I,0>k?(k+=$,0>k&&(k=0)):k>$&&(k=$),0>I?(I+=$,0>I&&(I=0)):I>$&&(I=$),k>I&&(I=k);var Z;if(l.TYPED_ARRAY_SUPPORT)Z=this.subarray(k,I),Z.__proto__=l.prototype;else{var ae=I-k;Z=new l(ae,void 0);for(var ye=0;ae>ye;++ye)Z[ye]=this[ye+k]}return Z},l.prototype.readUIntLE=function(k,I,$){k=0|k,I=0|I,$||B(k,I,this.length);for(var Z=this[k],ae=1,ye=0;++ye<I&&(ae*=256);)Z+=this[k+ye]*ae;return Z},l.prototype.readUIntBE=function(k,I,$){k=0|k,I=0|I,$||B(k,I,this.length);for(var Z=this[k+--I],ae=1;I>0&&(ae*=256);)Z+=this[k+--I]*ae;return Z},l.prototype.readUInt8=function(k,I){return I||B(k,1,this.length),this[k]},l.prototype.readUInt16LE=function(k,I){return I||B(k,2,this.length),this[k]|this[k+1]<<8},l.prototype.readUInt16BE=function(k,I){return I||B(k,2,this.length),this[k]<<8|this[k+1]},l.prototype.readUInt32LE=function(k,I){return I||B(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+16777216*this[k+3]},l.prototype.readUInt32BE=function(k,I){return I||B(k,4,this.length),16777216*this[k]+(this[k+1]<<16|this[k+2]<<8|this[k+3])},l.prototype.readIntLE=function(k,I,$){k=0|k,I=0|I,$||B(k,I,this.length);for(var Z=this[k],ae=1,ye=0;++ye<I&&(ae*=256);)Z+=this[k+ye]*ae;return ae*=128,Z>=ae&&(Z-=Math.pow(2,8*I)),Z},l.prototype.readIntBE=function(k,I,$){k=0|k,I=0|I,$||B(k,I,this.length);for(var Z=I,ae=1,ye=this[k+--Z];Z>0&&(ae*=256);)ye+=this[k+--Z]*ae;return ae*=128,ye>=ae&&(ye-=Math.pow(2,8*I)),ye},l.prototype.readInt8=function(k,I){return I||B(k,1,this.length),128&this[k]?-1*(255-this[k]+1):this[k]},l.prototype.readInt16LE=function(k,I){I||B(k,2,this.length);var $=this[k]|this[k+1]<<8;return 32768&$?4294901760|$:$},l.prototype.readInt16BE=function(k,I){I||B(k,2,this.length);var $=this[k+1]|this[k]<<8;return 32768&$?4294901760|$:$},l.prototype.readInt32LE=function(k,I){return I||B(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},l.prototype.readInt32BE=function(k,I){return I||B(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},l.prototype.readFloatLE=function(k,I){return I||B(k,4,this.length),E.read(this,k,!0,23,4)},l.prototype.readFloatBE=function(k,I){return I||B(k,4,this.length),E.read(this,k,!1,23,4)},l.prototype.readDoubleLE=function(k,I){return I||B(k,8,this.length),E.read(this,k,!0,52,8)},l.prototype.readDoubleBE=function(k,I){return I||B(k,8,this.length),E.read(this,k,!1,52,8)},l.prototype.writeUIntLE=function(k,I,$,Z){if(k=+k,I=0|I,$=0|$,!Z){var ae=Math.pow(2,8*$)-1;re(this,k,I,$,ae,0)}var ye=1,me=0;for(this[I]=255&k;++me<$&&(ye*=256);)this[I+me]=k/ye&255;return I+$},l.prototype.writeUIntBE=function(k,I,$,Z){if(k=+k,I=0|I,$=0|$,!Z){var ae=Math.pow(2,8*$)-1;re(this,k,I,$,ae,0)}var ye=$-1,me=1;for(this[I+ye]=255&k;--ye>=0&&(me*=256);)this[I+ye]=k/me&255;return I+$},l.prototype.writeUInt8=function(k,I,$){return k=+k,I=0|I,$||re(this,k,I,1,255,0),l.TYPED_ARRAY_SUPPORT||(k=Math.floor(k)),this[I]=255&k,I+1},l.prototype.writeUInt16LE=function(k,I,$){return k=+k,I=0|I,$||re(this,k,I,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[I]=255&k,this[I+1]=k>>>8):le(this,k,I,!0),I+2},l.prototype.writeUInt16BE=function(k,I,$){return k=+k,I=0|I,$||re(this,k,I,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[I]=k>>>8,this[I+1]=255&k):le(this,k,I,!1),I+2},l.prototype.writeUInt32LE=function(k,I,$){return k=+k,I=0|I,$||re(this,k,I,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[I+3]=k>>>24,this[I+2]=k>>>16,this[I+1]=k>>>8,this[I]=255&k):ge(this,k,I,!0),I+4},l.prototype.writeUInt32BE=function(k,I,$){return k=+k,I=0|I,$||re(this,k,I,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[I]=k>>>24,this[I+1]=k>>>16,this[I+2]=k>>>8,this[I+3]=255&k):ge(this,k,I,!1),I+4},l.prototype.writeIntLE=function(k,I,$,Z){if(k=+k,I=0|I,!Z){var ae=Math.pow(2,8*$-1);re(this,k,I,$,ae-1,-ae)}var ye=0,me=1,xe=0;for(this[I]=255&k;++ye<$&&(me*=256);)0>k&&xe===0&&this[I+ye-1]!==0&&(xe=1),this[I+ye]=(k/me>>0)-xe&255;return I+$},l.prototype.writeIntBE=function(k,I,$,Z){if(k=+k,I=0|I,!Z){var ae=Math.pow(2,8*$-1);re(this,k,I,$,ae-1,-ae)}var ye=$-1,me=1,xe=0;for(this[I+ye]=255&k;--ye>=0&&(me*=256);)0>k&&xe===0&&this[I+ye+1]!==0&&(xe=1),this[I+ye]=(k/me>>0)-xe&255;return I+$},l.prototype.writeInt8=function(k,I,$){return k=+k,I=0|I,$||re(this,k,I,1,127,-128),l.TYPED_ARRAY_SUPPORT||(k=Math.floor(k)),0>k&&(k=255+k+1),this[I]=255&k,I+1},l.prototype.writeInt16LE=function(k,I,$){return k=+k,I=0|I,$||re(this,k,I,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[I]=255&k,this[I+1]=k>>>8):le(this,k,I,!0),I+2},l.prototype.writeInt16BE=function(k,I,$){return k=+k,I=0|I,$||re(this,k,I,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[I]=k>>>8,this[I+1]=255&k):le(this,k,I,!1),I+2},l.prototype.writeInt32LE=function(k,I,$){return k=+k,I=0|I,$||re(this,k,I,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[I]=255&k,this[I+1]=k>>>8,this[I+2]=k>>>16,this[I+3]=k>>>24):ge(this,k,I,!0),I+4},l.prototype.writeInt32BE=function(k,I,$){return k=+k,I=0|I,$||re(this,k,I,4,2147483647,-2147483648),0>k&&(k=4294967295+k+1),l.TYPED_ARRAY_SUPPORT?(this[I]=k>>>24,this[I+1]=k>>>16,this[I+2]=k>>>8,this[I+3]=255&k):ge(this,k,I,!1),I+4},l.prototype.writeFloatLE=function(k,I,$){return P(this,k,I,!0,$)},l.prototype.writeFloatBE=function(k,I,$){return P(this,k,I,!1,$)},l.prototype.writeDoubleLE=function(k,I,$){return W(this,k,I,!0,$)},l.prototype.writeDoubleBE=function(k,I,$){return W(this,k,I,!1,$)},l.prototype.copy=function(k,I,$,Z){if($||($=0),Z||Z===0||(Z=this.length),I>=k.length&&(I=k.length),I||(I=0),Z>0&&$>Z&&(Z=$),Z===$||k.length===0||this.length===0)return 0;if(0>
255I)throw new RangeError("targetStart out of bounds");if(0>$||$>=this.length)throw new RangeError("sourceStart out of bounds");if(0>Z)throw new RangeError("sourceEnd out of bounds");Z>this.length&&(Z=this.length),k.length-I<Z-$&&(Z=k.length-I+$);var ae,ye=Z-$;if(this===k&&I>$&&Z>I)for(ae=ye-1;ae>=0;--ae)k[ae+I]=this[ae+$];else if(1e3>ye||!l.TYPED_ARRAY_SUPPORT)for(ae=0;ye>ae;++ae)k[ae+I]=this[ae+$];else Uint8Array.prototype.set.call(k,this.subarray($,$+ye),I);return ye},l.prototype.fill=function(k,I,$,Z){if(typeof k=="string"){if(typeof I=="string"?(Z=I,I=0,$=this.length):typeof $=="string"&&(Z=$,$=this.length),k.length===1){var ae=k.charCodeAt(0);256>ae&&(k=ae)}if(Z!==void 0&&typeof Z!="string")throw new TypeError("encoding must be a string");if(typeof Z=="string"&&!l.isEncoding(Z))throw new TypeError("Unknown encoding: "+Z)}else typeof k=="number"&&(k=255&k);if(0>I||this.length<I||this.length<$)throw new RangeError("Out of range index");if(I>=$)return this;I>>>=0,$=$===void 0?this.length:$>>>0,k||(k=0);var ye;if(typeof k=="number")for(ye=I;$>ye;++ye)this[ye]=k;else{var me=l.isBuffer(k)?k:ue(new l(k,Z).toString()),xe=me.length;for(ye=0;$-I>ye;++ye)this[ye+I]=me[ye%xe]}return this};var V=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof co<"u"?co:typeof self<"u"?self:typeof window<"u"?window:{})},{"base64-js":47,ieee754:86,isarray:87}],84:[function(t,n,r){Object.defineProperty(r,"__esModule",{value:!0});var i
vendor: 119,105 bytes, line 255
255=[{"Typeface name":"Symbol","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Symbol","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"33","Unicode hex":"21"},{"Typeface name":"Symbol","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"8704","Unicode hex":"2200"},{"Typeface name":"Symbol","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"35","Unicode hex":"23"},{"Typeface name":"Symbol","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"8707","Unicode hex":"2203"},{"Typeface name":"Symbol","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"37","Unicode hex":"25"},{"Typeface name":"Symbol","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"38","Unicode hex":"26"},{"Typeface name":"Symbol","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"8717","Unicode hex":"220D"},{"Typeface name":"Symbol","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"40","Unicode hex":"28"},{"Typeface name":"Symbol","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"41","Unicode hex":"29"},{"Typeface name":"Symbol","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"42","Unicode hex":"2A"},{"Typeface name":"Symbol","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"43","Unicode hex":"2B"},{"Typeface name":"Symbol","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"44","Unicode hex":"2C"},{"Typeface name":"Symbol","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"8722","Unicode hex":"2212"},{"Typeface name":"Symbol","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"46","Unicode hex":"2E"},{"Typeface name":"Symbol","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"47","Unicode hex":"2F"},{"Typeface name":"Symbol","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"48","Unicode hex":"30"},{"Typeface name":"Symbol","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"49","Unicode hex":"31"},{"Typeface name":"Symbol","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"50","Unicode hex":"32"},{"Typeface name":"Symbol","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"51","Unicode hex":"33"},{"Typeface name":"Symbol","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"52","Unicode hex":"34"},{"Typeface name":"Symbol","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"53","Unicode hex":"35"},{"Typeface name":"Symbol","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"54","Unicode hex":"36"},{"Typeface name":"Symbol","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"55","Unicode hex":"37"},{"Typeface name":"Symbol","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"56","Unicode hex":"38"},{"Typeface name":"Symbol","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"57","Unicode hex":"39"},{"Typeface name":"Symbol","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"58","Unicode hex":"3A"},{"Typeface name":"Symbol","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"59","Unicode hex":"3B"},{"Typeface name":"Symbol","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"60","Unicode hex":"3C"},{"Typeface name":"Symbol","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"61","Unicode hex":"3D"},{"Typeface name":"Symbol","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"62","Unicode hex":"3E"},{"Typeface name":"Symbol","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"63","Unicode hex":"3F"},{"Typeface name":"Symbol","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"8773","Unicode hex":"2245"},{"Typeface name":"Symbol","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"913","Unicode hex":"391"},{"Typeface name":"Symbol","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"914","Unicode hex":"392"},{"Typeface name":"Symbol","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"935","Unicode hex":"3A7"},{"Typeface name":"Symbol","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"916","Unicode hex":"394"},{"Typeface name":"Symbol","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"917","Unicode hex":"395"},{"Typeface name":"Symbol","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"934","Unicode hex":"3A6"},{"Typeface name":"Symbol","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"915","Unicode hex":"393"},{"Typeface name":"Symbol","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"919","Unicode hex":"397"},{"Typeface name":"Symbol","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"921","Unicode hex":"399"},{"Typeface name":"Symbol","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"977","Unicode hex":"3D1"},{"Typeface name":"Symbol","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"922","Unicode hex":"39A"},{"Typeface name":"Symbol","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"923","Unicode hex":"39B"},{"Typeface name":"Symbol","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"924","Unicode hex":"39C"},{"Typeface name":"Symbol","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"925","Unicode hex":"39D"},{"Typeface name":"Symbol","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"927","Unicode hex":"39F"},{"Typeface name":"Symbol","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"928","Unicode hex":"3A0"},{"Typeface name":"Symbol","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"920","Unicode hex":"398"},{"Typeface name":"Symbol","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"929","Unicode hex":"3A1"},{"Typeface name":"Symbol","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"931","Unicode hex":"3A3"},{"Typeface name":"Symbol","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"932","Unicode hex":"3A4"},{"Typeface name":"Symbol","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"933","Unicode hex":"3A5"},{"Typeface name":"Symbol","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"962","Unicode hex":"3C2"},{"Typeface name":"Symbol","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"937","Unicode hex":"3A9"},{"Typeface name":"Symbol","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"926","Unicode hex":"39E"},{"Typeface name":"Symbol","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"936","Unicode hex":"3A8"},{"Typeface name":"Symbol","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"918","Unicode hex":"396"},{"Typeface name":"Symbol","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"91","Unicode hex":"5B"},{"Typeface name":"Symbol","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"8756","Unicode hex":"2234"},{"Typeface name":"Symbol","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"93","Unicode hex":"5D"},{"Typeface name":"Symbol","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"8869","Unicode hex":"22A5"},{"Typeface name":"Symbol","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"95","Unicode hex":"5F"},{"Typeface name":"Symbol","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"8254","Unicode hex":"203E"},{"Typeface name":"Symbol","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"945","Unicode hex":"3B1"},{"Typeface name":"Symbol","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"946","Unicode hex":"3B2"},{"Typeface name":"Symbol","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"967","Unicode hex":"3C7"},{"Typeface name":"Symbol","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"948","Unicode hex":"3B4"},{"Typeface name":"Symbol","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"949","Unicode hex":"3B5"},{"Typeface name":"Symbol","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"966","Unicode hex":"3C6"},{"Typeface name":"Symbol","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"947","Unicode hex":"3B3"},{"Typeface name":"Symbol","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"951","Unicode hex":"3B7"},{"Typeface name":"Symbol","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"953","Unicode hex":"3B9"},{"Typeface name":"Symbol","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"981","Unicode hex":"3D5"},{"Typeface name":"Symbol","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"954","Unicode hex":"3BA"},{"Typeface name":"Symbol","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"955","Unicode hex":"3BB"},{"Typeface name":"Symbol","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"956","Unicode hex":"3BC"},{"Typeface name":"Symbol","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"957","Unicode hex":"3BD"},{"Typeface name":"Symbol","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"959","Unicode hex":"3BF"},{"Typeface name":"Symbol","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"960","Unicode hex":"3C0"},{"Typeface name":"Symbol","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"952","Unicode hex":"3B8"},{"Typeface name":"Symbol","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"961","Unicode hex":"3C1"},{"Typeface name":"Symbol","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"963","Unicode hex":"3C3"},{"Typeface name":"Symbol","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"964","Unicode hex":"3C4"},{"Typeface name":"Symbol","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"965","Unicode hex":"3C5"},{"Typeface name":"Symbol","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"982","Unicode hex":"3D6"},{"Typeface name":"Symbol","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"969","Unicode hex":"3C9"},{"Typeface name":"Symbol","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"958","Unicode hex":"3BE"},{"Typeface name":"Symbol","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"968","Unicode hex":"3C8"},{"Typeface name":"Symbol","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"950","Unicode hex":"3B6"},{"Typeface name":"Symbol","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"123","Unicode hex":"7B"},{"Typeface name":"Symbol","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"124","Unicode hex":"7C"},{"Typeface name":"Symbol","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"125","Unicode hex":"7D"},{"Typeface name":"Symbol","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"126","Unicode hex":"7E"},{"Typeface name":"Symbol","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"8364","Unicode hex":"20AC"},{"Typeface name":"Symbol","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"978","Unicode hex":"3D2"},{"Typeface name":"Symbol","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"8242","Unicode hex":"2032"},{"Typeface name":"Symbol","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"8804","Unicode hex":"2264"},{"Typeface name":"Symbol","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"8260","Unicode hex":"2044"},{"Typeface name":"Symbol","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"8734","Unicode hex":"221E"},{"Typeface name":"Symbol","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"402","Unicode hex":"192"},{"Typeface name":"Symbol","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"9827","Unicode hex":"2663"},{"Typeface name":"Symbol","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"9830","Unicode hex":"2666"},{"Typeface name":"Symbol","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"9829","Unicode hex":"2665"},{"Typeface name":"Symbol","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"9824","Unicode hex":"2660"},{"Typeface name":"Symbol","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"8596","Unicode hex":"2194"},{"Typeface name":"Symbol","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"8592","Unicode hex":"2190"},{"Typeface name":"Symbol","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"8593","Unicode hex":"2191"},{"Typeface name":"Symbol","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"8594","Unicode hex":"2192"},{"Typeface name":"Symbol","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"8595","Unicode hex":"2193"},{"Typeface name":"Symbol","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"176","Unicode hex":"B0"},{"Typeface name":"Symbol","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"177","Unicode hex":"B1"},{"Typeface name":"Symbol","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"8243","Unicode hex":"2033"},{"Typeface name":"Symbol","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"8805","Unicode hex":"2265"},{"Typeface name":"Symbol","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"215","Unicode hex":"D7"},{"Typeface name":"Symbol","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"8733","Unicode hex":"221D"},{"Typeface name":"Symbol","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"8706","Unicode hex":"2202"},{"Typeface name":"Symbol","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"8226","Unicode hex":"2022"},{"Typeface name":"Symbol","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"247","Unicode hex":"F7"},{"Typeface name":"Symbol","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"8800","Unicode hex":"2260"},{"Typeface name":"Symbol","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"8801","Unicode hex":"2261"},{"Typeface name":"Symbol","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"8776","Unicode hex":"2248"},{"Typeface name":"Symbol","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"8230","Unicode hex":"2026"},{"Typeface name":"Symbol","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"9168","Unicode hex":"23D0"},{"Typeface name":"Symbol","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"9135","Unicode hex":"23AF"},{"Typeface name":"Symbol","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"8629","Unicode hex":"21B5"},{"Typeface name":"Symbol","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"8501","Unicode hex":"2135"},{"Typeface name":"Symbol","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"8465","Unicode hex":"2111"},{"Typeface name":"Symbol","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"8476","Unicode hex":"211C"},{"Typeface name":"Symbol","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"8472","Unicode hex":"2118"},{"Typeface name":"Symbol","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"8855","Unicode hex":"2297"},{"Typeface name":"Symbol","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"8853","Unicode hex":"2295"},{"Typeface name":"Symbol","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"8709","Unicode hex":"2205"},{"Typeface name":"Symbol","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"8745","Unicode hex":"2229"},{"Typeface name":"Symbol","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"8746","Unicode hex":"222A"},{"Typeface name":"Symbol","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"8835","Unicode hex":"2283"},{"Typeface name":"Symbol","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"8839","Unicode hex":"2287"},{"Typeface name":"Symbol","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"8836","Unicode hex":"2284"},{"Typeface name":"Symbol","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"8834","Unicode hex":"2282"},{"Typeface name":"Symbol","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"8838","Unicode hex":"2286"},{"Typeface name":"Symbol","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"8712","Unicode hex":"2208"},{"Typeface name":"Symbol","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"8713","Unicode hex":"2209"},{"Typeface name":"Symbol","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"8736","Unicode hex":"2220"},{"Typeface name":"Symbol","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"8711","Unicode hex":"2207"},{"Typeface name":"Symbol","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"174","Unicode hex":"AE"},{"Typeface name":"Symbol","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"169","Unicode hex":"A9"},{"Typeface name":"Symbol","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"8482","Unicode hex":"2122"},{"Typeface name":"Symbol","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"8719","Unicode hex":"220F"},{"Typeface name":"Symbol","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"8730","Unicode hex":"221A"},{"Typeface name":"Symbol","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"8901","Unicode hex":"22C5"},{"Typeface name":"Symbol","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"172","Unicode hex":"AC"},{"Typeface name":"Symbol","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"8743","Unicode hex":"2227"},{"Typeface name":"Symbol","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"8744","Unicode hex":"2228"},{"Typeface name":"Symbol","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"8660","Unicode hex":"21D4"},{"Typeface name":"Symbol","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"8656","Unicode hex":"21D0"},{"Typeface name":"Symbol","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"8657","Unicode hex":"21D1"},{"Typeface name":"Symbol","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"8658","Unicode hex":"21D2"},{"Typeface name":"Symbol","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"8659","Unicode hex":"21D3"},{"Typeface name":"Symbol","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"9674","Unicode hex":"25CA"},{"Typeface name":"Symbol","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"12296","Unicode hex":"3008"},{"Typeface name":"Symbol","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"174","Unicode hex":"AE"},{"Typeface name":"Symbol","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"169","Unicode hex":"A9"},{"Typeface name":"Symbol","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"8482","Unicode hex":"2122"},{"Typeface name":"Symbol","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"8721","Unicode hex":"2211"},{"Typeface name":"Symbol","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"9115","Unicode hex":"239B"},{"Typeface name":"Symbol","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"9116","Unicode hex":"239C"},{"Typeface name":"Symbol","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"9117","Unicode hex":"239D"},{"Typeface name":"Symbol","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"9121","Unicode hex":"23A1"},{"Typeface name":"Symbol","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"9122","Unicode hex":"23A2"},{"Typeface name":"Symbol","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"9123","Unicode hex":"23A3"},{"Typeface name":"Symbol","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"9127","Unicode hex":"23A7"},{"Typeface name":"Symbol","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"9128","Unicode hex":"23A8"},{"Typeface name":"Symbol","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"9129","Unicode hex":"23A9"},{"Typeface name":"Symbol","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"9130","Unicode hex":"23AA"},{"Typeface name":"Symbol","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"63743","Unicode hex":"F8FF"},{"Typeface name":"Symbol","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"12297","Unicode hex":"3009"},{"Typeface name":"Symbol","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"8747","Unicode hex":"222B"},{"Typeface name":"Symbol","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"8992","Unicode hex":"2320"},{"Typeface name":"Symbol","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"9134","Unicode hex":"23AE"},{"Typeface name":"Symbol","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"8993","Unicode hex":"2321"},{"Typeface name":"Symbol","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"9118","Unicode hex":"239E"},{"Typeface name":"Symbol","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"9119","Unicode hex":"239F"},{"Typeface name":"Symbol","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"9120","Unicode hex":"23A0"},{"Typeface name":"Symbol","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"9124","Unicode hex":"23A4"},{"Typeface name":"Symbol","Dingbat dec":"250","Dingbat hex":"FA","Unicode dec":"9125","Unicode hex":"23A5"},{"Typeface name":"Symbol","Dingbat dec":"251","Dingbat hex":"FB","Unicode dec":"9126","Unicode hex":"23A6"},{"Typeface name":"Symbol","Dingbat dec":"252","Dingbat hex":"FC","Unicode dec":"9131","Unicode hex":"23AB"},{"Typeface name":"Symbol","Dingbat dec":"253","Dingbat hex":"FD","Unicode dec":"9132","Unicode hex":"23AC"},{"Typeface name":"Symbol","Dingbat dec":"254","Dingbat hex":"FE","Unicode dec":"9133","Unicode hex":"23AD"},{"Typeface name":"Webdings","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Webdings","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"128375","Unicode hex":"1F577"},{"Typeface name":"Webdings","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"128376","Unicode hex":"1F578"},{"Typeface name":"Webdings","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"128370","Unicode hex":"1F572"},{"Typeface name":"Webdings","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"128374","Unicode hex":"1F576"},{"Typeface name":"Webdings","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"127942","Unicode hex":"1F3C6"},{"Typeface name":"Webdings","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"127894","Unicode hex":"1F396"},{"Typeface name":"Webdings","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"128391","Unicode hex":"1F587"},{"Typeface name":"Webdings","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"128488","Unicode hex":"1F5E8"},{"Typeface name":"Webdings","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"128489","Unicode hex":"1F5E9"},{"Typeface name":"Webdings","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"128496","Unicode hex":"1F5F0"},{"Typeface name":"Webdings","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"128497","Unicode hex":"1F5F1"},{"Typeface name":"Webdings","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"127798","Unicode hex":"1F336"},{"Typeface name":"Webdings","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"127895","Unicode hex":"1F397"},{"Typeface name":"Webdings","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"128638","Unicode hex":"1F67E"},{"Typeface name":"Webdings","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"128636","Unicode hex":"1F67C"},{"Typeface name":"Webdings","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"128469","Unicode hex":"1F5D5"},{"Typeface name":"Webdings","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"128470","Unicode hex":"1F5D6"},{"Typeface name":"Webdings","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"128471","Unicode hex":"1F5D7"},{"Typeface name":"Webdings","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"9204","Unicode hex":"23F4"},{"Typeface name":"Webdings","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"9205","Unicode hex":"23F5"},{"Typeface name":"Webdings","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"9206","Unicode hex":"23F6"},{"Typeface name":"Webdings","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"9207","Unicode hex":"23F7"},{"Typeface name":"Webdings","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"9194","Unicode hex":"23EA"},{"Typeface name":"Webdings","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"9193","Unicode hex":"23E9"},{"Typeface name":"Webdings","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"9198","Unicode hex":"23EE"},{"Typeface name":"Webdings","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"9197","Unicode hex":"23ED"},{"Typeface name":"Webdings","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"9208","Unicode hex":"23F8"},{"Typeface name":"Webdings","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"9209","Unicode hex":"23F9"},{"Typeface name":"Webdings","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"9210","Unicode hex":"23FA"},{"Typeface name":"Webdings","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"128474","Unicode hex":"1F5DA"},{"Typeface name":"Webdings","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"128499","Unicode hex":"1F5F3"},{"Typeface name":"Webdings","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"128736","Unicode hex":"1F6E0"},{"Typeface name":"Webdings","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"127959","Unicode hex":"1F3D7"},{"Typeface name":"Webdings","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"127960","Unicode hex":"1F3D8"},{"Typeface name":"Webdings","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"127961","Unicode hex":"1F3D9"},{"Typeface name":"Webdings","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"127962","Unicode hex":"1F3DA"},{"Typeface name":"Webdings","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"127964","Unicode hex":"1F3DC"},{"Typeface name":"Webdings","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"127981","Unicode hex":"1F3ED"},{"Typeface name":"Webdings","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"127963","Unicode hex":"1F3DB"},{"Typeface name":"Webdings","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"127968","Unicode hex":"1F3E0"},{"Typeface name":"Webdings","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"127958","Unicode hex":"1F3D6"},{"Typeface name":"Webdings","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"127965","Unicode hex":"1F3DD"},{"Typeface name":"Webdings","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"128739","Unicode hex":"1F6E3"},{"Typeface name":"Webdings","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"128269","Unicode hex":"1F50D"},{"Typeface name":"Webdings","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"127956","Unicode hex":"1F3D4"},{"Typeface name":"Webdings","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"128065","Unicode hex":"1F441"},{"Typeface name":"Webdings","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"128066","Unicode hex":"1F442"},{"Typeface name":"Webdings","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"127966","Unicode hex":"1F3DE"},{"Typeface name":"Webdings","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"127957","Unicode hex":"1F3D5"},{"Typeface name":"Webdings","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"128740","Unicode hex":"1F6E4"},{"Typeface name":"Webdings","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"127967","Unicode hex":"1F3DF"},{"Typeface name":"Webdings","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"128755","Unicode hex":"1F6F3"},{"Typeface name":"Webdings","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"128364","Unicode hex":"1F56C"},{"Typeface name":"Webdings","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"128363","Unicode hex":"1F56B"},{"Typeface name":"Webdings","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"128360","Unicode hex":"1F568"},{"Typeface name":"Webdings","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"128264","Unicode hex":"1F508"},{"Typeface name":"Webdings","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"127892","Unicode hex":"1F394"},{"Typeface name":"Webdings","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"127893","Unicode hex":"1F395"},{"Typeface name":"Webdings","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"128492","Unicode hex":"1F5EC"},{"Typeface name":"Webdings","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"128637","Unicode hex":"1F67D"},{"Typeface name":"Webdings","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"128493","Unicode hex":"1F5ED"},{"Typeface name":"Webdings","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"128490","Unicode hex":"1F5EA"},{"Typeface name":"Webdings","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"128491","Unicode hex":"1F5EB"},{"Typeface name":"Webdings","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"11156","Unicode hex":"2B94"},{"Typeface name":"Webdings","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"10004","Unicode hex":"2714"},{"Typeface name":"Webdings","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"128690","Unicode hex":"1F6B2"},{"Typeface name":"Webdings","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"11036","Unicode hex":"2B1C"},{"Typeface name":"Webdings","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"128737","Unicode hex":"1F6E1"},{"Typeface name":"Webdings","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"128230","Unicode hex":"1F4E6"},{"Typeface name":"Webdings","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"128753","Unicode hex":"1F6F1"},{"Typeface name":"Webdings","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"11035","Unicode hex":"2B1B"},{"Typeface name":"Webdings","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"128657","Unicode hex":"1F691"},{"Typeface name":"Webdings","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"128712","Unicode hex":"1F6C8"},{"Typeface name":"Webdings","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"128745","Unicode hex":"1F6E9"},{"Typeface name":"Webdings","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"128752","Unicode hex":"1F6F0"},{"Typeface name":"Webdings","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"128968","Unicode hex":"1F7C8"},{"Typeface name":"Webdings","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"128372","Unicode hex":"1F574"},{"Typeface name":"Webdings","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"11044","Unicode hex":"2B24"},{"Typeface name":"Webdings","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"128741","Unicode hex":"1F6E5"},{"Typeface name":"Webdings","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"128660","Unicode hex":"1F694"},{"Typeface name":"Webdings","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"128472","Unicode hex":"1F5D8"},{"Typeface name":"Webdings","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"128473","Unicode hex":"1F5D9"},{"Typeface name":"Webdings","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"10067","Unicode hex":"2753"},{"Typeface name":"Webdings","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"128754","Unicode hex":"1F6F2"},{"Typeface name":"Webdings","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"128647","Unicode hex":"1F687"},{"Typeface name":"Webdings","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"128653","Unicode hex":"1F68D"},{"Typeface name":"Webdings","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"9971","Unicode hex":"26F3"},{"Typeface name":"Webdings","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"10680","Unicode hex":"29B8"},{"Typeface name":"Webdings","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"8854","Unicode hex":"2296"},{"Typeface name":"Webdings","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"128685","Unicode hex":"1F6AD"},{"Typeface name":"Webdings","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"128494","Unicode hex":"1F5EE"},{"Typeface name":"Webdings","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"9168","Unicode hex":"23D0"},{"Typeface name":"Webdings","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"128495","Unicode hex":"1F5EF"},{"Typeface name":"Webdings","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"128498","Unicode hex":"1F5F2"},{"Typeface name":"Webdings","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"128697","Unicode hex":"1F6B9"},{"Typeface name":"Webdings","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"128698","Unicode hex":"1F6BA"},{"Typeface name":"Webdings","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"128713","Unicode hex":"1F6C9"},{"Typeface name":"Webdings","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"128714","Unicode hex":"1F6CA"},{"Typeface name":"Webdings","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"128700","Unicode hex":"1F6BC"},{"Typeface name":"Webdings","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"128125","Unicode hex":"1F47D"},{"Typeface name":"Webdings","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"127947","Unicode hex":"1F3CB"},{"Typeface name":"Webdings","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"9975","Unicode hex":"26F7"},{"Typeface name":"Webdings","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"127938","Unicode hex":"1F3C2"},{"Typeface name":"Webdings","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"127948","Unicode hex":"1F3CC"},{"Typeface name":"Webdings","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"127946","Unicode hex":"1F3CA"},{"Typeface name":"Webdings","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"127940","Unicode hex":"1F3C4"},{"Typeface name":"Webdings","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"127949","Unicode hex":"1F3CD"},{"Typeface name":"Webdings","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"127950","Unicode hex":"1F3CE"},{"Typeface name":"Webdings","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"128664","Unicode hex":"1F698"},{"Typeface name":"Webdings","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"128480","Unicode hex":"1F5E0"},{"Typeface name":"Webdings","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"128738","Unicode hex":"1F6E2"},{"Typeface name":"Webdings","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"128176","Unicode hex":"1F4B0"},{"Typeface name":"Webdings","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"127991","Unicode hex":"1F3F7"},{"Typeface name":"Webdings","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"128179","Unicode hex":"1F4B3"},{"Typeface name":"Webdings","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"128106","Unicode hex":"1F46A"},{"Typeface name":"Webdings","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"128481","Unicode hex":"1F5E1"},{"Typeface name":"Webdings","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"128482","Unicode hex":"1F5E2"},{"Typeface name":"Webdings","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"128483","Unicode hex":"1F5E3"},{"Typeface name":"Webdings","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"10031","Unicode hex":"272F"},{"Typeface name":"Webdings","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"128388","Unicode hex":"1F584"},{"Typeface name":"Webdings","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"128389","Unicode hex":"1F585"},{"Typeface name":"Webdings","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"128387","Unicode hex":"1F583"},{"Typeface name":"Webdings","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"128390","Unicode hex":"1F586"},{"Typeface name":"Webdings","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"128441","Unicode hex":"1F5B9"},{"Typeface name":"Webdings","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"128442","Unicode hex":"1F5BA"},{"Typeface name":"Webdings","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"128443","Unicode hex":"1F5BB"},{"Typeface name":"Webdings","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"128373","Unicode hex":"1F575"},{"Typeface name":"Webdings","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"128368","Unicode hex":"1F570"},{"Typeface name":"Webdings","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"128445","Unicode hex":"1F5BD"},{"Typeface name":"Webdings","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"128446","Unicode hex":"1F5BE"},{"Typeface name":"Webdings","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"128203","Unicode hex":"1F4CB"},{"Typeface name":"Webdings","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"128466","Unicode hex":"1F5D2"},{"Typeface name":"Webdings","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"128467","Unicode hex":"1F5D3"},{"Typeface name":"Webdings","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"128366","Unicode hex":"1F56E"},{"Typeface name":"Webdings","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"128218","Unicode hex":"1F4DA"},{"Typeface name":"Webdings","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"128478","Unicode hex":"1F5DE"},{"Typeface name":"Webdings","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"128479","Unicode hex":"1F5DF"},{"Typeface name":"Webdings","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"128451","Unicode hex":"1F5C3"},{"Typeface name":"Webdings","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"128450","Unicode hex":"1F5C2"},{"Typeface name":"Webdings","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"128444","Unicode hex":"1F5BC"},{"Typeface name":"Webdings","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"127917","Unicode hex":"1F3AD"},{"Typeface name":"Webdings","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"127900","Unicode hex":"1F39C"},{"Typeface name":"Webdings","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"127896","Unicode hex":"1F398"},{"Typeface name":"Webdings","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"127897","Unicode hex":"1F399"},{"Typeface name":"Webdings","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"127911","Unicode hex":"1F3A7"},{"Typeface name":"Webdings","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"128191","Unicode hex":"1F4BF"},{"Typeface name":"Webdings","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"127902","Unicode hex":"1F39E"},{"Typeface name":"Webdings","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"128247","Unicode hex":"1F4F7"},{"Typeface name":"Webdings","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"127903","Unicode hex":"1F39F"},{"Typeface name":"Webdings","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"127916","Unicode hex":"1F3AC"},{"Typeface name":"Webdings","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"128253","Unicode hex":"1F4FD"},{"Typeface name":"Webdings","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"128249","Unicode hex":"1F4F9"},{"Typeface name":"Webdings","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"128254","Unicode hex":"1F4FE"},{"Typeface name":"Webdings","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"128251","Unicode hex":"1F4FB"},{"Typeface name":"Webdings","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"127898","Unicode hex":"1F39A"},{"Typeface name":"Webdings","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"127899","Unicode hex":"1F39B"},{"Typeface name":"Webdings","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"128250","Unicode hex":"1F4FA"},{"Typeface name":"Webdings","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"128187","Unicode hex":"1F4BB"},{"Typeface name":"Webdings","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"128421","Unicode hex":"1F5A5"},{"Typeface name":"Webdings","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"128422","Unicode hex":"1F5A6"},{"Typeface name":"Webdings","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"128423","Unicode hex":"1F5A7"},{"Typeface name":"Webdings","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"128377","Unicode hex":"1F579"},{"Typeface name":"Webdings","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"127918","Unicode hex":"1F3AE"},{"Typeface name":"Webdings","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"128379","Unicode hex":"1F57B"},{"Typeface name":"Webdings","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"128380","Unicode hex":"1F57C"},{"Typeface name":"Webdings","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"128223","Unicode hex":"1F4DF"},{"Typeface name":"Webdings","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"128385","Unicode hex":"1F581"},{"Typeface name":"Webdings","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"128384","Unicode hex":"1F580"},{"Typeface name":"Webdings","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"128424","Unicode hex":"1F5A8"},{"Typeface name":"Webdings","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"128425","Unicode hex":"1F5A9"},{"Typeface name":"Webdings","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"128447","Unicode hex":"1F5BF"},{"Typeface name":"Webdings","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"128426","Unicode hex":"1F5AA"},{"Typeface name":"Webdings","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"128476","Unicode hex":"1F5DC"},{"Typeface name":"Webdings","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"128274","Unicode hex":"1F512"},{"Typeface name":"Webdings","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"128275","Unicode hex":"1F513"},{"Typeface name":"Webdings","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"128477","Unicode hex":"1F5DD"},{"Typeface name":"Webdings","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"128229","Unicode hex":"1F4E5"},{"Typeface name":"Webdings","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"128228","Unicode hex":"1F4E4"},{"Typeface name":"Webdings","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"128371","Unicode hex":"1F573"},{"Typeface name":"Webdings","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"127779","Unicode hex":"1F323"},{"Typeface name":"Webdings","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"127780","Unicode hex":"1F324"},{"Typeface name":"Webdings","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"127781","Unicode hex":"1F325"},{"Typeface name":"Webdings","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"127782","Unicode hex":"1F326"},{"Typeface name":"Webdings","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"9729","Unicode hex":"2601"},{"Typeface name":"Webdings","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"127784","Unicode hex":"1F328"},{"Typeface name":"Webdings","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"127783","Unicode hex":"1F327"},{"Typeface name":"Webdings","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"127785","Unicode hex":"1F329"},{"Typeface name":"Webdings","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"127786","Unicode hex":"1F32A"},{"Typeface name":"Webdings","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"127788","Unicode hex":"1F32C"},{"Typeface name":"Webdings","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"127787","Unicode hex":"1F32B"},{"Typeface name":"Webdings","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"127772","Unicode hex":"1F31C"},{"Typeface name":"Webdings","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"127777","Unicode hex":"1F321"},{"Typeface name":"Webdings","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"128715","Unicode hex":"1F6CB"},{"Typeface name":"Webdings","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"128719","Unicode hex":"1F6CF"},{"Typeface name":"Webdings","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"127869","Unicode hex":"1F37D"},{"Typeface name":"Webdings","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"127864","Unicode hex":"1F378"},{"Typeface name":"Webdings","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"128718","Unicode hex":"1F6CE"},{"Typeface name":"Webdings","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"128717","Unicode hex":"1F6CD"},{"Typeface name":"Webdings","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"9413","Unicode hex":"24C5"},{"Typeface name":"Webdings","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"9855","Unicode hex":"267F"},{"Typeface name":"Webdings","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"128710","Unicode hex":"1F6C6"},{"Typeface name":"Webdings","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"128392","Unicode hex":"1F588"},{"Typeface name":"Webdings","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"127891","Unicode hex":"1F393"},{"Typeface name":"Webdings","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"128484","Unicode hex":"1F5E4"},{"Typeface name":"Webdings","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"128485","Unicode hex":"1F5E5"},{"Typeface name":"Webdings","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"128486","Unicode hex":"1F5E6"},{"Typeface name":"Webdings","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"128487","Unicode hex":"1F5E7"},{"Typeface name":"Webdings","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"128746","Unicode hex":"1F6EA"},{"Typeface name":"Webdings","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"128063","Unicode hex":"1F43F"},{"Typeface name":"Webdings","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"128038","Unicode hex":"1F426"},{"Typeface name":"Webdings","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"128031","Unicode hex":"1F41F"},{"Typeface name":"Webdings","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"128021","Unicode hex":"1F415"},{"Typeface name":"Webdings","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"128008","Unicode hex":"1F408"},{"Typeface name":"Webdings","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"128620","Unicode hex":"1F66C"},{"Typeface name":"Webdings","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"128622","Unicode hex":"1F66E"},{"Typeface name":"Webdings","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"128621","Unicode hex":"1F66D"},{"Typeface name":"Webdings","Dingbat dec":"250","Dingbat hex":"FA","Unicode dec":"128623","Unicode hex":"1F66F"},{"Typeface name":"Webdings","Dingbat dec":"251","Dingbat hex":"FB","Unicode dec":"128506","Unicode hex":"1F5FA"},{"Typeface name":"Webdings","Dingbat dec":"252","Dingbat hex":"FC","Unicode dec":"127757","Unicode hex":"1F30D"},{"Typeface name":"Webdings","Dingbat dec":"253","Dingbat hex":"FD","Unicode dec":"127759","Unicode hex":"1F30F"},{"Typeface name":"Webdings","Dingbat dec":"254","Dingbat hex":"FE","Unicode dec":"127758","Unicode hex":"1F30E"},{"Typeface name":"Webdings","Dingbat dec":"255","Dingbat hex":"FF","Unicode dec":"128330","Unicode hex":"1F54A"},{"Typeface name":"Wingdings","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Wingdings","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"128393","Unicode hex":"1F589"},{"Typeface name":"Wingdings","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"9986","Unicode hex":"2702"},{"Typeface name":"Wingdings","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"9985","Unicode hex":"2701"},{"Typeface name":"Wingdings","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"128083","Unicode hex":"1F453"},{"Typeface name":"Wingdings","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"128365","Unicode hex":"1F56D"},{"Typeface name":"Wingdings","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"128366","Unicode hex":"1F56E"},{"Typeface name":"Wingdings","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"128367","Unicode hex":"1F56F"},{"Typeface name":"Wingdings","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"128383","Unicode hex":"1F57F"},{"Typeface name":"Wingdings","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"9990","Unicode hex":"2706"},{"Typeface name":"Wingdings","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"128386","Unicode hex":"1F582"},{"Typeface name":"Wingdings","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"128387","Unicode hex":"1F583"},{"Typeface name":"Wingdings","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"128234","Unicode hex":"1F4EA"},{"Typeface name":"Wingdings","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"128235","Unicode hex":"1F4EB"},{"Typeface name":"Wingdings","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"128236","Unicode hex":"1F4EC"},{"Typeface name":"Wingdings","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"128237","Unicode hex":"1F4ED"},{"Typeface name":"Wingdings","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"128448","Unicode hex":"1F5C0"},{"Typeface name":"Wingdings","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"128449","Unicode hex":"1F5C1"},{"Typeface name":"Wingdings","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"128462","Unicode hex":"1F5CE"},{"Typeface name":"Wingdings","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"128463","Unicode hex":"1F5CF"},{"Typeface name":"Wingdings","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"128464","Unicode hex":"1F5D0"},{"Typeface name":"Wingdings","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"128452","Unicode hex":"1F5C4"},{"Typeface name":"Wingdings","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"8987","Unicode hex":"231B"},{"Typeface name":"Wingdings","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"128430","Unicode hex":"1F5AE"},{"Typeface name":"Wingdings","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"128432","Unicode hex":"1F5B0"},{"Typeface name":"Wingdings","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"128434","Unicode hex":"1F5B2"},{"Typeface name":"Wingdings","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"128435","Unicode hex":"1F5B3"},{"Typeface name":"Wingdings","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"128436","Unicode hex":"1F5B4"},{"Typeface name":"Wingdings","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"128427","Unicode hex":"1F5AB"},{"Typeface name":"Wingdings","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"128428","Unicode hex":"1F5AC"},{"Typeface name":"Wingdings","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"9991","Unicode hex":"2707"},{"Typeface name":"Wingdings","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"9997","Unicode hex":"270D"},{"Typeface name":"Wingdings","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"128398","Unicode hex":"1F58E"},{"Typeface name":"Wingdings","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"9996","Unicode hex":"270C"},{"Typeface name":"Wingdings","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"128399","Unicode hex":"1F58F"},{"Typeface name":"Wingdings","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"128077","Unicode hex":"1F44D"},{"Typeface name":"Wingdings","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"128078","Unicode hex":"1F44E"},{"Typeface name":"Wingdings","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"9756","Unicode hex":"261C"},{"Typeface name":"Wingdings","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"9758","Unicode hex":"261E"},{"Typeface name":"Wingdings","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"9757","Unicode hex":"261D"},{"Typeface name":"Wingdings","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"9759","Unicode hex":"261F"},{"Typeface name":"Wingdings","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"128400","Unicode hex":"1F590"},{"Typeface name":"Wingdings","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"9786","Unicode hex":"263A"},{"Typeface name":"Wingdings","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"128528","Unicode hex":"1F610"},{"Typeface name":"Wingdings","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"9785","Unicode hex":"2639"},{"Typeface name":"Wingdings","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"128163","Unicode hex":"1F4A3"},{"Typeface name":"Wingdings","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"128369","Unicode hex":"1F571"},{"Typeface name":"Wingdings","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"127987","Unicode hex":"1F3F3"},{"Typeface name":"Wingdings","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"127985","Unicode hex":"1F3F1"},{"Typeface name":"Wingdings","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"9992","Unicode hex":"2708"},{"Typeface name":"Wingdings","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"9788","Unicode hex":"263C"},{"Typeface name":"Wingdings","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"127778","Unicode hex":"1F322"},{"Typeface name":"Wingdings","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"10052","Unicode hex":"2744"},{"Typeface name":"Wingdings","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"128326","Unicode hex":"1F546"},{"Typeface name":"Wingdings","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"10014","Unicode hex":"271E"},{"Typeface name":"Wingdings","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"128328","Unicode hex":"1F548"},{"Typeface name":"Wingdings","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"10016","Unicode hex":"2720"},{"Typeface name":"Wingdings","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"10017","Unicode hex":"2721"},{"Typeface name":"Wingdings","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"9770","Unicode hex":"262A"},{"Typeface name":"Wingdings","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"9775","Unicode hex":"262F"},{"Typeface name":"Wingdings","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"128329","Unicode hex":"1F549"},{"Typeface name":"Wingdings","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"9784","Unicode hex":"2638"},{"Typeface name":"Wingdings","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"9800","Unicode hex":"2648"},{"Typeface name":"Wingdings","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"9801","Unicode hex":"2649"},{"Typeface name":"Wingdings","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"9802","Unicode hex":"264A"},{"Typeface name":"Wingdings","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"9803","Unicode hex":"264B"},{"Typeface name":"Wingdings","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"9804","Unicode hex":"264C"},{"Typeface name":"Wingdings","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"9805","Unicode hex":"264D"},{"Typeface name":"Wingdings","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"9806","Unicode hex":"264E"},{"Typeface name":"Wingdings","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"9807","Unicode hex":"264F"},{"Typeface name":"Wingdings","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"9808","Unicode hex":"2650"},{"Typeface name":"Wingdings","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"9809","Unicode hex":"2651"},{"Typeface name":"Wingdings","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"9810","Unicode hex":"2652"},{"Typeface name":"Wingdings","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"9811","Unicode hex":"2653"},{"Typeface name":"Wingdings","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"128624","Unicode hex":"1F670"},{"Typeface name":"Wingdings","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"128629","Unicode hex":"1F675"},{"Typeface name":"Wingdings","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"9899","Unicode hex":"26AB"},{"Typeface name":"Wingdings","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"128318","Unicode hex":"1F53E"},{"Typeface name":"Wingdings","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"9724","Unicode hex":"25FC"},{"Typeface name":"Wingdings","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"128911","Unicode hex":"1F78F"},{"Typeface name":"Wingdings","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"128912","Unicode hex":"1F790"},{"Typeface name":"Wingdings","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"10065","Unicode hex":"2751"},{"Typeface name":"Wingdings","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"10066","Unicode hex":"2752"},{"Typeface name":"Wingdings","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"128927","Unicode hex":"1F79F"},{"Typeface name":"Wingdings","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"10731","Unicode hex":"29EB"},{"Typeface name":"Wingdings","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"9670","Unicode hex":"25C6"},{"Typeface name":"Wingdings","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"10070","Unicode hex":"2756"},{"Typeface name":"Wingdings","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"11049","Unicode hex":"2B29"},{"Typeface name":"Wingdings","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"8999","Unicode hex":"2327"},{"Typeface name":"Wingdings","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"11193","Unicode hex":"2BB9"},{"Typeface name":"Wingdings","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"8984","Unicode hex":"2318"},{"Typeface name":"Wingdings","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"127989","Unicode hex":"1F3F5"},{"Typeface name":"Wingdings","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"127990","Unicode hex":"1F3F6"},{"Typeface name":"Wingdings","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"128630","Unicode hex":"1F676"},{"Typeface name":"Wingdings","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"128631","Unicode hex":"1F677"},{"Typeface name":"Wingdings","Dingbat dec":"127","Dingbat hex":"7F","Unicode dec":"9647","Unicode hex":"25AF"},{"Typeface name":"Wingdings","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"127243","Unicode hex":"1F10B"},{"Typeface name":"Wingdings","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"10112","Unicode hex":"2780"},{"Typeface name":"Wingdings","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"10113","Unicode hex":"2781"},{"Typeface name":"Wingdings","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"10114","Unicode hex":"2782"},{"Typeface name":"Wingdings","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"10115","Unicode hex":"2783"},{"Typeface name":"Wingdings","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"10116","Unicode hex":"2784"},{"Typeface name":"Wingdings","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"10117","Unicode hex":"2785"},{"Typeface name":"Wingdings","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"10118","Unicode hex":"2786"},{"Typeface name":"Wingdings","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"10119","Unicode hex":"2787"},{"Typeface name":"Wingdings","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"10120","Unicode hex":"2788"},{"Typeface name":"Wingdings","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"10121","Unicode hex":"2789"},{"Typeface name":"Wingdings","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"127244","Unicode hex":"1F10C"},{"Typeface name":"Wingdings","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"10122","Unicode hex":"278A"},{"Typeface name":"Wingdings","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"10123","Unicode hex":"278B"},{"Typeface name":"Wingdings","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"10124","Unicode hex":"278C"},{"Typeface name":"Wingdings","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"10125","Unicode hex":"278D"},{"Typeface name":"Wingdings","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"10126","Unicode hex":"278E"},{"Typeface name":"Wingdings","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"10127","Unicode hex":"278F"},{"Typeface name":"Wingdings","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"10128","Unicode hex":"2790"},{"Typeface name":"Wingdings","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"10129","Unicode hex":"2791"},{"Typeface name":"Wingdings","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"10130","Unicode hex":"2792"},{"Typeface name":"Wingdings","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"10131","Unicode hex":"2793"},{"Typeface name":"Wingdings","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"128610","Unicode hex":"1F662"},{"Typeface name":"Wingdings","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"128608","Unicode hex":"1F660"},{"Typeface name":"Wingdings","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"128609","Unicode hex":"1F661"},{"Typeface name":"Wingdings","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"128611","Unicode hex":"1F663"},{"Typeface name":"Wingdings","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"128606","Unicode hex":"1F65E"},{"Typeface name":"Wingdings","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"128604","Unicode hex":"1F65C"},{"Typeface name":"Wingdings","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"128605","Unicode hex":"1F65D"},{"Typeface name":"Wingdings","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"128607","Unicode hex":"1F65F"},{"Typeface name":"Wingdings","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"8729","Unicode hex":"2219"},{"Typeface name":"Wingdings","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"8226","Unicode hex":"2022"},{"Typeface name":"Wingdings","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"11037","Unicode hex":"2B1D"},{"Typeface name":"Wingdings","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"11096","Unicode hex":"2B58"},{"Typeface name":"Wingdings","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"128902","Unicode hex":"1F786"},{"Typeface name":"Wingdings","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"128904","Unicode hex":"1F788"},{"Typeface name":"Wingdings","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"128906","Unicode hex":"1F78A"},{"Typeface name":"Wingdings","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"128907","Unicode hex":"1F78B"},{"Typeface name":"Wingdings","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"128319","Unicode hex":"1F53F"},{"Typeface name":"Wingdings","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"9642","Unicode hex":"25AA"},{"Typeface name":"Wingdings","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"128910","Unicode hex":"1F78E"},{"Typeface name":"Wingdings","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"128961","Unicode hex":"1F7C1"},{"Typeface name":"Wingdings","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"128965","Unicode hex":"1F7C5"},{"Typeface name":"Wingdings","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"9733","Unicode hex":"2605"},{"Typeface name":"Wingdings","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"128971","Unicode hex":"1F7CB"},{"Typeface name":"Wingdings","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"128975","Unicode hex":"1F7CF"},{"Typeface name":"Wingdings","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"128979","Unicode hex":"1F7D3"},{"Typeface name":"Wingdings","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"128977","Unicode hex":"1F7D1"},{"Typeface name":"Wingdings","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"11216","Unicode hex":"2BD0"},{"Typeface name":"Wingdings","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"8982","Unicode hex":"2316"},{"Typeface name":"Wingdings","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"11214","Unicode hex":"2BCE"},{"Typeface name":"Wingdings","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"11215","Unicode hex":"2BCF"},{"Typeface name":"Wingdings","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"11217","Unicode hex":"2BD1"},{"Typeface name":"Wingdings","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"10026","Unicode hex":"272A"},{"Typeface name":"Wingdings","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"10032","Unicode hex":"2730"},{"Typeface name":"Wingdings","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"128336","Unicode hex":"1F550"},{"Typeface name":"Wingdings","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"128337","Unicode hex":"1F551"},{"Typeface name":"Wingdings","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"128338","Unicode hex":"1F552"},{"Typeface name":"Wingdings","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"128339","Unicode hex":"1F553"},{"Typeface name":"Wingdings","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"128340","Unicode hex":"1F554"},{"Typeface name":"Wingdings","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"128341","Unicode hex":"1F555"},{"Typeface name":"Wingdings","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"128342","Unicode hex":"1F556"},{"Typeface name":"Wingdings","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"128343","Unicode hex":"1F557"},{"Typeface name":"Wingdings","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"128344","Unicode hex":"1F558"},{"Typeface name":"Wingdings","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"128345","Unicode hex":"1F559"},{"Typeface name":"Wingdings","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"128346","Unicode hex":"1F55A"},{"Typeface name":"Wingdings","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"128347","Unicode hex":"1F55B"},{"Typeface name":"Wingdings","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"11184","Unicode hex":"2BB0"},{"Typeface name":"Wingdings","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"11185","Unicode hex":"2BB1"},{"Typeface name":"Wingdings","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"11186","Unicode hex":"2BB2"},{"Typeface name":"Wingdings","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"11187","Unicode hex":"2BB3"},{"Typeface name":"Wingdings","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"11188","Unicode hex":"2BB4"},{"Typeface name":"Wingdings","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"11189","Unicode hex":"2BB5"},{"Typeface name":"Wingdings","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"11190","Unicode hex":"2BB6"},{"Typeface name":"Wingdings","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"11191","Unicode hex":"2BB7"},{"Typeface name":"Wingdings","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"128618","Unicode hex":"1F66A"},{"Typeface name":"Wingdings","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"128619","Unicode hex":"1F66B"},{"Typeface name":"Wingdings","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"128597","Unicode hex":"1F655"},{"Typeface name":"Wingdings","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"128596","Unicode hex":"1F654"},{"Typeface name":"Wingdings","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"128599","Unicode hex":"1F657"},{"Typeface name":"Wingdings","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"128598","Unicode hex":"1F656"},{"Typeface name":"Wingdings","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"128592","Unicode hex":"1F650"},{"Typeface name":"Wingdings","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"128593","Unicode hex":"1F651"},{"Typeface name":"Wingdings","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"128594","Unicode hex":"1F652"},{"Typeface name":"Wingdings","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"128595","Unicode hex":"1F653"},{"Typeface name":"Wingdings","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"9003","Unicode hex":"232B"},{"Typeface name":"Wingdings","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"8998","Unicode hex":"2326"},{"Typeface name":"Wingdings","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"11160","Unicode hex":"2B98"},{"Typeface name":"Wingdings","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"11162","Unicode hex":"2B9A"},{"Typeface name":"Wingdings","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"11161","Unicode hex":"2B99"},{"Typeface name":"Wingdings","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"11163","Unicode hex":"2B9B"},{"Typeface name":"Wingdings","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"11144","Unicode hex":"2B88"},{"Typeface name":"Wingdings","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"11146","Unicode hex":"2B8A"},{"Typeface name":"Wingdings","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"11145","Unicode hex":"2B89"},{"Typeface name":"Wingdings","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"11147","Unicode hex":"2B8B"},{"Typeface name":"Wingdings","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"129128","Unicode hex":"1F868"},{"Typeface name":"Wingdings","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"129130","Unicode hex":"1F86A"},{"Typeface name":"Wingdings","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"129129","Unicode hex":"1F869"},{"Typeface name":"Wingdings","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"129131","Unicode hex":"1F86B"},{"Typeface name":"Wingdings","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"129132","Unicode hex":"1F86C"},{"Typeface name":"Wingdings","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"129133","Unicode hex":"1F86D"},{"Typeface name":"Wingdings","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"129135","Unicode hex":"1F86F"},{"Typeface name":"Wingdings","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"129134","Unicode hex":"1F86E"},{"Typeface name":"Wingdings","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"129144","Unicode hex":"1F878"},{"Typeface name":"Wingdings","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"129146","Unicode hex":"1F87A"},{"Typeface name":"Wingdings","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"129145","Unicode hex":"1F879"},{"Typeface name":"Wingdings","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"129147","Unicode hex":"1F87B"},{"Typeface name":"Wingdings","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"129148","Unicode hex":"1F87C"},{"Typeface name":"Wingdings","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"129149","Unicode hex":"1F87D"},{"Typeface name":"Wingdings","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"129151","Unicode hex":"1F87F"},{"Typeface name":"Wingdings","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"129150","Unicode hex":"1F87E"},{"Typeface name":"Wingdings","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"8678","Unicode hex":"21E6"},{"Typeface name":"Wingdings","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"8680","Unicode hex":"21E8"},{"Typeface name":"Wingdings","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"8679","Unicode hex":"21E7"},{"Typeface name":"Wingdings","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"8681","Unicode hex":"21E9"},{"Typeface name":"Wingdings","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"11012","Unicode hex":"2B04"},{"Typeface name":"Wingdings","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"8691","Unicode hex":"21F3"},{"Typeface name":"Wingdings","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"11009","Unicode hex":"2B01"},{"Typeface name":"Wingdings","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"11008","Unicode hex":"2B00"},{"Typeface name":"Wingdings","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"11011","Unicode hex":"2B03"},{"Typeface name":"Wingdings","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"11010","Unicode hex":"2B02"},{"Typeface name":"Wingdings","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"129196","Unicode hex":"1F8AC"},{"Typeface name":"Wingdings","Dingbat dec":"250","Dingbat hex":"FA","Unicode dec":"129197","Unicode hex":"1F8AD"},{"Typeface name":"Wingdings","Dingbat dec":"251","Dingbat hex":"FB","Unicode dec":"128502","Unicode hex":"1F5F6"},{"Typeface name":"Wingdings","Dingbat dec":"252","Dingbat hex":"FC","Unicode dec":"10003","Unicode hex":"2713"},{"Typeface name":"Wingdings","Dingbat dec":"253","Dingbat hex":"FD","Unicode dec":"128503","Unicode hex":"1F5F7"},{"Typeface name":"Wingdings","Dingbat dec":"254","Dingbat hex":"FE","Unicode dec":"128505","Unicode hex":"1F5F9"},{"Typeface name":"Wingdings 2","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Wingdings 2","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"128394","Unicode hex":"1F58A"},{"Typeface name":"Wingdings 2","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"128395","Unicode hex":"1F58B"},{"Typeface name":"Wingdings 2","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"128396","Unicode hex":"1F58C"},{"Typeface name":"Wingdings 2","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"128397","Unicode hex":"1F58D"},{"Typeface name":"Wingdings 2","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"9988","Unicode hex":"2704"},{"Typeface name":"Wingdings 2","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"9984","Unicode hex":"2700"},{"Typeface name":"Wingdings 2","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"128382","Unicode hex":"1F57E"},{"Typeface name":"Wingdings 2","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"128381","Unicode hex":"1F57D"},{"Typeface name":"Wingdings 2","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"128453","Unicode hex":"1F5C5"},{"Typeface name":"Wingdings 2","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"128454","Unicode hex":"1F5C6"},{"Typeface name":"Wingdings 2","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"128455","Unicode hex":"1F5C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"128456","Unicode hex":"1F5C8"},{"Typeface name":"Wingdings 2","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"128457","Unicode hex":"1F5C9"},{"Typeface name":"Wingdings 2","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"128458","Unicode hex":"1F5CA"},{"Typeface name":"Wingdings 2","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"128459","Unicode hex":"1F5CB"},{"Typeface name":"Wingdings 2","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"128460","Unicode hex":"1F5CC"},{"Typeface name":"Wingdings 2","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"128461","Unicode hex":"1F5CD"},{"Typeface name":"Wingdings 2","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"128203","Unicode hex":"1F4CB"},{"Typeface name":"Wingdings 2","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"128465","Unicode hex":"1F5D1"},{"Typeface name":"Wingdings 2","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"128468","Unicode hex":"1F5D4"},{"Typeface name":"Wingdings 2","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"128437","Unicode hex":"1F5B5"},{"Typeface name":"Wingdings 2","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"128438","Unicode hex":"1F5B6"},{"Typeface name":"Wingdings 2","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"128439","Unicode hex":"1F5B7"},{"Typeface name":"Wingdings 2","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"128440","Unicode hex":"1F5B8"},{"Typeface name":"Wingdings 2","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"128429","Unicode hex":"1F5AD"},{"Typeface name":"Wingdings 2","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"128431","Unicode hex":"1F5AF"},{"Typeface name":"Wingdings 2","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"128433","Unicode hex":"1F5B1"},{"Typeface name":"Wingdings 2","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"128402","Unicode hex":"1F592"},{"Typeface name":"Wingdings 2","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"128403","Unicode hex":"1F593"},{"Typeface name":"Wingdings 2","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"128408","Unicode hex":"1F598"},{"Typeface name":"Wingdings 2","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"128409","Unicode hex":"1F599"},{"Typeface name":"Wingdings 2","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"128410","Unicode hex":"1F59A"},{"Typeface name":"Wingdings 2","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"128411","Unicode hex":"1F59B"},{"Typeface name":"Wingdings 2","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"128072","Unicode hex":"1F448"},{"Typeface name":"Wingdings 2","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"128073","Unicode hex":"1F449"},{"Typeface name":"Wingdings 2","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"128412","Unicode hex":"1F59C"},{"Typeface name":"Wingdings 2","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"128413","Unicode hex":"1F59D"},{"Typeface name":"Wingdings 2","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"128414","Unicode hex":"1F59E"},{"Typeface name":"Wingdings 2","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"128415","Unicode hex":"1F59F"},{"Typeface name":"Wingdings 2","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"128416","Unicode hex":"1F5A0"},{"Typeface name":"Wingdings 2","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"128417","Unicode hex":"1F5A1"},{"Typeface name":"Wingdings 2","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"128070","Unicode hex":"1F446"},{"Typeface name":"Wingdings 2","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"128071","Unicode hex":"1F447"},{"Typeface name":"Wingdings 2","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"128418","Unicode hex":"1F5A2"},{"Typeface name":"Wingdings 2","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"128419","Unicode hex":"1F5A3"},{"Typeface name":"Wingdings 2","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"128401","Unicode hex":"1F591"},{"Typeface name":"Wingdings 2","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"128500","Unicode hex":"1F5F4"},{"Typeface name":"Wingdings 2","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"128504","Unicode hex":"1F5F8"},{"Typeface name":"Wingdings 2","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"128501","Unicode hex":"1F5F5"},{"Typeface name":"Wingdings 2","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"9745","Unicode hex":"2611"},{"Typeface name":"Wingdings 2","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"11197","Unicode hex":"2BBD"},{"Typeface name":"Wingdings 2","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"9746","Unicode hex":"2612"},{"Typeface name":"Wingdings 2","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"11198","Unicode hex":"2BBE"},{"Typeface name":"Wingdings 2","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"11199","Unicode hex":"2BBF"},{"Typeface name":"Wingdings 2","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"128711","Unicode hex":"1F6C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"10680","Unicode hex":"29B8"},{"Typeface name":"Wingdings 2","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"128625","Unicode hex":"1F671"},{"Typeface name":"Wingdings 2","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"128628","Unicode hex":"1F674"},{"Typeface name":"Wingdings 2","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"128626","Unicode hex":"1F672"},{"Typeface name":"Wingdings 2","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"128627","Unicode hex":"1F673"},{"Typeface name":"Wingdings 2","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"8253","Unicode hex":"203D"},{"Typeface name":"Wingdings 2","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"128633","Unicode hex":"1F679"},{"Typeface name":"Wingdings 2","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"128634","Unicode hex":"1F67A"},{"Typeface name":"Wingdings 2","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"128635","Unicode hex":"1F67B"},{"Typeface name":"Wingdings 2","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"128614","Unicode hex":"1F666"},{"Typeface name":"Wingdings 2","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"128612","Unicode hex":"1F664"},{"Typeface name":"Wingdings 2","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"128613","Unicode hex":"1F665"},{"Typeface name":"Wingdings 2","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"128615","Unicode hex":"1F667"},{"Typeface name":"Wingdings 2","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"128602","Unicode hex":"1F65A"},{"Typeface name":"Wingdings 2","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"128600","Unicode hex":"1F658"},{"Typeface name":"Wingdings 2","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"128601","Unicode hex":"1F659"},{"Typeface name":"Wingdings 2","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"128603","Unicode hex":"1F65B"},{"Typeface name":"Wingdings 2","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"9450","Unicode hex":"24EA"},{"Typeface name":"Wingdings 2","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"9312","Unicode hex":"2460"},{"Typeface name":"Wingdings 2","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"9313","Unicode hex":"2461"},{"Typeface name":"Wingdings 2","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"9314","Unicode hex":"2462"},{"Typeface name":"Wingdings 2","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"9315","Unicode hex":"2463"},{"Typeface name":"Wingdings 2","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"9316","Unicode hex":"2464"},{"Typeface name":"Wingdings 2","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"9317","Unicode hex":"2465"},{"Typeface name":"Wingdings 2","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"9318","Unicode hex":"2466"},{"Typeface name":"Wingdings 2","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"9319","Unicode hex":"2467"},{"Typeface name":"Wingdings 2","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"9320","Unicode hex":"2468"},{"Typeface name":"Wingdings 2","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"9321","Unicode hex":"2469"},{"Typeface name":"Wingdings 2","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"9471","Unicode hex":"24FF"},{"Typeface name":"Wingdings 2","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"10102","Unicode hex":"2776"},{"Typeface name":"Wingdings 2","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"10103","Unicode hex":"2777"},{"Typeface name":"Wingdings 2","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"10104","Unicode hex":"2778"},{"Typeface name":"Wingdings 2","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"10105","Unicode hex":"2779"},{"Typeface name":"Wingdings 2","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"10106","Unicode hex":"277A"},{"Typeface name":"Wingdings 2","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"10107","Unicode hex":"277B"},{"Typeface name":"Wingdings 2","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"10108","Unicode hex":"277C"},{"Typeface name":"Wingdings 2","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"10109","Unicode hex":"277D"},{"Typeface name":"Wingdings 2","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"10110","Unicode hex":"277E"},{"Typeface name":"Wingdings 2","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"10111","Unicode hex":"277F"},{"Typeface name":"Wingdings 2","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"9737","Unicode hex":"2609"},{"Typeface name":"Wingdings 2","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"127765","Unicode hex":"1F315"},{"Typeface name":"Wingdings 2","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"9789","Unicode hex":"263D"},{"Typeface name":"Wingdings 2","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"9790","Unicode hex":"263E"},{"Typeface name":"Wingdings 2","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"11839","Unicode hex":"2E3F"},{"Typeface name":"Wingdings 2","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"10013","Unicode hex":"271D"},{"Typeface name":"Wingdings 2","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"128327","Unicode hex":"1F547"},{"Typeface name":"Wingdings 2","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"128348","Unicode hex":"1F55C"},{"Typeface name":"Wingdings 2","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"128349","Unicode hex":"1F55D"},{"Typeface name":"Wingdings 2","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"128350","Unicode hex":"1F55E"},{"Typeface name":"Wingdings 2","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"128351","Unicode hex":"1F55F"},{"Typeface name":"Wingdings 2","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"128352","Unicode hex":"1F560"},{"Typeface name":"Wingdings 2","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"128353","Unicode hex":"1F561"},{"Typeface name":"Wingdings 2","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"128354","Unicode hex":"1F562"},{"Typeface name":"Wingdings 2","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"128355","Unicode hex":"1F563"},{"Typeface name":"Wingdings 2","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"128356","Unicode hex":"1F564"},{"Typeface name":"Wingdings 2","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"128357","Unicode hex":"1F565"},{"Typeface name":"Wingdings 2","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"128358","Unicode hex":"1F566"},{"Typeface name":"Wingdings 2","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"128359","Unicode hex":"1F567"},{"Typeface name":"Wingdings 2","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"128616","Unicode hex":"1F668"},{"Typeface name":"Wingdings 2","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"128617","Unicode hex":"1F669"},{"Typeface name":"Wingdings 2","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"8901","Unicode hex":"22C5"},{"Typeface name":"Wingdings 2","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"128900","Unicode hex":"1F784"},{"Typeface name":"Wingdings 2","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"10625","Unicode hex":"2981"},{"Typeface name":"Wingdings 2","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"9679","Unicode hex":"25CF"},{"Typeface name":"Wingdings 2","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"9675","Unicode hex":"25CB"},{"Typeface name":"Wingdings 2","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"128901","Unicode hex":"1F785"},{"Typeface name":"Wingdings 2","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"128903","Unicode hex":"1F787"},{"Typeface name":"Wingdings 2","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"128905","Unicode hex":"1F789"},{"Typeface name":"Wingdings 2","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"8857","Unicode hex":"2299"},{"Typeface name":"Wingdings 2","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"10687","Unicode hex":"29BF"},{"Typeface name":"Wingdings 2","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"128908","Unicode hex":"1F78C"},{"Typeface name":"Wingdings 2","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"128909","Unicode hex":"1F78D"},{"Typeface name":"Wingdings 2","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"9726","Unicode hex":"25FE"},{"Typeface name":"Wingdings 2","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"9632","Unicode hex":"25A0"},{"Typeface name":"Wingdings 2","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"9633","Unicode hex":"25A1"},{"Typeface name":"Wingdings 2","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"128913","Unicode hex":"1F791"},{"Typeface name":"Wingdings 2","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"128914","Unicode hex":"1F792"},{"Typeface name":"Wingdings 2","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"128915","Unicode hex":"1F793"},{"Typeface name":"Wingdings 2","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"128916","Unicode hex":"1F794"},{"Typeface name":"Wingdings 2","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"9635","Unicode hex":"25A3"},{"Typeface name":"Wingdings 2","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"128917","Unicode hex":"1F795"},{"Typeface name":"Wingdings 2","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"128918","Unicode hex":"1F796"},{"Typeface name":"Wingdings 2","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"128919","Unicode hex":"1F797"},{"Typeface name":"Wingdings 2","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"128920","Unicode hex":"1F798"},{"Typeface name":"Wingdings 2","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"11049","Unicode hex":"2B29"},{"Typeface name":"Wingdings 2","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"11045","Unicode hex":"2B25"},{"Typeface name":"Wingdings 2","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"9671","Unicode hex":"25C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"128922","Unicode hex":"1F79A"},{"Typeface name":"Wingdings 2","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"9672","Unicode hex":"25C8"},{"Typeface name":"Wingdings 2","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"128923","Unicode hex":"1F79B"},{"Typeface name":"Wingdings 2","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"128924","Unicode hex":"1F79C"},{"Typeface name":"Wingdings 2","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"128925","Unicode hex":"1F79D"},{"Typeface name":"Wingdings 2","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"128926","Unicode hex":"1F79E"},{"Typeface name":"Wingdings 2","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"11050","Unicode hex":"2B2A"},{"Typeface name":"Wingdings 2","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"11047","Unicode hex":"2B27"},{"Typeface name":"Wingdings 2","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"9674","Unicode hex":"25CA"},{"Typeface name":"Wingdings 2","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"128928","Unicode hex":"1F7A0"},{"Typeface name":"Wingdings 2","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"9686","Unicode hex":"25D6"},{"Typeface name":"Wingdings 2","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"9687","Unicode hex":"25D7"},{"Typeface name":"Wingdings 2","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"11210","Unicode hex":"2BCA"},{"Typeface name":"Wingdings 2","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"11211","Unicode hex":"2BCB"},{"Typeface name":"Wingdings 2","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"11200","Unicode hex":"2BC0"},{"Typeface name":"Wingdings 2","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"11201","Unicode hex":"2BC1"},{"Typeface name":"Wingdings 2","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"11039","Unicode hex":"2B1F"},{"Typeface name":"Wingdings 2","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"11202","Unicode hex":"2BC2"},{"Typeface name":"Wingdings 2","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"11043","Unicode hex":"2B23"},{"Typeface name":"Wingdings 2","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"11042","Unicode hex":"2B22"},{"Typeface name":"Wingdings 2","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"11203","Unicode hex":"2BC3"},{"Typeface name":"Wingdings 2","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"11204","Unicode hex":"2BC4"},{"Typeface name":"Wingdings 2","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"128929","Unicode hex":"1F7A1"},{"Typeface name":"Wingdings 2","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"128930","Unicode hex":"1F7A2"},{"Typeface name":"Wingdings 2","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"128931","Unicode hex":"1F7A3"},{"Typeface name":"Wingdings 2","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"128932","Unicode hex":"1F7A4"},{"Typeface name":"Wingdings 2","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"128933","Unicode hex":"1F7A5"},{"Typeface name":"Wingdings 2","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"128934","Unicode hex":"1F7A6"},{"Typeface name":"Wingdings 2","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"128935","Unicode hex":"1F7A7"},{"Typeface name":"Wingdings 2","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"128936","Unicode hex":"1F7A8"},{"Typeface name":"Wingdings 2","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"128937","Unicode hex":"1F7A9"},{"Typeface name":"Wingdings 2","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"128938","Unicode hex":"1F7AA"},{"Typeface name":"Wingdings 2","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"128939","Unicode hex":"1F7AB"},{"Typeface name":"Wingdings 2","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"128940","Unicode hex":"1F7AC"},{"Typeface name":"Wingdings 2","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"128941","Unicode hex":"1F7AD"},{"Typeface name":"Wingdings 2","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"128942","Unicode hex":"1F7AE"},{"Typeface name":"Wingdings 2","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"128943","Unicode hex":"1F7AF"},{"Typeface name":"Wingdings 2","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"128944","Unicode hex":"1F7B0"},{"Typeface name":"Wingdings 2","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"128945","Unicode hex":"1F7B1"},{"Typeface name":"Wingdings 2","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"128946","Unicode hex":"1F7B2"},{"Typeface name":"Wingdings 2","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"128947","Unicode hex":"1F7B3"},{"Typeface name":"Wingdings 2","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"128948","Unicode hex":"1F7B4"},{"Typeface name":"Wingdings 2","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"128949","Unicode hex":"1F7B5"},{"Typeface name":"Wingdings 2","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"128950","Unicode hex":"1F7B6"},{"Typeface name":"Wingdings 2","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"128951","Unicode hex":"1F7B7"},{"Typeface name":"Wingdings 2","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"128952","Unicode hex":"1F7B8"},{"Typeface name":"Wingdings 2","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"128953","Unicode hex":"1F7B9"},{"Typeface name":"Wingdings 2","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"128954","Unicode hex":"1F7BA"},{"Typeface name":"Wingdings 2","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"128955","Unicode hex":"1F7BB"},{"Typeface name":"Wingdings 2","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"128956","Unicode hex":"1F7BC"},{"Typeface name":"Wingdings 2","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"128957","Unicode hex":"1F7BD"},{"Typeface name":"Wingdings 2","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"128958","Unicode hex":"1F7BE"},{"Typeface name":"Wingdings 2","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"128959","Unicode hex":"1F7BF"},{"Typeface name":"Wingdings 2","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"128960","Unicode hex":"1F7C0"},{"Typeface name":"Wingdings 2","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"128962","Unicode hex":"1F7C2"},{"Typeface name":"Wingdings 2","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"128964","Unicode hex":"1F7C4"},{"Typeface name":"Wingdings 2","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"128966","Unicode hex":"1F7C6"},{"Typeface name":"Wingdings 2","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"128969","Unicode hex":"1F7C9"},{"Typeface name":"Wingdings 2","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"128970","Unicode hex":"1F7CA"},{"Typeface name":"Wingdings 2","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"10038","Unicode hex":"2736"},{"Typeface name":"Wingdings 2","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"128972","Unicode hex":"1F7CC"},{"Typeface name":"Wingdings 2","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"128974","Unicode hex":"1F7CE"},{"Typeface name":"Wingdings 2","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"128976","Unicode hex":"1F7D0"},{"Typeface name":"Wingdings 2","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"128978","Unicode hex":"1F7D2"},{"Typeface name":"Wingdings 2","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"10041","Unicode hex":"2739"},{"Typeface name":"Wingdings 2","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"128963","Unicode hex":"1F7C3"},{"Typeface name":"Wingdings 2","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"128967","Unicode hex":"1F7C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"10031","Unicode hex":"272F"},{"Typeface name":"Wingdings 2","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"128973","Unicode hex":"1F7CD"},{"Typeface name":"Wingdings 2","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"128980","Unicode hex":"1F7D4"},{"Typeface name":"Wingdings 2","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"11212","Unicode hex":"2BCC"},{"Typeface name":"Wingdings 2","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"11213","Unicode hex":"2BCD"},{"Typeface name":"Wingdings 2","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"8251","Unicode hex":"203B"},{"Typeface name":"Wingdings 2","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"8258","Unicode hex":"2042"},{"Typeface name":"Wingdings 3","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Wingdings 3","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"11104","Unicode hex":"2B60"},{"Typeface name":"Wingdings 3","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"11106","Unicode hex":"2B62"},{"Typeface name":"Wingdings 3","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"11105","Unicode hex":"2B61"},{"Typeface name":"Wingdings 3","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"11107","Unicode hex":"2B63"},{"Typeface name":"Wingdings 3","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"11110","Unicode hex":"2B66"},{"Typeface name":"Wingdings 3","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"11111","Unicode hex":"2B67"},{"Typeface name":"Wingdings 3","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"11113","Unicode hex":"2B69"},{"Typeface name":"Wingdings 3","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"11112","Unicode hex":"2B68"},{"Typeface name":"Wingdings 3","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"11120","Unicode hex":"2B70"},{"Typeface name":"Wingdings 3","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"11122","Unicode hex":"2B72"},{"Typeface name":"Wingdings 3","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"11121","Unicode hex":"2B71"},{"Typeface name":"Wingdings 3","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"11123","Unicode hex":"2B73"},{"Typeface name":"Wingdings 3","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"11126","Unicode hex":"2B76"},{"Typeface name":"Wingdings 3","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"11128","Unicode hex":"2B78"},{"Typeface name":"Wingdings 3","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"11131","Unicode hex":"2B7B"},{"Typeface name":"Wingdings 3","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"11133","Unicode hex":"2B7D"},{"Typeface name":"Wingdings 3","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"11108","Unicode hex":"2B64"},{"Typeface name":"Wingdings 3","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"11109","Unicode hex":"2B65"},{"Typeface name":"Wingdings 3","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"11114","Unicode hex":"2B6A"},{"Typeface name":"Wingdings 3","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"11116","Unicode hex":"2B6C"},{"Typeface name":"Wingdings 3","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"11115","Unicode hex":"2B6B"},{"Typeface name":"Wingdings 3","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"11117","Unicode hex":"2B6D"},{"Typeface name":"Wingdings 3","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"11085","Unicode hex":"2B4D"},{"Typeface name":"Wingdings 3","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"11168","Unicode hex":"2BA0"},{"Typeface name":"Wingdings 3","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"11169","Unicode hex":"2BA1"},{"Typeface name":"Wingdings 3","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"11170","Unicode hex":"2BA2"},{"Typeface name":"Wingdings 3","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"11171","Unicode hex":"2BA3"},{"Typeface name":"Wingdings 3","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"11172","Unicode hex":"2BA4"},{"Typeface name":"Wingdings 3","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"11173","Unicode hex":"2BA5"},{"Typeface name":"Wingdings 3","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"11174","Unicode hex":"2BA6"},{"Typeface name":"Wingdings 3","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"11175","Unicode hex":"2BA7"},{"Typeface name":"Wingdings 3","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"11152","Unicode hex":"2B90"},{"Typeface name":"Wingdings 3","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"11153","Unicode hex":"2B91"},{"Typeface name":"Wingdings 3","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"11154","Unicode hex":"2B92"},{"Typeface name":"Wingdings 3","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"11155","Unicode hex":"2B93"},{"Typeface name":"Wingdings 3","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"11136","Unicode hex":"2B80"},{"Typeface name":"Wingdings 3","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"11139","Unicode hex":"2B83"},{"Typeface name":"Wingdings 3","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"11134","Unicode hex":"2B7E"},{"Typeface name":"Wingdings 3","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"11135","Unicode hex":"2B7F"},{"Typeface name":"Wingdings 3","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"11140","Unicode hex":"2B84"},{"Typeface name":"Wingdings 3","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"11142","Unicode hex":"2B86"},{"Typeface name":"Wingdings 3","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"11141","Unicode hex":"2B85"},{"Typeface name":"Wingdings 3","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"11143","Unicode hex":"2B87"},{"Typeface name":"Wingdings 3","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"11151","Unicode hex":"2B8F"},{"Typeface name":"Wingdings 3","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"11149","Unicode hex":"2B8D"},{"Typeface name":"Wingdings 3","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"11150","Unicode hex":"2B8E"},{"Typeface name":"Wingdings 3","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"11148","Unicode hex":"2B8C"},{"Typeface name":"Wingdings 3","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"11118","Unicode hex":"2B6E"},{"Typeface name":"Wingdings 3","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"11119","Unicode hex":"2B6F"},{"Typeface name":"Wingdings 3","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"9099","Unicode hex":"238B"},{"Typeface name":"Wingdings 3","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"8996","Unicode hex":"2324"},{"Typeface name":"Wingdings 3","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"8963","Unicode hex":"2303"},{"Typeface name":"Wingdings 3","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"8997","Unicode hex":"2325"},{"Typeface name":"Wingdings 3","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"9251","Unicode hex":"2423"},{"Typeface name":"Wingdings 3","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"9085","Unicode hex":"237D"},{"Typeface name":"Wingdings 3","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"8682","Unicode hex":"21EA"},{"Typeface name":"Wingdings 3","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"11192","Unicode hex":"2BB8"},{"Typeface name":"Wingdings 3","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"129184","Unicode hex":"1F8A0"},{"Typeface name":"Wingdings 3","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"129185","Unicode hex":"1F8A1"},{"Typeface name":"Wingdings 3","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"129186","Unicode hex":"1F8A2"},{"Typeface name":"Wingdings 3","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"129187","Unicode hex":"1F8A3"},{"Typeface name":"Wingdings 3","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"129188","Unicode hex":"1F8A4"},{"Typeface name":"Wingdings 3","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"129189","Unicode hex":"1F8A5"},{"Typeface name":"Wingdings 3","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"129190","Unicode hex":"1F8A6"},{"Typeface name":"Wingdings 3","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"129191","Unicode hex":"1F8A7"},{"Typeface name":"Wingdings 3","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"129192","Unicode hex":"1F8A8"},{"Typeface name":"Wingdings 3","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"129193","Unicode hex":"1F8A9"},{"Typeface name":"Wingdings 3","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"129194","Unicode hex":"1F8AA"},{"Typeface name":"Wingdings 3","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"129195","Unicode hex":"1F8AB"},{"Typeface name":"Wingdings 3","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"129104","Unicode hex":"1F850"},{"Typeface name":"Wingdings 3","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"129106","Unicode hex":"1F852"},{"Typeface name":"Wingdings 3","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"129105","Unicode hex":"1F851"},{"Typeface name":"Wingdings 3","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"129107","Unicode hex":"1F853"},{"Typeface name":"Wingdings 3","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"129108","Unicode hex":"1F854"},{"Typeface name":"Wingdings 3","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"129109","Unicode hex":"1F855"},{"Typeface name":"Wingdings 3","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"129111","Unicode hex":"1F857"},{"Typeface name":"Wingdings 3","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"129110","Unicode hex":"1F856"},{"Typeface name":"Wingdings 3","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"129112","Unicode hex":"1F858"},{"Typeface name":"Wingdings 3","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"129113","Unicode hex":"1F859"},{"Typeface name":"Wingdings 3","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"9650","Unicode hex":"25B2"},{"Typeface name":"Wingdings 3","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"9660","Unicode hex":"25BC"},{"Typeface name":"Wingdings 3","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"9651","Unicode hex":"25B3"},{"Typeface name":"Wingdings 3","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"9661","Unicode hex":"25BD"},{"Typeface name":"Wingdings 3","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"9664","Unicode hex":"25C0"},{"Typeface name":"Wingdings 3","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"9654","Unicode hex":"25B6"},{"Typeface name":"Wingdings 3","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"9665","Unicode hex":"25C1"},{"Typeface name":"Wingdings 3","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"9655","Unicode hex":"25B7"},{"Typeface name":"Wingdings 3","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"9699","Unicode hex":"25E3"},{"Typeface name":"Wingdings 3","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"9698","Unicode hex":"25E2"},{"Typeface name":"Wingdings 3","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"9700","Unicode hex":"25E4"},{"Typeface name":"Wingdings 3","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"9701","Unicode hex":"25E5"},{"Typeface name":"Wingdings 3","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"128896","Unicode hex":"1F780"},{"Typeface name":"Wingdings 3","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"128898","Unicode hex":"1F782"},{"Typeface name":"Wingdings 3","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"128897","Unicode hex":"1F781"},{"Typeface name":"Wingdings 3","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"128899","Unicode hex":"1F783"},{"Typeface name":"Wingdings 3","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"11205","Unicode hex":"2BC5"},{"Typeface name":"Wingdings 3","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"11206","Unicode hex":"2BC6"},{"Typeface name":"Wingdings 3","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"11207","Unicode hex":"2BC7"},{"Typeface name":"Wingdings 3","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"11208","Unicode hex":"2BC8"},{"Typeface name":"Wingdings 3","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"11164","Unicode hex":"2B9C"},{"Typeface name":"Wingdings 3","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"11166","Unicode hex":"2B9E"},{"Typeface name":"Wingdings 3","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"11165","Unicode hex":"2B9D"},{"Typeface name":"Wingdings 3","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"11167","Unicode hex":"2B9F"},{"Typeface name":"Wingdings 3","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"129040","Unicode hex":"1F810"},{"Typeface name":"Wingdings 3","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"129042","Unicode hex":"1F812"},{"Typeface name":"Wingdings 3","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"129041","Unicode hex":"1F811"},{"Typeface name":"Wingdings 3","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"129043","Unicode hex":"1F813"},{"Typeface name":"Wingdings 3","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"129044","Unicode hex":"1F814"},{"Typeface name":"Wingdings 3","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"129046","Unicode hex":"1F816"},{"Typeface name":"Wingdings 3","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"129045","Unicode hex":"1F815"},{"Typeface name":"Wingdings 3","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"129047","Unicode hex":"1F817"},{"Typeface name":"Wingdings 3","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"129048","Unicode hex":"1F818"},{"Typeface name":"Wingdings 3","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"129050","Unicode hex":"1F81A"},{"Typeface name":"Wingdings 3","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"129049","Unicode hex":"1F819"},{"Typeface name":"Wingdings 3","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"129051","Unicode hex":"1F81B"},{"Typeface name":"Wingdings 3","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"129052","Unicode hex":"1F81C"},{"Typeface name":"Wingdings 3","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"129054","Unicode hex":"1F81E"},{"Typeface name":"Wingdings 3","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"129053","Unicode hex":"1F81D"},{"Typeface name":"Wingdings 3","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"129055","Unicode hex":"1F81F"},{"Typeface name":"Wingdings 3","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"129024","Unicode hex":"1F800"},{"Typeface name":"Wingdings 3","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"129026","Unicode hex":"1F802"},{"Typeface name":"Wingdings 3","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"129025","Unicode hex":"1F801"},{"Typeface name":"Wingdings 3","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"129027","Unicode hex":"1F803"},{"Typeface name":"Wingdings 3","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"129028","Unicode hex":"1F804"},{"Typeface name":"Wingdings 3","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"129030","Unicode hex":"1F806"},{"Typeface name":"Wingdings 3","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"129029","Unicode hex":"1F805"},{"Typeface name":"Wingdings 3","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"129031","Unicode hex":"1F807"},{"Typeface name":"Wingdings 3","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"129032","Unicode hex":"1F808"},{"Typeface name":"Wingdings 3","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"129034","Unicode hex":"1F80A"},{"Typeface name":"Wingdings 3","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"129033","Unicode hex":"1F809"},{"Typeface name":"Wingdings 3","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"129035","Unicode hex":"1F80B"},{"Typeface name":"Wingdings 3","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"129056","Unicode hex":"1F820"},{"Typeface name":"Wingdings 3","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"129058","Unicode hex":"1F822"},{"Typeface name":"Wingdings 3","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"129060","Unicode hex":"1F824"},{"Typeface name":"Wingdings 3","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"129062","Unicode hex":"1F826"},{"Typeface name":"Wingdings 3","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"129064","Unicode hex":"1F828"},{"Typeface name":"Wingdings 3","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"129066","Unicode hex":"1F82A"},{"Typeface name":"Wingdings 3","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"129068","Unicode hex":"1F82C"},{"Typeface name":"Wingdings 3","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"129180","Unicode hex":"1F89C"},{"Typeface name":"Wingdings 3","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"129181","Unicode hex":"1F89D"},{"Typeface name":"Wingdings 3","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"129182","Unicode hex":"1F89E"},{"Typeface name":"Wingdings 3","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"129183","Unicode hex":"1F89F"},{"Typeface name":"Wingdings 3","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"129070","Unicode hex":"1F82E"},{"Typeface name":"Wingdings 3","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"129072","Unicode hex":"1F830"},{"Typeface name":"Wingdings 3","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"129074","Unicode hex":"1F832"},{"Typeface name":"Wingdings 3","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"129076","Unicode hex":"1F834"},{"Typeface name":"Wingdings 3","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"129078","Unicode hex":"1F836"},{"Typeface name":"Wingdings 3","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"129080","Unicode hex":"1F838"},{"Typeface name":"Wingdings 3","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"129082","Unicode hex":"1F83A"},{"Typeface name":"Wingdings 3","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"129081","Unicode hex":"1F839"},{"Typeface name":"Wingdings 3","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"129083","Unicode hex":"1F83B"},{"Typeface name":"Wingdings 3","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"129176","Unicode hex":"1F898"},{"Typeface name":"Wingdings 3","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"129178","Unicode hex":"1F89A"},{"Typeface name":"Wingdings 3","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"129177","Unicode hex":"1F899"},{"Typeface name":"Wingdings 3","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"129179","Unicode hex":"1F89B"},{"Typeface name":"Wingdings 3","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"129084","Unicode hex":"1F83C"},{"Typeface name":"Wingdings 3","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"129086","Unicode hex":"1F83E"},{"Typeface name":"Wingdings 3","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"129085","Unicode hex":"1F83D"},{"Typeface name":"Wingdings 3","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"129087","Unicode hex":"1F83F"},{"Typeface name":"Wingdings 3","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"129088","Unicode hex":"1F840"},{"Typeface name":"Wingdings 3","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"129090","Unicode hex":"1F842"},{"Typeface name":"Wingdings 3","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"129089","Unicode hex":"1F841"},{"Typeface name":"Wingdings 3","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"129091","Unicode hex":"1F843"},{"Typeface name":"Wingdings 3","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"129092","Unicode hex":"1F844"},{"Typeface name":"Wingdings 3","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"129094","Unicode hex":"1F846"},{"Typeface name":"Wingdings 3","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"129093","Unicode hex":"1F845"},{"Typeface name":"Wingdings 3","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"129095","Unicode hex":"1F847"},{"Typeface name":"Wingdings 3","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"11176","Unicode hex":"2BA8"},{"Typeface name":"Wingdings 3","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"11177","Unicode hex":"2BA9"},{"Typeface name":"Wingdings 3","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"11178","Unicode hex":"2BAA"},{"Typeface name":"Wingdings 3","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"11179","Unicode hex":"2BAB"},{"Typeface name":"Wingdings 3","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"11180","Unicode hex":"2BAC"},{"Typeface name":"Wingdings 3","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"11181","Unicode hex":"2BAD"},{"Typeface name":"Wingdings 3","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"11182","Unicode hex":"2BAE"},{"Typeface name":"Wingdings 3","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"11183","Unicode hex":"2BAF"},{"Typeface name":"Wingdings 3","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"129120","Unicode hex":"1F860"},{"Typeface name":"Wingdings 3","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"129122","Unicode hex":"1F862"},{"Typeface name":"Wingdings 3","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"129121","Unicode hex":"1F861"},{"Typeface name":"Wingdings 3","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"129123","Unicode hex":"1F863"},{"Typeface name":"Wingdings 3","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"129124","Unicode hex":"1F864"},{"Typeface name":"Wingdings 3","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"129125","Unicode hex":"1F865"},{"Typeface name":"Wingdings 3","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"129127","Unicode hex":"1F867"},{"Typeface name":"Wingdings 3","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"129126","Unicode hex":"1F866"},{"Typeface name":"Wingdings 3","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"129136","Unicode hex":"1F870"},{"Typeface name":"Wingdings 3","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"129138","Unicode hex":"1F872"},{"Typeface name":"Wingdings 3","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"129137","Unicode hex":"1F871"},{"Typeface name":"Wingdings 3","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"129139","Unicode hex":"1F873"},{"Typeface name":"Wingdings 3","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"129140","Unicode hex":"1F874"},{"Typeface name":"Wingdings 3","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"129141","Unicode hex":"1F875"},{"Typeface name":"Wingdings 3","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"129143","Unicode hex":"1F877"},{"Typeface name":"Wingdings 3","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"129142","Unicode hex":"1F876"},{"Typeface name":"Wingdings 3","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"129152","Unicode hex":"1F880"},{"Typeface name":"Wingdings 3","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"129154","Unicode hex":"1F882"},{"Typeface name":"Wingdings 3","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"129153","Unicode hex":"1F881"},{"Typeface name":"Wingdings 3","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"129155","Unicode hex":"1F883"},{"Typeface name":"Wingdings 3","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"129156","Unicode hex":"1F884"},{"Typeface name":"Wingdings 3","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"129157","Unicode hex":"1F885"},{"Typeface name":"Wingdings 3","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"129159","Unicode hex":"1F887"},{"Typeface name":"Wingdings 3","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"129158","Unicode hex":"1F886"},{"Typeface name":"Wingdings 3","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"129168","Unicode hex":"1F890"},{"Typeface name":"Wingdings 3","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"129170","Unicode hex":"1F892"},{"Typeface name":"Wingdings 3","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"129169","Unicode hex":"1F891"},{"Typeface name":"Wingdings 3","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"129171","Unicode hex":"1F893"},{"Typeface name":"Wingdings 3","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"129172","Unicode hex":"1F894"},{"Typeface name":"Wingdings 3","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"129174","Unicode hex":"1F896"},{"Typeface name":"Wingdings 3","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"129173","Unicode hex":"1F895"},{"Typeface name":"Wingdings 3","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"129175","Unicode hex":"1F897"}]
255;r.default=i},{}],85:[function(t,n,r){function i(v,x){return d[v.toUpperCase()+"_"+x]}function a(v,x){return i(v,parseInt(x,10))}function o(v,x){return i(v,parseInt(x,16))}function c(v){if(65535>=v)return String.fromCharCode(v);var x=Math.floor((v-65536)/1024)+55296,w=(v-65536)%1024+56320;return String.fromCharCode(x,w)}var l=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(r,"__esModule",{value:!0}),r.hex=r.dec=r.codePoint=void 0;for(var u=l(t("./dingbats")),d={},h=String.fromCodePoint?String.fromCodePoint:c,f=0,p=u.default;f<p.length;f++){var y=p[f],g=parseInt(y["Unicode dec"],10),b={codePoint:g,string:h(g)};d[y["Typeface name"].toUpperCase()+"_"+y["Dingbat dec"]]=b}r.codePoint=i,r.dec=a,r.hex=o},{"./dingbats":84}],86:[function(t,n,r){r.read=function(i,a,o,c,l){var u,d,h=8*l-c-1,f=(1<<h)-1,p=f>>1,y=-7,g=o?l-1:0,b=o?-1:1,v=i[a+g];for(g+=b,u=v&(1<<-y)-1,v>>=-y,y+=h;y>0;u=256*u+i[a+g],g+=b,y-=8);for(d=u&(1<<-y)-1,u>>=-y,y+=c;y>0;d=256*d+i[a+g],g+=b,y-=8);if(u===0)u=1-p;else{if(u===f)return d?NaN:(v?-1:1)*(1/0);d+=Math.pow(2,c),u-=p}return(v?-1:1)*d*Math.pow(2,u-c)},r.write=function(i,a,o,c,l,u){var d,h,f,p=8*u-l-1,y=(1<<p)-1,g=y>>1,b=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=c?0:u-1,x=c?1:-1,w=0>a||a===0&&0>1/a?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(h=isNaN(a)?1:0,d=y):(d=Math.floor(Math.log(a)/Math.LN2),a*(f=Math.pow(2,-d))<1&&(d--,f*=2),a+=d+g>=1?b/f:b*Math.pow(2,1-g),a*f>=2&&(d++,f/=2),d+g>=y?(h=0,d=y):d+g>=1?(h=(a*f-1)*Math.pow(2,l),d+=g):(h=a*Math.pow(2,g-1)*Math.pow(2,l),d=0));l>=8;i[o+v]=255&h,v+=x,h/=256,l-=8);for(d=d<<l|h,p+=l;p>0;i[o+v]=255&d,v+=x,d/=256,p-=8);i[o+v-x]|=128*w}},{}],87:[function(t,n,r){var i={}.toString;n.exports=Array.isArray||function(a){return i.call(a)=="[object Array]"}},{}],88:[function(t,n,r){(function(i,a){(function(o){typeof r=="object"&&typeof n<"u"?n.exports=o():(typeof window<"u"?window:typeof i<"u"?i:typeof self<"u"?self:this).JSZip=o()})(function(){return(function o(c,l,u){function d(p,y){if(!l[p]){if(!c[p]){var g=typeof t=="function"&&t;if(!y&&g)return g(p,!0);if(h)return h(p,!0);var b=new Error("Cannot find module '"+p+"'");throw b.code="MODULE_NOT_FOUND",b}var v=l[p]={exports:{}};c[p][0].call(v.exports,function(x){var w=c[p][1][x];return d(w||x)},v,v.exports,o,c,l,u)}return l[p].exports}for(var h=typeof t=="function"&&t,f=0;f<u.length;f++)d(u[f]);return d})({1:[function(o,c,l){var u=o("./utils"),d=o("./support"),h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";l.encode=function(f){for(var p,y,g,b,v,x,w,_=[],T=0,S=f.length,C=S,D=u.getTypeOf(f)!=="string";T<f.length;)C=S-T,g=D?(p=f[T++],y=S>T?f[T++]:0,S>T?f[T++]:0):(p=f.charCodeAt(T++),y=S>T?f.charCodeAt(T++):0,S>T?f.charCodeAt(T++):0),b=p>>2,v=(3&p)<<4|y>>4,x=C>1?(15&y)<<2|g>>6:64,w=C>2?63&g:64,_.push(h.charAt(b)+h.charAt(v)+h.charAt(x)+h.charAt(w));return _.join("")},l.decode=function(f){var p,y,g,b,v,x,w=0,_=0,T="data:";if(f.substr(0,T.length)===T)throw new Error("Invalid base64 input, it looks like a data url.");var S,C=3*(f=f.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(f.charAt(f.length-1)===h.charAt(64)&&C--,f.charAt(f.length-2)===h.charAt(64)&&C--,C%1!=0)throw new Error("Invalid base64 input, bad content length.");for(S=d.uint8array?new Uint8Array(0|C):new Array(0|C);w<f.length;)p=h.indexOf(f.charAt(w++))<<2|(b=h.indexOf(f.charAt(w++)))>>4,y=(15&b)<<4|(v=h.indexOf(f.charAt(w++)))>>2,g=(3&v)<<6|(x=h.indexOf(f.charAt(w++))),S[_++]=p,v!==64&&(S[_++]=y),x!==64&&(S[_++]=g);return S}},{"./support":30,"./utils":32}],2:[function(o,c,l){function u(y,g,b,v,x){this.compressedSize=y,this.uncompressedSize=g,this.crc32=b,this.compression=v,this.compressedContent=x}var d=o("./external"),h=o("./stream/DataWorker"),f=o("./stream/Crc32Probe"),p=o("./stream/DataLengthProbe");u.prototype={getContentWorker:function(){var y=new h(d.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new p("data_length")),g=this;return y.on("end",function(){if(this.streamInfo.data_length!==g.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new h(d.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(y,g,b){return y.pipe(new f).pipe(new p("uncompressedSize")).pipe(g.compressWorker(b)).pipe(new p("compressedSize")).withStreamInfo("compression",g)},c.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(o,c,l){var u=o("./stream/GenericWorker");l.STORE={magic:"\0\0",compressWorker:function(d){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},l.DEFLATE=o("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(o,c,l){var u=o("./utils"),d=(function(){for(var h,f=[],p=0;256>p;p++){h=p;for(var y=0;8>y;y++)h=1&h?3988292384^h>
255>>1:h>>>1;f[p]=h}return f})();c.exports=function(h,f){return h!==void 0&&h.length?u.getTypeOf(h)!=="string"?(function(p,y,g,b){var v=d,x=b+g;p^=-1;for(var w=b;x>w;w++)p=p>>>8^v[255&(p^y[w])];return-1^p})(0|f,h,h.length,0):(function(p,y,g,b){var v=d,x=b+g;p^=-1;for(var w=b;x>w;w++)p=p>>>8^v[255&(p^y.charCodeAt(w))];return-1^p})(0|f,h,h.length,0):0}},{"./utils":32}],5:[function(o,c,l){l.base64=!1,l.binary=!1,l.dir=!1,l.createFolders=!0,l.date=null,l.compression=null,l.compressionOptions=null,l.comment=null,l.unixPermissions=null,l.dosPermissions=null},{}],6:[function(o,c,l){var u=null;u=typeof Promise<"u"?Promise:o("lie"),c.exports={Promise:u}},{lie:37}],7:[function(o,c,l){function u(g,b){p.call(this,"FlateWorker/"+g),this._pako=null,this._pakoAction=g,this._pakoOptions=b,this.meta={}}var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",h=o("pako"),f=o("./utils"),p=o("./stream/GenericWorker"),y=d?"uint8array":"array";l.magic="\b\0",f.inherits(u,p),u.prototype.processChunk=function(g){this.meta=g.meta,this._pako===null&&this._createPako(),this._pako.push(f.transformTo(y,g.data),!1)},u.prototype.flush=function(){p.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){p.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new h[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var g=this;this._pako.onData=function(b){g.push({data:b,meta:g.meta})}},l.compressWorker=function(g){return new u("Deflate",g)},l.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(o,c,l){function u(v,x){var w,_="";for(w=0;x>w;w++)_+=String.fromCharCode(255&v),v>>>=8;return _}function d(v,x,w,_,T,S){var C,D,N=v.file,M=v.compression,F=S!==y.utf8encode,L=f.transformTo("string",S(N.name)),A=f.transformTo("string",y.utf8encode(N.name)),X=N.comment,he=f.transformTo("string",S(X)),j=f.transformTo("string",y.utf8encode(X)),ee=A.length!==N.name.length,O=j.length!==X.length,pe="",q="",B="",re=N.dir,le=N.date,ge={crc32:0,compressedSize:0,uncompressedSize:0};x&&!w||(ge.crc32=v.crc32,ge.compressedSize=v.compressedSize,ge.uncompressedSize=v.uncompressedSize);var ie=0;x&&(ie|=8),F||!ee&&!O||(ie|=2048);var P=0,W=0;re&&(P|=16),T==="UNIX"?(W=798,P|=(function(Y,se){var ue=Y;return Y||(ue=se?16893:33204),(65535&ue)<<16})(N.unixPermissions,re)):(W=20,P|=(function(Y){return 63&(Y||0)})(N.dosPermissions)),C=le.getUTCHours(),C<<=6,C|=le.getUTCMinutes(),C<<=5,C|=le.getUTCSeconds()/2,D=le.getUTCFullYear()-1980,D<<=4,D|=le.getUTCMonth()+1,D<<=5,D|=le.getUTCDate(),ee&&(q=u(1,1)+u(g(L),4)+A,pe+="up"+u(q.length,2)+q),O&&(B=u(1,1)+u(g(he),4)+j,pe+="uc"+u(B.length,2)+B);var te="";return te+=` 256\0`,te+=u(ie,2),te+=M.magic,te+=u(C,2),te+=u(D,2),te+=u(ge.crc32,4),te+=u(ge.compressedSize,4),te+=u(ge.uncompressedSize,4),te+=u(L.length,2),te+=u(pe.length,2),{fileRecord:b.LOCAL_FILE_HEADER+te+L+pe,dirRecord:b.CENTRAL_FILE_HEADER+u(W,2)+te+u(he.length,2)+"\0\0\0\0"+u(P,4)+u(_,4)+L+pe+he}}function h(v,x,w,_){p.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=w,this.encodeFileName=_,this.streamFiles=v,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var f=o("../utils"),p=o("../stream/GenericWorker"),y=o("../utf8"),g=o("../crc32"),b=o("../signature");f.inherits(h,p),h.prototype.push=function(v){var x=v.meta.percent||0,w=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(v):(this.bytesWritten+=v.data.length,p.prototype.push.call(this,{data:v.data,meta:{currentFile:this.currentFile,percent:w?(x+100*(w-_-1))/w:100}}))},h.prototype.openedSource=function(v){this.currentSourceOffset=this.bytesWritten,this.currentFile=v.file.name;var x=this.streamFiles&&!v.file.dir;if(x){var w=d(v,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:w.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(v){this.accumulate=!1;var x=this.streamFiles&&!v.file.dir,w=d(v,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(w.dirRecord),x)this.push({data:(function(_){return b.DATA_DESCRIPTOR+u(_.crc32,4)+u(_.compressedSize,4)+u(_.uncompressedSize,4)})(v),meta:{percent:100}});else for(this.push({data:w.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var v=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var w=this.bytesWritten-v,_=(function(T,S,C,D,N){var M=f.transformTo("string",N(D));return b.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(T,2)+u(T,2)+u(S,4)+u(C,4)+u(M.length,2)+M})(this.dirRecords.length,w,v,this.zipComment,this.encodeFileName);this.push({data:_,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(v){this._sources.push(v);var x=this;return v.on("data",function(w){x.processChunk(w)}),v.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),v.on("error",function(w){x.error(w)}),this},h.prototype.resume=function(){return!!p.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(v){var x=this._sources;if(!p.prototype.error.call(this,v))return!1;for(var w=0;w<x.length;w++)try{x[w].error(v)}catch{}return!0},h.prototype.lock=function(){p.prototype.lock.call(this);for(var v=this._sources,x=0;x<v.length;x++)v[x].lock()},c.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(o,c,l){var u=o("../compressions"),d=o("./ZipFileWorker");l.generateWorker=function(h,f,p){var y=new d(f.streamFiles,p,f.platform,f.encodeFileName),g=0;try{h.forEach(function(b,v){g++;var x=(function(S,C){var D=S||C,N=u[D];if(!N)throw new Error(D+" is not a valid compression method !");return N})(v.options.compression,f.compression),w=v.options.compressionOptions||f.compressionOptions||{},_=v.dir,T=v.date;v._compressWorker(x,w).withStreamInfo("file",{name:b,dir:_,date:T,comment:v.comment||"",unixPermissions:v.unixPermissions,dosPermissions:v.dosPermissions}).pipe(y)}),y.entriesCount=g}catch(b){y.error(b)}return y}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(o,c,l){function u(){if(!(this instanceof u))return new u;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var d=new u;for(var h in this)typeof this[h]!="function"&&(d[h]=this[h]);return d}}(u.prototype=o("./object")).loadAsync=o("./load"),u.support=o("./support"),u.defaults=o("./defaults"),u.ver
vendor: 2,604 bytes, line 256
256sion="3.7.1",u.loadAsync=function(d,h){return new u().loadAsync(d,h)},u.external=o("./external"),c.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(o,c,l){function u(b){return new h.Promise(function(v,x){var w=b.decompressed.getContentWorker().pipe(new y);w.on("error",function(_){x(_)}).on("end",function(){w.streamInfo.crc32!==b.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):v()}).resume()})}var d=o("./utils"),h=o("./external"),f=o("./utf8"),p=o("./zipEntries"),y=o("./stream/Crc32Probe"),g=o("./nodejsUtils");c.exports=function(b,v){var x=this;return v=d.extend(v||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:f.utf8decode}),g.isNode&&g.isStream(b)?h.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):d.prepareContent("the loaded zip file",b,!0,v.optimizedBinaryString,v.base64).then(function(w){var _=new p(v);return _.load(w),_}).then(function(w){var _=[h.Promise.resolve(w)],T=w.files;if(v.checkCRC32)for(var S=0;S<T.length;S++)_.push(u(T[S]));return h.Promise.all(_)}).then(function(w){for(var _=w.shift(),T=_.files,S=0;S<T.length;S++){var C=T[S];x.file(C.fileNameStr,C.decompressed,{binary:!0,optimizedBinaryString:!0,date:C.date,dir:C.dir,comment:C.fileCommentStr.length?C.fileCommentStr:null,unixPermissions:C.unixPermissions,dosPermissions:C.dosPermissions,createFolders:v.createFolders})}return _.zipComment.length&&(x.comment=_.zipComment),x})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(o,c,l){function u(f,p){h.call(this,"Nodejs stream input adapter for "+f),this._upstreamEnded=!1,this._bindStream(p)}var d=o("../utils"),h=o("../stream/GenericWorker");d.inherits(u,h),u.prototype._bindStream=function(f){var p=this;(this._stream=f).pause(),f.on("data",function(y){p.push({data:y,meta:{percent:0}})}).on("error",function(y){p.isPaused?this.generatedError=y:p.error(y)}).on("end",function(){p.isPaused?p._upstreamEnded=!0:p.end()})},u.prototype.pause=function(){return!!h.prototype.pause.call(this)&&(this._stream.pause(),!0)},u.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},c.exports=u},{"../stream/GenericWorker":28,"../utils":32}],13:[function(o,c,l){function u(h,f,p){d.call(this,f),this._helper=h;var y=this;h.on("data",function(g,b){y.push(g)||y._helper.pause(),p&&p(b)}).on("error",function(g){y.emit("error",g)}).on("end",function(){y.push(null)})}var d=o("readable-stream").Readable;
vendor: 4,528 bytes, line 256
256o("../utils").inherits(u,d),u.prototype._read=function(){this._helper.resume()},c.exports=u},{"../utils":32,"readable-stream":16}],14:[function(o,c,l){c.exports={isNode:typeof a<"u",newBufferFrom:function(u,d){if(a.from&&a.from!==Uint8Array.from)return a.from(u,d);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new a(u,d)},allocBuffer:function(u){if(a.alloc)return a.alloc(u);var d=new a(u);return d.fill(0),d},isBuffer:function(u){return a.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(o,c,l){function u(N,M,F){var L,A=f.getTypeOf(M),X=f.extend(F||{},g);X.date=X.date||new Date,X.compression!==null&&(X.compression=X.compression.toUpperCase()),typeof X.unixPermissions=="string"&&(X.unixPermissions=parseInt(X.unixPermissions,8)),X.unixPermissions&&16384&X.unixPermissions&&(X.dir=!0),X.dosPermissions&&16&X.dosPermissions&&(X.dir=!0),X.dir&&(N=S(N)),X.createFolders&&(L=T(N))&&C.call(this,L,!0);var he=A==="string"&&X.binary===!1&&X.base64===!1;F&&F.binary!==void 0||(X.binary=!he),(M instanceof b&&M.uncompressedSize===0||X.dir||!M||M.length===0)&&(X.base64=!1,X.binary=!0,M="",X.compression="STORE",A="string");var j=null;j=M instanceof b||M instanceof p?M:w.isNode&&w.isStream(M)?new _(N,M):f.prepareContent(N,M,X.binary,X.optimizedBinaryString,X.base64);var ee=new v(N,j,X);this.files[N]=ee}function d(N){return Object.prototype.toString.call(N)==="[object RegExp]"}var h=o("./utf8"),f=o("./utils"),p=o("./stream/GenericWorker"),y=o("./stream/StreamHelper"),g=o("./defaults"),b=o("./compressedObject"),v=o("./zipObject"),x=o("./generate"),w=o("./nodejsUtils"),_=o("./nodejs/NodejsStreamInputAdapter"),T=function(N){N.slice(-1)==="/"&&(N=N.substring(0,N.length-1));var M=N.lastIndexOf("/");return M>0?N.substring(0,M):""},S=function(N){return N.slice(-1)!=="/"&&(N+="/"),N},C=function(N,M){return M=M!==void 0?M:g.createFolders,N=S(N),this.files[N]||u.call(this,N,null,{dir:!0,createFolders:M}),this.files[N]},D={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(N){var M,F,L;for(M in this.files)L=this.files[M],(F=M.slice(this.root.length,M.length))&&M.slice(0,this.root.length)===this.root&&N(F,L)},filter:function(N){var M=[];return this.forEach(function(F,L){N(F,L)&&M.push(L)}),M},file:function(N,M,F){if(arguments.length!==1)return N=this.root+N,u.call(this,N,M,F),this;if(d(N)){var L=N;return this.filter(function(X,he){return!he.dir&&L.test(X)})}var A=this.files[this.root+N];return A&&!A.dir?A:null},folder:function(N){if(!N)return this;if(d(N))return this.filter(function(A,X){return X.dir&&N.test(A)});var M=this.root+N,F=C.call(this,M),L=this.clone();return L.root=F.name,L},remove:function(N){N=this.root+N;var M=this.files[N];if(M||(N.slice(-1)!=="/"&&(N+="/"),M=this.files[N]),M&&!M.dir)delete this.files[N];else for(var F=this.filter(function(A,X){return X.name.slice(0,N.length)===N}),L=0;L<F.length;L++)delete this.files[F[L].name];return this},generate:function(N){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(N){var M,F={};try{if((F=f.extend(N||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:h.utf8encode})).type=F.type.toLowerCase(),F.compression=F.compression.toUpperCase(),F.type==="binarystring"&&(F.type="string"),!F.type)throw new Error("No output type specified.");f.checkSupport(F.type),F.platform!=="darwin"&&F.platform!=="freebsd"&&F.platform!=="linux"&&F.platform!=="sunos"||(F.platform="UNIX"),F.platform==="win32"&&(F.platform="DOS");var L=F.comment||this.comment||"";M=x.generateWorker(this,F,L)}catch(A){(M=new p("error")).error(A)}return new y(M,F.type||"string",F.mimeType)},generateAsync:function(N,M){return this.generateInternalStream(N).accumulate(M)},generateNodeStream:function(N,M){return(N=N||{}).type||(N.type="nodebuffer"),this.generateInternalStream(N).toNodejsStream(M)}};c.exports=D},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(o,c,l){c.exports=o("stream")},{stream:void 0}],17:[function(o,c,l){function u(h){d.call(this,h);for(var f=0;f<this.data.length;f++)h[f]=255&h[f]}var d=o("./DataReader");
vendor: 5,004 bytes, line 256
256o("../utils").inherits(u,d),u.prototype.byteAt=function(h){return this.data[this.zero+h]},u.prototype.lastIndexOfSignature=function(h){for(var f=h.charCodeAt(0),p=h.charCodeAt(1),y=h.charCodeAt(2),g=h.charCodeAt(3),b=this.length-4;b>=0;--b)if(this.data[b]===f&&this.data[b+1]===p&&this.data[b+2]===y&&this.data[b+3]===g)return b-this.zero;return-1},u.prototype.readAndCheckSignature=function(h){var f=h.charCodeAt(0),p=h.charCodeAt(1),y=h.charCodeAt(2),g=h.charCodeAt(3),b=this.readData(4);return f===b[0]&&p===b[1]&&y===b[2]&&g===b[3]},u.prototype.readData=function(h){if(this.checkOffset(h),h===0)return[];var f=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,f},c.exports=u},{"../utils":32,"./DataReader":18}],18:[function(o,c,l){function u(h){this.data=h,this.length=h.length,this.index=0,this.zero=0}var d=o("../utils");u.prototype={checkOffset:function(h){this.checkIndex(this.index+h)},checkIndex:function(h){if(this.length<this.zero+h||0>h)throw new Error("End of data reached (data length = "+this.length+", asked index = "+h+"). Corrupted zip ?")},setIndex:function(h){this.checkIndex(h),this.index=h},skip:function(h){this.setIndex(this.index+h)},byteAt:function(h){},readInt:function(h){var f,p=0;for(this.checkOffset(h),f=this.index+h-1;f>=this.index;f--)p=(p<<8)+this.byteAt(f);return this.index+=h,p},readString:function(h){return d.transformTo("string",this.readData(h))},readData:function(h){},lastIndexOfSignature:function(h){},readAndCheckSignature:function(h){},readDate:function(){var h=this.readInt(4);return new Date(Date.UTC(1980+(h>>25&127),(h>>21&15)-1,h>>16&31,h>>11&31,h>>5&63,(31&h)<<1))}},c.exports=u},{"../utils":32}],19:[function(o,c,l){function u(h){d.call(this,h)}var d=o("./Uint8ArrayReader");o("../utils").inherits(u,d),u.prototype.readData=function(h){this.checkOffset(h);var f=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,f},c.exports=u},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(o,c,l){function u(h){d.call(this,h)}var d=o("./DataReader");o("../utils").inherits(u,d),u.prototype.byteAt=function(h){return this.data.charCodeAt(this.zero+h)},u.prototype.lastIndexOfSignature=function(h){return this.data.lastIndexOf(h)-this.zero},u.prototype.readAndCheckSignature=function(h){return h===this.readData(4)},u.prototype.readData=function(h){this.checkOffset(h);var f=this.data.slice(this.zero+this.index,this.zero+this.index+h);return this.index+=h,f},c.exports=u},{"../utils":32,"./DataReader":18}],21:[function(o,c,l){function u(h){d.call(this,h)}var d=o("./ArrayReader");o("../utils").inherits(u,d),u.prototype.readData=function(h){if(this.checkOffset(h),h===0)return new Uint8Array(0);var f=this.data.subarray(this.zero+this.index,this.zero+this.index+h);return this.index+=h,f},c.exports=u},{"../utils":32,"./ArrayReader":17}],22:[function(o,c,l){var u=o("../utils"),d=o("../support"),h=o("./ArrayReader"),f=o("./StringReader"),p=o("./NodeBufferReader"),y=o("./Uint8ArrayReader");c.exports=function(g){var b=u.getTypeOf(g);return u.checkSupport(b),b!=="string"||d.uint8array?b==="nodebuffer"?new p(g):d.uint8array?new y(u.transformTo("uint8array",g)):new h(u.transformTo("array",g)):new f(g)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(o,c,l){l.LOCAL_FILE_HEADER="PK��",l.CENTRAL_FILE_HEADER="PK��",l.CENTRAL_DIRECTORY_END="PK��",l.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",l.ZIP64_CENTRAL_DIRECTORY_END="PK��",l.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(o,c,l){function u(f){d.call(this,"ConvertWorker to "+f),this.destType=f}var d=o("./GenericWorker"),h=o("../utils");h.inherits(u,d),u.prototype.processChunk=function(f){this.push({data:h.transformTo(this.destType,f.data),meta:f.meta})},c.exports=u},{"../utils":32,"./GenericWorker":28}],25:[function(o,c,l){function u(){d.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var d=o("./GenericWorker"),h=o("../crc32");o("../utils").inherits(u,d),u.prototype.processChunk=function(f){this.streamInfo.crc32=h(f.data,this.streamInfo.crc32||0),this.push(f)},c.exports=u},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(o,c,l){function u(f){h.call(this,"DataLengthProbe for "+f),this.propName=f,this.withStreamInfo(f,0)}var d=o("../utils"),h=o("./GenericWorker");d.inherits(u,h),u.prototype.processChunk=function(f){if(f){var p=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=p+f.data.length}h.prototype.processChunk.call(this,f)},c.exports=u},{"../utils":32,"./GenericWorker":28}],27:[function(o,c,l){function u(f){h.call(this,"DataWorker");var p=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,f.then(function(y){p.dataIsReady=!0,p.data=y,p.max=y&&y.length||0,p.type=d.getTypeOf(y),p.isPaused||p._tickAndRepeat()},function(y){p.error(y)})}var d=o("../utils"),h=o("./GenericWorker");d.inherits(u,h),u.prototype.cleanUp=function(){h.prototype.cleanUp.c
vendor: 6,065 bytes, line 256
256all(this),this.data=null},u.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,d.delay(this._tickAndRepeat,[],this)),!0)},u.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(d.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},u.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var f=null,p=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":f=this.data.substring(this.index,p);break;case"uint8array":f=this.data.subarray(this.index,p);break;case"array":case"nodebuffer":f=this.data.slice(this.index,p)}return this.index=p,this.push({data:f,meta:{percent:this.max?this.index/this.max*100:0}})},c.exports=u},{"../utils":32,"./GenericWorker":28}],28:[function(o,c,l){function u(d){this.name=d||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}u.prototype={push:function(d){this.emit("data",d)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(d){this.emit("error",d)}return!0},error:function(d){return!this.isFinished&&(this.isPaused?this.generatedError=d:(this.isFinished=!0,this.emit("error",d),this.previous&&this.previous.error(d),this.cleanUp()),!0)},on:function(d,h){return this._listeners[d].push(h),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(d,h){if(this._listeners[d])for(var f=0;f<this._listeners[d].length;f++)this._listeners[d][f].call(this,h)},pipe:function(d){return d.registerPrevious(this)},registerPrevious:function(d){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=d.streamInfo,this.mergeStreamInfo(),this.previous=d;var h=this;return d.on("data",function(f){h.processChunk(f)}),d.on("end",function(){h.end()}),d.on("error",function(f){h.error(f)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var d=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),d=!0),this.previous&&this.previous.resume(),!d},flush:function(){},processChunk:function(d){this.push(d)},withStreamInfo:function(d,h){return this.extraStreamInfo[d]=h,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var d in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(d)&&(this.streamInfo[d]=this.extraStreamInfo[d])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var d="Worker "+this.name;return this.previous?this.previous+" -> "+d:d}},c.exports=u},{}],29:[function(o,c,l){function u(x,w){return new b.Promise(function(_,T){var S=[],C=x._internalType,D=x._outputType,N=x._mimeType;x.on("data",function(M,F){S.push(M),w&&w(F)}).on("error",function(M){S=[],T(M)}).on("end",function(){try{var M=(function(F,L,A){switch(F){case"blob":return h.newBlob(h.transformTo("arraybuffer",L),A);case"base64":return y.encode(L);default:return h.transformTo(F,L)}})(D,(function(F,L){var A,X=0,he=null,j=0;for(A=0;A<L.length;A++)j+=L[A].length;switch(F){case"string":return L.join("");case"array":return Array.prototype.concat.apply([],L);case"uint8array":for(he=new Uint8Array(j),A=0;A<L.length;A++)he.set(L[A],X),X+=L[A].length;return he;case"nodebuffer":return a.concat(L);default:throw new Error("concat : unsupported type '"+F+"'")}})(C,S),N);_(M)}catch(F){T(F)}S=[]}).resume()})}function d(x,w,_){var T=w;switch(w){case"blob":case"arraybuffer":T="uint8array";break;case"base64":T="string"}try{this._internalType=T,this._outputType=w,this._mimeType=_,h.checkSupport(T),this._worker=x.pipe(new f(T)),x.lock()}catch(S){this._worker=new p("error"),this._worker.error(S)}}var h=o("../utils"),f=o("./ConvertWorker"),p=o("./GenericWorker"),y=o("../base64"),g=o("../support"),b=o("../external"),v=null;if(g.nodestream)try{v=o("../nodejs/NodejsStreamOutputAdapter")}catch{}d.prototype={accumulate:function(x){return u(this,x)},on:function(x,w){var _=this;return x==="data"?this._worker.on(x,function(T){w.call(_,T.data,T.meta)}):this._worker.on(x,function(){h.delay(w,arguments,_)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(h.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new v(this,{objectMode:this._outputType!=="nodebuffer"},x)}},c.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(o,c,l){if(l.base64=!0,l.array=!0,l.string=!0,l.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",l.nodebuffer=typeof a<"u",l.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")l.blob=!1;else{var u=new ArrayBuffer(0);try{l.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var d=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);d.append(u),l.blob=d.getBlob("application/zip").size===0}catch{l.blob=!1}}}try{l.nodestream=!!o("readable-stream").Readable}catch{l.nodestream=!1}},{"readable-stream":16}],31:[function(o,c,l){function u(){y.call(this,"utf-8 decode"),this.leftOver=null}function d(){y.call(this,"utf-8 encode")}for(var h=o("./utils"),f=o("./support"),p=o("./nodejsUtils"),y=o("./stream/GenericWorker"),g=new Array(256),b=0;256>b;b++)g[b]=b>=252?6:b>=248?5:b>=240?4:b>=224?3:b>=192?2:1;g[254]=g[254]=1,l.utf8encode=function(v){return f.nodebuffer?p.newBufferFrom(v,"utf-8"):(function(x){var w,_,T,S,C,D=x.length,N=0;for(S=0;D>S;
256S++)(64512&(_=x.charCodeAt(S)))==55296&&D>S+1&&(64512&(T=x.charCodeAt(S+1)))==56320&&(_=65536+(_-55296<<10)+(T-56320),S++),N+=128>_?1:2048>_?2:65536>_?3:4;for(w=f.uint8array?new Uint8Array(N):new Array(N),S=C=0;N>C;S++)(64512&(_=x.charCodeAt(S)))==55296&&D>S+1&&(64512&(T=x.charCodeAt(S+1)))==56320&&(_=65536+(_-55296<<10)+(T-56320),S++),128>_?w[C++]=_:(2048>_?w[C++]=192|_>>>6:(65536>_?w[C++]=224|_>>>12:(w[C++]=240|_>>>18,w[C++]=128|_>>>12&63),w[C++]=128|_>>>6&63),w[C++]=128|63&_);return w})(v)},l.utf8decode=function(v){return f.nodebuffer?h.transformTo("nodebuffer",v).toString("utf-8"):(function(x){var w,_,T,S,C=x.length,D=new Array(2*C);for(w=_=0;C>w;)if((T=x[w++])<128)D[_++]=T;else if(4<(S=g[T]))D[_++]=65533,w+=S-1;else{for(T&=S===2?31:S===3?15:7;S>1&&C>w;)T=T<<6|63&x[w++],S--;S>1?D[_++]=65533:65536>T?D[_++]=T:(T-=65536,D[_++]=55296|T>>10&1023,D[_++]=56320|1023&T)}return D.length!==_&&(D.subarray?D=D.subarray(0,_):D.length=_),h.applyFromCharCode(D)})(v=h.transformTo(f.uint8array?"uint8array":"array",v))},h.inherits(u,y),u.prototype.processChunk=function(v){var x=h.transformTo(f.uint8array?"uint8array":"array",v.data);if(this.leftOver&&this.leftOver.length){if(f.uint8array){var w=x;(x=new Uint8Array(w.length+this.leftOver.length)).set(this.leftOver,0),x.set(w,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var _=(function(S,C){var D;for((C=C||S.length)>S.length&&(C=S.length),D=C-1;D>=0&&(192&S[D])==128;)D--;return 0>D||D===0?C:D+g[S[D]]>C?D:C})(x),T=x;_!==x.length&&(f.uint8array?(T=x.subarray(0,_),this.leftOver=x.subarray(_,x.length)):(T=x.slice(0,_),this.leftOver=x.slice(_,x.length))),this.push({data:l.utf8decode(T),meta:v.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:l.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},l.Utf8DecodeWorker=u,h.inherits(d,y),d.prototype.processChunk=function(v){this.push({data:l.utf8encode(v.data),meta:v.meta})},l.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(o,c,l){function u(_){return _}function d(_,T){for(var S=0;S<_.length;++S)T[S]=255&_.charCodeAt(S);return T}function h(_){var T=65536,S=l.getTypeOf(_),C=!0;if(S==="uint8array"?C=x.applyCanBeUsed.uint8array:S==="nodebuffer"&&(C=x.applyCanBeUsed.nodebuffer),C)for(;T>1;)try{return x.stringifyByChunk(_,S,T)}catch{T=Math.floor(T/2)}return x.stringifyByChar(_)}function f(_,T){for(var S=0;S<_.length;S++)T[S]=_[S];return T}var p=o("./support"),y=o("./base64"),g=o("./nodejsUtils"),b=o("set-immediate-shim"),v=o("./external");l.newBlob=function(_,T){l.checkSupport("blob");try{return new Blob([_],{type:T})}catch{try{var S=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return S.append(_),S.getBlob(T)}catch{throw new Error("Bug : can't construct the Blob.")}}};var x={stringifyByChunk:function(_,T,S){var C=[],D=0,N=_.length;if(S>=N)return String.fromCharCode.apply(null,_);for(;N>D;)T==="array"||T==="nodebuffer"?C.push(String.fromCharCode.apply(null,_.slice(D,Math.min(D+S,N)))):C.push(String.fromCharCode.apply(null,_.subarray(D,Math.min(D+S,N)))),D+=S;return C.join("")},stringifyByChar:function(_){for(var T="",S=0;S<_.length;S++)T+=String.fromCharCode(_[S]);return T},applyCanBeUsed:{uint8array:(function(){try{return p.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return p.nodebuffer&&String.fromCharCode.apply(null,g.allocBuffer(1)).length===1}catch{return!1}})()}};l.applyFromCharCode=h;var w={};w.string={string:u,array:function(_){return d(_,new Array(_.length))},arraybuffer:function(_){return w.string.uint8array(_).buffer},uint8array:function(_){return d(_,new Uint8Array(_.length))},nodebuffer:function(_){return d(_,g.allocBuffer(_.length))}},w.array={string:h,array:u,arraybuffer:function(_){return new Uint8Array(_).buffer},uint8array:function(_){return new Uint8Array(_)},nodebuffer:function(_){return g.newBufferFrom(_)}},w.arraybuffer={string:function(_){return h(new Uint8Array(_))},array:function(_){return f(new Uint8Array(_),new Array(_.byteLength))},arraybuffer:u,uint8array:function(_){return new Uint8Array(_)},nodebuffer:function(_){return g.newBufferFrom(new Uint8Array(_))}},w.uint8array={string:h,array:function(_){return f(_,new Array(_.length))},arraybuffer:function(_){return _.buffer},uint8array:u,nodebuffer:function(_){return g.newBufferFrom(_)}},w.nodebuffer={string:h,array:function(_){return f(_,new Array(_.length))},arraybuffer:function(_){return w.nodebuffer.uint8array(_).buffer},uint8array:function(_){return f(_,new Uint8Array(_.length))},nodebuffer:u},l.transformTo=function(_,T){if(T=T||"",!_)return T;l.checkSupport(_);var S=l.getTypeOf(T);return w[S][_](T)},l.getTypeOf=function(_){return typeof _=="string"?"string":Object.prototype.toString.call(_)==="[object Array]"?"array":p.nodebuffer&&g.isBuffer(_)?"nodebuffer":p.uint8array&&_ instanceof Uint8Array?"uint8array":p.arraybuffer&&_ instanceof ArrayBuffer?"arraybuffer":void 0},l.checkSupport=function(_){if(!p[_.toLowerCase()])throw new Error(_+" is not supported by this platform")},l.MAX_VALUE_16BITS=65535,l.MAX_VALUE_32BITS=-1,l.pretty=function(_){var T,S,C="";for(S=0;S<(_||"").length;S++)C+="\\x"+((T=_.charCodeAt(S))<16?"0":"")+T.toString(16).toUpperCase();return C},l.delay=function(_,T,S){b(function(){_.apply(S||null,T||[])})},l.inherits=function(_,T){function S(){}S.prototype=T.prototype,_.prototype=new S},l.extend=function(){var _,T,S={};for(_=0;_<arguments.length;_++)for(T in arguments[_])arguments[_].hasOwnProperty(T)&&S[T]===void 0&&(S[T]=arguments[_][T]);return S},l.prepareContent=function(_,T,S,C,D){return v.Promise.resolve(T).then(function(N){return p.blob&&(N instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(N))!==-1)&&typeof FileReader<"u"?new v.Promise(function(M,F){var L=new FileReader;L.onload=function(A){M(A.target.result)},L.onerror=function(A){F(A.target.error)},L.readAsArrayBuffer(N)}):N}).then(function(N){var M=l.getTypeOf(N);return M?(M==="arraybuffer"?N=l.transformTo("uint8array",N):M==="str
256ing"&&(D?N=y.decode(N):S&&C!==!0&&(N=(function(F){return d(F,p.uint8array?new Uint8Array(F.length):new Array(F.length))})(N))),N):v.Promise.reject(new Error("Can't read the data of '"+_+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(o,c,l){function u(g){this.files=[],this.loadOptions=g}var d=o("./reader/readerFor"),h=o("./utils"),f=o("./signature"),p=o("./zipEntry"),y=(o("./utf8"),o("./support"));u.prototype={checkSignature:function(g){if(!this.reader.readAndCheckSignature(g)){this.reader.index-=4;var b=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+h.pretty(b)+", expected "+h.pretty(g)+")")}},isSignature:function(g,b){var v=this.reader.index;this.reader.setIndex(g);var x=this.reader.readString(4)===b;return this.reader.setIndex(v),x},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var g=this.reader.readData(this.zipCommentLength),b=y.uint8array?"uint8array":"array",v=h.transformTo(b,g);this.zipComment=this.loadOptions.decodeFileName(v)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var g,b,v,x=this.zip64EndOfCentralSize-44;x>0;)g=this.reader.readInt(2),b=this.reader.readInt(4),v=this.reader.readData(b),this.zip64ExtensibleData[g]={id:g,length:b,value:v}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var g,b;for(g=0;g<this.files.length;g++)b=this.files[g],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(f.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8(),b.processAttributes()},readCentralDir:function(){var g;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(f.CENTRAL_FILE_HEADER);)(g=new p({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(g);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var g=this.reader.lastIndexOfSignature(f.CENTRAL_DIRECTORY_END);if(0>g)throw this.isSignature(0,f.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(g);var b=g;if(this.checkSignature(f.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===h.MAX_VALUE_16BITS||this.diskWithCentralDirStart===h.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===h.MAX_VALUE_16BITS||this.centralDirRecords===h.MAX_VALUE_16BITS||this.centralDirSize===h.MAX_VALUE_32BITS||this.centralDirOffset===h.MAX_VALUE_32BITS){if(this.zip64=!0,(g=this.reader.lastIndexOfSignature(f.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(g),this.checkSignature(f.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,f.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(f.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(f.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var v=this.centralDirOffset+this.centralDirSize;this.zip64&&(v+=20,v+=12+this.zip64EndOfCentralSize);var x=b-v;if(x>0)this.isSignature(b,f.CENTRAL_FILE_HEADER)||(this.reader.zero=x);else if(0>x)throw new Error("Corrupted zip: missing "+Math.abs(x)+" bytes.")},prepareReader:function(g){this.reader=d(g)},load:function(g){this.prepareReader(g),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},c.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(o,c,l){function u(v,x){this.options=v,this.loadOptions=x}var d=o("./reader/readerFor"),h=o("./utils"),f=o("./compressedObject"),p=o("./crc32"),y=o("./utf8"),g=o("./compressions"),b=o("./support");u.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(v){var x,w;if(v.skip(22),this.fileNameLength=v.readInt(2),w=v.readInt(2),this.fileName=v.readData(this.fileNameLength),v.skip(w),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((x=(function(_){for(var T in g)if(g.hasOwnProperty(T)&&g[T].magic===_)return g[T];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+h.pretty(this.compressionMethod)+" unknown (inner file : "+h.transformTo("string",this.fileName)+")");this.decompressed=new f(this.compressedSize,this.uncompressedSize,this.crc32,x,v.readData(this.compressedSize))},readCentralPart:function(v){this.versionMadeBy=v.readInt(2),v.skip(2),this.bitFlag=v.readInt(2),this.compressionMethod=v.readString(2),this.date=v.readDate(),this.crc32=v.readInt(4),this.compressedSize=v.readInt(4),this.uncompressedSize=v.readInt(4);var x=v.readInt(2);if(this.extraFieldsLength=v.readInt(2),this.fileCommentLength=v.readInt(2),this.diskNumberStart=v.readInt(2),this.internalFileAttributes=v.readInt(2),this.externalFileAttributes=v.readInt(4),this.localHeaderOffset=v.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");v.skip(x),this.readExtraFields(v),this.parseZIP64ExtraField(v),this.fileComment=v.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var v=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),v==0&&(this.dosPermissions=63&this.externalFileAttributes),v==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(v){if(this.extraFields[1]){var x=d(this.extraFields[1].value);
vendor: 2,524 bytes, line 256
256this.uncompressedSize===h.MAX_VALUE_32BITS&&(this.uncompressedSize=x.readInt(8)),this.compressedSize===h.MAX_VALUE_32BITS&&(this.compressedSize=x.readInt(8)),this.localHeaderOffset===h.MAX_VALUE_32BITS&&(this.localHeaderOffset=x.readInt(8)),this.diskNumberStart===h.MAX_VALUE_32BITS&&(this.diskNumberStart=x.readInt(4))}},readExtraFields:function(v){var x,w,_,T=v.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});v.index+4<T;)x=v.readInt(2),w=v.readInt(2),_=v.readData(w),this.extraFields[x]={id:x,length:w,value:_};v.setIndex(T)},handleUTF8:function(){var v=b.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=y.utf8decode(this.fileName),this.fileCommentStr=y.utf8decode(this.fileComment);else{var x=this.findExtraFieldUnicodePath();if(x!==null)this.fileNameStr=x;else{var w=h.transformTo(v,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(w)}var _=this.findExtraFieldUnicodeComment();if(_!==null)this.fileCommentStr=_;else{var T=h.transformTo(v,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(T)}}},findExtraFieldUnicodePath:function(){var v=this.extraFields[28789];if(v){var x=d(v.value);return x.readInt(1)!==1||p(this.fileName)!==x.readInt(4)?null:y.utf8decode(x.readData(v.length-5))}return null},findExtraFieldUnicodeComment:function(){var v=this.extraFields[25461];if(v){var x=d(v.value);return x.readInt(1)!==1||p(this.fileComment)!==x.readInt(4)?null:y.utf8decode(x.readData(v.length-5))}return null}},c.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(o,c,l){function u(x,w,_){this.name=x,this.dir=_.dir,this.date=_.date,this.comment=_.comment,this.unixPermissions=_.unixPermissions,this.dosPermissions=_.dosPermissions,this._data=w,this._dataBinary=_.binary,this.options={compression:_.compression,compressionOptions:_.compressionOptions}}var d=o("./stream/StreamHelper"),h=o("./stream/DataWorker"),f=o("./utf8"),p=o("./compressedObject"),y=o("./stream/GenericWorker");u.prototype={internalStream:function(x){var w=null,_="string";try{if(!x)throw new Error("No output type specified.");var T=(_=x.toLowerCase())==="string"||_==="text";_!=="binarystring"&&_!=="text"||(_="string"),w=this._decompressWorker();var S=!this._dataBinary;S&&!T&&(w=w.pipe(new f.Utf8EncodeWorker)),!S&&T&&(w=w.pipe(new f.Utf8DecodeWorker))}catch(C){(w=new y("error")).error(C)}return new d(w,_,"")},async:function(x,w){return this.internalStream(x).accumulate(w)}
vendor: 6,311 bytes, line 256
256,nodeStream:function(x,w){return this.internalStream(x||"nodebuffer").toNodejsStream(w)},_compressWorker:function(x,w){if(this._data instanceof p&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var _=this._decompressWorker();return this._dataBinary||(_=_.pipe(new f.Utf8EncodeWorker)),p.createWorkerFrom(_,x,w)},_decompressWorker:function(){return this._data instanceof p?this._data.getContentWorker():this._data instanceof y?this._data:new h(this._data)}};for(var g=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],b=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},v=0;v<g.length;v++)u.prototype[g[v]]=b;c.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(o,c,l){(function(u){function d(){var w,_;f=!0;for(var T=x.length;T;){for(_=x,x=[],w=-1;++w<T;)_[w]();T=x.length}f=!1}var h,f,p=u.MutationObserver||u.WebKitMutationObserver;if(p){var y=0,g=new p(d),b=u.document.createTextNode("");g.observe(b,{characterData:!0}),h=function(){b.data=y=++y%2}}else if(u.setImmediate||u.MessageChannel===void 0)h="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var w=u.document.createElement("script");w.onreadystatechange=function(){d(),w.onreadystatechange=null,w.parentNode.removeChild(w),w=null},u.document.documentElement.appendChild(w)}:function(){setTimeout(d,0)};else{var v=new u.MessageChannel;v.port1.onmessage=d,h=function(){v.port2.postMessage(0)}}var x=[];c.exports=function(w){x.push(w)!==1||f||h()}}).call(this,typeof i<"u"?i:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(o,c,l){function u(){}function d(T){if(typeof T!="function")throw new TypeError("resolver must be a function");this.state=_,this.queue=[],this.outcome=void 0,T!==u&&y(this,T)}function h(T,S,C){this.promise=T,typeof S=="function"&&(this.onFulfilled=S,this.callFulfilled=this.otherCallFulfilled),typeof C=="function"&&(this.onRejected=C,this.callRejected=this.otherCallRejected)}function f(T,S,C){b(function(){var D;try{D=S(C)}catch(N){return v.reject(T,N)}D===T?v.reject(T,new TypeError("Cannot resolve promise with itself")):v.resolve(T,D)})}function p(T){var S=T&&T.then;return!T||typeof T!="object"&&typeof T!="function"||typeof S!="function"?void 0:function(){S.apply(T,arguments)}}function y(T,S){function C(F){N||(N=!0,v.reject(T,F))}function D(F){N||(N=!0,v.resolve(T,F))}var N=!1,M=g(function(){S(D,C)});M.status==="error"&&C(M.value)}function g(T,S){var C={};try{C.value=T(S),C.status="success"}catch(D){C.status="error",C.value=D}return C}var b=o("immediate"),v={},x=["REJECTED"],w=["FULFILLED"],_=["PENDING"];(c.exports=d).prototype.finally=function(T){if(typeof T!="function")return this;var S=this.constructor;return this.then(function(C){return S.resolve(T()).then(function(){return C})},function(C){return S.resolve(T()).then(function(){throw C})})},d.prototype.catch=function(T){return this.then(null,T)},d.prototype.then=function(T,S){if(typeof T!="function"&&this.state===w||typeof S!="function"&&this.state===x)return this;var C=new this.constructor(u);return this.state!==_?f(C,this.state===w?T:S,this.outcome):this.queue.push(new h(C,T,S)),C},h.prototype.callFulfilled=function(T){v.resolve(this.promise,T)},h.prototype.otherCallFulfilled=function(T){f(this.promise,this.onFulfilled,T)},h.prototype.callRejected=function(T){v.reject(this.promise,T)},h.prototype.otherCallRejected=function(T){f(this.promise,this.onRejected,T)},v.resolve=function(T,S){var C=g(p,S);if(C.status==="error")return v.reject(T,C.value);var D=C.value;if(D)y(T,D);else{T.state=w,T.outcome=S;for(var N=-1,M=T.queue.length;++N<M;)T.queue[N].callFulfilled(S)}return T},v.reject=function(T,S){T.state=x,T.outcome=S;for(var C=-1,D=T.queue.length;++C<D;)T.queue[C].callRejected(S);return T},d.resolve=function(T){return T instanceof this?T:v.resolve(new this(u),T)},d.reject=function(T){var S=new this(u);return v.reject(S,T)},d.all=function(T){function S(X,he){C.resolve(X).then(function(j){M[he]=j,++F!==D||N||(N=!0,v.resolve(A,M))},function(j){N||(N=!0,v.reject(A,j))})}var C=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var D=T.length,N=!1;if(!D)return this.resolve([]);for(var M=new Array(D),F=0,L=-1,A=new this(u);++L<D;)S(T[L],L);return A},d.race=function(T){var S=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var C=T.length,D=!1;if(!C)return this.resolve([]);for(var N=-1,M=new this(u);++N<C;)F=T[N],S.resolve(F).then(function(L){D||(D=!0,v.resolve(M,L))},function(L){D||(D=!0,v.reject(M,L))});var F;return M}},{immediate:36}],38:[function(o,c,l){var u={};o("./lib/utils/common").assign(u,o("./lib/deflate"),o("./lib/inflate"),o("./lib/zlib/constants")),c.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(o,c,l){function u(T){if(!(this instanceof u))return new u(T);this.options=f.assign({level:x,method:_,chunkSize:16384,windowBits:15,memLevel:8,strategy:w,to:""},T||{});var S=this.options;S.raw&&0<S.windowBits?S.windowBits=-S.windowBits:S.gzip&&0<S.windowBits&&S.windowBits<16&&(S.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g,this.strm.avail_out=0;var C=h.deflateInit2(this.strm,S.level,S.method,S.windowBits,S.memLevel,S.strategy);if(C!==v)throw new Error(y[C]);if(S.header&&h.deflateSetHeader(this.strm,S.header),S.dictionary){var D;if(D=typeof S.dictionary=="string"?p.string2buf(S.dictionary):b.call(S.dictionary)==="[object ArrayBuffer]"?new Uint8Array(S.dictionary):S.dictionary,(C=h.deflateSetDictionary(this.strm,D))!==v)throw new Error(y[C]);this._dict_set=!0}}function d(T,S){var C=new u(S);if(C.push(T,!0),C.err)throw C.msg||y[C.err];return C.result}var h=o("./zlib/deflate"),f=o("./utils/common"),p=o("./utils/strings"),y=o("./zlib/messages"),g=o("./zlib/zstream"),b=Object.prototype.toString,v=0,x=-1,w=0,_=8;u.prototype.push=function(T,S){var C,D,N=this.strm,M=this.options.chunkSize;if(this.ended)return!1;D=S===~~S?S:S===!0?4:0,typeof T=="string"?N.input=p.string2buf(T):b.call(T)==="[object ArrayBuffer]"?N.input=new
vendor: 2,571 bytes, line 256
256Uint8Array(T):N.input=T,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new f.Buf8(M),N.next_out=0,N.avail_out=M),(C=h.deflate(N,D))!==1&&C!==v)return this.onEnd(C),!(this.ended=!0);N.avail_out!==0&&(N.avail_in!==0||D!==4&&D!==2)||(this.options.to==="string"?this.onData(p.buf2binstring(f.shrinkBuf(N.output,N.next_out))):this.onData(f.shrinkBuf(N.output,N.next_out)))}while((0<N.avail_in||N.avail_out===0)&&C!==1);return D===4?(C=h.deflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===v):D!==2||(this.onEnd(v),!(N.avail_out=0))},u.prototype.onData=function(T){this.chunks.push(T)},u.prototype.onEnd=function(T){T===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},l.Deflate=u,l.deflate=d,l.deflateRaw=function(T,S){return(S=S||{}).raw=!0,d(T,S)},l.gzip=function(T,S){return(S=S||{}).gzip=!0,d(T,S)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(o,c,l){function u(w){if(!(this instanceof u))return new u(w);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},w||{});var _=this.options;_.raw&&0<=_.windowBits&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),!(0<=_.windowBits&&_.windowBits<16)||w&&w.windowBits||(_.windowBits+=32),15<_.windowBits&&_.windowBits<48&&(15&_.windowBits)==0&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new b,this.strm.avail_out=0;var T=h.inflateInit2(this.strm,_.windowBits);if(T!==y.Z_OK)throw new Error(g[T]);this.header=new v,h.inflateGetHeader(this.strm,this.header)}function d(w,_){var T=new u(_);if(T.push(w,!0),T.err)throw T.msg||g[T.err];return T.result}var h=o("./zlib/inflate"),f=o("./utils/common"),p=o("./utils/strings"),y=o("./zlib/constants"),g=o("./zlib/messages"),b=o("./zlib/zstream"),v=o("./zlib/gzheader"),x=Object.prototype.toString;u.prototype.push=function(w,_){var T,S,C,D,N,M,F=this.strm,L=this.options.chunkSize,A=this.options.dictionary,X=!1;if(this.ended)return!1;S=_===~~_?_:_===!0?y.Z_FINISH:y.Z_NO_FLUSH,typeof w=="string"?F.input=p.binstring2buf(w):x.call(w)==="[object ArrayBuffer]"?F.input=new Uint8Array(w):F.input=w,F.next_in=0,F.avail_in=F.input.length;do{if(F.avail_out===0&&(F.output=new f.Buf8(L),F.next_out=0,F.avail_out=L),(T=h.inflate(F,y.Z_NO_FLUSH))===y.Z_NEED_DICT&&A&&(M=typeof A=="string"?p.string2buf(A):x.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,T=h.inflateSetDictionary(this.strm,M)),T===y.Z_BUF_ER
256ROR&&X===!0&&(T=y.Z_OK,X=!1),T!==y.Z_STREAM_END&&T!==y.Z_OK)return this.onEnd(T),!(this.ended=!0);F.next_out&&(F.avail_out!==0&&T!==y.Z_STREAM_END&&(F.avail_in!==0||S!==y.Z_FINISH&&S!==y.Z_SYNC_FLUSH)||(this.options.to==="string"?(C=p.utf8border(F.output,F.next_out),D=F.next_out-C,N=p.buf2string(F.output,C),F.next_out=D,F.avail_out=L-D,D&&f.arraySet(F.output,F.output,C,D,0),this.onData(N)):this.onData(f.shrinkBuf(F.output,F.next_out)))),F.avail_in===0&&F.avail_out===0&&(X=!0)}while((0<F.avail_in||F.avail_out===0)&&T!==y.Z_STREAM_END);return T===y.Z_STREAM_END&&(S=y.Z_FINISH),S===y.Z_FINISH?(T=h.inflateEnd(this.strm),this.onEnd(T),this.ended=!0,T===y.Z_OK):S!==y.Z_SYNC_FLUSH||(this.onEnd(y.Z_OK),!(F.avail_out=0))},u.prototype.onData=function(w){this.chunks.push(w)},u.prototype.onEnd=function(w){w===y.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=w,this.msg=this.strm.msg},l.Inflate=u,l.inflate=d,l.inflateRaw=function(w,_){return(_=_||{}).raw=!0,d(w,_)},l.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(o,c,l){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";l.assign=function(f){for(var p=Array.prototype.slice.call(arguments,1);p.length;){var y=p.shift();if(y){if(typeof y!="object")throw new TypeError(y+"must be non-object");for(var g in y)y.hasOwnProperty(g)&&(f[g]=y[g])}}return f},l.shrinkBuf=function(f,p){return f.length===p?f:f.subarray?f.subarray(0,p):(f.length=p,f)};var d={arraySet:function(f,p,y,g,b){if(p.subarray&&f.subarray)f.set(p.subarray(y,y+g),b);else for(var v=0;g>v;v++)f[b+v]=p[y+v]},flattenChunks:function(f){var p,y,g,b,v,x;for(p=g=0,y=f.length;y>p;p++)g+=f[p].length;for(x=new Uint8Array(g),p=b=0,y=f.length;y>p;p++)v=f[p],x.set(v,b),b+=v.length;return x}},h={arraySet:function(f,p,y,g,b){for(var v=0;g>v;v++)f[b+v]=p[y+v]},flattenChunks:function(f){return[].concat.apply([],f)}};l.setTyped=function(f){f?(l.Buf8=Uint8Array,l.Buf16=Uint16Array,l.Buf32=Int32Array,l.assign(l,d)):(l.Buf8=Array,l.Buf16=Array,l.Buf32=Array,l.assign(l,h))},l.setTyped(u)},{}],42:[function(o,c,l){function u(g,b){if(65537>b&&(g.subarray&&f||!g.subarray&&h))return String.fromCharCode.apply(null,d.shrinkBuf(g,b));for(var v="",x=0;b>x;x++)v+=String.fromCharCode(g[x]);return v}var d=o("./common"),h=!0,f=!0;try{String.fromCharCode.apply(null,[0])}catch{h=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{f=!1}for(var p=new d.Buf8(256),y=0;256>y;y++)p[y]=y>=252?6:y>=248?5:y>=240?4:y>=224?3:y>=192?2:1;p[254]=p[254]=1,l.string2buf=function(g){var b,v,x,w,_,T=g.length,S=0;for(w=0;T>w;w++)(64512&(v=g.charCodeAt(w)))==55296&&T>w+1&&(64512&(x=g.charCodeAt(w+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),w++),S+=128>v?1:2048>v?2:65536>v?3:4;for(b=new d.Buf8(S),w=_=0;S>_;w++)(64512&(v=g.charCodeAt(w)))==55296&&T>w+1&&(64512&(x=g.charCodeAt(w+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),w++),128>v?b[_++]=v:(2048>v?b[_++]=192|v>>>6:(65536>v?b[_++]=224|v>>>12:(b[_++]=240|v>>>18,b[_++]=128|v>>>12&63),b[_++]=128|v>>>6&63),b[_++]=128|63&v);return b},l.buf2binstring=function(g){return u(g,g.length)},l.binstring2buf=function(g){for(var b=new d.Buf8(g.length),v=0,x=b.length;x>v;v++)b[v]=g.charCodeAt(v);return b},l.buf2string=function(g,b){var v,x,w,_,T=b||g.length,S=new Array(2*T);for(v=x=0;T>v;)if((w=g[v++])<128)S[x++]=w;else if(4<(_=p[w]))S[x++]=65533,v+=_-1;else{for(w&=_===2?31:_===3?15:7;_>1&&T>v;)w=w<<6|63&g[v++],_--;_>1?S[x++]=65533:65536>w?S[x++]=w:(w-=65536,S[x++]=55296|w>>10&1023,S[x++]=56320|1023&w)}return u(S,x)},l.utf8border=function(g,b){var v;for((b=b||g.length)>g.length&&(b=g.length),v=b-1;v>=0&&(192&g[v])==128;)v--;return 0>v||v===0?b:v+p[g[v]]>b?v:b}},{"./common":41}],43:[function(o,c,l){c.exports=function(u,d,h,f){for(var p=65535&u|0,y=u>>>16&65535|0,g=0;h!==0;){for(h-=g=h>2e3?2e3:h;y=y+(p=p+d[f++]|0)|0,--g;);p%=65521,y%=65521}return p|y<<16|0}},{}],44:[function(o,c,l){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ER
vendor: 8,820 bytes, line 256
256ROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(o,c,l){var u=(function(){for(var d,h=[],f=0;256>f;f++){d=f;for(var p=0;8>p;p++)d=1&d?3988292384^d>>>1:d>>>1;h[f]=d}return h})();c.exports=function(d,h,f,p){var y=u,g=p+f;d^=-1;for(var b=p;g>b;b++)d=d>>>8^y[255&(d^h[b])];return-1^d}},{}],46:[function(o,c,l){function u(E,Q){return E.msg=X[Q],Q}function d(E){return(E<<1)-(E>4?9:0)}function h(E){for(var Q=E.length;0<=--Q;)E[Q]=0}function f(E){var Q=E.state,ce=Q.pending;ce>E.avail_out&&(ce=E.avail_out),ce!==0&&(M.arraySet(E.output,Q.pending_buf,Q.pending_out,ce,E.next_out),E.next_out+=ce,Q.pending_out+=ce,E.total_out+=ce,E.avail_out-=ce,Q.pending-=ce,Q.pending===0&&(Q.pending_out=0))}function p(E,Q){F._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,Q),E.block_start=E.strstart,f(E.strm)}function y(E,Q){E.pending_buf[E.pending++]=Q}function g(E,Q){E.pending_buf[E.pending++]=Q>>>8&255,E.pending_buf[E.pending++]=255&Q}function b(E,Q){var ce,V,k=E.max_chain_length,I=E.strstart,$=E.prev_length,Z=E.nice_match,ae=E.strstart>E.w_size-ue?E.strstart-(E.w_size-ue):0,ye=E.window,me=E.w_mask,xe=E.prev,De=E.strstart+se,Re=ye[I+$-1],Ue=ye[I+$];E.prev_length>=E.good_match&&(k>>=2),Z>E.lookahead&&(Z=E.lookahead);do if(ye[(ce=Q)+$]===Ue&&ye[ce+$-1]===Re&&ye[ce]===ye[I]&&ye[++ce]===ye[I+1]){I+=2,ce++;do;while(ye[++I]===ye[++ce]&&ye[++I]===ye[++ce]&&ye[++I]===ye[++ce]&&ye[++I]===ye[++ce]&&ye[++I]===ye[++ce]&&ye[++I]===ye[++ce]&&ye[++I]===ye[++ce]&&ye[++I]===ye[++ce]&&De>I);if(V=se-(De-I),I=De-se,V>$){if(E.match_start=Q,Z<=($=V))break;Re=ye[I+$-1],Ue=ye[I+$]}}while((Q=xe[Q&me])>ae&&--k!=0);return $<=E.lookahead?$:E.lookahead}function v(E){var Q,ce,V,k,I,$,Z,ae,ye,me,xe=E.w_size;do{if(k=E.window_size-E.lookahead-E.strstart,E.strstart>=xe+(xe-ue)){for(M.arraySet(E.window,E.window,xe,xe,0),E.match_start-=xe,E.strstart-=xe,E.block_start-=xe,Q=ce=E.hash_size;V=E.head[--Q],E.head[Q]=V>=xe?V-xe:0,--ce;);for(Q=ce=xe;V=E.prev[--Q],E.prev[Q]=V>=xe?V-xe:0,--ce;);k+=xe}if(E.strm.avail_in===0)break;if($=E.strm,Z=E.window,ae=E.strstart+E.lookahead,ye=k,me=void 0,me=$.avail_in,me>ye&&(me=ye),ce=me===0?0:($.avail_in-=me,M.arraySet(Z,$.input,$.next_in,me,ae),$.state.wrap===1?$.adler=L($.adler,Z,me,ae):$.state.wrap===2&&($.adler=A($.adler,Z,me,ae)),$.next_in+=me,$.total_in+=me,me),E.lookahead+=ce,E.lookahead+E.insert>=Y)for(I=E.strstart-E.insert,E.ins_h=E.window[I],E.ins_h=(E.ins_h<<E.hash_shift^E.window[I+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[I+Y-1])&E.hash_mask,E.prev[I&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=I,I++,E.insert--,!(E.lookahead+E.insert<Y)););}while(E.lookahead<ue&&E.strm.avail_in!==0)}function x(E,Q){for(var ce,V;;){if(E.lookahead<ue){if(v(E),E.lookahead<ue&&Q===he)return _e;if(E.lookahead===0)break}if(ce=0,E.lookahead>=Y&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+Y-1])&E.hash_mask,ce=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),ce!==0&&E.strstart-ce<=E.w_size-ue&&(E.match_length=b(E,ce)),E.match_length>=Y)if(V=F._tr_tally(E,E.strstart-E.match_start,E.match_length-Y),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=Y){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+Y-1])&E.hash_mask,ce=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else V=F._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(V&&(p(E,!1),E.strm.avail_out===0))return _e}return E.insert=E.strstart<Y-1?E.strstart:Y-1,Q===j?(p(E,!0),E.strm.avail_out===0?U:R):E.last_lit&&(p(E,!1),E.strm.avail_out===0)?_e:K}function w(E,Q){for(var ce,V,k;;){if(E.lookahead<ue){if(v(E),E.lookahead<ue&&Q===he)return _e;if(E.lookahead===0)break}if(ce=0,E.lookahead>=Y&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+Y-1])&E.hash_mask,ce=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=Y-1,ce!==0&&E.prev_length<E.max_lazy_match&&E.strstart-ce<=E.w_size-ue&&(E.match_length=b(E,ce),E.match_length<=5&&(E.strategy===1||E.match_length===Y&&4096<E.strstart-E.match_start)&&(E.match_length=Y-1)),E.prev_length>=Y&&E.match_length<=E.prev_length){for(k=E.strstart+E.lookahead-Y,V=F._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-Y),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=k&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+Y-1])&E.hash_mask,ce=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=Y-1,E.strstart++,V&&(p(E,!1),E.strm.avail_out===0))return _e}else if(E.match_available){if((V=F._tr_tally(E,0,E.window[E.strstart-1]))&&p(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return _e}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(V=F._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<Y-1?E.strstart:Y-1,Q===j?(p(E,!0),E.strm.avail_out===0?U:R):E.last_lit&&(p(E,!1),E.strm.avail_out===0)?_e:K}function _(E,Q,ce,V,k){this.good_length=E,this.max_lazy=Q,this.nice_length=ce,this.max_chain=V,this.func=k}function T(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=re,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new M.Buf16(2*W),this.dyn_dtree=new M.Buf16(2*(2*ie+1)),this.bl_tree=new M.Buf16(2*(2*P+1)),h(this.dyn_ltree),h(this.dyn_dtree),h(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new M.Buf16(te+1),this.heap=new M.Buf16(2*ge+1),h(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new M.Buf16(2*ge+1),h(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function S(E){var Q;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=B,(Q=E.state).pending=0,Q.pending_out=0,Q.wrap<0&&(Q.wrap=-Q.wrap),Q.status=Q.wrap?we:H,E.adler=Q.wrap===2?0:1,Q.last_flush=he,F._tr_init(Q),ee):u(E,O)}function C(E){var Q=S(E);return Q===ee&&(function(ce){ce.window_size=2*ce.w_size,h(ce.head),ce.max_lazy_match=N[ce.level].max_lazy,ce.good_match=N[ce.level].good_length,ce.nice_match=N[ce.level].nice_length,ce.max_chain_length=N[ce.level].max_chain,ce.strstart=0,ce.block_start=0,ce.lookahead=0,ce.insert=0,ce.match_length=ce.prev_length=Y-1,ce.match_available=0,ce.ins_h=0})(E.state),Q}function D(E,Q,ce,V,k,I){if(!E)return O;var $=1;if(Q===pe&&(Q=6),0>V?($=0,V=-V):V>15&&($=2,V-=16),1>k||k>le||ce!==re||8>V||V>15||0>Q||Q>9||0>I||I>q)return u(E,O);V===8&&(V=9);var Z=new T;return(E.state=Z).strm=E,Z.wrap=$,Z.gzhead=null,Z.w_bits=V,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=k+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+Y-1)/Y),Z.window=new M.Buf8(2*Z.w_size),Z.head=new M.Buf16(Z.hash_size),Z.prev=new M.Buf16(Z.w_size),Z.lit_bufsize=1<<k+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new M.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=Q,Z.strategy=I,Z.method=ce,C(E)}var N,M=o("../utils/common"),F=o("./trees"),L=o("./adler32"),A=o("./crc32"),X=o("./messages"),he=0,j=4,ee=0,O=-2,pe=-1,q=4,B=2,re=8,le=9,ge=286,ie=30,P=19,W=2*ge+1,te=15,Y=3,se=258,ue=se+Y+1,we=42,H=113,_e=1,K=2,U=3,R=4;N=[new _(0,0,0,0,function(E,Q){var ce=65535;for(ce>E.pending_buf_size-5&&(ce=E.pending_buf_size-5);;){if(E.lookahead<=1){if(v(E),E.lookahead===0&&Q===he)return _e;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var V=E.block_start+ce;if((E.strstart===0||E.strstart>=V)&&(E.lookahead=E.strstart-V,E.strstart=V,p(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-ue&&(p(E,!1),E.strm.avail_out===0))return _e}return E.insert=0,Q===j?(p(E,!0),E.strm.avail_out===0?U:R):(E.strstart>E.block_start&&(p(E,!1),E.strm.avail_out),_e)}),new _(4,4,8,4,x),new _(4,5,16,8,x),new _(4,6,32,32,x),new _(4,4,16,16,w),new _(8,16,32,32,w
vendor: 23,196 bytes, line 256
256),new _(8,16,128,128,w),new _(8,32,128,256,w),new _(32,128,258,1024,w),new _(32,258,258,4096,w)],l.deflateInit=function(E,Q){return D(E,Q,re,15,8,0)},l.deflateInit2=D,l.deflateReset=C,l.deflateResetKeep=S,l.deflateSetHeader=function(E,Q){return E&&E.state?E.state.wrap!==2?O:(E.state.gzhead=Q,ee):O},l.deflate=function(E,Q){var ce,V,k,I;if(!E||!E.state||Q>5||0>Q)return E?u(E,O):O;if(V=E.state,!E.output||!E.input&&E.avail_in!==0||V.status===666&&Q!==j)return u(E,E.avail_out===0?-5:O);if(V.strm=E,ce=V.last_flush,V.last_flush=Q,V.status===we)if(V.wrap===2)E.adler=0,y(V,31),y(V,139),y(V,8),V.gzhead?(y(V,(V.gzhead.text?1:0)+(V.gzhead.hcrc?2:0)+(V.gzhead.extra?4:0)+(V.gzhead.name?8:0)+(V.gzhead.comment?16:0)),y(V,255&V.gzhead.time),y(V,V.gzhead.time>>8&255),y(V,V.gzhead.time>>16&255),y(V,V.gzhead.time>>24&255),y(V,V.level===9?2:2<=V.strategy||V.level<2?4:0),y(V,255&V.gzhead.os),V.gzhead.extra&&V.gzhead.extra.length&&(y(V,255&V.gzhead.extra.length),y(V,V.gzhead.extra.length>>8&255)),V.gzhead.hcrc&&(E.adler=A(E.adler,V.pending_buf,V.pending,0)),V.gzindex=0,V.status=69):(y(V,0),y(V,0),y(V,0),y(V,0),y(V,0),y(V,V.level===9?2:2<=V.strategy||V.level<2?4:0),y(V,3),V.status=H);else{var $=re+(V.w_bits-8<<4)<<8;$|=(2<=V.strategy||V.level<2?0:V.level<6?1:V.level===6?2:3)<<6,V.strstart!==0&&($|=32),$+=31-$%31,V.status=H,g(V,$),V.strstart!==0&&(g(V,E.adler>>>16),g(V,65535&E.adler)),E.adler=1}if(V.status===69)if(V.gzhead.extra){for(k=V.pending;V.gzindex<(65535&V.gzhead.extra.length)&&(V.pending!==V.pending_buf_size||(V.gzhead.hcrc&&V.pending>k&&(E.adler=A(E.adler,V.pending_buf,V.pending-k,k)),f(E),k=V.pending,V.pending!==V.pending_buf_size));)y(V,255&V.gzhead.extra[V.gzindex]),V.gzindex++;V.gzhead.hcrc&&V.pending>k&&(E.adler=A(E.adler,V.pending_buf,V.pending-k,k)),V.gzindex===V.gzhead.extra.length&&(V.gzindex=0,V.status=73)}else V.status=73;if(V.status===73)if(V.gzhead.name){k=V.pending;do{if(V.pending===V.pending_buf_size&&(V.gzhead.hcrc&&V.pending>k&&(E.adler=A(E.adler,V.pending_buf,V.pending-k,k)),f(E),k=V.pending,V.pending===V.pending_buf_size)){I=1;break}I=V.gzindex<V.gzhead.name.length?255&V.gzhead.name.charCodeAt(V.gzindex++):0,y(V,I)}while(I!==0);V.gzhead.hcrc&&V.pending>k&&(E.adler=A(E.adler,V.pending_buf,V.pending-k,k)),I===0&&(V.gzindex=0,V.status=91)}else V.status=91;if(V.status===91)if(V.gzhead.comment){k=V.pending;do{if(V.pending===V.pending_buf_size&&(V.gzhead.hcrc&&V.pending>k&&(E.adler=A(E.adler,V.pending_buf,V.pending-k,k)),f(E),k=V.pending,V.pending===V.pending_buf_size)){I=1;break}I=V.gzindex<V.gzhead.comment.length?255&V.gzhead.comment.charCodeAt(V.gzindex++):0,y(V,I)}while(I!==0);V.gzhead.hcrc&&V.pending>k&&(E.adler=A(E.adler,V.pending_buf,V.pending-k,k)),I===0&&(V.status=103)}else V.status=103;if(V.status===103&&(V.gzhead.hcrc?(V.pending+2>V.pending_buf_size&&f(E),V.pending+2<=V.pending_buf_size&&(y(V,255&E.adler),y(V,E.adler>>8&255),E.adler=0,V.status=H)):V.status=H),V.pending!==0){if(f(E),E.avail_out===0)return V.last_flush=-1,ee}else if(E.avail_in===0&&d(Q)<=d(ce)&&Q!==j)return u(E,-5);if(V.status===666&&E.avail_in!==0)return u(E,-5);if(E.avail_in!==0||V.lookahead!==0||Q!==he&&V.status!==666){var Z=V.strategy===2?(function(ae,ye){for(var me;;){if(ae.lookahead===0&&(v(ae),ae.lookahead===0)){if(ye===he)return _e;break}if(ae.match_length=0,me=F._tr_tally(ae,0,ae.window[ae.strstart]),ae.lookahead--,ae.strstart++,me&&(p(ae,!1),ae.strm.avail_out===0))return _e}return ae.insert=0,ye===j?(p(ae,!0),ae.strm.avail_out===0?U:R):ae.last_lit&&(p(ae,!1),ae.strm.avail_out===0)?_e:K})(V,Q):V.strategy===3?(function(ae,ye){for(var me,xe,De,Re,Ue=ae.window;;){if(ae.lookahead<=se){if(v(ae),ae.lookahead<=se&&ye===he)return _e;if(ae.lookahead===0)break}if(ae.match_length=0,ae.lookahead>=Y&&0<ae.strstart&&(xe=Ue[De=ae.strstart-1])===Ue[++De]&&xe===Ue[++De]&&xe===Ue[++De]){Re=ae.strstart+se;do;while(xe===Ue[++De]&&xe===Ue[++De]&&xe===Ue[++De]&&xe===Ue[++De]&&xe===Ue[++De]&&xe===Ue[++De]&&xe===Ue[++De]&&xe===Ue[++De]&&Re>De);ae.match_length=se-(Re-De),ae.match_length>ae.lookahead&&(ae.match_length=ae.lookahead)}if(ae.match_length>=Y?(me=F._tr_tally(ae,1,ae.match_length-Y),ae.lookahead-=ae.match_length,ae.strstart+=ae.match_length,ae.match_length=0):(me=F._tr_tally(ae,0,ae.window[ae.strstart]),ae.lookahead--,ae.strstart++),me&&(p(ae,!1),ae.strm.avail_out===0))return _e}return ae.insert=0,ye===j?(p(ae,!0),ae.strm.avail_out===0?U:R):ae.last_lit&&(p(ae,!1),ae.strm.avail_out===0)?_e:K})(V,Q):N[V.level].func(V,Q);if(Z!==U&&Z!==R||(V.status=666),Z===_e||Z===U)return E.avail_out===0&&(V.last_flush=-1),ee;if(Z===K&&(Q===1?F._tr_align(V):Q!==5&&(F._tr_stored_block(V,0,0,!1),Q===3&&(h(V.head),V.lookahead===0&&(V.strstart=0,V.block_start=0,V.insert=0))),f(E),E.avail_out===0))return V.last_flush=-1,ee}return Q!==j?ee:V.wrap<=0?1:(V.wrap===2?(y(V,255&E.adler),y(V,E.adler>>8&255),y(V,E.adler>>16&255),y(V,E.adler>>24&255),y(V,255&E.total_in),y(V,E.total_in>>8&255),y(V,E.total_in>>16&255),y(V,E.total_in>>24&255)):(g(V,E.adler>>>16),g(V,65535&E.adler)),f(E),0<V.wrap&&(V.wrap=-V.wrap),V.pending!==0?ee:1)},l.deflateEnd=function(E){var Q;return E&&E.state?(Q=E.state.status)!==we&&Q!==69&&Q!==73&&Q!==91&&Q!==103&&Q!==H&&Q!==666?u(E,O):(E.state=null,Q===H?u(E,-3):ee):O},l.deflateSetDictionary=function(E,Q){var ce,V,k,I,$,Z,ae,ye,me=Q.length;if(!E||!E.state||(I=(ce=E.state).wrap)===2||I===1&&ce.status!==we||ce.lookahead)return O;for(I===1&&(E.adler=L(E.adler,Q,me,0)),ce.wrap=0,me>=ce.w_size&&(I===0&&(h(ce.head),ce.strstart=0,ce.block_start=0,ce.insert=0),ye=new M.Buf8(ce.w_size),M.arraySet(ye,Q,me-ce.w_size,ce.w_size,0),Q=ye,me=ce.w_size),$=E.avail_in,Z=E.next_in,ae=E.input,E.avail_in=me,E.next_in=0,E.input=Q,v(ce);ce.lookahead>=Y;){for(V=ce.strstart,k=ce.lookahead-(Y-1);ce.ins_h=(ce.ins_h<<ce.hash_shift^ce.window[V+Y-1])&ce.hash_mask,ce.prev[V&ce.w_mask]=ce.head[ce.ins_h],ce.head[ce.ins_h]=V,V++,--k;);ce.strstart=V,ce.lookahead=Y-1,v(ce)}return ce.strstart+=ce.lookahead,ce.block_start=ce.strstart,ce.insert=ce.lookahead,ce.lookahead=0,ce.match_length=ce.prev_length=Y-1,ce.match_available=0,E.next_in=Z,E.input=ae,E.avail_in=$,ce.wrap=I,ee},l.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(o,c,l){c.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(o,c,l){c.exports=function(u,d){var h,f,p,y,g,b,v,x,w,_,T,S,C,D,N,M,F,L,A,X,he,j,ee,O,pe;h=u.state,f=u.next_in,O=u.input,p=f+(u.avail_in-5),y=u.next_out,pe=u.output,g=y-(d-u.avail_out),b=y+(u.avail_out-257),v=h.dmax,x=h.wsize,w=h.whave,_=h.wnext,T=h.window,S=h.hold,C=h.bits,D=h.lencode,N=h.distcode,M=(1<<h.lenbits)-1,F=(1<<h.distbits)-1;e:do{15>C&&(S+=O[f++]<<C,C+=8,S+=O[f++]<<C,C+=8),L=D[S&M];t:for(;;){if(S>>>=A=L>>>24,C-=A,(A=L>>>16&255)===0)pe[y++]=65535&L;else{if(!(16&A)){if((64&A)==0){L=D[(65535&L)+(S&(1<<A)-1)];continue t}if(32&A){h.mode=12;break e}u.msg="invalid literal/length code",h.mode=30;break e}X=65535&L,(A&=15)&&(A>C&&(S+=O[f++]<<C,C+=8),X+=S&(1<<A)-1,S>>>=A,C-=A),15>C&&(S+=O[f++]<<C,C+=8,S+=O[f++]<<C,C+=8),L=N[S&F];n:for(;;){if(S>>>=A=L>>>24,C-=A,!(16&(A=L>>>16&255))){if((64&A)==0){L=N[(65535&L)+(S&(1<<A)-1)];continue n}u.msg="invalid distance code",h.mode=30;break e}if(he=65535&L,C<(A&=15)&&(S+=O[f++]<<C,(C+=8)<A&&(S+=O[f++]<<C,C+=8)),v<(he+=S&(1<<A)-1)){u.msg="invalid distance too far back",h.mode=30;break e}if(S>>>=A,C-=A,(A=y-g)<he){if(w<(A=he-A)&&h.sane){u.msg="invalid distance too far back",h.mode=30;break e}if(ee=T,(j=0)===_){if(j+=x-A,X>A){for(X-=A;pe[y++]=T[j++],--A;);j=y-he,ee=pe}}else if(A>_){if(j+=x+_-A,(A-=_)<X){for(X-=A;pe[y++]=T[j++],--A;);if(j=0,X>_){for(X-=A=_;pe[y++]=T[j++],--A;);j=y-he,ee=pe}}}else if(j+=_-A,X>A){for(X-=A;pe[y++]=T[j++],--A;);j=y-he,ee=pe}for(;X>2;)pe[y++]=ee[j++],pe[y++]=ee[j++],pe[y++]=ee[j++],X-=3;X&&(pe[y++]=ee[j++],X>1&&(pe[y++]=ee[j++]))}else{for(j=y-he;pe[y++]=pe[j++],pe[y++]=pe[j++],pe[y++]=pe[j++],2<(X-=3););X&&(pe[y++]=pe[j++],X>1&&(pe[y++]=pe[j++]))}break}}break}}while(p>f&&b>y);f-=X=C>>3,S&=(1<<(C-=X<<3))-1,u.next_in=f,u.next_out=y,u.avail_in=p>f?p-f+5:5-(f-p),u.avail_out=b>y?b-y+257:257-(y-b),h.hold=S,h.bits=C}},{}],49:[function(o,c,l){function u(j){return(j>>>24&255)+(j>>>8&65280)+((65280&j)<<8)+((255&j)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new w.Buf16(320),this.work=new w.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(j){var ee;return j&&j.state?(ee=j.state,j.total_in=j.total_out=ee.total=0,j.msg="",ee.wrap&&(j.adler=1&ee.wrap),ee.mode=L,ee.last=0,ee.havedict=0,ee.dmax=32768,ee.head=null,ee.hold=0,ee.bits=0,ee.lencode=ee.lendyn=new w.Buf32(A),ee.distcode=ee.distdyn=new w.Buf32(X),ee.sane=1,ee.back=-1,M):F}function f(j){var ee;return j&&j.state?((ee=j.state).wsize=0,ee.whave=0,ee.wnext=0,h(j)):F}function p(j,ee){var O,pe;return j&&j.state?(pe=j.state,0>ee?(O=0,ee=-ee):(O=1+(ee>>4),48>ee&&(ee&=15)),ee&&(8>ee||ee>15)?F:(pe.window!==null&&pe.wbits!==ee&&(pe.window=null),pe.wrap=O,pe.wbits=ee,f(j))):F}function y(j,ee){var O,pe;return j?(pe=new d,(j.state=pe).window=null,(O=p(j,ee))!==M&&(j.state=null),O):F}function g(j){if(he){var ee;for(v=new w.Buf32(512),x=new w.Buf32(32),ee=0;144>ee;)j.lens[ee++]=8;for(;256>ee;)j.lens[ee++]=9;for(;280>ee;)j.lens[ee++]=7;for(;288>ee;)j.lens[ee++]=8;for(C(D,j.lens,0,288,v,0,j.work,{bits:9}),ee=0;32>ee;)j.lens[ee++]=5;C(N,j.lens,0,32,x,0,j.work,{bits:5}),he=!1}j.lencode=v,j.lenbits=9,j.distcode=x,j.distbits=5}function b(j,ee,O,pe){var q,B=j.state;return B.window===null&&(B.wsize=1<<B.wbits,B.wnext=0,B.whave=0,B.window=new w.Buf8(B.wsize)),pe>=B.wsize?(w.arraySet(B.window,ee,O-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):(pe<(q=B.wsize-B.wnext)&&(q=pe),w.arraySet(B.window,ee,O-pe,q,B.wnext),(pe-=q)?(w.arraySet(B.window,ee,O-pe,pe,0),B.wnext=pe,B.whave=B.wsize):(B.wnext+=q,B.wnext===B.wsize&&(B.wnext=0),B.whave<B.wsize&&(B.whave+=q))),0}var v,x,w=o("../utils/common"),_=o("./adler32"),T=o("./crc32"),S=o("./inffast"),C=o("./inftrees"),D=1,N=2,M=0,F=-2,L=1,A=852,X=592,he=!0;l.inflateReset=f,l.inflateReset2=p,l.inflateResetKeep=h,l.inflateInit=function(j){return y(j,15)},l.inflateInit2=y,l.inflate=function(j,ee){var O,pe,q,B,re,le,ge,ie,P,W,te,Y,se,ue,we,H,_e,K,U,R,E,Q,ce,V,k=0,I=new w.Buf8(4),$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!j||!j.state||!j.output||!j.input&&j.avail_in!==0)return F;(O=j.state).mode===12&&(O.mode=13),re=j.next_out,q=j.output,ge=j.avail_out,B=j.next_in,pe=j.input,le=j.avail_in,ie=O.hold,P=O.bits,W=le,te=ge,Q=M;e:for(;;)switch(O.mode){case L:if(O.wrap===0){O.mode=13;break}for(;16>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}if(2&O.wrap&&ie===35615){I[O.check=0]=255&ie,I[1]=ie>>>8&255,O.check=T(O.check,I,2,0),P=ie=0,O.mode=2;break}if(O.flags=0,O.head&&(O.head.done=!1),!(1&O.wrap)||(((255&ie)<<8)+(ie>>8))%31){j.msg="incorrect header check",O.mode=30;break}if((15&ie)!=8){j.msg="unknown compression method",O.mode=30;break}if(P-=4,E=8+(15&(ie>>>=4)),O.wbits===0)O.wbits=E;else if(E>O.wbits){j.msg="invalid window size",O.mode=30;break}O.dmax=1<<E,j.adler=O.check=1,O.mode=512&ie?10:12,P=ie=0;break;case 2:for(;16>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}if(O.flags=ie,(255&O.flags)!=8){j.msg="unknown compression method",O.mode=30;break}if(57344&O.flags){j.msg="unknown header flags set",O.mode=30;break}O.head&&(O.head.text=ie>>8&1),512&O.flags&&(I[0]=255&ie,I[1]=ie>>>8&255,O.check=T(O.check,I,2,0)),P=ie=0,O.mode=3;case 3:for(;32>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}O.head&&(O.head.time=ie),512&O.flags&&(I[0]=255&ie,I[1]=ie>>>8&255,I[2]=ie>>>16&255,I[3]=ie>>>24&255,O.check=T(O.check,I,4,0)),P=ie=0,O.mode=4;case 4:for(;16>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}O.head&&(O.head.xflags=255&ie,O.head.os=ie>>8),512&O.flags&&(I[0]=255&ie,I[1]=ie>>>8&255,O.check=T(O.check,I,2,0)),P=ie=0,O.mode=5;case 5:if(1024&O.flags){for(;16>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}O.length=ie,O.head&&(O.head.extra_len=ie),512&O.flags&&(I[0]=255&ie,I[1]=ie>>>8&255,O.check=T(O.check,I,2,0)),P=ie=0}else O.head&&(O.head.extra=null);O.mode=6;case 6:if(1024&O.flags&&(le<(Y=O.length)&&(Y=le),Y&&(O.head&&(E=O.head.extra_len-O.length,O.head.extra||(O.head.extra=new Array(O.head.extra_len)),w.arraySet(O.head.extra,pe,B,Y,E)),512&O.flags&&(O.check=T(O.check,pe,Y,B)),le-=Y,B+=Y,O.length-=Y),O.length))break e;O.length=0,O.mode=7;case 7:if(2048&O.flags){if(le===0)break e;for(Y=0;E=pe[B+Y++],O.head&&E&&O.length<65536&&(O.head.name+=String.fromCharCode(E)),E&&le>Y;);if(512&O.flags&&(O.check=T(O.check,pe,Y,B)),le-=Y,B+=Y,E)break e}else O.head&&(O.head.name=null);O.length=0,O.mode=8;case 8:if(4096&O.flags){if(le===0)break e;for(Y=0;E=pe[B+Y++],O.head&&E&&O.length<65536&&(O.head.comment+=String.fromCharCode(E)),E&&le>Y;);if(512&O.flags&&(O.check=T(O.check,pe,Y,B)),le-=Y,B+=Y,E)break e}else O.head&&(O.head.comment=null);O.mode=9;case 9:if(512&O.flags){for(;16>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}if(ie!==(65535&O.check)){j.msg="header crc mismatch",O.mode=30;break}P=ie=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),j.adler=O.check=0,O.mode=12;break;case 10:for(;32>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}j.adler=O.check=u(ie),P=ie=0,O.mode=11;case 11:if(O.havedict===0)return j.next_out=re,j.avail_out=ge,j.next_in=B,j.avail_in=le,O.hold=ie,O.bits=P,2;j.adler=O.check=1,O.mode=12;case 12:if(ee===5||ee===6)break e;case 13:if(O.last){ie>>>=7&P,P-=7&P,O.mode=27;break}for(;3>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}switch(O.last=1&ie,P-=1,3&(ie>>>=1)){case 0:O.mode=14;break;case 1:if(g(O),O.mode=20,ee!==6)break;ie>>>=2,P-=2;break e;case 2:O.mode=17;break;case 3:j.msg="invalid block type",O.mode=30}ie>>>=2,P-=2;break;case 14:for(ie>>>=7&P,P-=7&P;32>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}if((65535&ie)!=(ie>>>16^65535)){j.msg="invalid stored block lengths",O.mode=30;break}if(O.length=65535&ie,P=ie=0,O.mode=15,ee===6)break e;case 15:O.mode=16;case 16:if(Y=O.length){if(Y>le&&(Y=le),Y>ge&&(Y=ge),Y===0)break e;w.arraySet(q,pe,B,Y,re),le-=Y,B+=Y,ge-=Y,re+=Y,O.length-=Y;break}O.mode=12;break;case 17:for(;14>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}if(O.nlen=257+(31&ie),ie>>>=5,P-=5,O.ndist=1+(31&ie),ie>>>=5,P-=5,O.ncode=4+(15&ie),ie>>>=4,P-=4,286<O.nlen||30<O.ndist){j.msg="too many length or distance symbols",O.mode=30;break}O.have=0,O.mode=18;case 18:for(;O.have<O.ncode;){for(;3>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}O.lens[$[O.have++]]=7&ie,ie>>>=3,P-=3}for(;O.have<19;)O.lens[$[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,ce={bits:O.lenbits},Q=C(0,O.lens,0,19,O.lencode,0,O.work,ce),O.lenbits=ce.bits,Q){j.msg="invalid code lengths set",O.mode=30;break}O.have=0,O.mode=19;case 19:for(;O.have<O.nlen+O.ndist;){for(;H=(k=O.lencode[ie&(1<<O.lenbits)-1])>>>16&255,_e=65535&k,!((we=k>>>24)<=P);){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}if(16>_e)ie>>>=we,P-=we,O.lens[O.have++]=_e;else{if(_e===16){for(V=we+2;V>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}if(ie>>>=we,P-=we,O.have===0){j.msg="invalid bit length repeat",O.mode=30;break}E=O.lens[O.have-1],Y=3+(3&ie),ie>>>=2,P-=2}else if(_e===17){for(V=we+3;V>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}P-=we,E=0,Y=3+(7&(ie>>>=we)),ie>>>=3,P-=3}else{for(V=we+7;V>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}P-=we,E=0,Y=11+(127&(ie>>>=we)),ie>>>=7,P-=7}if(O.have+Y>O.nlen+O.ndist){j.msg="invalid bit length repeat",O.mode=30;break}for(;Y--;)O.lens[O.have++]=E}}if(O.mode===30)break;if(O.lens[256]===0){j.msg="invalid code -- missing end-of-block",O.mode=30;break}if(O.lenbits=9,ce={bits:O.lenbits},Q=C(D,O.lens,0,O.nlen,O.lencode,0,O.work,ce),O.lenbits=ce.bits,Q){j.msg="invalid literal/lengths set",O.mode=30;break}if(O.distbits=6,O.distcode=O.distdyn,ce={bits:O.distbits},Q=C(N,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,ce),O.distbits=ce.bits,Q){j.msg="invalid distances set",O.mode=30;break}if(O.mode=20,ee===6)break e;case 20:O.mode=21;case 21:if(le>=6&&ge>=258){j.next_out=re,j.avail_out=ge,j.next_in=B,j.avail_in=le,O.hold=ie,O.bits=P,S(j,te),re=j.next_out,q=j.output,ge=j.avail_out,B=j.next_in,pe=j.input,le=j.avail_in,ie=O.hold,P=O.bits,O.mode===12&&(O.back=-1);break}for(O.back=0;H=(k=O.lencode[ie&(1<<O.lenbits)-1])>>>16&255,_e=65535&k,!((we=k>>>24)<=P);){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}if(H&&(240&H)==0){for(K=we,U=H,R=_e;H=(k=O.lencode[R+((ie&(1<<K+U)-1)>>K)])>>>16&255,_e=65535&k,!(K+(we=k>>>24)<=P);){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}ie>>>=K,P-=K,O.back+=K}if(ie>>>=we,P-=we,O.back+=we,O.length=_e,H===0){O.mode=26;break}if(32&H){O.back=-1,O.mode=12;break}if(64&H){j.msg="invalid literal/length code",O.mode=30;break}O.extra=15&H,O.mode=22;case 22:if(O.extra){for(V=O.extra;V>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}O.length+=ie&(1<<O.extra)-1,ie>>>=O.extra,P-=O.extra,O.back+=O.extra}O.was=O.length,O.mode=23;case 23:for(;H=(k=O.distcode[ie&(1<<O.distbits)-1])>>>16&255,_e=65535&k,!((we=k>>>24)<=P);){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}if((240&H)==0){for(K=we,U=H,R=_e;H=(k=O.distcode[R+((ie&(1<<K+U)-1)>>K)])>>>16&255,_e=65535&k,!(K+(we=k>>>24)<=P);){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}ie>>>=K,P-=K,O.back+=K}if(ie>>>=we,P-=we,O.back+=we,64&H){j.msg="invalid distance code",O.mode=30;break}O.offset=_e,O.extra=15&H,O.mode=24;case 24:if(O.extra){for(V=O.extra;V>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}O.offset+=ie&(1<<O.extra)-1,ie>>>=O.extra,P-=O.extra,O.back+=O.extra}if(O.offset>O.dmax){j.msg="invalid distance too far back",O.mode=30;break}O.mode=25;case 25:if(ge===0)break e;if(Y=te-ge,O.offset>Y){if((Y=O.offset-Y)>O.whave&&O.sane){j.msg="invalid distance too far back",O.mode=30;break}se=Y>O.wnext?(Y-=O.wnext,O.wsize-Y):O.wnext-Y,Y>O.length&&(Y=O.length),ue=O.window}else ue=q,se=re-O.offset,Y=O.length;for(Y>ge&&(Y=ge),ge-=Y,O.length-=Y;q[re++]=ue[se++],--Y;);O.length===0&&(O.mode=21);break;case 26:if(ge===0)break e;q[re++]=O.length,ge--,O.mode=21;break;case 27:if(O.wrap){for(;32>P;){if(le===0)break e;le--,ie|=pe[B++]<<P,P+=8}if(te-=ge,j.total_out+=te,O.total+=te,te&&(j.adler=O.check=O.flags?T(O.check,q,te,re-te):_(O.check,q,te,re-te)),te=ge,(O.flags?ie:u(ie))!==O.check){j.msg="incorrect data check",O.mode=30;break}P=ie=0}O.mode=28;case 28:if(O.wrap&&O.flags){for(;32>P;){if(le===0)break e;le--,ie+=pe[B++]<<P,P+=8}if(ie!==(4294967295&O.total)){j.msg="incorrect length check",O.mode=30;break}P=ie=0}O.mode=29;case 29:Q=1;break e;case 30:Q=-3;break e;case 31:return-4;case 32:default:return F}return j.next_out=re,j.avail_out=ge,j.next_in=B,j.avail_in=le,O.hold=ie,O.bits=P,(O.wsize||te!==j.avail_out&&O.mode<30&&(O.mode<27||ee!==4))&&b(j,j.output,j.next_out,te-j.avail_out)?(O.mode=31,-4):(W-=j.avail_in,te-=j.avail_out,j.total_in+=W,j.total_out+=te,O.total+=te,O.wrap&&te&&(j.adler=O.check=O.flags?T(O.check,q,te,j.next_out-te):_(O.check,q,te,j.next_out-te)),j.data_type=O.bits+(O.last?64:0)+(O.mode===12?128:0)+(O.mode===20||O.mode===15?256:0),(W==0&&te===0||ee===4)&&Q===M&&(Q=-5),Q)},l.inflateEnd=function(j){if(!j||!j.state)return F;var ee=j.state;return ee.window&&(ee.window=null),j.state=null,M},l.inflateGetHeader=function(j,ee){var O;return j&&j.state?(2&(O=j.state).wrap)==0?F:((O.head=ee).done=!1,M):F},l.inflateSetDictionary=function(j,ee){var O,pe=ee.length;return j&&j.state?(O=j.state).wrap!==0&&O.mode!==11?F:O.mode===11&&_(1,ee,pe,0)!==O.check?-3:b(j,ee,pe,pe)?(O.mode=31,-4):(O.havedict=1,M):F},l.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(o,c,l){var u=o("../utils/common"),d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],f=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],p=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(y,g,b,v,x,w,_,T){var S,C,D,N,M,F,L,A,X,he=T.bits,j=0,ee=0,O=0,pe=0,q=0,B=0,re=0,le=0,ge=0,ie=0,P=null,W=0,te=new u.Buf16(16),Y=new u.Buf16(16),se=null,ue=0;for(j=0;15>=j;j++)te[j]=0;for(ee=0;v>ee;ee++)te[g[b+ee]]++;for(q=he,pe=15;pe>=1&&te[pe]===0;pe--);if(q>pe&&(q=pe),pe===0)return x[w++]=20971520,x[w++]=20971520,T.bits=1,0;for(O=1;pe>O&&te[O]===0;O++);for(O>q&&(q=O),j=le=1;15>=j;j++)if(le<<=1,(le-=te[j])<0)return-1;if(le>0&&(y===0||pe!==1))return-1;for(Y[1]=0,j=1;15>j;j++)Y[j+1]=Y[j]+te[j];for(ee=0;v>ee;ee++)g[b+ee]!==0&&(_[Y[g[b+ee]]++]=ee);if(F=y===0?(P=se=_,19):y===1?(P=d,W-=257,se=h,ue-=257,256):(P=f,se=p,-1),j=O,M=w,re=ee=ie=0,D=-1,N=(ge=1<<(B=q))-1,y===1&&ge>852||y===2&&ge>592)return 1;for(;;){for(L=j-re,X=_[ee]<F?(A=0,_[ee]):_[ee]>F?(A=se[ue+_[ee]],P[W+_[ee]]):(A=96,0),S=1<<j-re,O=C=1<<B;x[M+(ie>>re)+(C-=S)]=L<<24|A<<16|X|0,C!==0;);for(S=1<<j-1;ie&S;)S>>=1;if(S!==0?(ie&=S-1,ie+=S):ie=0,ee++,--te[j]==0){if(j===pe)break;j=g[b+_[ee]]}if(j>q&&(ie&N)!==D){for(re===0&&(re=q),M+=O,le=1<<(B=j-re);pe>B+re&&!((le-=te[B+re])<=0);)B++,le<<=1;if(ge+=1<<B,y===1&&ge>852||y===2&&ge>592)return 1;x[D=ie&N]=q<<24|B<<16|M-w|0}}return ie!==0&&(x[M+ie]=j-re<<24|64<<16|0),T.bits=q,0}},{"../utils/common":41}],51:[function(o,c,l){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(o,c,l){function u(k){for(var I=k.length;0<=--I;)k[I]=0}function d(k,I,$,Z,ae){this.static_tree=k,this.extra_bits=I,this.extra_base=$,this.elems=Z,this.max_length=ae,this.has_stree=k&&k.length}function h(k,I){this.dyn_tree=k,this.max_code=0,this.stat_desc=I}function f(k){return 256>k?_e[k]:_e[256+(k>>>7)]}function p(k,I){k.pending_buf[k.pending++]=255&I,k.pending_buf[k.pending++]=I>>>8&255}function y(k,I,$){k.bi_valid>re-$?(k.bi_buf|=I<<k.bi_valid&65535,p(k,k.bi_buf),k.bi_buf=I>>re-k.bi_valid,k.bi_valid+=$-re):(k.bi_buf|=I<<k.bi_valid&65535,k.bi_valid+=$)}function g(k,I,$){y(k,$[2*I],$[2*I+1])}function b(k,I){for(var $=0;$|=1&k,k>>>=1,$<<=1,0<--I;);return $>>>1}function v(k,I,$){var Z,ae,ye=new Array(B+1),me=0;for(Z=1;B>=Z;Z++)ye[Z]=me=me+$[Z-1]<<1;for(ae=0;I>=ae;ae++){var xe=k[2*ae+1];xe!==0&&(k[2*ae]=b(ye[xe]++,xe))}}function x(k){var I;for(I=0;ee>I;I++)k.dyn_ltree[2*I]=0;for(I=0;O>I;I++)k.dyn_dtree[2*I]=0;for(I=0;pe>I;I++)k.bl_tree[2*I]=0;k.dyn_ltree[2*ge]=1,k.opt_len=k.static_len=0,k.last_lit=k.matches=0}function w(k){8<k.bi_valid?p(k,k.bi_buf):0<k.bi_valid&&(k.pending_buf[k.pending++]=k.bi_buf),k.bi_buf=0,k.bi_valid=0}function _(k,I,$,Z){var ae=2*I,ye=2*$;return k[ae]<k[ye]||k[ae]===k[ye]&&Z[I]<=Z[$]}function T(k,I,$){for(var Z=k.heap[$],ae=$<<1;ae<=k.heap_len&&(ae<k.heap_len&&_(I,k.heap[ae+1],k.heap[ae],k.depth)&&ae++,
256!_(I,Z,k.heap[ae],k.depth));)k.heap[$]=k.heap[ae],$=ae,ae<<=1;k.heap[$]=Z}function S(k,I,$){var Z,ae,ye,me,xe=0;if(k.last_lit!==0)for(;Z=k.pending_buf[k.d_buf+2*xe]<<8|k.pending_buf[k.d_buf+2*xe+1],ae=k.pending_buf[k.l_buf+xe],xe++,Z===0?g(k,ae,I):(g(k,(ye=K[ae])+j+1,I),(me=te[ye])!==0&&y(k,ae-=U[ye],me),g(k,ye=f(--Z),$),(me=Y[ye])!==0&&y(k,Z-=ce[ye],me)),xe<k.last_lit;);g(k,ge,I)}function C(k,I){var $,Z,ae,ye=I.dyn_tree,me=I.stat_desc.static_tree,xe=I.stat_desc.has_stree,De=I.stat_desc.elems,Re=-1;for(k.heap_len=0,k.heap_max=q,$=0;De>$;$++)ye[2*$]!==0?(k.heap[++k.heap_len]=Re=$,k.depth[$]=0):ye[2*$+1]=0;for(;k.heap_len<2;)ye[2*(ae=k.heap[++k.heap_len]=2>Re?++Re:0)]=1,k.depth[ae]=0,k.opt_len--,xe&&(k.static_len-=me[2*ae+1]);for(I.max_code=Re,$=k.heap_len>>1;$>=1;$--)T(k,ye,$);for(ae=De;$=k.heap[1],k.heap[1]=k.heap[k.heap_len--],T(k,ye,1),Z=k.heap[1],k.heap[--k.heap_max]=$,k.heap[--k.heap_max]=Z,ye[2*ae]=ye[2*$]+ye[2*Z],k.depth[ae]=(k.depth[$]>=k.depth[Z]?k.depth[$]:k.depth[Z])+1,ye[2*$+1]=ye[2*Z+1]=ae,k.heap[1]=ae++,T(k,ye,1),2<=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],(function(Ue,Ke){var nt,Ye,dt,Ae,Le,He,Ze=Ke.dyn_tree,Qe=Ke.max_code,it=Ke.stat_desc.static_tree,bt=Ke.stat_desc.has_stree,xn=Ke.stat_desc.extra_bits,an=Ke.stat_desc.extra_base,de=Ke.stat_desc.max_length,ve=0;for(Ae=0;B>=Ae;Ae++)Ue.bl_count[Ae]=0;for(Ze[2*Ue.heap[Ue.heap_max]+1]=0,nt=Ue.heap_max+1;q>nt;nt++)de<(Ae=Ze[2*Ze[2*(Ye=Ue.heap[nt])+1]+1]+1)&&(Ae=de,ve++),Ze[2*Ye+1]=Ae,Ye>Qe||(Ue.bl_count[Ae]++,Le=0,Ye>=an&&(Le=xn[Ye-an]),He=Ze[2*Ye],Ue.opt_len+=He*(Ae+Le),bt&&(Ue.static_len+=He*(it[2*Ye+1]+Le)));if(ve!==0){do{for(Ae=de-1;Ue.bl_count[Ae]===0;)Ae--;Ue.bl_count[Ae]--,Ue.bl_count[Ae+1]+=2,Ue.bl_count[de]--,ve-=2}while(ve>0);for(Ae=de;Ae!==0;Ae--)for(Ye=Ue.bl_count[Ae];Ye!==0;)Qe<(dt=Ue.heap[--nt])||(Ze[2*dt+1]!==Ae&&(Ue.opt_len+=(Ae-Ze[2*dt+1])*Ze[2*dt],Ze[2*dt+1]=Ae),Ye--)}})(k,I),v(ye,Re,k.bl_count)}function D(k,I,$){var Z,ae,ye=-1,me=I[1],xe=0,De=7,Re=4;
256for(me===0&&(De=138,Re=3),I[2*($+1)+1]=65535,Z=0;$>=Z;Z++)ae=me,me=I[2*(Z+1)+1],++xe<De&&ae===me||(Re>xe?k.bl_tree[2*ae]+=xe:ae!==0?(ae!==ye&&k.bl_tree[2*ae]++,k.bl_tree[2*ie]++):10>=xe?k.bl_tree[2*P]++:k.bl_tree[2*W]++,ye=ae,Re=(xe=0)===me?(De=138,3):ae===me?(De=6,3):(De=7,4))}function N(k,I,$){var Z,ae,ye=-1,me=I[1],xe=0,De=7,Re=4;for(me===0&&(De=138,Re=3),Z=0;$>=Z;Z++)if(ae=me,me=I[2*(Z+1)+1],!(++xe<De&&ae===me)){if(Re>xe)for(;g(k,ae,k.bl_tree),--xe!=0;);else ae!==0?(ae!==ye&&(g(k,ae,k.bl_tree),xe--),g(k,ie,k.bl_tree),y(k,xe-3,2)):10>=xe?(g(k,P,k.bl_tree),y(k,xe-3,3)):(g(k,W,k.bl_tree),y(k,xe-11,7));ye=ae,Re=(xe=0)===me?(De=138,3):ae===me?(De=6,3):(De=7,4)}}function M(k,I,$,Z){y(k,(X<<1)+(Z?1:0),3),(function(ae,ye,me,xe){w(ae),p(ae,me),p(ae,~me),F.arraySet(ae.pending_buf,ae.window,ye,me,ae.pending),ae.pending+=me})(k,I,$)}var F=o("../utils/common"),L=0,A=1,X=0,he=29,j=256,ee=j+1+he,O=30,pe=19,q=2*ee+1,B=15,re=16,le=7,ge=256,ie=16,P=17,W=18,te=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],se=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ue=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],we=new Array(2*(ee+2));u(we);var H=new Array(2*O);u(H);var _e=new Array(512);u(_e);var K=new Array(256);u(K);var U=new Array(he);u(U);var R,E,Q,ce=new Array(O);u(ce);var V=!1;l._tr_init=function(k){V||((function(){var I,$,Z,ae,ye,me=new Array(B+1);for(ae=Z=0;he-1>ae;ae++)for(U[ae]=Z,I=0;I<1<<te[ae];I++)K[Z++]=ae;for(K[Z-1]=ae,ae=ye=0;16>ae;ae++)for(ce[ae]=ye,I=0;I<1<<Y[ae];I++)_e[ye++]=ae;for(ye>>=7;O>ae;ae++)for(ce[ae]=ye<<7,I=0;I<1<<Y[ae]-7;I++)_e[256+ye++]=ae;for($=0;B>=$;$++)me[$]=0;for(I=0;143>=I;)we[2*I+1]=8,I++,me[8]++;for(;255>=I;)we[2*I+1]=9,I++,me[9]++;for(;279>=I;)we[2*I+1]=7,I++,me[7]++;for(;287>=I;)we[2*I+1]=8,I++,me[8]++;for(v(we,ee+1,me),I=0;O>I;I++)H[2*I+1]=5,H[2*I]=b(I,5);R=new d(we,te,j+1,ee,B),E=new d(H,Y,0,O,B),Q=new d(new Array(0),se,0,pe,le)})(),V=!0),k.l_desc=new h(k.dyn_ltree,R),k.d_desc=new h(k.dyn_dtree,E),k.bl_desc=new h(k.bl_tree,Q),k.bi_buf=0,k.bi_valid=0,x(k)},l._tr_stored_block=M,l._tr_flush_block=function(k,I,$,Z){var ae,ye,me=0;0<k.level?(k.strm.data_type===2&&(k.strm.data_type=(function(xe){var De,Re=4093624447;for(De=0;31>=De;De++,Re>>>=1)if(1&Re&&xe.dyn_ltree[2*De]!==0)return L;if(xe.dyn_ltree[18]!==0||xe.dyn_ltree[20]!==0||xe.dyn_ltree[26]!==0)return A;for(De=32;j>De;De++)if(xe.dyn_ltree[2*De]!==0)return A;return L})(k)),C(k,k.l_desc),C(k,k.d_desc),me=(function(xe){var De;for(D(xe,xe.dyn_ltree,xe.l_desc.max_code),D(xe,xe.dyn_dtree,xe.d_desc.max_code),C(xe,xe.bl_desc),De=pe-1;De>=3&&xe.bl_tree[2*ue[De]+1]===0;De--);return xe.opt_len+=3*(De+1)+5+5+4,De})(k),ae=k.opt_len+3+7>>>3,(ye=k.static_len+3+7>>>3)<=ae&&(ae=ye)):ae=ye=$+5,ae>=$+4&&I!==-1?M(k,I,$,Z):k.strategy===4||ye===ae?(y(k,2+(Z?1:0),3),S(k,we,H)):(y(k,4+(Z?1:0),3),(function(xe,De,Re,Ue){var Ke;for(y(xe,De-257,5),y(xe,Re-1,5),y(xe,Ue-4,4),Ke=0;Ue>Ke;Ke++)y(xe,xe.bl_tree[2*ue[Ke]+1],3);N(xe,xe.dyn_ltree,De-1),N(xe,xe.dyn_dtree,Re-1)})(k,k.l_desc.max_code+1,k.d_desc.max_code+1,me+1),S(k,k.dyn_ltree,k.dyn_dtree)),x(k),Z&&w(k)},l._tr_tally=function(k,I,$){return k.pending_buf[k.d_buf+2*k.last_lit]=I>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&I,k.pending_buf[k.l_buf+k.last_lit]=255&$,k.last_lit++,I===0?k.dyn_ltree[2*$]++:(k.matches++,I--,k.dyn_ltree[2*(K[$]+j+1)]++,k.dyn_dtree[2*f(I)]++),k.last_lit===k.lit_bufsize-1},l._tr_align=function(k){y(k,2,3),g(k,ge,we),(function(I){I.bi_valid===16?(p(I,I.bi_buf),I.bi_buf=0,I.bi_valid=0):8<=I.bi_valid&&(I.pending_buf[I.pending++]=255&I.bi_buf,I.bi_buf>>=8,I.bi_valid-=8)})(k)}},{"../utils/common":41}],53:[function(o,c,l){c.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(o,c,l){c.exports=typeof setImmediate=="function"?setImmediate:function(){var u=[].slice.apply(arguments);u.splice(1,0,0),setTimeout.apply(null,u)}},{}]},{},[10])(10)})}).call(this,typeof co<"u"?co:typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer)},{buffer:83}],89:[function(t,n,r){r.Parser=t("./lib/parser").Parser,r.rules=t("./lib/rules"),r.errors=t("./lib/errors"),r.results=t("./lib/parsing-results"),r.StringSource=t("./lib/StringSource"),r.Token=t("./lib/Token"),r.bottomUp=t("./lib/bottom-up"),r.RegexTokeniser=t("./lib/regex-tokeniser").RegexTokeniser,r.rule=function(i){var a;return function(o){return a||(a=i()),a(o)}}},{"./lib/StringSource":90,"./lib/Token":91,"./lib/bottom-up":93,"./lib/errors":94,"./lib/parser":96,"./lib/parsing-results":97,"./lib/regex-tokeniser":98,"./lib/rules":99}],90:[function(t,n,r){var i=(n.exports=function(a,o){var c={asString:function(){return a},range:function(l,u){return new i(a,o,l,u)}};return c},function(a,o,c,l){this._string=a,this._description=o,this._startIndex=c,this._endIndex=l});i.prototype.to=function(a){return new i(this._string,this._description,this._startIndex,a._endIndex)},i.prototype.describe=function(){var a=this._position(),o=this._description?this._description+` 257`:"";return o+"Line number: "+a.lineNumber+` 258Character number: `+a.characterNumber},i.prototype.lineNumber=function(){return this._position().lineNumber},i.prototype.characterNumber=function(){return this._position().characterNumber},i.prototype._position=function(){for(var a=this,o=0,c=function(){return a._string.indexOf(` 259`,o)},l=1;c()!==-1&&c()<this._startIndex;)o=c()+1,l+=1;var u=this._startIndex-o+1;return{lineNumber:l,characterNumber:u}}},{}],91:[function(t,n,r){n.exports=function(i,a,o){this.name=i,this.value=a,o&&(this.source=o)}},{}],92:[function(t,n,r){var i=n.exports=function(a,o){this._tokens=a,this._startIndex=o||0};i.prototype.head=function(){return this._tokens[this._startIndex]},i.prototype.tail=function(a){return new i(this._tokens,this._startIndex+1)},i.prototype.toArray=function(){return this._tokens.slice(this._startIndex)},i.prototype.end=function(){return this._tokens[this._tokens.length-1]},i.prototype.to=function(a){var o=this.head().source,c=a.head()||a.end();return o.to(c.source)}},{}],93:[function(t,n,r){function i(l){function u(y){return new i(l.slice(0,h().indexOf(y)))}function d(y){return new i(l.slice(0,h().indexOf(y)+1))}function h(){return l.map(function(y){return y.name})}function f(y){for(var g,b;;){if(g=p(y.remaining()),!g.isSuccess())return g.isFailure()?y:g;b=y.source().to(g.source()),y=o.success(g.value()(y.value(),b),g.remaining(),b)}}function p(y){return a.firstOf("infix",l.map(function(g){return g.rule}))(y)}return{apply:f,untilExclusive:u,untilInclusive:d}}var a=t("./rules"),o=t("./parsing-results");
vendor: 7,921 bytes, lines 259-261
259r.parser=function(l,u,d){function h(_){return{name:_.name,rule:c(_.ruleBuilder.bind(null,v))}}function f(){return g(x)}function p(_){return g(x.untilExclusive(_))}function y(_){return g(x.untilInclusive(_))}function g(_){return b.bind(null,_)}function b(_,T){var S=w(T);return S.isSuccess()?_.apply(S):S}var v={rule:f,leftAssociative:p,rightAssociative:y},x=new i(d.map(h)),w=a.firstOf(l,u);return v},r.infix=function(l,u){function d(h){return r.infix(l,function(f){var p=u(f);return function(y){var g=p(y);return g.map(function(b){return function(v,x){return h(v,b,x)}})}})}return{name:l,ruleBuilder:u,map:d}};var c=function(l){var u;return function(d){return u||(u=l()),u(d)}}},{"./parsing-results":97,"./rules":99}],94:[function(t,n,r){r.error=function(a){return new i(a)};var i=function(a){this.expected=a.expected,this.actual=a.actual,this._location=a.location};i.prototype.describe=function(){var a=this._location?this._location.describe()+`: 260`:"";return a+"Expected "+this.expected+` 261but got `+this.actual},i.prototype.lineNumber=function(){return this._location.lineNumber()},i.prototype.characterNumber=function(){return this._location.characterNumber()}},{}],95:[function(t,n,r){var i=(r.fromArray=function(a){var o=0,c=function(){return o<a.length};return new i({hasNext:c,next:function(){if(c())return a[o++];throw new Error("No more elements")}})},function(a){this._iterator=a});i.prototype.map=function(a){var o=this._iterator;return new i({hasNext:function(){return o.hasNext()},next:function(){return a(o.next())}})},i.prototype.filter=function(a){var o,c=this._iterator,l=!1,u=!1,d=function(){if(!l)for(l=!0,u=!1;c.hasNext()&&!u;)o=c.next(),u=a(o)};return new i({hasNext:function(){return d(),u},next:function(){d();var h=o;return l=!1,h}})},i.prototype.first=function(){var a=this._iterator;return this._iterator.hasNext()?a.next():null},i.prototype.toArray=function(){for(var a=[];this._iterator.hasNext();)a.push(this._iterator.next());return a}},{}],96:[function(t,n,r){var i=t("./TokenIterator");r.Parser=function(a){var o=function(c,l){return c(new i(l))};return{parseTokens:o}}},{"./TokenIterator":92}],97:[function(t,n,r){n.exports={failure:function(a,o){if(a.length<1)throw new Error("Failure must have errors");return new i({status:"failure",remaining:o,errors:a})},error:function(a,o){if(a.length<1)throw new Error("Failure must have errors");return new i({status:"error",remaining:o,errors:a})},success:function(a,o,c){return new i({status:"success",value:a,source:c,remaining:o,errors:[]})},cut:function(a){return new i({status:"cut",remaining:a,errors:[]})}};var i=function(a){this._value=a.value,this._status=a.status,this._hasValue=a.value!==void 0,this._remaining=a.remaining,this._source=a.source,this._errors=a.errors};i.prototype.map=function(a){return this._hasValue?new i({value:a(this._value,this._source),status:this._status,remaining:this._remaining,source:this._source,errors:this._errors}):this},i.prototype.changeRemaining=function(a){return new i({value:this._value,status:this._status,remaining:a,source:this._source,errors:this._errors})},i.prototype.isSuccess=function(){return this._status==="success"||this._status==="cut"},i.prototype.isFailure=function(){return this._status==="failure"},i.prototype.isError=function(){return this._status==="error"},i.prototype.isCut=function(){return this._status==="cut"},i.prototype.value=function(){return this._value},i.prototype.remaining=function(){return this._remaining},i.prototype.source=function(){return this._source},i.prototype.errors=function(){return this._errors}},{}],98:[function(t,n,r){function i(c){function l(h,f){for(var p=new o(h,f),y=0,g=[];y<h.length;){var b=u(h,y,p);y=b.endIndex,g.push(b.token)}return g.push(d(h,p)),g}function u(h,f,p){for(var y=0;y<c.length;y++){var g=c[y].regex;g.lastIndex=f;var b=g.exec(h);if(b){var x=f+b[0].length;if(b.index===f&&x>f){var v=b[1],w=new a(c[y].name,v,p.range(f,x));return{token:w,endIndex:x}}}}var x=f+1,w=new a("unrecognisedCharacter",h.substring(f,x),p.range(f,x));return{token:w,endIndex:x}}function d(h,f){return new a("end",null,f.range(h.length,h.length))}return c=c.map(function(h){return{name:h.name,regex:new RegExp(h.regex.source,"g")}}),{tokenise:l}}var a=t("./Token"),o=t("./StringSource");r.RegexTokeniser=i},{"./StringSource":90,"./Token":91}],99:[function(t,n,r){function i(g){return l.success(null,g)}function a(g,b){var v,x=g.head();return v=x?u.error({expected:b,actual:y(x),location:x.source}):u.error({expected:b,actual:"end of tokens"}),l.failure([v],g)}var o=t("underscore"),c=t("option"),l=t("./parsing-results"),u=t("./errors"),d=t("./lazy-iterators");r.token=function(g,b){var v=b!==void 0;return function(x){var w=x.head();if(!w||w.name!==g||v&&w.value!==b){var _=y({name:g,value:b});return a(x,_)}return l.success(w.value,x.tail(),w.source)}},r.tokenOfType=function(g){return r.token(g)},r.firstOf=function(g,b){return o.isArray(b)||(b=Array.prototype.slice.call(arguments,1)),function(v){return d.fromArray(b).map(function(x){return x(v)}).filter(function(x){return x.isSuccess()||x.isError()}).first()||a(v,g)}},r.then=function(g,b){return function(v){var x=g(v);return x.map||console.log(x),x.map(b)}},r.sequence=function(){function g(x){return x.isCaptured}var b=Array.prototype.slice.call(arguments,0),v=function(x){var w=o.foldl(b,function(T,S){var C=T.result,D=T.hasCut;if(!C.isSuccess())return{result:C,hasCut:D};var N=S(C.remaining());if(N.isCut())return{result:C,hasCut:!0};if(N.isSuccess()){var M;M=S.isCaptured?C.value().withValue(S,N.value()):C.value();var F=N.remaining(),L=x.to(F);return{result:l.success(M,F,L),hasCut:D}}return D?{result:l.error(N.errors(),N.remaining()),hasCut:D}:{result:N,hasCut:D}},{result:l.success(new h,x),hasCut:!1}).result,_=x.to(w.remaining());return w.map(function(T){return T.withValue(r.sequence.source,_)})};return v.head=function(){var x=o.find(b,g);return r.then(v,r.sequence.extract(x))},v.map=function(x){return r.then(v,function(w){return x.apply(this,w.toArray())})},v};var h=function(g,b){this._values=g||{},this._valuesArray=b||[]};h.prototype.withValue=function(g,b){if(g.captureName&&g.captureName in this._values)throw new Error('Cannot add second value for capture "'+g.captureName+'"');var v=o.clone(this._values);v[g.captureName]=b;var x=this._valuesArray.concat([b]);return new h(v,x)},h.prototype.get=function(g){if(g.captureName in this._values)return this._values[g.captureName];throw new Error('No value for capture "'+g.captureName+'"')},h.prototype.toArray=function(){return this._valuesArray},r.sequence.capture=function(g,b){var v=function(){return g.apply(this,arguments)};return v.captureName=b,v.isCaptured=!0,v},r.sequence.extract=function(g){return function(b){return b.get(g)}},r.sequence.applyValues=function(g){var b=Array.prototype.slice.call(arguments,1);return function(v){var x=b.map(function(w){return v.get(w)});return g.apply(this,x)}},r.sequence.source={captureName:"âsourceâ"},r.sequence.cut=function(){return function(g){return l.cut(g)}},r.optional=function(g){return function(b){var v=g(b);return v.isSuccess()?v.map(c.some):v.isFailure()?l.success(c.none,b):v}},r.zeroOrMoreWithSeparator=function(g,b){return p(g,b,!1)},r.oneOrMoreWithSeparator=function(g,b){return p(g,b,!0)};var f=r.zeroOrMore=function(g){return function(b){for(var v,x=[];(v=g(b))&&v.isSuccess();)b=v.remaining(),x.push(v.value());return v.isError()?v:l.success(x,b)}};r.oneOrMore=function(g){return r.oneOrMoreWithSeparator(g,i)};var p=function(g,b,v){return function(x){var w=g(x);if(w.isSuccess()){var _=r.sequence.capture(g,"main"),T=f(r.then(r.sequence(b,_),r.sequence.extract(_))),S=T(w.remaining());return l.success([w.value()].concat(S.value()),S.remaining())}return v||w.isError()?w:l.success([],x)}};r.leftAssociative=function(g,b,v){var x;x=v?[{func:v,rule:b}]:b,x=x.map(function(_){return r.then(_.rule,function(T){return function(S,C){return _.func(S,T,C)}})});
261var w=r.firstOf.apply(null,["rules"].concat(x));return function(_){var T=_,S=g(_);if(!S.isSuccess())return S;for(var C=w(S.remaining());C.isSuccess();){var D=C.remaining(),N=T.to(C.remaining()),M=C.value();S=l.success(M(S.value(),N),D,N),C=w(S.remaining())}return C.isError()?C:S}},r.leftAssociative.firstOf=function(){return Array.prototype.slice.call(arguments,0)},r.nonConsuming=function(g){return function(b){return g(b).changeRemaining(b)}};var y=function(g){return g.value?g.name+' "'+g.value+'"':g.name}},{"./errors":94,"./lazy-iterators":95,"./parsing-results":97,option:100,underscore:102}],100:[function(t,n,r){function i(o){return typeof o=="function"?o():o}r.none=Object.create({value:function(){throw new Error("Called value on none")},isNone:function(){return!0},isSome:function(){return!1},map:function(){return r.none},flatMap:function(){return r.none},filter:function(){return r.none},toArray:function(){return[]},orElse:i,valueOrElse:i}),r.some=function(o){return new a(o)};var a=function(o){this._value=o};a.prototype.value=function(){return this._value},a.prototype.isNone=function(){return!1},a.prototype.isSome=function(){return!0},a.prototype.map=function(o){return new a(o(this._value))},a.prototype.flatMap=function(o){return o(this._value)},a.prototype.filter=function(o){return o(this._value)?this:r.none},a.prototype.toArray=function(){return[this._value]},a.prototype.orElse=function(o){return this},a.prototype.valueOrElse=function(o){return this._value},r.isOption=function(o){return o===r.none||o instanceof a},r.fromNullable=function(o){return o==null?r.none:new a(o)}},{}],101:[function(t,n,r){function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(w){if(f===setTimeout)return setTimeout(w,0);if((f===i||!f)&&setTimeout)return f=setTimeout,setTimeout(w,0);try{return f(w,0)}catch{try{return f.call(null,w,0)}catch{return f.call(this,w,0)}}}function c(w){if(p===clearTimeout)return clearTimeout(w);if((p===a||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(w);try{return p(w)}catch{try{return p.call(null,w)}catch{return p.call(this,w)}}}function l(){v&&g&&(v=!1,g.length?b=g.concat(b):x=-1,b.length&&u())}function u(){if(!v){var w=o(l);v=!0;for(var _=b.length;_;){for(g=b,b=[];++x<_;)g&&g[x].run();x=-1,_=b.length}g=null,v=!1,c(w)}}function d(w,_){this.fun=w,this.array=_}function h(){}var f,p,y=n.exports={};(function(){try{f=typeof setTimeout=="function"?setTimeout:i}catch{f=i}try{p=typeof clearTimeout=="function"?clearTimeout:a}catch{p=a}})();var g,b=[],v=!1,x=-1;y.nextTick=function(w){var _=new Array(arguments.length-1);if(arguments.length>1)for(var T=1;T<arguments.length;T++)_[T-1]=arguments[T];b.push(new d(w,_)),b.length!==1||v||o(u)},d.prototype.run=function(){this.fun.apply(null,this.array)},y.title="browser",y.browser=!0,y.env={},y.argv=[],y.version="",y.versions={},y.on=h,y.addListener=h,y.once=h,y.off=h,y.removeListener=h,y.removeAllListeners=h,y.emit=h,y.binding=function(w){throw new Error("process.binding is not supported")},y.cwd=function(){return"/"},y.chdir=function(w){throw new Error("process.chdir is not supported")},y.umask=function(){return 0}},{}],102:[function(t,n,r){(function(i){(function(a,o){typeof r=="object"&&typeof n<"u"?n.exports=o():(a=typeof globalThis<"u"?globalThis:a||self,(function(){var c=a._,l=a._=o();l.noConflict=function(){return a._=c,l}})())})(this,function(){function a(ne,fe){return fe=fe==null?ne.length-1:+fe,function(){for(var Te=Math.max(arguments.length-fe,0),Se=Array(Te),Ne=0;Te>Ne;Ne++)Se[Ne]=arguments[Ne+fe];switch(fe){case 0:return ne.call(this,Se);case 1:return ne.call(this,arguments[0],Se);case 2:return ne.call(this,arguments[0],arguments[1],Se)}var ke=Array(fe+1);for(Ne=0;fe>Ne;Ne++)ke[Ne]=arguments[Ne];return ke[fe]=Se,ne.apply(this,ke)}}function o(ne){var fe=typeof ne;return fe==="function"||fe==="object"&&!!ne}function c(ne){return ne===null}function l(ne){return ne===void 0}function u(ne){return ne===!0||ne===!1||Zp.call(ne)==="[object Boolean]"}function d(ne){return!(!ne||ne.nodeType!==1)}function h(ne){var fe="[object "+ne+"]";return function(Te){return Zp.call(Te)===fe}}function f(ne){return ne!=null&&Kr(ne.getInt8)&&yC(ne.buffer)}function p(ne,fe){return ne!=null&&Z8.call(ne,fe)}function y(ne){return!mC(ne)&&tI(ne)&&!isNaN(parseFloat(ne))}function g(ne){return gC(ne)&&eI(ne)}function b(ne){return function(){return ne}}function v(ne){return function(fe){var Te=ne(fe);return typeof Te=="number"&&Te>=0&&nI>=Te}}function x(ne){return function(fe){return fe==null?void 0:fe[ne]}}function w(ne){return dC?dC(ne)&&!_b(ne):cI(ne)&&lI.test(Zp.call(ne))}function _(ne){for(var fe={},Te=ne.length,Se=0;Te>Se;++Se)fe[ne[Se]]=!0;return{contains:function(Ne){return fe[Ne]},push:function(Ne){return fe[Ne]=!0,ne.push(Ne)}}}function T(ne,fe){fe=_(fe);var Te=pC.length,Se=ne.constructor,Ne=Kr(Se)&&Se.prototype||uw,ke="constructor";for(p(ne,ke)&&!fe.contains(ke)&&fe.push(ke);Te--;)ke=pC[Te],ke in ne&&ne[ke]!==Ne[ke]&&!fe.contains(ke)&&fe.push(ke)}function S(ne){if(!o(ne))return[];if(uC)return uC(ne);var fe=[];for(var Te in ne)p(ne,Te)&&fe.push(Te);return fC&&T(ne,fe),fe}function C(ne){if(ne==null)return!0;var fe=ci(ne);return typeof fe=="number"&&(Vl(ne)||hw(ne)||pw(ne))?fe===0:ci(S(ne))===0}function D(ne,fe){var Te=S(fe),Se=Te.length;if(ne==null)return!Se;for(var Ne=Object(ne),ke=0;Se>ke;ke++){var Pe=Te[ke];if(fe[Pe]!==Ne[Pe]||!(Pe in Ne))return!1}return!0}function N(ne){return ne instanceof N?ne:this instanceof N?void(this._wrapped=ne):new N(ne)}function M(ne){return new Uint8Array(ne.buffer||ne,ne.byteOffset||0,Tb(ne))}function F(ne,fe,Te,Se){if(ne===fe)return ne!==0||1/ne===1/fe;if(ne==null||fe==null)return!1;if(ne!==ne)return fe!==fe;var Ne=typeof ne;return Ne!=="function"&&Ne!=="object"&&typeof fe!="object"?!1:L(ne,fe,Te,Se)}function L(ne,fe,Te,Se){ne instanceof N&&(ne=ne._wrapped),fe instanceof N&&(fe=fe._wrapped);var Ne=Zp.call(ne);if(Ne!==Zp.call(fe))return!1;if(wC&&Ne=="[object Object]"&&_b(ne)){if(!_b(fe))return!1;Ne=_C}switch(Ne){case"[object RegExp]":case"[object String]":return""+ne==""+fe;case"[object Number]":return+ne!=+ne?+fe!=+fe:+ne==0?1/+ne===1/fe:+ne
vendor: 6,236 bytes, lines 261-273
261==+fe;case"[object Date]":case"[object Boolean]":return+ne==+fe;case"[object Symbol]":return cC.valueOf.call(ne)===cC.valueOf.call(fe);case"[object ArrayBuffer]":case _C:return L(M(ne),M(fe),Te,Se)}var ke=Ne==="[object Array]";if(!ke&&xC(ne)){var Pe=Tb(ne);if(Pe!==Tb(fe))return!1;if(ne.buffer===fe.buffer&&ne.byteOffset===fe.byteOffset)return!0;ke=!0}if(!ke){if(typeof ne!="object"||typeof fe!="object")return!1;var Ve=ne.constructor,vt=fe.constructor;if(Ve!==vt&&!(Kr(Ve)&&Ve instanceof Ve&&Kr(vt)&&vt instanceof vt)&&"constructor"in ne&&"constructor"in fe)return!1}Te=Te||[],Se=Se||[];for(var mt=Te.length;mt--;)if(Te[mt]===ne)return Se[mt]===fe;if(Te.push(ne),Se.push(fe),ke){if(mt=ne.length,mt!==fe.length)return!1;for(;mt--;)if(!F(ne[mt],fe[mt],Te,Se))return!1}else{var jn,Si=S(ne);if(mt=Si.length,S(fe).length!==mt)return!1;for(;mt--;)if(jn=Si[mt],!p(fe,jn)||!F(ne[jn],fe[jn],Te,Se))return!1}return Te.pop(),Se.pop(),!0}function A(ne,fe){return F(ne,fe)}function X(ne){if(!o(ne))return[];var fe=[];for(var Te in ne)fe.push(Te);return fC&&T(ne,fe),fe}function he(ne){var fe=ci(ne);return function(Te){if(Te==null)return!1;var Se=X(Te);if(ci(Se))return!1;for(var Ne=0;fe>Ne;Ne++)if(!Kr(Te[ne[Ne]]))return!1;return ne!==EC||!Kr(Te[gw])}}function j(ne){for(var fe=S(ne),Te=fe.length,Se=Array(Te),Ne=0;Te>Ne;Ne++)Se[Ne]=ne[fe[Ne]];return Se}function ee(ne){for(var fe=S(ne),Te=fe.length,Se=Array(Te),Ne=0;Te>Ne;Ne++)Se[Ne]=[fe[Ne],ne[fe[Ne]]];return Se}function O(ne){for(var fe={},Te=S(ne),Se=0,Ne=Te.length;Ne>Se;Se++)fe[ne[Te[Se]]]=Te[Se];return fe}function pe(ne){var fe=[];for(var Te in ne)Kr(ne[Te])&&fe.push(Te);return fe.sort()}function q(ne,fe){return function(Te){var Se=arguments.length;if(fe&&(Te=Object(Te)),2>Se||Te==null)return Te;for(var Ne=1;Se>Ne;Ne++)for(var ke=arguments[Ne],Pe=ne(ke),Ve=Pe.length,vt=0;Ve>vt;vt++){var mt=Pe[vt];fe&&Te[mt]!==void 0||(Te[mt]=ke[mt])}return Te}}function B(){return function(){}}function re(ne){if(!o(ne))return{};if(hC)return hC(ne);var fe=B();fe.prototype=ne;var Te=new fe;return fe.prototype=null,Te}function le(ne,fe){var Te=re(ne);return fe&&Sb(Te,fe),Te}function ge(ne){return o(ne)?Vl(ne)?ne.slice():DC({},ne):ne}function ie(ne,fe){return fe(ne),ne}function P(ne){return Vl(ne)?ne:[ne]}function W(ne){return N.toPath(ne)}function te(ne,fe){for(var Te=fe.length,Se=0;Te>Se;Se++){if(ne==null)return;ne=ne[fe[Se]]}return Te?ne:void 0}function Y(ne,fe,Te){var Se=te(ne,W(fe));return l(Se)?Te:Se}function se(ne,fe){fe=W(fe);for(var Te=fe.length,Se=0;Te>Se;Se++){var Ne=fe[Se];if(!p(ne,Ne))return!1;ne=ne[Ne]}return!!Te}function ue(ne){return ne}function we(ne){return ne=Sb({},ne),function(fe){return D(fe,ne)}}function H(ne){return ne=W(ne),function(fe){return te(fe,ne)}}function _e(ne,fe,Te){if(fe===void 0)return ne;switch(Te??3){case 1:return function(Se){return ne.call(fe,Se)};case 3:return function(Se,Ne,ke){return ne.call(fe,Se,Ne,ke)};case 4:return function(Se,Ne,ke,Pe){return ne.call(fe,Se,Ne,ke,Pe)}}return function(){return ne.apply(fe,arguments)}}function K(ne,fe,Te){return ne==null?ue:Kr(ne)?_e(ne,fe,Te):o(ne)&&!Vl(ne)?we(ne):H(ne)}function U(ne,fe){return K(ne,fe,1/0)}function R(ne,fe,Te){return N.iteratee!==U?N.iteratee(ne,fe):K(ne,fe,Te)}function E(ne,fe,Te){fe=R(fe,Te);for(var Se=S(ne),Ne=Se.length,ke={},Pe=0;Ne>Pe;Pe++){var Ve=Se[Pe];ke[Ve]=fe(ne[Ve],Ve,ne)}return ke}function Q(){}function ce(ne){return ne==null?Q:function(fe){return Y(ne,fe)}}function V(ne,fe,Te){var Se=Array(Math.max(0,ne));fe=_e(fe,Te,1);for(var Ne=0;ne>Ne;Ne++)Se[Ne]=fe(Ne);return Se}function k(ne,fe){return fe==null&&(fe=ne,ne=0),ne+Math.floor(Math.random()*(fe-ne+1))}function I(ne){var fe=function(ke){return ne[ke]},Te="(?:"+S(ne).join("|")+")",Se=RegExp(Te),Ne=RegExp(Te,"g");return function(ke){return ke=ke==null?"":""+ke,Se.test(ke)?ke.replace(Ne,fe):ke}}function $(ne){return"\\"+wI[ne]}function Z(ne,fe,Te){!fe&&Te&&(fe=Te),fe=CC({},fe,N.templateSettings);var Se=RegExp([(fe.escape||yw).source,(fe.interpolate||yw).source,(fe.evaluate||yw).source].join("|")+"|$","g"),Ne=0,ke="__p+='";ne.replace(Se,function(mt,jn,Si,PC,OC){return ke+=ne.slice(Ne,OC).replace(xI,$),Ne=OC+mt.length,jn?ke+=`'+ 262((__t=(`+jn+`))==null?'':_.escape(__t))+ 263'`:Si?ke+=`'+ 264((__t=(`+Si+`))==null?'':__t)+ 265'`:PC&&(ke+=`'; 266`+PC+` 267__p+='`),mt}),ke+=`'; 268`;var Pe=fe.variable;if(Pe){if(!_I.test(Pe))throw new Error("variable is not a bare identifier: "+Pe)}else ke=`with(obj||{}){ 269`+ke+`} 270`,Pe="obj";ke=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; 271`+ke+`return __p; 272`;var Ve;try{Ve=new Function(Pe,"_",ke)}catch(mt){throw mt.source=ke,mt}var vt=function(mt){return Ve.call(this,mt,N)};return vt.source="function("+Pe+`){ 273`+ke+"}",vt}function ae(ne,fe,Te){fe=W(fe);var Se=fe.length;if(!Se)return Kr(Te)?Te.call(ne):Te;for(var Ne=0;Se>Ne;Ne++){var ke=ne==null?void 0:ne[fe[Ne]];ke===void 0&&(ke=Te,Ne=Se),ne=Kr(ke)?ke.call(ne):ke}return ne}function ye(ne){var fe=++TI+"";return ne?ne+fe:fe}function me(ne){var fe=N(ne);return fe._chain=!0,fe}function xe(ne,fe,Te,Se,Ne){if(!(Se instanceof fe))return ne.apply(Te,Ne);var ke=re(ne.prototype),Pe=ne.apply(ke,Ne);return o(Pe)?Pe:ke}function De(ne,fe,Te,Se){if(Se=Se||[],fe||fe===0){if(0>=fe)return Se.concat(ne)}else fe=1/0;for(var Ne=Se.length,ke=0,Pe=ci(ne);Pe>ke;ke++){var Ve=ne[ke];if(li(Ve)&&(Vl(Ve)||pw(Ve)))if(fe>1)De(Ve,fe-1,Te,Se),Ne=Se.length;else for(var vt=0,mt=Ve.length;mt>vt;)Se[Ne++]=Ve[vt++];else Te||(Se[Ne++]=Ve)}return Se}function Re(ne,fe){var Te=function(Se){var Ne=Te.cache,ke=""+(fe?fe.apply(this,arguments):Se);return p(Ne,ke)||(Ne[ke]=ne.apply(this,arguments)),Ne[ke]};return Te.cache={},Te}function Ue(ne,fe,Te){var Se,Ne,ke,Pe,Ve=0;Te||(Te={});var vt=function(){Ve=Te.leading===!1?0:Jp(),Se=null,Pe=ne.apply(Ne,ke),Se||(Ne=ke=null)},mt=function(){var jn=Jp();Ve||Te.leading!==!1||(Ve=jn);var Si=fe-(jn-Ve);return Ne=this,ke=arguments,0>=Si||Si>fe?(Se&&(clearTimeout(Se),Se=null),Ve=jn,Pe=ne.apply(Ne,ke),Se||(Ne=ke=null)):Se||Te.trailing===!1||(Se=setTimeout(vt,Si)),Pe};return mt.cancel=function(){clearTimeout(Se),Ve=0,Se=Ne=ke=null},mt}function Ke(ne,fe,Te){var Se,Ne,ke,Pe,Ve,vt=function(){var jn=Jp()-Ne;fe>jn?Se=setTimeout(vt,fe-jn):(Se=null,Te||(Pe=ne.apply(Ve,ke)),Se||(ke=Ve
273=null))},mt=a(function(jn){return Ve=this,ke=jn,Ne=Jp(),Se||(Se=setTimeout(vt,fe),Te&&(Pe=ne.apply(Ve,ke))),Pe});return mt.cancel=function(){clearTimeout(Se),Se=ke=Ve=null},mt}function nt(ne,fe){return cd(fe,ne)}function Ye(ne){return function(){return!ne.apply(this,arguments)}}function dt(){var ne=arguments,fe=ne.length-1;return function(){for(var Te=fe,Se=ne[fe].apply(this,arguments);Te--;)Se=ne[Te].call(this,Se);return Se}}function Ae(ne,fe){return function(){return--ne<1?fe.apply(this,arguments):void 0}}function Le(ne,fe){var Te;return function(){return--ne>0&&(Te=fe.apply(this,arguments)),1>=ne&&(fe=null),Te}}function He(ne,fe,Te){fe=R(fe,Te);for(var Se,Ne=S(ne),ke=0,Pe=Ne.length;Pe>ke;ke++)if(Se=Ne[ke],fe(ne[Se],Se,ne))return Se}function Ze(ne){return function(fe,Te,Se){Te=R(Te,Se);for(var Ne=ci(fe),ke=ne>0?0:Ne-1;ke>=0&&Ne>ke;ke+=ne)if(Te(fe[ke],ke,fe))return ke;return-1}}function Qe(ne,fe,Te,Se){Te=R(Te,Se,1);for(var Ne=Te(fe),ke=0,Pe=ci(ne);Pe>ke;){var Ve=Math.floor((ke+Pe)/2);Te(ne[Ve])<Ne?ke=Ve+1:Pe=Ve}return ke}function it(ne,fe,Te){return function(Se,Ne,ke){var Pe=0,Ve=ci(Se);if(typeof ke=="number")ne>0?Pe=ke>=0?ke:Math.max(ke+Ve,Pe):Ve=ke>=0?Math.min(ke+1,Ve):ke+Ve+1;else if(Te&&ke&&Ve)return ke=Te(Se,Ne),Se[ke]===Ne?ke:-1;if(Ne!==Ne)return ke=fe(Yp.call(Se,Pe,Ve),g),ke>=0?ke+Pe:-1;for(ke=ne>0?Pe:Ve-1;ke>=0&&Ve>ke;ke+=ne)if(Se[ke]===Ne)return ke;return-1}}function bt(ne,fe,Te){var Se=li(ne)?bw:He,Ne=Se(ne,fe,Te);return Ne!==void 0&&Ne!==-1?ne[Ne]:void 0}function xn(ne,fe){return bt(ne,we(fe))}function an(ne,fe,Te){fe=_e(fe,Te);var Se,Ne;if(li(ne))for(Se=0,Ne=ne.length;Ne>Se;Se++)fe(ne[Se],Se,ne);else{var ke=S(ne);for(Se=0,Ne=ke.length;Ne>Se;Se++)fe(ne[ke[Se]],ke[Se],ne)}return ne}function de(ne,fe,Te){fe=R(fe,Te);for(var Se=!li(ne)&&S(ne),Ne=(Se||ne).length,ke=Array(Ne),Pe=0;Ne>Pe;Pe++){var Ve=Se?Se[Pe]:Pe;ke[Pe]=fe(ne[Ve],Ve,ne)}return ke}function ve(ne){var fe=function(Te,Se,Ne,ke){var Pe=!li(Te)&&S(Te),Ve=(Pe||Te).length,vt=ne>0?0:Ve-1;for(ke||(Ne=Te[Pe?Pe[vt]:vt],vt+=ne);vt>=0&&Ve>vt;vt+=ne){var mt=Pe?Pe[vt]:vt;Ne=Se(Ne,Te[mt],mt,Te)}return Ne};return function(Te,Se,Ne,ke){var Pe=arguments.length>=3;return fe(Te,_e(Se,ke,4),Ne,Pe)}}function Ce(ne,fe,Te){var Se=[];return fe=R(fe,Te),an(ne,function(Ne,ke,Pe){fe(Ne,ke,Pe)&&Se.push(Ne)}),Se}function Me(ne,fe,Te){return Ce(ne,Ye(R(fe)),Te)}function Xe(ne,fe,Te){fe=R(fe,Te);for(var Se=!li(ne)&&S(ne),Ne=(Se||ne).length,ke=0;Ne>ke;ke++){var Pe=Se?Se[ke]:ke;if(!fe(ne[Pe],Pe,ne))return!1}return!0}function pt(ne,fe,Te){fe=R(fe,Te);for(var Se=!li(ne)&&S(ne),Ne=(Se||ne).length,ke=0;Ne>ke;ke++){var Pe=Se?Se[ke]:ke;if(fe(ne[Pe],Pe,ne))return!0}return!1}function Ft(ne,fe,Te,Se){return li(ne)||(ne=j(ne)),(typeof Te!="number"||Se)&&(Te=0),UC(ne,fe,Te)>=0}function Bt(ne,fe){return de(ne,H(fe))}function es(ne,fe){return Ce(ne,we(fe))}function ks(ne,fe,Te){var Se,Ne,ke=-1/0,Pe=-1/0;if(fe==null||typeof fe=="number"&&typeof ne[0]!="object"&&ne!=null){ne=li(ne)?ne:j(ne);for(var Ve=0,vt=ne.length;vt>Ve;Ve++)Se=ne[Ve],Se!=null&&Se>ke&&(ke=Se)}else fe=R(fe,Te),an(ne,function(mt,jn,Si){Ne=fe(mt,jn,Si),(Ne>Pe||Ne===-1/0&&ke===-1/0)&&(ke=mt,Pe=Ne)});return ke}function Ns(ne,fe,Te){var Se,Ne,ke=1/0,Pe=1/0;if(fe==null||typeof fe=="number"&&typeof ne[0]!="object"&&ne!=null){ne=li(ne)?ne:j(ne);for(var Ve=0,vt=ne.length;vt>Ve;Ve++)Se=ne[Ve],Se!=null&&ke>Se&&(ke=Se)}else fe=R(fe,Te),an(ne,function(mt,jn,Si){Ne=fe(mt,jn,Si),(Pe>Ne||Ne===1/0&&ke===1/0)&&(ke=mt,Pe=Ne)});return ke}function $l(ne,fe,Te){if(fe==null||Te)return li(ne)||(ne=j(ne)),ne[k(ne.length-1)];var Se=li(ne)?ge(ne):j(ne),Ne=ci(Se);fe=Math.max(Math.min(fe,Ne),0);for(var ke=Ne-1,Pe=0;fe>Pe;Pe++){var Ve=k(Pe,ke),vt=Se[Pe];Se[Pe]=Se[Ve],Se[Ve]=vt}return Se.slice(0,fe)}function ra(ne){return $l(ne,1/0)}function ia(ne,fe,Te){var Se=0;return fe=R(fe,Te),Bt(de(ne,function(Ne,ke,Pe){return{value:Ne,index:Se++,criteria:fe(Ne,ke,Pe)}}).sort(function(Ne,ke){var Pe=Ne.criteria,Ve=ke.criteria;if(Pe!==Ve){if(Pe>Ve||Pe===void 0)return 1;if(Ve>Pe||Ve===void 0)return-1}return Ne.index-ke.index}),"value")}function ts(ne,fe){return function(Te,Se,Ne){var ke=fe?[[],[]]:{};return Se=R(Se,Ne),an(Te,function(Pe,Ve){var vt=Se(Pe,Ve,Te);ne(ke,Pe,vt)}),ke}}
273function ns(ne){return ne?Vl(ne)?Yp.call(ne):hw(ne)?ne.match(RI):li(ne)?de(ne,ue):j(ne):[]}function sa(ne){return ne==null?0:li(ne)?ne.length:S(ne).length}function Kl(ne,fe,Te){return fe in Te}function qp(ne,fe,Te){return Yp.call(ne,0,Math.max(0,ne.length-(fe==null||Te?1:fe)))}function ao(ne,fe,Te){return ne==null||ne.length<1?fe==null||Te?void 0:[]:fe==null||Te?ne[0]:qp(ne,ne.length-fe)}function Xl(ne,fe,Te){return Yp.call(ne,fe==null||Te?1:fe)}function H8(ne,fe,Te){return ne==null||ne.length<1?fe==null||Te?void 0:[]:fe==null||Te?ne[ne.length-1]:Xl(ne,Math.max(0,ne.length-fe))}function $8(ne){return Ce(ne,Boolean)}function K8(ne,fe){return De(ne,fe,!1)}function aw(ne,fe,Te,Se){u(fe)||(Se=Te,Te=fe,fe=!1),Te!=null&&(Te=R(Te,Se));for(var Ne=[],ke=[],Pe=0,Ve=ci(ne);Ve>Pe;Pe++){var vt=ne[Pe],mt=Te?Te(vt,Pe,ne):vt;fe&&!Te?(Pe&&ke===mt||Ne.push(vt),ke=mt):Te?Ft(ke,mt)||(ke.push(mt),Ne.push(vt)):Ft(Ne,vt)||Ne.push(vt)}return Ne}function X8(ne){for(var fe=[],Te=arguments.length,Se=0,Ne=ci(ne);Ne>Se;Se++){var ke=ne[Se];if(!Ft(fe,ke)){var Pe;for(Pe=1;Te>Pe&&Ft(arguments[Pe],ke);Pe++);Pe===Te&&fe.push(ke)}}return fe}function cw(ne){for(var fe=ne&&ks(ne,ci).length||0,Te=Array(fe),Se=0;fe>Se;Se++)Te[Se]=Bt(ne,Se);return Te}function V8(ne,fe){for(var Te={},Se=0,Ne=ci(ne);Ne>Se;Se++)fe?Te[ne[Se]]=fe[Se]:Te[ne[Se][0]]=ne[Se][1];return Te}function G8(ne,fe,Te){fe==null&&(fe=ne||0,ne=0),Te||(Te=ne>fe?-1:1);for(var Se=Math.max(Math.ceil((fe-ne)/Te),0),Ne=Array(Se),ke=0;Se>ke;ke++,ne+=Te)Ne[ke]=ne;return Ne}function q8(ne,fe){if(fe==null||1>fe)return[];for(var Te=[],Se=0,Ne=ne.length;Ne>Se;)Te.push(Yp.call(ne,Se,Se+=fe));return Te}function lw(ne,fe){return ne._chain?N(fe).chain():fe}function sC(ne){return an(pe(ne),function(fe){var Te=N[fe]=ne[fe];N.prototype[fe]=function(){var Se=[this._wrapped];return Y8.apply(Se,arguments),lw(this,Te.apply(N,Se))}}),N}var oC="1.13.1",aC=typeof self=="object"&&self.self===self&&self||typeof i=="object"&&i.global===i&&i||Function("return this")()||{},xb=Array.prototype,uw=Object.prototype,cC=typeof Symbol<"u"?Symbol.prototype:null,Y8=xb.push,Yp=xb.slice,Zp=uw.toString,Z8=uw.hasOwnProperty,lC=typeof ArrayBuffer<"u",J8=typeof DataView<"u",Q8=Array.isArray,uC=Object.keys,hC=Object.create,dC=lC&&ArrayBuffer.isView,eI=isNaN,tI=isFinite,fC=!{toString:null}.propertyIsEnumerable("toString"),pC=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],nI=Math.pow(2,53)-1,hw=h("String"),gC=h("Number"),rI=h("Date"),iI=h("RegExp"),sI=h("Error"),mC=h("Symbol"),yC=h("ArrayBuffer"),bC=h("Function"),oI=aC.document&&aC.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof oI!="function"&&(bC=function(ne){return typeof ne=="function"||!1});var Kr=bC,vC=h("Object"),wC=J8&&vC(new DataView(new ArrayBuffer(8))),dw=typeof Map<"u"&&vC(new Map),aI=h("DataView"),_b=wC?f:aI,Vl=Q8||h("Array"),fw=h("Arguments");(function(){fw(arguments)||(fw=function(ne){return p(ne,"callee")})})();var pw=fw,Tb=x("byteLength"),cI=v(Tb),lI=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,xC=lC?w:b(!1),ci=x("length");N.VERSION=oC,N.prototype.value=function(){return this._wrapped},N.prototype.valueOf=N.prototype.toJSON=N.prototype.value,N.prototype.toString=function(){return String(this._wrapped)};var _C="[object DataView]",gw="forEach",TC="has",mw=["clear","delete"],SC=["get",TC,"set"],uI=mw.concat(gw,SC),EC=mw.concat(SC),hI=["add"].concat(mw,gw,TC),dI=dw?he(uI):h("Map"),fI=dw?he(EC):h("WeakMap"),pI=dw?he(hI):h("Set"),gI=h("WeakSet"),DC=q(X),Sb=q(S),CC=q(X,!0);N.toPath=P,N.iteratee=U;var Jp=Date.now||function(){return new Date().getTime()},AC={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},mI=I(AC),yI=O(AC),bI=I(yI),vI=N.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},yw=/(.)^/,wI={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},xI=/\\|'|\r|\n|\u2028|\u2029/g,_I=/^\s*(\w|\$)+\s*$/,TI=0,cd=a(function(ne,fe){var Te=cd.placeholder,Se=function(){for(var Ne=0,ke=fe.length,Pe=Array(ke),Ve=0;ke>Ve;Ve++)Pe[Ve]=fe[Ve]===Te?arguments[Ne++]:fe[Ve];for(;Ne<arguments.length;)Pe.push(arguments[Ne++]);return xe(ne,Se,this,this,Pe)};return Se});cd.placeholder=N;var kC=a(function(ne,fe,Te){if(!Kr(ne))throw new TypeError("Bind must be called on a function");var Se=a(function(Ne){return xe(ne,Se,fe,this,Te.concat(Ne))});return Se}),li=v(ci),SI=a(function(ne,fe){fe=De(fe,!1,!1);var Te=fe.length;if(1>Te)throw new Error("bindAll must be passed function names");for(;Te--;){var Se=fe[Te];
273ne[Se]=kC(ne[Se],ne)}return ne}),NC=a(function(ne,fe,Te){return setTimeout(function(){return ne.apply(null,Te)},fe)}),EI=cd(NC,N,1),DI=cd(Le,2),bw=Ze(1),FC=Ze(-1),UC=it(1,bw,Qe),CI=it(-1,FC),vw=ve(1),RC=ve(-1),AI=a(function(ne,fe,Te){var Se,Ne;return Kr(fe)?Ne=fe:(fe=W(fe),Se=fe.slice(0,-1),fe=fe[fe.length-1]),de(ne,function(ke){var Pe=Ne;if(!Pe){if(Se&&Se.length&&(ke=te(ke,Se)),ke==null)return;Pe=ke[fe]}return Pe==null?Pe:Pe.apply(ke,Te)})}),kI=ts(function(ne,fe,Te){p(ne,Te)?ne[Te].push(fe):ne[Te]=[fe]}),NI=ts(function(ne,fe,Te){ne[Te]=fe}),FI=ts(function(ne,fe,Te){p(ne,Te)?ne[Te]++:ne[Te]=1}),UI=ts(function(ne,fe,Te){ne[Te?0:1].push(fe)},!0),RI=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g,IC=a(function(ne,fe){var Te={},Se=fe[0];if(ne==null)return Te;Kr(Se)?(fe.length>1&&(Se=_e(Se,fe[1])),fe=X(ne)):(Se=Kl,fe=De(fe,!1,!1),ne=Object(ne));for(var Ne=0,ke=fe.length;ke>Ne;Ne++){var Pe=fe[Ne],Ve=ne[Pe];Se(Ve,Pe,ne)&&(Te[Pe]=Ve)}return Te}),II=a(function(ne,fe){var Te,Se=fe[0];return Kr(Se)?(Se=Ye(Se),fe.length>1&&(Te=fe[1])):(fe=de(De(fe,!1,!1),String),Se=function(Ne,ke){return!Ft(fe,ke)}),IC(ne,Se,Te)}),MC=a(function(ne,fe){return fe=De(fe,!0,!0),Ce(ne,function(Te){return!Ft(fe,Te)})}),MI=a(function(ne,fe){return MC(ne,fe)}),PI=a(function(ne){return aw(De(ne,!0,!0))}),OI=a(cw);an(["pop","push","reverse","shift","sort","splice","unshift"],function(ne){var fe=xb[ne];N.prototype[ne]=function(){var Te=this._wrapped;return Te!=null&&(fe.apply(Te,arguments),ne!=="shift"&&ne!=="splice"||Te.length!==0||delete Te[0]),lw(this,Te)}}),an(["concat","join","slice"],function(ne){var fe=xb[ne];N.prototype[ne]=function(){var Te=this._wrapped;return Te!=null&&(Te=fe.apply(Te,arguments)),lw(this,Te)}});var LI={__proto__:null,VERSION:oC,restArguments:a,isObject:o,isNull:c,isUndefined:l,isBoolean:u,isElement:d,isString:hw,isNumber:gC,isDate:rI,isRegExp:iI,isError:sI,isSymbol:mC,isArrayBuffer:yC,isDataView:_b,isArray:Vl,isFunction:Kr,isArguments:pw,isFinite:y,isNaN:g,isTypedArray:xC,isEmpty:C,isMatch:D,isEqual:A,isMap:dI,isWeakMap:fI,isSet:pI,isWeakSet:gI,keys:S,allKeys:X,values:j,pairs:ee,invert:O,functions:pe,methods:pe,extend:DC,extendOwn:Sb,assign:Sb,defaults:CC,create:le,clone:ge,tap:ie,get:Y,has:se,mapObject:E,identity:ue,constant:b,noop:Q,toPath:P,property:H,propertyOf:ce,matcher:we,matches:we,times:V,random:k,now:Jp,escape:mI,unescape:bI,templateSettings:vI,template:Z,result:ae,uniqueId:ye,chain:me,iteratee:U,partial:cd,bind:kC,bindAll:SI,memoize:Re,delay:NC,defer:EI,throttle:Ue,debounce:Ke,wrap:nt,negate:Ye,compose:dt,after:Ae,before:Le,once:DI,findKey:He,findIndex:bw,findLastIndex:FC,sortedIndex:Qe,indexOf:UC,lastIndexOf:CI,find:bt,detect:bt,findWhere:xn,each:an,forEach:an,map:de,collect:de,reduce:vw,foldl:vw,inject:vw,reduceRight:RC,foldr:RC,filter:Ce,select:Ce,reject:Me,every:Xe,all:Xe,some:pt,any:pt,contains:Ft,includes:Ft,include:Ft,invoke:AI,pluck:Bt,where:es,max:ks,min:Ns,shuffle:ra,sample:$l,sortBy:ia,groupBy:kI,indexBy:NI,countBy:FI,partition:UI,toArray:ns,size:sa,pick:IC,omit:II,first:ao,head:ao,take:ao,initial:qp,last:H8,rest:Xl,tail:Xl,drop:Xl,compact:$8,flatten:K8,without:MI,uniq:aw,unique:aw,union:PI,intersection:X8,difference:MC,unzip:cw,transpose:cw,zip:OI,object:V8,range:G8,chunk:q8,mixin:sC,default:N},ww=sC(LI);return ww._=ww,ww})}).call(this,typeof co<"u"?co:typeof self<"u"?self:typeof window<"u"?window:{})},{}],103:[function(t,n,r){(function(){var i,a,o,c,l,u,d,h=[].slice,f={}.hasOwnProperty;i=function(){var p,y,g,b,v,x;if(x=arguments[0],v=2<=arguments.length?h.call(arguments,1):[],l(Object.assign))Object.assign.apply(null,arguments);else for(p=0,g=v.length;g>p;p++)if(b=v[p],b!=null)for(y in b)f.call(b,y)&&(x[y]=b[y]);return x},l=function(p){return!!p&&Object.prototype.toString.call(p)==="[object Function]"},u=function(p){var y;return!!p&&((y=typeof p)=="function"||y==="object")},o=function(p){return l(Array.isArray)?Array.isArray(p):Object.prototype.toString.call(p)==="[object Array]"},c=function(p){var y;if(o(p))return!p.length;for(y in p)if(f.call(p,y))return!1;return!0},d=function(p){var y,g;
273return u(p)&&(g=Object.getPrototypeOf(p))&&(y=g.constructor)&&typeof y=="function"&&y instanceof y&&Function.prototype.toString.call(y)===Function.prototype.toString.call(Object)},a=function(p){return l(p.valueOf)?p.valueOf():p},n.exports.assign=i,n.exports.isFunction=l,n.exports.isObject=u,n.exports.isArray=o,n.exports.isEmpty=c,n.exports.isPlainObject=d,n.exports.getValue=a}).call(this)},{}],104:[function(t,n,r){(function(){n.exports=(function(){function i(a,o,c){if(this.options=a.options,this.stringify=a.stringify,this.parent=a,o==null)throw new Error("Missing attribute name. "+this.debugInfo(o));if(c==null)throw new Error("Missing attribute value. "+this.debugInfo(o));this.name=this.stringify.attName(o),this.value=this.stringify.attValue(c)}return i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(a){return this.options.writer.set(a).attribute(this)},i.prototype.debugInfo=function(a){var o,c;return a=a||this.name,a!=null||(o=this.parent)!=null&&o.name?a==null?"parent: <"+this.parent.name+">":(c=this.parent)!=null&&c.name?"attribute: {"+a+"}, parent: <"+this.parent.name+">":"attribute: {"+a+"}":""},i})()}).call(this)},{}],105:[function(t,n,r){(function(){var i,a=function(c,l){function u(){this.constructor=c}for(var d in l)o.call(l,d)&&(c[d]=l[d]);return u.prototype=l.prototype,c.prototype=new u,c.__super__=l.prototype,c},o={}.hasOwnProperty;i=t("./XMLNode"),n.exports=(function(c){function l(u,d){if(l.__super__.constructor.call(this,u),d==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.text=this.stringify.cdata(d)}return a(l,c),l.prototype.clone=function(){return Object.create(this)},l.prototype.toString=function(u){return this.options.writer.set(u).cdata(this)},l})(i)}).call(this)},{"./XMLNode":116}],106:[function(t,n,r){(function(){var i,a=function(c,l){function u(){this.constructor=c}for(var d in l)o.call(l,d)&&(c[d]=l[d]);return u.prototype=l.prototype,c.prototype=new u,c.__super__=l.prototype,c},o={}.hasOwnProperty;i=t("./XMLNode"),n.exports=(function(c){function l(u,d){if(l.__super__.constructor.call(this,u),d==null)throw new Error("Missing comment text. "+this.debugInfo());this.text=this.stringify.comment(d)}return a(l,c),l.prototype.clone=function(){return Object.create(this)},l.prototype.toString=function(u){return this.options.writer.set(u).comment(this)},l})(i)}).call(this)},{"./XMLNode":116}],107:[function(t,n,r){(function(){var i,a=function(c,l){function u(){this.constructor=c}for(var d in l)o.call(l,d)&&(c[d]=l[d]);return u.prototype=l.prototype,c.prototype=new u,c.__super__=l.prototype,c},o={}.hasOwnProperty;i=t("./XMLNode"),n.exports=(function(c){function l(u,d,h,f,p,y){if(l.__super__.constructor.call(this,u),d==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(h==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(d));if(!f)throw new Error("Missing DTD attribute type. "+this.debugInfo(d));if(!p)throw new Error("Missing DTD attribute default. "+this.debugInfo(d));if(p.indexOf("#")!==0&&(p="#"+p),!p.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(d));if(y&&!p.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(d));this.elementName=this.stringify.eleName(d),this.attributeName=this.stringify.attName(h),this.attributeType=this.stringify.dtdAttType(f),this.defaultValue=this.stringify.dtdAttDefault(y),this.defaultValueType=p}return a(l,c),l.prototype.toString=function(u){return this.options.writer.set(u).dtdAttList(this)},l})(i)}).call(this)},{"./XMLNode":116}],108:[function(t,n,r){(function(){var i,a=function(c,l){function u(){this.constructor=c}for(var d in l)o.call(l,d)&&(c[d]=l[d]);return u.prototype=l.prototype,c.prototype=new u,c.__super__=l.prototype,c},o={}.hasOwnProperty;i=t("./XMLNode"),n.exports=(function(c){function l(u,d,h){if(l.__super__.constructor.call(this,u),d==null)throw new Error("Missing DTD element name. "+this.debugInfo());h||(h="(#PCDATA)"),Array.isArray(h)&&(h="("+h.join(",")+")"),this.name=this.stringify.eleName(d),this.value=this.stringify.dtdElementValue(h)}return a(l,c),l.prototype.toString=function(u){return this.options.writer.set(u).dtdElement(this)},l})(i)}).call(this)},{"./XMLNode":116}],109:[function(t,n,r){(function(){var i,a,o=function(l,u){function d(){this.constructor=l}for(var h in u)c.call(u,h)&&(l[h]=u[h]);return d.prototype=u.prototype,l.prototype=new d,l.__super__=u.prototype,l},c={}.hasOwnProperty;a=t("./Utility").isObject,i=t("./XMLNode"),n.exports=(function(l){function u(d,h,f,p){if(u.__super__.constructor.call(this,d),f==null)throw new Error("Missing DTD entity name. "+this.debugInfo(f));if(p==null)throw new Error("Missing DTD entity value. "+this.debugInfo(f));if(this.pe=!!h,this.name=this.stringify.eleName(f),a(p)){if(!p.pubID&&!p.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(f));if(p.pubID&&!p.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(f));if(p.pubID!=null&&(this.pubID=this.stringify.dtdPubID(p.pubID)),p.sysID!=null&&(this.sysID=this.stringify.dtdSysID(p.sysID)),p.nData!=null&&(this.nData=this.stringify.dtdNData(p.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(f))}else this.value=this.stringify.dtdEntityValue(p)}return o(u,l),u.prototype.toString=function(d){return this.options.writer.set(d).dtdEntity(this)},u})(i)}).call(this)},{"./Utility":103,"./XMLNode":116}],110:[function(t,n,r){(function(){var i,a=function(c,l){function u(){this.constructor=c}for(var d in l)o.call(l,d)&&(c[d]=l[d]);return u.prototype=l.prototype,c.prototype=new u,c.__super__=l.prototype,c},o={}.hasOwnProperty;i=t("./XMLNode"),n.exports=(function(c){function l(u,d,h){if(l.__super__.constructor.call(this,u),d==null)throw new Error("Missing DTD notation name. "+this.debugInfo(d));if(!h.pubID&&!h.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(d));this.name=this.stringify.eleName(d),h.pubID!=null&&(this.pubID=this.stringify.dtdPubID(h.pubID)),h.sysID!=null&&(this.sysID=this.stringify.dtdSysID(h.sysID))}return a(l,c),l.prototype.toString=function(u){return this.options.writer.set(u).dtdNotation(this)},l})(i)}).call(this)},{"./XMLNode":116}],111:[function(t,n,r){(function(){var i,a,o=function(l,u){function d(){this.constructor=l}for(var h in u)c.call(u,h)&&(l[h]=u[h]);return d.prototype=u.prototype,l.prototype=new d,l.__super__=u.prototype,l},c={}.hasOwnProperty;a=t("./Utility").isObject,i=t("./XMLNode"),n.exports=(function(l){function u(d,h,f,p){var y;u.__super__.constructor.call(this,d),a(h)&&(y=h,h=y.version,f=y.encoding,p=y.standalone),h||(h="1.0"),this.version=this.stringify.xmlVersion(h),f!=null&&(this.encoding=this.stringify.xmlEncoding(f)),p!=null&&(this.standalone=this.stringify.xmlStandalone(p))}return o(u,l),u.prototype.toString=function(d){return this.options.writer.set(d).declaration(this)},u})(i)}).call(this)},{"./Utility":103,"./XMLNode":116}],112:[function(t,n,r){(function(){var i,a,o,c,l,u,d=function(f,p){function y(){this.constructor=f}for(var g in p)h.call(p,g)&&(f[g]=p[g]);return y.prototype=p.prototype,f.prototype=new y,f.__super__=p.prototype,f},h={}.hasOwnProperty;u=t("./Utility").isObject,l=t("./XMLNode"),i=t("./XMLDTDAttList"),o=t("./XMLDTDEntity"),a=t("./XMLDTDElement"),c=t("./XMLDTDNotation"),n.exports=(function(f){function p(y,g,b){var v,x;p.__super__.constructor.call(this,y),this.name="!DOCTYPE",this.documentObject=y,u(g)&&(v=g,g=v.pubID,b=v.sysID),b==null&&(x=[g,b],b=x[0],g=x[1]),g!=null&&(this.pubID=this.stringify.dtdPubID(g)),b!=null&&(this.sysID=this.stringify.dtdSysID(b))}return d(p,f),p.prototype.element=function(y,g){var b;return b=new a(this,y,g),this.children.push(b),this},p.prototype.attList=function(y,g,b,v,x){var w;return w=new i(this,y,g,b,v,x),this.children.push(w),this},p.prototype.entity=function(y,g){var b;return b=new o(this,!1,y,g),this.children.push(b),this},p.prototype.pEntity=function(y,g){var b;return b=new o(this,!0,y,g),this.children.push(b),this},p.prototype.notation=function(y,g){var b;return b=new c(this,y,g),this.children.push(b),this},p.prototype.toString=function(y){return this.options.writer.set(y).docType(this)}
273,p.prototype.ele=function(y,g){return this.element(y,g)},p.prototype.att=function(y,g,b,v,x){return this.attList(y,g,b,v,x)},p.prototype.ent=function(y,g){return this.entity(y,g)},p.prototype.pent=function(y,g){return this.pEntity(y,g)},p.prototype.not=function(y,g){return this.notation(y,g)},p.prototype.up=function(){return this.root()||this.documentObject},p})(l)}).call(this)},{"./Utility":103,"./XMLDTDAttList":107,"./XMLDTDElement":108,"./XMLDTDEntity":109,"./XMLDTDNotation":110,"./XMLNode":116}],113:[function(t,n,r){(function(){var i,a,o,c,l=function(d,h){function f(){this.constructor=d}for(var p in h)u.call(h,p)&&(d[p]=h[p]);return f.prototype=h.prototype,d.prototype=new f,d.__super__=h.prototype,d},u={}.hasOwnProperty;c=t("./Utility").isPlainObject,i=t("./XMLNode"),o=t("./XMLStringifier"),a=t("./XMLStringWriter"),n.exports=(function(d){function h(f){h.__super__.constructor.call(this,null),this.name="?xml",f||(f={}),f.writer||(f.writer=new a),this.options=f,this.stringify=new o(f),this.isDocument=!0}return l(h,d),h.prototype.end=function(f){var p;return f?c(f)&&(p=f,f=this.options.writer.set(p)):f=this.options.writer,f.document(this)},h.prototype.toString=function(f){return this.options.writer.set(f).document(this)},h})(i)}).call(this)},{"./Utility":103,"./XMLNode":116,"./XMLStringWriter":120,"./XMLStringifier":121}],114:[function(t,n,r){(function(){var i,a,o,c,l,u,d,h,f,p,y,g,b,v,x,w,_,T,S,C,D={}.hasOwnProperty;C=t("./Utility"),T=C.isObject,_=C.isFunction,S=C.isPlainObject,w=C.getValue,p=t("./XMLElement"),a=t("./XMLCData"),o=t("./XMLComment"),g=t("./XMLRaw"),x=t("./XMLText"),y=t("./XMLProcessingInstruction"),h=t("./XMLDeclaration"),f=t("./XMLDocType"),c=t("./XMLDTDAttList"),u=t("./XMLDTDEntity"),l=t("./XMLDTDElement"),d=t("./XMLDTDNotation"),i=t("./XMLAttribute"),v=t("./XMLStringifier"),b=t("./XMLStringWriter"),n.exports=(function(){function N(M,F,L){var A;this.name="?xml",M||(M={}),M.writer?S(M.writer)&&(A=M.writer,M.writer=new b(A)):M.writer=new b(M),this.options=M,this.writer=M.writer,this.stringify=new v(M),this.onDataCallback=F||function(){},this.onEndCallback=L||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return N.prototype.node=function(M,F,L){var A;if(M==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(M));return this.openCurrent(),M=w(M),F==null&&(F={}),F=w(F),T(F)||(A=[F,L],L=A[0],F=A[1]),this.currentNode=new p(this,M,F),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,L!=null&&this.text(L),this},N.prototype.element=function(M,F,L){return this.currentNode&&this.currentNode instanceof f?this.dtdElement.apply(this,arguments):this.node(M,F,L)},N.prototype.attribute=function(M,F){var L,A;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(M));if(M!=null&&(M=w(M)),T(M))for(L in M)D.call(M,L)&&(A=M[L],this.attribute(L,A));else _(F)&&(F=F.apply()),this.options.skipNullAttributes&&F==null||(this.currentNode.attributes[M]=new i(this,M,F));return this},N.prototype.text=function(M){var F;return this.openCurrent(),F=new x(this,M),this.onData(this.writer.text(F,this.currentLevel+1),this.currentLevel+1),this},N.prototype.cdata=function(M){var F;return this.openCurrent(),F=new a(this,M),this.onData(this.writer.cd
273ata(F,this.currentLevel+1),this.currentLevel+1),this},N.prototype.comment=function(M){var F;return this.openCurrent(),F=new o(this,M),this.onData(this.writer.comment(F,this.currentLevel+1),this.currentLevel+1),this},N.prototype.raw=function(M){var F;return this.openCurrent(),F=new g(this,M),this.onData(this.writer.raw(F,this.currentLevel+1),this.currentLevel+1),this},N.prototype.instruction=function(M,F){var L,A,X,he,j;if(this.openCurrent(),M!=null&&(M=w(M)),F!=null&&(F=w(F)),Array.isArray(M))for(L=0,he=M.length;he>L;L++)A=M[L],this.instruction(A);else if(T(M))for(A in M)D.call(M,A)&&(X=M[A],this.instruction(A,X));else _(F)&&(F=F.apply()),j=new y(this,M,F),this.onData(this.writer.processingInstruction(j,this.currentLevel+1),this.currentLevel+1);return this},N.prototype.declaration=function(M,F,L){var A;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return A=new h(this,M,F,L),this.onData(this.writer.declaration(A,this.currentLevel+1),this.currentLevel+1),this},N.prototype.doctype=function(M,F,L){if(this.openCurrent(),M==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new f(this,F,L),this.currentNode.rootNodeName=M,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},N.prototype.dtdElement=function(M,F){var L;return this.openCurrent(),L=new l(this,M,F),this.onData(this.writer.dtdElement(L,this.currentLevel+1),this.currentLevel+1),this},N.prototype.attList=function(M,F,L,A,X){var he;return this.openCurrent(),he=new c(this,M,F,L,A,X),this.onData(this.writer.dtdAttList(he,this.currentLevel+1),this.currentLevel+1),this},N.prototype.entity=function(M,F){var L;return this.openCurrent(),L=new u(this,!1,M,F),this.onData(this.writer.dtdEntity(L,this.currentLevel+1),this.currentLevel+1),this},N.prototype.pEntity=function(M,F){var L;return this.openCurrent(),L=new u(this,!0,M,F),this.onData(this.writer.dtdEntity(L,this.currentLevel+1),this.currentLevel+1),this},N.prototype.notation=function(M,F){var L;return this.openCurrent(),L=new d(this,M,F),this.onData(this.writer.dtdNotation(L,this.currentLevel+1),this.currentLevel+1),this},N.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},N.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},N.prototype.openCurrent=function(){return this.currentNode?(this.currentNode.children=!0,this.openNode(this.currentNode)):void 0},N.prototype.openNode=function(M){return M.isOpen?void 0:(!this.root&&this.currentLevel===0&&M instanceof p&&(this.root=M),this.onData(this.writer.openNode(M,this.currentLevel),this.currentLevel),M.isOpen=!0)},N.prototype.closeNode=function(M){return M.isClosed?void 0:(this.onData(this.writer.closeNode(M,this.currentLevel),this.currentLevel),M.isClosed=!0)},N.prototype.onData=function(M,F){return this.documentStarted=!0,this.onDataCallback(M,F+1)},N.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},N.prototype.debugInfo=function(M){return M==null?"":"node: <"+M+">"},N.prototype.ele=function(){return this.element.apply(this,arguments)},N.prototype.nod=function(M,F,L){return this.node(M,F,L)},N.prototype.txt=function(M){return this.text(M)},N.prototype.dat=function(M){return this.cdata(M)},N.prototype.com=function(M){return this.comment(M)},N.prototype.ins=function(M,F){return this.instruction(M,F)},N.prototype.dec=function(M,F,L){return this.declaration(M,F,L)},N.prototype.dtd=function(M,F,L){return this.doctype(M,F,L)},N.prototype.e=function(M,F,L){return this.element(M,F,L)},N.prototype.n=function(M,F,L){return this.node(M,F,L)},N.prototype.t=function(M){return this.text(M)},N.prototype.d=function(M){return this.cdata(M)},N.prototype.c=function(M){return this.comment(M)},N.prototype.r=function(M){return this.raw(M)},N.prototype.i=function(M,F){return this.instruction(M,F)},N.prototype.att=function(){return this.currentNode&&this.currentNode instanceof f?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},N.prototype.a=function(){return this.currentNode&&this.currentNode instanceof f?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},N.prototype.ent=function(M,F){return this.entity(M,F)},N.prototype.pent=function(M,F){return this.pEntity(M,F)},N.prototype.not=function(M,F){return this.notation(M,F)},N})()}).call(this)},{"./Utility":103,"./XMLAttribute":104,"./XMLCData":105,"./XMLComment":106,"./XMLDTDAttList":107,"./XMLDTDElement":108,"./XMLDTDEntity":109,"./XMLDTDNotation":110,"./XMLDeclaration":111,"./XMLDocType":112,"./XMLElement":115,"./XMLProcessingInstruction":117,"./XMLRaw":118,"./XMLStringWriter"
273:120,"./XMLStringifier":121,"./XMLText":122}],115:[function(t,n,r){(function(){var i,a,o,c,l,u,d=function(f,p){function y(){this.constructor=f}for(var g in p)h.call(p,g)&&(f[g]=p[g]);return y.prototype=p.prototype,f.prototype=new y,f.__super__=p.prototype,f},h={}.hasOwnProperty;u=t("./Utility"),l=u.isObject,c=u.isFunction,o=u.getValue,a=t("./XMLNode"),i=t("./XMLAttribute"),n.exports=(function(f){function p(y,g,b){if(p.__super__.constructor.call(this,y),g==null)throw new Error("Missing element name. "+this.debugInfo());this.name=this.stringify.eleName(g),this.attributes={},b!=null&&this.attribute(b),y.isDocument&&(this.isRoot=!0,this.documentObject=y,y.rootObject=this)}return d(p,f),p.prototype.clone=function(){var y,g,b,v;b=Object.create(this),b.isRoot&&(b.documentObject=null),b.attributes={},v=this.attributes;for(g in v)h.call(v,g)&&(y=v[g],b.attributes[g]=y.clone());return b.children=[],this.children.forEach(function(x){var w;return w=x.clone(),w.parent=b,b.children.push(w)}),b},p.prototype.attribute=function(y,g){var b,v;if(y!=null&&(y=o(y)),l(y))for(b in y)h.call(y,b)&&(v=y[b],this.attribute(b,v));else c(g)&&(g=g.apply()),this.options.skipNullAttributes&&g==null||(this.attributes[y]=new i(this,y,g));return this},p.prototype.removeAttribute=function(y){var g,b,v;if(y==null)throw new Error("Missing attribute name. "+this.debugInfo());if(y=o(y),Array.isArray(y))for(b=0,v=y.length;v>b;b++)g=y[b],delete this.attributes[g];else delete this.attributes[y];return this},p.prototype.toString=function(y){return this.options.writer.set(y).element(this)},p.prototype.att=function(y,g){return this.attribute(y,g)},p.prototype.a=function(y,g){return this.attribute(y,g)},p})(a)}).call(this)},{"./Utility":103,"./XMLAttribute":104,"./XMLNode":116}],116:[function(t,n,r){(function(){var i,a,o,c,l,u,d,h,f,p,y,g,b,v={}.hasOwnProperty;b=t("./Utility"),g=b.isObject,y=b.isFunction,p=b.isEmpty,f=b.getValue,l=null,i=null,a=null,o=null,c=null,d=null,h=null,u=null,n.exports=(function(){function x(w){this.parent=w,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],l||(l=t("./XMLElement"),i=t("./XMLCData"),a=t("./XMLComment"),o=t("./XMLDeclaration"),c=t("./XMLDocType"),d=t("./XMLRaw"),h=t("./XMLText"),u=t("./XMLProcessingInstruction"))}return x.prototype.element=function(w,_,T){var S,C,D,N,M,F,L,A,X,he;if(F=null,_==null&&(_={}),_=f(_),g(_)||(X=[_,T],T=X[0],_=X[1]),w!=null&&(w=f(w)),Array.isArray(w))for(D=0,L=w.length;L>D;D++)C=w[D],F=this.element(C);else if(y(w))F=this.element(w.apply());else if(g(w)){for(M in w)if(v.call(w,M))if(he=w[M],y(he)&&(he=he.apply()),g(he)&&p(he)&&(he=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&M.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(M.substr(this.stringify.convertAttKey.length),he);else if(!this.options.separateArrayItems&&Array.isArray(he))for(N=0,A=he.length;A>N;N++)C=he[N],S={},S[M]=C,F=this.element(S);else g(he)?(F=this.element(M),F.element(he)):F=this.element(M,he)}else F=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&w.indexOf(this.stringify.convertTextKey)===0?this.text(T):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&w.indexOf(this.stringify.convertCDataKey)===0?this.cdata(T):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&w.indexOf(this.stringify.convertCommentKey)===0?this.comment(T):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&w.indexOf(this.stringify.convertRawKey)===0?this.raw(T):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&w.indexOf(this.stringify.convertPIKey)===0?this.instruction(w.substr(this.stringify.convertPIKey.length),T):this.node(w,_,T);if(F==null)throw new Error("Could not create any elements with: "+w+". "+this.debugInfo());return F},x.prototype.insertBefore=function(w,_,T){var S,C,D;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(w));return C=this.parent.children.indexOf(this),D=this.parent.children.splice(C),S=this.parent.element(w,_,T),Array.prototype.push.apply(this.parent.children,D),S},x.prototype.insertAfter=function(w,_,T){var S,C,D;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(w));return C=this.parent.children.indexOf(this),D=this.parent.children.splice(C+1),S=this.parent.element(w,_,T),Array.prototype.push.apply(this.parent.children,D),S},x.prototype.remove=function(){var w;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return w=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[w,w-w+1].concat([])),this.parent},x.prototype.node=function(w,_,T){var S,C;return w!=null&&(w=f(w)),_||(_={}),_=f(_),g(_)||(C=[_,T],T=C[0],_=C[1]),S=new l(this,w,_),T!=null&&S.text(T),this.children.push(S),S},x.prototype.text=function(w){var _;return _=new h(this,w),this.children.push(_),this},x.prototype.cdata=function(w){var _;return _=new i(this,w),this.children.push(_),this},x.prototype.comment=function(w){var _;return _=new a(this,w),this.children.push(_),this},x.prototype.commentBefore=function(w){var _,T;return _=this.parent.children.indexOf(this),T=this.parent.children.splice(_),this.parent.comment(w),Array.prototype.push.apply(this.parent.children,T),this},x.prototype.commentAfter=function(w){var _,T;return _=this.parent.children.indexOf(this),T=this.parent.children.splice(_+1),this.parent.comment(w),Array.prototype.push.apply(this.parent.children,T),this},x.prototype.raw=function(w){var _;return _=new d(this,w),this.children.push(_),this},x.prototype.instruction=function(w,_){var T,S,C,D,N;if(w!=null&&(w=f(w)),_!=null&&(_=f(_)),Array.isArray(w))for(D=0,N=w.length;N>
273D;D++)T=w[D],this.instruction(T);else if(g(w))for(T in w)v.call(w,T)&&(S=w[T],this.instruction(T,S));else y(_)&&(_=_.apply()),C=new u(this,w,_),this.children.push(C);return this},x.prototype.instructionBefore=function(w,_){var T,S;return T=this.parent.children.indexOf(this),S=this.parent.children.splice(T),this.parent.instruction(w,_),Array.prototype.push.apply(this.parent.children,S),this},x.prototype.instructionAfter=function(w,_){var T,S;return T=this.parent.children.indexOf(this),S=this.parent.children.splice(T+1),this.parent.instruction(w,_),Array.prototype.push.apply(this.parent.children,S),this},x.prototype.declaration=function(w,_,T){var S,C;return S=this.document(),C=new o(S,w,_,T),S.children[0]instanceof o?S.children[0]=C:S.children.unshift(C),S.root()||S},x.prototype.doctype=function(w,_){var T,S,C,D,N,M,F,L,A,X;for(S=this.document(),C=new c(S,w,_),A=S.children,D=N=0,F=A.length;F>N;D=++N)if(T=A[D],T instanceof c)return S.children[D]=C,C;for(X=S.children,D=M=0,L=X.length;L>M;D=++M)if(T=X[D],T.isRoot)return S.children.splice(D,0,C),C;return S.children.push(C),C},x.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},x.prototype.root=function(){var w;for(w=this;w;){if(w.isDocument)return w.rootObject;if(w.isRoot)return w;w=w.parent}},x.prototype.document=function(){var w;for(w=this;w;){if(w.isDocument)return w;w=w.parent}},x.prototype.end=function(w){return this.document().end(w)},x.prototype.prev=function(){var w;if(w=this.parent.children.indexOf(this),1>w)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[w-1]},x.prototype.next=function(){var w;if(w=this.parent.children.indexOf(this),w===-1||w===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[w+1]},x.prototype.importDocument=function(w){var _;return _=w.root().clone(),_.parent=this,_.isRoot=!1,this.children.push(_),this},x.prototype.debugInfo=function(w){var _,T;return w=w||this.name,w!=null||(_=this.parent)!=null&&_.name?w==null?"parent: <"+this.parent.name+">":(T=this.parent)!=null&&T.name?"node: <"+w+">, parent: <"+this.parent.name+">":"node: <"+w+">":""},x.prototype.ele=function(w,_,T){return this.element(w,_,T)},x.prototype.nod=function(w,_,T){return this.node(w,_,T)},x.prototype.txt=function(w){return this.text(w)},x.prototype.dat=function(w){return this.cdata(w)},x.prototype.com=function(w){return this.comment(w)},x.prototype.ins=function(w,_){return this.instruction(w,_)},x.prototype.doc=function(){return this.document()},x.prototype.dec=function(w,_,T){return this.declaration(w,_,T)},x.prototype.dtd=function(w,_){return this.doctype(w,_)},x.prototype.e=function(w,_,T){return this.element(w,_,T)},x.prototype.n=function(w,_,T){return this.node(w,_,T)},x.prototype.t=function(w){return this.text(w)},x.prototype.d=function(w){return this.cdata(w)},x.prototype.c=function(w){return this.comment(w)},x.prototype.r=function(w){return this.raw(w)},x.prototype.i=function(w,_){return this.instruction(w,_)},x.prototype.u=function(){return this.up()},x.prototype.importXMLBuilder=function(w){return this.importDocument(w)},x})()}).call(this)},{"./Utility":103,"./XMLCData":105,"./XMLComment":106,"./XMLDeclaration":111,"./XMLDocType":112,"./XMLElement":115,"./XMLProcessingInstruction":117,"./XMLRaw":118,"./XMLText":122}],117:[function(t,n,r){(function(){var i,a=function(c,l){function u(){this.constructor=c}for(var d in l)o.call(l,d)&&(c[d]=l[d]);return u.prototype=l.prototype,c.prototype=new u,c.__super__=l.prototype,c},o={}.hasOwnProperty;i=t("./XMLNode"),n.exports=(function(c){function l(u,d,h){if(l.__super__.constructor.call(this,u),d==null)throw new Error("Missing instruction target. "+this.debugInfo());this.target=this.stringify.insTarget(d),h&&(this.value=this.stringify.insValue(h))}return a(l,c),l.prototype.clone=function(){return Object.create(this)},l.prototype.toString=function(u){return this.options.writer.set(u).processingInstruction(this)},l})(i)}).call(this)},{"./XMLNode":116}],118:[function(t,n,r){(function(){var i,a=function(c,l){function u(){this.constructor=c}for(var d in l)o.call(l,d)&&(c[d]=l[d]);return u.prototype=l.prototype,c.prototype=new u,c.__super__=l.prototype,c},o={}.hasOwnProperty;i=t("./XMLNode"),n.exports=(function(c){function l(u,d){if(l.__super__.constructor.call(this,u),d==null)throw new Error("Missing raw text. "+this.debugInfo());this.value=this.stringify.raw(d)}return a(l,c),l.prototype.clone=function(){return Object.create(this)},l.prototype.toString=function(u){return this.options.writer.set(u).raw(this)},l})(i)}).call(this)},{"./XMLNode":116}],119:[function(t,n,r){(function(){var i,a,o,c,l,u,d,h,f,p,y,g,b,v=function(w,_){function T(){this.constructor=w}
273for(var S in _)x.call(_,S)&&(w[S]=_[S]);return T.prototype=_.prototype,w.prototype=new T,w.__super__=_.prototype,w},x={}.hasOwnProperty;d=t("./XMLDeclaration"),h=t("./XMLDocType"),i=t("./XMLCData"),a=t("./XMLComment"),f=t("./XMLElement"),y=t("./XMLRaw"),g=t("./XMLText"),p=t("./XMLProcessingInstruction"),o=t("./XMLDTDAttList"),c=t("./XMLDTDElement"),l=t("./XMLDTDEntity"),u=t("./XMLDTDNotation"),b=t("./XMLWriterBase"),n.exports=(function(w){function _(T,S){_.__super__.constructor.call(this,S),this.stream=T}return v(_,w),_.prototype.document=function(T){var S,C,D,N,M,F,L,A;for(F=T.children,C=0,N=F.length;N>C;C++)S=F[C],S.isLastRootNode=!1;for(T.children[T.children.length-1].isLastRootNode=!0,L=T.children,A=[],D=0,M=L.length;M>D;D++)switch(S=L[D],!1){case!(S instanceof d):A.push(this.declaration(S));break;case!(S instanceof h):A.push(this.docType(S));break;case!(S instanceof a):A.push(this.comment(S));break;case!(S instanceof p):A.push(this.processingInstruction(S));break;default:A.push(this.element(S))}return A},_.prototype.attribute=function(T){return this.stream.write(" "+T.name+'="'+T.value+'"')},_.prototype.cdata=function(T,S){return this.stream.write(this.space(S)+"<![CDATA["+T.text+"]]>"+this.endline(T))},_.prototype.comment=function(T,S){return this.stream.write(this.space(S)+"<!-- "+T.text+" -->"+this.endline(T))},_.prototype.declaration=function(T,S){return this.stream.write(this.space(S)),this.stream.write('<?xml version="'+T.version+'"'),T.encoding!=null&&this.stream.write(' encoding="'+T.encoding+'"'),T.standalone!=null&&this.stream.write(' standalone="'+T.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(T))},_.prototype.docType=function(T,S){var C,D,N,M;if(S||(S=0),this.stream.write(this.space(S)),this.stream.write("<!DOCTYPE "+T.root().name),T.pubID&&T.sysID?this.stream.write(' PUBLIC "'+T.pubID+'" "'+T.sysID+'"'):T.sysID&&this.stream.write(' SYSTEM "'+T.sysID+'"'),T.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(T)),M=T.children,D=0,N=M.length;N>D;D++)switch(C=M[D],!1){case!(C instanceof o):this.dtdAttList(C,S+1);break;case!(C instanceof c):this.dtdElement(C,S+1);break;case!(C instanceof l):this.dtdEntity(C,S+1);break;case!(C instanceof u):this.dtdNotation(C,S+1);break;case!(C instanceof i):this.cdata(C,S+1);break;case!(C instanceof a):this.comment(C,S+1);break;case!(C instanceof p):this.processingInstruction(C,S+1);break;default:throw new Error("Unknown DTD node type: "+C.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(T))},_.prototype.element=function(T,S){var C,D,N,M,F,L,A,X;S||(S=0),X=this.space(S),this.stream.write(X+"<"+T.name),L=T.attributes;for(F in L)x.call(L,F)&&(C=L[F],this.attribute(C));if(T.children.length===0||T.children.every(function(he){return he.value===""}))this.allowEmpty?this.stream.write("></"+T.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&T.children.length===1&&T.children[0].value!=null)this.stream.write(">"),this.stream.write(T.children[0].value),this.stream.write("</"+T.name+">");else{for(this.stream.write(">"+this.newline),A=T.children,N=0,M=A.length;M>N;N++)switch(D=A[N],!1){case!(D instanceof i):this.cdata(D,S+1);break;case!(D instanceof a):this.comment(D,S+1);break;case!(D instanceof f):this.element(D,S+1);break;case!(D instanceof y):this.raw(D,S+1);break;case!(D instanceof g):this.text(D,S+1);break;case!(D instanceof p):this.processingInstruction(D,S+1);break;default:throw new Error("Unknown XML node type: "+D.constructor.name)}this.stream.write(X+"</"+T.name+">")}return this.stream.write(this.endline(T))},_.prototype.processingInstruction=function(T,S){return this.stream.write(this.space(S)+"<?"+T.target),T.value&&this.stream.write(" "+T.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(T))},_.prototype.raw=function(T,S){return this.stream.write(this.space(S)+T.value+this.endline(T))},_.prototype.text=function(T,S){return this.stream.write(this.space(S)+T.value+this.endline(T))},_.prototype.dtdAttList=function(T,S){return this.stream.write(this.space(S)+"<!ATTLIST "+T.elementName+" "+T.attributeName+" "+T.attributeType),T.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+T.defaultValueType),T.defaultValue&&this.stream.write(' "'+T.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(T))},_.prototype.dtdElement=function(T,S){return this.stream.write(this.space(S)+"<!ELEMENT "+T.name+" "+T.value),this.stream.write(this.spacebeforeslash+">"+this.endline(T))},_.prototype.dtdEntity=function(T,S){return this.stream.write(this.space(S)+"<!ENTITY"),T.pe&&this.stream.write(" %"),this.stream.write(" "+T.name),T.value?this.stream.write(' "'+T.value+'"'):(T.pubID&&T.sysI
273D?this.stream.write(' PUBLIC "'+T.pubID+'" "'+T.sysID+'"'):T.sysID&&this.stream.write(' SYSTEM "'+T.sysID+'"'),T.nData&&this.stream.write(" NDATA "+T.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(T))},_.prototype.dtdNotation=function(T,S){return this.stream.write(this.space(S)+"<!NOTATION "+T.name),T.pubID&&T.sysID?this.stream.write(' PUBLIC "'+T.pubID+'" "'+T.sysID+'"'):T.pubID?this.stream.write(' PUBLIC "'+T.pubID+'"'):T.sysID&&this.stream.write(' SYSTEM "'+T.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(T))},_.prototype.endline=function(T){return T.isLastRootNode?"":this.newline},_})(b)}).call(this)},{"./XMLCData":105,"./XMLComment":106,"./XMLDTDAttList":107,"./XMLDTDElement":108,"./XMLDTDEntity":109,"./XMLDTDNotation":110,"./XMLDeclaration":111,"./XMLDocType":112,"./XMLElement":115,"./XMLProcessingInstruction":117,"./XMLRaw":118,"./XMLText":122,"./XMLWriterBase":123}],120:[function(t,n,r){(function(){var i,a,o,c,l,u,d,h,f,p,y,g,b,v=function(w,_){function T(){this.constructor=w}for(var S in _)x.call(_,S)&&(w[S]=_[S]);return T.prototype=_.prototype,w.prototype=new T,w.__super__=_.prototype,w},x={}.hasOwnProperty;d=t("./XMLDeclaration"),h=t("./XMLDocType"),i=t("./XMLCData"),a=t("./XMLComment"),f=t("./XMLElement"),y=t("./XMLRaw"),g=t("./XMLText"),p=t("./XMLProcessingInstruction"),o=t("./XMLDTDAttList"),c=t("./XMLDTDElement"),l=t("./XMLDTDEntity"),u=t("./XMLDTDNotation"),b=t("./XMLWriterBase"),n.exports=(function(w){function _(T){_.__super__.constructor.call(this,T)}return v(_,w),_.prototype.document=function(T){var S,C,D,N,M;for(this.textispresent=!1,N="",M=T.children,C=0,D=M.length;D>C;C++)S=M[C],N+=(function(){switch(!1){case!(S instanceof d):return this.declaration(S);case!(S instanceof h):return this.docType(S);case!(S instanceof a):return this.comment(S);case!(S instanceof p):return this.processingInstruction(S);default:return this.element(S,0)}}).call(this);return this.pretty&&N.slice(-this.newline.length)===this.newline&&(N=N.slice(0,-this.newline.length)),N},_.prototype.attribute=function(T){return" "+T.name+'="'+T.value+'"'},_.prototype.cdata=function(T,S){return this.space(S)+"<![CDATA["+T.text+"]]>"+this.newline},_.prototype.comment=function(T,S){return this.space(S)+"<!-- "+T.text+" -->"+this.newline},_.prototype.declaration=function(T,S){var C;return C=this.space(S),C+='<?xml version="'+T.version+'"',T.encoding!=null&&(C+=' encoding="'+T.encoding+'"'),T.standalone!=null&&(C+=' standalone="'+T.standalone+'"'),C+=this.spacebeforeslash+"?>",C+=this.newline},_.prototype.docType=function(T,S){var C,D,N,M,F;if(S||(S=0),M=this.space(S),M+="<!DOCTYPE "+T.root().name,T.pubID&&T.sysID?M+=' PUBLIC "'+T.pubID+'" "'+T.sysID+'"':T.sysID&&(M+=' SYSTEM "'+T.sysID+'"'),T.children.length>0){for(M+=" [",M+=this.newline,F=T.children,D=0,N=F.length;N>D;D++)C=F[D],M+=(function(){switch(!1){case!(C instanceof o):return this.dtdAttList(C,S+1);case!(C instanceof c):return this.dtdElement(C,S+1);case!(C instanceof l):return this.dtdEntity(C,S+1);case!(C instanceof u):return this.dtdNotation(C,S+1);case!(C instanceof i):return this.cdata(C,S+1);case!(C instanceof a):return this.comment(C,S+1);case!(C instanceof p):return this.processingInstruction(C,S+1);default:throw new Error("Unknown DTD node type: "+C.constructor.name)}}).call(this);M+="]"}return M+=this.spacebeforeslash+">",M+=this.newline},_.prototype.element=function(T,S){var C,D,N,M,F,L,A,X,he,j,ee,O,pe;S||(S=0),pe=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),O=this.space(S),X="",X+=O+"<"+T.name,he=T.attributes;for(A in he)x.call(he,A)&&(C=he[A],X+=this.attribute(C));if(T.children.length===0||T.children.every(function(q){return q.value===""}))X+=this.allowEmpty?"></"+T.name+">"+this.newline:this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&T.children.length===1&&T.children[0].value!=null)X+=">",X+=T.children[0].value,X+="</"+T.name+">"+this.newline;else{if(this.dontprettytextnodes){for(j=T.children,N=0,F=j.length;F>N;N++)if(D=j[N],D.value!=null){this.textispresent++,pe=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,O=this.space(S)),X+=">"+this.newline,ee=T.children,M=0,L=ee.length;L>M;M++)D=ee[M],X+=(function(){switch(!1){case!(D instanceof i):return this.cdata(D,S+1);case!(D instanceof a):return this.comment(D,S+1);
273case!(D instanceof f):return this.element(D,S+1);case!(D instanceof y):return this.raw(D,S+1);case!(D instanceof g):return this.text(D,S+1);case!(D instanceof p):return this.processingInstruction(D,S+1);default:throw new Error("Unknown XML node type: "+D.constructor.name)}}).call(this);pe&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),X+=O+"</"+T.name+">"+this.newline}return X},_.prototype.processingInstruction=function(T,S){var C;return C=this.space(S)+"<?"+T.target,T.value&&(C+=" "+T.value),C+=this.spacebeforeslash+"?>"+this.newline},_.prototype.raw=function(T,S){return this.space(S)+T.value+this.newline},_.prototype.text=function(T,S){return this.space(S)+T.value+this.newline},_.prototype.dtdAttList=function(T,S){var C;return C=this.space(S)+"<!ATTLIST "+T.elementName+" "+T.attributeName+" "+T.attributeType,T.defaultValueType!=="#DEFAULT"&&(C+=" "+T.defaultValueType),T.defaultValue&&(C+=' "'+T.defaultValue+'"'),C+=this.spacebeforeslash+">"+this.newline},_.prototype.dtdElement=function(T,S){return this.space(S)+"<!ELEMENT "+T.name+" "+T.value+this.spacebeforeslash+">"+this.newline},_.prototype.dtdEntity=function(T,S){var C;return C=this.space(S)+"<!ENTITY",T.pe&&(C+=" %"),C+=" "+T.name,T.value?C+=' "'+T.value+'"':(T.pubID&&T.sysID?C+=' PUBLIC "'+T.pubID+'" "'+T.sysID+'"':T.sysID&&(C+=' SYSTEM "'+T.sysID+'"'),T.nData&&(C+=" NDATA "+T.nData)),C+=this.spacebeforeslash+">"+this.newline},_.prototype.dtdNotation=function(T,S){var C;return C=this.space(S)+"<!NOTATION "+T.name,T.pubID&&T.sysID?C+=' PUBLIC "'+T.pubID+'" "'+T.sysID+'"':T.pubID?C+=' PUBLIC "'+T.pubID+'"':T.sysID&&(C+=' SYSTEM "'+T.sysID+'"'),C+=this.spacebeforeslash+">"+this.newline},_.prototype.openNode=function(T,S){var C,D,N,M;if(S||(S=0),T instanceof f){N=this.space(S)+"<"+T.name,M=T.attributes;for(D in M)x.call(M,D)&&(C=M[D],N+=this.attribute(C));return N+=(T.children?">":"/>")+this.newline}return N=this.space(S)+"<!DOCTYPE "+T.rootNodeName,T.pubID&&T.sysID?N+=' PUBLIC "'+T.pubID+'" "'+T.sysID+'"':T.sysID&&(N+=' SYSTEM "'+T.sysID+'"'),N+=(T.children?" [":">")+this.newline},_.prototype.closeNode=function(T,S){switch(S||(S=0),!1){case!(T instanceof f):return this.space(S)+"</"+T.name+">"+this.newline;case!(T instanceof h):return this.space(S)+"]>"+this.newline}},_})(b)}).call(this)},{"./XMLCData":105,"./XMLComment":106,"./XMLDTDAttList":107,"./XMLDTDElement":108,"./XMLDTDEntity":109,"./XMLDTDNotation":110,"./XMLDeclaration":111,"./XMLDocType":112,"./XMLElement":115,"./XMLProcessingInstruction":117,"./XMLRaw":118,"./XMLText":122,"./XMLWriterBase":123}],121:[function(t,n,r){(function(){var i=function(o,c){return function(){return o.apply(c,arguments)}},a={}.hasOwnProperty;n.exports=(function(){function o(c){this.assertLegalChar=i(this.assertLegalChar,this);var l,u,d;c||(c={}),this.noDoubleEncoding=c.noDoubleEncoding,u=c.stringify||{};for(l in u)a.call(u,l)&&(d=u[l],this[l]=d)}return o.prototype.eleName=function(c){return c=""+c||"",this.assertLegalChar(c)},o.prototype.eleText=function(c){return c=""+c||"",this.assertLegalChar(this.elEscape(c))},o.prototype.cdata=function(c){return c=""+c||"",c=c.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(c)},o.prototype.comment=function(c){if(c=""+c||"",c.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+c);return this.assertLegalChar(c)},o.prototype.raw=function(c){return""+c||""},o.prototype.attName=function(c){return c=""+c||""},o.prototype.attValue=function(c){return c=""+c||"",this.attEscape(c)},o.prototype.insTarget=function(c){return""+c||""},o.prototype.insValue=function(c){if(c=""+c||"",c.match(/\?>/))throw new Error("Invalid processing instruction value: "+c);return c},o.prototype.xmlVersion=function(c){if(c=""+c||"",!c.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+c);return c},o.prototype.xmlEncoding=function(c){if(c=""+c||"",!c.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+c);return c},o.prototype.xmlStandalone=function(c){return c?"yes":"no"},o.prototype.dtdPubID=function(c){return""+c||""},o.prototype.dtdSysID=function(c){return""+c||""},o.prototype.dtdElementValue=function(c){return""+c||""},o.prototype.dtdAttType=function(c){return""+c||""},o.prototype.dtdAttDefault=function(c){return c!=null?""+c||"":c},o.prototype.dtdEntityValue=function(c){return""+c||""},o.prototype.dtdNData=function(c){return""+c||""},o.prototype.convertAttKey="@",o.prototype.convertPIKey="?",o.prototype.convertTextKey="#text",o.prototype.convertCDataKey="#cdata",o.prototype.convertCommentKey="#comment",o.prototype.convertRawKey="#raw",o.prototype.assertLegalChar=function(c){var l;if(l=c.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+c+" at index "+l.index);return c},o.prototype.elEscape=function(c){var l;return l=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,c.replace(l,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},o.prototype.attEscape=function(c){var l;return l=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,c.replace(l,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},o})()}).call(this)},{}],122:[function(t,n,r){(function(){var i,a=function(c,l){function u(){this.constructor=c}for(var d in l)o.call(l,d)&&(c[d]=l[d]);return u.prototype=l.prototype,c.prototype=new u,c.__super__=l.prototype,c},o={}.hasOwnProperty;i=t("./XMLNode"),n.exports=(function(c){function l(u,d){if(l.__super__.constructor.call(this,u),d==null)throw new Error("Missing element text. "+this.debugInfo());this.value=this.stringify.eleText(d)}return a(l,c),l.prototype.clone=function(){return Object.create(this)},l.prototype.toString=function(u){return this.options.writer.set(u).text(this)},l})(i)}).call(this)},{"./XMLNode":116}],123:[function(t,n,r){(function(){var i={}.hasOwnProperty;n.exports=(function(){function a(o){var c,l,u,d,h,f,p,y,g;o||(o={}),this.pretty=o.pretty||!1,this.allowEmpty=(l=o.allowEmpty)!=null?l:!1,this.pretty?(this.indent=(u=o.indent)!=null?u:" ",this.newline=(d=o.newline)!=null?d:` 274`,this.offset=(h=o.offset)!=null?h:0,this.dontprettytextnodes=(f=o.dontprettytextnodes)!=null?f:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(p=o.spacebeforeslash)!=null?p:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,y=o.writer||{};
274for(c in y)i.call(y,c)&&(g=y[c],this[c]=g)}return a.prototype.set=function(o){var c,l,u;o||(o={}),"pretty"in o&&(this.pretty=o.pretty),"allowEmpty"in o&&(this.allowEmpty=o.allowEmpty),this.pretty?(this.indent="indent"in o?o.indent:" ",this.newline="newline"in o?o.newline:` 275`,this.offset="offset"in o?o.offset:0,this.dontprettytextnodes="dontprettytextnodes"in o?o.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in o?o.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,l=o.writer||{};for(c in l)i.call(l,c)&&(u=l[c],this[c]=u);return this},a.prototype.space=function(o){var c;return this.pretty?(c=(o||0)+this.offset+1,c>0?new Array(c).join(this.indent):""):""},a})()}).call(this)},{}],124:[function(t,n,r){(function(){var i,a,o,c,l,u,d;d=t("./Utility"),l=d.assign,u=d.isFunction,i=t("./XMLDocument"),a=t("./XMLDocumentCB"),c=t("./XMLStringWriter"),o=t("./XMLStreamWriter"),n.exports.create=function(h,f,p,y){var g,b;if(h==null)throw new Error("Root element needs a name.");return y=l({},f,p,y),g=new i(y),b=g.element(h),y.headless||(g.declaration(y),(y.pubID!=null||y.sysID!=null)&&g.doctype(y)),b},n.exports.begin=function(h,f,p){var y;return u(h)&&(y=[h,f],f=y[0],p=y[1],h={}),f?new a(h,f,p):new i(h)},n.exports.stringWriter=function(h){return new c(h)},n.exports.streamWriter=function(h,f){return new o(h,f)}}).call(this)},{"./Utility":103,"./XMLDocument":113,"./XMLDocumentCB":114,"./XMLStreamWriter":119,"./XMLStringWriter":120}]},{},[21])(21)})})(Uw)),Uw.exports}var wA=SP();async function EP(s){const e=await s.arrayBuffer(),n=(await wA.convertToHtml({arrayBuffer:e},{styleMap:["p[style-name='Heading 1'] => h1:fresh","p[style-name='Heading 2'] => h2:fresh","p[style-name='Heading 3'] => h3:fresh"]})).value,i=(await wA.extractRawText({arrayBuffer:e})).value;return{blocks:DP(n),plainText:i}}function DP(s){const n=new DOMParser().parseFromString(`<div>${s}</div>`,"text/html").body.firstElementChild;if(!n)return[];const r=[];for(const i of Array.from(n.children))r.push(...CP(i));return r}function CP(s){var n,r;const e=s.tagName.toLowerCase();if(e==="h1"||e==="h2"||e==="h3")return[{type:"heading",level:parseInt(e[1]??"1"),segments:Cp(s)}];if(e==="table")return[AP(s)];if(e==="ul")return FS(s,!1);if(e==="ol")return FS(s,!0);if(e==="p"||e==="div"||e==="blockquote"){const i=Cp(s);return i.length===0||i.length===1&&!((n=i[0])!=null&&n.text.trim())?[]:[{type:"paragraph",segments:i}]}const t=(r=s.textContent)==null?void 0:r.trim();return t?[{type:"paragraph",segments:[{text:t,bold:!1}]}]:[]}function Cp(s,e=!1){const t=[];for(const n of Array.from(s.childNodes)){if(n.nodeType===Node.TEXT_NODE){const o=n.textContent||"";o&&t.push({text:o,bold:e});continue}if(n.nodeType!==Node.ELEMENT_NODE)continue;const r=n,i=r.tagName.toLowerCase(),a=e||i==="strong"||i==="b"||r.classList.contains("font-bold");if(["strong","b","em","i","u","s","del","span","a","sup","sub"].includes(i)){t.push(...Cp(r,a));continue}t.push(...Cp(r,a))}return t}function AP(s){const e=[],t=s.querySelectorAll("tr");for(const n of Array.from(t)){const r=[],i=n.querySelectorAll("td, th");for(const a of Array.from(i))r.push(Cp(a));r.length>0&&e.push(r)}return{type:"table",rows:e}}function FS(s,e){const t=[];for(const n of Array.from(s.children))if(n.tagName.toLowerCase()==="li"){const r=n.querySelector("ul, ol"),i=Cp(n);if(i.length>0&&t.push({type:"list-item",ordered:e,segments:i}),r){const a=r.tagName.toLowerCase()==="ol";t.push(...FS(r,a))}}return t}const kP="/assets/pdf.worker.min-FHbmGBN0.mjs";Ko.workerSrc=kP;const xA={a:({node:s,...e})=>G.jsx("a",{...e,target:"_blank",rel:"noopener noreferrer"})};function NP({initialThreadId:s}={}){var $;const e=MN(),t=jI(),[n,r]=Ee.useState(""),i=Ee.useRef(null),a=r4(),[o,c]=Ee.useState(!1),[l,u]=Ee.useState(""),[d,h]=Ee.useState(""),[f,p]=Ee.useState(!1),y=Ee.useRef(null),[g,b]=Ee.useState(null),v=Ee.useRef(null),[x,w]=Ee.useState(null),[_,T]=Ee.useState(""),[S,C]=Ee.useState([]),[D,N]=Ee.useState(""),[M,F]=Ee.useState("text"),[L,A]=Ee.useState(!1),{data:X=[],isLoading:he}=n4(),[j,ee]=Ee.useState(null),[O,pe]=Ee.useState(!1),[q,B]=Ee.useState(new Set),re=Ee.useRef(null),le=X.find(Z=>Z.id===(j==null?void 0:j.id)),ge=Z=>{B(ae=>{const ye=new Set(ae);return ye.has(Z)?ye.delete(Z):ye.add(Z),ye})},ie=(Z,ae)=>
275{const ye=Z.split(/\s+/).filter(Boolean);return ye.length<=ae?{truncated:Z,isLong:!1}:{truncated:ye.slice(0,ae).join(" "),isLong:!0}},{data:P,isLoading:W}=i4((j==null?void 0:j.threadId)??null),te=(($=P==null?void 0:P.find(Z=>Z.role==="assistant"&&Z.historyId===(j==null?void 0:j.id)))==null?void 0:$.content)??null,Y=Ee.useRef(null),se=Ee.useRef(!1),ue=_w(Z=>Z.setThreadId);Ee.useEffect(()=>{ue(s??null)},[]);const we=Z=>{var ye;const ae=(ye=Z.target.files)==null?void 0:ye[0];ae&&b(ae),Z.target.value=""},H=Z=>{var ye;const ae=((ye=Z.name.split(".").pop())==null?void 0:ye.toLowerCase())??"";return["txt","csv"].includes(ae)?"text":["png","jpg","jpeg","webp"].includes(ae)?"image":ae==="pdf"?"pdf":["docx","doc"].includes(ae)?"docx":"unsupported"},_e=async Z=>{u(""),ee(null),w(Z),A(!0);const ae=H(Z);if(F(ae),ae==="text"){const ye=await Z.text();T(ye),N("")}else if(ae==="pdf"){N(URL.createObjectURL(Z));try{const ye=await TP(Z);T(ye.plainText),C(ye.blocks)}catch(ye){console.error("[PDF extraction] failed:",ye),T(""),C([])}}else if(ae==="docx"){N("");try{const ye=await EP(Z);T(ye.plainText),C(ye.blocks)}catch(ye){console.error("[DOCX import] failed:",ye),T(""),C([])}}else ae==="image"?(N(URL.createObjectURL(Z)),T("")):(T(""),N(""));A(!1)},K=()=>{D&&URL.revokeObjectURL(D),w(null),T(""),C([]),N("")},U=Z=>{var ye;const ae=(ye=Z.target.files)==null?void 0:ye[0];ae&&_e(ae),Z.target.value=""};Ee.useEffect(()=>{if(!O)return;const Z=ae=>{re.current&&!re.current.contains(ae.target)&&pe(!1)};return document.addEventListener("mousedown",Z),()=>document.removeEventListener("mousedown",Z)},[O]),Ee.useEffect(()=>()=>{D&&URL.revokeObjectURL(D)},[D]);const R=async()=>{const Z=n.trim();if(!Z||o||!await XI("to continue asking questions"))return;c(!0),u(""),h(""),ee(null),K(),se.current=!1;let ye="",me="",xe=[],De=0;try{const Re=await KI({query:Z,threadId:_w.getState().threadId??void 0,files:g?[g]:void 0},{onThreadId:Ue=>{Ue&&ue(Ue)},onStatus:Ue=>h(Ue),onToken:Ue=>{ye+=Ue,me=ye,u(ye)},onTokenReset:()=>{ye="",me="",u("")},onResponse:Ue=>{me=Ue,u(Ue)},onSources:Ue=>{try{xe=JSON.parse(Ue)}catch{}},onDone:Ue=>{var Ke;if(c(!1),h(""),b(null),Ue)try{const nt=JSON.parse(Ue),Ye=((Ke=nt.token_usage)==null?void 0:Ke.total_tokens)??nt.total_tokens;Ye&&(De=Ye),nt.thread_id&&ue(nt.thread_id)}catch{}if(me&&!se.current){const nt=xe.map(Ye=>{var dt,Ae;return Ye.doc_link||Ye.web_url||((Ae=(dt=Ye.pdf_links)==null?void 0:dt.find(Le=>Le.url))==null?void 0:Ae.url)}).filter(Ye=>!!Ye);VI.storeHistory({SearchTitle:Z,SearchResult:me,ThreadId:_w.getState().threadId,ParentId:null,Token:De,source:{type:"sources",urls:nt,sources:xe},summary:Z}).then(()=>{t.invalidateQueries({queryKey:GI.all}),t.invalidateQueries({queryKey:["verifier","questions"]})}).catch(()=>{})}},onError:Ue=>{h(`Error: ${Ue}`),c(!1)}});Y.current=Re}catch{c(!1),h("")}},E=()=>{se.current=!0,Y.current&&(Y.current(),Y.current=null),c(!1),h("")},Q=async()=>{const Z=l||te||"";if(Z)try{await navigator.clipboard.writeText(Z),p(!0),setTimeout(()=>p(!1),2e3)}catch{zI.error("Copy failed","Could not copy the response to clipboard.")}};Ee.useEffect(()=>{const Z=i.current;Z&&(Z.style.height="auto",Z.style.height=`${Z.scrollHeight}px`)},[n]);const ce=Z=>{r(Z.text),requestAnimationFrame(()=>{const ae=i.current;ae&&(ae.focus(),ae.setSelectionRange(Z.caret,Z.caret))})},V=Z=>{const ae=Z.target.value;r(ae),a.update(ae,Z.target.selectionStart??ae.length)},k=Z=>{var me;const ae=((me=i.current)==null?void 0:me.selectionStart)??n.length,ye=a.accept({text:n,caret:ae},Z);ye&&ce(ye)},I=Z=>{var me;const ae=((me=i.current)==null?void 0:me.selectionStart)??n.length;a.handleKeyDown(Z,{text:n,caret:ae},ce)||Z.key==="Enter"&&!Z.shiftKey&&(Z.preventDefault(),R())};return G.jsxs("div",{className:"flex h-full flex-col border-r border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",children:[G.jsxs("div",{className:"flex items-center justify-between border-b border-gray-200 px-4 py-3 dark:border-gray-700",children:[G.jsx("h2",{className:"text-lg font-bold text-blue-700 dark:text-blue-400",children:"AI Research"}),G.jsxs("button",{type:"button",onClick:()=>e("/verifier"),className:"flex items-center gap-1.5 rounded-lg bg-amber-400 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-amber-500",children:[G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Verifier"]})]}),G.jsxs("div",{className:"px-4 py-3",children:[G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsxs("button",{type:"button",onClick:()=>{var Z;return(Z=y.current)==null?void 0:Z.click()},className:`relative flex h-9 w-9 shrink-0 items-center justify-center rounded-full border transition-colors ${g?"border-blue-400 text-blue-500 dark:border-blue-500 dark:text-blue-400":"border-gray-300 bg-white text-gray-600 hover:bg-gray-50 hover:text-gray-800 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-200"}`,"aria-label":"Attach file",children:[G.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:G.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"})}),g&&G.jsx("span",{className:"absolute -right-1 -top-1 flex h-4 w-4 items-center justify-center rounded-full bg-blue-500 text-[0.6rem] font-bold text-white",children:"1"})]}),G.jsx("input",{ref:y,type:"file",accept:".pdf,.doc,.docx,.txt,.png,.jpg,.jpeg,.webp,.csv,.xlsx,.xls",className:"hidden",onChange:we}),G.jsxs("div",{className:"relative flex-1",children:[G.jsx(s4,{suggestions:a.suggestions,selectedIndex:a.selectedIndex,onSelect:k,onHoverIndex:a.setSelectedIndex,position:"bottom"}),G.jsx("textarea",{ref:i,rows:1,value:n,onChange:V,onKeyDown:I,onBlur:a.close,placeholder:"Editor search more...",className:"block max-h-29 w-full resize-none overflow-y-auto rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm leading-5 text-gray-700 outline-none placeholder:text-gray-400 focus:border-amber-400 focus:ring-1 focus:ring-amber-400 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200 dark:placeholder:text-gray-500"})]}),o?G.jsx("button",{type:"button",onClick:E,className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-red-500 text-white transition-colors hover:bg-red-600",title:"Cancel",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("rect",{x:"6",y:"6",
275width:"12",height:"12",rx:"1",strokeLinecap:"round",strokeLinejoin:"round"})})}):G.jsx("button",{type:"button",onClick:R,disabled:!n.trim(),className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-amber-400 text-white transition-colors hover:bg-amber-500 disabled:opacity-50",title:"Send",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})})})]}),g&&G.jsx("div",{className:"mt-2",children:G.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-100 px-2.5 py-0.5 text-xs font-medium text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",children:[G.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:G.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"})}),g.name,G.jsx("button",{type:"button",onClick:()=>b(null),className:"ml-0.5 text-amber-600 hover:text-amber-800 dark:text-amber-400",children:"Ã"})]})})]}),G.jsxs("div",{className:"flex flex-col gap-3 border-b border-gray-200 px-4 pb-3 dark:border-gray-700",children:[G.jsxs("div",{className:"min-w-0 w-full",children:[G.jsx("label",{className:"mb-1 block text-sm text-gray-500 dark:text-gray-400",children:"Recent Search History"}),G.jsxs("div",{ref:re,className:"relative",children:[G.jsxs("button",{type:"button",onClick:()=>pe(Z=>!Z),className:"flex w-full items-start justify-between gap-2 rounded-md border border-yellow-500 bg-white px-3 py-2 text-left text-sm text-gray-700 transition-colors dark:bg-gray-800 dark:text-gray-300",children:[G.jsx("span",{className:"max-h-50 flex-1 overflow-y-auto whitespace-normal wrap-break-word leading-5",children:(le==null?void 0:le.question)??""}),G.jsx("svg",{className:`mt-0.5 h-4 w-4 shrink-0 transition-transform ${O?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),O&&G.jsx("div",{className:"absolute left-0 right-0 top-full z-50 mt-1 max-h-64 overflow-y-auto rounded-md border border-gray-200 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-800",children:he?G.jsx("p",{className:"px-3 py-2.5 text-sm text-gray-400",children:"Loading..."}):X.length===0?G.jsx("p",{className:"px-3 py-2.5 text-sm text-gray-400",children:"No history found"}):X.map(Z=>{const{truncated:ae,isLong:ye}=ie(Z.question,100),me=q.has(Z.id),xe=(j==null?void 0:j.id)===Z.id;return G.jsxs("button",{type:"button",onClick:()=>{ee({threadId:Z.threadId,id:Z.id}),pe(!1)},className:`w-full px-3 py-2.5 text-left text-sm text-gray-700 transition-colors hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-700 ${xe?"bg-gray-100 dark:bg-gray-700":""}`,children:[ye&&!me?`${ae}... `:`${Z.question} `,ye&&G.jsx("span",{role:"button",tabIndex:0,onClick:De=>{De.stopPropagation(),ge(Z.id)},onKeyDown:De=>{(De.key==="Enter"||De.key===" ")&&(De.preventDefault(),De.stopPropagation(),ge(Z.id))},className:"font-medium text-blue-600 hover:underline dark:text-blue-400",children:me?"Read less":"Read more"})]},Z.id)})})]})]}),G.jsxs("div",{className:"flex min-w-0 w-full items-center gap-2 justify-end",children:[G.jsx("span",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"File Preview"}),G.jsx("input",{ref:v,type:"file",accept:".pdf,.doc,.docx,.txt,.png,.jpg,.jpeg,.webp,.csv,.xlsx,.xls",className:"hidden",onChange:U}),G.jsxs("button",{type:"button",onClick:()=>{var Z;return(Z=v.current)==null?void 0:Z.click()},className:`flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-semibold transition-colors ${x?"bg-blue-500 text-white hover:bg-blue-600":"bg-amber-400 text-white hover:bg-amber-500"}`,children:[G.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[G.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),G.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),x?"Change":"Select"]})]})]}),d&&G.jsx("div",{className:"px-4 py-2 text-xs text-gray-500 dark:text-gray-400",children:d}),G.jsx("div",{className:"flex-1 overflow-y-auto px-4 py-4",children:x?G.jsxs("div",{className:"flex h-full flex-col",children:[G.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[G.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[G.jsxs("svg",{className:"h-4 w-4 shrink-0 text-blue-500",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[G.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),G.jsx("polyline",{points:"14 2 14 8 20 8"})]}),G.jsx("span",{className:"truncate text-sm font-medium text-gray-700 dark:text-gray-300",children:x.name})]}),G.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:G.jsxs("button",{type:"button",onClick:K,className:"flex items-center gap-1 rounded-md border border-gray-300 px-2 py-1 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-100 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-800",children:[G.jsxs("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[G.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),G.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),"Close"]})})]}),L?G.jsx("div",{className:"flex flex-1 items-center justify-center",children:G.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[G.jsxs("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[G.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),G.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading preview..."]})}):M==="text"?G.jsx("pre",{className:"flex-1 select-text whitespace-pre-wrap break-words rounded-lg border border-gray-200 bg-gray-50 p-3 text-sm leading-relaxed text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200",children:_}):M==="image"?G.jsx("div",{className:"flex flex-1 items-center justify-center rounded-lg border border-gray-200 bg-gray-50 p-2 dark:border-gray-700 dark:bg-gray-800",children:G.jsx("img",{src:D,alt:x.name,className:"max-h-full max-w-full rounded object-contain"})}):M==="pdf"?G.jsx("iframe",{src:D,title:x.name,className:"flex-1 rounded-lg border border-gray-200 dark:border-gray-700",style:{minHeight:400}}):M==="docx"?S.length>0?G.jsx("div",{className:"flex-1 select-text overflow-y-auto rounded-lg border border-gray-200 bg-white p-4 text-sm leading-relaxed text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200",style:{minHeight:400},children:S.map((Z,ae)=>Z.type==="table"?G.jsx("table",{className:"my-3 w-full border-collapse border border-gray-300 text-sm dark:border-gray-600",children:G.jsx("tbody",{children:Z.rows.map((ye,me)=>G.jsx("tr",{children:ye.map((xe,De)=>G.jsx("td",{className:"border border-gray-300 px-2 py-1 dark:border-gray-600",children:xe.map((Re,Ue)=>Re.bold?G.jsx("strong",{children:Re.text},Ue):G.jsx("span",{children:Re.text},Ue))},De))},me))})},ae):Z.type==="heading"?G.jsx("p",{className:`my-1 font-bold ${Z.level===1?"text-xl":Z.level===2?"text-lg":"text-base"}`,children:Z.segments.map((ye,me)=>ye.bold?G.jsx("strong",{children:ye.text},me):G.jsx("span",{children:ye.text},me))},ae):Z.type==="list-item"?G.jsxs("p",{className:"my-0.5 pl-4",children:[(Z.ordered,"⢠"),Z.segments.map((ye,me)=>ye.bold?G.jsx("strong",{children:ye.text},me):G.jsx("span",{children:ye.text},me))]},ae):G.jsx("p",{className:"my-1",children:Z.segments.map((ye,me)=>ye.bold?G.jsx("strong",{children:ye.text},me):G.jsx("span",{children:ye.text},me))},ae))}):_?G.jsx("pre",{className:"flex-1 select-text whitespace-pre-wrap break-words rounded-lg border border-gray-200 bg-gray-50 p-3 text-sm leading-relaxed text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200",children:_}):G.jsx("div",{className:"flex flex-1 items-center justify-center",children:G.jsx("p",{className:"text-sm text-gray-500",children:"No content extracted from document"})}):G.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 rounded-lg border border-gray-200 bg-gray-50 p-6 dark:border-gray-700 dark:bg-gray-800",children:[G.jsxs("svg",{className:"h-12 w-12 text-gray-300 dark:text-gray-600",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[G.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",strokeLinecap:"round",strokeLinejoin:"round"}),G.jsx("polyline",{points:"14 2 14 8 20 8",strokeLinecap:"round",strokeLinejoin:"round"})]}),G.jsx("p",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"Preview not available for this file type"}),G.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Supported: .txt, .csv, .pdf, .docx, .png, .jpg, .jpeg, .webp"})]})]}):G.jsxs(G.Fragment,{children:[(l||te)&&G.jsx("div",{className:"mb-2 flex justify-end",children:G.jsx("button",{type:"button",onClick:Q,className:"flex items-center gap-1 rounded-md border border-gray-300 px-2 py-1 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-100 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-800",title:"Copy response",children:f?G.jsxs(G.Fragment,{children:[G.jsx("svg",{className:"h-3.5 w-3.5 text-green-500",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:G.jsx("polyline",{points:"20 6 9 17 4 12"})}),"Copied"]}):G.jsxs(G.Fragment,{children:[G.jsxs("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[G.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),G.jsx("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]}),"Copy"]})})}),l?G.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none select-text prose-table:border-collapse prose-td:border prose-td:border-gray-300 prose-td:px-3 prose-td:py-1.5 prose-th:border prose-th:border-gray-300 prose-th:px-3 prose-th:py-1.5 prose-th:bg-gray-200 dark:prose-td:border-gray-600 dark:prose-th:border-gray-600 dark:prose-th:bg-gray-700",children:G.jsx(jC,{remarkPlugins:[zC],components:xA,children:l})}):j?W?G.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:[G.jsx("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})}),"Loading response..."]}):te?G.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none select-text prose-table:border-collapse prose-td:border prose-td:border-gray-300 prose-td:px-3 prose-td:py-1.5 prose-th:border prose-th:border-gray-300 prose-th:px-3 prose-th:py-1.5 prose-th:bg-gray-200 dark:prose-td:border-gray-600 dark:prose-th:border-gray-600 dark:prose-th:bg-gray-700",children:G.jsx(jC,{remarkPlugins:[zC],components:xA,children:te})}):G.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500",children:"No AI response found for this conversation."}):o?null:G.jsx("div",{className:"flex h-full items-center justify-center",children:G.jsx("p",{className:"text-center text-sm text-gray-400 dark:text-gray-500",children:"Search for legal information to see AI response here"})}),o&&!l&&G.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[G.jsxs("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[G.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),G.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Generating response..."]})]})})]})}function ze(s,...e){const t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",s);for(const r of e)n.append("v",r);throw t.search=n.toString(),Error(`Minified Lexical error #${s}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function sU(s,...e){const t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",s);for(const r of e)n.append("v",r);t.search=n.toString(),console.warn(`Minified Lexical warning #${s}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const so=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,FP=so&&"documentMode"in document?document.documentMode:null,qs=so&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Dl=so&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),x1=!(!so||!("InputEvent"in window)||FP)&&"getTargetRanges"in new window.InputEvent("input"),ab=so&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,oU=so&&/Android/.test(navigator.userAgent),Iv=so&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!oU,aU=so&&/^(?=.*Chrome).*/i.test(navigator.userAgent),US=so&&oU&&aU,Mv=so&&/AppleWeb
275Kit\/[\d.]+/.test(navigator.userAgent)&&qs&&!aU,UP=0,RP=1,IP=2,cU=128,MP=1,PP=2,OP=3,LP=4,BP=5,WP=6,im=Iv||ab||Mv?"Â ":"â",Pv=` 276 277`,jE=Dl?"Â ":im,Cl={bold:1,capitalize:1024,code:16,highlight:cU,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},jP={directionless:1,unmergeable:2},RS={center:2,end:6,justify:4,left:1,right:3,start:5},zP={[PP]:"center",[WP]:"end",[LP]:"justify",[MP]:"left",[OP]:"right",[BP]:"start"},HP={normal:0,segmented:2,token:1},$P={[UP]:"normal",[IP]:"segmented",[RP]:"token"},_A="$config";function lU(s,e,t,n,r,i){let a=s.getFirstChild();for(;a!==null;){const o=a.__key;a.__parent===e&&(Fe(a)&&lU(a,o,t,n,r,i),t.has(o)||i.delete(o),r.push(o)),a=a.getNextSibling()}}let IS=!1,zE=0;function KP(s){zE=s.timeStamp}function Rw(s,e,t){const n=s.nodeName==="BR",r=e.__lexicalLineBreak;return r&&(s===r||n&&s.previousSibling===r)||n&&Vv(s,t)!==void 0}function XP(s,e,t){const n=Hr(Qi(t));let r=null,i=null;n!==null&&n.anchorNode===s&&(r=n.anchorOffset,i=n.focusOffset);const a=s.nodeValue;a!==null&&lD(e,a,r,i,!1)}function VP(s,e,t){if(Ie(s)){const n=s.anchor.getNode();if(n.is(t)&&s.format!==n.getFormat())return!1}return gc(e)&&t.isAttached()}function GP(s,e,t,n){for(let r=s;r&&!VO(r);r=db(r)){const i=Vv(r,e);if(i!==void 0){const a=ft(i,t);if(a)return Pt(a)||!mn(r)?void 0:[r,a]}else if(r===n)return[n,dR(t)]}}function uU(s,e,t){IS=!0;const n=performance.now()-zE>100;try{Go(s,()=>{const r=Oe()||(function(h){return h.getEditorState().read(()=>{const f=Oe();return f!==null?f.clone():null})})(s),i=new Map,a=s.getRootElement(),o=s._editorState,c=s._blockCursorElement;let l=!1,u="";for(let h=0;h<e.length;h++){const f=e[h],p=f.type,y=f.target,g=GP(y,s,o,a);if(!g)continue;const[b,v]=g;if(p==="characterData")n&&We(v)&&gc(y)&&VP(r,y,v)&&XP(y,v,s);else if(p==="childList"){l=!0;const x=f.addedNodes;for(let T=0;T<x.length;T++){const S=x[T],C=uR(S),D=S.parentNode;if(D!=null&&S!==c&&C===null&&!Rw(S,D,s)){if(Dl){const N=(mn(S)?S.innerText:null)||S.nodeValue;N&&(u+=N)}D.removeChild(S)}}const w=f.removedNodes,_=w.length;if(_>0){let T=0;for(let S=0;S<_;S++){const C=w[S];(Rw(C,y,s)||c===C)&&(y.appendChild(C),T++)}_!==T&&i.set(b,v)}}}if(i.size>0)for(const[h,f]of i)f.reconcileObservedMutation(h,s);const d=t.takeRecords();if(d.length>0){for(let h=0;h<d.length;h++){const f=d[h],p=f.addedNodes,y=f.target;for(let g=0;g<p.length;g++){const b=p[g],v=b.parentNode;v==null||b.nodeName!=="BR"||Rw(b,y,s)||v.removeChild(b)}}t.takeRecords()}r!==null&&(l&&Yt(r),Dl&&mR(s)&&r.insertRawText(u))})}finally{IS=!1}}function hU(s){const e=s._observer;e!==null&&uU(s,e.takeRecords(),e)}function dU(s){(function(e){zE===0&&Qi(e).addEventListener("textInput",KP,!0)})(s),s._observer=new MutationObserver((e,t)=>{uU(s,e,t)})}let qP=class{constructor(e,t){be(this,"key");be(this,"parse");be(this,"unparse");be(this,"isEqual");be(this,"defaultValue");be(this,"resetOnCopyNode");this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||JP).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function jp(s,e){return new qP(s,e)}function Br(s,e,t="latest"){const n=(t==="latest"?s.getLatest():s).__state;return n?n.getValue(e):e.defaultValue}function ui(s,e,t){let n;if(Dr(),typeof t=="function"){const i=s.getLatest(),a=Br(i,e);if(n=t(a),e.isEqual(a,n))return i}else n=t;const r=s.getWritable();return pU(r).updateFromKnown(e,n),r}function YP(s){const e=new Map,t=new Set;for(let n=typeof s=="function"?s:s.replace;n.prototype&&n.prototype.getType!==void 0;n=Object.getPrototypeOf(n)){const{ownNodeConfig:r}=Gv(n);if(r&&r.stateConfigs)for(const i of r.stateConfigs){let a;"stateConfig"in i?(a=i.stateConfig,i.flat&&t.add(a.key)):a=i,e.set(a.key,a)}}return{flatKeys:t,sharedConfigMap:e}}let ZP=class fU{constructor(e,t,n=void 0,r=new Map,i=void 0){be(this,"node");be(this,"knownState");be(this,"unknownState");be(this,"sharedNodeState");be(this,"size");this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;const{sharedConfigMap:a}=this.sharedNodeState,o=i!==void 0?i:(function(c,l,u){let d=u.size;if(l)for(const h in l){const f=c.get(h);f&&u.has(f)||d++}return d})(a,n,r);this.size=o}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const r=this.unknownState[e.key];r!==void 0&&(n=e.parse(r)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[n,r]of this.knownState)n.isEqual(r,n.defaultValue)?delete e[n.key]:e[n.key]=n.unparse(r);for(const n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return TA(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:n}=this,r=new Map(this.knownState);return new fU(e,t,(function(i,a,o){let c;if(o)for(const[l,u]of Object.entries(o)){const d=i.get(l);d?a.has(d)||a.set(d,d.parse(u)):(c=c||{},c[l]=u)}return c})(t.sharedConfigMap,r,n),r,this.size)}resetOnCopyNode(){for(const e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){const n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);const{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=TA(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){const n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const n of t.keys())t.set(n,n.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[n,r]of Object.entries(e))this.updateFromUnknown(n,r)}};function pU(s){const e=s.getWritable(),t=e.__state?e.__state.getWritable(e):new ZP(e,gU(e));return e.__state=t,t}function gU(s){return s.__state?s.__state.sharedNodeState:iR(fb(),s.getType()).sharedNodeState}function TA(s){if(s)for(const e in s)return s}function JP(s){return s}function SA(s,e,t){for(const[n,r]of e.knownState){if(s.has(n.key))continue;s.add(n.key);const i=t?t.getValue(n):n.defaultValue;if(i!==r&&!n.isEqual(i,r))return!0}return!1}function EA(s,e,t){const{unknownState:n}=e,r=t?t.unknownState:void 0;if(n){for(const[i,a]of Object.entries(n))if(!s.has(i)&&(s.add(i),a!==(r?r[i]:void 0)))return!0}return!1}function DA(s,e){const t=s.__state;return t&&t.node===s?t.getWritable(e):t}function CA(s,e){const t=s.__mode,n=s.__format,r=s.__style,i=e.__mode,a=e.__format,o=e.__style,c=s.__state,l=e.__state;return(t===null||t===i)&&(n===null||n===a)&&(r===null||r===o)&&(s.__state===null||c===l||(function(u,d){if(u===d)return!0;const h=new Set;return!(u&&SA(h,u,d)||d&&SA(h,d,u)||u&&EA(h,u,d)||d&&EA(h,d,u))})(c,l))}function AA(s,e){const t=s.mergeWithSibling(e),n=hn()._normalizedNodes;return n.add(s.__key),n.add(e.__key),t}function kA(s){let e,t,n=s;if(n.__text!==""||!n.isSimpleText()||n.isUnmergeable()){for(;(e=n.getPreviousSibling())!==null&&We(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(CA(e,n)){n=AA(e,n);break}break}e.remove()}for(;(t=n.getNextSibling())!==null&&We(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(CA(n,t)){n=AA(n,t);break}break}t.remove()}}else n.remove()}
277function Ap(s){return NA(s.anchor),NA(s.focus),s}function NA(s){for(;s.type==="element";){const e=s.getNode(),t=s.offset;let n,r;if(t===e.getChildrenSize()?(n=e.getChildAtIndex(t-1),r=!0):(n=e.getChildAtIndex(t),r=!1),We(n)){s.set(n.__key,r?n.getTextContentSize():0,"text",!0);break}if(!Fe(n))break;s.set(n.__key,r?n.getChildrenSize():0,"element",!0)}}let Bh,Nr,sm,Ov,MS,PS,Wh,Qs,OS,om,er="",mo=null,tu=null,Ad=!1,_1=!1;function T1(s,e){const t=Wh.get(s);if(e!==null){const n=jS(s);n.parentNode===e&&e.removeChild(n)}if(Qs.has(s)||Nr._keyToDOMMap.delete(s),Fe(t)){const n=E1(t,Wh);LS(n,0,n.length-1,null)}t!==void 0&&uD(om,sm,Ov,t,"destroyed")}function LS(s,e,t,n){for(let r=e;r<=t;++r){const i=s[r];i!==void 0&&T1(i,n)}}function Gl(s,e){s.setProperty("text-align",e)}const QP="40px";function mU(s,e){const t=Bh.theme.indent;if(typeof t=="string"){const r=s.classList.contains(t);e>0&&!r?s.classList.add(t):e<1&&r&&s.classList.remove(t)}if(e===0)return void s.style.setProperty("padding-inline-start","");const n=getComputedStyle(Nr._rootElement||s).getPropertyValue("--lexical-indent-base-value")||QP;s.style.setProperty("padding-inline-start",`calc(${e} * ${n})`)}function yU(s,e){const t=s.style;e===0?Gl(t,""):e===1?Gl(t,"left"):e===2?Gl(t,"center"):e===3?Gl(t,"right"):e===4?Gl(t,"justify"):e===5?Gl(t,"start"):e===6&&Gl(t,"end")}function BS(s,e){const t=(function(n){const r=n.__dir;if(r!==null)return r;if(Vn(n))return null;const i=n.getParentOrThrow();return Vn(i)&&i.__dir===null?"auto":null})(e);t!==null?s.dir=t:s.removeAttribute("dir")}function S1(s,e){const t=Qs.get(s);t===void 0&&ze(60);const n=t.createDOM(Bh,Nr);if((function(r,i,a){const o=a._keyToDOMMap;(function(c,l,u){const d=`__lexicalKey_${l._key}`;c[d]=u})(i,a,r),o.set(r,i)})(s,n,Nr),We(t)?n.setAttribute("data-lexical-text","true"):Pt(t)&&n.setAttribute("data-lexical-decorator","true"),Fe(t)){const r=t.__indent,i=t.__size;if(BS(n,t),r!==0&&mU(n,r),i!==0){const o=i-1;WS(E1(t,Qs),t,0,o,t.getDOMSlot(n))}const a=t.__format;a!==0&&yU(n,a),t.isInline()||bU(null,t,n)}else{const r=t.getTextContent();if(Pt(t)){const i=t.decorate(Nr,Bh);i!==null&&vU(s,i),n.contentEditable="false"}er+=r}return e!==null&&e.insertChild(n),uD(om,sm,Ov,t,"created"),n}function WS(s,e,t,n,r){const i=er;er="";let a=t;for(;a<=n;++a){S1(s[a],r);const o=Qs.get(s[a]);o!==null&&We(o)?mo===null&&(mo=o.getFormat(),tu=o.getStyle()):Fe(o)&&a<n&&!o.isInline()&&(er+=Pv)}r.element.__lexicalTextContent=er,er=i+er}function FA(s,e){if(s){const t=s.__last;if(t){const n=e.get(t);if(n)return wl(n)?"line-break":Pt(n)&&n.isInline()?"decorator":null}return"empty"}return null}function bU(s,e,t){const n=FA(s,Wh),r=FA(e,Qs);n!==r&&e.getDOMSlot(t).setManagedLineBreak(r)}function eO(s,e,t){var n;mo=null,tu=null,(function(r,i,a){const o=er,c=r.__size,l=i.__size;er="";const u=a.element;if(c===1&&l===1){const d=r.__first,h=i.__first;if(d===h)t1(d,u);else{const p=jS(d),y=S1(h,null);try{u.replaceChild(y,p)}catch(g){if(typeof g=="object"&&g!=null){const b=`${g.toString()} Parent: ${u.tagName}, new child: {tag: ${y.tagName} key: ${h}}, old child: {tag: ${p.tagName}, key: ${d}}.`;throw new Error(b)}throw g}T1(d,null)}const f=Qs.get(h);We(f)&&mo===null&&(mo=f.getFormat(),tu=f.getStyle())}else{const d=E1(r,Wh),h=E1(i,Qs);if(d.length!==c&&ze(227),h.length!==l&&ze(228),c===0)l!==0&&WS(h,0,0,l-1,a);else if(l===0){if(c!==0){const f=a.after==null&&a.before==null&&a.element.__lexicalLineBreak==null;LS(d,0,c-1,f?null:u),f&&(u.textContent="")}}else(function(f,p,y,g,b,v){const x=g-1,w=b-1;let _,T,S=v.getFirstChild(),C=0,D=0;for(;C<=x&&D<=w;){const F=p[C],L=y[D];if(F===L)S=Iw(t1(L,v.element)),C++,D++;else{if(T===void 0&&(T=UA(y,D)),_===void 0)_=UA(p,C);else if(!_.has(F)){C++;continue}if(!T.has(F)){S=Iw(jS(F)),T1(F,v.element),C++,_.delete(F);continue}if(_.has(L)){const X=Up(Nr,L);X!==S&&v.withBefore(S).insertChild(X),S=Iw(t1(L,v.element)),C++,D++}else S1(L,v.withBefore(S)),D++}const A=Qs.get(L);A!==null&&We(A)?mo===null&&(mo=A.getFormat(),tu=A.getStyle()):Fe(A)&&D<=w&&!A.isInline()&&(er+=Pv)}const N=C>x,M=D>w;if(N&&!M){const F=y[w+1],L=F===void 0?null:Nr.getElementByKey(F);WS(y,0,D,w,v.withBefore(L))}else M&&!N&&LS(p,C,x,v.element)})(0,d,h,c,l,a)}u.__lexicalTextContent=er,er=o+er})(s,e,e.getDOMSlot(t)),n=e,mo==null||mo===n.__textFormat||_1||n.setTextFormat(mo),(function(r){tu==null||tu===r.__textStyle||_1||r.setTextStyle(tu)})(e)}function E1(s,e){const t=[];let n=s.__first;for(;n!==null;){const r=e.get(n);r===void 0&&ze(101),t.push(n),n=r.__next}return t}function t1(s,e){const t=Wh.get(s);let n=Qs.get(s);t!==void 0&&n!==void 0||ze(61);const r=Ad||PS.has(s)||MS.has(s),i=Up(Nr,s);if(t===n&&!r){let a;if(Fe(t)){const o=i.__lexicalTextContent;
277typeof o=="string"?a=o:(a=t.getTextContent(),i.__lexicalTextContent=a)}else a=t.getTextContent();return er+=a,i}if(t!==n&&r&&uD(om,sm,Ov,n,"updated"),n.updateDOM(t,i,Bh)){const a=S1(s,null);return e===null&&ze(62),e.replaceChild(a,i),T1(s,null),a}if(Fe(t)){Fe(n)||ze(334,s);const a=n.__indent;(Ad||a!==t.__indent)&&mU(i,a);const o=n.__format;if((Ad||o!==t.__format)&&yU(i,o),r)eO(t,n,i),Vn(n)||n.isInline()||bU(t,n,i);else{const c=i.__lexicalTextContent;let l;typeof c=="string"?l=c:(l=t.getTextContent(),i.__lexicalTextContent=l),er+=l}if((Ad||n.__dir!==t.__dir)&&(BS(i,n),Vn(n)&&!Ad))for(const c of n.getChildren())Fe(c)&&BS(Up(Nr,c.getKey()),c)}else{const a=n.getTextContent();if(Pt(n)){const o=n.decorate(Nr,Bh);o!==null&&vU(s,o)}er+=a}if(!_1&&Vn(n)&&n.__cachedText!==er){const a=n.getWritable();a.__cachedText=er,n=a}return i}function vU(s,e){let t=Nr._pendingDecorators;const n=Nr._decorators;if(t===null){if(n[s]===e)return;t=hR(Nr)}t[s]=e}function Iw(s){let e=s.nextSibling;return e!==null&&e===Nr._blockCursorElement&&(e=e.nextSibling),e}function UA(s,e){const t=new Set;for(let n=e;n<s.length;n++)t.add(s[n]);return t}function tO(s,e,t,n,r,i){er="",Ad=n===2,Nr=t,Bh=t._config,sm=t._nodes,Ov=Nr._listeners.mutation,MS=r,PS=i,Wh=s._nodeMap,Qs=e._nodeMap,_1=e._readOnly,OS=new Map(t._keyToDOMMap);const a=new Map;return om=a,t1("root",null),Nr=void 0,sm=void 0,MS=void 0,PS=void 0,Wh=void 0,Qs=void 0,Bh=void 0,OS=void 0,om=void 0,a}function jS(s){const e=OS.get(s);return e===void 0&&ze(75,s),e}function lt(s){return{type:s}}const ec=lt("SELECTION_CHANGE_COMMAND"),wU=lt("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),HE=lt("CLICK_COMMAND"),xU=lt("BEFORE_INPUT_COMMAND"),_U=lt("INPUT_COMMAND"),TU=lt("COMPOSITION_START_COMMAND"),SU=lt("COMPOSITION_END_COMMAND"),ic=lt("DELETE_CHARACTER_COMMAND"),Hd=lt("INSERT_LINE_BREAK_COMMAND"),jh=lt("INSERT_PARAGRAPH_COMMAND"),Fh=lt("CONTROLLED_TEXT_INSERTION_COMMAND"),cb=lt("PASTE_COMMAND"),zS=lt("REMOVE_TEXT_COMMAND"),kp=lt("DELETE_WORD_COMMAND"),zh=lt("DELETE_LINE_COMMAND"),qi=lt("FORMAT_TEXT_COMMAND"),Lv=lt("UNDO_COMMAND"),Bv=lt("REDO_COMMAND"),$E=lt("KEYDOWN_COMMAND"),KE=lt("KEY_ARROW_RIGHT_COMMAND"),nO=lt("MOVE_TO_END"),XE=lt("KEY_ARROW_LEFT_COMMAND"),rO=lt("MOVE_TO_START"),VE=lt("KEY_ARROW_UP_COMMAND"),GE=lt("KEY_ARROW_DOWN_COMMAND"),Np=lt("KEY_ENTER_COMMAND"),EU=lt("KEY_SPACE_COMMAND"),Wv=lt("KEY_BACKSPACE_COMMAND"),qE=lt("KEY_ESCAPE_COMMAND"),YE=lt("KEY_DELETE_COMMAND"),td=lt("KEY_TAB_COMMAND"),DU=lt("INSERT_TAB_COMMAND"),D1=lt("INDENT_CONTENT_COMMAND"),HS=lt("OUTDENT_CONTENT_COMMAND"),ZE=lt("DROP_COMMAND"),cu=lt("FORMAT_ELEMENT_COMMAND"),CU=lt("DRAGSTART_COMMAND"),JE=lt("DRAGOVER_COMMAND"),iO=lt("DRAGEND_COMMAND"),jv=lt("COPY_COMMAND"),zv=lt("CUT_COMMAND"),C1=lt("SELECT_ALL_COMMAND"),sO=lt("CLEAR_EDITOR_COMMAND"),oO=lt("CLEAR_HISTORY_COMMAND"),Ib=lt("CAN_REDO_COMMAND"),Mb=lt("CAN_UNDO_COMMAND"),AU=lt("FOCUS_COMMAND"),kU=lt("BLUR_COMMAND"),aO=lt("KEY_MODIFIER_COMMAND"),oa=Object.freeze({}),$S=[["keydown",function(s,e){am=s.timeStamp,NU=s.key,!e.isComposing()&&Je(e,$E,s)}],["pointerdown",function(s,e){const t=s.target,n=s.pointerType;Jo(t)&&n!=="touch"&&n!=="pen"&&s.button===0&&Go(e,()=>{sR(t)||(VS=!0)})}],["compositionstart",function(s,e){Je(e,TU,s)}],["compositionend",function(s,e){Dl?Bg=!0:ab||!Iv&&!Mv?Je(e,SU,s):(n1=!0,r1=s.data)}],["input",function(s,e){s.stopPropagation(),Go(e,()=>{e.dispatchCommand(_U,s)},{event:s}),kd=null}],["click",function(s,e){Go(e,()=>{const t=Oe(),n=Hr(Qi(e)),r=Yi();if(n){if(Ie(t)){const i=t.anchor,a=i.getNode();if(i.type==="element"&&i.offset===0&&t.isCollapsed()&&!Vn(a)&&$t().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&r!==null&&t.is(r))n.removeAllRanges(),t.dirty=!0;else if(s.detail===3&&!t.isCollapsed()&&a!==t.focus.getNode()){const o=St(a,c=>Fe(c)&&!c.isInline());Fe(o)&&o.select(0)}}else if(s.pointerType==="touch"||s.pointerType==="pen"){const i=n.anchorNode;(mn(i)||gc(i))&&Yt($v(r,n,e,s))}}Je(e,HE,s)})}],["cut",oa],["copy",oa],["dragstart",oa],["dragover",oa],["dragend",oa],["paste",oa],["focus",oa],["blur",oa],["drop",oa]];x1&&$S.push(["beforeinput",(s,e)=>(function(t,n){const r=t.inputType;r==="deleteCompositionText"||Dl&&mR(n)||r!=="insertCompositionText"&&Je(n,xU,t)})(s,e)]);let am=0,NU=null,FU=0,kd=null;const KS=new WeakMap,A1=new WeakMap;let XS=!1,VS=!1,Hg=!1,Bg=!1,n1=!1,r1="",nu=null,UU=[0,"",0,"root",0];function RU(s,e,t,n,r){const i=s.anchor,a=s.focus,o=i.getNode(),c=hn(),l=Hr(Qi(c)),u=l!==null?l.anchorNode:null,d=i.key,h=c.getElementByKey(d),f=t.length;return d!==a.key||!We(o)||(!r&&(!x1||FU<n+50)||o.isDirty()&&f<2||fR(t))&&i.offset!==a.offset&&!o.isComposing()||bo(o)||o.isDirty()&&f>1||(r||!x1)&&h!==null&&!o.isComposing()&&u!==Fp(h)||l!==null&&e!==null&&(!e.collapsed||e.startContainer!==l.anchorNode||e.startOffset!==l.anchorOffset)||!o.isComposing()&&(o.getFormat()!==s.format||o.getStyle()!==s.style)||(function(p,y){if
277(y.isSegmented())return!0;if(!p.isCollapsed())return!1;const g=p.anchor.offset,b=y.getParentOrThrow(),v=Uh(y);return g===0?!y.canInsertTextBefore()||!b.canInsertTextBefore()&&!y.isComposing()||v||(function(x){const w=x.getPreviousSibling();return(We(w)||Fe(w)&&w.isInline())&&!w.canInsertTextAfter()})(y):g===y.getTextContentSize()&&(!y.canInsertTextAfter()||!b.canInsertTextAfter()&&!y.isComposing()||v)})(s,o)}function RA(s,e){return gc(s)&&s.nodeValue!==null&&e!==0&&e!==s.nodeValue.length}function IA(s,e,t){const{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=s;XS&&(XS=!1,RA(n,r)&&RA(i,a)&&!nu)||Go(e,()=>{if(!t)return void Yt(null);if(!hb(e,n,i))return;let o=Oe();if(nu&&Ie(o)&&o.isCollapsed()){const c=o.anchor,l=nu.anchor;(c.key===l.key&&c.offset===l.offset+1||c.offset===1&&l.getNode().is(c.getNode().getPreviousSibling()))&&(o=nu.clone(),Yt(o))}if(nu=null,Ie(o)){const c=o.anchor,l=c.getNode();if(o.isCollapsed()){s.type==="Range"&&s.anchorNode===s.focusNode&&(o.dirty=!0);const u=Qi(e).event,d=u?u.timeStamp:performance.now(),[h,f,p,y,g]=UU,b=$t(),v=e.isComposing()===!1&&b.getTextContent()==="";if(d<g+200&&c.offset===p&&c.key===y)i1(o,h,f);else if(c.type==="text")We(l)||ze(141),IU(o,l);else if(c.type==="element"&&!v){Fe(l)||ze(259);const x=c.getNode();x.isEmpty()?(function(w,_){const T=_.getTextFormat(),S=_.getTextStyle();i1(w,T,S)})(o,x):i1(o,o.format,"")}}else{const u=c.key,d=o.focus.key,h=o.getNodes(),f=h.length,p=o.isBackward(),y=p?a:r,g=p?r:a,b=p?d:u,v=p?u:d;let x=2047,w=!1;for(let _=0;_<f;_++){const T=h[_],S=T.getTextContentSize();if(We(T)&&S!==0&&!(_===0&&T.__key===b&&y===S||_===f-1&&T.__key===v&&g===0)&&(w=!0,x&=T.getFormat(),x===0))break}o.format=w?x:0}}Je(e,ec,void 0)})}function i1(s,e,t){s.format===e&&s.style===t||(s.format=e,s.style=t,s.dirty=!0)}function IU(s,e){i1(s,e.getFormat(),e.getStyle())}function MU(s){if(!s.getTargetRanges)return null;const e=s.getTargetRanges();return e.length===0?null:e[0]}function cO(s){const e=s.inputType,t=MU(s),n=hn(),r=Oe();if(e==="deleteContentBackward"){if(r===null){const d=Yi();if(!Ie(d))return!0;Yt(d.clone())}if(Ie(r)){const d=r.anchor.key===r.focus.key;if(i=s.timeStamp,NU==="MediaLast"&&i<am+30&&n.isComposing()&&d){if(Cr(null),am=0,setTimeout(()=>{Go(n,()=>{Cr(null)})},30),Ie(r)){const h=r.anchor.getNode();h.markDirty(),We(h)||ze(142),IU(r,h)}}else{Cr(null),s.preventDefault();const h=r.anchor.getNode(),f=h.getTextContent(),p=h.canInsertTextAfter(),y=r.anchor.offset===0&&r.focus.offset===f.length;let g=US&&d&&!y&&p;if(g&&r.isCollapsed()&&(g=!Pt(JS(r.anchor,!0))),!g){Je(n,ic,!0);const b=Oe();US&&Ie(b)&&b.isCollapsed()&&(nu=b,setTimeout(()=>nu=null))}}return!0}}var i;if(!Ie(r))return!0;const a=s.data;kd!==null&&cD(!1,n,kd),r.dirty&&kd===null||!r.isCollapsed()||Vn(r.anchor.getNode())||t===null||r.applyDOMRange(t),kd=null;const o=r.anchor,c=r.focus,l=o.getNode(),u=c.getNode();if(e==="insertText"||e==="insertTranspose"){if(a===` 278`)s.preventDefault(),Je(n,Hd,!1);else if(a===Pv)s.preventDefault(),Je(n,jh,void 0);else if(a==null&&s.dataTransfer){const d=s.dataTransfer.getData("text/plain");s.preventDefault(),r.insertRawText(d)}else a!=null&&RU(r,t,a,s.timeStamp,!0)?(s.preventDefault(),Je(n,Fh,a)):kd=a;return FU=s.timeStamp,!0}switch(s.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Je(n,Fh,s);break;case"insertFromComposition":Cr(null),Je(n,Fh,s);break;case"insertLineBreak":Cr(null),Je(n,Hd,!1);break;case"insertParagraph":Cr(null),Hg&&!ab?(Hg=!1,Je(n,Hd,!1)):Je(n,jh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Je(n,cb,s);break;case"deleteByComposition":(function(d,h){return d!==h||Fe(d)||Fe(h)||!Uh(d)||!Uh(h)})(l,u)&&Je(n,zS,s);break;case"deleteByDrag":case"deleteByCut":Je(n,zS,s);break;case"deleteContent":Je(n,ic,!1);break;case"deleteWordBackward":Je(n,kp,!0);break;
278case"deleteWordForward":Je(n,kp,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Je(n,zh,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Je(n,zh,!1);break;case"formatStrikeThrough":Je(n,qi,"strikethrough");break;case"formatBold":Je(n,qi,"bold");break;case"formatItalic":Je(n,qi,"italic");break;case"formatUnderline":Je(n,qi,"underline");break;case"historyUndo":Je(n,Lv,void 0);break;case"historyRedo":Je(n,Bv,void 0)}return!0}function lO(s){if(mn(s.target)&&sR(s.target))return!0;const e=hn(),t=Oe(),n=s.data,r=MU(s);if(n!=null&&Ie(t)&&RU(t,r,n,s.timeStamp,!1)){Bg&&(k1(e,n),Bg=!1);const i=t.anchor.getNode(),a=Hr(Qi(e));if(a===null)return!0;const o=t.isBackward(),c=o?t.anchor.offset:t.focus.offset,l=o?t.focus.offset:t.anchor.offset;x1&&!t.isCollapsed()&&We(i)&&a.anchorNode!==null&&i.getTextContent().slice(0,c)+n+i.getTextContent().slice(c+l)===gR(a.anchorNode)||Je(e,Fh,n);const u=n.length;Dl&&u>1&&s.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=u),US&&e.isComposing()&&(am=0,Cr(null))}else cD(!1,e,n!==null?n:void 0),Bg&&(k1(e,n||void 0),Bg=!1);return(function(){Dr();const i=hn();hU(i)})(),!0}function uO(s){const e=hn(),t=Oe();if(Ie(t)&&!e.isComposing()){const n=t.anchor,r=t.anchor.getNode();Cr(n.key),xl(BU),(s.timeStamp<am+30||n.type==="element"||!t.isCollapsed()||r.getFormat()!==t.format||We(r)&&r.getStyle()!==t.style)&&Je(e,Fh,jE)}return!0}function hO(s){return k1(hn(),s.data),xl(WU),!0}function k1(s,e){const t=s._compositionKey;if(Cr(null),t!==null&&e!=null){if(e===""){const n=ft(t),r=Fp(s.getElementByKey(t));if(r!==null&&r.nodeValue!==null&&We(n)){const i=Hr(Qi(s));let a=null,o=null;i!==null&&i.anchorNode===r&&(a=i.anchorOffset,o=i.focusOffset),lD(n,r.nodeValue,a,o,!0)}return}if(e[e.length-1]===` 279`){const n=Oe();if(Ie(n)||yi(n)){if(Ie(n)){const r=n.focus;n.anchor.set(r.key,r.offset,r.type)}return void Je(s,Np,null)}}}cD(!0,s,e)}function dO(s){const e=hn();if(s.key==null)return!0;if(n1){if(a2(s))return Go(e,()=>{k1(e,r1)}),n1=!1,r1="",!0;n1=!1,r1=""}if((function(t){return Xt(t,"ArrowRight",{shiftKey:"any"})})(s))Je(e,KE,s);else if((function(t){return Xt(t,"ArrowRight",pa)})(s))Je(e,nO,s);else if((function(t){return Xt(t,"ArrowLeft",{shiftKey:"any"})})(s))Je(e,XE,s);else if((function(t){return Xt(t,"ArrowLeft",pa)})(s))Je(e,rO,s);else if((function(t){return Xt(t,"ArrowUp",{altKey:"any",shiftKey:"any"})})(s))Je(e,VE,s);else if((function(t){return Xt(t,"ArrowDown",{altKey:"any",shiftKey:"any"})})(s))Je(e,GE,s);else if((function(t){return Xt(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(s))Hg=!0,Je(e,Np,s);else if((function(t){return t.key===" "})(s))Je(e,EU,s);else if((function(t){return qs&&Xt(t,"o",{ctrlKey:!0})})(s))s.preventDefault(),Hg=!0,Je(e,Hd,!0);else if((function(t){return Xt(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(s))Hg=!1,Je(e,Np,s);else if((function(t){return Xt(t,"Backspace",{shiftKey:"any"})||qs&&Xt(t,"h",{ctrlKey:!0})})(s))a2(s)?Je(e,Wv,s):(s.preventDefault(),Je(e,ic,!0));else if((function(t){return t.key==="Escape"})(s))Je(e,qE,s);else if((function(t){return Xt(t,"Delete",{})||qs&&Xt(t,"d",{ctrlKey:!0})})(s))(function(t){return t.key==="Delete"})(s)?Je(e,YE,s):(s.preventDefault(),Je(e,ic,!1));else if((function(t){return Xt(t,"Backspace",o2)})(s))s.preventDefault(),Je(e,kp,!0);else if((function(t){return Xt(t,"Delete",o2)})(s))s.preventDefault(),Je(e,kp,!1);else if((function(t){return qs&&Xt(t,"Backspace",{metaKey:!0})})(s))s.preventDefault(),Je(e,zh,!0);else if((function(t){return qs&&(Xt(t,"Delete",{metaKey:!0})||Xt(t,"k",{ctrlKey:!0}))})(s))s.preventDefault(),Je(e,zh,!1);else if((function(t){return Xt(t,"b",pa)})(s))s.preventDefault(),Je(e,qi,"bold");else if((function(t){return Xt(t,"u",pa)})(s))s.preventDefault(),Je(e,qi,"underline");else if((function(t){return Xt(t,"i",pa)})(s))s.preventDefault(),Je(e,qi,"italic");else if((function(t){return Xt(t,"Tab",{shiftKey:"any"})})(s))Je(e,td,s);else if((function(t){return Xt(t,"z",pa)})(s))s.preventDefault(),Je(e,Lv,void 0);else if((function(t){return qs?Xt(t,"z",{metaKey:!0,shiftKey:!0}):Xt(t,"y",{ctrlKey:!0})||Xt(t,"z",{ctrlKey:!0,shiftKey:!0})})(s))s.preventDefault(),Je(e,Bv,void 0);else{const t=e._editorState._selection;t===null||Ie(t)?c2(s)&&(s.preventDefault(),Je(e,C1,s)):(function(n){return Xt(n,"c",pa)})(s)?(s.preventDefault(),Je(e,jv,s)):(function(n){return Xt(n,"x",pa)})(s)?(s.preventDefault(),Je(e,zv,s)):c2(s)&&(s.preventDefault(),Je(e,C1,s))}return(function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey})(s)&&e.dispatchCommand(aO,s),!0}function PU(s){let e=s.__lexicalEventHandles;return e===void 0&&(e=[],s.__lexicalEventHandles=e),e}const $d=new Map;function OU(s){const e=HO(s.target);if(e===null)return;const t=oR(e.anchorNode);
279if(t===null)return;VS&&(VS=!1,Go(t,()=>{const c=Yi(),l=e.anchorNode;(mn(l)||gc(l))&&Yt($v(c,e,t,s))}));const n=aD(t),r=n[n.length-1],i=r._key,a=$d.get(i),o=a||r;o!==t&&IA(e,o,!1),IA(e,t,!0),t!==r?$d.set(i,t):a&&$d.delete(i)}function MA(s){s._lexicalHandled=!0}function PA(s){return s._lexicalHandled===!0}function fO(s){const e=KS.get(s);if(e===void 0)return;const t=A1.get(e);if(t===void 0)return;const n=t-1;n>=0||ze(164),KS.delete(s),A1.set(e,n),n===0&&e.removeEventListener("selectionchange",OU);const r=Xv(s);oD(r)?((function(a){if(a._parentEditor!==null){const o=aD(a),c=o[o.length-1]._key;$d.get(c)===a&&$d.delete(c)}else $d.delete(a._key)})(r),s.__lexicalEditor=null):r&&ze(198);const i=PU(s);for(let a=0;a<i.length;a++)i[a]();s.__lexicalEventHandles=[]}function GS(s,e,t){Dr();const n=s.__key,r=s.getParent();if(r===null)return;const i=(function(o){const c=Oe();if(!Ie(c)||!Fe(o))return c;const{anchor:l,focus:u}=c,d=l.getNode(),h=u.getNode();return QS(d,o)&&l.set(o.__key,0,"element"),QS(h,o)&&u.set(o.__key,0,"element"),c})(s);let a=!1;if(Ie(i)&&e){const o=i.anchor,c=i.focus;o.key===n&&(R1(o,s,r,s.getPreviousSibling(),s.getNextSibling()),a=!0),c.key===n&&(R1(c,s,r,s.getPreviousSibling(),s.getNextSibling()),a=!0)}else yi(i)&&e&&s.isSelected()&&s.selectPrevious();if(Ie(i)&&e&&!a){const o=s.getIndexWithinParent();Rh(s),U1(i,r,o,-1)}else Rh(s);t||ri(r)||r.canBeEmpty()||!r.isEmpty()||GS(r,e),e&&i&&Vn(r)&&r.isEmpty()&&r.selectEnd()}const LU=Symbol.for("ephemeral");function N1(s){return s[LU]||!1}class eo{constructor(e){be(this,"__type");be(this,"__key");be(this,"__parent");be(this,"__prev");be(this,"__next");be(this,"__state");this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),lR(this,e)}static getType(){const{ownNodeType:e}=Gv(this);return e===void 0&&ze(64,this.name),e}static clone(e){ze(65,this.name)}$config(){return{}}config(e,t){const n=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:n,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&(this.__state=this.__state.getWritable(this).resetOnCopyNode())}getType(){return this.__type}isInline(){ze(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=ft(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){const t=e||Oe();if(t==null)return!1;const n=t.getNodes().some(r=>r.__key===this.__key);if(We(this))return n;if(Ie(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const r=this.getParent();if(Pt(this)&&this.isInline()&&r){const i=t.isBackward()?t.focus:t.anchor;if(r.is(i.getNode())&&i.offset===r.getChildrenSize()&&this.is(r.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:ft(e)}getParentOrThrow(){const e=this.getParent();return e===null&&ze(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(ri(t))return Fe(e)||e===this&&Pt(e)||ze(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&ze(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:ft(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(t===null)return e;let n=t.getFirstChild();for(;n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:ft(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=Fe(this)?this:this.getParent(),n=Fe(e)?e:e.getParent(),r=t&&n?o1(t,n):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const t=o1(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?xR(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&ze(279),!1)))}isParentOf(e){const t=o1(this,e);return t!==null&&t.type==="ancestor"}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let i=this;for(;i!==null;){const a=i.__key;if(r.has(a)||(r.add(a),n.push(i)),i===e)break;const o=Fe(i)?t?i.getFirstChild():i.getLastChild():null;if(o!==null){i=o;continue}const c=t?i.getNextSibling():i.getPreviousSibling();if(c!==null){i=c;continue}const l=i.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let u=null,d=l;do{if(d===null&&ze(68),u=t?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||r.has(d.__key)||n.push(d)}while(u===null);i=u}return t||n.reverse(),n}isDirty(){const e=hn()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(N1(this))return this;const e=ft(this.__key);return e===null&&ze(113),e}getWritable(){if(N1(this))return this;Dr();const e=Ol(),t=hn(),n=e._nodeMap,r=this.__key,i=this.getLatest(),a=t._cloneNotNeeded,o=Oe();if(o!==null&&o.setCachedNodes(null),a.has(r))return P1(i),i;const c=bR(i);return a.add(r),P1(c),n.set(r,c),c}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){ze(70)}
279updateDOM(e,t,n){ze(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){ze(18,this.name)}updateFromJSON(e){return(function(t,n){const r=t.getWritable(),i=n.$;let a=i;for(const o of gU(r).flatKeys)o in n&&(a!==void 0&&a!==i||(a={...i}),a[o]=n[o]);return(r.__state||a)&&pU(t).updateFromJSON(a),r})(this,e)}static transform(){return null}remove(e){GS(this,!0,e)}replace(e,t){Dr();let n=Oe();n!==null&&(n=n.clone()),Ww(this,e);const r=this.getLatest(),i=this.__key,a=e.__key,o=e.getWritable(),c=this.getParentOrThrow().getWritable(),l=c.__size;Rh(o);const u=r.getPreviousSibling(),d=r.getNextSibling(),h=r.__prev,f=r.__next,p=r.__parent;if(GS(r,!1,!0),u===null?c.__first=a:u.getWritable().__next=a,o.__prev=h,d===null?c.__last=a:d.getWritable().__prev=a,o.__next=f,o.__parent=p,c.__size=l,t&&(Fe(this)&&Fe(o)||ze(139),this.getChildren().forEach(y=>{o.append(y)})),Ie(n)){Yt(n);const y=n.anchor,g=n.focus;y.key===i&&jA(y,o),g.key===i&&jA(g,o)}return ml()===i&&Cr(a),o}insertAfter(e,t=!0){Dr(),Ww(this,e);const n=this.getWritable(),r=e.getWritable(),i=r.getParent(),a=Oe();let o=!1,c=!1;if(i!==null){const f=e.getIndexWithinParent();if(Rh(r),Ie(a)){const p=i.__key,y=a.anchor,g=a.focus;o=y.type==="element"&&y.key===p&&y.offset===f+1,c=g.type==="element"&&g.key===p&&g.offset===f+1}}const l=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=r.__key,h=n.__next;if(l===null?u.__last=d:l.getWritable().__prev=d,u.__size++,n.__next=d,r.__next=h,r.__prev=n.__key,r.__parent=n.__parent,t&&Ie(a)){const f=this.getIndexWithinParent();U1(a,u,f+1);const p=u.__key;o&&a.anchor.set(p,f+2,"element"),c&&a.focus.set(p,f+2,"element")}return e}insertBefore(e,t=!0){Dr(),Ww(this,e);const n=this.getWritable(),r=e.getWritable(),i=r.__key;Rh(r);const a=this.getPreviousSibling(),o=this.getParentOrThrow().getWritable(),c=n.__prev,l=this.getIndexWithinParent();a===null?o.__first=i:a.getWritable().__next=i,o.__size++,n.__prev=i,r.__prev=c,r.__next=n.__key,r.__parent=n.__parent;const u=Oe();return t&&Ie(u)&&U1(u,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return ct()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Dr();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(n===null)return r.select(0,0);if(Fe(n))return n.select();if(!We(n)){const i=n.getIndexWithinParent()+1;return r.select(i,i)}return n.select(e,t)}selectNext(e,t){Dr();const n=this.getNextSibling(),r=this.getParentOrThrow();if(n===null)return r.select();if(Fe(n))return n.select(0,0);if(!We(n)){const i=n.getIndexWithinParent();return r.select(i,i)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}be(eo,"importDOM");const qS="historic",pO="history-push",sc="history-merge",gO="paste",mO="collaboration",yO="skip-scroll-into-view",bO="skip-dom-selection",OA="skip-selection-focus",BU="composition-start",WU="composition-end";class zp extends eo{static getType(){return"linebreak"}static clone(e){return new zp(e.__key)}constructor(e){super(e)}getTextContent(){return` 280`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(t){const n=t.parentElement;if(n!==null&&O1(n)){const r=n.firstChild;if(r===t||r.nextSibling===t&&Pb(r)){const i=n.lastChild;if(i===t||i.previousSibling===t&&Pb(i))return!0}}return!1})(e)||(function(t){const n=t.parentElement;if(n!==null&&O1(n)){const r=n.firstChild;if(r===t||r.nextSibling===t&&Pb(r))return!1;const i=n.lastChild;if(i===t||i.previousSibling===t&&Pb(i))return!0}return!1})(e)?null:{conversion:vO,priority:0}}}static importJSON(e){return Hh().updateFromJSON(e)}}function vO(s){return{node:Hh()}}function Hh(){return Ds(new zp)}function wl(s){return s instanceof zp}function Pb(s){return gc(s)&&/^( |\t|\r?\n)+$/.test(s.textContent||"")}function Mw(s,e){return 16&e?"code":e&cU?"mark":32&e?"sub":64&e?"sup":null}function Pw(s,e){return 1&e?"strong":2&e?"em":"span"}function jU(s,e,t,n,r){const i=n.classList;let a=Kd(r,"base");a!==void 0&&i.add(...a),a=Kd(r,"underlineStrikethrough");let o=!1;const c=8&e&&4&e;a!==void 0&&(8&t&&4&t?(o=!0,c||i.add(...a)):c&&i.remove(...a));for(const l in Cl){const u=Cl[l];
280if(a=Kd(r,l),a!==void 0)if(t&u){if(o&&(l==="underline"||l==="strikethrough")){e&u&&i.remove(...a);continue}((e&u)===0||c&&l==="underline"||l==="strikethrough")&&i.add(...a)}else e&u&&i.remove(...a)}}function zU(s,e,t){const n=e.firstChild,r=t.isComposing(),i=s+(r?im:"");if(n==null)e.textContent=i;else{const a=n.nodeValue;if(a!==i)if(r||Dl){const[o,c,l]=(function(u,d){const h=u.length,f=d.length;let p=0,y=0;for(;p<h&&p<f&&u[p]===d[p];)p++;for(;y+p<h&&y+p<f&&u[h-y-1]===d[f-y-1];)y++;return[p,h-p-y,d.slice(p,f-y)]})(a,i);c!==0&&n.deleteData(o,c),n.insertData(o,l)}else n.nodeValue=i}}function LA(s,e,t,n,r,i){zU(r,s,e);const a=i.theme.text;a!==void 0&&jU(0,0,n,s,a)}function Ob(s,e){const t=document.createElement(e);return t.appendChild(s),t}class Ml extends eo{constructor(t="",n){super(n);be(this,"__text");be(this,"__format");be(this,"__style");be(this,"__mode");be(this,"__detail");this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}static getType(){return"text"}static clone(t){return new Ml(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return $P[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ml()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const n=Cl[t];return(this.getFormat()&n)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){return M1(this.getLatest().__format,t,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,n){const r=this.__format,i=Mw(0,r),a=Pw(0,r),o=i===null?a:i,c=document.createElement(o);let l=c;this.hasFormat("code")&&c.setAttribute("spellcheck","false"),i!==null&&(l=document.createElement(a),c.appendChild(l)),LA(l,this,0,r,this.__text,t);const u=this.__style;return u!==""&&(c.style.cssText=u),c}updateDOM(t,n,r){const i=this.__text,a=t.__format,o=this.__format,c=Mw(0,a),l=Mw(0,o),u=Pw(0,a),d=Pw(0,o);if((c===null?u:c)!==(l===null?d:l))return!0;if(c===l&&u!==d){const g=n.firstChild;g==null&&ze(48);const b=document.createElement(d);return LA(b,this,0,o,i,r),n.replaceChild(b,g),!1}let h=n;l!==null&&c!==null&&(h=n.firstChild,h==null&&ze(49)),zU(i,h,this);const f=r.theme.text;f!==void 0&&a!==o&&jU(0,a,o,h,f);const p=t.__style,y=this.__style;return p!==y&&(n.style.cssText=y),!1}static importDOM(){return{"#text":()=>({conversion:TO,priority:0}),b:()=>({conversion:xO,priority:0}),code:()=>({conversion:aa,priority:0}),em:()=>({conversion:aa,priority:0}),i:()=>({conversion:aa,priority:0}),mark:()=>({conversion:aa,priority:0}),s:()=>({conversion:aa,priority:0}),span:()=>({conversion:wO,priority:0}),strong:()=>({conversion:aa,priority:0}),sub:()=>({conversion:aa,priority:0}),sup:()=>({conversion:aa,priority:0}),u:()=>({conversion:aa,priority:0})}}static importJSON(t){return wn().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:n}=super.exportDOM(t);return mn(n)||ze(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Ob(n,"b")),this.hasFormat("italic")&&(n=Ob(n,"i")),this.hasFormat("strikethrough")&&(n=Ob(n,"s")),this.hasFormat("underline")&&(n=Ob(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,n){}setFormat(t){const n=this.getWritable();return n.__format=typeof t=="string"?Cl[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?jP[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=M1(this.getFormat(),t,null);return this.setFormat(n)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const n=HP[t];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(t){if(this.__text===t)return this;const n=this.getWritable();return n.__text=t,n}select(t,n){Dr();let r=t,i=n;const a=Oe(),o=this.getTextContent(),c=this.__key;
280if(typeof o=="string"){const l=o.length;r===void 0&&(r=l),i===void 0&&(i=l)}else r=0,i=0;if(!Ie(a))return XU(c,r,c,i,"text","text");{const l=ml();l!==a.anchor.key&&l!==a.focus.key||Cr(c),a.setTextNodeRange(this,r,this,i)}return a}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,n,r,i){const a=this.getWritable(),o=a.__text,c=r.length;let l=t;l<0&&(l=c+l,l<0&&(l=0));const u=Oe();if(i&&Ie(u)){const h=t+c;u.setTextNodeRange(a,h,a,h)}const d=o.slice(0,l)+r+o.slice(l+n);return a.__text=d,a}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Dr();const n=this.getLatest(),r=n.getTextContent();if(r==="")return[];const i=n.__key,a=ml(),o=r.length;t.sort((D,N)=>D-N),t.push(o);const c=[],l=t.length;for(let D=0,N=0;D<o&&N<=l;N++){const M=t[N];M>D&&(c.push(r.slice(D,M)),D=M)}const u=c.length;if(u===1)return[n];const d=c[0],h=n.getParent();let f;const p=n.getFormat(),y=n.getStyle(),g=n.__detail;let b=!1,v=null,x=null;const w=Oe();if(Ie(w)){const[D,N]=w.isBackward()?[w.focus,w.anchor]:[w.anchor,w.focus];D.type==="text"&&D.key===i&&(v=D),N.type==="text"&&N.key===i&&(x=N)}n.isSegmented()?(f=wn(d),f.__format=p,f.__style=y,f.__detail=g,f.__state=DA(n,f),b=!0):f=n.setTextContent(d);const _=[f];for(let D=1;D<u;D++){const N=wn(c[D]);N.__format=p,N.__style=y,N.__detail=g,N.__state=DA(n,N);const M=N.__key;a===i&&Cr(M),_.push(N)}const T=v?v.offset:null,S=x?x.offset:null;let C=0;for(const D of _){if(!v&&!x)break;const N=C+D.getTextContentSize();if(v!==null&&T!==null&&T<=N&&T>=C&&(v.set(D.getKey(),T-C,"text"),T<N&&(v=null)),x!==null&&S!==null&&S<=N&&S>=C){x.set(D.getKey(),S-C,"text");break}C=N}if(h!==null){(function(M){const F=M.getPreviousSibling(),L=M.getNextSibling();F!==null&&P1(F),L!==null&&P1(L)})(this);const D=h.getWritable(),N=this.getIndexWithinParent();b?(D.splice(N,0,_),this.remove()):D.splice(N,1,_),Ie(w)&&U1(w,h,N,u-1)}return _}mergeWithSibling(t){const n=t===this.getPreviousSibling();n||t===this.getNextSibling()||ze(50);const r=this.__key,i=t.__key,a=this.__text,o=a.length;ml()===i&&Cr(r);const c=Oe();if(Ie(c)){const h=c.anchor,f=c.focus;h!==null&&h.key===i&&GA(h,n,r,t,o),f!==null&&f.key===i&&GA(f,n,r,t,o)}const l=t.__text,u=n?l+a:a+l;this.setTextContent(u);const d=this.getWritable();return t.remove(),d}isTextEntity(){return!1}}function wO(s){return{forChild:QE(s.style),node:null}}function xO(s){const e=s,t=e.style.fontWeight==="normal";return{forChild:QE(e.style,t?void 0:"bold"),node:null}}const BA=new WeakMap;function _O(s){if(!mn(s))return!1;if(s.nodeName==="PRE")return!0;const e=s.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function TO(s){const e=s;s.parentElement===null&&ze(129);let t=e.textContent||"";if((function(n){let r,i=n.parentNode;const a=[n];for(;i!==null&&(r=BA.get(i))===void 0&&!_O(i);)a.push(i),i=i.parentNode;const o=r===void 0?i:r;for(let c=0;c<a.length;c++)BA.set(a[c],o);return o}
280)(e)!==null){const n=t.split(/(\r?\n|\t)/),r=[],i=n.length;for(let a=0;a<i;a++){const o=n[a];o===` 281`||o===`\r 282`?r.push(Hh()):o===" "?r.push(lb()):o!==""&&r.push(wn(o))}return{node:r}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let n=e,r=!0;for(;n!==null&&(n=WA(n,!1))!==null;){const i=n.textContent||"";if(i.length>0){/[ \t\n]$/.test(i)&&(t=t.slice(1)),r=!1;break}}r&&(t=t.slice(1))}if(t[t.length-1]===" "){let n=e,r=!0;for(;n!==null&&(n=WA(n,!0))!==null;)if((n.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:wn(t)}}function WA(s,e){let t=s;for(;;){let n;for(;(n=e?t.nextSibling:t.previousSibling)===null;){const i=t.parentElement;if(i===null)return null;t=i}if(t=n,mn(t)){const i=t.style.display;if(i===""&&!nE(t)||i!==""&&!i.startsWith("inline"))return null}let r=t;for(;(r=e?t.firstChild:t.lastChild)!==null;)t=r;if(gc(t))return t;if(t.nodeName==="BR")return null}}const SO={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function aa(s){const e=SO[s.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:QE(s.style,e),node:null}}function wn(s=""){return Ds(new Ml(s))}function We(s){return s instanceof Ml}function QE(s,e){const t=s.fontWeight,n=s.textDecoration.split(" "),r=t==="700"||t==="bold",i=n.includes("line-through"),a=s.fontStyle==="italic",o=n.includes("underline"),c=s.verticalAlign;return l=>(We(l)&&(r&&!l.hasFormat("bold")&&l.toggleFormat("bold"),i&&!l.hasFormat("strikethrough")&&l.toggleFormat("strikethrough"),a&&!l.hasFormat("italic")&&l.toggleFormat("italic"),o&&!l.hasFormat("underline")&&l.toggleFormat("underline"),c!=="sub"||l.hasFormat("subscript")||l.toggleFormat("subscript"),c!=="super"||l.hasFormat("superscript")||l.toggleFormat("superscript"),e&&!l.hasFormat(e)&&l.toggleFormat(e)),l)}class Hp extends Ml{static getType(){return"tab"}static clone(e){return new Hp(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),n=Kd(e.theme,"tab");return n!==void 0&&t.classList.add(...n),t}static importJSON(e){return lb().updateFromJSON(e)}setTextContent(e){return e!==" "&&e!==""&&sU(126),super.setTextContent(" ")}spliceText(e,t,n,r){return n===""&&t===0||n===" "&&t===1||ze(286),this}setDetail(e){return e!==2&&ze(127),this}setMode(e){return e!=="normal"&&ze(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function lb(){return Ds(new Hp)}function HU(s){return s instanceof Hp}class EO{constructor(e,t,n){be(this,"key");be(this,"offset");be(this,"type");be(this,"_selection");this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:wR(ti(ro(this,"next")),ti(ro(e,"next")))<0}getNode(){const e=ft(this.key);return e===null&&ze(20),e}set(e,t,n,r){const i=this._selection,a=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,$p()||(ml()===a&&Cr(e),i!==null&&(i.setCachedNodes(null),i.dirty=!0)))}}function _i(s,e,t){return new EO(s,e,t)}function Ow(s,e){let t=e.__key,n=s.offset,r="element";if(We(e)){r="text";const i=e.getTextContentSize();n>i&&(n=i)}else if(!Fe(e)){const i=e.getNextSibling();if(We(i))t=i.__key,n=0,r="text";else{const a=e.getParent();a&&(t=a.__key,n=e.getIndexWithinParent()+1)}}s.set(t,n,r)}function jA(s,e){if(Fe(e)){const t=e.getLastDescendant();Fe(t)||We(t)?Ow(s,t):Ow(s,e)}else Ow(s,e)}class Hv{constructor(e){be(this,"_nodes");be(this,"_cachedNodes");be(this,"dirty");this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!yi(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(r=>n.has(r))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new Hv(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let i;if(We(r))i=r.select();else{const a=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(a,a)}i.insertNodes(e);for(let a=0;a<n;a++)t[a].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=this._nodes,n=[];for(const r of t){const i=ft(r);i!==null&&n.push(i)}return $p()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){const e=this.getNodes();if((Oe()||Yi())===this&&e[0]){const t=An(e[0],"next");_R(Nl(t,t))}for(const t of e)t.remove()}}function Ie(s){return s instanceof nd}class nd{constructor(e,t,n,r){be(this,"format");be(this,"style");be(this,"anchor");be(this,"focus");be(this,"_cachedNodes");be(this,"dirty");this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Ie(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=(function(n){const r=[],[i,a]=n.getTextSlices();i&&r.push(i.caret.origin);const o=new Set,c=new Set;for(const l of n)if(ii(l)){const{origin:u}=l;r.length===0?o.add(u):(c.add(u),r.push(u))}else{const{origin:u}=l;Fe(u)&&c.has(u)||r.push(u)}if(a&&r.push(a.caret.origin),kl(n.focus)&&Fe(n.focus.origin)&&n.focus.getNodeAtCaret()===null)for(let l=jr(n.focus.origin,"previous");ii(l)&&o.has(l.origin)&&!l.origin.isEmpty()&&l.origin.is(r[r.length-1]);l=Gh(l))o.delete(l.origin),r.pop();for(;r.length>1;){const l=r[r.length-1];if(!Fe(l)||c.has(l)||l.isEmpty()||o.has(l))break;r.pop()}if(r.length===0&&n.isCollapsed()){const l=ti(n.anchor),u=ti(n.anchor.getFlipped()),d=f=>qo(f)?f.origin:f.getNodeAtCaret(),h=d(l)||d(u)||(n.anchor.getNodeAtCaret()?l.origin:u.origin);
282r.push(h)}return r})(TR(rE(this),"next"));return $p()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){this.anchor.set(e.__key,t,"text"),this.focus.set(n.__key,r,"text")}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,a=r.isBefore(i),[o,c]=YS(this);let l="",u=!0;for(let d=0;d<e.length;d++){const h=e[d];if(Fe(h)&&!h.isInline())u||(l+=` 283`),u=!h.isEmpty();else if(u=!1,We(h)){let f=h.getTextContent();h===t?h===n?r.type==="element"&&i.type==="element"&&i.offset!==r.offset||(f=o<c?f.slice(o,c):f.slice(c,o)):f=a?f.slice(o):f.slice(c):h===n&&(f=a?f.slice(0,c):f.slice(0,o)),l+=f}else!Pt(h)&&!wl(h)||h===n&&this.isCollapsed()||(l+=h.getTextContent())}return l}applyDOMRange(e){const t=hn(),n=t.getEditorState()._selection,r=KU(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(r===null)return;const[i,a]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(a.key,a.offset,a.type,!0),Ap(this)}clone(){const e=this.anchor,t=this.focus;return new nd(_i(e.key,e.offset,e.type),_i(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=M1(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=Cl[e];return(this.format&t)!==0}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let i=0;i<r;i++){const a=t[i];a===` 284`||a===`\r 285`?n.push(Hh()):a===" "?n.push(lb()):n.push(wn(a))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,i=this.style;let a=t,o=n;!this.isCollapsed()&&n.isBefore(t)&&(a=n,o=t),a.type==="element"&&(function(g,b,v,x){const w=g.getNode(),_=w.getChildAtIndex(g.offset),T=wn();if(T.setFormat(v),T.setStyle(x),no(_))_.splice(0,0,[T]);else{const S=Vn(w)?ct().append(T):T;_===null?w.append(S):_.insertBefore(S)}g.is(b)&&b.set(T.__key,0,"text"),g.set(T.__key,0,"text")})(a,o,r,i),o.type==="element"&&Ys(o,ti(ro(o,"next")));const c=a.offset;let l=o.offset;const u=this.getNodes(),d=u.length;let h=u[0];We(h)||ze(26);const f=h.getTextContent().length,p=h.getParentOrThrow();let y=u[d-1];if(d===1&&o.type==="element"&&(l=f,o.set(a.key,l,"text")),this.isCollapsed()&&c===f&&(bo(h)||!h.canInsertTextAfter()||!p.canInsertTextAfter()&&h.getNextSibling()===null)){let g=h.getNextSibling();if(We(g)&&g.canInsertTextBefore()&&!bo(g)||(g=wn(),g.setFormat(r),g.setStyle(i),p.canInsertTextAfter()?h.insertAfter(g):p.insertAfter(g)),g.select(0,0),h=g,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&c===0&&(bo(h)||!h.canInsertTextBefore()||!p.canInsertTextBefore()&&h.getPreviousSibling()===null)){let g=h.getPreviousSibling();if(We(g)&&!bo(g)||(g=wn(),g.setFormat(r),p.canInsertTextBefore()?h.insertBefore(g):p.insertBefore(g)),g.select(),h=g,e!=="")return void this.insertText(e)}else if(h.isSegmented()&&c!==f){const g=wn(h.getTextContent());g.setFormat(r),h.replace(g),h=g}else if(!this.isCollapsed()&&e!==""){const g=y.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||Fe(g)&&(!g.canInsertTextBefore()||!g.canInsertTextAfter()))return this.insertText(""),$U(this.anchor,this.focus),void this.insertText(e)}if(d===1){if(Uh(h)){const x=wn(e);return x.select(),void h.replace(x)}const g=h.getFormat(),b=h.getStyle();if(c!==l||g===r&&b===i){if(HU(h)){const x=wn(e);return x.setFormat(r),x.setStyle(i),x.select(),void h.replace(x)}}else{if(h.getTextContent()!==""){const x=wn(e);if(x.setFormat(r),x.setStyle(i),x.select(),c===0)h.insertBefore(x,!1);else{const[w]=h.splitText(c);w.insertAfter(x,!1)}return void(x.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}h.setFormat(r),h.setStyle(i)}const v=l-c;h=h.spliceText(c,v,e,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=g,this.style=b,h.isComposing()&&(this.anchor.offset-=e.length))}else{const g=new Set([...h.getParentKeys(),...y.getParentKeys()]),b=Fe(h)?h:h.getParentOrThrow();let v=Fe(y)?y:y.getParentOrThrow(),x=y;if(!b.is(v)&&v.isInline())do x=v,v=v.getParentOrThrow();while(v.isInline());if(o.type==="text"&&(l!==0||y.getTextContent()==="")||o.type==="element"&&y.getIndexWithinParent()<l)if(We(y)&&!Uh(y)&&l!==y.getTextContentSize()){if(y.isSegmented()){const C=wn(y.getTextContent());y.replace(C),y=C}Vn(o.getNode())||o.type!=="text"||(y=y.spliceText(0,l,"")),g.add(y.__key)}else{const C=y.getParentOrThrow();C.canBeEmpty()||C.getChildrenSize()!==1?y.remove():C.remove()}else g.add(y.__key);const w=v.getChildren(),_=new Set(u),T=b.is(v),S=b.isInline()&&h.getNextSibling()===null?b:h;for(let C=w.length-1;C>=0;C--){const D=w[C];if(D.is(h)||Fe(D)&&D.isParentOf(h))break;D.isAttached()&&(!_.has(D)||D.is(x)?T||S.insertAfter(D,!1):D.remove())}if(!T){let C=v,D=null;for(;C!==null;){const N=C.getChildren(),M=N.length;(M===0||N[M-1].is(D))&&(g.delete(C.__key),D=C),C=C.getParent()}}if(Uh(h))if(c===f)h.select();else{const C=wn(e);C.select(),h.replace(C)}else h=h.spliceText(c,f-c,e,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=h.getFormat(),this.style=h.getStyle(),h.isComposing()&&(this.anchor.offset-=e.length));for(let C=1;C<d;C++){const D=u[C],N=D.__key;g.has(N)||D.remove()}}}removeText(){const e=Oe()===this;a1(this,tL(rE(this))),e&&Oe()!==this&&Yt(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void Cr(null);const n=this.getNodes(),r=[];for(const w of n)We(w)&&r.push(w);const i=w=>
285{n.forEach(_=>{if(Fe(_)){const T=_.getFormatFlags(e,w);_.setTextFormat(T)}})},a=r.length;if(a===0)return this.toggleFormat(e),Cr(null),void i(t);const o=this.anchor,c=this.focus,l=this.isBackward(),u=l?c:o,d=l?o:c;let h=0,f=r[0],p=u.type==="element"?0:u.offset;if(u.type==="text"&&p===f.getTextContentSize()&&(h=1,f=r[1],p=0),f==null)return;const y=f.getFormatFlags(e,t);i(y);const g=a-1;let b=r[g];const v=d.type==="text"?d.offset:b.getTextContentSize();if(f.is(b)){if(p===v)return;if(bo(f)||p===0&&v===f.getTextContentSize())f.setFormat(y);else{const w=f.splitText(p,v),_=p===0?w[0]:w[1];_.setFormat(y),u.type==="text"&&u.set(_.__key,0,"text"),d.type==="text"&&d.set(_.__key,v-p,"text")}return void(this.format=y)}p===0||bo(f)||([,f]=f.splitText(p),p=0),f.setFormat(y);const x=b.getFormatFlags(e,y);v>0&&(v===b.getTextContentSize()||bo(b)||([b]=b.splitText(v)),b.setFormat(x));for(let w=h+1;w<g;w++){const _=r[w],T=_.getFormatFlags(e,x);_.setFormat(T)}u.type==="text"&&u.set(f.__key,p,"text"),d.type==="text"&&d.set(b.__key,v,"text"),this.format=y|x}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const p=Oe();return Ie(p)||ze(134),p.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),n=St(t,bs),r=e[e.length-1];if(Fe(n)&&"__language"in n){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const p=Lw(this);n.splice(p,0,e),r.selectEnd()}return}if(!e.some(p=>(Fe(p)||Pt(p))&&!p.isInline())){Fe(n)||ze(211,t.constructor.name,t.getType());const p=Lw(this);return n.splice(p,0,e),void r.selectEnd()}const i=(function(p){const y=ct();let g=null;for(let b=0;b<p.length;b++){const v=p[b],x=wl(v);if(x||Pt(v)&&v.isInline()||Fe(v)&&v.isInline()||We(v)||v.isParentRequired()){if(g===null&&(g=v.createParentElementNode(),y.append(g),x))continue;g!==null&&g.append(v)}else y.append(v),g=null}return y})(e),a=i.getLastDescendant(),o=i.getChildren(),c=!Fe(n)||!n.isEmpty()?this.insertParagraph():null,l=o[o.length-1];let u=o[0];var d;Fe(d=u)&&bs(d)&&!d.isEmpty()&&Fe(n)&&(!n.isEmpty()||n.canMergeWhenEmpty())&&(Fe(n)||ze(211,t.constructor.name,t.getType()),n.append(...u.getChildren()),u=o[1]),u&&(n===null&&ze(212,t.constructor.name,t.getType()),(function(p,y){const g=y.getParentOrThrow().getLastChild();let b=y;const v=[y];for(;b!==g;)b.getNextSibling()||ze(140),b=b.getNextSibling(),v.push(b);let x=p;for(const w of v)x=x.insertAfter(w)})(n,u));const h=St(a,bs);c&&Fe(h)&&(c.canMergeWhenEmpty()||bs(l))&&(h.append(...c.getChildren()),c.remove()),Fe(n)&&n.isEmpty()&&n.remove(),a.selectEnd();const f=Fe(n)?n.getLastChild():null;wl(f)&&h!==n&&f.remove()}insertParagraph(){if(this.anchor.key==="root"){const a=ct();return $t().splice(this.anchor.offset,0,[a]),a.select(),a}const e=Lw(this),t=St(this.anchor.getNode(),bs);Fe(t)||ze(213);const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],i=t.insertNewAfter(this,!1);return i?(i.append(...r),i.selectStart(),i):null}insertLineBreak(e){const t=Hh();if(this.insertNodes([t]),e){const n=t.getParentOrThrow(),r=t.getIndexWithinParent();n.select(r,r)}}extract(){const e=[...this.getNodes()],t=e.length;let n=e[0],r=e[t-1];const[i,a]=YS(this),o=this.isBackward(),[c,l]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[u,d]=o?[a,i]:[i,a];if(t===0)return[];if(t===1){if(We(n)&&!this.isCollapsed()){const h=n.splitText(u,d),f=u===0?h[0]:h[1];return f?(c.set(f.getKey(),0,"text"),l.set(f.getKey(),f.getTextContentSize(),"text"),[f]):[]}return[n]}if(We(n)&&(u===n.getTextContentSize()?e.shift():u!==0&&([,n]=n.splitText(u),e[0]=n,c.set(n.getKey(),0,"text"))),We(r)){const h=r.getTextContent().length;d===0?e.pop():d!==h&&([r]=r.splitText(d),e[e.length-1]=r,l.set(r.getKey(),r.getTextContentSize(),"text"))}return e}modify(e,t,n){if(YA(this,e,t,n))return;const r=e==="move",i=hn(),a=Hr(Qi(i));if(!a)return;const o=i._blockCursorElement,c=i._rootElement,l=this.focus.getNode();if(c===null||o===null||!Fe(l)||l.isInline()||l.canBeEmpty()||eE(o,i,c),this.dirty){let u=Up(i,this.anchor.key),d=Up(i,this.focus.key);this.anchor.type==="text"&&(u=Fp(u)),this.focus.type==="text"&&(d=Fp(d)),u&&d&&GU(a,u,this.anchor.offset,d,this.focus.offset)}if((function(u,d,h,f){u.modify(d,h,f)})(a,e,t?"backward":"forward",n),a.rangeCount>0){const u=a.getRangeAt(0),d=this.anchor.getNode(),h=Vn(d)?d:zO(d);if(this.applyDOMRange(u),this.dirty=!0,!r){const f=this.getNodes(),p=[];let y=!1;for(let g=0;g<f.length;g++){const b=f[g];QS(b,h)?p.push(b):y=!0}if(y&&p.length>0)if(t){const g=p[0];Fe(g)?g.selectStart():g.getParentOrThrow().selectStart()}else{const g=p[p.length-1];Fe(g)?g.selectEnd():g.getParentOrThrow().selectEnd()}
285a.anchorNode===u.startContainer&&a.anchorOffset===u.startOffset||(function(g){const b=g.focus,v=g.anchor,x=v.key,w=v.offset,_=v.type;v.set(b.key,b.offset,b.type,!0),b.set(x,w,_,!0)})(this)}}n==="lineboundary"&&YA(this,e,t,n,"decorators")}forwardDeletion(e,t,n){if(!n&&(e.type==="element"&&Fe(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const r=t.getParent(),i=t.getNextSibling()||(r===null?null:r.getNextSibling());if(Fe(i)&&i.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const n=this.anchor;let r=n.getNode();if(this.forwardDeletion(n,r,e))return;const i=lm(ro(n,e?"previous":"next"));if(i.getTextSlices().every(o=>o===null||o.distance===0)){let o={type:"initial"};for(const c of i.iterNodeCarets("shadowRoot"))if(ii(c)){if(!c.origin.isInline()){if(c.origin.isShadowRoot()){if(o.type==="merge-block")break;if(Fe(i.anchor.origin)&&i.anchor.origin.isEmpty()){const l=ti(c);a1(this,Nl(l,l)),i.anchor.origin.remove()}return}o.type!=="merge-next-block"&&o.type!=="merge-block"||(o={block:o.block,caret:c,type:"merge-block"})}}else{if(o.type==="merge-block")break;if(kl(c)){if(Fe(c.origin)){if(c.origin.isInline()){if(!c.origin.isParentOf(i.anchor.origin))break}else o={block:c.origin,type:"merge-next-block"};continue}if(Pt(c.origin)){if(!c.origin.isIsolated())if(o.type==="merge-next-block"&&(c.origin.isKeyboardSelectable()||!c.origin.isInline())&&Fe(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();const l=VU();l.add(c.origin.getKey()),Yt(l)}else c.origin.remove();return}break}}if(o.type==="merge-block"){const{caret:c,block:l}=o;return a1(this,Nl(!c.origin.isEmpty()&&l.isEmpty()?pb(An(l,c.direction)):i.anchor,c)),this.removeText()}}const a=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&n.offset===0&&HA(this,n.getNode()))return}else{const o=a.type==="text"?a.getNode():null;if(r=n.type==="text"?n.getNode():null,o!==null&&o.isSegmented()){const c=a.offset,l=o.getTextContentSize();if(o.is(r)||e&&c!==l||!e&&c!==0)return void $A(o,e,c)}else if(r!==null&&r.isSegmented()){const c=n.offset,l=r.getTextContentSize();if(r.is(o)||e&&c!==0||!e&&c!==l)return void $A(r,e,c)}(function(c,l){const u=c.anchor,d=c.focus,h=u.getNode(),f=d.getNode();if(h===f&&u.type==="text"&&d.type==="text"){const p=u.offset,y=d.offset,g=p<y,b=g?p:y,v=g?y:p,x=v-1;b!==x&&(function(w){return!(fR(w)||DO(w))})(h.getTextContent().slice(b,v))&&(l?d.set(d.key,x,d.type):u.set(u.key,x,u.type))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const n=this.anchor.getNode();n.isEmpty()&&Vn(n.getParent())&&n.getPreviousSibling()===null&&HA(this,n)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.isCollapsed()?this.deleteCharacter(e):this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function yi(s){return s instanceof Hv}function zA(s){const e=s.offset;if(s.type==="text")return e;const t=s.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function YS(s){const e=s.getStartEndPoints();if(e===null)return[0,0];const[t,n]=e;return t.type==="element"&&n.type==="element"&&t.key===n.key&&t.offset===n.offset?[0,0]:[zA(t),zA(n)]}function HA(s,e){for(let t=e;t;t=t.getParent()){if(Fe(t)){if(t.collapseAtStart(s))return!0;if(ri(t))break}if(t.getPreviousSibling())break}return!1}const DO=(()=>{try{const s=new RegExp("\\p{Emoji}","u"),e=s.test.bind(s);if(e("â¤ï¸")&&e("#ï¸â£")&&e("ð"))return e}catch{}return()=>!1})();function $A(s,e,t){const n=s,r=n.getTextContent().split(/(?=\s)/g),i=r.length;let a=0,o=0;for(let l=0;l<i;l++){const u=l===i-1;if(o=a,a+=r[l].length,e&&a===t||a>t||u){r.splice(l,1),u&&(o=void 0);break}}const c=r.join("").trim();c===""?n.remove():(n.setTextContent(c),n.select(o,o))}function KA(s,e,t,n){let r,i=e;if(mn(s)){let a=!1;const o=s.childNodes,c=o.length,l=n._blockCursorElement;i===c&&(a=!0,i=c-1);let u=o[i],d=!1;if(u===l)u=o[i+1],d=!0;else if(l!==null){const h=l.parentNode;s===h&&e>Array.prototype.indexOf.call(h.children,l)&&i--}if(r=Od(u),We(r))i=Yo(r,a?"next":"previous");else{let h=Od(s);if(h===null)return null;if(Fe(h)){const f=n.getElementByKey(h.getKey());f===null&&ze(214),[h,i]=h.getDOMSlot(f).resolveChildIndex(h,f,s,e),Fe(h)||ze(215),a&&i>=h.getChildrenSize()&&(i=Math.max(0,h.getChildrenSize()-1));let y=h.getChildAtIndex(i);if(Fe(y)&&(function(g,b,v){const x=g.getParent();return v===null||x===null||!x.canBeEmpty()||x!==v.getNode()})(y,0,t)){const g=a?y.getLastDescendant():y.getFirstDescendant();g===null?h=y:(y=g,h=Fe(y)?y:y.getParentOrThrow()),i=0}We(y)?(r=y,h=null,i=Yo(y,a?"next":"previous")):y!==h&&a&&!d&&(Fe(h)||ze(216),i=Math.min(h.getChildrenSize(),i+1))}else{const f=h.getIndexWithinParent();i=e===0&&Pt(h)&&Od(s)===h?f:f+1,h=h.getParentOrThrow()}if(Fe(h))return _i(h.__key,i,"element")}}else r=Od(s);return We(r)?_i(r.__key,Yo(r,i,"clamp"),"text"):null}function XA(s,e,t){const n=s.offset,r=s.getNode();if(n===0){const i=r.getPreviousSibling(),a=r.getParent();
285if(e){if((t||!e)&&i===null&&Fe(a)&&a.isInline()){const o=a.getPreviousSibling();We(o)&&s.set(o.__key,o.getTextContent().length,"text")}}else Fe(i)&&!t&&i.isInline()?s.set(i.__key,i.getChildrenSize(),"element"):We(i)&&s.set(i.__key,i.getTextContent().length,"text")}else if(n===r.getTextContent().length){const i=r.getNextSibling(),a=r.getParent();if(e&&Fe(i)&&i.isInline())s.set(i.__key,0,"element");else if((t||e)&&i===null&&Fe(a)&&a.isInline()&&!a.canInsertTextAfter()){const o=a.getNextSibling();We(o)&&s.set(o.__key,0,"text")}}}function $U(s,e,t){if(s.type==="text"&&e.type==="text"){const n=s.isBefore(e),r=s.is(e);XA(s,n,r),XA(e,!n,r),r&&e.set(s.key,s.offset,s.type)}}function KU(s,e,t,n,r,i){if(s===null||t===null||!hb(r,s,t))return null;const a=KA(s,e,Ie(i)?i.anchor:null,r);if(a===null)return null;const o=KA(t,n,Ie(i)?i.focus:null,r);if(o===null)return null;if(a.type==="element"&&o.type==="element"){const c=Od(s),l=Od(t);if(Pt(c)&&Pt(l))return null}return $U(a,o),[a,o]}function F1(s){return Fe(s)&&!s.isInline()}function XU(s,e,t,n,r,i){const a=Ol(),o=new nd(_i(s,e,r),_i(t,n,i),0,"");return o.dirty=!0,a._selection=o,o}function Pl(){const s=_i("root",0,"element"),e=_i("root",0,"element");return new nd(s,e,0,"")}function VU(){return new Hv(new Set)}function CO(s,e){return $v(null,s,e,null)}function $v(s,e,t,n){const r=t._window;if(r===null)return null;const i=n||r.event,a=i?i.type:void 0,o=a==="selectionchange",c=!IS&&(o||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&i&&i.detail===3||a==="drop"||a===void 0);let l,u,d,h;if(Ie(s)&&!c)return s.clone();if(e===null)return null;if(l=e.anchorNode,u=e.focusNode,d=e.anchorOffset,h=e.focusOffset,(o||a===void 0)&&Ie(s)&&!hb(t,l,u))return s.clone();const f=KU(l,d,u,h,t,s);if(f===null)return null;const[p,y]=f;let g=0,b="";if(Ie(s)){const v=s.anchor;if(p.key===v.key)g=s.format,b=s.style;else{const x=p.getNode();We(x)?(g=x.getFormat(),b=x.getStyle()):Fe(x)&&(g=x.getTextFormat(),b=x.getTextStyle())}}return new nd(p,y,g,b)}function Oe(){return Ol()._selection}function Yi(){return hn()._editorState._selection}function U1(s,e,t,n=1){const r=s.anchor,i=s.focus,a=r.getNode(),o=i.getNode();if(!e.is(a)&&!e.is(o))return;const c=e.__key;if(s.isCollapsed()){const l=r.offset;if(t<=l&&n>0||t<l&&n<0){const u=Math.max(0,l+n);r.set(c,u,"element"),i.set(c,u,"element"),VA(s)}}else{const l=s.isBackward(),u=l?i:r,d=u.getNode(),h=l?r:i,f=h.getNode();if(e.is(d)){const p=u.offset;(t<=p&&n>0||t<p&&n<0)&&u.set(c,Math.max(0,p+n),"element")}if(e.is(f)){const p=h.offset;(t<=p&&n>0||t<p&&n<0)&&h.set(c,Math.max(0,p+n),"element")}}VA(s)}function VA(s){const e=s.anchor,t=e.offset,n=s.focus,r=n.offset,i=e.getNode(),a=n.getNode();if(s.isCollapsed()){if(!Fe(i))return;const o=i.getChildrenSize(),c=t>=o,l=c?i.getChildAtIndex(o-1):i.getChildAtIndex(t);if(We(l)){let u=0;c&&(u=l.getTextContentSize()),e.set(l.__key,u,"text"),n.set(l.__key,u,"text")}return}if(Fe(i)){const o=i.getChildrenSize(),c=t>=o,l=c?i.getChildAtIndex(o-1):i.getChildAtIndex(t);if(We(l)){let u=0;c&&(u=l.getTextContentSize()),e.set(l.__key,u,"text")}}if(Fe(a)){const o=a.getChildrenSize(),c=r>=o,l=c?a.getChildAtIndex(o-1):a.getChildAtIndex(r);if(We(l)){let u=0;c&&(u=l.getTextContentSize()),n.set(l.__key,u,"text")}}}function R1(s,e,t,n,r){let i=null,a=0,o=null;n!==null?(i=n.__key,We(n)?(a=n.getTextContentSize(),o="text"):Fe(n)&&(a=n.getChildrenSize(),o="element")):r!==null&&(i=r.__key,We(r)?o="text":Fe(r)&&(o="element")),i!==null&&o!==null?s.set(i,a,o):(a=e.getIndexWithinParent(),a===-1&&(a=t.getChildrenSize()),s.set(t.__key,a,"element"))}function GA(s,e,t,n,r){s.type==="text"?s.set(t,s.offset+(e?0:r),"text"):s.offset>n.getIndexWithinParent()&&s.set(s.key,s.offset-1,"element")}function GU(s,e,t,n,r){try{s.setBaseAndExtent(e,t,n,r)}catch{}}function qA(s,e,t){const n=Up(s,e.getKey());if(Fe(e)){const r=e.getDOMSlot(n);return[r.element,t+r.getFirstChildOffset()]}return[n,t]}function AO(s,e,t,n,r,i,a){const o=n.anchorNode,c=n.focusNode,l=n.anchorOffset,u=n.focusOffset,d=document.activeElement;if(r.has(mO)&&d!==i||d!==null&&sD(d))return;if(!Ie(e))return void(s!==null&&hb(t,o,c)&&n.removeAllRanges());const h=e.anchor,f=e.focus,p=h.getNode(),y=f.getNode(),[g,b]=qA(t,p,h.offset),[v,x]=qA(t,y,f.offset),w=e.format,_=e.style,T=e.isCollapsed();let S=g,C=v,D=!1;var N,M,F,L,A;if(h.type==="text"?(S=Fp(g),D=p.getFormat()!==w||p.getStyle()!==_):Ie(s)&&s.anchor.type==="text"&&(D=!0),f.type==="text"&&(C=Fp(v)),S!==null&&C!==null&&(T&&(s===null||D||Ie(s)&&(s.format!==w||s.style!==_))&&(N=w,M=_,F=b,L=h.key,A=performance.now(),UU=[N,M,F,L,A]),l!==b||u!==x||o!==S||c!==C||n.type==="Range"&&T||(d!==null&&i.contains(d)||r.has(OA)||i.focus({preventScroll:!0}),h.type==="element"))){if(GU(n,S,b,C,x),!Dl||!e.isCollapsed()||i===null||r.has(OA)||document.activeElement!==null&&i.contains(document.activeElement)||i.focus({preventScroll:!0}),!r.has(yO)&&e.isCollapsed()&&i!==null&&i===document.activeElement){const X=Ie(e)&&e.anchor.type==="element"?S.childNodes[b]||null:n.rangeCount>0?n.getRangeAt(0):null;if(X!==null){let he;if(X instanceof Text){const j=document.createRange();j.selectNode(X),he=j.getBoundingClientRect()}else he=X.getBoundingClientRect();(function(j,ee,O){const pe=yR(O),q=hD(pe);
285if(pe===null||q===null)return;let{top:B,bottom:re}=ee,le=0,ge=0,ie=O;for(;ie!==null;){const P=ie===pe.body;if(P){le=0,ge=Qi(j).innerHeight;const te=q.getComputedStyle(pe.documentElement),Y=parseFloat(te.scrollPaddingTop),se=parseFloat(te.scrollPaddingBottom);isFinite(Y)&&(le+=Y),isFinite(se)&&(ge-=se)}else{const te=ie.getBoundingClientRect();le=te.top,ge=te.bottom}let W=0;if(B<le?W=-(le-B):re>ge&&(W=re-ge),W!==0)if(P)q.scrollBy(0,W);else{const te=ie.scrollTop;ie.scrollTop+=W;const Y=ie.scrollTop-te;B-=Y,re-=Y}if(P)break;ie=db(ie)}})(t,he,i)}}XS=!0}}function I1(s){let e=Oe()||Yi();e===null&&(e=$t().selectEnd()),e.insertNodes(s)}function Lw(s){let e=s;s.isCollapsed()||e.removeText();const t=Oe();Ie(t)&&(e=t),Ie(e)||ze(161);const n=e.anchor;let r=n.getNode(),i=n.offset;for(;!bs(r);){const a=r;if([r,i]=kO(r,i),a.is(r))break}return i}function kO(s,e){const t=s.getParent();if(!t){const r=ct();return $t().append(r),r.select(),[$t(),0]}if(We(s)){const r=s.splitText(e);if(r.length===0)return[t,s.getIndexWithinParent()];const i=e===0?0:1;return[t,r[0].getIndexWithinParent()+i]}if(!Fe(s)||e===0)return[t,s.getIndexWithinParent()];const n=s.getChildAtIndex(e);if(n){const r=new nd(_i(s.__key,e,"element"),_i(s.__key,e,"element"),0,""),i=s.insertNewAfter(r);i&&i.append(n,...n.getNextSiblings())}return[t,s.getIndexWithinParent()+1]}function YA(s,e,t,n,r="decorators-and-blocks"){if(e==="move"&&n==="character"&&!s.isCollapsed()){const[u,d]=t===s.isBackward()?[s.focus,s.anchor]:[s.anchor,s.focus];return d.set(u.key,u.offset,u.type),!0}const i=ro(s.focus,t?"previous":"next"),a=n==="lineboundary",o=e==="move";let c=i,l=r==="decorators-and-blocks";if(!mD(c)){for(const u of c){l=!1;const{origin:d}=u;if(!Pt(d)||d.isIsolated()||(c=u,!a||!d.isInline()))break}if(l)for(const u of lm(i).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(ii(u))u.origin.isInline()||(c=u);else{if(Fe(u.origin))continue;Pt(u.origin)&&!u.origin.isInline()&&(c=u)}break}}if(c===i)return!1;if(o&&!a&&Pt(c.origin)&&c.origin.isKeyboardSelectable()){const u=VU();return u.add(c.origin.getKey()),Yt(u),!0}return c=ti(c),o&&Ys(s.anchor,c),Ys(s.focus,c),l||!a}let pr=null,gr=null,xi=!1,Bw=!1,s1=0;const ZA={characterData:!0,childList:!0,subtree:!0};function $p(){return xi||pr!==null&&pr._readOnly}function Dr(){xi&&ze(13)}function qU(){s1>99&&ze(14)}function Ol(){return pr===null&&ze(195,YU()),pr}function hn(){return gr===null&&ze(196,YU()),gr}function YU(){let s=0;const e=new Set,t=$h.version;if(typeof window<"u")for(const r of document.querySelectorAll("[contenteditable]")){const i=Xv(r);if(oD(i))s++;else if(i){let a=String(i.constructor.version||"<0.17.1");a===t&&(a+=" (separately built, likely a bundler configuration issue)"),e.add(a)}}let n=` Detected on the page: ${s} compatible editor(s) with version ${t}`;return e.size&&(n+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),n}function NO(){return gr}function JA(s,e,t){const n=e.__type,r=iR(s,n);let i=t.get(n);i===void 0&&(i=Array.from(r.transforms),t.set(n,i));const a=i.length;for(let o=0;o<a&&(i[o](e),e.isAttached());o++);}function QA(s,e){return s!==void 0&&s.__key!==e&&s.isAttached()}function ZU(s,e){if(!e)return;const t=s._updateTags;let n=e;Array.isArray(e)||(n=[e]);for(const r of n)t.add(r)}function FO(s){return eD(s,hn()._nodes)}function eD(s,e){const t=s.type,n=e.get(t);n===void 0&&ze(17,t);const r=n.klass;s.type!==r.getType()&&ze(18,r.name);const i=r.importJSON(s),a=s.children;if(Fe(i)&&Array.isArray(a))for(let o=0;o<a.length;o++){const c=eD(a[o],e);i.append(c)}return i}function e2(s,e,t){const n=pr,r=xi,i=gr;pr=e,xi=!0,gr=s;try{return t()}finally{pr=n,xi=r,gr=i}}function Ja(s,e){const t=s._pendingEditorState,n=s._rootElement,r=s._headless||n===null;if(t===null)return;const i=s._editorState,a=i._selection,o=t._selection,c=s._dirtyType!==0,l=pr,u=xi,d=gr,h=s._updating,f=s._observer;let p=null;if(s._pendingEditorState=null,s._editorState=t,!r&&c&&f!==null){gr=s,pr=t,xi=!1,s._updating=!0;try{const T=s._dirtyType,S=s._dirtyElements,C=s._dirtyLeaves;f.disconnect(),p=tO(i,t,s,T,S,C)}catch(T){if(T instanceof Error&&s._onError(T),Bw)throw T;return nR(s,null,n,t),dU(s),s._dirtyType=2,Bw=!0,Ja(s,i),void(Bw=!1)}finally{f.observe(n,ZA),s._updating=h,pr=l,xi=u,gr=d}}t._readOnly||(t._readOnly=!0);const y=s._dirtyLeaves,g=s._dirtyElements,b=s._normalizedNodes,v=s._updateTags,x=s._deferred;c&&(s._dirtyType=0,s._cloneNotNeeded.clear(),s._dirtyLeaves=new Set,s._dirtyElements=new Map,s._normalizedNodes=new Set,s._updateTags=new Set),(function(T,S){const C=T._decorators;let D=T._pendingDecorators||C;const N=S._nodeMap;let M;for(M in D)N.has(M)||(D===C&&(D=hR(T)),delete D[M])})(s,t);const w=r?null:Hr(Qi(s));if(s._editable&&w!==null&&(c||o===null||o.dirty||!o.is(a))&&n!==null&&!v.has(bO)){gr=s,pr=t;try{if(f!==null&&f.disconnect(),c||o===null||o.dirty){const T=s._blockCursorElement;T!==null&&eE(T,s,n),AO(a,o,s,w,v,n)}(function(T,S,C){let D=T._blockCursorElement;if(Ie(C)&&C.isCollapsed()&&C.anchor.type==="element"&&S.contains(document.activeElement)){const N=C.anch
285or,M=N.getNode(),F=N.offset;let L=!1,A=null;if(F===M.getChildrenSize())jw(M.getChildAtIndex(F-1))&&(L=!0);else{const X=M.getChildAtIndex(F);if(X!==null&&jw(X)){const he=X.getPreviousSibling();(he===null||jw(he))&&(L=!0,A=T.getElementByKey(X.__key))}}if(L){const X=T.getElementByKey(M.__key);return D===null&&(T._blockCursorElement=D=(function(he){const j=he.theme,ee=document.createElement("div");ee.contentEditable="false",ee.setAttribute("data-lexical-cursor","true");let O=j.blockCursor;if(O!==void 0){if(typeof O=="string"){const pe=Fl(O);O=j.blockCursor=pe}O!==void 0&&ee.classList.add(...O)}return ee})(T._config)),S.style.caretColor="transparent",void(A===null?X.appendChild(D):X.insertBefore(D,A))}}D!==null&&eE(D,T,S)})(s,n,o)}finally{f!==null&&f.observe(n,ZA),gr=d,pr=l}}p!==null&&(function(T,S,C,D,N){const M=Array.from(T._listeners.mutation),F=M.length;for(let L=0;L<F;L++){const[A,X]=M[L];for(const he of X){const j=S.get(he);j!==void 0&&A(j,{dirtyLeaves:D,prevEditorState:N,updateTags:C})}}})(s,p,v,y,i),Ie(o)||o===null||a!==null&&a.is(o)||s.dispatchCommand(ec,void 0);const _=s._pendingDecorators;_!==null&&(s._decorators=_,s._pendingDecorators=null,$g("decorator",s,!0,_)),(function(T,S,C){const D=i2(S),N=i2(C);D!==N&&$g("textcontent",T,!0,N)})(s,e||i,t),$g("update",s,!0,{dirtyElements:g,dirtyLeaves:y,editorState:t,mutatedNodes:p,normalizedNodes:b,prevEditorState:e||i,tags:v}),(function(T,S){if(T._deferred=[],S.length!==0){const C=T._updating;T._updating=!0;try{for(let D=0;D<S.length;D++)S[D]()}finally{T._updating=C}}})(s,x),(function(T){const S=T._updates;if(S.length!==0){const C=S.shift();if(C){const[D,N]=C;Kv(T,D,N)}}})(s)}function $g(s,e,t,...n){const r=e._updating;e._updating=t;try{const i=e._listeners[s],a=Array.from(i);for(const[o,c]of a){c&&c();const l=o(...n);i.has(o)?i.set(o,l):l&&l()}}finally{e._updating=r}}function JU(s,e,t,n){const r=aD(s);let i;for(let a=4;a>=0;a--)for(let o=0;o<r.length;o++){const c=r[o];if(o>0&&c._updating){i=c;break}const l=c._commands.get(e);if(l!==void 0){const u=l[a];if(u!==void 0){const d=Array.from(u),h=d.length;let f=!1;if(Go(c,()=>{for(let p=0;p<h;p++)if(d[p](t,n))return void(f=!0)}),f)return f}}}return i&&i.update(()=>{JU(i,e,t,n)}),!1}function t2(s,e){const t=s._updates;let n=e||!1;for(;t.length!==0;){const r=t.shift();if(r){const[i,a]=r,o=s._pendingEditorState;let c;a!==void 0&&(c=a.onUpdate,a.skipTransforms&&(n=!0),a.discrete&&(o===null&&ze(191),o._flushSync=!0),c&&s._deferred.push(c),ZU(s,a.tag)),o==null?Kv(s,i,a):i()}}return n}function Kv(s,e,t){const n=s._updateTags;let r,i=!1,a=!1;t!==void 0&&(r=t.onUpdate,ZU(s,t.tag),i=t.skipTransforms||!1,a=t.discrete||!1),r&&s._deferred.push(r);const o=s._editorState;let c=s._pendingEditorState,l=!1;(c===null||c._readOnly)&&(c=s._pendingEditorState=eR(c||o),l=!0),c._flushSync=a;const u=pr,d=xi,h=gr,f=s._updating;pr=c,xi=!1,s._updating=!0,gr=s;const p=s._headless||s.getRootElement()===null;rD(null);try{l&&(p?o._selection!==null&&(c._selection=o._selection.clone()):c._selection=(function(v,x){const w=v.getEditorState()._selection,_=Hr(Qi(v));return Ie(w)||w==null?$v(w,_,v,x):w.clone()})(s,t&&t.event||null));const g=s._compositionKey;e(),i=t2(s,i),(function(v,x){const w=x.getEditorState()._selection,_=v._selection;if(Ie(_)){const T=_.anchor,S=_.focus;let C;if(T.type==="text"&&(C=T.getNode(),C.selectionTransform(w,_)),S.type==="text"){const D=S.getNode();C!==D&&D.selectionTransform(w,_)}}})(c,s),s._dirtyType!==0&&(i?(function(v,x){const w=x._dirtyLeaves,_=v._nodeMap;for(const T of w){const S=_.get(T);We(S)&&S.isAttached()&&S.isSimpleText()&&!S.isUnmergeable()&&kA(S)}})(c,s):(function(v,x){const w=x._dirtyLeaves,_=x._dirtyElements,T=v._nodeMap,S=ml(),C=new Map;let D=w,N=D.size,M=_,F=M.size;for(;N>0||F>0;){if(N>0){x._dirtyLeaves=new Set;for(const L of D){const A=T.get(L);We(A)&&A.isAttached()&&A.isSimpleText()&&!A.isUnmergeable()&&kA(A),A!==void 0&&QA(A,S)&&JA(x,A,C),w.add(L)}if(D=x._dirtyLeaves,N=D.size,N>0){s1++;continue}}x._dirtyLeaves=new Set,x._dirtyElements=new Map,M.delete("root")&&M.set("root",!0);for(const L of M){const A=L[0],X=L[1];if(_.set(A,X),!X)continue;const he=T.get(A);he!==void 0&&QA(he,S)&&JA(x,he,C)}D=x._dirtyLeaves,N=D.size,M=x._dirtyElements,F=M.size,s1++}x._dirtyLeaves=w,x._dirtyElements=_})(c,s),t2(s),(function(v,x,w,_){const T=v._nodeMap,S=x._nodeMap,C=[];for(const[D]of _){const N=S.get(D);N!==void 0&&(N.isAttached()||(Fe(N)&&lU(N,D,T,S,C,_),T.has(D)||_.delete(D),C.push(D)))}for(const D of C)S.delete(D);for(const D of w){const N=S.get(D);N===void 0||N.isAttached()||(T.has(D)||w.delete(D),S.delete(D))}})(o,c,s._dirtyLeaves,s._dirtyElements)),g!==s._compositionKey&&(c._flushSync=!0);const b=c._selection;if(Ie(b)){const v=c._nodeMap,x=b.anchor.key,w=b.focus.key;v.get(x)!==void 0&&v.get(w)!==void 0||ze(19)}else yi(b)&&b._nodes.size===0&&(c._selection=null)}catch(g){return g instanceof Error&&s._onError(g),s._pendingEditorState=o,s._dirtyType=2,s._cloneNotNeeded.clear(),s._dirtyLeaves=new Set,s._dirtyElements.clear(),void Ja(s)}finally{pr=u,xi=d,gr=h,s._updating=f,s1=0}s._dirtyType!==0||s._deferred.length>0||(function(g,b){const v=b.getEditorState()._selection,x=g._selection;if(x!==null){if(x.dirty||!x.is(v))return!0}else if(v!==null)return!0;return!1})(c,s)?c._flushSync?(c._flushSync=!1,Ja(s)):l&&OO(()=>{Ja(s)}):(c._flushSync=!1,l&&(n.clear(),s._deferred=[],s._pendingEditorState=null))}function Go(s,e,t){gr===s&&t===void 0?e():Kv(s,e,t)}class Kg{constructor(e,t,n){be(this,"element");be(this,"before");be(this,"after");this.element=e,this.before=t||null,this.after=n||null}
285withBefore(e){return new Kg(this.element,e,this.after)}withAfter(e){return new Kg(this.element,this.before,e)}withElement(e){return this.element===e?this:new Kg(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return t!==null&&t.parentElement!==this.element&&ze(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&ze(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&ze(224),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const t=e==="decorator"&&(Mv||ab||Iv);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,n=e.nodeName==="IMG"?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===(t.nodeName==="IMG"))return;this.removeManagedLineBreak()}const n=this.element,r=this.before,i=document.createElement("br");if(n.insertBefore(i,r),e){const a=document.createElement("img");a.setAttribute("data-lexical-linebreak","true"),a.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",a.alt="",n.insertBefore(a,i),n.__lexicalLineBreak=a}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=0;for(let t=this.after;t!==null;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){const c=this.getFirstChildOffset();return[e,Math.min(c+e.getChildrenSize(),Math.max(c,r))]}const i=n2(t,n);i.push(r);const a=n2(t,this.element);let o=e.getIndexWithinParent();for(let c=0;c<a.length;c++){const l=i[c],u=a[c];if(l===void 0||l<u)break;if(l>u){o+=1;break}}return[e.getParentOrThrow(),o]}}function n2(s,e){const t=[];let n=e;for(;n!==s&&n!==null;n=n.parentNode){let r=0;for(let i=n.previousSibling;i!==null;i=i.previousSibling)r++;t.push(r)}return n!==s&&ze(225),t.reverse()}class ai extends eo{constructor(t){super(t);be(this,"__first");be(this,"__last");be(this,"__size");be(this,"__format");be(this,"__style");be(this,"__indent");be(this,"__dir");be(this,"__textFormat");be(this,"__textStyle");this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__first=t.__first,this.__last=t.__last,this.__size=t.__size),this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return zP[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const t=hn()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){const t=[];let n=this.getFirstChild();for(;n!==null;){if(We(n)&&t.push(n),Fe(n)){const r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;Fe(t);){const n=t.getFirstChild();if(n===null)break;t=n}return t}getLastDescendant(){let t=this.getLastChild();for(;Fe(t);){const n=t.getLastChild();if(n===null)break;t=n}return t}getDescendantByIndex(t){const n=this.getChildren(),r=n.length;if(t>=r){const a=n[r-1];return Fe(a)&&a.getLastDescendant()||a||null}const i=n[t];return Fe(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:ft(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&ze(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:ft(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&ze(96,this.__key),t}getChildAtIndex(t){const n=this.getChildrenSize();let r,i;if(t<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=t;){if(i===t)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=t;){if(i===t)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let t="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const a=n[i];
285t+=a.getTextContent(),Fe(a)&&i!==r-1&&!a.isInline()&&(t+=Pv)}return t}getTextContentSize(){let t=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const a=n[i];t+=a.getTextContentSize(),Fe(a)&&i!==r-1&&!a.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const n=RS[t];return(this.getFormat()&n)!==0}return!1}hasTextFormat(t){const n=Cl[t];return(this.getTextFormat()&n)!==0}getFormatFlags(t,n){return M1(this.getLatest().__textFormat,t,n)}getTextStyle(){return this.getLatest().__textStyle}select(t,n){Dr();const r=Oe();let i=t,a=n;const o=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){const l=this.getFirstChild();if(We(l)||Fe(l))return l.select(0,0)}else if(!(t!==void 0&&t!==o||n!==void 0&&n!==o)){const l=this.getLastChild();if(We(l)||Fe(l))return l.select()}}i===void 0&&(i=o),a===void 0&&(a=o);const c=this.__key;return Ie(r)?(r.anchor.set(c,i,"element"),r.focus.set(c,a,"element"),r.dirty=!0,r):XU(c,i,c,a,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();
285return this.getChildren().forEach(n=>n.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?RS[t]:0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const n=this.getWritable();return n.__textFormat=t,n}setTextStyle(t){const n=this.getWritable();return n.__textStyle=t,n}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){N1(this)&&ze(324,this.__key,this.__type);const i=this.getChildrenSize(),a=this.getWritable();t+n<=i||ze(226,String(t),String(n),String(i));const o=a.__key,c=[],l=[],u=this.getChildAtIndex(t+n);let d=null,h=i-n+r.length;if(t!==0)if(t===i)d=this.getLastChild();else{const p=this.getChildAtIndex(t);p!==null&&(d=p.getPreviousSibling())}if(n>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let y=0;y<n;y++){p===null&&ze(100);const g=p.getNextSibling(),b=p.__key;Rh(p.getWritable()),l.push(b),p=g}}let f=d;for(const p of r){f!==null&&p.is(f)&&(d=f=f.getPreviousSibling());const y=p.getWritable();y.__parent===o&&h--,Rh(y);const g=p.__key;if(f===null)a.__first=g,y.__prev=null;else{const b=f.getWritable();b.__next=g,y.__prev=b.__key}p.__key===o&&ze(76),y.__parent=o,c.push(g),f=p}if(t+n===i)f!==null&&(f.getWritable().__next=null,a.__last=f.__key);else if(u!==null){const p=u.getWritable();if(f!==null){const y=f.getWritable();p.__prev=f.__key,y.__next=u.__key}else p.__prev=null}if(a.__size=h,l.length){const p=Oe();if(Ie(p)){const y=new Set(l),g=new Set(c),{anchor:b,focus:v}=p;r2(b,y,g)&&R1(b,b.getNode(),this,d,u),r2(v,y,g)&&R1(v,v.getNode(),this,d,u),h!==0||this.canBeEmpty()||ri(this)||this.remove()}}return a}getDOMSlot(t){return new Kg(t)}exportDOM(t){const{element:n}=super.exportDOM(t);if(mn(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(n.dir=i)}return{element:n}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n===0&&r===""||ri(this)||this.getChildren().some(We)||(n!==0&&(t.textFormat=n),r!==""&&(t.textStyle=r)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,n){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,n){const r=this.getDOMSlot(t);let i=r.getFirstChild();for(let a=this.getFirstChild();a;a=a.getNextSibling()){const o=n.getElementByKey(a.getKey());o!==null&&(i==null?(r.insertChild(o),i=o):i!==o&&r.replaceChild(o,i),i=i.nextSibling)}}}function Fe(s){return s instanceof ai}function r2(s,e,t){let n=s.getNode();for(;n;){const r=n.__key;if(e.has(r)&&!t.has(r))return!0;n=n.getParent()}return!1}class QU extends eo{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Pt(s){return s instanceof QU}class Kp extends ai{constructor(){super("root");be(this,"__cachedText");this.__cachedText=null}static getType(){return"root"}static clone(){return new Kp}getTopLevelElementOrThrow(){ze(51)}getTextContent(){const t=this.__cachedText;return!$p()&&hn()._dirtyType!==0||t===null?super.getTextContent():t}remove(){ze(52)}replace(t){ze(53)}insertBefore(t){ze(54)}insertAfter(t){ze(55)}updateDOM(t,n){return!1}splice(t,n,r){for(const i of r)Fe(i)||Pt(i)||ze(282);return super.splice(t,n,r)}static importJSON(t){return $t().updateFromJSON(t)}collapseAtStart(){return!0}}function Vn(s){return s instanceof Kp}function eR(s){return new ub(new Map(s._nodeMap))}function tD(){return new ub(new Map([["root",new Kp]]))}function tR(s){const e=s.exportJSON(),t=s.constructor;if(e.type!==t.getType()&&ze(130,t.name),Fe(s)){const n=e.children;Array.isArray(n)||ze(59,t.name);const r=s.getChildren();for(let i=0;i<r.length;i++){const a=tR(r[i]);n.push(a)}}return e}function UO(s){return s instanceof ub}
285class ub{constructor(e,t){be(this,"_nodeMap");be(this,"_selection");be(this,"_flushSync");be(this,"_readOnly");this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return e2(t&&t.editor||null,this,e)}clone(e){const t=new ub(this._nodeMap,e===void 0?this._selection:e);return t._readOnly=!0,t}toJSON(){return e2(null,this,()=>({root:tR($t())}))}}class nD extends ai{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class rd extends ai{static getType(){return"paragraph"}static clone(e){return new rd(e.__key)}createDOM(e){const t=document.createElement("p"),n=Kd(e.theme,"paragraph");return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:RO,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(mn(t)){this.isEmpty()&&t.append(document.createElement("br"));const n=this.getFormatType();n&&(t.style.textAlign=n)}return{element:t}}static importJSON(e){return ct().updateFromJSON(e)}exportJSON(){const e=super.exportJSON();if(e.textFormat===void 0||e.textStyle===void 0){const t=this.getChildren().find(We);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){const n=ct();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(e.length===0||We(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function RO(s){const e=ct();if(s.style&&(e.setFormat(s.style.textAlign),dD(s,e)),e.getFormatType()===""){const t=s.getAttribute("align");t&&t&&t in RS&&e.setFormat(t)}return{node:e}}function ct(){return Ds(new rd)}function no(s){return s instanceof rd}const xt=0,ru=1,Qn=3,Al=4;function nR(s,e,t,n){const r=s._keyToDOMMap;r.clear(),s._editorState=tD(),s._pendingEditorState=n,s._compositionKey=null,s._dirtyType=0,s._cloneNotNeeded.clear(),s._dirtyLeaves=new Set,s._dirtyElements.clear(),s._normalizedNodes=new Set,s._updateTags=new Set,s._updates=[],s._blockCursorElement=null;const i=s._observer;i!==null&&(i.disconnect(),s._observer=null),e!==null&&(e.textContent=""),t!==null&&(t.textContent="",r.set("root",t))}function IO(s){const e=new Set,t=new Set;let n=s;for(;n;){const{ownNodeConfig:r}=Gv(n),i=n.transform;if(!t.has(i)){t.add(i);const a=n.transform();a&&e.add(a)}if(r){const a=r.$transform;a&&e.add(a),n=r.extends}else{const a=Object.getPrototypeOf(n);n=a.prototype instanceof eo&&a!==eo?a:void 0}}return e}function rR(s){const e=s||{},t=NO(),n=e.theme||{},r=s===void 0?t:e.parentEditor||null,i=e.disableEvents||!1,a=tD(),o=e.namespace||(r!==null?r._config.namespace:pR()),c=e.editorState,l=[Kp,Ml,zp,Hp,rd,nD,...e.nodes||[]],{onError:u,html:d}=e,h=e.editable===void 0||e.editable;let f;if(s===void 0&&t!==null)f=t._nodes;else{f=new Map;for(let y=0;y<l.length;y++){let g=l[y],b=null,v=null;if(typeof g!="function"){const _=g;g=_.replace,b=_.with,v=_.withKlass||null}Gv(g);const x=g.getType(),w=IO(g);f.set(x,{exportDOM:d&&d.export?d.export.get(g):void 0,klass:g,replace:b,replaceWithKlass:v,sharedNodeState:YP(l[y]),transforms:w})}}const p=new $h(a,r,f,{disableEvents:i,namespace:o,theme:n},u||console.error,(function(y,g){const b=new Map,v=new Set,x=w=>
285{Object.keys(w).forEach(_=>{let T=b.get(_);T===void 0&&(T=[],b.set(_,T)),T.push(w[_])})};return y.forEach(w=>{const _=w.klass.importDOM;if(_==null||v.has(_))return;v.add(_);const T=_.call(w.klass);T!==null&&x(T)}),g&&x(g),b})(f,d?d.import:void 0),h,s);return c!==void 0&&(p._pendingEditorState=c,p._dirtyType=2),(function(y){y.registerCommand(xU,cO,xt),y.registerCommand(_U,lO,xt),y.registerCommand(TU,uO,xt),y.registerCommand(SU,hO,xt),y.registerCommand($E,dO,xt)})(p),p}function MO(s,e){const t=s.get(e);s.delete(e),t&&t()}function rg(s,e,t){return s.set(e,t),MO.bind(null,s,e)}class $h{constructor(e,t,n,r,i,a,o,c){be(this,"_headless");be(this,"_parentEditor");be(this,"_rootElement");be(this,"_editorState");be(this,"_pendingEditorState");be(this,"_compositionKey");be(this,"_deferred");be(this,"_keyToDOMMap");be(this,"_updates");be(this,"_updating");be(this,"_listeners");be(this,"_commands");be(this,"_nodes");be(this,"_decorators");be(this,"_pendingDecorators");be(this,"_config");be(this,"_dirtyType");be(this,"_cloneNotNeeded");be(this,"_dirtyLeaves");be(this,"_dirtyElements");be(this,"_normalizedNodes");be(this,"_updateTags");be(this,"_observer");be(this,"_key");be(this,"_onError");be(this,"_htmlConversions");be(this,"_window");be(this,"_editable");be(this,"_blockCursorElement");be(this,"_createEditorArgs");this._createEditorArgs=c,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=pR(),this._onError=i,this._htmlConversions=a,this._editable=o,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return rg(this._listeners.update,e)}registerEditableListener(e){return rg(this._listeners.editable,e)}registerDecoratorListener(e){return rg(this._listeners.decorator,e)}registerTextContentListener(e){return rg(this._listeners.textcontent,e)}registerRootListener(e){const t=this._listeners.root;return Ti(rg(t,e,e(this._rootElement,null)||void 0),()=>(function(n,r,i){const a=n.get(r);a&&a(),n.set(r,r(...i)||void 0)})(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&ze(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const i=r.get(e);i===void 0&&ze(36,String(e));const a=i[n];return a.add(t),()=>{a.delete(t),i.every(o=>o.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation;let a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);const o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&ze(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=h2(n).get(t.getType());if(!r)return;const i=new Map;for(const a of r.keys())i.set(a,"created");i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){const a=this.registerNodeTransformToKlass(i,t);r.push(a)}return(function(a,o){const c=h2(a.getEditorState()),l=[];for(const u of o){const d=c.get(u);d&&l.push(d)}l.length!==0&&a.update(()=>{for(const u of l)for(const d of u.keys()){const h=ft(d);h&&h.markDirty()}},a._pendingEditorState===null?{tag:sc}:void 0)})(this,r.map(a=>a.klass.getType())),()=>{r.forEach(a=>a.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return Je(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;
285if(e!==t){const n=Kd(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,nR(this,t,e,r),t!==null&&(this._config.disableEvents||fO(t),n!=null&&t.classList.remove(...n)),e!==null){const i=hD(e),a=e.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=i,this._dirtyType=2,dU(this),this._updateTags.add(sc),Ja(this),this._config.disableEvents||(function(o,c){const l=o.ownerDocument;KS.set(o,l);const u=A1.get(l)??0;u<1&&l.addEventListener("selectionchange",OU),A1.set(l,u+1),o.__lexicalEditor=c;const d=PU(o);for(let h=0;h<$S.length;h++){const[f,p]=$S[h],y=typeof p=="function"?g=>{PA(g)||(MA(g),(c.isEditable()||f==="click")&&p(g,c))}:g=>{if(PA(g))return;MA(g);const b=c.isEditable();switch(f){case"cut":return b&&Je(c,zv,g);case"copy":return Je(c,jv,g);case"paste":return b&&Je(c,cb,g);case"dragstart":return b&&Je(c,CU,g);case"dragover":return b&&Je(c,JE,g);case"dragend":return b&&Je(c,iO,g);case"focus":return b&&Je(c,AU,g);case"blur":return b&&Je(c,kU,g);case"drop":return b&&Je(c,ZE,g)}};o.addEventListener(f,y),d.push(()=>{o.removeEventListener(f,y)})}})(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(sc),Ja(this);$g("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&ze(38);let n=e;n._readOnly&&(n=eR(e),n._selection=e._selection?e._selection.clone():null),hU(this);const r=this._pendingEditorState,i=this._updateTags,a=t!==void 0?t.tag:null;r===null||r.isEmpty()||(a!=null&&i.add(a),Ja(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,a!=null&&i.add(a),this._updating||Ja(this)}parseEditorState(e,t){return(function(n,r,i){const a=tD(),o=pr,c=xi,l=gr,u=r._dirtyElements,d=r._dirtyLeaves,h=r._cloneNotNeeded,f=r._dirtyType;r._dirtyElements=new Map,r._dirtyLeaves=new Set,r._cloneNotNeeded=new Set,r._dirtyType=0,pr=a,xi=!1,gr=r,rD(null);try{const p=r._nodes;eD(n.root,p),i&&i(),a._readOnly=!0}catch(p){p instanceof Error&&r._onError(p)}finally{r._dirtyElements=u,r._dirtyLeaves=d,r._cloneNotNeeded=h,r._dirtyType=f,pr=o,xi=c,gr=l}return a})(typeof e=="string"?JSON.parse(e):e,this,t)}read(e){return Ja(this),this.getEditorState().read(e,{editor:this})}update(e,t){(function(n,r,i){n._updating?n._updates.push([r,i]):Kv(n,r,i)})(this,e,t)}focus(e,t={}){const n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),Go(this,()=>{const r=Oe(),i=$t();r!==null?r.dirty||Yt(r.clone()):i.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?i.selectStart():i.selectEnd()),xl("focus"),WO(()=>{n.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=Hr(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,$g("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}be($h,"version");$h.version="0.43.0+prod.esm";let ZS=null;function rD(s){ZS=s}let PO=1;function iR(s,e){const t=iD(s,e);return t===void 0&&ze(30,e),t}function iD(s,e){return s._nodes.get(e)}const OO=typeof queueMicrotask=="function"?queueMicrotask:s=>{Promise.resolve().then(s)};function sR(s){return Pt(Gn(s))}function sD(s){const e=document.activeElement;if(!mn(e))return!1;const t=e.nodeName;return Pt(Gn(s))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&Xv(e)==null)}function hb(s,e,t){const n=s.getRootElement();try{return n!==null&&n.contains(e)&&n.contains(t)&&e!==null&&!sD(e)&&oR(e)===s}catch{return!1}}function oD(s){return s instanceof $h}function oR(s){let e=s;for(;e!=null;){const t=Xv(e);if(oD(t))return t;e=db(e)}return null}function Xv(s){return s?s.__lexicalEditor:null}function Uh(s){return HU(s)||s.isToken()}function bo(s){return Uh(s)||s.isSegmented()}function gc(s){return Jo(s)&&s.nodeType===3}function aR(s){return Jo(s)&&s.nodeType===9}function Fp(s){let e=s;for(;e!=null;){if(gc(e))return e;e=e.firstChild}return null}function M1(s,e,t){const n=Cl[e];
285if(t!==null&&(s&n)===(t&n))return s;let r=s^n;return e==="subscript"?r&=-65:e==="superscript"?r&=-33:e==="lowercase"?(r&=-513,r&=-1025):e==="uppercase"?(r&=-257,r&=-1025):e==="capitalize"&&(r&=-257,r&=-513),r}function cR(s){return We(s)||wl(s)||Pt(s)}function lR(s,e){const t=(function(){const a=ZS;return ZS=null,a})();if((e=e||t&&t.__key)!=null)return void(s.__key=e);Dr(),qU();const n=hn(),r=Ol(),i=""+PO++;r._nodeMap.set(i,s),Fe(s)?n._dirtyElements.set(i,!0):n._dirtyLeaves.add(i),n._cloneNotNeeded.add(i),n._dirtyType=1,s.__key=i}function Rh(s){const e=s.getParent();if(e!==null){const t=s.getWritable(),n=e.getWritable(),r=s.getPreviousSibling(),i=s.getNextSibling(),a=i!==null?i.__key:null,o=r!==null?r.__key:null,c=r!==null?r.getWritable():null,l=i!==null?i.getWritable():null;r===null&&(n.__first=a),i===null&&(n.__last=o),c!==null&&(c.__next=a),l!==null&&(l.__prev=o),t.__prev=null,t.__next=null,t.__parent=null,n.__size--}}function P1(s){qU(),N1(s)&&ze(323,s.__key,s.__type);const e=s.getLatest(),t=e.__parent,n=Ol(),r=hn(),i=n._nodeMap,a=r._dirtyElements;t!==null&&(function(c,l,u){let d=c;for(;d!==null;){if(u.has(d))return;const h=l.get(d);if(h===void 0)break;u.set(d,!1),d=h.__parent}})(t,i,a);const o=e.__key;r._dirtyType=1,Fe(s)?a.set(o,!0):r._dirtyLeaves.add(o)}function Cr(s){Dr();const e=hn(),t=e._compositionKey;if(s!==t){if(e._compositionKey=s,t!==null){const n=ft(t);n!==null&&n.getWritable()}if(s!==null){const n=ft(s);n!==null&&n.getWritable()}}}function ml(){return $p()?null:hn()._compositionKey}function ft(s,e){const t=(e||Ol())._nodeMap.get(s);return t===void 0?null:t}function uR(s,e){const t=Vv(s,hn());return t!==void 0?ft(t,e):null}function Vv(s,e){return s[`__lexicalKey_${e._key}`]}function Gn(s,e){let t=s;for(;t!=null;){const n=uR(t,e);if(n!==null)return n;t=db(t)}return null}function hR(s){const e=s._decorators,t=Object.assign({},e);return s._pendingDecorators=t,t}function i2(s){return s.read(()=>$t().getTextContent())}function $t(){return dR(Ol())}function dR(s){return s._nodeMap.get("root")}function Yt(s){Dr();const e=Ol();s!==null&&(s.dirty=!0,s.setCachedNodes(null)),e._selection=s}function Od(s){const e=hn(),t=(function(n,r){let i=n;for(;i!=null;){const a=Vv(i,r);if(a!==void 0)return a;i=db(i)}return null})(s,e);return t===null?s===e.getRootElement()?ft("root"):null:ft(t)}function fR(s){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(s)}function aD(s){const e=[];for(let t=s;t!==null;t=t._parentEditor)e.push(t);return e}function pR(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function gR(s){return gc(s)?s.nodeValue:null}function cD(s,e,t){const n=Hr(Qi(e));if(n===null)return;const r=n.anchorNode;let{anchorOffset:i,focusOffset:a}=n;
285if(r!==null){let o=gR(r);const c=Gn(r);if(o!==null&&We(c)){if((o===im||o===jE)&&t){const l=t.length;o=t,i=l,a=l}o!==null&&lD(c,o,i,a,s)}}}function lD(s,e,t,n,r){let i=s;if(i.isAttached()&&(r||!i.isDirty())){const a=i.isComposing();let o=e;if((a||r)&&(e.endsWith(im)&&(o=e.slice(0,-im.length)),r)){const l=jE;let u;for(;(u=o.indexOf(l))!==-1;)o=o.slice(0,u)+o.slice(u+l.length),t!==null&&t>u&&(t=Math.max(u,t-l.length)),n!==null&&n>u&&(n=Math.max(u,n-l.length))}const c=i.getTextContent();if(r||o!==c){if(o===""){if(Cr(null),Iv||ab||Mv)i.remove();else{const y=hn();setTimeout(()=>{y.update(()=>{i.isAttached()&&i.remove()})},20)}return}const l=i.getParent(),u=Yi(),d=i.getTextContentSize(),h=ml(),f=i.getKey();if(i.isToken()||h!==null&&f===h&&!a||Ie(u)&&(l!==null&&!l.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===s.__key&&u.anchor.offset===0&&!i.canInsertTextBefore()&&!a||u.focus.key===s.__key&&u.focus.offset===d&&!i.canInsertTextAfter()&&!a))return void i.markDirty();const p=Oe();if(!Ie(p)||t===null||n===null)return void s2(i,o,p);if(p.setTextNodeRange(i,t,i,n),i.isSegmented()){const y=wn(i.getTextContent());i.replace(y),i=y}s2(i,o,p)}}}function s2(s,e,t){if(s.setTextContent(e),Ie(t)){const n=s.getKey();for(const r of["anchor","focus"]){const i=t[r];i.type==="text"&&i.key===n&&(i.offset=Yo(s,i.offset,"clamp"))}}}function Lb(s,e,t){const n=e[t]||!1;return n==="any"||n===s[t]}function LO(s,e){return Lb(s,e,"altKey")&&Lb(s,e,"ctrlKey")&&Lb(s,e,"shiftKey")&&Lb(s,e,"metaKey")}function Xt(s,e,t){if(!LO(s,t))return!1;if(s.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>
2851||s.key.length===1&&s.key.charCodeAt(0)<=127)return!1;const n="Key"+e.toUpperCase();return s.code===n}const pa={ctrlKey:!qs,metaKey:qs},o2={altKey:qs,ctrlKey:!qs};function a2(s){return s.key==="Backspace"}function c2(s){return Xt(s,"a",pa)}function BO(s){const e=$t();if(Ie(s)){const t=s.anchor,n=s.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),Ap(s),s}{const t=e.select(0,e.getChildrenSize());return Yt(Ap(t)),t}}function Kd(s,e){s.__lexicalClassNameCache===void 0&&(s.__lexicalClassNameCache={});const t=s.__lexicalClassNameCache,n=t[e];if(n!==void 0)return n;const r=s[e];if(typeof r=="string"){const i=Fl(r);return t[e]=i,i}return r}function uD(s,e,t,n,r){if(t.size===0)return;const i=n.__type,a=n.__key,o=e.get(i);o===void 0&&ze(33,i);const c=o.klass;let l=s.get(c);l===void 0&&(l=new Map,s.set(c,l));const u=l.get(a),d=u==="destroyed"&&r==="created";(u===void 0||d)&&l.set(a,d?"updated":r)}function l2(s,e,t){const n=s.getParent();let r=t,i=s;return n!==null&&(e&&t===0?(r=i.getIndexWithinParent(),i=n):e||t!==i.getChildrenSize()||(r=i.getIndexWithinParent()+1,i=n)),i.getChildAtIndex(e?r-1:r)}function JS(s,e){const t=s.offset;if(s.type==="element")return l2(s.getNode(),e,t);{const n=s.getNode();if(e&&t===0||!e&&t===n.getTextContentSize()){const r=e?n.getPreviousSibling():n.getNextSibling();return r===null?l2(n.getParentOrThrow(),e,n.getIndexWithinParent()+(e?0:1)):r}}return null}function mR(s){const e=Qi(s).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function Je(s,e,t){return JU(s,e,t,s)}function Up(s,e){const t=s._keyToDOMMap.get(e);return t===void 0&&ze(75,e),t}function db(s){const e=s.assignedSlot||s.parentElement;return tE(e)?e.host:e}function yR(s){return aR(s)?s:mn(s)?s.ownerDocument:null}function xl(s){Dr(),hn()._updateTags.add(s)}function WO(s){Dr(),hn()._deferred.push(s)}function QS(s,e){let t=s.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function hD(s){const e=yR(s);return e?e.defaultView:null}function Qi(s){const e=s._window;return e===null&&ze(78),e}function jO(s){return Fe(s)&&s.isInline()||Pt(s)&&s.isInline()}function zO(s){let e=s.getParentOrThrow();for(;e!==null;){if(ri(e))return e;e=e.getParentOrThrow()}return e}function ri(s){return Vn(s)||Fe(s)&&s.isShadowRoot()}function ei(s,e=!1){const t=s.constructor.clone(s);return lR(t,null),t.afterCloneFrom(s),e||t.resetOnCopyNodeFrom(s),t}function Ds(s){const e=hn(),t=s.getType(),n=iD(e,t);n===void 0&&ze(200,s.constructor.name,t);const{replace:r,replaceWithKlass:i}=n;if(r!==null){const a=r(s),o=a.constructor;return i!==null?a instanceof i||ze(201,i.name,i.getType(),o.name,o.getType(),s.constructor.name,t):a instanceof s.constructor&&o!==s.constructor||ze(202,o.name,o.getType(),s.constructor.name,t),a.__key===s.__key&&ze(203,s.constructor.name,t,o.name,o.getType()),a}return s}function Ww(s,e){!Vn(s.getParent())||Fe(e)||Pt(e)||ze(99)}function Xg(s){const e=ft(s);return e===null&&ze(63,s),e}function jw(s){return(Pt(s)||Fe(s)&&!s.canBeEmpty())&&!s.isInline()}function eE(s,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const n=s.parentElement;n!==null&&n.removeChild(s)}function Hr(s){return so?(s||window).getSelection():null}function HO(s){const e=hD(s);return e?e.getSelection():null}function mn(s){return Jo(s)&&s.nodeType===1}function Jo(s){return typeof s=="object"&&s!==null&&"nodeType"in s&&typeof s.nodeType=="number"}function tE(s){return Jo(s)&&s.nodeType===11}function nE(s){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return s.nodeName.match(e)!==null}function O1(s){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return s.nodeName.match(e)!==null}function bs(s){if(Pt(s)&&!s.isInline())return!0;if(!Fe(s)||ri(s))return!1;const e=s.getFirstChild(),t=e===null||wl(e)||We(e)||e.isInline();return!s.isInline()&&s.canBeEmpty()!==!1&&t}function fb(){return hn()}const u2=new WeakMap,$O=new Map;function h2(s){if(!s._readOnly&&s.isEmpty())return $O;s._readOnly||ze(192);let e=u2.get(s);return e||(e=(function(t){const n=new Map;for(const[r,i]of t._nodeMap){const a=i.__type;let o=n.get(a);o||(o=new Map,n.set(a,o)),o.set(r,i)}return n})(s),u2.set(s,e)),e}function bR(s){const e=s.constructor.clone(s);return e.afterCloneFrom(s),e}function KO(s){return(e=bR(s))[LU]=!0,e;var e}function dD(s,e){const t=parseInt(s.style.paddingInlineStart,10)||0,n=Math.round(t/40);e.setIndent(n)}function XO(s){s.__lexicalUnmanaged=!0}function VO(s){return s.__lexicalUnmanaged===!0}function ig(s,e){return(function(t,n){return Object.prototype.hasOwnProperty.call(t,n)})(s,e)&&s[e]!==eo[e]}function Gv(s){const e=_A in s.prototype?s.prototype[_A]():void 0,t=(function(a){if
285(!(a===eo||a.prototype instanceof eo)){let o="<unknown>",c="<unknown>";try{o=a.getType()}catch{}try{$h.version&&(c=JSON.parse($h.version))}catch{}ze(290,a.name,o,c)}return a===QU||a===ai||a===eo})(s),n=!t&&ig(s,"getType")?s.getType():void 0;let r,i=n;if(e)if(n)r=e[n];else for(const[a,o]of Object.entries(e))i=a,r=o;if(!t&&i&&(ig(s,"getType")||(s.getType=()=>i),ig(s,"clone")||(s.clone=a=>(rD(a),new s)),ig(s,"importJSON")||(s.importJSON=r&&r.$importJSON||(a=>new s().updateFromJSON(a))),!ig(s,"importDOM")&&r)){const{importDOM:a}=r;a&&(s.importDOM=()=>a)}return{ownNodeConfig:r,ownNodeType:i}}const St=(s,e)=>{let t=s;for(;t!=null&&!Vn(t);){if(e(t))return t;t=t.getParent()}return null},GO={next:"previous",previous:"next"};class fD{constructor(e){be(this,"origin");this.origin=e}[Symbol.iterator](){return qv({hasNext:kl,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return An(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return An(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){const n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,n="next"){const r=n===this.direction?t:Array.from(t).reverse();let i=this;const a=this.getParentAtCaret(),o=new Map;for(let c=i.getAdjacentCaret();c!==null&&o.size<e;c=c.getAdjacentCaret()){const l=c.origin.getWritable();o.set(l.getKey(),l)}for(const c of r){if(o.size>0){const l=i.getNodeAtCaret();if(l){if(o.delete(l.getKey()),o.delete(c.getKey()),!(l.is(c)||i.origin.is(c))){const u=c.getParent();u&&u.is(a)&&c.remove(),l.replace(c)}}else l===null&&ze(263,Array.from(o).join(" "))}else i.insert(c);i=An(c,this.direction)}for(const c of o.values())c.remove();return this}}class cm extends fD{constructor(){super(...arguments);be(this,"type","child")}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:jr(t,this.direction)}getParentCaret(t="root"){return An(pD(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=id(this.direction);return An(this.getNodeAtCaret(),t)||jr(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof cm&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const qO={root:Vn,shadowRoot:ri};function id(s){return GO[s]}function pD(s,e="root"){return qO[e](s)?null:s}class Kh extends fD{constructor(){super(...arguments);be(this,"type","sibling")}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:An(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return Fe(this.origin)?jr(this.origin,this.direction):null}getParentCaret(t="root"){return An(pD(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=id(this.direction);return An(this.getNodeAtCaret(),t)||jr(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof Kh&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof Kh||t instanceof Xh)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Xh extends fD{constructor(t,n){super(t);be(this,"type","text");be(this,"offset");this.offset=n}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Vh(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return An(pD(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Vh(this.origin,id(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Xh&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof Kh||t instanceof Xh)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return An(this.origin,this.direction)}}function qo(s){return s instanceof Xh}function kl(s){return s instanceof Kh}function ii(s){return s instanceof cm}const YO={next:class extends Xh{constructor(){super(...arguments);be(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Xh{constructor(){super(...arguments);be(this,"direction","previous")}
285getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},ZO={next:class extends Kh{constructor(){super(...arguments);be(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Kh{constructor(){super(...arguments);be(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},JO={next:class extends cm{constructor(){super(...arguments);be(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends cm{constructor(){super(...arguments);be(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function An(s,e){return s?new ZO[e](s):null}function Vh(s,e,t){return s?new YO[e](s,Yo(s,t)):null}function Yo(s,e,t="error"){const n=s.getTextContentSize();let r=e==="next"?n:e==="previous"?0:e;return(r<0||r>n)&&(t!=="clamp"&&sU(284,String(e),String(n),s.getKey()),r=r<0?0:n),r}function d2(s,e){return new eL(s,e)}function jr(s,e){return Fe(s)?new JO[e](s):null}function QO(s){return s&&s.getChildCaret()||s}function Gh(s){return s&&QO(s.getAdjacentCaret())}class gD{constructor(e,t,n){be(this,"type","node-caret-range");be(this,"direction");be(this,"anchor");be(this,"focus");this.anchor=e,this.focus=t,this.direction=n}getLatest(){const e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new gD(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=r=>{const i=this[r].getLatest();return qo(i)?(function(a,o){const{direction:c,origin:l}=a,u=Yo(l,o==="focus"?id(c):c);return d2(a,u-a.offset)})(i,r):null},t=e("anchor"),n=e("focus");if(t&&n){const{caret:r}=t,{caret:i}=n;if(r.isSameNodeCaret(i))return[d2(r,i.offset-r.offset),null]}return[t,n]}iterNodeCarets(e="root"){const t=qo(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=qo(n),i=a=>a.isSameNodeCaret(n)?null:Gh(a)||a.getParentCaret(e);return qv({hasNext:a=>a!==null&&!(r&&n.isSameNodeCaret(a)),initial:t.isSameNodeCaret(n)?null:i(t),map:a=>a,step:i})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class eL{constructor(e,t){be(this,"type","slice");be(this,"caret");be(this,"distance");this.caret=e,this.distance=t}getSliceIndices(){const{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){const[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return Vh(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}}function lm(s){return Nl(s,An($t(),s.direction))}function vR(s){return Nl(s,s)}function Nl(s,e){return s.direction!==e.direction&&ze(265),new gD(s,e,s.direction)}function qv(s){const{initial:e,hasNext:t,step:n,map:r}=s;let i=e;return{[Symbol.iterator](){return this},next(){if(!t(i))return{done:!0,value:void 0};const a={done:!1,value:r(i)};return i=n(i),a}}}function wR(s,e){const t=o1(s.origin,e.origin);switch(t===null&&ze(275,s.origin.getKey(),e.origin.getKey()),t.type){case"same":{const n=s.type==="text",r=e.type==="text";return n&&r?(function(i,a){return Math.sign(i-a)})(s.offset,e.offset):s.type===e.type?0:n?-1:r?1:s.type==="child"?-1:1}case"ancestor":return s.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return xR(t)}}function xR(s){const{a:e,b:t}=s,n=e.__key,r=t.__key;let i=e,a=t;for(;i&&a;i=i.getNextSibling(),a=a.getNextSibling()){if(i.__key===r)return-1;if(a.__key===n)return 1}return i===null?1:-1}function Bb(s,e){return e.is(s)}function f2(s){return Fe(s)?[s.getLatest(),null]:[s.getParent(),s.getLatest()]}function o1(s,e){if(s.is(e))return{commonAncestor:s,type:"same"};const t=new Map;for(let[n,r]=f2(s);n;r=n,n=n.getParent())t.set(n,r);for(let[n,r]=f2(e);n;r=n,n=n.getParent()){const i=t.get(n);if(i!==void 0)return i===null?(Bb(s,n)||ze(276),{commonAncestor:n,type:"ancestor"}):r===null?(Bb(e,n)||ze(277),{commonAncestor:n,type:"descendant"}):((Fe(i)||Bb(s,i))&&(Fe(r)||Bb(e,r))&&n.is(i.getParent())&&n.is(r.getParent())||ze(278),{a:i,b:r,commonAncestor:n,type:"branch"})}return null}function ro(s,e){const{type:t,key:n,offset:r}=s,i=Xg(s.key);return t==="text"?(We(i)||ze(266,i.getType(),n),Vh(i,e,r)):(Fe(i)||ze(267,i.getType(),n),nL(i,s.offset,e))}function Ys(s,e){const{origin:t,direction:n}=e,r=n==="next";qo(e)?s.set(t.getKey(),e.offset,"text"):kl(e)?We(t)?s.set(t.getKey(),Yo(t,n),"text"):s.set(t.getParentOrThrow().getKey(),t.getIndexWithinParent()+(r?1:0),"element"):(ii(e)&&Fe(t)||ze(268),s.set(t.getKey(),r?0:t.getChildrenSize(),"element"))}function _R(s){const e=Oe(),t=Ie(e)?e:Pl();return a1(t,s),Yt(t),t}function a1(s,e){Ys(s.anchor,e.anchor),Ys(s.focus,e.focus)}function rE(s){const{anchor:e,focus:t}=s,n=ro(e,"next"),r=ro(t,"next"),i=wR(n,r)<=0?"next":"previous";return Nl(uc(n,i),uc(r,i))}function pb(s){const{direction:e,origin:t}=s,n=An(t,id(e)).getNodeAtCaret();return n?An(n,e):jr(t.getParentOrThrow(),e)}function p2(s,e="root"){const t=[s];for(let n=ii(s)?s.getParentCaret(e):s.getSiblingCaret();n!==null;
285n=n.getParentCaret(e))t.push(pb(n));return t}function zw(s){return!!s&&s.origin.isAttached()}function tL(s,e="removeEmptySlices"){if(s.isCollapsed())return s;const t="root",n="next";let r=e;const i=TR(s,n),a=p2(i.anchor,t),o=p2(i.focus.getFlipped(),t),c=new Set,l=[];for(const p of i.iterNodeCarets(t))if(ii(p))c.add(p.origin.getKey());else if(kl(p)){const{origin:y}=p;Fe(y)&&!c.has(y.getKey())||l.push(y)}for(const p of l)p.remove();for(const p of i.getTextSlices()){if(!p)continue;const{origin:y}=p.caret,g=y.getTextContentSize(),b=pb(An(y,n)),v=y.getMode();if(Math.abs(p.distance)===g&&r==="removeEmptySlices"||v==="token"&&p.distance!==0)b.remove();else if(p.distance!==0){r="removeEmptySlices";let x=p.removeTextSlice();const w=p.caret.origin;if(v==="segmented"){const _=x.origin,T=wn(_.getTextContent()).setStyle(_.getStyle()).setFormat(_.getFormat());b.replaceOrInsert(T),x=Vh(T,n,x.offset)}w.is(a[0].origin)&&(a[0]=x),w.is(o[0].origin)&&(o[0]=x.getFlipped())}}let u,d;for(const p of a)if(zw(p)){u=ti(p);break}for(const p of o)if(zw(p)){d=ti(p);break}const h=(function(p,y,g){if(!p||!y)return null;const b=p.getParentAtCaret(),v=y.getParentAtCaret();if(!b||!v)return null;const x=b.getParents().reverse();x.push(b);const w=v.getParents().reverse();w.push(v);const _=Math.min(x.length,w.length);let T;for(T=0;T<_&&x[T]===w[T];T++);const S=(N,M)=>{let F;for(let L=T;L<N.length;L++){const A=N[L];if(ri(A))return;!F&&M(A)&&(F=A)}return F},C=S(x,bs),D=C&&S(w,N=>g.has(N.getKey())&&bs(N));return C&&D?[C,D]:null})(u,d,c);if(h){const[p,y]=h;jr(p,"previous").splice(0,y.getChildren());let g=y.getParent();for(y.remove(!0);g&&g.isEmpty();){const b=g;g=g.getParent(),b.remove(!0)}}const f=[u,d,...a,...o].find(zw);if(f)return vR(uc(ti(f),s.direction));ze(269,JSON.stringify(a.map(p=>p.origin.__key)))}function ti(s){const e=(function(r){let i=r;for(;ii(i);){const a=Gh(i);if(!ii(a))break;i=a}return i})(s.getLatest()),{direction:t}=e;if(We(e.origin))return qo(e)?e:Vh(e.origin,t,t);const n=e.getAdjacentCaret();return kl(n)&&We(n.origin)?Vh(n.origin,t,id(t)):e}function mD(s){return qo(s)&&s.offset!==Yo(s.origin,s.direction)}function uc(s,e){return s.direction===e?s:s.getFlipped()}function TR(s,e){return s.direction===e?s:Nl(uc(s.focus,e),uc(s.anchor,e))}function nL(s,e,t){let n=jr(s,"next");for(let r=0;r<e;r++){const i=n.getAdjacentCaret();if(i===null)break;n=i}return uc(n,t)}function SR(s,e="root"){let t=0,n=s,r=Gh(n);for(;r===null;){if(t--,r=n.getParentCaret(e),!r)return null;n=r,r=Gh(n)}return r&&[r,t]}function rL(s){const{origin:e,offset:t,direction:n}=s;if(t===Yo(e,n))return s.getSiblingCaret();if(t===Yo(e,id(n)))return pb(s.getSiblingCaret());const[r]=e.splitText(t);return We(r)||ze(281),uc(An(r,"next"),n)}function iL(s,e){return!0}function sL(s,{$copyElementNode:e=ei,$splitTextPointCaretNext:t=rL,rootMode:n="shadowRoot",$shouldSplit:r=iL}={}){if(qo(s))return t(s);const i=s.getParentCaret(n);if(i){const{origin:a}=i;if(ii(s)&&(!a.canBeEmpty()||!r(a,"first")))return pb(i);const o=(function(c){const l=[];for(let u=c.getAdjacentCaret();u;u=u.getAdjacentCaret())l.push(u.origin);return l})(s);(o.length>0||a.canBeEmpty()&&r(a,"last"))&&i.insert(e(a).splice(0,0,o))}return i}function oL(...s){return s}function aL(s,e){if(!e||s===e)return s;for(const t in e)if(s[t]!==e[t])return{...s,...e};return s}function Fl(...s){const e=[];for(const t of s)if(t&&typeof t=="string")for(const[n]of t.matchAll(/\S+/g))e.push(n);return e}function vi(s,...e){const t=Fl(...e);t.length>0&&s.classList.add(...t)}function _l(s,...e){const t=Fl(...e);t.length>0&&s.classList.remove(...t)}function Ti(...s){return()=>{for(let e=s.length-1;e>=0;e--)s[e]();s.length=0}}const ER=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,cL=ER?Ee.useLayoutEffect:Ee.useEffect,Wb={tag:sc};function DR({initialConfig:s,children:e}){const t=Ee.useMemo(()=>{const{theme:n,namespace:r,nodes:i,onError:a,editorState:o,html:c}=s,l=a4(null,n),u=rR({editable:s.editable,html:c,namespace:r,nodes:i,onError:d=>a(d,u),theme:n});return(function(d,h){if(h!==null){if(h===void 0)d.update(()=>{const f=$t();if(f.isEmpty()){const p=ct();f.append(p);const y=ER?document.activeElement:null;(Oe()!==null||y!==null&&y===d.getRootElement())&&p.select()}},Wb);else if(h!==null)switch(typeof h){case"string":{const f=d.parseEditorState(h);d.setEditorState(f,Wb);break}case"object":d.setEditorState(h,Wb);break;case"function":d.update(()=>{$t().isEmpty()&&h(d)},Wb)}}})(u,o),[u,l]},[]);return cL(()=>{const n=s.editable,[r]=t;r.setEditable(n===void 0||n)},[]),G.jsx(o4.Provider,{value:t,children:e})}const lL=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Ee.useLayoutEffect:Ee.useEffect;function uL(s){return{initialValueFn:()=>s.isEditable(),subscribe:e=>
285s.registerEditableListener(e)}}function hL(){return(function(s){const[e]=Kt(),t=Ee.useMemo(()=>s(e),[e,s]),[n,r]=Ee.useState(()=>t.initialValueFn()),i=Ee.useRef(n);return lL(()=>{const{initialValueFn:a,subscribe:o}=t,c=a();return i.current!==c&&(i.current=c,r(c)),o(l=>{i.current=l,r(l)})},[t,s]),n})(uL)}function dL(s,...e){const t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",s);for(const r of e)n.append("v",r);throw t.search=n.toString(),Error(`Minified Lexical error #${s}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const L1=new Map;function CR(s){const e={};if(!s)return e;const t=s.split(";");for(const n of t)if(n!==""){const[r,i]=n.split(/:([^]+)/);r&&i&&(e[r.trim()]=i.trim())}return e}function um(s){let e=L1.get(s);return e===void 0&&(e=CR(s),L1.set(s,e)),e}function fL(s){let e="";for(const t in s)t&&(e+=`${t}: ${s[t]};`);return e}function AR(s){const e=fb().getElementByKey(s.getKey());if(e===null)return null;const t=e.ownerDocument.defaultView;return t===null?null:t.getComputedStyle(e)}function kR(s){return AR(Vn(s)?s:s.getParentOrThrow())}function g2(s){const e=kR(s);return e!==null&&e.direction==="rtl"}function NR(s,e,t="self"){const n=s.getStartEndPoints();if(e.isSelected(s)&&!bo(e)&&n!==null){const[r,i]=n,a=s.isBackward(),o=r.getNode(),c=i.getNode(),l=e.is(o),u=e.is(c);if(l||u){const[d,h]=YS(s),f=o.is(c),p=e.is(a?c:o),y=e.is(a?o:c);let g,b=0;f?(b=d>h?h:d,g=d>h?d:h):p?(b=a?h:d,g=void 0):y&&(b=0,g=a?d:h);const v=e.__text.slice(b,g);v!==e.__text&&(t==="clone"&&(e=KO(e)),e.__text=v)}}return e}function pL(s){const e=s.getStyle(),t=CR(e);L1.set(e,t)}function jb(s,e){(Ie(s)?s.isCollapsed():We(s)||Fe(s))||dL(280);const t=um(Ie(s)?s.style:We(s)?s.getStyle():s.getTextStyle()),n=Object.entries(e).reduce((i,[a,o])=>(typeof o=="function"?i[a]=o(t[a],s):o===null?delete i[a]:i[a]=o,i),{...t}),r=fL(n);Ie(s)||We(s)?s.setStyle(r):s.setTextStyle(r),L1.set(r,n)}function FR(s,e){if(Ie(s)&&s.isCollapsed()){jb(s,e);const n=s.anchor.getNode();Fe(n)&&n.isEmpty()&&jb(n,e)}gL(n=>{jb(n,e)});const t=s.getNodes();if(t.length>0){const n=new Set;for(const r of t){if(!Fe(r)||!r.canBeEmpty()||r.getChildrenSize()!==0)continue;const i=r.getKey();n.has(i)||(n.add(i),jb(r,e))}}}function gL(s){const e=Oe();if(!e)return;const t=new Map,n=i=>t.get(i.getKey())||[0,i.getTextContentSize()];if(Ie(e))for(const i of rE(e).getTextSlices())i&&t.set(i.caret.origin.getKey(),i.getSliceIndices());const r=e.getNodes();for(const i of r){if(!We(i)||!i.canHaveFormat())continue;const[a,o]=n(i);o!==a&&(bo(i)||a===0&&o===i.getTextContentSize()?s(i):s(i.splitText(a,o)[a===0?0:1]))}Ie(e)&&e.anchor.type==="text"&&e.focus.type==="text"&&e.anchor.key===e.focus.key&&mL(e)}function mL(s){if(s.isBackward()){const{anchor:e,focus:t}=s,{key:n,offset:r,type:i}=e;e.set(t.key,t.offset,t.type),t.set(n,r,i)}}function yL(s,e){const t=s.getFormatType(),n=s.getIndent();t!==e.getFormatType()&&e.setFormat(t),n!==e.getIndent()&&e.setIndent(n)}function zb(s,e,t=yL){if(s===null)return;const n=s.getStartEndPoints(),r=new Map;let i=null;if(n){const[a,o]=n;i=Pl(),i.anchor.set(a.key,a.offset,a.type),i.focus.set(o.key,o.offset,o.type);const c=St(a.getNode(),bs),l=St(o.getNode(),bs);Fe(c)&&r.set(c.getKey(),c),Fe(l)&&r.set(l.getKey(),l)}for(const a of s.getNodes())if(Fe(a)&&bs(a))r.set(a.getKey(),a);else if(n===null){const o=St(a,bs);Fe(o)&&r.set(o.getKey(),o)}for(const[a,o]of r){const c=e();t(o,c),o.replace(c,!0),i&&(a===i.anchor.key&&i.anchor.set(c.getKey(),i.anchor.offset,i.anchor.type),a===i.focus.key&&i.focus.set(c.getKey(),i.focus.offset,i.focus.type))}i&&s.is(Oe())&&Yt(i)}function UR(s){const e=RR(s);return e!==null&&e.writingMode==="vertical-rl"}function RR(s){const e=s.anchor.getNode();return Fe(e)?AR(e):kR(e)}function m2(s,e){let t=UR(s)?!e:e;IR(s)&&(t=!t);const n=ro(s.focus,t?"previous":"next");if(mD(n))return!1;for(const r of lm(n)){if(ii(r))return!r.origin.isInline();if(!Fe(r.origin)){if(Pt(r.origin))return!0;break}}return!1}function bL(s,e,t,n){s.modify(e?"extend":"move",t,n)}function IR(s){const e=RR(s);return e!==null&&e.direction==="rtl"}function y2(s,e,t){const n=IR(s);let r;r=UR(s)||n?!t:t,bL(s,e,r,"character")}function vL(s,e,t){const n=um(s.getStyle());return n!==null&&n[e]||t}function Vg(s,e,t=""){let n=null;const r=s.getNodes(),i=s.anchor,a=s.focus,o=s.isBackward(),c=o?a.getNode():i.getNode(),l=o?i.getNode():a.getNode(),u=o?a.offset:i.offset,d=o?i.offset:a.offset;if(Ie(s)&&s.isCollapsed()&&s.style!==""){const h=um(s.style);if(h!==null&&e in h)return h[e]}for(let h=0;h<r.length;h++){const f=r[h];if((h!==0||!f.is(c)||!We(f)||u!==f.getTextContentSize())&&(h===0||!f.is(l)||d!==0)&&We(f)){const p=vL(f,e,t);if(n===null)n=p;else if(n!==p){n="";break}}}return n===null?t:n}function MR(s,...e){const t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",s);for(const r of e)n.append("v",r);throw t.search=n.toString(),Error(`Minified Lexical error #${s}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const PR=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,wL=PR&&"documentMode"in document?document.documentMode:null;!(!PR||!("InputEvent"in window)||wL)&&"getTargetRanges"in new window.InputEvent("input");function xL(s,e){return Array.from(_L(s))}function _L(s,e){return SL("next",s)}function TL(s,e){const t=SR(An(s,e));return t&&t[0]}function SL(s,e,t){const n=$t(),r=e||n,i=Fe(r)?jr(r,s):An(r,s),a=EL(r),o=TL(r,s);let c=a;return qv({hasNext:l=>l!==null,initial:i,map:l=>({depth:c,node:l.origin}),step:l=>{if(l.isSameNodeCaret(o))return null;ii(l)&&c++;const u=SR(l);return!u||u[0].isSameNodeCaret(o)?null:(c+=u[1],u[0])}})}function EL(s){let e=-1;for(let t=s;t!==null;t=t.getParent())e++;return e}function DL(s,e){let t=s;for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null}function hm(s){const e=St(s,t=>Fe(t)&&!t.isInline());return Fe(e)||MR(4,s.__key),e}function CL(s){const e=Oe()||Yi();let t;if(Ie(e))t=ro(e.focus,"next");else{if(e!=null){const a=e.getNodes(),o=a[a.length-1];o&&(t=An(o,"next"))}t=t||jr($t(),"previous").getFlipped().insert(ct())}const n=AL(s,t),r=Gh(n),i=ii(r)?ti(r):n;return _R(vR(i)),s.getLatest()}function AL(s,e,t){let n=uc(e,"next");for(let r=n;r;r=sL(r,t))n=r;return qo(n)&&MR(283),n.insert(s.isInline()?ct().append(s):s),uc(An(s.getLatest(),"next"),e.direction)}function yl(s,e){return s!==null&&Object.getPrototypeOf(s).constructor.name===e.name}function iE(s){const e=Oe();if(!Ie(e))return!1;const t=new Set,n=e.getNodes();for(let r=0;r<n.length;r++){const i=n[r],a=i.getKey();if(t.has(a))continue;const o=St(i,l=>Fe(l)&&!l.isInline());if(o===null)continue;const c=o.getKey();o.canIndent()&&!t.has(c)&&(t.add(c),s(o))}return t.size>0}function kL(s,e){jr(s,"next").insert(e)}function OR(s,e){return LR(s,e,null)}function LR(s,e,t){let n=!1;for(const r of WR(s))e(r)?t!==null&&t(r):(n=!0,Fe(r)&&LR(r,e,t||(i=>r.insertAfter(i))),r.remove());return n}function BR(s,e){const t=[],n=Array.from(s).reverse();for(let r=n.pop();r!==void 0;r=n.pop())if(e(r))t.push(r);else if(Fe(r))for(const i of WR(r))n.push(i);return t}
285function WR(s){return NL(jr(s,"previous"))}function NL(s){return qv({hasNext:kl,initial:s.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}const FL=Symbol.for("preact-signals");function Yv(){if(oc>1)return void oc--;let s,e=!1;for(!(function(){let t=B1;for(B1=void 0;t!==void 0;)t.S.v===t.v&&(t.S.i=t.i),t=t.o})();Gg!==void 0;){let t=Gg;for(Gg=void 0,W1++;t!==void 0;){const n=t.u;if(t.u=void 0,t.f&=-3,!(8&t.f)&&jR(t))try{t.c()}catch(r){e||(s=r,e=!0)}t=n}}if(W1=0,oc--,e)throw s}function UL(s){if(oc>0)return s();sE=++RL,oc++;try{return s()}finally{Yv()}}let jt,Gg;function b2(s){const e=jt;jt=void 0;try{return s()}finally{jt=e}}let B1,oc=0,W1=0,RL=0,sE=0,c1=0;function v2(s){if(jt===void 0)return;let e=s.n;return e===void 0||e.t!==jt?(e={i:0,S:s,p:jt.s,n:void 0,t:jt,e:void 0,x:void 0,r:e},jt.s!==void 0&&(jt.s.n=e),jt.s=e,s.n=e,32&jt.f&&s.S(e),e):e.i===-1?(e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=jt.s,e.n=void 0,jt.s.n=e,jt.s=e),e):void 0}function Vr(s,e){this.v=s,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=e==null?void 0:e.watched,this.Z=e==null?void 0:e.unwatched,this.name=e==null?void 0:e.name}function yD(s,e){return new Vr(s,e)}function jR(s){for(let e=s.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function w2(s){for(let e=s.s;e!==void 0;e=e.n){const t=e.S.n;if(t!==void 0&&(e.r=t),e.S.n=e,e.i=-1,e.n===void 0){s.s=e;break}}}function zR(s){let e,t=s.s;for(;t!==void 0;){const n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}s.s=e}function ud(s,e){Vr.call(this,void 0),this.x=s,this.s=void 0,this.g=c1-1,this.f=4,this.W=e==null?void 0:e.watched,this.Z=e==null?void 0:e.unwatched,this.name=e==null?void 0:e.name}function HR(s){const e=s.m;if(s.m=void 0,typeof e=="function"){oc++;const t=jt;jt=void 0;try{e()}catch(n){throw s.f&=-2,s.f|=8,bD(s),n}finally{jt=t,Yv()}}}function bD(s){for(let e=s.s;e!==void 0;e=e.n)e.S.U(e);s.x=void 0,s.s=void 0,HR(s)}function IL(s){if(jt!==this)throw new Error("Out-of-order effect");zR(this),jt=s,this.f&=-2,8&this.f&&bD(this),Yv()}function Nd(s,e){this.x=s,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=e==null?void 0:e.name}function vD(s,e){const t=new Nd(s,e);try{t.c()}catch(r){throw t.d(),r}const n=t.d.bind(t);return n[Symbol.dispose]=n,n}function $R(s,e={}){const t={};for(const n in s){const r=e[n],i=yD(r===void 0?s[n]:r);t[n]=i}return t}Vr.prototype.brand=FL,Vr.prototype.h=function(){return!0},Vr.prototype.S=function(s){const e=this.t;e!==s&&s.e===void 0&&(s.x=e,this.t=s,e!==void 0?e.e=s:b2(()=>{var t;(t=this.W)==null||t.call(this)}))},Vr.prototype.U=function(s){if(this.t!==void 0){const e=s.e,t=s.x;e!==void 0&&(e.x=t,s.e=void 0),t!==void 0&&(t.e=e,s.x=void 0),s===this.t&&(this.t=t,t===void 0&&b2(()=>{var n;(n=this.Z)==null||n.call(this)}))}},Vr.prototype.subscribe=function(s){return vD(()=>{const e=this.value,t=jt;jt=void 0;try{s(e)}finally{jt=t}},{name:"sub"})},Vr.prototype.valueOf=function(){return this.value},Vr.prototype.toString=function(){return this.value+""},Vr.prototype.toJSON=function(){return this.value},Vr.prototype.peek=function(){const s=jt;jt=void 0;try{return this.value}finally{jt=s}},Object.defineProperty(Vr.prototype,"value",{get(){const s=v2(this);return s!==void 0&&(s.i=this.i),this.v},set(s){if(s!==this.v){if(W1>100)throw new Error("Cycle detected");(function(e){oc!==0&&W1===0&&e.l!==sE&&(e.l=sE,B1={S:e,v:e.v,i:e.i,o:B1})})(this),this.v=s,this.i++,c1++,oc++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Yv()}}}}),ud.prototype=new Vr,ud.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===c1))return!0;if(this.g=c1,this.f|=1,this.i>0&&!jR(this))return this.f&=-2,!0;const s=jt;try{w2(this),jt=this;const e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return jt=s,zR(this),this.f&=-2,!0},ud.prototype.S=function(s){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}Vr.prototype.S.call(this,s)},ud.prototype.U=function(s){if(this.t!==void 0&&(Vr.prototype.U.call(this,s),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},ud.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let s=this.t;s!==void 0;s=s.x)s.t.N()}}
285,Object.defineProperty(ud.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const s=v2(this);if(this.h(),s!==void 0&&(s.i=this.i),16&this.f)throw this.v;return this.v}}),Nd.prototype.c=function(){const s=this.S();try{if(8&this.f||this.x===void 0)return;const e=this.x();typeof e=="function"&&(this.m=e)}finally{s()}},Nd.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,HR(this),w2(this),oc++;const s=jt;return jt=this,IL.bind(this,s)},Nd.prototype.N=function(){2&this.f||(this.f|=2,this.u=Gg,Gg=this)},Nd.prototype.d=function(){this.f|=8,1&this.f||bD(this)},Nd.prototype.dispose=function(){this.d()};function ML(s){return(typeof s.nodes=="function"?s.nodes():s.nodes)||[]}jp("format",{parse:s=>typeof s=="number"?s:0});function cn(s,...e){const t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",s);for(const r of e)n.append("v",r);throw t.search=n.toString(),Error(`Minified Lexical error #${s}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function KR(s,e){if(s&&e&&!Array.isArray(e)&&typeof s=="object"&&typeof e=="object"){const t=s,n=e;for(const r in n)t[r]=KR(t[r],n[r]);return s}return e}const wD=0,oE=1,XR=2,Hw=3,Hb=4,hd=5,$w=6,sg=7;function Kw(s){return s.id===wD}function VR(s){return s.id===XR}function PL(s){return(function(e){return e.id===oE})(s)||cn(305,String(s.id),String(oE)),Object.assign(s,{id:XR})}const OL=new Set;let LL=class{constructor(e,t){be(this,"builder");be(this,"configs");be(this,"_dependency");be(this,"_peerNameSet");be(this,"extension");be(this,"state");be(this,"_signal");this.builder=e,this.extension=t,this.configs=new Set,this.state={id:wD}}mergeConfigs(){let e=this.extension.config||{};const t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):aL;for(const n of this.configs)e=t(e,n);return e}init(e){const t=this.state;VR(t)||cn(306,String(t.id));const n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=(function(o,c,l){return Object.assign(o,{config:c,id:Hw,registerState:l})})(t,this.mergeConfigs(),n);let a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=(function(o,c,l){return Object.assign(o,{id:Hb,initResult:c,registerState:l})})(i,a,r)}build(e){const t=this.state;let n;t.id!==Hb&&cn(307,String(t.id),String(hd)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));const r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=(function(i,a,o){return Object.assign(i,{id:hd,output:a,registerState:o})})(t,n,r)}register(e,t){this._signal=t;const n=this.state;n.id!==hd&&cn(308,String(n.id),String(hd));const r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=(function(i){return Object.assign(i,{id:$w})})(n),()=>{const i=this.state;i.id!==sg&&cn(309,String(n.id),String(sg)),this.state=(function(a){return Object.assign(a,{id:hd})})(i),r&&r()}}afterRegistration(e){const t=this.state;let n;return t.id!==$w&&cn(310,String(t.id),String($w)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=(function(r){return Object.assign(r,{id:sg})})(t),n}getSignal(){return this._signal===void 0&&cn(311),this._signal}getInitResult(){this.extension.init===void 0&&cn(312,this.extension.name);const e=this.state;return(function(t){return t.id>=Hb})(e)||cn(313,String(e.id),String(Hb)),e.initResult}getInitPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return(function(t){return t.id>=Hw})(e)||cn(314,String(e.id),String(Hw)),{config:e.config}}getPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&cn(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&cn(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){const e=this.state;return(function(t){return t.id>=sg})(e)||cn(316,String(e.id),String(sg)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||OL}getPeerNameSet(){let e=this._peerNameSet;
285return e||(e=new Set((this.extension.peerDependencies||[]).map(([t])=>t)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(t){return t.id>=hd})(e)||cn(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}};const x2={tag:sc};function BL(){const s=$t();s.isEmpty()&&s.append(ct())}const WL={config:{setOptions:x2,updateOptions:x2},init:({$initialEditorState:s=BL})=>({$initialEditorState:s,initialized:!1}),afterRegistration(s,{updateOptions:e,setOptions:t},n){const r=n.getInitResult();if(!r.initialized){r.initialized=!0;const{$initialEditorState:i}=r;if(UO(i))s.setEditorState(i,t);else if(typeof i=="function")s.update(()=>{i(s)},e);else if(i&&(typeof i=="string"||typeof i=="object")){const a=s.parseEditorState(i);s.setEditorState(a,t)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Kp,Ml,zp,Hp,rd]},_2=Symbol.for("@lexical/extension/LexicalBuilder");function T2(){}function jL(s){throw s}function $b(s){return Array.isArray(s)?s:[s]}const Xw="0.43.0+prod.esm";let GR=class l1{constructor(e){be(this,"roots");be(this,"extensionNameMap");be(this,"outgoingConfigEdges");be(this,"incomingEdges");be(this,"conflicts");be(this,"_sortedExtensionReps");be(this,"PACKAGE_VERSION");this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=Xw,this.roots=e;for(const t of e)this.addExtension(t)}static fromExtensions(e){const t=[$b(WL)];for(const n of e)t.push($b(n));return new l1(t)}static maybeFromEditor(e){const t=e[_2];return t&&(t.PACKAGE_VERSION!==Xw&&cn(292,t.PACKAGE_VERSION,Xw),t instanceof l1||cn(293)),t}static fromEditor(e){const t=l1.maybeFromEditor(e);return t===void 0&&cn(294),t}constructEditor(){const{$initialEditorState:e,onError:t,...n}=this.buildCreateEditorArgs(),r=Object.assign(rR({...n,...t?{onError:i=>{t(i,r)}}:{}}),{[_2]:this});for(const i of this.sortedExtensionReps())i.build(r);return r}buildEditor(){let e=T2;function t(){try{e()}finally{e=T2}}const n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});
285return e=Ti(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){const t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&cn(295,e.name),t}addEdge(e,t,n){const r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));const i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&cn(296);const t=$b(e),[n]=t;typeof n.name!="string"&&cn(297,typeof n.name);let r=this.extensionNameMap.get(n.name);if(r!==void 0&&r.extension!==n&&cn(298,n.name),!r){r=new LL(this,n),this.extensionNameMap.set(n.name,r);const i=this.conflicts.get(n.name);typeof i=="string"&&cn(299,n.name,i);for(const a of n.conflictsWith||[])this.extensionNameMap.has(a)&&cn(299,n.name,a),this.conflicts.set(a,n.name);for(const a of n.dependencies||[]){const o=$b(a);this.addEdge(n.name,o[0].name,o.slice(1)),this.addExtension(o)}for(const[a,o]of n.peerDependencies||[])this.addEdge(n.name,a,o?[o]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const e=[],t=(n,r)=>{let i=n.state;if(VR(i))return;const a=n.extension.name;var o;Kw(i)||cn(300,a,r||"[unknown]"),Kw(o=i)||cn(304,String(o.id),String(wD)),i=Object.assign(o,{id:oE}),n.state=i;const c=this.outgoingConfigEdges.get(a);if(c)for(const l of c.keys()){const u=this.extensionNameMap.get(l);u&&t(u,a)}i=PL(i),n.state=i,e.push(n)};for(const n of this.extensionNameMap.values())Kw(n.state)&&t(n);for(const n of e)for(const[r,i]of this.outgoingConfigEdges.get(n.extension.name)||[])if(i.length>0){const a=this.extensionNameMap.get(r);if(a)for(const o of i)a.configs.add(o)}for(const[n,...r]of this.roots)if(r.length>0){const i=this.extensionNameMap.get(n.name);i===void 0&&cn(301,n.name);for(const a of r)i.configs.add(a)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],i=n.signal;for(const a of t){const o=a.register(e,i);o&&r.push(o)}for(const a of t){const o=a.afterRegistration(e);o&&r.push(o)}return Ti(...r)}buildCreateEditorArgs(){const e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(const u of o){const{extension:d}=u;if(d.onError!==void 0&&(e.onError=d.onError),d.disableEvents!==void 0&&(e.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(e.parentEditor=d.parentEditor),d.editable!==void 0&&(e.editable=d.editable),d.namespace!==void 0&&(e.namespace=d.namespace),d.$initialEditorState!==void 0&&(e.$initialEditorState=d.$initialEditorState),d.nodes)for(const h of ML(d)){if(typeof h!="function"){const f=n.get(h.replace);f&&cn(302,d.name,h.replace.name,f.extension.name),n.set(h.replace,u)}t.add(h)}if(d.html){if(d.html.export)for(const[h,f]of d.html.export.entries())r.set(h,f);d.html.import&&Object.assign(i,d.html.import)}d.theme&&KR(a,d.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=[...t]);const c=Object.keys(i).length>0,l=r.size>0;(c||l)&&(e.html={},c&&(e.html.import=i),l&&(e.html.export=r));for(const u of o)u.init(e);return e.onError||(e.onError=jL),e}};function zL(s,e){const t=GR.fromEditor(s).extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}function HL(s){return s.canBeEmpty()}function $L(s,e,t=HL){return Ti(s.registerCommand(td,n=>{const r=Oe();if(!Ie(r))return!1;n.preventDefault();const i=(function(a){if(a.getNodes().filter(h=>F1(h)&&h.canIndent()).length>0)return!0;const o=a.anchor,c=a.focus,l=c.isBefore(o)?c:o,u=l.getNode(),d=hm(u);if(d.canIndent()){const h=d.getKey();let f=Pl();if(f.anchor.set(h,0,"element"),f.focus.set(h,0,"element"),f=Ap(f),f.anchor.is(l))return!0}return!1})(r)?n.shiftKey?HS:D1:DU;return s.dispatchCommand(i,void 0)},xt),s.registerCommand(D1,()=>{const n=typeof e=="number"?e:e?e.peek():null,r=Oe();if(!Ie(r))return!1;const i=typeof t=="function"?t:t.peek();return iE(a=>{if(i(a)){const o=a.getIndent()+1;(!n||o<n)&&a.setIndent(o)}})},Al))}const KL={name:"@lexical/react/ReactProvider"};function XL(){return $t().getTextContent()}function VL(s,e=!0){if(s)return!1;let t=XL();return e&&(t=t.trim()),t===""}function GL(s){if(!VL(s,!1))return!1;const e=$t().getChildren(),t=e.length;if(t>1)return!1;for(let n=0;n<t;n++){const r=e[n];if(Pt(r))return!1;if(Fe(r)){if(!no(r)||r.__indent!==0)return!1;const i=r.getChildren(),a=i.length;for(let o=0;o<a;o++){const c=i[n];if(!We(c))return!1}}}return!0}function qR(s){return()=>GL(s)}function qL(s){const e=window.location.origin,t=n=>{if(n.origin!==e)return;const r=s.getRootElement();if(document.activeElement!==r)return;const i=n.data;if(typeof i=="string"){let a;try{a=JSON.parse(i)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"){const o=a.payload;if(o&&o.functionId==="makeChanges"){const c=o.args;if(c){const[l,u,d,h,f]=c;s.update(()=>{const p=Oe();if(Ie(p)){const y=p.anchor;let g=y.getNode(),b=0,v=0;if(We(g)&&l>=0&&u>=0&&(b=l,v=l+u,p.setTextNodeRange(g,b,g,v)),b===v&&d===""||(p.insertRawText(d),g=y.getNode()),We(g)){b=h,v=h+f;const x=g.getTextContentSize();b=b>x?x:b,v=v>x?x:v,p.setTextNodeRange(g,b,g,v)}n.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",t,!0),()=>{window.removeEventListener("message",t,!0)}}function xD(s,e){const t=aR(e)?e.body.childNodes:e.childNodes;let n=[];const r=[];for(const i of t)if(!ZR.has(i.nodeName)){const a=JR(i,s,r,!1);a!==null&&(n=n.concat(a))}return(function(i){for(const a of i)a.getNextSibling()instanceof nD&&a.insertAfter(Hh());for(const a of i){const o=a.getChildren();for(const c of o)a.insertBefore(c);a.remove()}})(r),n}function YL(s,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const t=document.createElement("div"),n=$t().getChildren();for(let r=0;r<n.length;r++)YR(s,n[r],t,e);return t.innerHTML}function YR(s,e,t,n=null){let r=n===null||e.isSelected(n);const i=Fe(e)&&e.excludeFromCopy("html");let a=e;n!==null&&We(e)&&(a=NR(n,e,"clone"));const o=Fe(a)?a.getChildren():[],c=iD(s,a.getType());let l;l=c&&c.exportDOM!==void 0?c.exportDOM(s,a):a.exportDOM(s);const{element:u,after:d}=l;if(!u)return!1;const h=document.createDocumentFragment();for(let f=0;f<o.length;f++){const p=o[f],y=YR(s,p,h,n);!r&&Fe(e)&&y&&e.extractWithChild(p,n,"html")&&(r=!0)}if(r&&!i){if((mn(u)||tE(u))&&u.append(h),t.append(u),d){const f=d.call(a,u);f&&(tE(u)?u.replaceChildren(f):u.replaceWith(f))}}else t.append(h);return r}const ZR=new Set(["STYLE","SCRIPT"]);function JR(s,e,t,n,r=new Map,i){let a=[];if(ZR.has(s.nodeName))return a;let o=null;const c=(function(p,y){const{nodeName:g}=p,b=y._htmlConversions.get(g.toLowerCase());let v=null;if(b!==void 0)for(const x of b){const w=x(p);w!==null&&(v===null||(v.priority||0)<=(w.priority||0))&&(v=w)}return v!==null?v.conversion:null})(s,e),l=c?c(s):null;let u=null;if(l!==null){u=l.after;const p=l.node;if(o=Array.isArray(p)?p[p.length-1]:p,o!==null){for(const[,y]of r)if(o=y(o,i),!o)break;o&&a.push(...Array.isArray(p)?p:[o])}l.forChild!=null&&r.set(s.nodeName,l.forChild)}const d=s.childNodes;let h=[];const f=(o==null||!ri(o))&&(o!=null&&F1(o)||n);for(let p=0;p<d.length;p++)h.push(...JR(d[p],e,t,f,new Map(r),o));return u!=null&&(h=u(h)),O1(s)&&(h=ZL(s,h,f?()=>{const p=new nD;return t.push(p),p}:ct)),o==null?h.length>0?a=a.concat(h):O1(s)&&(function(p){return p.nextSibling==null||p.previousSibling==null?!1:nE(p.nextSibling)&&nE(p.previousSibling)}
285)(s)&&(a=a.concat(Hh())):Fe(o)&&o.append(...h),a}function ZL(s,e,t){const n=s.style.textAlign,r=[];let i=[];for(let a=0;a<e.length;a++){const o=e[a];if(F1(o))n&&!o.getFormat()&&o.setFormat(n),r.push(o);else if(i.push(o),a===e.length-1||a<e.length-1&&F1(e[a+1])){const c=t();c.setFormat(n),c.append(...i),r.push(c),i=[]}}return r}function j1(s,...e){const t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",s);for(const r of e)n.append("v",r);throw t.search=n.toString(),Error(`Minified Lexical error #${s}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function JL(s,e=Oe()){return e==null&&j1(166),Ie(e)&&e.isCollapsed()||e.getNodes().length===0?"":YL(s,e)}function QL(s,e=Oe()){return e==null&&j1(166),Ie(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(eB(s,e))}function S2(s,e,t){const n=s.getData("application/x-lexical-editor");if(n)try{const o=JSON.parse(n);if(o.namespace===t._config.namespace&&Array.isArray(o.nodes))return E2(t,tB(o.nodes),e)}catch(o){console.error(o)}const r=s.getData("text/html"),i=s.getData("text/plain");if(r&&i!==r)try{const o=new DOMParser().parseFromString((function(c){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:l=>l}).createHTML(c):c})(r),"text/html");return E2(t,xD(t,o),e)}catch(o){console.error(o)}const a=i||s.getData("text/uri-list");if(a!=null)if(Ie(e)){const o=a.split(/(\r?\n|\t)/);o[o.length-1]===""&&o.pop();for(let c=0;c<o.length;c++){const l=Oe();if(Ie(l)){const u=o[c];u===` 286`||u===`\r 287`?l.insertParagraph():u===" "?l.insertNodes([lb()]):l.insertText(u)}}}else e.insertRawText(a)}function E2(s,e,t){s.dispatchCommand(wU,{nodes:e,selection:t})||(t.insertNodes(e),(function(n){if(Ie(n)&&n.isCollapsed()){const r=n.anchor;let i=null;const a=ro(r,"previous");if(a)if(qo(a))i=a.origin;else{const o=Nl(a,jr($t(),"next").getFlipped());for(const c of o){if(We(c.origin)){i=c.origin;break}if(Fe(c.origin)&&!c.origin.isInline())break}}if(i&&We(i)){const o=i.getFormat(),c=i.getStyle();n.format===o&&n.style===c||(n.format=o,n.style=c,n.dirty=!0)}}})(t))}function QR(s,e,t,n=[]){let r=e===null||t.isSelected(e);const i=Fe(t)&&t.excludeFromCopy("html");let a=t;e!==null&&We(a)&&(a=NR(e,a,"clone"));const o=Fe(a)?a.getChildren():[],c=(function(l){const u=l.exportJSON(),d=l.constructor;if(u.type!==d.getType()&&j1(58,d.name),Fe(l)){const h=u.children;Array.isArray(h)||j1(59,d.name)}return u})(a);We(a)&&a.getTextContentSize()===0&&(r=!1);for(let l=0;l<o.length;l++){const u=o[l],d=QR(s,e,u,c.children);!r&&Fe(t)&&d&&t.extractWithChild(u,e,"clone")&&(r=!0)}if(r&&!i)n.push(c);else if(Array.isArray(c.children))for(let l=0;l<c.children.length;l++){const u=c.children[l];n.push(u)}return r}function eB(s,e){const t=[],n=$t().getChildren();for(let r=0;r<n.length;r++)QR(s,e,n[r],t);return{namespace:s._config.namespace,nodes:t}}function tB(s){const e=[];for(let t=0;t<s.length;t++){const n=s[t],r=FO(n);We(r)&&pL(r),e.push(r)}return e}let dd=null;async function aE(s,e,t){if(dd!==null)return!1;if(e!==null)return new Promise((l,u)=>{s.update(()=>{l(D2(s,e,t))})});const n=s.getRootElement(),r=s._window||window,i=r.document,a=Hr(r);if(n===null||a===null)return!1;const o=i.createElement("span");o.style.cssText="position: fixed; top: -1000px;",o.append(i.createTextNode("#")),n.append(o);const c=new Range;return c.setStart(o,0),c.setEnd(o,1),a.removeAllRanges(),a.addRange(c),new Promise((l,u)=>{const d=s.registerCommand(jv,h=>(yl(h,ClipboardEvent)&&(d(),dd!==null&&(r.clearTimeout(dd),dd=null),l(D2(s,h,t))),!0),Al);dd=r.setTimeout(()=>{d(),dd=null,l(!1)},50),i.execCommand("copy"),o.remove()})}function D2(s,e,t){if(t===void 0){const r=Hr(s._window),i=Oe();if(!i||i.isCollapsed()||!r)return!1;const a=r.anchorNode,o=r.focusNode;if(a!==null&&o!==null&&!hb(s,a,o))return!1;t=t6(i)}e.preventDefault();const n=e.clipboardData;return n!==null&&(nB(n,t),!0)}const e6=[["text/html",JL],["application/x-lexical-editor",QL]];function t6(s=Oe()){const e={"text/plain":s?s.getTextContent():""};if(s){const t=fb();for(const[n,r]of e6){const i=r(t,s);i!==null&&(e[n]=i)}}return e}function nB(s,e){for(const[t]of e6)e[t]===void 0&&s.setData(t,"");for(const t in e){const n=e[t];n!==void 0&&s.setData(t,n)}}function C2(s,e){if(document.caretRangeFromPoint!==void 0){const t=document.caretRangeFromPoint(s,e);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const t=document.caretPositionFromPoint(s,e);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}const Ll=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,rB=Ll&&"documentMode"in document?document.documentMode:null,iB=Ll&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),sB=!(!Ll||!("InputEvent"in window)||rB)&&"getTargetRanges"in new window.InputEvent("input"),A2=Ll&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,oB=Ll&&/Android/.test(navigator.userAgent),aB=Ll&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!oB,cB=Ll&&/^(?=.*Chrome).*/i.test(navigator.userAgent),lB=Ll&&/AppleWeb
287Kit\/[\d.]+/.test(navigator.userAgent)&&iB&&!cB,k2=lt("DRAG_DROP_PASTE_FILE");let _D=class n6 extends ai{static getType(){return"quote"}static clone(e){return new n6(e.__key)}createDOM(e){const t=document.createElement("blockquote");return vi(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:uB,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(mn(t)){this.isEmpty()&&t.append(document.createElement("br"));const n=this.getFormatType();n&&(t.style.textAlign=n);const r=this.getDirection();r&&(t.dir=r)}return{element:t}}static importJSON(e){return TD().updateFromJSON(e)}insertNewAfter(e,t){const n=ct(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,t),n}collapseAtStart(){const e=ct();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function TD(){return Ds(new _D)}let Zv=class r6 extends ai{constructor(t="h1",n){super(n);be(this,"__tag");this.__tag=t}static getType(){return"heading"}static clone(t){return new r6(t.__tag,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__tag=t.__tag}getTag(){return this.getLatest().__tag}setTag(t){const n=this.getWritable();return n.__tag=t,n}createDOM(t){const n=this.__tag,r=document.createElement(n),i=t.theme.heading;if(i!==void 0){const a=i[n];vi(r,a)}return r}updateDOM(t,n,r){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:fd,priority:0}),h2:t=>({conversion:fd,priority:0}),h3:t=>({conversion:fd,priority:0}),h4:t=>({conversion:fd,priority:0}),h5:t=>({conversion:fd,priority:0}),h6:t=>({conversion:fd,priority:0}),p:t=>{const n=t.firstChild;return n!==null&&N2(n)?{conversion:()=>({node:null}),priority:3}:null},span:t=>N2(t)?{conversion:n=>({node:Vo("h1")}),priority:3}:null}}exportDOM(t){const{element:n}=super.exportDOM(t);if(mn(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Vo(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,n=!0){const r=t?t.anchor.offset:0,i=this.getLastDescendant(),a=!i||t&&t.anchor.key===i.getKey()&&r===i.getTextContentSize()||!t?ct():Vo(this.getTag()),o=this.getDirection();if(a.setDirection(o),this.insertAfter(a,n),r===0&&!this.isEmpty()&&t){const c=ct();c.select(),this.replace(c,!0)}return a}collapseAtStart(){const t=this.isEmpty()?ct():Vo(this.getTag());
287return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function N2(s){return s.nodeName.toLowerCase()==="span"&&s.style.fontSize==="26pt"}function fd(s){const e=s.nodeName.toLowerCase();let t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Vo(e),s.style!==null&&(dD(s,t),t.setFormat(s.style.textAlign))),{node:t}}function uB(s){const e=TD();return s.style!==null&&(e.setFormat(s.style.textAlign),dD(s,e)),{node:e}}function Vo(s="h1"){return Ds(new Zv(s))}function i6(s){return s instanceof Zv}function Kb(s){let e=null;if(yl(s,DragEvent)?e=s.dataTransfer:yl(s,ClipboardEvent)&&(e=s.clipboardData),e===null)return[!1,[],!1];const t=e.types,n=t.includes("Files"),r=t.includes("text/html")||t.includes("text/plain");return[n,Array.from(e.files),r]}function F2(s){const e=Gn(s);return Pt(e)}function Vw(s){for(const e of["lowercase","uppercase","capitalize"])s.hasFormat(e)&&s.toggleFormat(e)}function hB(s){return Ti(s.registerCommand(HE,e=>{const t=Oe();return!!yi(t)&&(t.clear(),!0)},xt),s.registerCommand(ic,e=>{const t=Oe();return Ie(t)?(t.deleteCharacter(e),!0):!!yi(t)&&(t.deleteNodes(),!0)},xt),s.registerCommand(kp,e=>{const t=Oe();return!!Ie(t)&&(t.deleteWord(e),!0)},xt),s.registerCommand(zh,e=>{const t=Oe();return!!Ie(t)&&(t.deleteLine(e),!0)},xt),s.registerCommand(Fh,e=>{const t=Oe();if(typeof e=="string")t!==null&&t.insertText(e);else{if(t===null)return!1;const n=e.dataTransfer;if(n!=null)S2(n,t,s);else if(Ie(t)){const r=e.data;return r&&t.insertText(r),!0}}return!0},xt),s.registerCommand(zS,()=>{const e=Oe();return!!Ie(e)&&(e.removeText(),!0)},xt),s.registerCommand(qi,e=>{const t=Oe();return!!Ie(t)&&(t.formatText(e),!0)},xt),s.registerCommand(cu,e=>{const t=Oe();if(!Ie(t)&&!yi(t))return!1;const n=t.getNodes();for(const r of n){const i=St(r,a=>Fe(a)&&!a.isInline());i!==null&&i.setFormat(e)}return!0},xt),s.registerCommand(Hd,e=>{const t=Oe();return!!Ie(t)&&(t.insertLineBreak(e),!0)},xt),s.registerCommand(jh,()=>{const e=Oe();return!!Ie(e)&&(e.insertParagraph(),!0)},xt),s.registerCommand(DU,()=>{const e=lb(),t=Oe();return Ie(t)&&(e.setFormat(t.format),e.setStyle(t.style)),I1([e]),!0},xt),s.registerCommand(D1,()=>iE(e=>{const t=e.getIndent();e.setIndent(t+1)}),xt),s.registerCommand(HS,()=>iE(e=>{const t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),xt),s.registerCommand(VE,e=>{const t=Oe();if(yi(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectPrevious(),!0}else if(Ie(t)){const n=JS(t.focus,!0);if(!e.shiftKey&&Pt(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),e.preventDefault(),!0}return!1},xt),s.registerCommand(GE,e=>{const t=Oe();if(yi(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectNext(0,0),!0}else if(Ie(t)){if((function(r){const i=r.focus;return i.key==="root"&&i.offset===$t().getChildrenSize()})(t))return e.preventDefault(),!0;const n=JS(t.focus,!1);if(!e.shiftKey&&Pt(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),e.preventDefault(),!0}return!1},xt),s.registerCommand(XE,e=>{const t=Oe();if(yi(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),g2(n[0])?n[0].selectNext(0,0):n[0].selectPrevious(),!0}if(!Ie(t))return!1;if(m2(t,!0)){const n=e.shiftKey;return e.preventDefault(),y2(t,n,!0),!0}return!1},xt),s.registerCommand(KE,e=>{const t=Oe();if(yi(t)){const r=t.getNodes();if(r.length>0)return e.preventDefault(),g2(r[0])?r[0].selectPrevious():r[0].selectNext(0,0),!0}if(!Ie(t))return!1;const n=e.shiftKey;return!!m2(t,!1)&&(e.preventDefault(),y2(t,n,!1),!0)},xt),s.registerCommand(Wv,e=>{if(F2(e.target))return!1;const t=Oe();if(Ie(t)){if((function(n){if(!n.isCollapsed())return!1;const{anchor:r}=n;if(r.offset!==0)return!1;const i=r.getNode();if(Vn(i))return!1;const a=hm(i);return a.getIndent()>0&&(a.is(i)||i.is(a.getFirstDescendant()))})(t))return e.preventDefault(),s.dispatchCommand(HS,void 0);if(A2&&navigator.language==="ko-KR")return!1}else if(!yi(t))return!1;return e.preventDefault(),s.dispatchCommand(ic,!0)},xt),s.registerCommand(YE,e=>{if(F2(e.target))return!1;const t=Oe();return!(!Ie(t)&&!yi(t))&&(e.preventDefault(),s.dispatchCommand(ic,!1))},xt),s.registerCommand(Np,e=>{const t=Oe();if(!Ie(t))return!1;if(Vw(t),e!==null){if((A2||aB||lB)&&sB)return!1;if(e.preventDefault(),e.shiftKey)return s.dispatchCommand(Hd,!1)}return s.dispatchCommand(jh,void 0)},xt),s.registerCommand(qE,()=>{const e=Oe();return!!Ie(e)&&(s.blur(),!0)},xt),s.registerCommand(ZE,e=>{const[,t]=Kb(e);if(t.length>0){const r=C2(e.clientX,e.clientY);if(r!==null){const{offset:i,node:a}=r,o=Gn(a);if(o!==null){const c=Pl();if(We(o))c.anchor.set(o.getKey(),i,"text"),c.focus.set(o.getKey(),i,"text");else{const u=o.getParentOrThrow().getKey(),d=o.getIndexWithinParent()+1;c.anchor.set(u,d,"element"),c.focus.set(u,d,"element")}const l=Ap(c);Yt(l)}s.dispatchCommand(k2,t)}return e.preventDefault(),!0}const n=Oe();return!!Ie(n)},xt),s.registerCommand(CU,e=>{const[t]=Kb(e),n=Oe();return!(t&&!Ie(n))},xt),s.registerCommand(JE,e=>{const[t]=Kb(e),n=Oe();if(t&&!Ie(n))return!1;const r=C2(e.clientX,e.clientY);if(r!==null){const i=Gn(r.node);Pt(i)&&e.preventDefault()}return!0},xt),s.registerCommand(C1,()=>(BO(),!0),xt),s.registerCommand(jv,e=>(aE(s,yl(e,ClipboardEvent)?e:null),!0),xt),s.registerCommand(zv,e=>((async function(t,n){await aE(n,yl(t,ClipboardEvent)?t:null),n.update(()=>{const r=Oe();
287Ie(r)?r.removeText():yi(r)&&r.getNodes().forEach(i=>i.remove())})})(e,s),!0),xt),s.registerCommand(cb,e=>{const[,t,n]=Kb(e);return t.length>0&&!n?(s.dispatchCommand(k2,t),!0):Jo(e.target)&&sD(e.target)?!1:Oe()!==null&&((function(r,i){r.preventDefault(),i.update(()=>{const a=Oe(),o=yl(r,InputEvent)||yl(r,KeyboardEvent)?null:r.clipboardData;o!=null&&a!==null&&S2(o,a,i)},{tag:gO})})(e,s),!0)},xt),s.registerCommand(EU,e=>{const t=Oe();return Ie(t)&&Vw(t),!1},xt),s.registerCommand(td,e=>{const t=Oe();return Ie(t)&&Vw(t),!1},xt))}function dB(s,...e){const t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",s);for(const r of e)n.append("v",r);throw t.search=n.toString(),Error(`Minified Lexical error #${s}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const SD=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Ee.useLayoutEffect:Ee.useEffect;function fB({editor:s,ErrorBoundary:e}){return(function(t,n){const[r,i]=Ee.useState(()=>t.getDecorators());return SD(()=>t.registerDecoratorListener(a=>{Dp.flushSync(()=>{i(a)})}),[t]),Ee.useEffect(()=>{i(t.getDecorators())},[t]),Ee.useMemo(()=>{const a=[],o=Object.keys(r);for(let c=0;c<o.length;c++){const l=o[c],u=G.jsx(n,{onError:h=>t._onError(h),children:G.jsx(Ee.Suspense,{fallback:null,children:r[l]})}),d=t.getElementByKey(l);d!==null&&a.push(Dp.createPortal(u,d,l))}return a},[n,r,t])})(s,e)}function pB({editor:s,ErrorBoundary:e}){return(function(t){const n=GR.maybeFromEditor(t);if(n&&n.hasExtensionByName(KL.name)){for(const r of["@lexical/plain-text","@lexical/rich-text"])n.hasExtensionByName(r)&&dB(320,r);return!0}return!1})(s)?null:G.jsx(fB,{editor:s,ErrorBoundary:e})}function U2(s){return s.getEditorState().read(qR(s.isComposing()))}function s6({contentEditable:s,placeholder:e=null,ErrorBoundary:t}){const[n]=Kt();return(function(r){SD(()=>Ti(hB(r),qL(r)),[r])})(n),G.jsxs(G.Fragment,{children:[s,G.jsx(gB,{content:e}),G.jsx(pB,{editor:n,ErrorBoundary:t})]})}function gB({content:s}){const[e]=Kt(),t=(function(r){const[i,a]=Ee.useState(()=>U2(r));return SD(()=>{function o(){const c=U2(r);a(c)}return o(),Ti(r.registerUpdateListener(()=>{o()}),r.registerEditableListener(()=>{o()}))},[r]),i})(e),n=hL();return t?typeof s=="function"?s(n):s:null}const o6=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Ee.useLayoutEffect:Ee.useEffect;function mB({editor:s,ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:n,ariaDescribedBy:r,ariaErrorMessage:i,ariaExpanded:a,ariaInvalid:o,ariaLabel:c,ariaLabelledBy:l,ariaMultiline:u,ariaOwns:d,ariaRequired:h,autoCapitalize:f,className:p,id:y,role:g="textbox",spellCheck:b=!0,style:v,tabIndex:x,"data-testid":w,..._},T){const[S,C]=Ee.useState(s.isEditable()),D=Ee.useCallback(M=>{M&&M.ownerDocument&&M.ownerDocument.defaultView?s.setRootElement(M):s.setRootElement(null)},[s]),N=Ee.useMemo(()=>(function(...M){return F=>{for(const L of M)typeof L=="function"?L(F):L!=null&&(L.current=F)}})(T,D),[D,T]);return o6(()=>(C(s.isEditable()),s.registerEditableListener(M=>{C(M)})),[s]),G.jsx("div",{"aria-activedescendant":S?e:void 0,"aria-autocomplete":S?t:"none","aria-controls":S?n:void 0,"aria-describedby":r,...i!=null?{"aria-errormessage":i}:{},"aria-expanded":S&&g==="combobox"?!!a:void 0,...o!=null?{"aria-invalid":o}:{},"aria-label":c,"aria-labelledby":l,"aria-multiline":u,"aria-owns":S?d:void 0,"aria-readonly":!S||void 0,"aria-required":h,autoCapitalize:f,className:p,contentEditable:S,"data-testid":w,id:y,ref:N,role:g,spellCheck:b,style:v,tabIndex:x,..._})}const yB=Ee.forwardRef(mB);function R2(s){return s.getEditorState().read(qR(s.isComposing()))}const a6=Ee.forwardRef(bB);function bB(s,e){const{placeholder:t,...n}=s,[r]=Kt();return G.jsxs(G.Fragment,{children:[G.jsx(yB,{editor:r,...n,ref:e}),t!=null&&G.jsx(vB,{editor:r,content:t})]})}function vB({content:s,editor:e}){const t=(function(a){const[o,c]=Ee.useState(()=>R2(a));return o6(()=>{function l(){const u=R2(a);c(u)}return l(),Ti(a.registerUpdateListener(()=>{l()}
287),a.registerEditableListener(()=>{l()}))},[a]),o})(e),[n,r]=Ee.useState(e.isEditable());if(Ee.useLayoutEffect(()=>(r(e.isEditable()),e.registerEditableListener(a=>{r(a)})),[e]),!t)return null;let i=null;return typeof s=="function"?i=s(n):s!==null&&(i=s),i===null?null:G.jsx("div",{"aria-hidden":!0,children:i})}function wB(s,e,t,n,r){if(s===null||t.size===0&&n.size===0&&!r)return 0;const i=e._selection,a=s._selection;if(r)return 1;if(!(Ie(i)&&Ie(a)&&a.isCollapsed()&&i.isCollapsed()))return 0;const o=(function(b,v,x){const w=b._nodeMap,_=[];for(const T of v){const S=w.get(T);S!==void 0&&_.push(S)}for(const[T,S]of x){if(!S)continue;const C=w.get(T);C===void 0||Vn(C)||_.push(C)}return _})(e,t,n);if(o.length===0)return 0;if(o.length>1){const b=e._nodeMap,v=b.get(i.anchor.key),x=b.get(a.anchor.key);return v&&x&&!s._nodeMap.has(v.__key)&&We(v)&&v.__text.length===1&&i.anchor.offset===1?2:0}const c=o[0],l=s._nodeMap.get(c.__key);if(!We(l)||!We(c)||l.__mode!==c.__mode)return 0;const u=l.__text,d=c.__text;if(u===d)return 0;const h=i.anchor,f=a.anchor;if(h.key!==f.key||h.type!=="text")return 0;const p=h.offset,y=f.offset,g=d.length-u.length;return g===1&&y===p-1?2:g===-1&&y===p+1?3:g===-1&&y===p?4:0}function xB(s,e,t){let n=t(),r=0,i=n,a=0,o=null;return(c,l,u,d,h,f)=>{const p=t();if(f.has(BU)&&(i=n,a=r,o=c),f.has(qS))return r=0,n=p,2;f.has(WU)&&o&&(n=i,r=a,c=o);const y=wB(c,l,d,h,s.isComposing()),g=(()=>{const b=u===null||u.editor===s,v=f.has(pO);if(!v&&b&&f.has(sc))return 0;if(y===1)return 2;if(c===null)return 1;const x=l._selection;if(!(d.size>0||h.size>0))return x!==null?0:2;const w=typeof e=="number"?e:e.peek();return v===!1&&y!==0&&y===r&&p<n+w&&b||d.size===1&&(function(_,T,S){const C=T._nodeMap.get(_),D=S._nodeMap.get(_),N=T._selection,M=S._selection;return!(Ie(N)&&Ie(M)&&N.anchor.type==="element"&&N.focus.type==="element"&&M.anchor.type==="text"&&M.focus.type==="text"||!We(C)||!We(D)||C.__parent!==D.__parent)&&JSON.stringify(T.read(()=>C.exportJSON()))===JSON.stringify(S.read(()=>D.exportJSON()))})(Array.from(d)[0],c,l)?0:1})();return n=p,r=y,g}}function I2(s){s.undoStack=[],s.redoStack=[],s.current=null}function c6(s,e,t,n=Date.now){const r=xB(s,t,n);return Ti(s.registerCommand(Lv,()=>((function(i,a){const o=a.redoStack,c=a.undoStack;if(c.length!==0){const l=a.current,u=c.pop();l!==null&&(o.push(l),i.dispatchCommand(Ib,!0)),c.length===0&&i.dispatchCommand(Mb,!1),a.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:qS})}})(s,e),!0),xt),s.registerCommand(Bv,()=>((function(i,a){const o=a.redoStack,c=a.undoStack;if(o.length!==0){const l=a.current;l!==null&&(c.push(l),i.dispatchCommand(Mb,!0));const u=o.pop();o.length===0&&i.dispatchCommand(Ib,!1),a.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:qS})}})(s,e),!0),xt),s.registerCommand(sO,()=>(I2(e),!1),xt),s.registerCommand(oO,()=>(I2(e),s.dispatchCommand(Ib,!1),s.dispatchCommand(Mb,!1),!0),xt),s.registerUpdateListener(({editorState:i,prevEditorState:a,dirtyLeaves:o,dirtyElements:c,tags:l})=>{const u=e.current,d=e.redoStack,h=e.undoStack,f=u===null?null:u.editorState;if(u!==null&&i===f)return;const p=r(a,i,u,o,c,l);if(p===1)d.length!==0&&(e.redoStack=[],s.dispatchCommand(Ib,!1)),u!==null&&(h.push({...u}),s.dispatchCommand(Mb,!0));else if(p===2)return;e.current={editor:s,editorState:i}}))}function l6(){return{current:null,redoStack:[],undoStack:[]}}const Gw={build:(s,{delay:e,createInitialHistoryState:t,disabled:n,now:r})=>$R({delay:e,disabled:n,historyState:t(s),now:r}),config:{createInitialHistoryState:l6,delay:300,disabled:typeof window>"u",now:Date.now},name:"@lexical/history/History",register:(s,e,t)=>{const n=t.getOutput();return vD(()=>n.disabled.value?void 0:c6(s,n.historyState.value,n.delay,()=>n.now.peek()()))}};oL(Gw,{disabled:!0});function u6({delay:s,externalHistoryState:e}){const[t]=Kt();return(function(n,r,i=1e3){const a=Ee.useMemo(()=>r||l6(),[r]);Ee.useEffect(()=>c6(n,a,i),[i,n,a])})(t,e,s),null}function bl(s,...e){const t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",s);for(const r of e)n.append("v",r);throw t.search=n.toString(),Error(`Minified Lexical error #${s}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function cE(s){let e=1,t=s.getParent();for(;t!=null;){if(st(t)){const n=t.getParent();if(at(n)){e++,t=n.getParent();continue}bl(40)}return e}return e}function lE(s){let e=s.getParent();
287at(e)||bl(40);let t=e;for(;t!==null;)t=t.getParent(),at(t)&&(e=t);return e}function h6(s){let e=[];const t=s.getChildren().filter(st);for(let n=0;n<t.length;n++){const r=t[n],i=r.getFirstChild();at(i)?e=e.concat(h6(i)):e.push(r)}return e}function Xo(s){return st(s)&&at(s.getFirstChild())}function M2(s){return Cs().append(s)}function d6(s,e){return st(s)&&(e.length===0||e.length===1&&s.is(e[0])&&s.getChildrenSize()===0)}function P2(s){const e=Oe();if(e!==null){let t=e.getNodes();if(Ie(e)){const r=e.getStartEndPoints();r===null&&bl(143);const[i]=r,a=i.getNode(),o=a.getParent();if(ri(a)){const c=a.getFirstChild();if(c)t=c.selectStart().getNodes();else{const l=ct();a.append(l),t=l.select().getNodes()}}else if(d6(a,t)){const c=Ts(s);if(ri(o)){a.replace(c);const l=Cs();Fe(a)&&(l.setFormat(a.getFormatType()),l.setIndent(a.getIndent())),c.append(l)}else if(st(a)){const l=a.getParentOrThrow();qh(c,l.getChildren()),l.replace(c)}return}}const n=new Set;for(let r=0;r<t.length;r++){const i=t[r];if(Fe(i)&&i.isEmpty()&&!st(i)&&!n.has(i.getKey())){O2(i,s);continue}let a=cR(i)?i.getParent():st(i)&&i.isEmpty()?i:null;for(;a!=null;){const o=a.getKey();if(at(a)){if(!n.has(o)){const c=Ts(s);qh(c,a.getChildren()),a.replace(c),n.add(o)}break}{const c=a.getParent();if(ri(c)&&!n.has(o)){n.add(o),O2(a,s);break}a=c}}}}}function qh(s,e){s.splice(s.getChildrenSize(),0,e)}function O2(s,e){if(at(s))return s;const t=s.getPreviousSibling(),n=s.getNextSibling(),r=Cs();let i;if(qh(r,s.getChildren()),at(t)&&e===t.getListType())t.append(r),at(n)&&e===n.getListType()&&(qh(t,n.getChildren()),n.remove()),i=t;else if(at(n)&&e===n.getListType())n.getFirstChildOrThrow().insertBefore(r),i=n;else{const o=Ts(e);o.append(r),s.replace(o),i=o}r.setFormat(s.getFormatType()),r.setIndent(s.getIndent());const a=Oe();return Ie(a)&&(i.getKey()===a.anchor.key&&a.anchor.set(r.getKey(),a.anchor.offset,"element"),i.getKey()===a.focus.key&&a.focus.set(r.getKey(),a.focus.offset,"element")),s.remove(),i}function ED(s,e){const t=s.getLastChild(),n=e.getFirstChild();t&&n&&Xo(t)&&Xo(n)&&(ED(t.getFirstChild(),n.getFirstChild()),n.remove());const r=e.getChildren();r.length>0&&s.append(...r),e.remove()}function _B(){const s=Oe();if(Ie(s)){const e=new Set,t=s.getNodes(),n=s.anchor.getNode();if(d6(n,t))e.add(lE(n));else for(let r=0;r<t.length;r++){const i=t[r];if(cR(i)){const a=DL(i,sd);a!=null&&e.add(lE(a))}}for(const r of e){let i=r;const a=h6(r);for(const o of a){const c=ct().setTextStyle(s.style).setTextFormat(s.format);qh(c,o.getChildren()),i.insertAfter(c),i=c,o.__key===s.anchor.key&&Ys(s.anchor,ti(jr(c,"next"))),o.__key===s.focus.key&&Ys(s.focus,ti(jr(c,"next"))),o.remove()}r.remove()}}}function f6(s){const e=s.getListType()!=="check";let t=s.getStart();for(const n of s.getChildren())st(n)&&(n.getValue()!==t&&n.setValue(t),e&&n.getLatest().__checked!=null&&n.setChecked(void 0),at(n.getFirstChild())||t++)}function TB(s){const e=new Set;if(Xo(s)||e.has(s.getKey()))return;const t=s.getParent(),n=s.getNextSibling(),r=s.getPreviousSibling();if(Xo(n)&&Xo(r)){const i=r.getFirstChild();if(at(i)){i.append(s);const a=n.getFirstChild();at(a)&&(qh(i,a.getChildren()),n.remove(),e.add(n.getKey()))}}else if(Xo(n)){const i=n.getFirstChild();if(at(i)){const a=i.getFirstChild();a!==null&&a.insertBefore(s)}}else if(Xo(r)){const i=r.getFirstChild();at(i)&&i.append(s)}else if(at(t)){const i=ei(s),a=ei(t);i.append(a),a.append(s),r?r.insertAfter(i):n?n.insertBefore(i):t.append(i)}}function SB(s){if(Xo(s))return;const e=s.getParent(),t=e?e.getParent():void 0;if(at(t?t.getParent():void 0)&&st(t)&&at(e)){const n=e?e.getFirstChild():void 0,r=e?e.getLastChild():void 0;if(s.is(n))t.insertBefore(s),e.isEmpty()&&t.remove();else if(s.is(r))t.insertAfter(s),e.isEmpty()&&t.remove();else{const i=ei(s),a=ei(e);
287i.append(a),s.getPreviousSiblings().forEach(l=>a.append(l));const o=ei(s),c=ei(e);o.append(c),qh(c,s.getNextSiblings()),t.insertBefore(i),t.insertAfter(o),t.replace(s)}}}function EB(s=!1){const e=Oe();if(!Ie(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();let n=null;if(st(t)&&t.getChildrenSize()===0)n=t;else if(We(t)){const l=t.getParent();st(l)&&l.getChildren().every(u=>We(u)&&u.getTextContent().trim()==="")&&(n=l)}if(n===null)return!1;const r=lE(n),i=n.getParent();at(i)||bl(40);const a=i.getParent();let o;if(ri(a))o=ct(),r.insertAfter(o);else{if(!st(a))return!1;o=ei(a),a.insertAfter(o)}o.setTextStyle(e.style).setTextFormat(e.format).select();const c=n.getNextSiblings();if(c.length>0){const l=s?(function(d,h){return d.getStart()+h.getIndexWithinParent()})(i,n):1,u=ei(i).setStart(l);if(st(o)){const d=ei(o);d.append(u),o.insertAfter(d)}else o.insertAfter(u);u.append(...c)}return(function(l){let u=l;for(;u.getNextSibling()==null&&u.getPreviousSibling()==null;){const d=u.getParent();if(d==null||!st(d)&&!at(d))break;u=d}u.remove()})(n),!0}class sd extends ai{constructor(t=1,n=void 0,r){super(r);be(this,"__value");be(this,"__checked");this.__value=t===void 0?1:t,this.__checked=n}$config(){return this.config("listitem",{$transform:t=>{if(t.__checked==null)return;const n=t.getParent();at(n)&&n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0)},extends:ai,importDOM:{li:()=>({conversion:DB,priority:0})}})}afterCloneFrom(t){super.afterCloneFrom(t),this.__value=t.__value,this.__checked=t.__checked}createDOM(t){const n=document.createElement("li");return this.updateListItemDOM(null,n,t),n}updateListItemDOM(t,n,r){(function(o,c,l){const u=c.getParent();!at(u)||u.getListType()!=="check"||at(c.getFirstChild())?(o.removeAttribute("role"),o.removeAttribute("tabIndex"),o.removeAttribute("aria-checked")):(o.setAttribute("role","checkbox"),o.setAttribute("tabIndex","-1"),l&&c.__checked===l.__checked||o.setAttribute("aria-checked",c.getChecked()?"true":"false"))})(n,this,t),n.value=this.__value,(function(o,c,l){const u=[],d=[],h=c.list,f=h?h.listitem:void 0;let p;if(h&&h.nested&&(p=h.nested.listitem),f!==void 0&&u.push(...Fl(f)),h){const y=l.getParent(),g=at(y)&&y.getListType()==="check",b=l.getChecked();g&&!b||d.push(h.listitemUnchecked),g&&b||d.push(h.listitemChecked),g&&u.push(b?h.listitemChecked:h.listitemUnchecked)}if(p!==void 0){const y=Fl(p);l.getChildren().some(g=>at(g))?u.push(...y):d.push(...y)}d.length>0&&_l(o,...d),u.length>0&&vi(o,...u)})(n,r.theme,this);const i=t?t.__style:"",a=this.__style;i!==a&&(a===""?n.removeAttribute("style"):n.style.cssText=a),(function(o,c,l){const u=um(c.__textStyle);for(const d in u)o.style.setProperty(`--listitem-marker-${d}`,u[d]);if(l)for(const d in um(l.__textStyle))d in u||o.style.removeProperty(`--listitem-marker-${d}`)})(n,this,t)}updateDOM(t,n,r){const i=n;return this.updateListItemDOM(t,i,r),!1}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const n=this.createDOM(t._config),r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();return i&&(n.dir=i),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let n=0;n<t.length;n++){const r=t[n];if(Fe(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(t,n){if(st(t))return super.replace(t);this.setIndent(0);const r=this.getParentOrThrow();if(!at(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{const i=ei(r);let a=this.getNextSibling();for(;a;){const o=a;a=a.getNextSibling(),i.append(o)}r.insertAfter(t),t.insertAfter(i)}
287return n&&(Fe(t)||bl(139),this.getChildren().forEach(i=>{t.append(i)})),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){const r=this.getParentOrThrow();if(at(r)||bl(39),st(t))return super.insertAfter(t,n);const i=this.getNextSiblings();if(r.insertAfter(t,n),i.length!==0){const a=ei(r);i.forEach(o=>a.append(o)),t.insertAfter(a,n)}return t}remove(t){const n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&Xo(n)&&Xo(r)&&(ED(n.getFirstChild(),r.getFirstChild()),r.remove())}resetOnCopyNodeFrom(t){super.resetOnCopyNodeFrom(t),t.getChecked()&&this.setChecked(!1)}insertNewAfter(t,n=!0){const r=ei(this);return this.insertAfter(r,n),r}collapseAtStart(t){const n=ct();this.getChildren().forEach(o=>n.append(o));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),a=st(i);if(r.getChildrenSize()===1)if(a)r.remove(),i.select();else{r.insertBefore(n),r.remove();const o=t.anchor,c=t.focus,l=n.getKey();o.type==="element"&&o.getNode().is(this)&&o.set(l,o.offset,"element"),c.type==="element"&&c.getNode().is(this)&&c.set(l,c.offset,"element")}else r.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(t){const n=this.getWritable();return n.__value=t,n}getChecked(){const t=this.getLatest();let n;const r=this.getParent();return at(r)&&(n=r.getListType()),n==="check"?!!t.__checked:void 0}setChecked(t){const n=this.getWritable();return n.__checked=t,n}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null||!this.isAttached())return this.getLatest().__indent;let n=t.getParentOrThrow(),r=0;for(;st(n);)n=n.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(t){typeof t!="number"&&bl(117),(t=Math.floor(t))>=0||bl(199);let n=this.getIndent();for(;n!==t;)n<t?(TB(this),n++):(SB(this),n--);return this}canInsertAfter(t){return st(t)}canReplaceWith(t){return st(t)}canMergeWith(t){return st(t)||no(t)}extractWithChild(t,n){if(!Ie(n))return!1;const r=n.anchor.getNode(),i=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Ts("bullet")}canMergeWhenEmpty(){return!0}}function DB(s){if(s.classList.contains("task-list-item")){for(const t of s.children)if(t.tagName==="INPUT")return L2(t)}if(s.classList.contains("joplin-checkbox")){for(const t of s.children)if(t.classList.contains("checkbox-wrapper")&&t.children.length>0&&t.children[0].tagName==="INPUT")return L2(t.children[0])}const e=s.getAttribute("aria-checked");return{node:Cs(e==="true"||e!=="false"&&void 0)}}function L2(s){return s.getAttribute("type")!=="checkbox"?{node:null}:{node:Cs(s.hasAttribute("checked"))}}function Cs(s){return Ds(new sd(void 0,s))}function st(s){return s instanceof sd}class Bl extends ai{constructor(t="number",n=1,r){super(r);be(this,"__tag");be(this,"__start");be(this,"__listType");const i=AB[t]||t;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=n}$config(){return this.config("list",{$transform:t=>{(function(n){const r=n.getNextSibling();at(r)&&n.getListType()===r.getListType()&&ED(n,r)})(t),f6(t)},extends:ai,importDOM:{ol:()=>({conversion:W2,priority:0}),ul:()=>({conversion:W2,priority:0})}})}afterCloneFrom(t){super.afterCloneFrom(t),this.__listType=t.__listType,this.__tag=t.__tag,this.__start=t.__start}getTag(){return this.getLatest().__tag}setListType(t){const n=this.getWritable();return n.__listType=t,n.__tag=t==="number"?"ol":"ul",n}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(t){const n=this.getWritable();return n.__start=t,n}createDOM(t,n){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,B2(i,t.theme,this),i}updateDOM(t,n,r){return t.__tag!==this.__tag||t.__listType!==this.__listType||(B2(n,r.theme,this),t.__start!==this.__start&&n.setAttribute("start",String(this.__start)),!1)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const n=this.createDOM(t._config,t);return mn(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(t,n,r){const i=r.find(st)??this.getChildren().find(st),a=i?()=>ei(i):Cs;let o=r;for(let c=0;c<r.length;c++){const l=r[c];st(l)||(o===r&&(o=[...r]),o[c]=a().append(!Fe(l)||at(l)||l.isInline()?l:wn(l.getTextContent())))}return super.splice(t,n,o)}extractWithChild(t){return st(t)}}function B2(s,e,t){const n=[],r=[],i=e.list;if(i!==void 0){const a=i[`${t.__tag}Depth`]||[],o=cE(t)-1,c=o%a.length,l=a[c],u=i[t.__tag];let d;const h=i.nested,f=i.checklist;if(h!==void 0&&h.list&&(d=h.list),u!==void 0&&n.push(u),f!==void 0&&t.__listType==="check"&&n.push(f),l!==void 0){n.push(...Fl(l));for(let p=0;p<a.length;p++)p!==c&&r.push(t.__tag+p)}if(d!==void 0){const p=Fl(d);o>1?n.push(...p):r.push(...p)}}r.length>0&&_l(s,...r),n.length>
2870&&vi(s,...n)}function CB(s){const e=[];for(let t=0;t<s.length;t++){const n=s[t];if(st(n)){e.push(n);const r=n.getChildren();r.length>1&&r.forEach(i=>{at(i)&&e.push(M2(i))})}else e.push(M2(n))}return e}function W2(s){const e=s.nodeName.toLowerCase();let t=null;return e==="ol"?t=Ts("number",s.start):e==="ul"&&(t=(function(n){if(n.getAttribute("__lexicallisttype")==="check"||n.classList.contains("contains-task-list")||n.getAttribute("data-is-checklist")==="1")return!0;for(const r of n.childNodes)if(mn(r)&&r.hasAttribute("aria-checked"))return!0;return!1})(s)?Ts("check"):Ts("bullet")),{after:CB,node:t}}const AB={ol:"number",ul:"bullet"};function Ts(s="number",e=1){return Ds(new Bl(s,e))}function at(s){return s instanceof Bl}const kB=lt("UPDATE_LIST_START_COMMAND"),p6=lt("INSERT_UNORDERED_LIST_COMMAND"),g6=lt("INSERT_ORDERED_LIST_COMMAND"),DD=lt("REMOVE_LIST_COMMAND");function j2(s,e){return Ti(s.registerCommand(g6,()=>(P2("number"),!0),ru),s.registerCommand(kB,t=>{const{listNodeKey:n,newStart:r}=t,i=ft(n);return!!at(i)&&(i.getListType()==="number"&&(i.setStart(r),f6(i)),!0)},ru),s.registerCommand(p6,()=>(P2("bullet"),!0),ru),s.registerCommand(DD,()=>(_B(),!0),ru),s.registerCommand(jh,()=>EB(!!(e&&e.restoreNumbering)),ru),s.registerNodeTransform(sd,t=>{const n=t.getFirstChild();if(n){if(We(n)){const r=n.getStyle(),i=n.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==i&&t.setTextFormat(i)}}else{const r=Oe();Ie(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),s.registerNodeTransform(Ml,t=>{const n=t.getParent();if(st(n)&&t.is(n.getFirstChild())){const r=t.getStyle(),i=t.getFormat();r===n.getTextStyle()&&i===n.getTextFormat()||n.setTextStyle(r).setTextFormat(i)}}))}function NB(s){const e=t=>{const n=t.getParent();if(at(t.getFirstChild())||!at(n))return;const r=St(t,i=>st(i)&&at(i.getParent())&&st(i.getPreviousSibling()));if(r===null&&t.getIndent()>0)t.setIndent(0);else if(st(r)){const i=r.getPreviousSibling();if(st(i)){const a=(function(c){let l=c,u=l.getFirstChild();for(;at(u);){const d=u.getLastChild();if(!st(d))break;l=d,u=l.getFirstChild()}return l})(i),o=a.getParent();if(at(o)){const c=cE(o);c+1<cE(n)&&t.setIndent(c)}}}};return s.registerNodeTransform(Bl,t=>{const n=[t];for(;n.length>0;){const r=n.shift();if(at(r)){for(const i of r.getChildren())if(st(i)){e(i);const a=i.getFirstChild();at(a)&&n.push(a)}}}})}function FB({hasStrictIndent:s=!1,shouldPreserveNumbering:e=!1}){const[t]=Kt();return Ee.useEffect(()=>{if(!t.hasNodes([Bl,sd]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),Ee.useEffect(()=>Ti(j2(t,{restoreNumbering:e}),s?NB(t):()=>{}),[t,s,e]),(function(n){Ee.useEffect(()=>j2(n),[n])})(t),null}const UB=Ee.createContext(null),qw={didCatch:!1,error:null};let RB=class extends Ee.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=qw}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){var n,r;const{error:t}=this.state;t!==null&&((r=(n=this.props).onReset)==null||r.call(n,{args:e,reason:"imperative-api"}),this.setState(qw))}componentDidCatch(e,t){var n,r;(r=(n=this.props).onError)==null||r.call(n,e,t)}componentDidUpdate(e,t){var i,a;const{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&IB(e.resetKeys,r)&&((a=(i=this.props).onReset)==null||a.call(i,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(qw))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state;let o=e;if(i){const c={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t=="function")o=t(c);else if(n)o=Ee.createElement(n,c);else if(r!==void 0)o=r;else throw a}return Ee.createElement(UB.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function IB(s=[],e=[]){return s.length!==e.length||s.some((t,n)=>!Object.is(t,e[n]))}function m6({children:s,onError:e}){return G.jsx(RB,{fallback:G.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:e,children:s})}function MB({maxIndent:s,$canIndent:e}){const[t]=Kt();return Ee.useEffect(()=>$L(t,s,e),[t,s,e]),null}const CD=/^(\d+(?:\.\d+)?)px$/,un={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class mc extends ai{constructor(t=un.NO_STATUS,n=1,r,i){super(i);be(this,"__colSpan");be(this,"__rowSpan");be(this,"__headerState");be(this,"__width");be(this,"__backgroundColor");be(this,"__verticalAlign");this.__colSpan=n,this.__rowSpan=1,this.__headerState=t,this.__width=r,this.__backgroundColor=null,this.__verticalAlign=void 0}static getType(){return"tablecell"}static clone(t){return new mc(t.__headerState,t.__colSpan,t.__width,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__rowSpan=t.__rowSpan,this.__backgroundColor=t.__backgroundColor,this.__verticalAlign=t.__verticalAlign,this.__colSpan=t.__colSpan,this.__headerState=t.__headerState,this.__width=t.__width}static importDOM(){return{td:t=>({conversion:z2,priority:0}),th:t=>({conversion:z2,priority:0})}}static importJSON(t){return si().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHeaderStyles(t.headerState).setColSpan(t.colSpan||1).setRowSpan(t.rowSpan||1).setWidth(t.width||void 0).setBackgroun
287dColor(t.backgroundColor||null).setVerticalAlign(t.verticalAlign||void 0)}createDOM(t){const n=document.createElement(this.getTag());return this.__width&&(n.style.width=`${this.__width}px`),this.__colSpan>1&&(n.colSpan=this.__colSpan),this.__rowSpan>1&&(n.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(n.style.backgroundColor=this.__backgroundColor),uE(this.__verticalAlign)&&(n.style.verticalAlign=this.__verticalAlign),vi(n,t.theme.tableCell,this.hasHeader()&&t.theme.tableCellHeader),n}exportDOM(t){const n=super.exportDOM(t);if(mn(n.element)){const r=n.element;r.setAttribute("data-temporary-table-cell-lexical-key",this.getKey()),r.style.border="1px solid black",this.__colSpan>1&&(r.colSpan=this.__colSpan),this.__rowSpan>1&&(r.rowSpan=this.__rowSpan),r.style.width=`${this.getWidth()||75}px`,r.style.verticalAlign=this.getVerticalAlign()||"top",r.style.textAlign="start",this.__backgroundColor===null&&this.hasHeader()&&(r.style.backgroundColor="#f2f3f5")}return n}exportJSON(){return{...super.exportJSON(),...uE(this.__verticalAlign)&&{verticalAlign:this.__verticalAlign},backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,width:this.getWidth()}}getColSpan(){return this.getLatest().__colSpan}setColSpan(t){const n=this.getWritable();return n.__colSpan=t,n}getRowSpan(){return this.getLatest().__rowSpan}setRowSpan(t){const n=this.getWritable();return n.__rowSpan=t,n}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(t,n=un.BOTH){const r=this.getWritable();return r.__headerState=t&n|r.__headerState&~n,r}getHeaderStyles(){return this.getLatest().__headerState}setWidth(t){const n=this.getWritable();return n.__width=t,n}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(t){const n=this.getWritable();return n.__backgroundColor=t,n}getVerticalAlign(){return this.getLatest().__verticalAlign}setVerticalAlign(t){const n=this.getWritable();return n.__verticalAlign=t||void 0,n}toggleHeaderStyle(t){const n=this.getWritable();return(n.__headerState&t)===t?n.__headerState-=t:n.__headerState+=t,n}hasHeaderState(t){return(this.getHeaderStyles()&t)===t}hasHeader(){return this.getLatest().__headerState!==un.NO_STATUS}updateDOM(t){return t.__headerState!==this.__headerState||t.__width!==this.__width||t.__colSpan!==this.__colSpan||t.__rowSpan!==this.__rowSpan||t.__backgroundColor!==this.__backgroundColor||t.__verticalAlign!==this.__verticalAlign}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function uE(s){return s==="middle"||s==="bottom"}function z2(s){const e=s,t=s.nodeName.toLowerCase();let n;CD.test(e.style.width)&&(n=parseFloat(e.style.width));let r=un.NO_STATUS;if(t==="th"){const p=e.getAttribute("scope");if(p==="col")r=un.COLUMN;else if(p==="row")r=un.ROW;else{const y=e.parentElement,g=mn(y)&&y.nodeName.toLowerCase()==="tr"&&mn(y.parentElement)&&(y.parentElement.nodeName.toLowerCase()==="thead"||y.rowIndex===0),b=e.cellIndex===0;g&&(r|=un.ROW),b&&(r|=un.COLUMN),r===un.NO_STATUS&&(r=un.ROW)}}const i=si(r,e.colSpan,n);i.__rowSpan=e.rowSpan;const a=e.style.backgroundColor;a!==""&&(i.__backgroundColor=a);const o=e.style.verticalAlign;uE(o)&&(i.__verticalAlign=o);const c=e.style,l=(c&&c.textDecoration||"").split(" "),u=c.fontWeight==="700"||c.fontWeight==="bold",d=l.includes("line-through"),h=c.fontStyle==="italic",f=l.includes("underline");return{after:p=>{const y=[];let g=null;const b=()=>{if(g){const v=g.getFirstChild();wl(v)&&g.getChildrenSize()===1&&v.remove()}};for(const v of p)jO(v)||We(v)||wl(v)?(We(v)&&(u&&v.toggleFormat("bold"),d&&v.toggleFormat("strikethrough"),h&&v.toggleFormat("italic"),f&&v.toggleFormat("underline")),g?g.append(v):(g=ct().append(v),y.push(g))):(y.push(v),b(),g=null);return b(),y.length===0&&y.push(ct()),y},node:i}}function si(s=un.NO_STATUS,e=1,t){return Ds(new mc(s,e,t))}function ot(s){return s instanceof mc}const y6=lt("INSERT_TABLE_COMMAND");function ut(s,...e){const t=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",s);for(const r of e)n.append("v",r);throw t.search=n.toString(),Error(`Minified Lexical error #${s}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}class Xp extends ai{constructor(t,n){super(n);be(this,"__height");this.__height=t}static getType(){return"tablerow"}static clone(t){return new Xp(t.__height,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__height=t.__height}static importDOM(){return{tr:t=>({conversion:PB,priority:0})}}static importJSON(t){return hc().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHeight(t.height)}exportJSON(){const t=this.getHeight();return{...super.exportJSON(),...t===void 0?void 0:{height:t}}}createDOM(t){const n=document.createElement("tr");return this.__height&&(n.style.height=`${this.__height}px`),vi(n,t.theme.tableRow),n}extractWithChild(t,n,r){return r==="html"}
287isShadowRoot(){return!0}setHeight(t){const n=this.getWritable();return n.__height=t,n}getHeight(){return this.getLatest().__height}updateDOM(t){return t.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function PB(s){const e=s;let t;return CD.test(e.style.height)&&(t=parseFloat(e.style.height)),{after:n=>BR(n,ot),node:hc(t)}}function hc(s){return Ds(new Xp(s))}function Lt(s){return s instanceof Xp}const AD=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,OB=AD&&"documentMode"in document?document.documentMode:null,H2=AD&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);function LB(s,e,t=!0){const n=od();for(let r=0;r<s;r++){const i=hc();for(let a=0;a<e;a++){let o=un.NO_STATUS;typeof t=="object"?(r===0&&t.rows&&(o|=un.ROW),a===0&&t.columns&&(o|=un.COLUMN)):t&&(r===0&&(o|=un.ROW),a===0&&(o|=un.COLUMN));const c=si(o),l=ct();l.append(wn()),c.append(l),i.append(c)}n.append(i)}return n}function BB(s){const e=St(s,t=>ot(t));return ot(e)?e:null}function WB(s){const e=St(s,t=>Lt(t));if(Lt(e))return e;throw new Error("Expected table cell to be inside of table row.")}function jB(s){const e=St(s,t=>fn(t));if(fn(e))return e;throw new Error("Expected table cell to be inside of table.")}AD&&"InputEvent"in window&&!OB&&new window.InputEvent("input");const hE=(s,e)=>s===un.BOTH||s===e?e:un.NO_STATUS;function zB(s=!0){const e=Oe();Ie(e)||sn(e)||ut(188);const t=e.anchor.getNode(),n=e.focus.getNode(),[r]=xs(t),[i,,a]=xs(n),[,o,c]=Ji(a,i,r),{startRow:l}=c,{startRow:u}=o;return s?dE(l+r.__rowSpan>u+i.__rowSpan?r:i,!0):dE(u<l?i:r,!1)}const HB=zB;function dE(s,e=!0){const[,,t]=xs(s),[n,r]=Ji(t,s,s),i=n[0].length,{startRow:a}=r;let o=null;if(e){const c=a+s.__rowSpan-1,l=n[c],u=hc();for(let h=0;h<i;h++){const{cell:f,startRow:p}=l[h];if(p+f.__rowSpan-1<=c){const y=l[h].cell.__headerState,g=hE(y,un.COLUMN);u.append(si(g).append(ct()))}else f.setRowSpan(f.__rowSpan+1)}const d=t.getChildAtIndex(c);Lt(d)||ut(256),d.insertAfter(u),o=u}else{const c=a,l=n[c],u=hc();for(let h=0;h<i;h++){const{cell:f,startRow:p}=l[h];if(p===c){const y=l[h].cell.__headerState,g=hE(y,un.COLUMN);u.append(si(g).append(ct()))}else f.setRowSpan(f.__rowSpan+1)}const d=t.getChildAtIndex(c);Lt(d)||ut(257),d.insertBefore(u),o=u}return o}function $B(s,e=!0,t=!0){const[,,n]=xs(s),[r,i]=Ji(n,s,s),a=r.length,{startColumn:o}=i,c=e?o+s.__colSpan-1:o-1,l=n.getFirstChild();Lt(l)||ut(120);let u=null;function d(p=un.NO_STATUS){const y=si(p).append(ct());return u===null&&(u=y),y}let h=l;e:for(let p=0;p<a;p++){if(p!==0){const _=h.getNextSibling();Lt(_)||ut(121),h=_}const y=r[p],g=y[c<0?0:c].cell.__headerState,b=hE(g,un.ROW);if(c<0){b6(h,d(b));continue}const{cell:v,startColumn:x,startRow:w}=y[c];if(x+v.__colSpan-1<=c){let _=v,T=w,S=c;for(;T!==p&&_.__rowSpan>1;){if(S-=v.__colSpan,!(S>=0)){h.append(d(b));continue e}{const{cell:C,startRow:D}=y[S];_=C,T=D}}_.insertAfter(d(b))}else v.setColSpan(v.__colSpan+1)}u!==null&&t&&KB(u);const f=n.getColWidths();if(f){const p=[...f],y=c<0?0:c,g=p[y];p.splice(y,0,g),n.setColWidths(p)}return u}function KB(s){const e=s.getFirstDescendant();e==null?s.selectStart():e.getParentOrThrow().selectStart()}function b6(s,e){const t=s.getFirstChild();t!==null?t.insertBefore(e):s.append(e)}function XB(s){if(s.length===0)return null;const e=jB(s[0]),[t]=tc(e,null,null);let n=1/0,r=-1/0,i=1/0,a=-1/0;const o=new Set;for(const f of t)for(const p of f){if(!p||!p.cell)continue;const y=p.cell.getKey();if(!o.has(y)&&s.some(g=>g.is(p.cell))){o.add(y);const g=p.startRow,b=p.startColumn,v=p.cell.__rowSpan||1,x=p.cell.__colSpan||1;n=Math.min(n,g),r=Math.max(r,g+v-1),i=Math.min(i,b),a=Math.max(a,b+x-1)}}if(n===1/0||i===1/0)return null;const c=r-n+1,l=a-i+1,u=t[n][i];if(!u.cell)return null;const d=u.cell;d.setColSpan(l),d.setRowSpan(c);const h=new Set([d.getKey()]);for(let f=n;f<=r;f++)for(let p=i;p<=a;p++){const y=t[f][p];if(!y.cell)continue;const g=y.cell,b=g.getKey();h.has(b)||(h.add(b),VB(g)||d.append(...g.getChildren()),g.remove())}return d.getChildrenSize()===0&&d.append(ct()),d}function VB(s){if(s.getChildrenSize()!==1)return!1;const e=s.getFirstChildOrThrow();return!(!no(e)||!e.isEmpty())}function GB(s){const[e,t,n]=xs(s),r=e.__colSpan,i=e.__rowSpan;if(r===1&&i===1)return;const[a,o]=Ji(n,e,e),{startColumn:c,startRow:l}=o,u=e.__headerState&un.COLUMN,d=Array.from({length:r},(p,y)=>{let g=u;for(let b=0;g!==0&&b<a.length;b++)g&=a[b][y+c].cell.__headerState;return g}),h=e.__headerState&un.ROW,f=Array.from({length:i},(p,y)=>{let g=h;for(let b=0;g!==0&&b<a[0].length;b++)g&=a[y+l][b].cell.__headerState;return g});if(r>1){for(let p=1;p<r;p++)e.insertAfter(si(d[p]|f[0]).append(ct()));e.setColSpan(1)}if(i>1){let p;for(let y=1;y<i;y++){const g=l+y,b=a[g];p=(p||t).getNextSibling(),Lt(p)||ut(125);let v=null;for(let x=0;x<c;x++){const w=b[x],_=w.cell;w.startRow===g&&(v=_),_.__colSpan>1&&(x+=_.__colSpan-1)}if(v===null)for(let x=r-1;x>=0;x--)b6(p,si(d[x]|f[y]).append(ct()));else for(let x=r-1;x>=0;x--)v.insertAfter(si(d[x]|f[y]).append(ct()))}e.setRowSpan(1)}}function Ji(s,e,t){const[n,r,i]=tc(s,e,t);return r===null&&ut(207),i===null&&ut(208),[n,r,i]}function tc(s,e,t){const n=[];let r=null,i=null;function a(c){let l=n[c];return l===void 0&&(n[c]=l=[]),l}const o=s.getChildren();for(let c=0;c<o.length;c++){const l=o[c];Lt(l)||ut(209);const u=a(c);for(let d=l.getFirstChild(),h=0;d!=null;
287d=d.getNextSibling()){for(ot(d)||ut(147);u[h]!==void 0;)h++;const f={cell:d,startColumn:h,startRow:c},{__rowSpan:p,__colSpan:y}=d;for(let g=0;g<p&&!(c+g>=o.length);g++){const b=a(c+g);for(let v=0;v<y;v++)b[h+v]=f}e!==null&&r===null&&e.is(d)&&(r=f),t!==null&&i===null&&t.is(d)&&(i=f)}}return[n,r,i]}function xs(s){let e;if(s instanceof mc)e=s;else if("__type"in s){const r=St(s,ot);ot(r)||ut(148),e=r}else{const r=St(s.getNode(),ot);ot(r)||ut(148),e=r}const t=e.getParent();Lt(t)||ut(149);const n=t.getParent();return fn(n)||ut(210),[e,t,n]}function z1(s,e,t){let n,r=Math.min(e.startColumn,t.startColumn),i=Math.min(e.startRow,t.startRow),a=Math.max(e.startColumn+e.cell.__colSpan-1,t.startColumn+t.cell.__colSpan-1),o=Math.max(e.startRow+e.cell.__rowSpan-1,t.startRow+t.cell.__rowSpan-1);do{n=!1;for(let c=0;c<s.length;c++)for(let l=0;l<s[0].length;l++){const u=s[c][l];if(!u)continue;const d=u.startColumn+u.cell.__colSpan-1,h=u.startRow+u.cell.__rowSpan-1,f=u.startColumn<=a&&d>=r,p=u.startRow<=o&&h>=i;if(f&&p){const y=Math.min(r,u.startColumn),g=Math.max(a,d),b=Math.min(i,u.startRow),v=Math.max(o,h);y===r&&g===a&&b===i&&v===o||(r=y,a=g,i=b,o=v,n=!0)}}}while(n);return{maxColumn:a,maxRow:o,minColumn:r,minRow:i}}function $2(s){const[e,,t]=xs(s),n=t.getChildren(),r=n.length,i=n[0].getChildren().length,a=new Array(r);for(let o=0;o<r;o++)a[o]=new Array(i);for(let o=0;o<r;o++){const c=n[o].getChildren();let l=0;for(let u=0;u<c.length;u++){for(;a[o][l];)l++;const d=c[u],h=d.__rowSpan||1,f=d.__colSpan||1;for(let p=0;p<h;p++)for(let y=0;y<f;y++)a[o+p][l+y]=d;if(e===d)return{colSpan:f,columnIndex:l,rowIndex:o,rowSpan:h};l+=f}}return null}function K2(s){const[[e,t,n,r],[i,a,o,c]]=["anchor","focus"].map(l=>{const u=s[l].getNode(),d=St(u,ot);ot(d)||ut(238,l,u.getKey(),u.getType());const h=d.getParent();Lt(h)||ut(239,l);const f=h.getParent();return fn(f)||ut(240,l),[u,d,h,f]});return r.is(c)||ut(241),{anchorCell:t,anchorNode:e,anchorRow:n,anchorTable:r,focusCell:a,focusNode:i,focusRow:o,focusTable:c}}class Jv{constructor(e,t,n){be(this,"tableKey");be(this,"anchor");be(this,"focus");be(this,"_cachedNodes");be(this,"dirty");this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this.dirty=!1,this.tableKey=e}getStartEndPoints(){return[this.anchor,this.focus]}isValid(){if(this.tableKey==="root"||this.anchor.key==="root"||this.anchor.type!=="element"||this.focus.key==="root"||this.focus.type!=="element")return!1;const e=ft(this.tableKey),t=ft(this.anchor.key),n=ft(this.focus.key);return e!==null&&t!==null&&n!==null}isBackward(){return this.focus.isBefore(this.anchor)}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return sn(e)&&this.tableKey===e.tableKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)}set(e,t,n){this.dirty=this.dirty||e!==this.tableKey||t!==this.anchor.key||n!==this.focus.key,this.tableKey=e,this.anchor.key=t,this.focus.key=n,this._cachedNodes=null}clone(){return new Jv(this.tableKey,_i(this.anchor.key,this.anchor.offset,this.anchor.type),_i(this.focus.key,this.focus.offset,this.focus.type))}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(e){}insertText(){}hasFormat(e){let t=0;this.getNodes().filter(ot).forEach(r=>{const i=r.getFirstChild();no(i)&&(t|=i.getTextFormat())});const n=Cl[e];return(t&n)!==0}insertNodes(e){const t=this.focus.getNode();Fe(t)||ut(151),Ap(t.select(0,t.getChildrenSize())).insertNodes(e)}getShape(){const{anchorCell:e,focusCell:t}=K2(this),n=$2(e);n===null&&ut(153);const r=$2(t);r===null&&ut(155);const i=Math.min(n.columnIndex,r.columnIndex),a=Math.max(n.columnIndex+n.colSpan-1,r.columnIndex+r.colSpan-1),o=Math.min(n.rowIndex,r.rowIndex),c=Math.max(n.rowIndex+n.rowSpan-1,r.rowIndex+r.rowSpan-1);return{fromX:Math.min(i,a),fromY:Math.min(o,c),toX:Math.max(i,a),toY:Math.max(o,c)}}getNodes(){if(!this.isValid())return[];const e=this._cachedNodes;if(e!==null)return e;const{anchorTable:t,anchorCell:n,focusCell:r}=K2(this),i=r.getParents()[1];if(i!==t){if(t.isParentOf(r)){const g=i.getParent();g==null&&ut(159),this.set(this.tableKey,r.getKey(),g.getKey())}else{const g=t.getParent();g==null&&ut(158),this.set(this.tableKey,g.getKey(),r.getKey())}return this.getNodes()}const[a,o,c]=Ji(t,n,r),{minColumn:l,maxColumn:u,minRow:d,maxRow:h}=z1(a,o,c),f=new Map([[t.getKey(),t]]);let p=null;for(let g=d;g<=h;g++)for(let b=l;b<=u;b++){const{cell:v}=a[g][b],x=v.getParent();Lt(x)||ut(160),x!==p&&(f.set(x.getKey(),x),p=x),f.has(v.getKey())||YB(v,w=>{f.set(w.getKey(),w)})}const y=Array.from(f.values());return $p()||(this._cachedNodes=y),y}getTextContent(){const e=this.getNodes().filter(n=>ot(n));let t="";for(let n=0;n<e.length;n++){const r=e[n],i=r.__parent,a=(e[n+1]||{}).__parent;t+=r.getTextContent()+(a!==i?` 288`:" ")}return t}}function sn(s){return s instanceof Jv}function qB(){const s=_i("root",0,"element"),e=_i("root",0,"element");return new Jv("root",s,e)}function fE(s,e,t){s.getKey(),e.getKey(),t.getKey();const n=Oe(),r=sn(n)?n.clone():qB();return r.set(s.getKey(),e.getKey(),t.getKey()),r}function YB(s,e){const t=[[s]];for(let n=t.at(-1);n!==void 0&&t.length>0;n=t.at(-1)){const r=n.pop();r===void 0?t.pop():e(r)!==!1&&Fe(r)&&t.push(r.getChildren())}}function v6(s,e=fb()){const t=ft(s);fn(t)||ut(231,s);const n=Yh(t,e.getElementByKey(s));return n===null&&ut(232,s),{tableElement:n,tableNode:t}}class ZB{constructor(){be(this,"observers");be(this,"nextFocus");be(this,"shouldCheckSelectionForTable");this.observers=new Map,this.nextFocus=null,this.shouldCheckSelectionForTable=null}setNextFocus(e){this.nextFocus=e}getAndClearNextFocus(){const{nextFocus:e}=this;return e!==null&&(this.nextFocus=null),e}setShouldCheckSelectionForTable(e){this.shouldCheckSelectionForTable=e}getAndClearShouldCheckSelectionForTable(){const{shouldCheckSelectionForTable:e}=this;return e?(this.shouldCheckSelectionForTable=null,e):null}}class JB{constructor(e,t){be(this,"focusX");be(this,"focusY");
288be(this,"listenersToRemove");be(this,"table");be(this,"isHighlightingCells");be(this,"anchorX");be(this,"anchorY");be(this,"tableNodeKey");be(this,"anchorCell");be(this,"focusCell");be(this,"anchorCellNodeKey");be(this,"focusCellNodeKey");be(this,"editor");be(this,"tableSelection");be(this,"hasHijackedSelectionStyles");be(this,"isSelecting");be(this,"pointerType");be(this,"abortController");be(this,"listenerOptions");this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=t,this.editor=e,this.table={columns:0,domRows:[],rows:0},this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.isSelecting=!1,this.pointerType=null,this.abortController=new AbortController,this.listenerOptions={signal:this.abortController.signal},this.trackTable()}getTable(){return this.table}removeListeners(){this.abortController.abort("removeListeners"),Array.from(this.listenersToRemove).forEach(e=>e()),this.listenersToRemove.clear()}$lookup(){return v6(this.tableNodeKey,this.editor)}trackTable(){const e=new MutationObserver(t=>{this.editor.getEditorState().read(()=>{let n=!1;for(let a=0;a<t.length;a++){const o=t[a].target.nodeName;if(o==="TABLE"||o==="TBODY"||o==="THEAD"||o==="TR"){n=!0;break}}if(!n)return;const{tableNode:r,tableElement:i}=this.$lookup();this.table=Vd(r,i)},{editor:this.editor})});this.editor.getEditorState().read(()=>{const{tableNode:t,tableElement:n}=this.$lookup();this.table=Vd(t,n),e.observe(n,{attributes:!0,childList:!0,subtree:!0})},{editor:this.editor})}$clearHighlight(e=!0){const t=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.$enableHighlightStyle();const{tableNode:n,tableElement:r}=this.$lookup();Xb(t,Vd(n,r),null),e&&Oe()!==null&&(Yt(null),t.dispatchCommand(ec,void 0))}$enableHighlightStyle(){const e=this.editor,{tableElement:t}=this.$lookup();_l(t,e._config.theme.tableSelection),t.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1}$disableHighlightStyle(){const{tableElement:e}=this.$lookup();vi(e,this.editor._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0}$updateTableTableSelection(e){if(e!==null){e.tableKey!==this.tableNodeKey&&ut(233,e.tableKey,this.tableNodeKey);const t=this.editor;this.tableSelection=e,this.isHighlightingCells=!0,this.$disableHighlightStyle(),this.updateDOMSelection(),Xb(t,this.table,this.tableSelection)}else this.$clearHighlight()}updateDOMSelection(){if(this.anchorCell!==null&&this.focusCell!==null){const e=Hr(this.editor._window);e&&e.rangeCount>0&&e.removeAllRanges()}}$setFocusCellForSelection(e,t=!1){const n=this.editor,{tableNode:r}=this.$lookup(),i=e.x,a=e.y;if(this.focusCell=e,!this.isHighlightingCells&&(t||this.anchorX!==i||this.anchorY!==a||this.tableSelection!=null&&this.anchorCellNodeKey!=null)&&(this.isHighlightingCells=!0,this.$disableHighlightStyle()),this.focusX!==-1&&this.focusY!==-1&&i===this.focusX&&a===this.focusY)return!1;if(this.focusX=i,this.focusY=a,this.isHighlightingCells){const o=gE(r,e.elem);if(this.tableSelection!=null&&this.anchorCellNodeKey!=null){let c=o;if(c===null&&t&&(c=r.getCellNodeFromCords(i,a,this.table)),c!==null){const l=this.$getAnchorTableCellOrThrow();return this.focusCellNodeKey=c.getKey(),this.tableSelection=fE(r,l,c),Yt(this.tableSelection),n.dispatchCommand(ec,void 0),Xb(n,this.table,this.tableSelection),!0}}}return!1}$getAnchorTableCell(){return this.anchorCellNodeKey?ft(this.anchorCellNodeKey):null}$getAnchorTableCellOrThrow(){const e=this.$getAnchorTableCell();return e===null&&ut(234),e}$getFocusTableCell(){return this.focusCellNodeKey?ft(this.focusCellNodeKey):null}$getFocusTableCellOrThrow(){const e=this.$getFocusTableCell();return e===null&&ut(235),e}$setAnchorCellForSelection(e){this.isHighlightingCells=!1,this.anchorCell=e,this.anchorX=e.x,this.anchorY=e.y,this.focusX=-1,this.focusY=-1,this.focusCell=null,this.focusCellNodeKey=null;const{tableNode:t}=this.$lookup(),n=gE(t,e.elem);if(n!==null){const r=n.getKey();this.tableSelection!=null?(this.tableSelection=this.tableSelection.clone(),this.tableSelection.set(t.getKey(),r,r)):this.tableSelection=fE(t,n,n),this.anchorCellNodeKey=r}}$formatCells(e){const t=Oe();sn(t)||ut(236);const n=Pl(),r=n.anchor,i=n.focus,a=t.getNodes().filter(ot);a.length>0||ut(237);const o=a[0].getFirstChild(),c=no(o)?o.getFormatFlags(e,null):null;a.forEach(l=>{r.set(l.getKey(),0,"element"),i.set(l.getKey(),l.getChildrenSize(),"element"),n.formatText(e,c)}),Yt(t),this.editor.dispatchCommand(ec,void 0)}$clearText(){const{editor:e}=this,t=ft(this.tableNodeKey);if(!fn(t))throw new Error("Expected TableNode.");const n=Oe();sn(n)||ut(253);const r=n.getNodes().filter(ot),i=t.getFirstChild(),a=t.getLastChild();if(r.length>0&&i!==null&&a!==null&&Lt(i)&&Lt(a)&&r[0]===i.getFirstChild()&&r[r.length-1]===a.getLastChild()){t.selectPrevious();const o=t.getParent();return t.remove(),void(Vn(o)&&o.isEmpty()&&e.dispatchCommand(jh,void 0))}r.forEach(o=>{if(Fe(o)){const c=ct(),l=wn();
288c.append(l),o.append(c),o.getChildren().forEach(u=>{u!==c&&u.remove()})}}),Xb(e,this.table,null),Yt(null),e.dispatchCommand(ec,void 0)}}const Xd="__lexicalTableSelection";function Fd(s){return mn(s)&&s.nodeName==="TABLE"}function Yh(s,e){if(!e)return e;const t=Fd(e)?e:s.getDOMSlot(e).element;return t.nodeName!=="TABLE"&&ut(245,e.nodeName),t}function Qv(s){return s._window}function dm(s,e){for(let t=e,n=null;t!==null;t=t.getParent()){if(s.is(t))return n;ot(t)&&(n=t)}return null}const QB=[[GE,"down"],[VE,"up"],[XE,"backward"],[KE,"forward"]],e7=[kp,zh,ic],t7=[Wv,YE];function n7(s,e){const t=s.getRootElement(),n=s._window;if(!t||!n)return()=>{};const r=i=>{const a=i.target;if(i.button!==0||!Jo(a)||!t.contains(a))return;const o=(function(c){const l=H1(c);if(l===null)return null;let u=l.elem;for(;u!=null;){if(u.nodeName==="TABLE"&&Xd in u&&u[Xd])return{cellElement:l,tableElement:u,tableObserver:u[Xd]};u=u.parentNode}return null})(a);s.update(()=>{if(sn(Oe())){for(const[d]of e.observers.values())d.$clearHighlight(!1);Yt(null),s.dispatchCommand(ec,void 0)}if(!o)return;const{tableObserver:c,tableElement:l,cellElement:u}=o;(function(d,h,f,p,y,g){const b=d._window;if(!b)return;const v=_=>{if(y.isSelecting)return;y.isSelecting=!0,_!==null&&y.anchorCell===null&&d.update(()=>{y.$setAnchorCellForSelection(_)});const T=()=>{y.isSelecting=!1,b.removeEventListener("pointerup",T),b.removeEventListener("pointermove",S)},S=C=>{if(!(M=>!(1&~M.buttons))(C)&&y.isSelecting)return y.isSelecting=!1,b.removeEventListener("pointerup",T),void b.removeEventListener("pointermove",S);if(!Jo(C.target))return;let D=null;const N=!(H2||p.contains(C.target));if(N)D=V2(p,C.target);else for(const M of document.elementsFromPoint(C.clientX,C.clientY))if(D=V2(p,M),D)break;if(D){const M=D;y.anchorCell===null&&d.update(()=>{y.$setAnchorCellForSelection(M)}),y.focusCell!==null&&D.elem===y.focusCell.elem||(g.setNextFocus({focusCell:D,override:N,tableKey:y.tableNodeKey}),d.dispatchCommand(ec,void 0))}};b.addEventListener("pointerup",T,y.listenerOptions),b.addEventListener("pointermove",S,y.listenerOptions)};y.pointerType=h.pointerType;const x=Xg(y.tableNodeKey),w=Yi();if(H2&&h.shiftKey&&ga(w,x)&&(Ie(w)||sn(w))){const _=w.anchor.getNode(),T=dm(x,w.anchor.getNode());T?(y.$setAnchorCellForSelection(lu(y,T)),y.$setFocusCellForSelection(f),Qa(h)):(x.isBefore(_)?x.selectStart():x.selectEnd()).anchor.set(w.anchor.key,w.anchor.offset,w.anchor.type)}else h.pointerType!=="touch"&&y.$setAnchorCellForSelection(f);v(f)})(s,i,u,l,c,e)})};return n.addEventListener("pointerdown",r),()=>{n.removeEventListener("pointerdown",r)}}function r7(s,e,t,n,r){const i=t.getRootElement(),a=Qv(t);i!==null&&a!==null||ut(246);const o=new JB(t,s.getKey()),c=Yh(s,e);(function(h,f){X2(h)!==null&&ut(205),h[Xd]=f})(c,o),o.listenersToRemove.add(()=>(function(h,f){X2(h)===f&&delete h[Xd]})(c,o));const l=h=>{h.detail>=3&&Jo(h.target)&&H1(h.target)!==null&&h.preventDefault()};c.addEventListener("mousedown",l,o.listenerOptions),o.listenersToRemove.add(()=>{c.removeEventListener("mousedown",l)});for(const[h,f]of QB)o.listenersToRemove.add(t.registerCommand(h,p=>_6(t,p,f,s,o,r),Qn));o.listenersToRemove.add(t.registerCommand(qE,h=>{const f=Oe();if(sn(f)){const p=dm(s,f.focus.getNode());if(p!==null)return Qa(h),p.selectEnd(),!0}return!1},Qn));const u=h=>()=>{const f=Oe();if(!ga(f,s))return!1;if(sn(f))return o.$clearText(),!0;if(Ie(f)){if(!ot(dm(s,f.anchor.getNode())))return!1;const p=f.anchor.getNode(),y=f.focus.getNode(),g=s.isParentOf(p),b=s.isParentOf(y);if(g&&!b||b&&!g)return o.$clearText(),!0;const v=St(f.anchor.getNode(),w=>Fe(w)),x=v&&St(v,w=>Fe(w)&&ot(w.getParent()));if(!Fe(x)||!Fe(v))return!1;if(h===zh&&x.getPreviousSibling()===null)return!0}return!1};for(const h of e7)o.listenersToRemove.add(t.registerCommand(h,u(h),Qn));const d=h=>{const f=Oe();if(!sn(f)&&!Ie(f))return!1;const p=s.isParentOf(f.anchor.getNode());if(p!==s.isParentOf(f.focus.getNode())){const y=p?"anchor":"focus",g=p?"focus":"anchor",{key:b,offset:v,type:x}=f[g];return s[f[y].isBefore(f[g])?"selectPrevious":"selectNext"]()[g].set(b,v,x),!1}
288return!!ga(f,s)&&!!sn(f)&&(h&&(h.preventDefault(),h.stopPropagation()),o.$clearText(),!0)};for(const h of t7)o.listenersToRemove.add(t.registerCommand(h,d,Qn));return o.listenersToRemove.add(t.registerCommand(zv,h=>{const f=Oe();if(f){if(!sn(f)&&!Ie(f))return!1;aE(t,yl(h,ClipboardEvent)?h:null,t6(f));const p=d(h);return Ie(f)?(f.removeText(),!0):p}return!1},Qn)),o.listenersToRemove.add(t.registerCommand(qi,h=>{const f=Oe();if(!ga(f,s))return!1;if(sn(f))return o.$formatCells(h),!0;if(Ie(f)){const p=St(f.anchor.getNode(),y=>ot(y));if(!ot(p))return!1}return!1},Qn)),o.listenersToRemove.add(t.registerCommand(cu,h=>{const f=Oe();if(!sn(f)||!ga(f,s))return!1;const p=f.anchor.getNode(),y=f.focus.getNode();if(!ot(p)||!ot(y))return!1;if((function(C,D){if(sn(C)){const N=C.anchor.getNode(),M=C.focus.getNode();if(D&&N&&M){const[F]=Ji(D,N,M);return N.getKey()===F[0][0].cell.getKey()&&M.getKey()===F[F.length-1].at(-1).cell.getKey()}}return!1})(f,s))return s.setFormat(h),!0;const[g,b,v]=Ji(s,p,y),x=Math.max(b.startRow+b.cell.__rowSpan-1,v.startRow+v.cell.__rowSpan-1),w=Math.max(b.startColumn+b.cell.__colSpan-1,v.startColumn+v.cell.__colSpan-1),_=Math.min(b.startRow,v.startRow),T=Math.min(b.startColumn,v.startColumn),S=new Set;for(let C=_;C<=x;C++)for(let D=T;D<=w;D++){const N=g[C][D].cell;if(S.has(N))continue;S.add(N),N.setFormat(h);const M=N.getChildren();for(let F=0;F<M.length;F++){const L=M[F];Fe(L)&&!L.isInline()&&L.setFormat(h)}}return!0},Qn)),o.listenersToRemove.add(t.registerCommand(Fh,h=>{const f=Oe();if(!ga(f,s))return!1;if(sn(f))return o.$clearHighlight(),!1;if(Ie(f)){const p=St(f.anchor.getNode(),y=>ot(y));if(!ot(p))return!1;if(typeof h=="string"){const y=q2(t,f,s);if(y)return G2(y,s,[wn(h)]),!0}}return!1},Qn)),n&&o.listenersToRemove.add(t.registerCommand(td,h=>{const f=Oe();if(!Ie(f)||!f.isCollapsed()||!ga(f,s))return!1;const p=Wg(f.anchor.getNode());return!(p===null||!s.is(Ul(p)))&&(Qa(h),(function(y,g){const b=g==="next"?"getNextSibling":"getPreviousSibling",v=g==="next"?"getFirstChild":"getLastChild",x=y[b]();if(Fe(x))return x.selectEnd();const w=St(y,Lt);w===null&&ut(247);for(let T=w[b]();Lt(T);T=T[b]()){const S=T[v]();if(Fe(S))return S.selectEnd()}const _=St(w,fn);_===null&&ut(248),g==="next"?_.selectNext():_.selectPrevious()})(p,h.shiftKey?"previous":"next"),!0)},Qn)),o.listenersToRemove.add(t.registerCommand(AU,h=>s.isSelected(),Qn)),o.listenersToRemove.add(t.registerCommand(jh,()=>{const h=Oe();if(!Ie(h)||!h.isCollapsed()||!ga(h,s))return!1;const f=q2(t,h,s);return!!f&&(G2(f,s),!0)},Qn)),o}function i7(s,e){const t=Oe(),n=Yi(),r=s.getAndClearNextFocus();if(r!==null){const{tableKey:o,focusCell:c}=r,l=s.observers.get(o);l||ut(335,o);const[u]=l;if(sn(t)&&t.tableKey===u.tableNodeKey)return(c.x!==u.focusX||c.y!==u.focusY)&&(u.$setFocusCellForSelection(c),!0);if(u.anchorCell!==null&&u.anchorCellNodeKey!==null&&c.elem!==u.anchorCell.elem&&u.tableSelection!==null)return u.$setFocusCellForSelection(c,!0),!0}const i=s.getAndClearShouldCheckSelectionForTable();if(i&&Ie(n)&&Ie(t)&&t.isCollapsed()){const o=Xg(i),c=t.anchor.getNode(),l=o.getFirstChild(),u=Wg(c);if(u!==null&&Lt(l)){const d=l.getFirstChild();if(ot(d)&&o.is(St(u,h=>h.is(o)||h.is(d))))return d.selectStart(),!0}}sn(t)&&(function(o,c){const l=Qv(o),u=Yi();if(!c.is(u))return;const d=Xg(c.tableKey),h=Hr(l);if(h&&h.anchorNode&&h.focusNode){const f=Gn(h.focusNode),p=f&&!d.isParentOf(f),y=Gn(h.anchorNode),g=y&&d.isParentOf(y);if(p&&g&&h.rangeCount>0){const b=CO(h,o);b&&(b.anchor.set(d.getKey(),c.isBackward()?d.getChildrenSize():0,"element"),h.removeAllRanges(),Yt(b))}}})(e,t),Ie(t)&&(function(o,c){const l=Yi(),{anchor:u,focus:d}=o,h=u.getNode(),f=d.getNode(),p=Wg(h),y=Wg(f),g=p?Ul(p):null,b=y?Ul(y):null,v=o.isBackward(),x=p&&y&&g&&b&&g.is(b),w=b&&(!g||g.isParentOf(b)),_=g&&(!b||b.isParentOf(g));if(w){const T=o.clone(),[S]=Ji(b,y,y),C=S[0][0].cell,D=S[S.length-1].at(-1).cell;T.focus.set(v?C.getKey():D.getKey(),v?0:D.getChildrenSize(),"element"),Yt(T)}else if(_){const T=o.clone(),[S]=Ji(g,p,p),C=S[0][0].cell,D=S[S.length-1].at(-1).cell;T.anchor.set(v?D.getKey():C.getKey(),v?D.getChildrenSize():0,"element"),Yt(T)}else if(x){const T=c.observers.get(g.getKey());T||ut(335,g.getKey());const[S]=T;
288if(p.is(y)||(S.$setAnchorCellForSelection(lu(S,p)),S.$setFocusCellForSelection(lu(S,y),!0)),S.pointerType==="touch"&&S.isSelecting&&o.isCollapsed()&&Ie(l)&&l.isCollapsed()){const C=Wg(l.anchor.getNode());C&&!C.is(y)&&(S.$setAnchorCellForSelection(lu(S,C)),S.$setFocusCellForSelection(lu(S,y),!0),S.pointerType=null)}}})(t,s);const a=s.observers.entries().map(([o,[c]])=>({tableNode:Xg(o),tableObserver:c})).toArray();for(const{tableNode:o,tableObserver:c}of a)s7(e,o,c);return!1}function s7(s,e,t){const n=Oe(),r=Yi();n&&!n.is(r)&&(sn(n)||sn(r))&&t.tableSelection&&!t.tableSelection.is(r)&&(sn(n)&&n.tableKey===t.tableNodeKey?t.$updateTableTableSelection(n):!sn(n)&&sn(r)&&r.tableKey===t.tableNodeKey&&t.$updateTableTableSelection(null)),t.hasHijackedSelectionStyles&&!e.isSelected()?(function(i,a){a.$enableHighlightStyle(),pE(a.table,o=>{const c=o.elem;o.highlighted=!1,x6(i,o),c.getAttribute("style")||c.removeAttribute("style")})})(s,t):!t.hasHijackedSelectionStyles&&e.isSelected()&&(function(i,a){a.$disableHighlightStyle(),pE(a.table,o=>{o.highlighted=!0,w6(i,o)})})(s,t)}function X2(s){return s[Xd]||null}function H1(s){let e=s;for(;e!=null;){const t=e.nodeName;if(t==="TD"||t==="TH"){const n=e._cell;return n===void 0?null:n}e=e.parentNode}return null}function V2(s,e){if(!s.contains(e))return null;let t=null;for(let n=e;n!=null;n=n.parentNode){if(n===s)return t;const r=n.nodeName;r!=="TD"&&r!=="TH"||(t=n._cell||null)}return null}function Vd(s,e){const t=[],n={columns:0,domRows:t,rows:0};let r=Yh(s,e).querySelector("tr"),i=0,a=0;for(t.length=0;r!=null;){const o=r.nodeName;if(o==="TD"||o==="TH"){const u={elem:r,hasBackgroundColor:r.style.backgroundColor!=="",highlighted:!1,x:i,y:a};r._cell=u;let d=t[a];d===void 0&&(d=t[a]=[]),d[i]=u}else{const u=r.firstChild;if(u!=null){r=u;continue}}const c=r.nextSibling;if(c!=null){i++,r=c;continue}const l=r.parentNode;if(l!=null){const u=l.nextSibling;if(u==null)break;a++,i=0,r=u}}return n.columns=i+1,n.rows=a+1,n}function Xb(s,e,t){const n=new Set(t?t.getNodes():[]);pE(e,(r,i)=>{const a=r.elem;n.has(i)?(r.highlighted=!0,w6(s,r)):(r.highlighted=!1,x6(s,r),a.getAttribute("style")||a.removeAttribute("style"))})}function pE(s,e){const{domRows:t}=s;for(let n=0;n<t.length;n++){const r=t[n];if(r)for(let i=0;i<r.length;i++){const a=r[i];if(!a)continue;const o=Gn(a.elem);o!==null&&e(a,o,{x:i,y:n})}}}const o7=(s,e,t,n,r)=>{const i=r==="forward";switch(r){case"backward":case"forward":return t!==(i?s.table.columns-1:0)?Gb(e.getCellNodeFromCordsOrThrow(t+(i?1:-1),n,s.table),i):n!==(i?s.table.rows-1:0)?Gb(e.getCellNodeFromCordsOrThrow(i?0:s.table.columns-1,n+(i?1:-1),s.table),i):i?e.selectNext():e.selectPrevious(),!0;case"up":return n!==0?Gb(e.getCellNodeFromCordsOrThrow(t,n-1,s.table),!1):e.selectPrevious(),!0;case"down":return n!==s.table.rows-1?Gb(e.getCellNodeFromCordsOrThrow(t,n+1,s.table),!0):e.selectNext(),!0;default:return!1}};function Yw(s,e){let t,n;if(e.startColumn===s.minColumn)t="minColumn";else{if(e.startColumn+e.cell.__colSpan-1!==s.maxColumn)return null;t="maxColumn"}if(e.startRow===s.minRow)n="minRow";else{if(e.startRow+e.cell.__rowSpan-1!==s.maxRow)return null;n="maxRow"}return[t,n]}function Vb([s,e]){return[s==="minColumn"?"maxColumn":"minColumn",e==="minRow"?"maxRow":"minRow"]}function pd(s,e,[t,n]){const r=e[n],i=s[r];i===void 0&&ut(250,n,String(r));const a=e[t],o=i[a];return o===void 0&&ut(250,t,String(a)),o}function a7(s,e,t,n,r){const i=z1(e,t,n),a=(function(T,S){const{minColumn:C,maxColumn:D,minRow:N,maxRow:M}=S;let F=1,L=1,A=1,X=1;const he=T[N],j=T[M];for(let ee=C;ee<=D;ee++)F=Math.max(F,he[ee].cell.__rowSpan),X=Math.max(X,j[ee].cell.__rowSpan);for(let ee=N;ee<=M;ee++)L=Math.max(L,T[ee][C].cell.__colSpan),A=Math.max(A,T[ee][D].cell.__colSpan);return{bottomSpan:X,leftSpan:L,rightSpan:A,topSpan:F}})(e,i),{topSpan:o,leftSpan:c,bottomSpan:l,rightSpan:u}=a,d=(function(T,S){const C=Yw(T,S);return C===null&&ut(249,S.cell.getKey()),C})(i,t),[h,f]=Vb(d);let p=i[h],y=i[f];r==="forward"?p+=h==="maxColumn"?1:c:r==="backward"?p-=h==="minColumn"?1:u:r==="down"?y+=f==="maxRow"?1:o:r==="up"&&(y-=f==="minRow"?1:l);const g=e[y];if(g===void 0)return!1;const b=g[p];if(b===void 0)return!1;const[v,x]=(function(T,S,C){const D=z1(T,S,C),N=Yw(D,S);if(N)return[pd(T,D,N),pd(T,D,Vb(N))];const M=Yw(D,C);
288if(M)return[pd(T,D,Vb(M)),pd(T,D,M)];const F=["minColumn","minRow"];return[pd(T,D,F),pd(T,D,Vb(F))]})(e,t,b),w=lu(s,v.cell),_=lu(s,x.cell);return s.$setAnchorCellForSelection(w),s.$setFocusCellForSelection(_,!0),!0}function ga(s,e){if(Ie(s)||sn(s)){const t=e.isParentOf(s.anchor.getNode()),n=e.isParentOf(s.focus.getNode());return t&&n}return!1}function Gb(s,e){e?s.selectStart():s.selectEnd()}function w6(s,e){const t=e.elem,n=s._config.theme;ot(Gn(t))||ut(131),vi(t,n.tableCellSelected)}function x6(s,e){const t=e.elem;ot(Gn(t))||ut(131);const n=s._config.theme;_l(t,n.tableCellSelected)}function Wg(s){const e=St(s,ot);return ot(e)?e:null}function Ul(s){const e=St(s,fn);return fn(e)?e:null}function c7(s,e,t,n,r,i,a){const o=ro(t.focus,r?"previous":"next");if(mD(o))return!1;let c=o;for(const g of lm(o).iterNodeCarets("shadowRoot")){if(!kl(g)||!Fe(g.origin))return!1;c=g}const l=c.getParentAtCaret();if(!ot(l))return!1;const u=l,d=(function(g){for(const b of lm(g).iterNodeCarets("root")){const{origin:v}=b;if(ot(v)){if(ii(b))return jr(v,g.direction)}else if(!Lt(v))break}return null})(An(u,c.direction)),h=St(u,fn);if(!h||!h.is(i))return!1;const f=s.getElementByKey(u.getKey()),p=H1(f);if(!f||!p)return!1;const y=u7(s,h);if(a.table=y,d)if(n==="extend"){const g=H1(s.getElementByKey(d.origin.getKey()));if(!g)return!1;a.$setAnchorCellForSelection(p),a.$setFocusCellForSelection(g,!0)}else{const g=ti(d);Ys(t.anchor,g),Ys(t.focus,g)}else if(n==="extend")a.$setAnchorCellForSelection(p),a.$setFocusCellForSelection(p,!0);else{const g=(function(b){const v=Gh(b);return ii(v)?ti(v):b})(An(h,o.direction));Ys(t.anchor,g),Ys(t.focus,g)}return Qa(e),!0}function _6(s,e,t,n,r,i){if((t==="up"||t==="down")&&(function(o){const c=o.getRootElement();return c?c.hasAttribute("aria-controls")&&c.getAttribute("aria-controls")==="typeahead-menu":!1})(s))return!1;const a=Oe();if(!ga(a,n)){if(Ie(a)){if(t==="backward"){if(a.focus.offset>0)return!1;const o=(function(l){for(let u=l,d=l;d!==null;u=d,d=d.getParent())if(Fe(d)){if(d!==u&&d.getFirstChild()!==u)return null;if(!d.isInline())return d}return null})(a.focus.getNode());if(!o)return!1;const c=o.getPreviousSibling();return!!fn(c)&&(Qa(e),e.shiftKey?a.focus.set(c.getParentOrThrow().getKey(),c.getIndexWithinParent(),"element"):c.selectEnd(),!0)}if(e.shiftKey&&(t==="up"||t==="down")){const o=a.focus.getNode();if(!a.isCollapsed()&&(t==="up"&&!a.isBackward()||t==="down"&&a.isBackward())){let c=St(o,f=>fn(f));if(ot(c)&&(c=St(c,fn)),c!==n||!c)return!1;const l=t==="down"?c.getNextSibling():c.getPreviousSibling();if(!l)return!1;let u=0;t==="up"&&Fe(l)&&(u=l.getChildrenSize());let d=l;t==="up"&&Fe(l)&&(d=l.getLastChild()||l,u=We(d)?d.getTextContentSize():0);const h=a.clone();return h.focus.set(d.getKey(),u,We(d)?"text":"element"),Yt(h),Qa(e),!0}if(ri(o)){const c=t==="up"?a.getNodes()[a.getNodes().length-1]:a.getNodes()[0];if(c&&dm(n,c)!==null){const l=n.getFirstDescendant(),u=n.getLastDescendant();if(!l||!u)return!1;const[d]=xs(l),[h]=xs(u),f=n.getCordsFromCellNode(d,r.table),p=n.getCordsFromCellNode(h,r.table),y=n.getDOMCellFromCordsOrThrow(f.x,f.y,r.table),g=n.getDOMCellFromCordsOrThrow(p.x,p.y,r.table);
288return r.$setAnchorCellForSelection(y),r.$setFocusCellForSelection(g,!0),!0}return!1}{let c=St(o,u=>Fe(u)&&!u.isInline());if(ot(c)&&(c=St(c,fn)),!c)return!1;const l=t==="down"?c.getNextSibling():c.getPreviousSibling();if(fn(l)&&r.tableNodeKey===l.getKey()){const u=l.getFirstDescendant(),d=l.getLastDescendant();if(!u||!d)return!1;const[h]=xs(u),[f]=xs(d),p=a.clone();return p.focus.set((t==="up"?h:f).getKey(),t==="up"?0:f.getChildrenSize(),"element"),Qa(e),Yt(p),!0}}}}return t==="down"&&$1(s)&&i.setShouldCheckSelectionForTable(n.getKey()),!1}if(Ie(a)){if(t==="backward"||t==="forward")return c7(s,e,a,e.shiftKey?"extend":"move",t==="backward",n,r);if(a.isCollapsed()){const{anchor:o,focus:c}=a,l=St(o.getNode(),ot),u=St(c.getNode(),ot);if(!ot(l)||!l.is(u))return!1;const d=Ul(l);if(d!==n&&d!=null){const v=Yh(d,s.getElementByKey(d.getKey()));if(v!=null)return r.table=Vd(d,v),_6(s,e,t,d,r,i)}const h=s.getElementByKey(l.__key),f=s.getElementByKey(o.key);if(f==null||h==null)return!1;let p;if(o.type==="element")p=f.getBoundingClientRect();else{const v=Hr(Qv(s));if(v===null||v.rangeCount===0)return!1;p=v.getRangeAt(0).getBoundingClientRect()}const y=t==="up"?l.getFirstChild():l.getLastChild();if(y==null)return!1;const g=s.getElementByKey(y.__key);if(g==null)return!1;const b=g.getBoundingClientRect();if(t==="up"?b.top>p.top-p.height:p.bottom+p.height>b.bottom){Qa(e);const v=n.getCordsFromCellNode(l,r.table);if(!e.shiftKey)return o7(r,n,v.x,v.y,t);{const x=n.getDOMCellFromCordsOrThrow(v.x,v.y,r.table);
288r.$setAnchorCellForSelection(x),r.$setFocusCellForSelection(x,!0)}return!0}}}else if(sn(a)){const{anchor:o,focus:c}=a,l=St(o.getNode(),ot),u=St(c.getNode(),ot),[d]=a.getNodes();fn(d)||ut(251);const h=Yh(d,s.getElementByKey(d.getKey()));if(!ot(l)||!ot(u)||!fn(d)||h==null)return!1;r.$updateTableTableSelection(a);const f=Vd(d,h),p=n.getCordsFromCellNode(l,f),y=n.getDOMCellFromCordsOrThrow(p.x,p.y,f);if(r.$setAnchorCellForSelection(y),Qa(e),e.shiftKey){const[g,b,v]=Ji(n,l,u);return a7(r,g,b,v,t)}return u.selectEnd(),!0}return!1}function Qa(s){s.preventDefault(),s.stopImmediatePropagation(),s.stopPropagation()}function G2(s,e,t){const n=ct();s==="first"?e.insertBefore(n):e.insertAfter(n),n.append(...t||[]),n.selectEnd()}function q2(s,e,t){const n=t.getParent();if(!n)return;const r=Hr(Qv(s));if(!r)return;const i=r.anchorNode,a=s.getElementByKey(n.getKey()),o=Yh(t,s.getElementByKey(t.getKey()));if(!i||!a||!o||!a.contains(i)||o.contains(i))return;const c=St(e.anchor.getNode(),v=>ot(v));if(!c)return;const l=St(c,v=>fn(v));if(!fn(l)||!l.is(t))return;const[u,d]=Ji(t,c,c),h=u[0][0],f=u[u.length-1][u[0].length-1],{startRow:p,startColumn:y}=d,g=p===h.startRow&&y===h.startColumn,b=p===f.startRow&&y===f.startColumn;return g?"first":b?"last":void 0}function lu(s,e){const{tableNode:t}=s.$lookup(),n=t.getCordsFromCellNode(e,s.table);return t.getDOMCellFromCordsOrThrow(n.x,n.y,s.table)}function gE(s,e,t){return dm(s,Gn(e,t))}function Y2(s,e,t){const n=s.querySelector("colgroup");if(!n)return;const r=[];for(let i=0;i<e;i++){const a=document.createElement("col"),o=t&&t[i];o&&(a.style.width=`${o}px`),r.push(a)}n.replaceChildren(...r)}function Z2(s,e,t){if(!e.theme.tableAlignment)return;const n=[],r=[];for(const i of["center","right"]){const a=e.theme.tableAlignment[i];a&&(i===t?r:n).push(a)}_l(s,...n),vi(s,...r)}const mE=new WeakSet;function $1(s=fb()){return mE.has(s)}function l7(s,e){e?mE.add(s):mE.delete(s)}class Qo extends ai{constructor(t){super(t);be(this,"__rowStriping");be(this,"__frozenColumnCount");be(this,"__frozenRowCount");be(this,"__colWidths");this.__rowStriping=!1,this.__frozenColumnCount=0,this.__frozenRowCount=0,this.__colWidths=void 0}static getType(){return"table"}getColWidths(){return this.getLatest().__colWidths}setColWidths(t){const n=this.getWritable();return n.__colWidths=t,n}static clone(t){return new Qo(t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__colWidths=t.__colWidths,this.__rowStriping=t.__rowStriping,this.__frozenColumnCount=t.__frozenColumnCount,this.__frozenRowCount=t.__frozenRowCount}static importDOM(){return{table:t=>({conversion:h7,priority:1})}}static importJSON(t){return od().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setRowStriping(t.rowStriping||!1).setFrozenColumns(t.frozenColumnCount||0).setFrozenRows(t.frozenRowCount||0).setColWidths(t.colWidths)}exportJSON(){return{...super.exportJSON(),colWidths:this.getColWidths(),frozenColumnCount:this.__frozenColumnCount?this.__frozenColumnCount:void 0,frozenRowCount:this.__frozenRowCount?this.__frozenRowCount:void 0,rowStriping:this.__rowStriping?this.__rowStriping:void 0}}extractWithChild(t,n,r){return r==="html"}getDOMSlot(t){const n=Fd(t)?t:t.querySelector("table");return Fd(n)||ut(229),super.getDOMSlot(t).withElement(n).withAfter(n.querySelector("colgroup"))}createDOM(t,n){const r=document.createElement("table");this.__style&&(r.style.cssText=this.__style);const i=document.createElement("colgroup");if(r.appendChild(i),XO(i),vi(r,t.theme.table),this.updateTableElement(null,r,t),$1(n)){const a=document.createElement("div"),o=t.theme.tableScrollableWrapper;return o?vi(a,o):a.style.cssText="overflow-x: auto;",a.appendChild(r),this.updateTableWrapper(null,a,r,t),a}return r}updateTableWrapper(t,n,r,i){this.__frozenColumnCount!==(t?t.__frozenColumnCount:0)&&(function(a,o,c,l){l>0?(vi(a,c.theme.tableFrozenColumn),o.setAttribute("data-lexical-frozen-column","true")):(_l(a,c.theme.tableFrozenColumn),o.removeAttribute("data-lexical-frozen-column"))})(n,r,i,this.__frozenColumnCount),this.__frozenRowCount!==(t?t.__frozenRowCount:0)&&(function(a,o,c,l){l>0?(vi(a,c.theme.tableFrozenRow),o.setAttribute("data-lexical-frozen-row","true")):(_l(a,c.theme.tableFrozenRow),o.removeAttribute("data-lexical-frozen-row"))})(n,r,i,this.__frozenRowCount)}updateTableElement(t,n,r){this.__style!==(t?t.__style:"")&&(n.style.cssText=this.__style),this.__rowStriping!==(!!t&&t.__rowStriping)&&(function(o,c,l){l?(vi(o,c.theme.tableRowStriping),o.setAttribute("data-lexical-row-striping","true")):(_l(o,c.theme.tableRowStriping),o.removeAttribute("data-lexical-row-striping"))})(n,r,this.__rowStriping);const i=t?t.getColumnCount():0,a=t?t.__colWidths:void 0;this.getColumnCount()===i&&this.getColWidths()===a||Y2(n,this.getColumnCount(),this.getColWidths()),Z2(n,r,this.getFormatType())}updateDOM(t,n,r){const i=this.getDOMSlot(n).element;return n===i===$1()||(mn(a=n)&&a.nodeName==="DIV"&&this.updateTableWrapper(t,n,i,r),this.updateTableElement(t,i,r),
288!1);var a}scaleDOMColWidths(t,n){const r=this.getColWidths();r&&Y2(this.getDOMSlot(t).element,this.getColumnCount(),r.map(i=>i*n))}exportDOM(t){const n=super.exportDOM(t),{element:r}=n;return{after:i=>{if(n.after&&(i=n.after(i)),!Fd(i)&&mn(i)&&(i=i.querySelector("table")),!Fd(i))return null;Z2(i,t._config,this.getFormatType());const[a]=tc(this,null,null),o=new Map;for(const d of a)for(const h of d){const f=h.cell.getKey();o.has(f)||o.set(f,{colSpan:h.cell.getColSpan(),startColumn:h.startColumn})}const c=new Set;for(const d of i.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")){const h=d.getAttribute("data-temporary-table-cell-lexical-key");if(h){const f=o.get(h);if(d.removeAttribute("data-temporary-table-cell-lexical-key"),f){o.delete(h);for(let p=0;p<f.colSpan;p++)c.add(p+f.startColumn)}}}const l=i.querySelector(":scope > colgroup");if(l){const d=Array.from(i.querySelectorAll(":scope > colgroup > col")).filter((h,f)=>c.has(f));l.replaceChildren(...d)}const u=i.querySelectorAll(":scope > tr");if(u.length>0){const d=document.createElement("tbody");for(const h of u)d.appendChild(h);i.append(d)}return i},element:!Fd(r)&&mn(r)?r.querySelector("table"):r}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(t,n){const{rows:r,domRows:i}=n;for(let a=0;a<r;a++){const o=i[a];if(o!=null)for(let c=0;c<o.length;c++){const l=o[c];if(l==null)continue;const{elem:u}=l,d=gE(this,u);if(d!==null&&t.is(d))return{x:c,y:a}}}throw new Error("Cell not found in table.")}getDOMCellFromCords(t,n,r){const{domRows:i}=r,a=i[n];if(a==null)return null;const o=a[t<a.length?t:a.length-1];return o??null}getDOMCellFromCordsOrThrow(t,n,r){const i=this.getDOMCellFromCords(t,n,r);if(!i)throw new Error("Cell not found at cords.");return i}getCellNodeFromCords(t,n,r){const i=this.getDOMCellFromCords(t,n,r);if(i==null)return null;const a=Gn(i.elem);return ot(a)?a:null}getCellNodeFromCordsOrThrow(t,n,r){const i=this.getCellNodeFromCords(t,n,r);if(!i)throw new Error("Node at cords not TableCellNode.");return i}getRowStriping(){return!!this.getLatest().__rowStriping}setRowStriping(t){const n=this.getWritable();return n.__rowStriping=t,n}setFrozenColumns(t){const n=this.getWritable();return n.__frozenColumnCount=t,n}getFrozenColumns(){return this.getLatest().__frozenColumnCount}setFrozenRows(t){const n=this.getWritable();return n.__frozenRowCount=t,n}getFrozenRows(){return this.getLatest().__frozenRowCount}canSelectBefore(){return!0}canIndent(){return!1}getColumnCount(){const t=this.getFirstChild();if(!t)return 0;let n=0;
288return t.getChildren().forEach(r=>{ot(r)&&(n+=r.getColSpan())}),n}}function u7(s,e){const t=s.getElementByKey(e.getKey());return t===null&&ut(230),Vd(e,t)}function h7(s){const e=od();s.hasAttribute("data-lexical-row-striping")&&e.setRowStriping(!0),s.hasAttribute("data-lexical-frozen-column")&&e.setFrozenColumns(1),s.hasAttribute("data-lexical-frozen-row")&&e.setFrozenRows(1);const t=s.querySelector(":scope > colgroup");if(t){let n=[];for(const r of t.querySelectorAll(":scope > col")){let i=r.style.width||"";if(!CD.test(i)&&(i=r.getAttribute("width")||"",!/^\d+$/.test(i))){n=void 0;break}n.push(parseFloat(i))}n&&e.setColWidths(n)}return{after:n=>BR(n,Lt),node:e}}function od(){return Ds(new Qo)}function fn(s){return s instanceof Qo}function d7(s){Lt(s.getParent())?s.isEmpty()&&s.append(ct()):s.remove()}function f7(s){fn(s.getParent())?OR(s,ot):s.remove()}function p7(s){OR(s,Lt);const[e]=tc(s,null,null),t=e.reduce((a,o)=>Math.max(a,o.length),0),n=s.getChildren();for(let a=0;a<e.length;++a){const o=n[a];if(!o)continue;Lt(o)||ut(254,o.constructor.name,o.getType());const c=e[a].reduce((l,u)=>u?1+l:l,0);if(c!==t)for(let l=c;l<t;++l){const u=si();u.append(ct()),o.append(u)}}const r=s.getColWidths(),i=s.getColumnCount();if(r&&r.length!==i){let a;if(i<r.length)a=r.slice(0,i);else if(r.length>0){const o=r[r.length-1];a=[...r,...Array(i-r.length).fill(o)]}s.setColWidths(a)}}function g7(s){if(s.detail<3||!Jo(s.target))return!1;const e=Gn(s.target);if(e===null)return!1;const t=St(e,n=>Fe(n)&&!n.isInline());return t===null?!1:!!ot(t.getParent())&&(t.select(0),!0)}function m7(){const s=Oe();if(!Ie(s))return!1;const e=Ul(s.anchor.getNode());if(e===null)return!1;const t=$t();if(!t.is(e.getParent())||t.getChildrenSize()!==1)return!1;const[n]=tc(e,null,null);if(n.length===0||n[0].length===0)return!1;const r=n[0][0];if(!r||!r.cell)return!1;const i=n[n.length-1],a=i[i.length-1];if(!a||!a.cell)return!1;const o=fE(e,r.cell,a.cell);return Yt(o),!0}function y7(s){return s.registerNodeTransform(mc,e=>{if(e.getColSpan()>1||e.getRowSpan()>1){const[,,t]=xs(e),[n]=Ji(t,e,e),r=n.length,i=n[0].length;let a=t.getFirstChild();Lt(a)||ut(175);const o=[];for(let c=0;c<r;c++){c!==0&&(a=a.getNextSibling(),Lt(a)||ut(175));let l=null;for(let u=0;u<i;u++){const d=n[c][u],h=d.cell;if(d.startRow===c&&d.startColumn===u)l=h,o.push(h);else if(h.getColSpan()>1||h.getRowSpan()>1){ot(h)||ut(176);const f=si(h.__headerState);l!==null?l.insertAfter(f):kL(a,f)}}}for(const c of o)c.setColSpan(1),c.setRowSpan(1)}})}function b7(s,e=!0){const t=new ZB,n=(r,i,a)=>{const o=Yh(r,a),c=r7(r,o,s,e,t);t.observers.set(i,[c,o])};return Ti(n7(s,t),s.registerCommand(ec,()=>i7(t,s),Qn),s.registerMutationListener(Qo,r=>{s.getEditorState().read(()=>{for(const[i,a]of r){const o=t.observers.get(i);if(a==="created"||a==="updated"){const{tableNode:c,tableElement:l}=v6(i);o===void 0?n(c,i,l):l!==o[1]&&(o[0].removeListeners(),t.observers.delete(i),n(c,i,l))}else a==="destroyed"&&o!==void 0&&(o[0].removeListeners(),t.observers.delete(i))}},{editor:s})},{skipInitialization:!1}),()=>{for(const[,[r]]of t.observers)r.removeListeners()})}function v7(s,e){s.hasNodes([Qo])||ut(255);const{hasNestedTables:t=yD(!1)}=e??{};return Ti(s.registerCommand(y6,n=>(function({rows:r,columns:i,includeHeaders:a},o){const c=Oe()||Yi();if(!c||!Ie(c)||!o&&Ul(c.anchor.getNode()))return!1;const l=LB(Number(r),Number(i),a);CL(l);const u=l.getFirstDescendant();return We(u)&&u.select(),!0})(n,t.peek()),xt),s.registerCommand(wU,(n,r)=>s===r&&(function(i,a){const{nodes:o,selection:c}=i;if(!o.some(d=>fn(d)||xL(d).some(h=>fn(h.node))))return!1;const l=sn(c),u=Ie(c);return u&&St(c.anchor.getNode(),d=>ot(d))!==null&&St(c.focus.getNode(),d=>ot(d))!==null||l?o.length===1&&fn(o[0])?(function(d,h){const f=h.getStartEndPoints(),p=sn(h);if(f===null)return!1;const[y,g]=f,[b,v,x]=xs(y),w=St(g.getNode(),B=>ot(B));if(!(ot(b)&&ot(w)&&Lt(v)&&fn(x)))return!1;const[_,T,S]=Ji(x,b,w),[C]=tc(d,null,null),D=_.length,N=D>0?_[0].length:0;let M=T.startRow,F=T.startColumn,L=C.length,A=L>0?C[0].length:0;if(p){const B=z1(_,T,S),re=B.maxRow-B.minRow+1,le=B.maxColumn-B.minColumn+1;M=B.minRow,F=B.minColumn,L=Math.min(L,re),A=Math.min(A,le)}let X=!1;const he=Math.min(D,M+L)-1,j=Math.min(N,F+A)-1,ee=new Set;for(let B=M;B<=he;B++)for(let re=F;re<=j;re++){const le=_[B][re];ee.has(le.cell.getKey())||le.cell.__rowSpan===1&&le.cell.__colSpan===1||(GB(le.cell),ee.add(le.cell.getKey()),X=!0)}let[O]=tc(x.getWritable(),null,null);const pe=L-D+M;for(let B=0;B<pe;B++)dE(O[D-1][0].cell);const q=A-N+F;for(let B=0;B<q;B++)$B(O[0][N-1].cell,!0,!1);[O]=tc(x.getWritable(),null,null);for(let B=M;B<M+L;B++)for(let re=F;re<F+A;re++){const le=B-M,ge=re-F,ie=C[le][ge];if(ie.startRow!==le||ie.startColumn!==ge)continue;const P=ie.cell;if(P.__rowSpan!==1||P.__colSpan!==1){const se=[],ue=Math.min(B+P.__rowSpan,M+L)-1,we=Math.min(re+P.__colSpan,F+A)-1;for(let H=B;H<=ue;H++)for(let _e=re;_e<=we;_e++){const K=O[H][_e];
288se.push(K.cell)}XB(se),X=!0}const{cell:W}=O[B][re],te=P.getBackgroundColor();te!=null&&W.setBackgroundColor(te);const Y=W.getChildren();P.getChildren().forEach(se=>{We(se)&&ct().append(se),W.append(se)}),Y.forEach(se=>se.remove())}if(p&&X){const[B]=tc(x.getWritable(),null,null);B[T.startRow][T.startColumn].cell.selectEnd()}return!0})(o[0],c):!(u&&a.peek()&&!(function(d){return!!(sn(d)&&!d.focus.getNode().is(d.anchor.getNode())||Ie(d)&&ot(d.anchor.getNode())&&!d.anchor.getNode().is(d.focus.getNode()))})(c)):!1})(n,t),xt),s.registerCommand(C1,m7,ru),s.registerCommand(HE,g7,xt),s.registerNodeTransform(Qo,p7),s.registerNodeTransform(Xp,f7),s.registerNodeTransform(mc,d7))}function w7({hasCellMerge:s=!0,hasCellBackgroundColor:e=!0,hasTabHandler:t=!0,hasHorizontalScroll:n=!1,hasNestedTables:r=!1}){const[i]=Kt();Ee.useEffect(()=>{$1(i)!==n&&(l7(i,n),i.registerNodeTransform(Qo,()=>{})())},[i,n]);const a=(function(o){const[c]=Ee.useState(()=>yD(o));return c.peek()!==o&&(c.value=o),c})(r);return Ee.useEffect(()=>v7(i,{hasNestedTables:a}),[i,a]),Ee.useEffect(()=>b7(i,t),[i,t]),Ee.useEffect(()=>{if(!s)return y7(i)},[i,s]),Ee.useEffect(()=>{if(!e)return i.registerNodeTransform(mc,o=>{o.getBackgroundColor()!==null&&o.setBackgroundColor(null)})},[i,e,s]),null}function oo(s,e,t,n="left"){const[r,i]=Ee.useState(n);return Ee.useEffect(()=>{if(!s||!e.current)return;const a=e.current.getBoundingClientRect(),o=window.innerWidth,c=8;if(n==="left"){const l=a.left+t<=o-c;
288i(l?"left":"right")}else{const l=a.right-t>=c;i(l?"right":"left")}},[s,e,t,n]),r}const x7=224;function _7(){const[s,e]=Ee.useState(!1),t=Ee.useRef(null),n=Ee.useRef(null),r=oo(s,n,x7,"left"),{margins:i,setMargins:a,resetMargins:o}=wi();Ee.useEffect(()=>{if(!s)return;function l(u){t.current&&!t.current.contains(u.target)&&e(!1)}return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[s]);const c=(l,u)=>{const d=parseFloat(u);!isNaN(d)&&d>=0&&d<=5&&a({[l]:d})};return G.jsxs("div",{className:"relative",ref:t,children:[G.jsx("button",{ref:n,type:"button",onClick:()=>e(l=>!l),title:"Page Margins",className:`flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-semibold transition-colors ${s?"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 4.5v15m6-15v15M4.5 9h15m-15 6h15"})})}),s&&G.jsxs("div",{className:`absolute top-full z-50 mt-1 w-56 rounded-lg border border-gray-200 bg-white p-3 shadow-lg dark:border-gray-700 dark:bg-gray-800 ${r==="right"?"right-0":"left-0"}`,children:[G.jsx("p",{className:"mb-2 text-xs font-semibold text-gray-700 dark:text-gray-300",children:"Page Margins (inches)"}),G.jsx("div",{className:"grid grid-cols-2 gap-2",children:["top","right","bottom","left"].map(l=>G.jsxs("label",{className:"flex flex-col gap-0.5",children:[G.jsx("span",{className:"text-[10px] capitalize text-gray-500 dark:text-gray-400",children:l}),G.jsx("input",{type:"number",min:0,max:5,step:.25,value:i[l],onChange:u=>c(l,u.target.value),className:"h-7 w-full rounded border border-gray-200 bg-white px-2 text-xs text-gray-700 outline-none focus:border-yellow-500 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 dark:focus:border-yellow-500"})]},l))}),G.jsx("button",{type:"button",onClick:o,className:"mt-2 w-full rounded bg-gray-100 px-2 py-1 text-xs text-gray-600 transition-colors hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-400 dark:hover:bg-gray-600",children:"Reset to Default"})]})]})}const T7=Object.keys(m0),S7=208;function E7(){const[s,e]=Ee.useState(!1),t=Ee.useRef(null),n=Ee.useRef(null),r=oo(s,n,S7,"left"),{pageSize:i,setPageSize:a}=wi();return Ee.useEffect(()=>{if(!s)return;function o(c){t.current&&!t.current.contains(c.target)&&e(!1)}return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[s]),G.jsxs("div",{className:"relative",ref:t,children:[G.jsx("button",{ref:n,type:"button",onClick:()=>e(o=>!o),title:"Page Layout",className:`flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-semibold transition-colors ${s?"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})}),s&&G.jsx("div",{className:`absolute top-full z-50 mt-1 w-52 rounded-lg border border-gray-200 bg-white p-3 shadow-lg dark:border-gray-700 dark:bg-gray-800 ${r==="right"?"right-0":"left-0"}`,children:G.jsxs("label",{className:"mb-2 block",children:[G.jsx("span",{className:"mb-1 block text-[10px] font-semibold uppercase text-gray-500 dark:text-gray-400",children:"Page Size"}),G.jsx("select",{value:i,onChange:o=>a(o.target.value),className:"h-7 w-full rounded border border-gray-200 bg-white px-2 text-xs text-gray-700 outline-none focus:border-yellow-500 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 dark:focus:border-yellow-500",children:T7.map(o=>G.jsxs("option",{value:o,children:[m0[o].label," (",m0[o].width,'" x ',m0[o].height,'")']},o))})]})})]})}const D7=[{key:"top",label:"Top"},{key:"bottom",label:"Bottom"},{key:"left",label:"Left"},{key:"right",label:"Right"}],C7=176;function A7(){const[s,e]=Ee.useState(!1),t=Ee.useRef(null),n=Ee.useRef(null),r=oo(s,n,C7,"left"),{pageBorder:i,setPageBorder:a,toggleAllBorders:o}=wi(),c=i.top||i.right||i.bottom||i.left,l=i.top&&i.right&&i.bottom&&i.left;return Ee.useEffect(()=>{if(!s)return;function u(d){t.current&&!t.current.contains(d.target)&&e(!1)}return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[s]),G.jsxs("div",{className:"relative",ref:t,children:[G.jsx("button",{ref:n,type:"button",onClick:()=>e(u=>!u),title:"Page Border",className:`flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-semibold transition-colors ${s||c?"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:G.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[G.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"1",strokeLinecap:"round",strokeLinejoin:"round"}
288),G.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"0.5",strokeDasharray:"2 2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),s&&G.jsxs("div",{className:`absolute top-full z-50 mt-1 w-44 rounded-lg border border-gray-200 bg-white p-3 shadow-lg dark:border-gray-700 dark:bg-gray-800 ${r==="right"?"right-0":"left-0"}`,children:[G.jsx("span",{className:"mb-2 block text-[10px] font-semibold uppercase text-gray-500 dark:text-gray-400",children:"Page Border"}),G.jsxs("label",{className:"mb-1.5 flex cursor-pointer items-center gap-2 rounded px-1.5 py-1 text-xs text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-700",children:[G.jsx("input",{type:"checkbox",checked:l,onChange:o,className:"h-3.5 w-3.5 rounded border-gray-300 accent-yellow-500"}),"All Borders"]}),G.jsx("div",{className:"my-1.5 border-t border-gray-100 dark:border-gray-700"}),D7.map(({key:u,label:d})=>G.jsxs("label",{className:"flex cursor-pointer items-center gap-2 rounded px-1.5 py-1 text-xs text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-700",children:[G.jsx("input",{type:"checkbox",checked:i[u],onChange:h=>a(u,h.target.checked),className:"h-3.5 w-3.5 rounded border-gray-300 accent-yellow-500"}),d]},u))]})]})}const qb=[{label:"Arial",value:"Arial, sans-serif"},{label:"Times New Roman",value:"'Times New Roman', serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Courier New",value:"'Courier New', monospace"},{label:"Verdana",value:"Verdana, sans-serif"},{label:"Trebuchet MS",value:"'Trebuchet MS', sans-serif"},{label:"Garamond",value:"Garamond, serif"}];function T6(s){return s.includes("'")?`"${s.replace(/"/g,"")}"`:`'${s}'`}const k7=/wingdings|webdings|dingbats|^symbol$|marlett|mt extra|bookshelf symbol|mdl2|fluent icons|segoe icons|ms reference specialty|ms outlook|holomdl2|emoji|font awesome|material icons|glyphicons/i;function S6(s){return k7.test(s)}const N7=/kruti|devlys|chanakya|walkman|shusha|shivaji|krishna|yogesh|^agra$|aps-dv|priyanka|shree-dev|shree lipi|^kiran$|sushma|^arjun$|bharati|^amar$|^richa$|surekh|hindi saral|devanagari new/i;function F7(s){return N7.test(s)}function Zw(s){const e=(s.split(",")[0]??"").trim(),t=e[0];return(t==='"'||t==="'")&&e.length>=2&&e.endsWith(t)?e.slice(1,-1).trim():e.replace(/['"]/g,"").trim()}const U7=["Calibri","Cambria","Candara","Consolas","Constantia","Corbel","Segoe UI","Segoe UI Semibold","Tahoma","Bahnschrift","Sitka Text","Book Antiqua","Bookman Old Style","Century Gothic","Century Schoolbook","Franklin Gothic Medium","Palatino Linotype","Lucida Console","Lucida Sans Unicode","Lucida Handwriting","Impact","Comic Sans MS","Arial Black","Arial Narrow","Aptos","Aptos Display","Cascadia Code","Cascadia Mono","Gill Sans MT","Rockwell","Perpetua","Baskerville Old Face","Bell MT","Calisto MT","Copperplate Gothic Light","Ebrima","Gadugi","Leelawadee UI","Malgun Gothic","Microsoft Sans Serif","MS Gothic","Segoe Print","Segoe Script","Sylfaen","Symbol","Tw Cen MT","Yu Gothic","MV Boli","Ink Free","Helvetica Neue","Avenir","Avenir Next","Menlo","Monaco","Baskerville","Didot","Futura","Gill Sans","Optima","Palatino","Hoefler Text","American Typewriter","Chalkboard","Cochin","Geneva","Big Caslon","Charter","SF Pro","Kohinoor Devanagari","Devanagari MT","Devanagari Sangam MN","ITF Devanagari","Shree Devanagari 714","Gujarati MT","Gujarati Sangam MN","Bangla MN","Bangla Sangam MN","Tamil MN","Tamil Sangam MN","Telugu MN","Telugu Sangam MN","Kannada MN","Kannada Sangam MN","Malayalam MN","Malayalam Sangam MN","Gurmukhi MN","Gurmukhi Sangam MN","Oriya MN","DejaVu Sans","DejaVu Serif","DejaVu Sans Mono","Liberation Sans","Liberation Serif","Liberation Mono","Ubuntu","Ubuntu Mono","Cantarell","Noto Sans","Noto Serif","Noto Sans Mono","FreeSans","FreeSerif","Nimbus Roman","Nimbus Sans","Roboto","Open Sans","Lato","Source Sans 3","Source Serif 4","Fira Sans","Fira Code","Inter","Montserrat","Merriweather","PT Sans","PT Serif","Nunito","Raleway","Oswald","Playfair Display","Cormorant Garamond","EB Garamond","Crimson Text","Libre Baskerville","Lora","Mangal","Nirmala UI","Nirmala Text","Kokila","Utsaah","Aparajita","Sanskrit Text","Shruti","Vrinda","Shonar Bangla","Latha","Vijaya","Gautami","Vani","Tunga","Kartika","Raavi","Kalinga","Iskoola Pota","Nyala","Urdu Typesetting","Traditional Arabic","Arabic Typesetting","Kruti Dev 010","Kruti Dev 011","Kruti Dev 016","Kruti Dev 020","Kruti Dev 040","Kruti Dev 050","Kruti Dev 100","Kruti Dev 130","DevLys 010","DevLys 020","Chanakya","Walkman-Chanakya-901","Walkman-Chanakya-905","Krishna","Yogesh","Agra","Shusha","Shivaji01","Shivaji02","Shivaji05","APS-DV-Priyanka","Arjun","Bharati","Bhasha Bharati","Amar","Richa","Surekh","Shree-Dev-0714","Shree Lipi","Kiran","Yogeshweb","Hindi Saral","Devanagari New","Sushma","Noto Sans Devanagari","Noto Serif Devanagari","Lohit Devanagari","Gargi","Kalimati","Samyak Devanagari","Chandas","Sarai","Nakula","Sahadeva","Shobhika","Hind","Mukta","Poppins","Karma","Laila","Palanquin","Rajdhani","Teko","Khand","Martel","Martel Sans","Yantramanav","Sarala","Amiko","Baloo 2","Tiro Devanagari Hindi","Tiro Devanagari Marathi","Tiro Devanagari Sanskrit","Eczar","Cambay","Kalam","Kurale","Halant","Rozha One","Sahitya","Vesper Libre","Biryani","Ek Mukta","Pragati Narrow","Glegoo","Jaldi","Arya","Sumana","Modak","Dekko","Asar","Kadwa","Gotu","Yatra One","Anek Devanagari","Annapurna SIL","Siddhanta","Adishila","Noto Sans Gujarati","Noto Serif Gujarati","Lohit Gujarati","Hind Vadodara","Shrikhand","Rasa","Mukta Vaani","Baloo Bhai 2","Anek Gujarati","Noto Sans Bengali","Noto Serif Bengali","Lohit Bengali","Hind Siliguri","Baloo Da 2","Tiro Bangla","Atma","Galada","Mina","Kalpurush","SolaimanLipi","Siyam Rupali","Anek Bangla","Noto Sans Tamil","Noto Serif Tamil","Lohit Tamil","Hind Madurai","Baloo Thambi 2","Tiro Tamil","Mukta Malar","Catamaran","Pavanam","Kavivanar","Anek Tamil","TAMu_Kadambri","TSCu_Paranar","Noto Sans Telugu","Noto Serif Telugu","Lohit Telugu","Hind Guntur","Baloo Tammudu 2","Tiro Telugu","Mallanna","Ramabhadra","Suranna","Anek Telugu","Pothana2000","Noto Sans Kannada","Noto Serif Kannada","Lohit Kannada","Baloo Tamma 2","Tiro Kannada","Anek Kannada","Noto Sans Malayalam","Noto Serif Malayalam","Lohit Malayalam","Baloo Chettan 2","Manjari","Chilanka","Gayathri","Rachana","Meera","Anek Malayalam","Noto Sans Gurmukhi","Noto Serif Gurmukhi","Lohit Gurmukhi","Mukta Mahee","Baloo Paaji 2","Tiro Gurmukhi","Anek Gurmukhi","AnmolLipi","Gurbani Lipi","Noto Sans Oriya","Lohit Odia","Baloo Bhaina 2","Anek Odia","Noto Naskh Arabic","Noto Nastal
288iq Urdu","Jameel Noori Nastaleeq","Gulzar","Amiri","Scheherazade New"],R7="mmmmwwwwlliiWAgy0123 à¤
à¤à¤à¤à¤à¤à¤",J2=["monospace","serif","sans-serif"];let Jw,Qw;function I7(){return Jw===void 0&&(Jw=document.createElement("canvas").getContext("2d")),Jw}function Q2(s,e){return s.font=`72px ${e}`,s.measureText(R7).width}function M7(s){const e=I7();if(!e)return!1;Qw||(Qw=J2.map(n=>Q2(e,n)));const t=T6(s);return J2.some((n,r)=>Q2(e,`${t}, ${n}`)!==Qw[r])}function P7(){const s=new Set;return typeof document>"u"||!document.fonts||document.fonts.forEach(e=>s.add(e.family.replace(/['"]/g,"").toLowerCase())),s}function O7(s=U7){const e=P7(),t=s.filter(n=>!e.has(n.toLowerCase())&&!S6(n)&&M7(n));return kD(t)}function E6(){return typeof window.queryLocalFonts=="function"}async function L7(){var n;const s=window.queryLocalFonts;if(!s)throw new Error("Local Font Access API is not available");const e=await s.call(window),t=new Set;for(const r of e){const i=(n=r.family)==null?void 0:n.trim();i&&!i.startsWith("@")&&!i.startsWith(".")&&!S6(i)&&t.add(i)}return kD([...t])}function kD(s){return[...new Set(s)].sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:"base"}))}const D6="editor-installed-fonts";function B7(){try{const s=localStorage.getItem(D6);if(!s)return null;const e=JSON.parse(s);if(Array.isArray(e)&&e.every(t=>typeof t=="string")&&e.length>0)return e}catch{}return null}function W7(s){try{localStorage.setItem(D6,JSON.stringify(s))}catch{}}const Yb=HI((s,e)=>({installed:[],status:"idle",detect:()=>{if(e().status!=="idle")return;const t=B7();if(t){s({installed:t,status:"complete"});return}s({installed:O7(),status:"detected"})},loadAll:async()=>{const{status:t,installed:n}=e();if(!(t==="loading"||t==="complete"||!E6())){s({status:"loading"});try{const r=await L7();if(r.length===0){s({status:"denied"});return}const i=kD([...n,...r]);W7(i),s({installed:i,status:"complete"})}catch{s({status:"denied"})}}}}));function ek(s,e){return F7(s)?void 0:{fontFamily:e}}const tk="__load-all-fonts__";function ND({value:s,onChange:e,defaultLabel:t,title:n,className:r,onMouseDown:i}){const a=Yb(g=>g.installed),o=Yb(g=>g.status),c=Yb(g=>g.detect),l=Yb(g=>g.loadAll);Ee.useEffect(()=>{c()},[c]);const u=Ee.useMemo(()=>new Set(qb.map(g=>g.value)),[]),d=Ee.useMemo(()=>new Set(qb.map(g=>g.label.toLowerCase())),[]),h=Ee.useMemo(()=>a.filter(g=>!d.has(g.toLowerCase())).map(g=>({label:g,value:T6(g)})),[a,d]),f=Ee.useMemo(()=>{if(s===""||u.has(s)||h.some(x=>x.value===s))return s;const g=Zw(s).toLowerCase(),b=qb.find(x=>x.label.toLowerCase()===g);if(b)return b.value;const v=h.find(x=>x.label.toLowerCase()===g);return v?v.value:s},[s,u,h]),p=f===""||u.has(f)||h.some(g=>g.value===f),y=E6()&&o!=="complete"&&o!=="loading";return G.jsxs("select",{value:f,title:n,onMouseDown:i,className:r,onChange:g=>{const b=g.target.value;if(b===tk){l();return}e(b)},children:[G.jsx("option",{value:"",children:t}),!p&&G.jsx("option",{value:f,style:ek(Zw(f),f),children:Zw(f)}),G.jsx("optgroup",{label:"Standard",children:qb.map(g=>G.jsx("option",{value:g.value,style:{fontFamily:g.value},children:g.label},g.value))}),h.length>0&&G.jsx("optgroup",{label:"On this computer",children:h.map(g=>G.jsx("option",{value:g.value,style:ek(g.label,g.value),children:g.label},g.value))}),o==="loading"&&G.jsx("option",{disabled:!0,children:"Loading fontsâ¦"}),y&&G.jsx("option",{value:tk,children:o==="denied"?"Load all fonts on this computer⦠(allow access)":"Load all fonts on this computerâ¦"})]})}const j7=240,z7=[{label:"8px",value:"8px"},{label:"9px",value:"9px"},{label:"10px",value:"10px"},{label:"11px",value:"11px"},{label:"12px",value:"12px"},{label:"14px",value:"14px"},{label:"16px",value:"16px"},{label:"18px",value:"18px"}],H7=[{value:"left",label:"Left",icon:G.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 6h18M3 12h12M3 18h18"})})},{value:"center",label:"Center",icon:G.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 6h18M6 12h12M3 18h18"})})},{value:"right",label:"Right",icon:G.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 6h18M9 12h12M3 18h18"})})}];function $7(){const[s,e]=Ee.useState(!1),t=Ee.useRef(null),n=Ee.useRef(null),r=oo(s,n,j7,"left"),{showPageNumbers:i,togglePageNumbers:a,pageNumberAlign:o,pageNumberFontFamily:c,pageNumberFontSize:l,setPageNumberAlign:u,setPageNumberFontFamily:d,setPageNumberFontSize:h}=wi();return Ee.useEffect(()=>{if(!s)return;function f(p){t.current&&!t.current.contains(p.target)&&e(!1)}return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[s]),G.jsxs("div",{className:"relative",ref:t,children:[G.jsx("button",{ref:n,type:"button",onClick:()=>e(f=>!f),title:"Page Numbers",className:`flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-semibold transition-colors ${s?"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:G.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 20h10M12 4v16m-4-4h8"}),G.jsx("text",{x:"12",y:"10",textAnchor:"middle",fontSize:"8",fill:"
288currentColor",stroke:"none",fontWeight:"600",children:"1"})]})}),s&&G.jsxs("div",{className:`absolute top-full z-50 mt-1 w-60 rounded-lg border border-gray-200 bg-white p-3 shadow-lg dark:border-gray-700 dark:bg-gray-800 ${r==="right"?"right-0":"left-0"}`,children:[G.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[G.jsx("p",{className:"text-xs font-semibold text-gray-700 dark:text-gray-300",children:"Page Numbers"}),G.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5",children:[G.jsx("span",{className:"text-[10px] text-gray-500 dark:text-gray-400",children:i?"On":"Off"}),G.jsx("button",{type:"button",onClick:a,className:`relative h-4 w-7 rounded-full transition-colors ${i?"bg-yellow-500":"bg-gray-300 dark:bg-gray-600"}`,children:G.jsx("span",{className:`absolute top-0.5 h-3 w-3 rounded-full bg-white shadow transition-transform ${i?"left-3.5":"left-0.5"}`})})]})]}),G.jsxs("div",{className:"space-y-2.5",children:[G.jsxs("div",{children:[G.jsx("p",{className:"mb-1 text-[10px] text-gray-500 dark:text-gray-400",children:"Alignment"}),G.jsx("div",{className:"flex gap-1",children:H7.map(f=>G.jsx("button",{type:"button",title:f.label,onClick:()=>u(f.value),className:`flex h-7 w-8 items-center justify-center rounded border transition-colors ${o===f.value?"border-yellow-500 bg-yellow-50 text-yellow-700 dark:bg-yellow-500/10 dark:text-yellow-400":"border-gray-200 text-gray-500 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-700"}`,children:f.icon},f.value))})]}),G.jsxs("div",{children:[G.jsx("p",{className:"mb-1 text-[10px] text-gray-500 dark:text-gray-400",children:"Font"}),G.jsx(ND,{value:c,onChange:d,defaultLabel:"Default",className:"h-7 w-full rounded border border-gray-200 bg-white px-2 text-xs text-gray-700 outline-none focus:border-yellow-500 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 dark:focus:border-yellow-500"})]}),G.jsxs("div",{children:[G.jsx("p",{className:"mb-1 text-[10px] text-gray-500 dark:text-gray-400",children:"Size"}),G.jsx("select",{value:l,onChange:f=>h(f.target.value),className:"h-7 w-full rounded border border-gray-200 bg-white px-2 text-xs text-gray-700 outline-none focus:border-yellow-500 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 dark:focus:border-yellow-500",children:z7.map(f=>G.jsx("option",{value:f.value,children:f.label},f.value))})]})]})]})]})}const K7=8,Zb=8,X7=180;function V7(){const[s]=Kt(),[e,t]=Ee.useState(!1),[n,r]=Ee.useState(0),[i,a]=Ee.useState(0),o=Ee.useRef(null),c=Ee.useRef(null),l=oo(e,c,X7,"left");Ee.useEffect(()=>{if(!e)return;function d(h){o.current&&!o.current.contains(h.target)&&t(!1)}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[e]);const u=(d,h)=>{s.dispatchCommand(y6,{rows:String(d),columns:String(h),includeHeaders:{rows:!0,columns:!1}}),t(!1),r(0),a(0)};return G.jsxs("div",{className:"relative",ref:o,children:[G.jsx("button",{ref:c,type:"button",onClick:()=>t(d=>!d),title:"Insert Table",className:`flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-semibold transition-colors ${e?"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:G.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[G.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",strokeLinecap:"round",strokeLinejoin:"round"}),G.jsx("line",{x1:"3",y1:"9",x2:"21",y2:"9",strokeLinecap:"round"}),G.jsx("line",{x1:"3",y1:"15",x2:"21",y2:"15",strokeLinecap:"round"}),G.jsx("line",{x1:"9",y1:"3",x2:"9",y2:"21",strokeLinecap:"round"}),G.jsx("line",{x1:"15",y1:"3",x2:"15",y2:"21",strokeLinecap:"round"})]})}),e&&G.jsxs("div",{className:`absolute top-full z-50 mt-1 rounded-lg border border-gray-200 bg-white p-2.5 shadow-lg dark:border-gray-700 dark:bg-gray-800 ${l==="right"?"right-0":"left-0"}`,children:[G.jsx("p",{className:"mb-1.5 text-center text-xs font-medium text-gray-600 dark:text-gray-400",children:n>0&&i>0?`${n} x ${i}`:"Insert Table"}),G.jsx("div",{className:"grid gap-0.5",style:{gridTemplateColumns:`repeat(${Zb}, 1fr)`},onMouseLeave:()=>{r(0),a(0)},children:Array.from({length:K7*Zb},(d,h)=>{const f=Math.floor(h/Zb)+1,p=h%Zb+1,y=f<=n&&p<=i;
288return G.jsx("button",{type:"button",className:`h-4 w-4 rounded-sm border transition-colors ${y?"border-yellow-500 bg-yellow-100 dark:border-yellow-400 dark:bg-yellow-900/40":"border-gray-300 bg-white dark:border-gray-600 dark:bg-gray-700"}`,onMouseEnter:()=>{r(f),a(p)},onClick:()=>u(f,p)},h)})})]})]})}const nk=[{label:"0",value:"0pt"},{label:"6pt",value:"6pt"},{label:"12pt",value:"12pt"},{label:"18pt",value:"18pt"},{label:"24pt",value:"24pt"}],G7=176;function q7(){const[s]=Kt(),[e,t]=Ee.useState(!1),[n,r]=Ee.useState("0pt"),[i,a]=Ee.useState("0pt"),o=Ee.useRef(null),c=Ee.useRef(null),l=oo(e,c,G7,"left");Ee.useEffect(()=>{if(!e)return;const d=h=>{o.current&&!o.current.contains(h.target)&&t(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[e]),Ee.useEffect(()=>s.registerUpdateListener(({editorState:d})=>{d.read(()=>{var y,g;const h=Oe();if(!Ie(h))return;const f=h.anchor.getNode(),p=f.getKey()==="root"?f:f.getTopLevelElementOrThrow();if(Fe(p)){const b=p.getStyle(),v=b.match(/margin-top:\s*([^;]+)/),x=b.match(/margin-bottom:\s*([^;]+)/);r(((y=v==null?void 0:v[1])==null?void 0:y.trim())||"0pt"),a(((g=x==null?void 0:x[1])==null?void 0:g.trim())||"0pt")}})}),[s]);const u=Ee.useCallback((d,h)=>{s.update(()=>{const f=Oe();if(!Ie(f))return;const p=f.getNodes(),y=new Set;for(const g of p){const b=Fe(g)&&!g.isInline()?g:hm(g);y.add(b)}for(const g of y){const b=R8(g.getStyle(),d,h);g.setStyle(b);const v=s.getElementByKey(g.getKey());v&&v.style.setProperty(d,h)}})},[s]);return G.jsxs("div",{className:"relative",ref:o,children:[G.jsx("button",{ref:c,type:"button",onClick:()=>t(d=>!d),title:"Paragraph Spacing",className:`flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-semibold transition-colors ${e?"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4.5h18M3 19.5h18M12 7.5v9m0-9l-2.5 2m2.5-2l2.5 2m-2.5 7l-2.5-2m2.5 2l2.5-2"})})}),e&&G.jsxs("div",{className:`absolute top-full z-50 mt-1 w-44 rounded-lg border border-gray-200 bg-white p-3 shadow-lg dark:border-gray-700 dark:bg-gray-800 ${l==="right"?"right-0":"left-0"}`,children:[G.jsx("p",{className:"mb-2 text-[10px] font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400",children:"Paragraph Spacing"}),G.jsxs("label",{className:"mb-2 flex items-center justify-between gap-2",children:[G.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-300",children:"Before"}),G.jsx("select",{value:n,onChange:d=>{r(d.target.value),u("margin-top",d.target.value)},className:"h-6 w-20 rounded border border-gray-200 bg-white px-1 text-xs text-gray-700 outline-none hover:border-gray-300 focus:border-yellow-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:border-gray-500 dark:focus:border-yellow-500",children:nk.map(d=>G.jsx("option",{value:d.value,children:d.label},d.value))})]}),G.jsxs("label",{className:"flex items-center justify-between gap-2",children:[G.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-300",children:"After"}),G.jsx("select",{value:i,onChange:d=>{a(d.target.value),u("margin-bottom",d.target.value)},className:"h-6 w-20 rounded border border-gray-200 bg-white px-1 text-xs text-gray-700 outline-none hover:border-gray-300 focus:border-yellow-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:border-gray-500 dark:focus:border-yellow-500",children:nk.map(d=>G.jsx("option",{value:d.value,children:d.label},d.value))})]})]})]})}const Y7=[{id:"decimal-cascade",label:"1, a, i",style:"",preview:[{indent:0,marker:"1."},{indent:1,marker:"a."},{indent:1,marker:"b."},{indent:2,marker:"i."},{indent:0,marker:"2."}]},{id:"decimal-paren",label:"1), a), i)",style:"--lt-paren: 1; list-style-type: none",preview:[{indent:0,marker:"1)"},{indent:1,marker:"a)"},{indent:1,marker:"b)"},{indent:2,marker:"i)"},{indent:0,marker:"2)"}]},{id:"multi-level",label:"1, 1.1, 1.1.1",style:"--lt-multi-level: 1; list-style-type: none",preview:[{indent:0,marker:"1."},{indent:1,marker:"1.1."},{indent:1,marker:"1.2."},{indent:2,marker:"1.2.1."},{indent:0,marker:"2."}]},{id:"upper-alpha",label:"A, a, i",style:"--lt-level-1: upper-alpha",preview:[{indent:0,marker:"A."},{indent:1,marker:"a."},{indent:1,marker:"b."},{indent:2,marker:"i."},{indent:0,marker:"B."}]},{id:"upper-roman",label:"I, A, 1",style:"--lt-level-1: upper-roman; --lt-level-2: upper-alpha; --lt-level-3: decimal",preview:[{indent:0,marker:"I."},{indent:1,marker:"A."},{indent:1,marker:"B."},{indent:2,marker:"1."},{indent:0,marker:"II."}]},{id:"leading-zero",label:"01, a, i",style:"--lt-level-1: decimal-leading-zero",preview:[{indent:0,marker:"01."},{indent:1,marker:"a."},{indent:1,marker:"b."},{indent:2,marker:"i."},{indent:0,marker:"02."}]}],Z7=360;function J7({active:s}){const[e]=Kt(),[t,n]=Ee.useState(!1),r=Ee.useRef(null),i=Ee.useRef(null),a=oo(t,i,Z7,"left");Ee.useEffect(()=>{if(!t)return;const l=u=>{r.current&&!r.current.contains(u.target)&&n(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[t]);const o=l=>{e.dispatchCommand(g6,void 0),e.update(()=>{const u=Oe();if(!Ie(u))return;let d=u.anchor.getNode(),h=null;for(;d;)at(d)&&d.getTag()==="ol"&&(h=d),d=d.getParent();if(!h)return;h.setStyle(l.style);const f=e.getElementByKey(h.getKey());f instanceof HTMLElement&&(f.style.cssText=l.style)}
288),n(!1)},c=()=>{e.dispatchCommand(DD,void 0),n(!1)};return G.jsxs("div",{className:"relative",ref:r,children:[G.jsxs("button",{ref:i,type:"button",onClick:()=>n(l=>!l),title:"Numbered List",className:`flex h-7 min-w-7 items-center justify-center gap-0.5 rounded px-1.5 text-xs font-semibold transition-colors ${s||t?"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:[G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.242 5.992h12m-12 6.003h12m-12 5.999h12M4.117 7.495v-3.75H2.99m1.125 3.75H2.99m1.125 0H5.24m-1.92 2.577a1.125 1.125 0 111.591 1.59l-1.83 1.83h2.16M2.99 15.745h1.125a1.125 1.125 0 010 2.25H3.74m0-.002h.375a1.125 1.125 0 010 2.25H2.99"})}),G.jsx("span",{className:"text-[8px] leading-none","aria-hidden":"true",children:"â¾"})]}),t&&G.jsxs("div",{className:`absolute top-full z-50 mt-1 w-90 rounded-lg border border-gray-200 bg-white p-2 shadow-lg dark:border-gray-700 dark:bg-gray-800 ${a==="right"?"right-0":"left-0"}`,children:[s&&G.jsx("button",{type:"button",onClick:c,className:"mb-2 w-full rounded px-2 py-1.5 text-left text-xs font-medium text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700",children:"Remove list"}),G.jsx("div",{className:"grid grid-cols-3 gap-2",children:Y7.map(l=>G.jsx("button",{type:"button",onClick:()=>o(l),title:l.label,className:"flex flex-col gap-0.5 rounded border border-gray-200 bg-white p-2 text-left transition-colors hover:border-blue-400 hover:bg-blue-50 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-500 dark:hover:bg-blue-900/20",children:l.preview.map((u,d)=>G.jsx(Q7,{line:u},d))},l.id))})]})]})}function Q7({line:s}){const e=s.indent*12;return G.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] leading-tight text-gray-700 dark:text-gray-300",style:{paddingLeft:e},children:[G.jsx("span",{className:"min-w-7 font-medium",children:s.marker}),G.jsx("span",{className:"inline-block h-0.75 w-12 rounded-sm bg-gray-300 dark:bg-gray-600"})]})}const rk=304;function e9(){const[s]=Kt(),[e,t]=Ee.useState(!1),[n,r]=Ee.useState(""),[i,a]=Ee.useState(""),[o,c]=Ee.useState(!1),[l,u]=Ee.useState([]),[d,h]=Ee.useState(0),f=Ee.useRef(null),p=Ee.useRef(null),y=Ee.useRef(null),g=oo(e,p,rk,"right"),b=Ee.useCallback(()=>{if(!n)return[];const D=[],N=o?n:n.toLowerCase();return s.getEditorState().read(()=>{const M=[$t()];for(;M.length;){const F=M.pop();if(We(F)){const L=F.getTextContent(),A=o?L:L.toLowerCase();let X=0;for(;X<=A.length-N.length;){const he=A.indexOf(N,X);if(he===-1)break;D.push({nodeKey:F.getKey(),start:he,end:he+N.length}),X=he+Math.max(N.length,1)}}else if(Fe(F)){const L=F.getChildren();for(let A=L.length-1;A>=0;A--)M.push(L[A])}}}),D},[s,n,o]);Ee.useEffect(()=>{if(!e)return;const D=b();u(D),h(0)},[e,b]),Ee.useEffect(()=>{if(!(!e||!n))return s.registerUpdateListener(()=>{u(b())})},[s,e,n,b]),Ee.useEffect(()=>{e&&requestAnimationFrame(()=>{var D;return(D=y.current)==null?void 0:D.focus()})},[e]),Ee.useEffect(()=>{if(!e)return;const D=N=>{f.current&&!f.current.contains(N.target)&&t(!1)};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[e]),Ee.useEffect(()=>{const D=N=>{if((N.ctrlKey||N.metaKey)&&N.key.toLowerCase()==="f"){const M=s.getRootElement(),F=document.activeElement,L=M&&(M===F||M.contains(F)),A=f.current&&f.current.contains(F);(L||A)&&(N.preventDefault(),t(!0),requestAnimationFrame(()=>{var X;return(X=y.current)==null?void 0:X.select()}
288))}else N.key==="Escape"&&e&&t(!1)};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[s,e]);const v=Ee.useCallback(D=>{s.update(()=>{const N=ft(D.nodeKey);!N||!We(N)||N.select(D.start,D.end)}),requestAnimationFrame(()=>{const N=window.getSelection();if(N&&N.rangeCount>0){const M=N.getRangeAt(0);if(M.getBoundingClientRect().height>0){const L=M.startContainer.parentElement;L==null||L.scrollIntoView({block:"center",behavior:"smooth"})}}})},[s]),x=Ee.useCallback(D=>{if(!l.length)return;const N=(D%l.length+l.length)%l.length;h(N);const M=l[N];M&&v(M)},[l,v]),w=Ee.useCallback(()=>{l.length&&x(d+1)},[d,l.length,x]),_=Ee.useCallback(()=>{l.length&&x(d-1)},[d,l.length,x]),T=Ee.useCallback(()=>{if(!l.length)return;const D=l[d];D&&(s.update(()=>{const N=ft(D.nodeKey);if(!N||!We(N))return;const M=N.getTextContent(),F=M.slice(0,D.start)+i+M.slice(D.end);N.setTextContent(F);const L=D.start+i.length;N.select(L,L)}),requestAnimationFrame(()=>{const N=b();if(u(N),N.length){const M=Math.min(d,N.length-1);h(M);const F=N[M];F&&v(F)}else h(0)}))},[s,l,d,i,b,v]),S=Ee.useCallback(()=>{if(!n)return;const D=new Map;for(const N of l){const M=D.get(N.nodeKey)??[];M.push(N),D.set(N.nodeKey,M)}D.size!==0&&(s.update(()=>{for(const[N,M]of D){const F=ft(N);if(!F||!We(F))continue;const L=F.getTextContent();let A="",X=0;for(const he of M)A+=L.slice(X,he.start)+i,X=he.end;A+=L.slice(X),F.setTextContent(A)}}),requestAnimationFrame(()=>{u(b()),h(0)}))},[s,n,l,i,b]),C=Ee.useMemo(()=>n?l.length?`${d+1}
288 of ${l.length}`:"0 results":"",[n,l.length,d]);return G.jsxs("div",{className:"relative",ref:f,children:[G.jsx("button",{ref:p,type:"button",onClick:()=>t(D=>!D),title:"Find and Replace (Ctrl+F)",className:`flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-semibold transition-colors ${e?"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})})}),e&&G.jsxs("div",{className:`absolute top-full z-50 mt-1 rounded-lg border border-gray-200 bg-white p-3 shadow-lg dark:border-gray-700 dark:bg-gray-800 ${g==="right"?"right-0":"left-0"}`,style:{width:rk},children:[G.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[G.jsx("span",{className:"text-xs font-semibold text-gray-700 dark:text-gray-300",children:"Find and replace"}),G.jsx("button",{type:"button",onClick:()=>t(!1),title:"Close",className:"flex h-5 w-5 items-center justify-center rounded text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-100",children:G.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),G.jsxs("div",{className:"mb-2 flex items-center gap-1",children:[G.jsxs("div",{className:"relative flex-1",children:[G.jsx("input",{ref:y,type:"text",placeholder:"Find",value:n,onChange:D=>r(D.target.value),onKeyDown:D=>{D.key==="Enter"&&(D.preventDefault(),D.shiftKey?_():w())},className:"h-7 w-full rounded border border-gray-200 bg-white pl-2 pr-14 text-xs text-gray-700 outline-none focus:border-yellow-500 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 dark:focus:border-yellow-500"}),n&&G.jsx("span",{className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-[10px] text-gray-500 dark:text-gray-400",children:C})]}),G.jsx("button",{type:"button",onClick:_,disabled:!l.length,title:"Previous (Shift+Enter)",className:"flex h-7 w-7 items-center justify-center rounded text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-100",children:G.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})}),G.jsx("button",{type:"button",onClick:w,disabled:!l.length,title:"Next (Enter)",className:"flex h-7 w-7 items-center justify-center rounded text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-100",children:G.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})})]}),G.jsx("div",{className:"mb-2",children:G.jsx("input",{type:"text",placeholder:"Replace with",value:i,onChange:D=>a(D.target.value),onKeyDown:D=>{D.key==="Enter"&&(D.preventDefault(),T())},className:"h-7 w-full rounded border border-gray-200 bg-white px-2 text-xs text-gray-700 outline-none focus:border-yellow-500 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 dark:focus:border-yellow-500"})}),G.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2 text-xs text-gray-600 dark:text-gray-400",children:[G.jsx("input",{type:"checkbox",checked:o,onChange:D=>c(D.target.checked),className:"h-3.5 w-3.5 rounded border-gray-300 accent-yellow-500"}),"Match case"]}),G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("button",{type:"button",onClick:T,disabled:!l.length,className:"h-7 flex-1 rounded border border-gray-200 bg-white px-2 text-xs font-medium text-gray-700 transition-colors hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-40 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600",children:"Replace"}),G.jsx("button",{type:"button",onClick:S,disabled:!l.length,className:"h-7 flex-1 rounded bg-yellow-500 px-2 text-xs font-medium text-white transition-colors hover:bg-yellow-600 disabled:cursor-not-allowed disabled:opacity-40",children:"Replace all"})]})]})]})}const t9=`/* Styles for the document content rendered by the Lexical editor: base 289 typography, paragraphs, headings, lists and their marker presets, 290 blockquotes, inline formats and tables. 291 292 SHARED WITH PRINT. index.css imports this file for the app, and 293 modules/editor/utils/print-document.ts inlines it (as a raw string) into 294 the print / Save-as-PDF document, so a page printed from the editor wraps 295 and breaks exactly where the editor's page does. Any rule that changes 296 how content is sized or spaced belongs here, not in index.css or in the 297 print stylesheet. */ 298 299 300.lexical-editor { 301 outline: none; 302 font-family: 'Times New Roman', Times, serif; 303 font-size: 14px; 304 line-height: 1.6; 305 color: #1f2937; 306} 307 308.dark .lexical-editor { 309 color: #e5e7eb; 310} 311 312.lexical-editor p { 313 margin: 0 0 0.5em; 314 line-height: 1.6; 315} 316 317.lexical-editor h1 { 318 font-size: 28px; 319 font-weight: 700; 320 line-height: 1.3; 321 margin: 1em 0 0.4em; 322 color: #111827; 323} 324 325.dark .lexical-editor h1 { 326 color: #f9fafb; 327} 328 329.lexical-editor h2 { 330 font-size: 20px; 331 font-weight: 700; 332 line-height: 1.35; 333 margin: 0.85em 0 0.35em; 334 color: #1f2937; 335} 336 337.dark .lexical-editor h2 { 338 color: #f3f4f6; 339} 340 341.lexical-editor h3 { 342 font-size: 18px; 343 font-weight: 600; 344 line-height: 1.4; 345 margin: 0.75em 0 0.3em; 346 color: #374151; 347} 348 349.dark .lexical-editor h3 { 350 color: #e5e7eb; 351} 352 353/* Lists */ 354.lexical-list-ul, 355.lexical-list-ol { 356 padding-left: 1.75em; 357 margin: 0.4em 0; 358} 359 360.lexical-list-ul { 361 list-style: disc; 362} 363 364.lexical-list-ol { 365 /* \`--lt-level-1\` cascades down via inline style on the outermost OL so a 366 numbered-list preset can change the marker style for every nested level 367 from one place. The \`decimal\` fallback preserves the default look. */ 368 list-style: var(--lt-level-1, decimal); 369} 370 371.lexical-list-ul li::marker, 372.lexical-list-ol li::marker { 373 font-size: var(--marker-size, 1em); 374 color: var(--marker-color, currentColor); 375 font-weight: var(--marker-weight, inherit); 376 font-style: var(--marker-style, inherit); 377} 378 379.lexical-listitem { 380 margin: 0.15em 0; 381 line-height: 1.6; 382} 383 384.lexical-nested-listitem { 385 list-style: none; 386} 387 388.lexical-list-ul .lexical-list-ul { 389 list-style: circle; 390 margin: 0.15em 0; 391} 392 393.lexical-list-ul .lexical-list-ul .lexical-list-ul { 394 list-style: square; 395} 396 397.lexical-list-ol .lexical-list-ol { 398 list-style: var(--lt-level-2, lower-alpha); 399 margin: 0.15em 0; 400} 401 402.lexical-list-ol .lexical-list-ol .lexical-list-ol { 403 list-style: var(--lt-level-3, lower-roman); 404} 405 406/* Multi-level decimal numbering (1, 1.1, 1.1.1, â¦) â applied when the 407 user picks the "1.1" style on an ordered list. The \`--lt-multi-level\` 408 custom property is set as inline style on the ol node. CSS counters 409 produce the cumulative numbering across nested ol descendants. 410 411 The chained class selectors are needed for specificity: the default 412 cascade (\`.lexical-list-ol .lexical-list-ol .lexical-list-ol\`) is 0,3,0, 413 so a single \`[style*=...] ol\` (0,2,1) loses to it at depth 3, leaving 414 the native marker (e.g. \`i\`, \`ii\`) rendering alongside our cumulative 415 \`::before\`. Listing each depth with descendant \`.lexical-list-ol\`
416 classes keeps specificity ⥠0,3,0 down to four levels. */ 417.lexical-list-ol[style*="--lt-multi-level"], 418.lexical-list-ol[style*="--lt-multi-level"] .lexical-list-ol, 419.lexical-list-ol[style*="--lt-multi-level"] .lexical-list-ol .lexical-list-ol, 420.lexical-list-ol[style*="--lt-multi-level"] 421 .lexical-list-ol 422 .lexical-list-ol 423 .lexical-list-ol { 424 list-style: none; 425 counter-reset: lt-counter; 426 padding-left: 2.5em; 427} 428 429/* \`counter-increment: lt-counter, list-item 0\` â increments our cumulative 430 counter AND zeroes the implicit \`list-item\` counter. Some browsers expose 431 that implicit counter via \`::marker\`, which can cause faint native markers 432 to show alongside our \`::before\` content at deeper nesting levels. 433 Pairing this with the \`::marker { content: '' }\` rule below ensures no 434 other glyph can render. */ 435.lexical-list-ol[style*="--lt-multi-level"] li { 436 counter-increment: lt-counter list-item 0; 437 position: relative; 438} 439 440.lexical-list-ol[style*="--lt-multi-level"] li::marker { 441 content: ''; 442} 443 444/* When the user presses Enter and then Tab to nest a new item, Lexical wraps 445 it in a "wrapper" LI (with class \`lexical-nested-listitem\`) that sits in the 446 outer OL and contains the nested OL. Without this override the wrapper 447 advances \`lt-counter\`, so a nested item created under "2." renders as 448 "3.1" and the items after it shift up by one. Skipping increment on the 449 wrapper keeps the outer counter at the previous text-bearing item, giving 450 "2.1" and leaving the surrounding numbers intact. */ 451.lexical-list-ol[style*="--lt-multi-level"] .lexical-nested-listitem { 452 counter-increment: none; 453} 454 455/* The marker box is right-anchored and sized to its content: a fixed width 456 (2.2em) is too narrow for deep addresses ("3.2.2.1."), and the editor's 457 word wrapping then breaks them mid-number â the item shows "3.2.2" with a 458 stray ".1." on the line below. max-content + nowrap lets long markers grow 459 leftward into the list padding instead, matching Word. */ 460.lexical-list-ol[style*="--lt-multi-level"] li::before { 461 content: counters(lt-counter, ".") ". "; 462 position: absolute; 463 right: calc(100% + 0.2em); 464 width: max-content; 465 white-space: nowrap; 466 font-size: var(--marker-size, 1em); 467 color: var(--marker-color, currentColor); 468 font-weight: var(--marker-weight, inherit); 469 font-style: var(--marker-style, inherit); 470} 471 472.lexical-list-ol[style*="--lt-multi-level"] .lexical-nested-listitem::before { 473 content: none; 474} 475 476/* If a nested ordered list inside a multi-level ancestor has its own 477 list-style-type set inline (i.e., the user picked a non-multi-level style 478 like decimal/Roman/alpha for that nested list), suppress the inherited 479 multi-level rendering so the nested list's own marker isn't doubled with 480 the cumulative counter \`::before\` from the ancestor. The 481 \`:not([style*="--lt-multi-level"])\` exclusion keeps inner lists that the 482 user has *also* opted into multi-level untouched. */ 483.lexical-list-ol[style*="--lt-multi-level"] 484 ol[style*="list-style-type"]:not([style*="--lt-multi-level"]) { 485 list-style: revert; 486 counter-reset: none; 487 padding-left: 1.75em; 488} 489 490.lexical-list-ol[style*="--lt-multi-level"] 491 ol[style*="list-style-type"]:not([style*="--lt-multi-level"]) 492 > li { 493 counter-increment: none; 494} 495 496.lexical-list-ol[style*="--lt-multi-level"] 497 ol[style*="list-style-type"]:not([style*="--lt-multi-level"]) 498 > li::before { 499 content: none; 500} 501 502/* Paren-style markers (1), a), i)) â applied via the \`--lt-paren\` custom 503 property on the outermost OL. We hide the native marker and render the 504 counter ourselves so we can append a \`)\` suffix, which native 505 list-style-type can't do. */ 506.lexical-list-ol[style*="--lt-paren"], 507.lexical-list-ol[style*="--lt-paren"] .lexical-list-ol, 508.lexical-list-ol[style*="--lt-paren"] .lexical-list-ol .lexical-list-ol, 509.lexical-list-ol[style*="--lt-paren"] 510 .lexical-list-ol 511 .lexical-list-ol 512 .lexical-list-ol { 513 list-style: none; 514 padding-left: 2.5em; 515} 516 517.lexical-list-ol[style*="--lt-paren"] { 518 counter-reset: lt-paren-1; 519} 520 521.lexical-list-ol[style*="--lt-paren"] .lexical-list-ol { 522 counter-reset: lt-paren-2; 523} 524 525.lexical-list-ol[style*="--lt-paren"] .lexical-list-ol .lexical-list-ol { 526 counter-reset: lt-paren-3; 527} 528 529.lexical-list-ol[style*="--lt-paren"] > li { 530 counter-increment: lt-paren-1; 531 position: relative; 532} 533 534.lexical-list-ol[style*="--lt-paren"] .lexical-list-ol > li { 535 counter-increment: lt-paren-2; 536} 537 538.lexical-list-ol[style*="--lt-paren"] .lexical-list-ol .lexical-list-ol > li { 539 counter-increment: lt-paren-3; 540} 541 542/* Right-anchored, content-sized for the same reason as the multi-level 543 marker above: wide markers ("xviii)") must not wrap inside a fixed box. */ 544.lexical-list-ol[style*="--lt-paren"] > li::before { 545 content: counter(lt-paren-1, decimal) ') '; 546 position: absolute; 547 right: calc(100% + 0.2em); 548 width: max-content; 549 white-space: nowrap; 550 font-size: var(--marker-size, 1em); 551 color: var(--marker-color, currentColor); 552 font-weight: var(--marker-weight, inherit); 553 font-style: var(--marker-style, inherit); 554} 555 556.lexical-list-ol[style*="--lt-paren"] .lexical-list-ol > li::before { 557 content: counter(lt-paren-2, lower-alpha) ') '; 558} 559 560.lexical-list-ol[style*="--lt-paren"] 561 .lexical-list-ol 562 .lexical-list-ol 563 > li::before { 564 content: counter(lt-paren-3, lower-roman) ') '; 565} 566 567/* Hide the wrapper LI's marker AND skip its counter-increment at every 568 nesting depth. The per-depth marker rules above (\`> li::before\` chained 569 with extra \`.lexical-list-ol\`) climb to specificity 0,4,2 at depth 3, so 570 the unchained 0,3,1 rule wouldn't override them. Mirror the depth chain 571 here so each wrapper rule has higher specificity than its corresponding 572 marker rule, otherwise empty wrappers (created by Enter+Tab) render a 573 stray "d)" / etc. and shift the surrounding numbering. */ 574.lexical-list-ol[style*="--lt-paren"] .lexical-nested-listitem::before, 575.lexical-list-ol[style*="--lt-paren"] 576 .lexical-list-ol 577 .lexical-nested-listitem::before, 578.lexical-list-ol[style*="--lt-paren"] 579 .lexical-list-ol 580 .lexical-list-ol 581 .lexical-nested-listitem::before { 582 content: none; 583} 584 585.lexical-list-ol[style*="--lt-paren"] .lexical-nested-listitem, 586.lexical-list-ol[style*="--lt-paren"] 587 .lexical-list-ol 588 .lexical-nested-listitem, 589.lexical-list-ol[style*="--lt-paren"] 590 .lexical-list-ol 591 .lexical-list-ol 592 .lexical-nested-listitem { 593 counter-increment: none; 594} 595 596/* A list split by "Remove number from this line" continues its numbering: 597 the native marker reads the \`start\` attribute, but CSS counters can't, so 598 the continuation list also carries \`--lt-counter-start\` (start - 1) in
599 its inline style and the presets reset their counter to it. Chained per 600 depth like the reset rules above so each depth outranks its default. */ 601.lexical-list-ol[style*="--lt-multi-level"][style*="--lt-counter-start"], 602.lexical-list-ol[style*="--lt-multi-level"] 603 .lexical-list-ol[style*="--lt-counter-start"], 604.lexical-list-ol[style*="--lt-multi-level"] 605 .lexical-list-ol 606 .lexical-list-ol[style*="--lt-counter-start"], 607.lexical-list-ol[style*="--lt-multi-level"] 608 .lexical-list-ol 609 .lexical-list-ol 610 .lexical-list-ol[style*="--lt-counter-start"] { 611 counter-reset: lt-counter var(--lt-counter-start); 612} 613 614.lexical-list-ol[style*="--lt-paren"][style*="--lt-counter-start"] { 615 counter-reset: lt-paren-1 var(--lt-counter-start); 616} 617 618.lexical-list-ol[style*="--lt-paren"] 619 .lexical-list-ol[style*="--lt-counter-start"] { 620 counter-reset: lt-paren-2 var(--lt-counter-start); 621} 622 623.lexical-list-ol[style*="--lt-paren"] 624 .lexical-list-ol 625 .lexical-list-ol[style*="--lt-counter-start"] { 626 counter-reset: lt-paren-3 var(--lt-counter-start); 627} 628 629/* Blockquote */ 630.lexical-editor blockquote { 631 border-left: 3px solid #d1d5db; 632 padding-left: 1em; 633 margin: 0.6em 0; 634 color: #6b7280; 635 font-style: italic; 636 line-height: 1.6; 637} 638 639.dark .lexical-editor blockquote { 640 border-left-color: #4b5563; 641 color: #9ca3af; 642} 643 644/* Inline text formats */ 645.lexical-editor strong { 646 font-weight: 700; 647} 648 649.lexical-editor em { 650 font-style: italic; 651} 652 653.lexical-editor s { 654 text-decoration: line-through; 655} 656 657/* Table styles */ 658.lexical-table { 659 border-collapse: collapse; 660 width: 100%; 661 margin: 0.75em 0; 662 table-layout: fixed; 663} 664 665.lexical-table-cell, 666.lexical-table-cell-header { 667 border: 1px solid #d1d5db; 668 padding: 0.5em 0.75em; 669 text-align: left; 670 vertical-align: top; 671 min-width: 60px; 672} 673 674.lexical-table-cell-header { 675 background-color: #f3f4f6; 676 font-weight: 600; 677} 678 679.lexical-table-cell-selected { 680 background-color: #dbeafe; 681 outline: 2px solid #3b82f6; 682 outline-offset: -2px; 683} 684 685.lexical-table-scroll-wrapper { 686 overflow-x: auto; 687} 688 689.dark .lexical-table-cell, 690.dark .lexical-table-cell-header { 691 border-color: #4b5563; 692} 693 694.dark .lexical-table-cell-header { 695 background-color: #1f2937; 696} 697 698.dark .lexical-table-cell-selected { 699 background-color: rgba(59, 130, 246, 0.2); 700 outline-color: #60a5fa; 701} 702`,ik=96,n9=10,yE=12,sk=29,C6=16,r9=yE+C6,i9=1.3,s9=10,o9=` 703* { 704 box-sizing: border-box; 705 /* Force the browser to render text colors, backgrounds, and any other 706 explicitly-declared colors when printing / saving as PDF instead of 707 stripping them as decorative. */ 708 -webkit-print-color-adjust: exact; 709 print-color-adjust: exact; 710 color-adjust: exact; 711} 712@media print { 713 html, body { 714 -webkit-print-color-adjust: exact; 715 print-color-adjust: exact; 716 color-adjust: exact; 717 } 718} 719body { 720 margin: 0; 721 padding: 0; 722 font-family: 'Times New Roman', Times, serif; 723 font-size: 14px; 724 line-height: 1.6; 725 color: #1f2937; 726 /* The editor's pagination splits a paragraph or list item at any line, 727 so a single line may end or start a page. Chrome's defaults (orphans 728 and widows of 2) would instead carry that line over to the next page 729 and the two would disagree about where page 1 ends. */ 730 orphans: 1; 731 widows: 1; 732} 733/* Table used only for spacers â thead/tfoot repeat on every page to reserve 734 space. Child combinators keep these rules off the document's own tables 735 nested inside: a bare ".print-table td" would outrank ".lexical-table-cell" 736 and strip every content cell's padding. */ 737.print-table { width: 100%; border-collapse: collapse; } 738.print-table > thead > tr > td, .print-table > tbody > tr > td, .print-table > tfoot > tr > td { padding: 0; vertical-align: top; } 739.print-table > thead { display: table-header-group; } 740.print-table > tfoot { display: table-footer-group; } 741/* Actual header/footer rendered via position:fixed so they pin to page edges 742 (the footer's bottom offset is set per document, see buildZoneCss). */ 743.header-zone { 744 position: fixed; 745 top: 0; 746 left: 0; 747 right: 0; 748 padding-bottom: 4px; 749 font-size: 0.75rem; 750 color: #6b7280; 751} 752.header-zone p { margin: 0; } 753.footer-zone { 754 position: fixed; 755 left: 0; 756 right: 0; 757 padding-top: 4px; 758 font-size: 0.75rem; 759 color: #6b7280; 760} 761.footer-zone p { margin: 0; } 762/* The editor's own page breaks (see sanitize-export-html.ts, keepPageBreaks): 763 every block the editor started a page with starts a printed page too. */ 764[data-print-page-start] { break-before: page; } 765/* Lexical sets white-space: pre-wrap and word-break: break-word as INLINE 766 styles on the live contenteditable root (LexicalEditor.setRootElement). 767 The print document is built from that root's innerHTML, which never 768 carries the root's own styles, so without restating them here every
769 run of spaces, leading indent and tab character collapses to a single 770 space in the preview / PDF. Header and footer zones are Lexical roots too. */ 771.print-content, .header-zone, .footer-zone { 772 white-space: pre-wrap; 773 word-break: break-word; 774} 775.print-content { padding: 0 ${n9}px; } 776${t9} 777.font-bold { font-weight: 700; } 778.italic { font-style: italic; } 779.underline { text-decoration: underline; } 780.line-through { text-decoration: line-through; } 781`;function a9(s){const{margins:e,headerHtml:t,footerHtml:n,showPageNumbers:r,pageNumberFontSize:i}=s,a=e.top*ik,o=e.bottom*ik,c=t?sk:0,l=n?sk:0,u=Math.max(0,a-c),d=Math.max(0,o-l),h=r?i9*(parseFloat(i)||s9):0,f=Math.min(d,Math.max(0,d-C6,r?(d+h)/2:0)),p=a+yE-u,y=Math.max(0,o+yE-r9-f);return{pageTopPx:u,pageBottomPx:f,headSpacerPx:p,footSpacerPx:y,frameTopPx:a-u,frameBottomPx:o-f,footerZoneBottomPx:d-f,pageNumberPadPx:d-f}}const Tl=s=>`${Number(s.toFixed(2))}px`;function c9(s,e){const{pageSize:t,orientation:n,margins:r,showPageNumbers:i,pageNumberAlign:a,pageNumberFontFamily:o,pageNumberFontSize:c}=s,{width:l,height:u}=wv(t,n),d=`size: ${l}in ${u}in; 782 margin: ${Tl(e.pageTopPx)} ${r.right}in ${Tl(e.pageBottomPx)} ${r.left}in;`;if(i){const f={left:"@bottom-left",center:"@bottom-center",right:"@bottom-right"}[a];return`@page { 783 ${d} 784 ${f} { content: counter(page); font-size: ${c||"10px"}; color: #9ca3af; font-family: ${o||"'Times New Roman', Times, serif"}; padding-bottom: ${Tl(e.pageNumberPadPx)}; } 785}`}return`@page { 786 ${d} 787}`}function l9(s){return`.footer-zone { bottom: ${Tl(s.footerZoneBottomPx)}; }`}function u9(s,e){return s.top||s.right||s.bottom||s.left?`.page-border-frame { 788 position: fixed; 789 top: ${Tl(e.frameTopPx)}; 790 bottom: ${Tl(e.frameBottomPx)}; 791 left: 0; 792 right: 0; 793 border-top: ${s.top?"1px solid #1a1a1a":"none"}; 794 border-right: ${s.right?"1px solid #1a1a1a":"none"}; 795 border-bottom: ${s.bottom?"1px solid #1a1a1a":"none"}; 796 border-left: ${s.left?"1px solid #1a1a1a":"none"}; 797 pointer-events: none; 798}`:""}function h9(s){const{contentHtml:e,headerHtml:t,footerHtml:n,pageBorder:r}=s,i=a9(s),a=c9(s,i),o=l9(i),c=u9(r,i),l=r.top||r.right||r.bottom||r.left,u=t?`<div class="header-zone">${t}</div>`:"",d=n?`<div class="footer-zone">${n}</div>`:"",h=l?'<div class="page-border-frame"></div>':"",f=`<thead><tr><td><div style="height:${Tl(i.headSpacerPx)}"></div></td></tr></thead>`,p=`<tfoot><tr><td><div style="height:${Tl(i.footSpacerPx)}"></div></td></tr></tfoot>`;return`<!DOCTYPE html> 799<html> 800<head> 801<title>Print Document</title> 802<style>${a} 803${o9} 804${o} 805${c}</style> 806</head> 807<body> 808${u} 809${d} 810${h} 811<table class="print-table"> 812${f} 813${p} 814<tbody><tr><td><div class="print-content lexical-editor">${e}</div></td></tr></tbody> 815</table> 816</body> 817</html>`}function d9(s){const e=window.open("","_blank","width=800,height=600");return e?(e.document.write(s),e.document.close(),e.document.fonts.ready.then(()=>{e.focus(),e.print(),e.close()}),!0):!1}function f9(s){var n;const e=document.createElement("iframe");e.style.position="fixed",e.style.top="-10000px",e.style.left="-10000px",e.style.width="0",e.style.height="0",document.body.appendChild(e);const t=e.contentDocument||((n=e.contentWindow)==null?void 0:n.document);if(!t){document.body.removeChild(e);return}t.open(),t.write(s),t.close(),t.fonts.ready.then(()=>{var r,i;(r=e.contentWindow)==null||r.focus(),(i=e.contentWindow)==null||i.print(),setTimeout(()=>document.body.removeChild(e),1e3)})}function A6(s){const e=h9(s);d9(e)||f9(e)}var p9=Object.defineProperty,g9=Object.defineProperties,m9=Object.getOwnPropertyDescriptors,ok=Object.getOwnPropertySymbols,y9=Object.prototype.hasOwnProperty,b9=Object.prototype.propertyIsEnumerable,bE=(s,e,t)=>e in s?p9(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Et=(s,e)=>{for(var t in e||(e={}))y9.call(e,t)&&bE(s,t,e[t]);if(ok)for(var t of ok(e))b9.call(e,t)&&bE(s,t,e[t]);return s},to=(s,e)=>g9(s,m9(e)),Be=(s,e,t)=>bE(s,typeof e!="symbol"?e+"":e,t),v9=(s,e,t)=>new Promise((n,r)=>{var i=c=>{try{o(t.next(c))}catch(l){r(l)}},a=c=>{try{o(t.throw(c))}catch(l){r(l)}},o=c=>c.done?n(c.value):Promise.resolve(c.value).then(i,a);o((t=t.apply(s,e)).next())});
817class K1{constructor(e){Be(this,"rootKey"),this.rootKey=e}}const w9=Object.seal({});class $e extends K1{constructor(e){super(e),Be(this,"root"),this.root=new Array}prepForXml(e){var t;e.stack.push(this);const n=this.root.map(r=>r instanceof K1?r.prepForXml(e):r).filter(r=>r!==void 0);return e.stack.pop(),{[this.rootKey]:n.length?n.length===1&&((t=n[0])!=null&&t._attr)?n[0]:n:w9}}addChildElement(e){return this.root.push(e),this}}class Wl extends $e{constructor(e,t){super(e),Be(this,"includeIfEmpty"),this.includeIfEmpty=t}prepForXml(e){const t=super.prepForXml(e);if(this.includeIfEmpty||t&&(typeof t[this.rootKey]!="object"||Object.keys(t[this.rootKey]).length))return t}}class Nt extends K1{constructor(e){super("_attr"),Be(this,"xmlKeys"),this.root=e}prepForXml(e){const t={};return Object.entries(this.root).forEach(([n,r])=>{if(r!==void 0){const i=this.xmlKeys&&this.xmlKeys[n]||n;t[i]=r}}),{_attr:t}}}class x9 extends K1{constructor(e){super("_attr"),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:n})=>n!==void 0).reduce((n,{key:r,value:i})=>to(Et({},n),{[r]:i}),{})}}}class $r extends Nt{constructor(){super(...arguments),Be(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 _s=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function k6(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var ex={},Jb={exports:{}},ak;function FD(){if(ak)return Jb.exports;ak=1;var s=typeof Reflect=="object"?Reflect:null,e=s&&typeof s.apply=="function"?s.apply:function(_,T,S){return Function.prototype.apply.call(_,T,S)},t;s&&typeof s.ownKeys=="function"?t=s.ownKeys:Object.getOwnPropertySymbols?t=function(_){return Object.getOwnPropertyNames(_).concat(Object.getOwnPropertySymbols(_))}:t=function(_){return Object.getOwnPropertyNames(_)};function n(w){console&&console.warn&&console.warn(w)}var r=Number.isNaN||function(_){return _!==_};function i(){i.init.call(this)}Jb.exports=i,Jb.exports.once=b,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(w){if(typeof w!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof w)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
vendor: 9,926 bytes, line 817
817,set:function(w){if(typeof w!="number"||w<0||r(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");a=w}}),i.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},i.prototype.setMaxListeners=function(_){if(typeof _!="number"||_<0||r(_))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+_+".");return this._maxListeners=_,this};function c(w){return w._maxListeners===void 0?i.defaultMaxListeners:w._maxListeners}i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(_){for(var T=[],S=1;S<arguments.length;S++)T.push(arguments[S]);var C=_==="error",D=this._events;if(D!==void 0)C=C&&D.error===void 0;else if(!C)return!1;if(C){var N;if(T.length>0&&(N=T[0]),N instanceof Error)throw N;var M=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw M.context=N,M}var F=D[_];if(F===void 0)return!1;if(typeof F=="function")e(F,this,T);else for(var L=F.length,A=p(F,L),S=0;S<L;++S)e(A[S],this,T);return!0};function l(w,_,T,S){var C,D,N;if(o(T),D=w._events,D===void 0?(D=w._events=Object.create(null),w._eventsCount=0):(D.newListener!==void 0&&(w.emit("newListener",_,T.listener?T.listener:T),D=w._events),N=D[_]),N===void 0)N=D[_]=T,++w._eventsCount;else if(typeof N=="function"?N=D[_]=S?[T,N]:[N,T]:S?N.unshift(T):N.push(T),C=c(w),C>0&&N.length>C&&!N.warned){N.warned=!0;var M=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(_)+" listeners added. Use emitter.setMaxListeners() to increase limit");M.name="MaxListenersExceededWarning",M.emitter=w,M.type=_,M.count=N.length,n(M)}return w}i.prototype.addListener=function(_,T){return l(this,_,T,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(_,T){return l(this,_,T,!0)};function u(){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 d(w,_,T){var S={fired:!1,wrapFn:void 0,target:w,type:_,listener:T},C=u.bind(S);return C.listener=T,S.wrapFn=C,C}i.prototype.once=function(_,T){return o(T),this.on(_,d(this,_,T)),this},i.prototype.prependOnceListener=function(_,T){return o(T),this.prependListener(_,d(this,_,T)),this},i.prototype.removeListener=function(_,T){var S,C,D,N,M;if(o(T),C=this._events,C===void 0)return this;if(S=C[_],S===void 0)return this;if(S===T||S.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete C[_],C.removeListener&&this.emit("removeListener",_,S.listener||T));else if(typeof S!="function"){for(D=-1,N=S.length-1;N>=0;N--)if(S[N]===T||S[N].listener===T){M=S[N].listener,D=N;break}if(D<0)return this;D===0?S.shift():y(S,D),S.length===1&&(C[_]=S[0]),C.removeListener!==void 0&&this.emit("removeListener",_,M||T)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(_){var T,S,C;if(S=this._events,S===void 0)return this;if(S.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):S[_]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete S[_]),this;if(arguments.length===0){var D=Object.keys(S),N;for(C=0;C<D.length;++C)N=D[C],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=S[_],typeof T=="function")this.removeListener(_,T);else if(T!==void 0)for(C=T.length-1;C>=0;C--)this.removeListener(_,T[C]);return this};function h(w,_,T){var S=w._events;if(S===void 0)return[];var C=S[_];return C===void 0?[]:typeof C=="function"?T?[C.listener||C]:[C]:T?g(C):p(C,C.length)}i.prototype.listeners=function(_){return h(this,_,!0)},i.prototype.rawListeners=function(_){return h(this,_,!1)},i.listenerCount=function(w,_){return typeof w.listenerCount=="function"?w.listenerCount(_):f.call(w,_)},i.prototype.listenerCount=f;function f(w){var _=this._events;if(_!==void 0){var T=_[w];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function p(w,_){for(var T=new Array(_),S=0;S<_;++S)T[S]=w[S];return T}function y(w,_){for(;_+1<w.length;_++)w[_]=w[_+1];w.pop()}function g(w){for(var _=new Array(w.length),T=0;T<_.length;++T)_[T]=w[T].listener||w[T];return _}function b(w,_){return new Promise(function(T,S){function C(N){w.removeListener(_,D),S(N)}function D(){typeof w.removeListener=="function"&&w.removeListener("error",C),T([].slice.call(arguments))}x(w,_,D,{once:!0}),_!=="error"&&v(w,C,{once:!0})})}function v(w,_,T){typeof w.on=="function"&&x(w,"error",_,T)}function x(w,_,T,S){if(typeof w.on=="function")S.once?w.once(_,T):w.on(_,T);else if(typeof w.addEventListener=="function")w.addEventListener(_,function C(D){S.once&&w.removeEventListener(_,C),T(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof w)}return Jb.exports}var Qb={exports:{}},ck;function jl(){return ck||(ck=1,typeof Object.create=="function"?Qb.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Qb.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),Qb.exports}function _9(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var N6={exports:{}},Wn=N6.exports={},vo,wo;function vE(){throw new Error("setTimeout has not been defined")}function wE(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?vo=setTimeout:vo=vE}catch{vo=vE}try{typeof clearTimeout=="function"?wo=clearTimeout:wo=wE}catch{wo=wE}})();function F6(s){if(vo===setTimeout)return setTimeout(s,0);if((vo===vE||!vo)&&setTimeout)return vo=setTimeout,setTimeout(s,0);try{return vo(s,0)}catch{try{return vo.call(null,s,0)}catch{return vo.call(this,s,0)}}}function T9(s){if(wo===clearTimeout)return clearTimeout(s);if((wo===wE||!wo)&&clearTimeout)return wo=clearTimeout,clearTimeout(s);try{return wo(s)}catch{try{return wo.call(null,s)}catch{return wo.call(this,s)}}}var nc=[],Gd=!1,uu,u1=-1;function S9(){!Gd||!uu||(Gd=!1,uu.length?nc=uu.concat(nc):u1=-1,nc.length&&U6())}function U6(){if(!Gd){var s=F6(S9);Gd=!0;for(var e=nc.length;e;){for(uu=nc,nc=[];++u1<e;)uu&&uu[u1].run();u1=-1,e=nc.length}uu=null,Gd=!1,T9(s)}}Wn.nextTick=function(s){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];nc.push(new R6(s,e)),nc.length===1&&!Gd&&F6(U6)};function R6(s,e){this.fun=s,this.array=e}R6.prototype.run=function(){this.fun.apply(null,this.array)};Wn.title="browser";Wn.browser=!0;Wn.env={};Wn.argv=[];Wn.version="";Wn.versions={};function yc(){}Wn.on=yc;Wn.addListener=yc;Wn.once=yc;Wn.off=yc;Wn.removeListener=yc;Wn.removeAllListeners=yc;Wn.emit=yc;Wn.prependListener=yc;Wn.prependOnceListener=yc;Wn.listeners=function(s){return[]};Wn.binding=function(s){throw new Error("process.binding is not supported")};Wn.cwd=function(){return"/"};Wn.chdir=function(s){throw new Error("process.chdir is not supported")};Wn.umask=function(){return 0};var E9=N6.exports;const At=_9(E9);var tx,lk;function I6(){return lk||(lk=1,tx=FD().EventEmitter),tx}var nx={},og={},uk;function D9(){if(uk)return og;uk=1,og.byteLength=o,og.toByteArray=l,og.fromByteArray=h;for(var s=[],e=[],t=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,i=n.length;r<i;++r)s[r]=n[r],e[n.charCodeAt(r)]=r;e[45]=62,e[95]=63;function a(f){var p=f.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=f.indexOf("=");y===-1&&(y=p);var g=y===p?0:4-y%4;return[y,g]}function o(f){var p=a(f),y=p[0],g=p[1];return(y+g)*3/4-g}function c(f,p,y){return(p+y)*3/4-y}function l(f){var p,y=a(f),g=y[0],b=y[1],v=new t(c(f,g,b)),x=0,w=b>0?g-4:g,_;for(_=0;_<w;_+=4)p=e[f.charCodeAt(_)]<<18|e[f.charCodeAt(_+1)]<<12|e[f.charCodeAt(_+2)]<<6|e[f.charCodeAt(_+3)],v[x++]=p>>16&255,v[x++]=p>>8&255,v[x++]=p&255;return b===2&&(p=e[f.charCodeAt(_)]<<2|e[f.charCodeAt(_+1)]>>4,v[x++]=p&255),b===1&&(p=e[f.charCodeAt(_)]<<10|e[f.charCodeAt(_+1)]<<4|e[f.charCodeAt(_+2)]>>2,v[x++]=p>>8&255,v[x++]=p&255),v}function u(f){return s[f>>18&63]+s[f>>12&63]+s[f>>6&63]+s[f&63]}function d(f,p,y){for(var g,b=[],v=p;v<y;v+=3)g=(f[v]<<16&16711680)+(f[v+1]<<8&65280)+(f[v+2]&255),b.push(u(g));return b.join("")}function h(f){for(var p,y=f.length,g=y%3,b=[],v=16383,x=0,w=y-g;x<w;x+=v)b.push(d(f,x,x+v>w?w:x+v));return g===1?(p=f[y-1],b.push(s[p>>2]+s[p<<4&63]+"==")):g===2&&(p=(f[y-2]<<8)+f[y-1],b.push(s[p>>10]+s[p>>4&63]+s[p<<2&63]+"=")),b.join("")}return og}var e0={},hk;function C9(){return hk||(hk=1,e0.read=function(s,e,t,n,r){var i,a,o=r*8-n-1,c=(1<<o)-1,l=c>>1,u=-7,d=t?r-1:0,h=t?-1:1,f=s[e+d];for(d+=h,i=f&(1<<-u)-1,f>>=-u,u+=o;u>0;i=i*256+s[e+d],d+=h,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=a*256+s[e+d],d+=h,u-=8);if(i===0)i=1-l;else{if(i===c)return a?NaN:(f?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-l}return(f?-1:1)*a*Math.pow(2,i-n)},e0.write=function(s,e,t,n,r,i){var a,o,c,l=i*8-r-1,u=(1<<l)-1,d=u>>1,h=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,y=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+d>=1?e+=h/c:e+=h*Math.pow(2,1-d),e*c>=2&&(a++,c/=2),a+d>=u?(o=0,a=u):a+d>=1?(o=(e*c-1)*Math.pow(2,r),a=a+d):(o=e*Math.pow(2,d-1)*Math.pow(2,r),a=0));r>=8;s[t+f]=o&255,f+=p,o/=256,r-=8);for(a=a<<r|o,l+=r;l>0;s[t+f]=a&255,f+=p,a/=256,l-=8);s[t+f-p]|=y*128}),e0}var dk;
vendor: 5,224 bytes, line 817
817function ew(){return dk||(dk=1,(function(s){var e=D9(),t=C9(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;s.Buffer=o,s.SlowBuffer=v,s.INSPECT_MAX_BYTES=50;var r=2147483647;s.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.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 i(){try{var K=new Uint8Array(1),U={foo:function(){return 42}};return Object.setPrototypeOf(U,Uint8Array.prototype),Object.setPrototypeOf(K,U),K.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(K){if(K>r)throw new RangeError('The value "'+K+'" is invalid for option "size"');var U=new Uint8Array(K);return Object.setPrototypeOf(U,o.prototype),U}function o(K,U,R){if(typeof K=="number"){if(typeof U=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(K)}return c(K,U,R)}o.poolSize=8192;function c(K,U,R){if(typeof K=="string")return h(K,U);if(ArrayBuffer.isView(K))return p(K);if(K==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K);if(we(K,ArrayBuffer)||K&&we(K.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(we(K,SharedArrayBuffer)||K&&we(K.buffer,SharedArrayBuffer)))return y(K,U,R);if(typeof K=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=K.valueOf&&K.valueOf();if(E!=null&&E!==K)return o.from(E,U,R);var Q=g(K);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof K[Symbol.toPrimitive]=="function")return o.from(K[Symbol.toPrimitive]("string"),U,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K)}o.from=function(K,U,R){return c(K,U,R)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(K){if(typeof K!="number")throw new TypeError('"size" argument must be of type number');if(K<0)throw new RangeError('The value "'+K+'" is invalid for option "size"')}function u(K,U,R){return l(K),K<=0?a(K):U!==void 0?typeof R=="string"?a(K).fill(U,R):a(K).fill(U):a(K)}o.alloc=function(K,U,R){return u(K,U,R)};function d(K){return l(K),a(K<0?0:b(K)|0)}o.allocUnsafe=function(K){return d(K)},o.allocUnsafeSlow=function(K){return d(K)};function h(K,U){if((typeof U!="string"||U==="")&&(U="utf8"),!o.isEncoding(U))throw new TypeError("Unknown encoding: "+U);var R=x(K,U)|0,E=a(R),Q=E.write(K,U);return Q!==R&&(E=E.slice(0,Q)),E}function f(K){for(var U=K.length<0?0:b(K.length)|0,R=a(U),E=0;E<U;E+=1)R[E]=K[E]&255;return R}function p(K){if(we(K,Uint8Array)){var U=new Uint8Array(K);return y(U.buffer,U.byteOffset,U.byteLength)}return f(K)}function y(K,U,R){if(U<0||K.byteLength<U)throw new RangeError('"offset" is outside of buffer bounds');if(K.byteLength<U+(R||0))throw new RangeError('"length" is outside of buffer bounds');var E;return U===void 0&&R===void 0?E=new Uint8Array(K):R===void 0?E=new Uint8Array(K,U):E=new Uint8Array(K,U,R),Object.setPrototypeOf(E,o.prototype),E}function g(K){if(o.isBuffer(K)){var U=b(K.length)|0,R=a(U);return R.length===0||K.copy(R,0,0,U),R}if(K.length!==void 0)return typeof K.length!="number"||H(K.length)?a(0):f(K);if(K.type==="Buffer"&&Array.isArray(K.data))return f(K.data)}function b(K){if(K>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return K|0}function v(K){return+K!=K&&(K=0),o.alloc(+K)}o.isBuffer=function(U){return U!=null&&U._isBuffer===!0&&U!==o.prototype},o.compare=function(U,R){if(we(U,Uint8Array)&&(U=o.from(U,U.offset,U.byteLength)),we(R,Uint8Array)&&(R=o.from(R,R.offset,R.byteLength)),!o.isBuffer(U)||!o.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(U===R)return 0;for(var E=U.length,Q=R.length,ce=0,V=Math.min(E,Q);ce<V;++ce)if(U[ce]!==R[ce]){E=U[ce],Q=R[ce];break}return E<Q?-1:Q<E?1:0},o.isEncoding=function(U){switch(String(U).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}},o.concat=function(U,R){if(!Array.isArray(U))throw new TypeError('"list" argument must be an Array of Buffers');if(U.length===0)return o.alloc(0);var E;if(R===void 0)for(R=0,E=0;E<U.length;++E)R+=U[E].length;var Q=o.allocUnsafe(R),ce=0;for(E=0;E<U.length;++E){var V=U[E];if(we(V,Uint8Array))ce+V.length>Q.length?o.from(V).copy(Q,ce):Uint8Array.prototype.set.call(Q,V,ce);else if(o.isBuffer(V))V.copy(Q,ce);else throw new TypeError('"list" argument must be an Array of Buffers');ce+=V.length}return Q};function x(K,U){if(o.isBuffer(K))return K.length;if(ArrayBuffer.isView(K)||we(K,ArrayBuffer))return K.byteLength;
vendor: 10,503 bytes, line 817
817if(typeof K!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof K);var R=K.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&R===0)return 0;for(var Q=!1;;)switch(U){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return W(K).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return se(K).length;default:if(Q)return E?-1:W(K).length;U=(""+U).toLowerCase(),Q=!0}}o.byteLength=x;function w(K,U,R){var E=!1;if((U===void 0||U<0)&&(U=0),U>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,U>>>=0,R<=U))return"";for(K||(K="utf8");;)switch(K){case"hex":return O(this,U,R);case"utf8":case"utf-8":return A(this,U,R);case"ascii":return j(this,U,R);case"latin1":case"binary":return ee(this,U,R);case"base64":return L(this,U,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,U,R);default:if(E)throw new TypeError("Unknown encoding: "+K);K=(K+"").toLowerCase(),E=!0}}o.prototype._isBuffer=!0;function _(K,U,R){var E=K[U];K[U]=K[R],K[R]=E}o.prototype.swap16=function(){var U=this.length;if(U%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var R=0;R<U;R+=2)_(this,R,R+1);return this},o.prototype.swap32=function(){var U=this.length;if(U%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var R=0;R<U;R+=4)_(this,R,R+3),_(this,R+1,R+2);return this},o.prototype.swap64=function(){var U=this.length;if(U%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var R=0;R<U;R+=8)_(this,R,R+7),_(this,R+1,R+6),_(this,R+2,R+5),_(this,R+3,R+4);return this},o.prototype.toString=function(){var U=this.length;return U===0?"":arguments.length===0?A(this,0,U):w.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(U){if(!o.isBuffer(U))throw new TypeError("Argument must be a Buffer");return this===U?!0:o.compare(this,U)===0},o.prototype.inspect=function(){var U="",R=s.INSPECT_MAX_BYTES;return U=this.toString("hex",0,R).replace(/(.{2})/g,"$1 ").trim(),this.length>R&&(U+=" ... "),"<Buffer "+U+">"},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(U,R,E,Q,ce){if(we(U,Uint8Array)&&(U=o.from(U,U.offset,U.byteLength)),!o.isBuffer(U))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof U);if(R===void 0&&(R=0),E===void 0&&(E=U?U.length:0),Q===void 0&&(Q=0),ce===void 0&&(ce=this.length),R<0||E>U.length||Q<0||ce>this.length)throw new RangeError("out of range index");if(Q>=ce&&R>=E)return 0;if(Q>=ce)return-1;if(R>=E)return 1;if(R>>>=0,E>>>=0,Q>>>=0,ce>>>=0,this===U)return 0;for(var V=ce-Q,k=E-R,I=Math.min(V,k),$=this.slice(Q,ce),Z=U.slice(R,E),ae=0;ae<I;++ae)if($[ae]!==Z[ae]){V=$[ae],k=Z[ae];break}return V<k?-1:k<V?1:0};function T(K,U,R,E,Q){if(K.length===0)return-1;if(typeof R=="string"?(E=R,R=0):R>2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,H(R)&&(R=Q?0:K.length-1),R<0&&(R=K.length+R),R>=K.length){if(Q)return-1;R=K.length-1}else if(R<0)if(Q)R=0;else return-1;if(typeof U=="string"&&(U=o.from(U,E)),o.isBuffer(U))return U.length===0?-1:S(K,U,R,E,Q);if(typeof U=="number")return U=U&255,typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(K,U,R):Uint8Array.prototype.lastIndexOf.call(K,U,R):S(K,[U],R,E,Q);throw new TypeError("val must be string, number or Buffer")}function S(K,U,R,E,Q){var ce=1,V=K.length,k=U.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(K.length<2||U.length<2)return-1;ce=2,V/=2,k/=2,R/=2}function I(me,xe){return ce===1?me[xe]:me.readUInt16BE(xe*ce)}var $;if(Q){var Z=-1;for($=R;$<V;$++)if(I(K,$)===I(U,Z===-1?0:$-Z)){if(Z===-1&&(Z=$),$-Z+1===k)return Z*ce}else Z!==-1&&($-=$-Z),Z=-1}else for(R+k>V&&(R=V-k),$=R;$>=0;$--){for(var ae=!0,ye=0;ye<k;ye++)if(I(K,$+ye)!==I(U,ye)){ae=!1;break}if(ae)return $}return-1}o.prototype.includes=function(U,R,E){return this.indexOf(U,R,E)!==-1},o.prototype.indexOf=function(U,R,E){return T(this,U,R,E,!0)},o.prototype.lastIndexOf=function(U,R,E){return T(this,U,R,E,!1)};function C(K,U,R,E){R=Number(R)||0;var Q=K.length-R;E?(E=Number(E),E>Q&&(E=Q)):E=Q;var ce=U.length;E>ce/2&&(E=ce/2);for(var V=0;V<E;++V){var k=parseInt(U.substr(V*2,2),16);if(H(k))return V;K[R+V]=k}return V}function D(K,U,R,E){return ue(W(U,K.length-R),K,R,E)}function N(K,U,R,E){return ue(te(U),K,R,E)}function M(K,U,R,E){return ue(se(U),K,R,E)}function F(K,U,R,E){return ue(Y(U,K.length-R),K,R,E)}o.prototype.write=function(U,R,E,Q){if(R===void 0)Q="utf8",E=this.length,R=0;else if(E===void 0&&typeof R=="string")Q=R,E=this.length,R=0;else if(isFinite(R))R=R>>>0,isFinite(E)?(E=E>>>0,Q===void 0&&(Q="utf8")):(Q=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ce=this.length-R;if((E===void 0||E>ce)&&(E=ce),U.length>0&&(E<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");Q||(Q="utf8");for(var V=!1;;)switch(Q){case"hex":return C(this,U,R,E);case"utf8":case"utf-8":return D(this,U,R,E);case"ascii":case"latin1":case"binary":return N(this,U,R,E);case"base64":return M(this,U,R,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,U,R,E);default:if(V)throw new TypeError("Unknown encoding: "+Q);Q=(""+Q).toLowerCase(),V=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function L(K,U,R){return U===0&&R===K.length?e.fromByteArray(K):e.fromByteArray(K.slice(U,R))}function A(K,U,R){R=Math.min(K.length,R);for(var E=[],Q=U;Q<R;){var ce=K[Q],V=null,k=ce>239?4:ce>223?3:ce>191?2:1;if(Q+k<=R){var I,$,Z,ae;switch(k){case 1:ce<128&&(V=ce);break;case 2:I=K[Q+1],(I&192)===128&&(ae=(ce&31)<<6|I&63,ae>127&&(V=ae));break;case 3:I=K[Q+1],$=K[Q+2],(I&192)===128&&($&192)===128&&(ae=(ce&15)<<12|(I&63)<<6|$&63,ae>2047&&(ae<55296||ae>57343)&&(V=ae));break;case 4:I=K[Q+1],$=K[Q+2],Z=K[Q+3],(I&192)===128&&($&192)===128&&(Z&192)===128&&(ae=(ce&15)<<18|(I&63)<<12|($&63)<<6|Z&63,ae>65535&&ae<1114112&&(V=ae))}}V===null?(V=65533,k=1):V>65535&&(V-=65536,E.push(V>>>10&1023|55296),V=56320|V&1023),E.push(V),Q+=k}return he(E)}var X=4096;function he(K){var U=K.length;if(U<=X)return String.fromCharCode.apply(String,K);for(var R="",E=0;E<U;)R+=String.fromCharCode.apply(String,K.slice(E,E+=X));return R}function j(K,U,R){var E="";R=Math.min(K.length,R);for(var Q=U;Q<R;++Q)E+=String.fromCharCode(K[Q]&127);return E}function ee(K,U,R){var E="";R=Math.min(K.length,R);for(var Q=U;Q<R;++Q)E+=String.fromCharCode(K[Q]);return E}function O(K,U,R){var E=K.length;(!U||U<0)&&(U=0),(!R||R<0||R>E)&&(R=E);for(var Q="",ce=U;ce<R;++ce)Q+=_e[K[ce]];return Q}function pe(K,U,R){for(var E=K.slice(U,R),Q="",ce=0;ce<E.length-1;ce+=2)Q+=String.fromCharCode(E[ce]+E[ce+1]*256);return Q}o.prototype.slice=function(U,R){var E=this.length;U=~~U,R=R===void 0?E:~~R,U<0?(U+=E,U<0&&(U=0)):U>E&&(U=E),R<0?(R+=E,R<0&&(R=0)):R>E&&(R=E),R<U&&(R=U);var Q=this.subarray(U,R);return Object.setPrototypeOf(Q,o.prototype),Q};function q(K,U,R){if(K%1!==0||K<0)throw new RangeError("offset is not uint");if(K+U>R)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(U,R,E){U=U>>>0,R=R>>>0,E||q(U,R,this.length);for(var Q=this[U],ce=1,V=0;++V<R&&(ce*=256);)Q+=this[U+V]*ce;return Q},o.prototype.readUintBE=o.prototype.readUIntBE=function(U,R,E){U=U>>>0,R=R>>>0,E||q(U,R,this.length);for(var Q=this[U+--R],ce=1;R>0&&(ce*=256);)Q+=this[U+--R]*ce;return Q},o.prototype.readUint8=o.prototype.readUInt8=function(U,R){return U=U>>>0,R||q(U,1,this.length),this[U]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(U,R){return U=U>>>0,R||q(U,2,this.length),this[U]|this[U+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(U,R){return U=U>>>0,R||q(U,2,this.length),this[U]<<8|this[U+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(U,R){return U=U>>>0,R||q(U,4,this.length),(this[U]|this[U+1]<<8|this[U+2]<<16)+this[U+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(U,R){return U=U>>>0,R||q(U,4,this.length),this[U]*16777216+(this[U+1]<<16|this[U+2]<<8|this[U+3])},o.prototype.readIntLE=function(U,R,E){U=U>>>0,R=R>>>0,E||q(U,R,this.length);for(var Q=this[U],ce=1,V=0;++V<R&&(ce*=256);)Q+=this[U+V]*ce;return ce*=128,Q>=ce&&(Q-=Math.pow(2,8*R)),Q},o.prototype.readIntBE=function(U,R,E){U=U>>>0,R=R>>>0,E||q(U,R,this.length);for(var Q=R,ce=1,V=this[U+--Q];Q>0&&(ce*=256);)V+=this[U+--Q]*ce;return ce*=128,V>=ce&&(V-=Math.pow(2,8*R)),V},o.prototype.readInt8=function(U,R){return U=U>>>0,R||q(U,1,this.length),this[U]&128?(255-this[U]+1)*-1:this[U]},o.prototype.readInt16LE=function(U,R){U=U>>>0,R||q(U,2,this.length);var E=this[U]|this[U+1]<<8;return E&32768?E|4294901760:E},o.prototype.readInt16BE=function(U,R){U=U>>>0,R||q(U,2,this.length);var E=this[U+1]|this[U]<<8;return E&32768?E|4294901760:E},o.prototype.readInt32LE=function(U,R){return U=U>>>0,R||q(U,4,this.length),this[U]|this[U+1]<<8|this[U+2]<<16|this[U+3]<<24},o.prototype.readInt32BE=function(U,R){return U=U>>>0,R||q(U,4,this.length),this[U]<<24|this[U+1]<<16|this[U+2]<<8|this[U+3]},o.prototype.readFloatLE=function(U,R){return U=U>>>0,R||q(U,4,this.length),t.read(this,U,!0,23,4)},o.prototype.readFloatBE=function(U,R){return U=U>>>0,R||q(U,4,this.length),t.read(this,U,!1,23,4)},o.prototype.readDoubleLE=function(U,R){return U=U>>>0,R||q(U,8,this.length),t.read(this,U,!0,52,8)},o.prototype.readDoubleBE=function(U,R){return U=U>>>0,R||q(U,8,this.length),t.read(this,U,!1,52,8)};function B(K,U,R,E,Q,ce){if(!o.isBuffer(K))throw new TypeError('"buffer" argument must be a Buffer instance');if(U>Q||U<ce)throw new RangeError('"value" argument is out of bounds');if(R+E>K.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(U,R,E,Q){if(U=+U,R=R>>>0,E=E>>>0,!Q){var ce=Math.pow(2,8*E)-1;B(this,U,R,E,ce,0)}var V=1,k=0;for(this[R]=U&255;++k<E&&(V*=256);)this[R+k]=U/V&255;return R+E},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(U,R,E,Q){if(U=+U,R=R>>>0,E=E>>>0,!Q){var ce=Math.pow(2,8*E)-1;B(this,U,R,E,ce,0)}var V=E-1,k=1;for(this[R+V]=U&255;--V>=0&&(k*=256);)this[R+V]=U/k&255;return R+E},o.prototype.writeUint8=o.prototype.writeUInt8=function(U,R,E){return U=+U,R=R>>>0,E||B(this,U,R,1,255,0),this[R]=U&255,R+1}
vendor: 4,554 bytes, line 817
817,o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(U,R,E){return U=+U,R=R>>>0,E||B(this,U,R,2,65535,0),this[R]=U&255,this[R+1]=U>>>8,R+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(U,R,E){return U=+U,R=R>>>0,E||B(this,U,R,2,65535,0),this[R]=U>>>8,this[R+1]=U&255,R+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(U,R,E){return U=+U,R=R>>>0,E||B(this,U,R,4,4294967295,0),this[R+3]=U>>>24,this[R+2]=U>>>16,this[R+1]=U>>>8,this[R]=U&255,R+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(U,R,E){return U=+U,R=R>>>0,E||B(this,U,R,4,4294967295,0),this[R]=U>>>24,this[R+1]=U>>>16,this[R+2]=U>>>8,this[R+3]=U&255,R+4},o.prototype.writeIntLE=function(U,R,E,Q){if(U=+U,R=R>>>0,!Q){var ce=Math.pow(2,8*E-1);B(this,U,R,E,ce-1,-ce)}var V=0,k=1,I=0;for(this[R]=U&255;++V<E&&(k*=256);)U<0&&I===0&&this[R+V-1]!==0&&(I=1),this[R+V]=(U/k>>0)-I&255;return R+E},o.prototype.writeIntBE=function(U,R,E,Q){if(U=+U,R=R>>>0,!Q){var ce=Math.pow(2,8*E-1);B(this,U,R,E,ce-1,-ce)}var V=E-1,k=1,I=0;for(this[R+V]=U&255;--V>=0&&(k*=256);)U<0&&I===0&&this[R+V+1]!==0&&(I=1),this[R+V]=(U/k>>0)-I&255;return R+E},o.prototype.writeInt8=function(U,R,E){return U=+U,R=R>>>0,E||B(this,U,R,1,127,-128),U<0&&(U=255+U+1),this[R]=U&255,R+1},o.prototype.writeInt16LE=function(U,R,E){return U=+U,R=R>>>0,E||B(this,U,R,2,32767,-32768),this[R]=U&255,this[R+1]=U>>>8,R+2},o.prototype.writeInt16BE=function(U,R,E){return U=+U,R=R>>>0,E||B(this,U,R,2,32767,-32768),this[R]=U>>>8,this[R+1]=U&255,R+2},o.prototype.writeInt32LE=function(U,R,E){return U=+U,R=R>>>0,E||B(this,U,R,4,2147483647,-2147483648),this[R]=U&255,this[R+1]=U>>>8,this[R+2]=U>>>16,this[R+3]=U>>>24,R+4},o.prototype.writeInt32BE=function(U,R,E){return U=+U,R=R>>>0,E||B(this,U,R,4,2147483647,-2147483648),U<0&&(U=4294967295+U+1),this[R]=U>>>24,this[R+1]=U>>>16,this[R+2]=U>>>8,this[R+3]=U&255,R+4};function re(K,U,R,E,Q,ce){if(R+E>K.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function le(K,U,R,E,Q){return U=+U,R=R>>>0,Q||re(K,U,R,4),t.write(K,U,R,E,23,4),R+4}o.prototype.writeFloatLE=function(U,R,E){return le(this,U,R,!0,E)},o.prototype.writeFloatBE=function(U,R,E){return le(this,U,R,!1,E)};function ge(K,U,R,E,Q){return U=+U,R=R>>>0,Q||re(K,U,R,8),t.write(K,U,R,E,52,8),R+8}o.prototype.writeDoubleLE=function(U,R,E){return ge(this,U,R,!0,E)},o.prototype.writeDoubleBE=function(U,R,E){return ge(this,U,R,!1,E)},o.prototype.copy=function(U,R,E,Q){if(!o.isBuffer(U))throw new TypeError("argument should be a Buffer");if(E||(E=0),!Q&&Q!==0&&(Q=this.length),R>=U.length&&(R=U.length),R||(R=0),Q>0&&Q<E&&(Q=E),Q===E||U.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(E<0||E>=this.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("sourceEnd out of bounds");Q>this.length&&(Q=this.length),U.length-R<Q-E&&(Q=U.length-R+E);var ce=Q-E;return this===U&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(R,E,Q):Uint8Array.prototype.set.call(U,this.subarray(E,Q),R),ce},o.prototype.fill=function(U,R,E,Q){if(typeof U=="string"){if(typeof R=="string"?(Q=R,R=0,E=this.length):typeof E=="string"&&(Q=E,E=this.length),Q!==void 0&&typeof Q!="string")throw new TypeError("encoding must be a string");if(typeof Q=="string"&&!o.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);if(U.length===1){var ce=U.charCodeAt(0);(Q==="utf8"&&ce<128||Q==="latin1")&&(U=ce)}}else typeof U=="number"?U=U&255:typeof U=="boolean"&&(U=Number(U));if(R<0||this.length<R||this.length<E)throw new RangeError("Out of range index");if(E<=R)return this;R=R>>>0,E=E===void 0?this.length:E>>>0,U||(U=0);var V;if(typeof U=="number")for(V=R;V<E;++V)this[V]=U;else{var k=o.isBuffer(U)?U:o.from(U,Q),I=k.length;if(I===0)throw new TypeError('The value "'+U+'" is invalid for argument "value"');for(V=0;V<E-R;++V)this[V+R]=k[V%I]}return this};var ie=/[^+/0-9A-Za-z-_]/g;function P(K){if(K=K.split("=")[0],K=K.trim().replace(ie,""),K.length<2)return"";for(;K.length%4!==0;)K=K+"=";return K}function W(K,U){U=U||1/0;for(var R,E=K.length,Q=null,ce=[],V=0;V<E;++V){if(R=K.charCodeAt(V),R>55295&&R<57344){if(!Q){if(R>56319){(U-=3)>-1&&ce.push(239,191,189);continue}else if(V+1===E){(U-=3)>-1&&ce.push(239,191,189);continue}Q=R;continue}if(R<56320){(U-=3)>-1&&ce.push(239,191,189),Q=R;continue}R=(Q-55296<<10|R-56320)+65536}else Q&&(U-=3)>-1&&ce.push(239,191,189);if(Q=null,R<128){if((U-=1)<0)break;ce.push(R)}else if(R<2048){if((U-=2)<0)break;ce.push(R>>6|192,R&63|128)}
817else if(R<65536){if((U-=3)<0)break;ce.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((U-=4)<0)break;ce.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return ce}function te(K){for(var U=[],R=0;R<K.length;++R)U.push(K.charCodeAt(R)&255);return U}function Y(K,U){for(var R,E,Q,ce=[],V=0;V<K.length&&!((U-=2)<0);++V)R=K.charCodeAt(V),E=R>>8,Q=R%256,ce.push(Q),ce.push(E);return ce}function se(K){return e.toByteArray(P(K))}function ue(K,U,R,E){for(var Q=0;Q<E&&!(Q+R>=U.length||Q>=K.length);++Q)U[Q+R]=K[Q];return Q}function we(K,U){return K instanceof U||K!=null&&K.constructor!=null&&K.constructor.name!=null&&K.constructor.name===U.name}function H(K){return K!==K}var _e=(function(){for(var K="0123456789abcdef",U=new Array(256),R=0;R<16;++R)for(var E=R*16,Q=0;Q<16;++Q)U[E+Q]=K[R]+K[Q];return U})()})(nx)),nx}var rx={},ix={},sx,fk;function M6(){return fk||(fk=1,sx=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}),sx}var ox,pk;function UD(){if(pk)return ox;pk=1;var s=M6();return ox=function(){return s()&&!!Symbol.toStringTag},ox}var ax,gk;function P6(){return gk||(gk=1,ax=Object),ax}var cx,mk;function A9(){return mk||(mk=1,cx=Error),cx}var lx,yk;function k9(){return yk||(yk=1,lx=EvalError),lx}var ux,bk;function N9(){return bk||(bk=1,ux=RangeError),ux}var hx,vk;function F9(){return vk||(vk=1,hx=ReferenceError),hx}var dx,wk;function O6(){return wk||(wk=1,dx=SyntaxError),dx}var fx,xk;function tw(){return xk||(xk=1,fx=TypeError),fx}var px,_k;function U9(){return _k||(_k=1,px=URIError),px}var gx,Tk;function R9(){return Tk||(Tk=1,gx=Math.abs),gx}var mx,Sk;function I9(){return Sk||(Sk=1,mx=Math.floor),mx}var yx,Ek;function M9(){return Ek||(Ek=1,yx=Math.max),yx}var bx,Dk;function P9(){return Dk||(Dk=1,bx=Math.min),bx}var vx,Ck;function O9(){return Ck||(Ck=1,vx=Math.pow),vx}var wx,Ak;function L9(){return Ak||(Ak=1,wx=Math.round),wx}var xx,kk;function B9(){return kk||(kk=1,xx=Number.isNaN||function(e){return e!==e}),xx}var _x,Nk;function W9(){if(Nk)return _x;Nk=1;var s=B9();return _x=function(t){return s(t)||t===0?t:t<0?-1:1},_x}var Tx,Fk;function j9(){return Fk||(Fk=1,Tx=Object.getOwnPropertyDescriptor),Tx}var Sx,Uk;function gb(){if(Uk)return Sx;Uk=1;var s=j9();if(s)try{s([],"length")}catch{s=null}return Sx=s,Sx}var Ex,Rk;function nw(){if(Rk)return Ex;Rk=1;var s=Object.defineProperty||!1;if(s)try{s({},"a",{value:1})}catch{s=!1}return Ex=s,Ex}var Dx,Ik;function z9(){if(Ik)return Dx;Ik=1;var s=typeof Symbol<"u"&&Symbol,e=M6();return Dx=function(){return typeof s!="function"||typeof Symbol!="function"||typeof s("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Dx}var Cx,Mk;function L6(){return Mk||(Mk=1,Cx=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Cx}var Ax,Pk;function B6(){if(Pk)return Ax;Pk=1;var s=P6();return Ax=s.getPrototypeOf||null,Ax}var kx,Ok;function H9(){if(Ok)return kx;Ok=1;var s="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",r=function(c,l){for(var u=[],d=0;d<c.length;d+=1)u[d]=c[d];for(var h=0;h<l.length;h+=1)u[h+c.length]=l[h];return u},i=function(c,l){for(var u=[],d=l,h=0;d<c.length;d+=1,h+=1)u[h]=c[d];return u},a=function(o,c){for(var l="",u=0;u<o.length;u+=1)l+=o[u],u+1<o.length&&(l+=c);return l};return kx=function(c){var l=this;if(typeof l!="function"||e.apply(l)!==n)throw new TypeError(s+l);
vendor: 8,749 bytes, line 817
817for(var u=i(arguments,1),d,h=function(){if(this instanceof d){var b=l.apply(this,r(u,arguments));return Object(b)===b?b:this}return l.apply(c,r(u,arguments))},f=t(0,l.length-u.length),p=[],y=0;y<f;y++)p[y]="$"+y;if(d=Function("binder","return function ("+a(p,",")+"){ return binder.apply(this,arguments); }")(h),l.prototype){var g=function(){};g.prototype=l.prototype,d.prototype=new g,g.prototype=null}return d},kx}var Nx,Lk;function mb(){if(Lk)return Nx;Lk=1;var s=H9();return Nx=Function.prototype.bind||s,Nx}var Fx,Bk;function RD(){return Bk||(Bk=1,Fx=Function.prototype.call),Fx}var Ux,Wk;function ID(){return Wk||(Wk=1,Ux=Function.prototype.apply),Ux}var Rx,jk;function $9(){return jk||(jk=1,Rx=typeof Reflect<"u"&&Reflect&&Reflect.apply),Rx}var Ix,zk;function W6(){if(zk)return Ix;zk=1;var s=mb(),e=ID(),t=RD(),n=$9();return Ix=n||s.call(t,e),Ix}var Mx,Hk;function MD(){if(Hk)return Mx;Hk=1;var s=mb(),e=tw(),t=RD(),n=W6();return Mx=function(i){if(i.length<1||typeof i[0]!="function")throw new e("a function is required");return n(s,t,i)},Mx}var Px,$k;function K9(){if($k)return Px;$k=1;var s=MD(),e=gb(),t;try{t=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var n=!!t&&e&&e(Object.prototype,"__proto__"),r=Object,i=r.getPrototypeOf;return Px=n&&typeof n.get=="function"?s([n.get]):typeof i=="function"?(function(o){return i(o==null?o:r(o))}):!1,Px}var Ox,Kk;function j6(){if(Kk)return Ox;Kk=1;var s=L6(),e=B6(),t=K9();return Ox=s?function(r){return s(r)}:e?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return e(r)}:t?function(r){return t(r)}:null,Ox}var Lx,Xk;function X9(){if(Xk)return Lx;Xk=1;var s=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=mb();return Lx=t.call(s,e),Lx}var Bx,Vk;function z6(){if(Vk)return Bx;Vk=1;var s,e=P6(),t=A9(),n=k9(),r=N9(),i=F9(),a=O6(),o=tw(),c=U9(),l=R9(),u=I9(),d=M9(),h=P9(),f=O9(),p=L9(),y=W9(),g=Function,b=function(te){try{return g('"use strict"; return ('+te+").constructor;")()}catch{}},v=gb(),x=nw(),w=function(){throw new o},_=v?(function(){try{return arguments.callee,w}catch{try{return v(arguments,"callee").get}catch{return w}}})():w,T=z9()(),S=j6(),C=B6(),D=L6(),N=ID(),M=RD(),F={},L=typeof Uint8Array>"u"||!S?s:S(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?s:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?s:ArrayBuffer,"%ArrayIteratorPrototype%":T&&S?S([][Symbol.iterator]()):s,"%AsyncFromSyncIteratorPrototype%":s,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%Atomics%":typeof Atomics>"u"?s:Atomics,"%BigInt%":typeof BigInt>"u"?s:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?s:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?s:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?s:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?s:Float16Array,"%Float32Array%":typeof Float32Array>"u"?s:Float32Array,"%Float64Array%":typeof Float64Array>"u"?s:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?s:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":F,"%Int8Array%":typeof Int8Array>"u"?s:Int8Array,"%Int16Array%":typeof Int16Array>"u"?s:Int16Array,"%Int32Array%":typeof Int32Array>"u"?s:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&S?S(S([][Symbol.iterator]())):s,"%JSON%":typeof JSON=="object"?JSON:s,"%Map%":typeof Map>"u"?s:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!S?s:S(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?s:Promise,"%Proxy%":typeof Proxy>"u"?s:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?s:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?s:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!S?s:S(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?s:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&S?S(""[Symbol.iterator]()):s,"%Symbol%":T?Symbol:s,"%SyntaxError%":a,"%ThrowTypeError%":_,"%TypedArray%":L,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?s:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?s:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?s:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?s:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?s:WeakMap,"%WeakRef%":typeof WeakRef>"u"?s:WeakRef,"%WeakSet%":typeof WeakSet>"u"?s:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":N,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":l,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":p,"%Math.sign%":y,"%Reflect.getPrototypeOf%":D};if(S)try{null.error}catch(te){var X=S(S(te));A["%Error.prototype%"]=X}var he=function te(Y){var se;if(Y==="%AsyncFunction%")se=b("async function () {}");else if(Y==="%GeneratorFunction%")se=b("function* () {}");else if(Y==="%AsyncGeneratorFunction%")se=b("async function* () {}");else if(Y==="%AsyncGenerator%"){var ue=te("%AsyncGeneratorFunction%");ue&&(se=ue.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var we=te("%AsyncGenerator%");we&&S&&(se=S(we.prototype))}return A[Y]=se,se},j={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ee=mb(),O=X9(),pe=ee.call(M,Array.prototype.concat),q=ee.call(N,Array.prototype.splice),B=ee.call(M,String.prototype.replace),re=ee.call(M,String.prototype.slice),le=ee.call(M,RegExp.prototype.exec),ge=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ie=/\\(\\)?/g,P=function(Y){var se=re(Y,0,1),ue=re(Y,-1);if(se==="%"&&ue!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(ue==="%"&&se!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var we=[];return B(Y,ge,function(H,_e,K,U){we[we.length]=K?B(U,ie,"$1"):_e||H}),we},W=function(Y,se){var ue=Y,we;
817if(O(j,ue)&&(we=j[ue],ue="%"+we[0]+"%"),O(A,ue)){var H=A[ue];if(H===F&&(H=he(ue)),typeof H>"u"&&!se)throw new o("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:we,name:ue,value:H}}throw new a("intrinsic "+Y+" does not exist!")};return Bx=function(Y,se){if(typeof Y!="string"||Y.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof se!="boolean")throw new o('"allowMissing" argument must be a boolean');if(le(/^%?[^%]*%?$/,Y)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ue=P(Y),we=ue.length>0?ue[0]:"",H=W("%"+we+"%",se),_e=H.name,K=H.value,U=!1,R=H.alias;R&&(we=R[0],q(ue,pe([0,1],R)));for(var E=1,Q=!0;E<ue.length;E+=1){var ce=ue[E],V=re(ce,0,1),k=re(ce,-1);if((V==='"'||V==="'"||V==="`"||k==='"'||k==="'"||k==="`")&&V!==k)throw new a("property names with quotes must have matching quotes");if((ce==="constructor"||!Q)&&(U=!0),we+="."+ce,_e="%"+we+"%",O(A,_e))K=A[_e];else if(K!=null){if(!(ce in K)){if(!se)throw new o("base intrinsic for "+Y+" exists, but the property is not available.");return}if(v&&E+1>=ue.length){var I=v(K,ce);Q=!!I,Q&&"get"in I&&!("originalValue"in I.get)?K=I.get:K=K[ce]}else Q=O(K,ce),K=K[ce];Q&&!U&&(A[_e]=K)}}return K},Bx}var Wx,Gk;function H6(){if(Gk)return Wx;Gk=1;var s=z6(),e=MD(),t=e([s("%String.prototype.indexOf%")]);return Wx=function(r,i){var a=s(r,!!i);return typeof a=="function"&&t(r,".prototype.")>-1?e([a]):a},Wx}var jx,qk;function V9(){if(qk)return jx;qk=1;var s=UD()(),e=H6(),t=e("Object.prototype.toString"),n=function(o){return s&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:t(o)==="[object Arguments]"},r=function(o){return n(o)?!0:o!==null&&typeof o=="object"&&"length"in o&&typeof o.length=="number"&&o.length>=0&&t(o)!=="[object Array]"&&"callee"in o&&t(o.callee)==="[object Function]"},i=(function(){return n(arguments)})();return n.isLegacyArguments=r,jx=i?n:r,jx}var zx,Yk;function G9(){if(Yk)return zx;Yk=1;var s=Object.prototype.toString,e=Function.prototype.toString,t=/^\s*(?:function)?\*/,n=UD()(),r=Object.getPrototypeOf,i=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},a;return zx=function(c){if(typeof c!="function")return!1;if(t.test(e.call(c)))return!0;if(!n){var l=s.call(c);return l==="[object GeneratorFunction]"}if(!r)return!1;if(typeof a>"u"){var u=i();a=u?r(u):!1}return r(c)===a},zx}var Hx,Zk;function q9(){if(Zk)return Hx;Zk=1;var s=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,t)}catch(v){v!==n&&(e=null)}else e=null;var r=/^\s*class\b/,i=function(x){try{var w=s.call(x);return r.test(w)}catch{return!1}},a=function(x){try{return i(x)?!1:(s.call(x),!0)}catch{return!1}},o=Object.prototype.toString,c="[object Object]",l="[object Function]",u="[object GeneratorFunction]",d="[object HTMLAllCollection]",h="[object HTML document.all class]",f="[object HTMLCollection]",p=typeof Symbol=="function"&&!!Symbol.toStringTag,y=!(0 in[,]),g=function(){return!1};if(typeof document=="object"){var b=document.all;o.call(b)===o.call(document.all)&&(g=function(x){if((y||!x)&&(typeof x>"u"||typeof x=="object"))try{var w=o.call(x);return(w===d||w===h||w===f||w===c)&&x("")==null}catch{}return!1})}return Hx=e?function(x){if(g(x))return!0;if(!x||typeof x!="function"&&typeof x!="object")return!1;try{e(x,null,t)}catch(w){if(w!==n)return!1}return!i(x)&&a(x)}:function(x){if(g(x))return!0;if(!x||typeof x!="function"&&typeof x!="object")return!1;if(p)return a(x);if(i(x))return!1;var w=o.call(x);return w!==l&&w!==u&&!/^\[object HTML/.test(w)?!1:a(x)},Hx}var $x,Jk;function Y9(){if(Jk)return $x;Jk=1;var s=q9(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(c,l,u){for(var d=0,h=c.length;d<h;d++)t.call(c,d)&&(u==null?l(c[d],d,c):l.call(u,c[d],d,c))},r=function(c,l,u){for(var d=0,h=c.length;d<h;d++)u==null?l(c.charAt(d),d,c):l.call(u,c.charAt(d),d,c)},i=function(c,l,u){for(var d in c)t.call(c,d)&&(u==null?l(c[d],d,c):l.call(u,c[d],d,c))};function a(o){return e.call(o)==="[object Array]"}return $x=function(c,l,u){if(!s(l))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=u),a(c)?n(c,l,d):typeof c=="string"?r(c,l,d):i(c,l,d)},$x}var Kx,Qk;function Z9(){return Qk||(Qk=1,Kx=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Kx}var Xx,e5;function J9(){if(e5)return Xx;e5=1;var s=Z9(),e=typeof globalThis>"u"?_s:globalThis;return Xx=function(){for(var n=[],r=0;r<s.length;r++)typeof e[s[r]]=="function"&&(n[n.length]=s[r]);return n},Xx}var Vx={exports:{}},Gx,t5;
817function Q9(){if(t5)return Gx;t5=1;var s=nw(),e=O6(),t=tw(),n=gb();return Gx=function(i,a,o){if(!i||typeof i!="object"&&typeof i!="function")throw new t("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,h=!!n&&n(i,a);if(s)s(i,a,{configurable:u===null&&h?h.configurable:!u,enumerable:c===null&&h?h.enumerable:!c,value:o,writable:l===null&&h?h.writable:!l});else if(d||!c&&!l&&!u)i[a]=o;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Gx}var qx,n5;function eW(){if(n5)return qx;n5=1;var s=nw(),e=function(){return!!s};return e.hasArrayLengthDefineBug=function(){if(!s)return null;try{return s([],"length",{value:1}).length!==1}catch{return!0}},qx=e,qx}var Yx,r5;function tW(){if(r5)return Yx;r5=1;var s=z6(),e=Q9(),t=eW()(),n=gb(),r=tw(),i=s("%Math.floor%");return Yx=function(o,c){if(typeof o!="function")throw new r("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||i(c)!==c)throw new r("`length` must be a positive 32-bit integer");var l=arguments.length>2&&!!arguments[2],u=!0,d=!0;if("length"in o&&n){var h=n(o,"length");h&&!h.configurable&&(u=!1),h&&!h.writable&&(d=!1)}return(u||d||!l)&&(t?e(o,"length",c,!0,!0):e(o,"length",c)),o},Yx}var Zx,i5;function nW(){if(i5)return Zx;i5=1;var s=mb(),e=ID(),t=W6();return Zx=function(){return t(s,e,arguments)},Zx}var s5;function rW(){return s5||(s5=1,(function(s){var e=tW(),t=nw(),n=MD(),r=nW();s.exports=function(a){var o=n(arguments),c=a.length-(arguments.length-1);return e(o,1+(c>0?c:0),!0)},t?t(s.exports,"apply",{value:r}):s.exports.apply=r}
817)(Vx)),Vx.exports}var Jx,o5;function $6(){if(o5)return Jx;o5=1;var s=Y9(),e=J9(),t=rW(),n=H6(),r=gb(),i=j6(),a=n("Object.prototype.toString"),o=UD()(),c=typeof globalThis>"u"?_s:globalThis,l=e(),u=n("String.prototype.slice"),d=n("Array.prototype.indexOf",!0)||function(g,b){for(var v=0;v<g.length;v+=1)if(g[v]===b)return v;return-1},h={__proto__:null};o&&r&&i?s(l,function(y){var g=new c[y];if(Symbol.toStringTag in g&&i){var b=i(g),v=r(b,Symbol.toStringTag);if(!v&&b){var x=i(b);v=r(x,Symbol.toStringTag)}h["$"+y]=t(v.get)}}):s(l,function(y){var g=new c[y],b=g.slice||g.set;b&&(h["$"+y]=t(b))});var f=function(g){var b=!1;return s(h,function(v,x){if(!b)try{"$"+v(g)===x&&(b=u(x,1))}catch{}}),b},p=function(g){var b=!1;return s(h,function(v,x){if(!b)try{v(g),b=u(x,1)}catch{}}),b};return Jx=function(g){if(!g||typeof g!="object")return!1;if(!o){var b=u(a(g),8,-1);return d(l,b)>-1?b:b!=="Object"?!1:p(g)}return r?f(g):null},Jx}var Qx,a5;function iW(){if(a5)return Qx;a5=1;var s=$6();return Qx=function(t){return!!s(t)},Qx}var c5;function sW(){return c5||(c5=1,(function(s){var e=V9(),t=G9(),n=$6(),r=iW();function i(E){return E.call.bind(E)}var a=typeof BigInt<"u",o=typeof Symbol<"u",c=i(Object.prototype.toString),l=i(Number.prototype.valueOf),u=i(String.prototype.valueOf),d=i(Boolean.prototype.valueOf);if(a)var h=i(BigInt.prototype.valueOf);if(o)var f=i(Symbol.prototype.valueOf);function p(E,Q){if(typeof E!="object")return!1;try{return Q(E),!0}catch{return!1}}s.isArgumentsObject=e,s.isGeneratorFunction=t,s.isTypedArray=r;function y(E){return typeof Promise<"u"&&E instanceof Promise||E!==null&&typeof E=="object"&&typeof E.then=="function"&&typeof E.catch=="function"}s.isPromise=y;function g(E){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(E):r(E)||re(E)}s.isArrayBufferView=g;function b(E){return n(E)==="Uint8Array"}s.isUint8Array=b;function v(E){return n(E)==="Uint8ClampedArray"}s.isUint8ClampedArray=v;function x(E){return n(E)==="Uint16Array"}s.isUint16Array=x;function w(E){return n(E)==="Uint32Array"}s.isUint32Array=w;function _(E){return n(E)==="Int8Array"}s.isInt8Array=_;function T(E){return n(E)==="Int16Array"}s.isInt16Array=T;function S(E){return n(E)==="Int32Array"}s.isInt32Array=S;function C(E){return n(E)==="Float32Array"}s.isFloat32Array=C;function D(E){return n(E)==="Float64Array"}s.isFloat64Array=D;function N(E){return n(E)==="BigInt64Array"}s.isBigInt64Array=N;function M(E){return n(E)==="BigUint64Array"}s.isBigUint64Array=M;function F(E){return c(E)==="[object Map]"}F.working=typeof Map<"u"&&F(new Map);function L(E){return typeof Map>"u"?!1:F.working?F(E):E instanceof Map}s.isMap=L;function A(E){return c(E)==="[object Set]"}A.working=typeof Set<"u"&&A(new Set);function X(E){return typeof Set>"u"?!1:A.working?A(E):E instanceof Set}s.isSet=X;function he(E){return c(E)==="[object WeakMap]"}he.working=typeof WeakMap<"u"&&he(new WeakMap);function j(E){return typeof WeakMap>"u"?!1:he.working?he(E):E instanceof WeakMap}s.isWeakMap=j;function ee(E){return c(E)==="[object WeakSet]"}ee.working=typeof WeakSet<"u"&&ee(new WeakSet);function O(E){return ee(E)}s.isWeakSet=O;function pe(E){return c(E)==="[object ArrayBuffer]"}pe.working=typeof ArrayBuffer<"u"&&pe(new ArrayBuffer);function q(E){return typeof ArrayBuffer>"u"?!1:pe.working?pe(E):E instanceof ArrayBuffer}s.isArrayBuffer=q;function B(E){return c(E)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function re(E){return typeof DataView>"u"?!1:B.working?B(E):E instanceof DataView}s.isDataView=re;var le=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ge(E){return c(E)==="[object SharedArrayBuffer]"}function ie(E){return typeof le>"u"?!1:(typeof ge.working>"u"&&(ge.working=ge(new le)),ge.working?ge(E):E instanceof le)}s.isSharedArrayBuffer=ie;function P(E){return c(E)==="[object AsyncFunction]"}s.isAsyncFunction=P;function W(E){return c(E)==="[object Map Iterator]"}s.isMapIterator=W;function te(E){return c(E)==="[object Set Iterator]"}s.isSetIterator=te;function Y(E){return c(E)==="[object Generator]"}s.isGeneratorObject=Y;function se(E){return c(E)==="[object WebAssembly.Module]"}s.isWebAssemblyCompiledModule=se;function ue(E){return p(E,l)}s.isNumberObject=ue;function we(E){return p(E,u)}s.isStringObject=we;function H(E){return p(E,d)}s.isBooleanObject=H;function _e(E){return a&&p(E,h)}s.isBigIntObject=_e;function K(E){return o&&p(E,f)}s.isSymbolObject=K;function U(E){return ue(E)||we(E)||H(E)||_e(E)||K(E)}s.isBoxedPrimitive=U;function R(E){return typeof Uint8Array<"u"&&(q(E)||ie(E))}s.isAnyArrayBuffer=R,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(E){Object.defineProperty(s,E,{enumerable:!1,value:function(){throw new Error(E+" is not supported in userland")}})})})(ix)),ix}var e_,l5;function oW(){return l5||(l5=1,e_=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),e_}var u5;function K6(){return u5||(u5=1,(function(s){var e=Object.getOwnPropertyDescriptors||function(re){for(var le=Object.keys(re),ge={},ie=0;ie<le.length;ie++)ge[le[ie]]=Object.getOwnPropertyDescriptor(re,le[ie]);return ge},t=/%[sdj%]/g;s.format=function(B){if(!_(B)){for(var re=[],le=0;le<arguments.length;le++)re.push(a(arguments[le]));return re.join(" ")}for(var le=1,ge=arguments,ie=ge.length,P=String(B).replace(t,function(te){if(te==="%%")return"%";if(le>=ie)return te;switch(te){case"%s":return String(ge[le++]);case"%d":return Number(ge[le++]);case"%j":try{return JSON.stringify(ge[le++])}catch{return"[Circular]"}default:return te}}),W=ge[le];le<ie;W=ge[++le])v(W)||!D(W)?P+=" "+W:P+=" "+a(W);return P},s.deprecate=function(B,re){if(typeof At<"u"&&At.noDeprecation===!0)return B;if(typeof At>"u")return function(){return s.deprecate(B,re).apply(this,arguments)};var le=!1;function ge(){if(!le){if(At.throwDeprecation)throw new Error(re);At.traceDeprecation?console.trace(re):console.error(re),le=!0}return B.apply(this,arguments)}return ge};var n={},r=/^$/;if(At.env.NODE_DEBUG){var i=At.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),r=new RegExp("^"+i+"$","i")}s.debuglog=function(B){if(B=B.toUpperCase(),!n[B])if(r.test(B)){var re=At.pid;n[B]=function(){var le=s.format.apply(s,arguments);console.error("%s %d: %s",B,re,le)}}else n[B]=function(){};return n[B]};function a(B,re){var le={seen:[],stylize:c};return arguments.length>=3&&(le.depth=arguments[2]),arguments.length>=4&&(le.colors=arguments[3]),b(re)?le.showHidden=re:re&&s._extend(le,re),S(le.showHidden)&&(le.showHidden=!1),S(le.depth)&&(le.depth=2),S(le.colors)&&(le.colors=!1),S(le.customInspect)&&(le.customInspect=!0),le.colors&&(le.stylize=o),u(le,B,le.depth)}s.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(B,re){var le=a.styles[re];return le?"\x1B["+a.colors[le][0]+"m"+B+"\x1B["+a.colors[le][1]+"m":B}function c(B,re){return B}function l(B){var re={};return B.forEach(function(le,ge){re[le]=!0}),re}function u(B,re,le){if(B.customInspect&&re&&F(re.inspect)&&re.inspect!==s.inspect&&!(re.constructor&&re.constructor.prototype===re)){var ge=re.inspect(le,B);return _(ge)||(ge=u(B,ge,le)),ge}var ie=d(B,re);if(ie)return ie;var P=Object.keys(re),W=l(P);if(B.showHidden&&(P=Object.getOwnPropertyNames(re)),M(re)&&(P.indexOf("message")>=0||P.indexOf("description")>=0))return h(re);if(P.length===0){if(F(re)){var te=re.name?": "+re.name:"";return B.stylize("[Function"+te+"]","special")}if(C(re))return B.stylize(RegExp.prototype.toString.call(re),"regexp");if(N(re))return B.stylize(Date.prototype.toString.call(re),"date");if(M(re))return h(re)}var Y="",se=!1,ue=["{","}"];if(g(re)&&(se=!0,ue=["[","]"]),F(re)){var we=re.name?": "+re.name:"";Y=" [Function"+we+"]"}if(C(re)&&(Y=" "+RegExp.prototype.toString.call(re)),N(re)&&(Y=" "+Date.prototype.toUTCString.call(re)),M(re)&&(Y=" "+h(re)),P.length===0&&(!se||re.length==0))return ue[0]+Y+ue[1];if(le<0)return C(re)?B.stylize(RegExp.prototype.toString.call(re),"regexp"):B.stylize("[Object]","special");B.seen.push(re);var H;return se?H=f(B,re,le,W,P):H=P.map(function(_e){return p(B,re,le,W,_e,se)}),B.seen.pop(),y(H,Y,ue)}function d(B,re){if(S(re))return B.stylize("undefined","undefined");if(_(re)){var le="'"+JSON.stringify(re).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(le,"string")}if(w(re))return B.stylize(""+re,"number");if(b(re))return B.stylize(""+re,"boolean");if(v(re))return B.stylize("null","null")}function h(B){return"["+Error.prototype.toString.call(B)+"]"}function f(B,re,le,ge,ie){for(var P=[],W=0,te=re.length;W<te;++W)ee(re,String(W))?P.push(p(B,re,le,ge,String(W),!0)):P.push("");return ie.forEach(function(Y){Y.match(/^\d+$/)||P.push(p(B,re,le,ge,Y,!0))}),P}function p(B,re,le,ge,ie,P){var W,te,Y;if(Y=Object.getOwnPropertyDescriptor(re,ie)||{value:re[ie]},Y.get?Y.set?te=B.stylize("[Getter/Setter]","special"):te=B.stylize("[Getter]","special"):Y.set&&(te=B.stylize("[
817Setter]","special")),ee(ge,ie)||(W="["+ie+"]"),te||(B.seen.indexOf(Y.value)<0?(v(le)?te=u(B,Y.value,null):te=u(B,Y.value,le-1),te.indexOf(` 818`)>-1&&(P?te=te.split(` 819`).map(function(se){return" "+se}).join(` 820`).slice(2):te=` 821`+te.split(` 822`).map(function(se){return" "+se}).join(` 823`))):te=B.stylize("[Circular]","special")),S(W)){if(P&&ie.match(/^\d+$/))return te;W=JSON.stringify(""+ie),W.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(W=W.slice(1,-1),W=B.stylize(W,"name")):(W=W.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),W=B.stylize(W,"string"))}return W+": "+te}function y(B,re,le){var ge=B.reduce(function(ie,P){return P.indexOf(` 824`)>=0,ie+P.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ge>60?le[0]+(re===""?"":re+` 825 `)+" "+B.join(`, 826 `)+" "+le[1]:le[0]+re+" "+B.join(", ")+" "+le[1]}s.types=sW();function g(B){return Array.isArray(B)}s.isArray=g;function b(B){return typeof B=="boolean"}s.isBoolean=b;function v(B){return B===null}s.isNull=v;function x(B){return B==null}s.isNullOrUndefined=x;function w(B){return typeof B=="number"}s.isNumber=w;function _(B){return typeof B=="string"}s.isString=_;function T(B){return typeof B=="symbol"}s.isSymbol=T;function S(B){return B===void 0}s.isUndefined=S;function C(B){return D(B)&&A(B)==="[object RegExp]"}s.isRegExp=C,s.types.isRegExp=C;function D(B){return typeof B=="object"&&B!==null}s.isObject=D;function N(B){return D(B)&&A(B)==="[object Date]"}s.isDate=N,s.types.isDate=N;function M(B){return D(B)&&(A(B)==="[object Error]"||B instanceof Error)}s.isError=M,s.types.isNativeError=M;function F(B){return typeof B=="function"}s.isFunction=F;function L(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}s.isPrimitive=L,s.isBuffer=oW();function A(B){return Object.prototype.toString.call(B)}function X(B){return B<10?"0"+B.toString(10):B.toString(10)}var he=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(){var B=new Date,re=[X(B.getHours()),X(B.getMinutes()),X(B.getSeconds())].join(":");return[B.getDate(),he[B.getMonth()],re].join(" ")}s.log=function(){console.log("%s - %s",j(),s.format.apply(s,arguments))},s.inherits=jl(),s._extend=function(B,re){if(!re||!D(re))return B;for(var le=Object.keys(re),ge=le.length;ge--;)B[le[ge]]=re[le[ge]];return B};function ee(B,re){return Object.prototype.hasOwnProperty.call(B,re)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;s.promisify=function(re){if(typeof re!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&re[O]){var le=re[O];if(typeof le!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(le,O,{value:le,enumerable:!1,writable:!1,configurable:!0}),le}function le(){for(var ge,ie,P=new Promise(function(Y,se){ge=Y,ie=se}),W=[],te=0;te<arguments.length;te++)W.push(arguments[te]);W.push(function(Y,se){Y?ie(Y):ge(se)});try{re.apply(this,W)}catch(Y){ie(Y)}return P}return Object.setPrototypeOf(le,Object.getPrototypeOf(re)),O&&Object.defineProperty(le,O,{value:le,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(le,e(re))},s.promisify.custom=O;function pe(B,re){if(!B){var le=new Error("Promise was rejected with a falsy value");le.reason=B,B=le}return re(B)}function q(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');function re(){for(var le=[],ge=0;ge<arguments.length;ge++)le.push(arguments[ge]);var ie=le.pop();if(typeof ie!="function")throw new TypeError("The last argument must be of type Function");var P=this,W=function(){return ie.apply(P,arguments)};B.apply(this,le).then(function(te){At.nextTick(W.bind(null,null,te))},function(te){At.nextTick(pe.bind(null,te,W))})}return Object.setPrototypeOf(re,Object.getPrototypeOf(B)),Object.defineProperties(re,e(B)),re}s.callbackify=q})(rx)),rx}var t_,h5;function aW(){if(h5)return t_;h5=1;function s(p,y){var g=Object.keys(p);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(p);y&&(b=b.filter(function(v){return Object.getOwnPropertyDescriptor(p,v).enumerable}
vendor: 4,443 bytes, line 826
826)),g.push.apply(g,b)}return g}function e(p){for(var y=1;y<arguments.length;y++){var g=arguments[y]!=null?arguments[y]:{};y%2?s(Object(g),!0).forEach(function(b){t(p,b,g[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(g)):s(Object(g)).forEach(function(b){Object.defineProperty(p,b,Object.getOwnPropertyDescriptor(g,b))})}return p}function t(p,y,g){return y=a(y),y in p?Object.defineProperty(p,y,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[y]=g,p}function n(p,y){if(!(p instanceof y))throw new TypeError("Cannot call a class as a function")}function r(p,y){for(var g=0;g<y.length;g++){var b=y[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,a(b.key),b)}}function i(p,y,g){return y&&r(p.prototype,y),Object.defineProperty(p,"prototype",{writable:!1}),p}function a(p){var y=o(p,"string");return typeof y=="symbol"?y:String(y)}function o(p,y){if(typeof p!="object"||p===null)return p;var g=p[Symbol.toPrimitive];if(g!==void 0){var b=g.call(p,y);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}var c=ew(),l=c.Buffer,u=K6(),d=u.inspect,h=d&&d.custom||"inspect";function f(p,y,g){l.prototype.copy.call(p,y,g)}return t_=(function(){function p(){n(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(g){var b={data:g,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length}},{key:"unshift",value:function(g){var b={data:g,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var b=this.head,v=""+b.data;b=b.next;)v+=g+b.data;return v}},{key:"concat",value:function(g){if(this.length===0)return l.alloc(0);for(var b=l.allocUnsafe(g>>>0),v=this.head,x=0;v;)f(v.data,b,x),x+=v.data.length,v=v.next;return b}},{key:"consume",value:function(g,b){var v;return g<this.head.data.length?(v=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):g===this.head.data.length?v=this.shift():v=b?this._getString(g):this._getBuffer(g),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var b=this.head,v=1,x=b.data;for(g-=x.length;b=b.next;){var w=b.data,_=g>w.length?w.length:g;if(_===w.length?x+=w:x+=w.slice(0,g),g-=_,g===0){_===w.length?(++v,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=w.slice(_));break}++v}return this.length-=v,x}},{key:"_getBuffer",value:function(g){var b=l.allocUnsafe(g),v=this.head,x=1;for(v.data.copy(b),g-=v.data.length;v=v.next;){var w=v.data,_=g>w.length?w.length:g;if(w.copy(b,b.length-g,0,_),g-=_,g===0){_===w.length?(++x,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=w.slice(_));break}++x}return this.length-=x,b}},{key:h,value:function(g,b){return d(this,e(e({},b),{},{depth:0,customInspect:!1}))}}]),p})(),t_}var n_,d5;function X6(){if(d5)return n_;d5=1;function s(a,o){var c=this,l=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return l||u?(o?o(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,At.nextTick(r,this,a)):At.nextTick(r,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(d){!o&&d?c._writableState?c._writableState.errorEmitted?At.nextTick(t,c):(c._writableState.errorEmitted=!0,At.nextTick(e,c,d)):At.nextTick(e,c,d):o?(At.nextTick(t,c),o(d)):At.nextTick(t,c)}),this)}function e(a,o){r(a,o),t(a)}function t(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}
vendor: 12,577 bytes, line 826
826function r(a,o){a.emit("error",o)}function i(a,o){var c=a._readableState,l=a._writableState;c&&c.autoDestroy||l&&l.autoDestroy?a.destroy(o):a.emit("error",o)}return n_={destroy:s,undestroy:n,errorOrDestroy:i},n_}var r_={},f5;function Vp(){if(f5)return r_;f5=1;function s(o,c){o.prototype=Object.create(c.prototype),o.prototype.constructor=o,o.__proto__=c}var e={};function t(o,c,l){l||(l=Error);function u(h,f,p){return typeof c=="string"?c:c(h,f,p)}var d=(function(h){s(f,h);function f(p,y,g){return h.call(this,u(p,y,g))||this}return f})(l);d.prototype.name=l.name,d.prototype.code=o,e[o]=d}function n(o,c){if(Array.isArray(o)){var l=o.length;return o=o.map(function(u){return String(u)}),l>2?"one of ".concat(c," ").concat(o.slice(0,l-1).join(", "),", or ")+o[l-1]:l===2?"one of ".concat(c," ").concat(o[0]," or ").concat(o[1]):"of ".concat(c," ").concat(o[0])}else return"of ".concat(c," ").concat(String(o))}function r(o,c,l){return o.substr(0,c.length)===c}function i(o,c,l){return(l===void 0||l>o.length)&&(l=o.length),o.substring(l-c.length,l)===c}function a(o,c,l){return typeof l!="number"&&(l=0),l+c.length>o.length?!1:o.indexOf(c,l)!==-1}return t("ERR_INVALID_OPT_VALUE",function(o,c){return'The value "'+c+'" is invalid for option "'+o+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(o,c,l){var u;typeof c=="string"&&r(c,"not ")?(u="must not be",c=c.replace(/^not /,"")):u="must be";var d;if(i(o," argument"))d="The ".concat(o," ").concat(u," ").concat(n(c,"type"));else{var h=a(o,".")?"property":"argument";d='The "'.concat(o,'" ').concat(h," ").concat(u," ").concat(n(c,"type"))}return d+=". Received type ".concat(typeof l),d},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),r_.codes=e,r_}var i_,p5;function V6(){if(p5)return i_;p5=1;var s=Vp().codes.ERR_INVALID_OPT_VALUE;function e(n,r,i){return n.highWaterMark!=null?n.highWaterMark:r?n[i]:null}function t(n,r,i,a){var o=e(r,a,i);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var c=a?i:"highWaterMark";throw new s(c,o)}return Math.floor(o)}return n.objectMode?16:16*1024}return i_={getHighWaterMark:t},i_}var s_,g5;function cW(){if(g5)return s_;g5=1,s_=s;function s(t,n){if(e("noDeprecation"))return t;var r=!1;function i(){if(!r){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),r=!0}return t.apply(this,arguments)}return i}function e(t){try{if(!_s.localStorage)return!1}catch{return!1}var n=_s.localStorage[t];return n==null?!1:String(n).toLowerCase()==="true"}return s_}var o_,m5;function G6(){if(m5)return o_;m5=1,o_=C;function s(ie){var P=this;this.next=null,this.entry=null,this.finish=function(){ge(P,ie)}}var e;C.WritableState=T;var t={deprecate:cW()},n=I6(),r=ew().Buffer,i=(typeof _s<"u"?_s:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(ie){return r.from(ie)}function o(ie){return r.isBuffer(ie)||ie instanceof i}var c=X6(),l=V6(),u=l.getHighWaterMark,d=Vp().codes,h=d.ERR_INVALID_ARG_TYPE,f=d.ERR_METHOD_NOT_IMPLEMENTED,p=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,g=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,v=d.ERR_STREAM_WRITE_AFTER_END,x=d.ERR_UNKNOWN_ENCODING,w=c.errorOrDestroy;jl()(C,n);function _(){}function T(ie,P,W){e=e||Rp(),ie=ie||{},typeof W!="boolean"&&(W=P instanceof e),this.objectMode=!!ie.objectMode,W&&(this.objectMode=this.objectMode||!!ie.writableObjectMode),this.highWaterMark=u(this,ie,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var te=ie.decodeStrings===!1;this.decodeStrings=!te,this.defaultEncoding=ie.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){he(P,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=ie.emitClose!==!1,this.autoDestroy=!!ie.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}T.prototype.getBuffer=function(){for(var P=this.bufferedRequest,W=[];P;)W.push(P),P=P.next;return W},(function(){try{Object.defineProperty(T.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var S;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(P){return S.call(this,P)?!0:this!==C?!1:P&&P._writableState instanceof T}})):S=function(P){return P instanceof this};function C(ie){e=e||Rp();var P=this instanceof e;if(!P&&!S.call(C,this))return new C(ie);this._writableState=new T(ie,this,P),this.writable=!0,ie&&(typeof ie.write=="function"&&(this._write=ie.write),typeof ie.writev=="function"&&(this._writev=ie.writev),typeof ie.destroy=="function"&&(this._destroy=ie.destroy),typeof ie.final=="function"&&(this._final=ie.final)),n.call(this)}C.prototype.pipe=function(){w(this,new y)};function D(ie,P){var W=new v;w(ie,W),At.nextTick(P,W)}function N(ie,P,W,te){var Y;return W===null?Y=new b:typeof W!="string"&&!P.objectMode&&(Y=new h("chunk",["string","Buffer"],W)),Y?(w(ie,Y),At.nextTick(te,Y),!1):!0}C.prototype.write=function(ie,P,W){var te=this._writableState,Y=!1,se=!te.objectMode&&o(ie);return se&&!r.isBuffer(ie)&&(ie=a(ie)),typeof P=="function"&&(W=P,P=null),se?P="buffer":P||(P=te.defaultEncoding),typeof W!="function"&&(W=_),te.ending?D(this,W):(se||N(this,te,ie,W))&&(te.pendingcb++,Y=F(this,te,se,ie,P,W)),Y},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var ie=this._writableState;ie.corked&&(ie.corked--,!ie.writing&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&O(this,ie))},C.prototype.setDefaultEncoding=function(P){if(typeof P=="string"&&(P=P.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((P+"").toLowerCase())>-1))throw new x(P);return this._writableState.defaultEncoding=P,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function M(ie,P,W){return!ie.objectMode&&ie.decodeStrings!==!1&&typeof P=="string"&&(P=r.from(P,W)),P}Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(ie,P,W,te,Y,se){if(!W){var ue=M(P,te,Y);te!==ue&&(W=!0,Y="buffer",te=ue)}var we=P.objectMode?1:te.length;P.length+=we;var H=P.length<P.highWaterMark;if(H||(P.needDrain=!0),P.writing||P.corked){var _e=P.lastBufferedRequest;P.lastBufferedRequest={chunk:te,encoding:Y,isBuf:W,callback:se,next:null},_e?_e.next=P.lastBufferedRequest:P.bufferedRequest=P.lastBufferedRequest,P.bufferedRequestCount+=1}else L(ie,P,!1,we,te,Y,se);return H}function L(ie,P,W,te,Y,se,ue){P.writelen=te,P.writecb=ue,P.writing=!0,P.sync=!0,P.destroyed?P.onwrite(new g("write")):W?ie._writev(Y,P.onwrite):ie._write(Y,se,P.onwrite),P.sync=!1}function A(ie,P,W,te,Y){--P.pendingcb,W?(At.nextTick(Y,te),At.nextTick(re,ie,P),ie._writableState.errorEmitted=!0,w(ie,te)):(Y(te),ie._writableState.errorEmitted=!0,w(ie,te),re(ie,P))}function X(ie){ie.writing=!1,ie.writecb=null,ie.length-=ie.writelen,ie.writelen=0}function he(ie,P){var W=ie._writableState,te=W.sync,Y=W.writecb;if(typeof Y!="function")throw new p;if(X(W),P)A(ie,W,te,P,Y);else{var se=pe(W)||ie.destroyed;!se&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&O(ie,W),te?At.nextTick(j,ie,W,se,Y):j(ie,W,se,Y)}}function j(ie,P,W,te){W||ee(ie,P),P.pendingcb--,te(),re(ie,P)}function ee(ie,P){P.length===0&&P.needDrain&&(P.needDrain=!1,ie.emit("drain"))}function O(ie,P){P.bufferProcessing=!0;var W=P.bufferedRequest;if(ie._writev&&W&&W.next){var te=P.bufferedRequestCount,Y=new Array(te),se=P.corkedRequestsFree;se.entry=W;for(var ue=0,we=!0;W;)Y[ue]=W,W.isBuf||(we=!1),W=W.next,ue+=1;Y.allBuffers=we,L(ie,P,!0,P.length,Y,"",se.finish),P.pendingcb++,P.lastBufferedRequest=null,se.next?(P.corkedRequestsFree=se.next,se.next=null):P.corkedRequestsFree=new s(P),P.bufferedRequestCount=0}else{for(;W;){var H=W.chunk,_e=W.encoding,K=W.callback,U=P.objectMode?1:H.length;if(L(ie,P,!1,U,H,_e,K),W=W.next,P.bufferedRequestCount--,P.writing)break}W===null&&(P.lastBufferedRequest=null)}P.bufferedRequest=W,P.bufferProcessing=!1}C.prototype._write=function(ie,P,W){W(new f("_write()"))},C.prototype._writev=null,C.prototype.end=function(ie,P,W){var te=this._writableState;return typeof ie=="function"?(W=ie,ie=null,P=null):typeof P=="function"&&(W=P,P=null),ie!=null&&this.write(ie,P),te.corked&&(te.corked=1,this.uncork()),te.ending||le(this,te,W),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function pe(ie){return ie.ending&&ie.length===0&&ie.bufferedRequest===null&&!ie.finished&&!ie.writing}function q(ie,P){ie._final(function(W){P.pendingcb--,W&&w(ie,W),P.prefinished=!0,ie.emit("prefinish"),re(ie,P)})}function B(ie,P){!P.prefinished&&!P.finalCalled&&(typeof ie._final=="function"&&!P.destroyed?(P.pendingcb++,P.finalCalled=!0,At.nextTick(q,ie,P)):(P.prefinished=!0,ie.emit("prefinish")))}function re(ie,P){var W=pe(P);if(W&&(B(ie,P),P.pendingcb===0&&(P.finished=!0,ie.emit("finish"),P.autoDestroy))){var te=ie._readableState;(!te||te.autoDestroy&&te.endEmitted)&&ie.destroy()}return W}function le(ie,P,W){P.ending=!0,re(ie,P),W&&(P.finished?At.nextTick(W):ie.once("finish",W)),P.ended=!0,ie.writable=!1}function ge(ie,P,W){var te=ie.entry;for(ie.entry=null;te;){var Y=te.callback;P.pendingcb--,Y(W),te=te.next}P.corkedRequestsFree.next=ie}return Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(P){this._writableState&&(this._writableState.destroyed=P)}}),C.prototype.destroy=c.destroy,C.prototype._undestroy=c.undestroy,C.prototype._destroy=function(ie,P){P(ie)},o_}var a_,y5;function Rp(){if(y5)return a_;y5=1;var s=Object.keys||function(l){var u=[];for(var d in l)u.push(d);return u};a_=a;var e=q6(),t=G6();jl()(a,e);for(var n=s(t.prototype),r=0;r<n.length;r++){var i=n[r];a.prototype[i]||(a.prototype[i]=t.prototype[i])}function a(l){if(!(this instanceof a))return new a(l);e.call(this,l),t.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",o)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function o(){this._writableState.ended||At.nextTick(c,this)}function c(l){l.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),a_}var c_={},t0={exports:{}},b5;function lW(){return b5||(b5=1,(function(s,e){var t=ew(),n=t.Buffer;function r(a,o){for(var c in a)o[c]=a[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?s.exports=t:(r(t,e),e.Buffer=i);function i(a,o,c){return n(a,o,c)}r(n,i),i.from=function(a,o,c){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,o,c)},i.alloc=function(a,o,c){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=n(a);
vendor: 11,557 bytes, line 826
826return o!==void 0?typeof c=="string"?l.fill(o,c):l.fill(o):l.fill(0),l},i.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},i.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(a)}})(t0,t0.exports)),t0.exports}var v5;function xE(){if(v5)return c_;v5=1;var s=lW().Buffer,e=s.isEncoding||function(b){switch(b=""+b,b&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(b){if(!b)return"utf8";for(var v;;)switch(b){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return b;default:if(v)return;b=(""+b).toLowerCase(),v=!0}}function n(b){var v=t(b);if(typeof v!="string"&&(s.isEncoding===e||!e(b)))throw new Error("Unknown encoding: "+b);return v||b}c_.StringDecoder=r;function r(b){this.encoding=n(b);var v;switch(this.encoding){case"utf16le":this.text=d,this.end=h,v=4;break;case"utf8":this.fillLast=c,v=4;break;case"base64":this.text=f,this.end=p,v=3;break;default:this.write=y,this.end=g;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=s.allocUnsafe(v)}r.prototype.write=function(b){if(b.length===0)return"";var v,x;if(this.lastNeed){if(v=this.fillLast(b),v===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x<b.length?v?v+this.text(b,x):this.text(b,x):v||""},r.prototype.end=u,r.prototype.text=l,r.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length};function i(b){return b<=127?0:b>>5===6?2:b>>4===14?3:b>>3===30?4:b>>6===2?-1:-2}function a(b,v,x){var w=v.length-1;if(w<x)return 0;var _=i(v[w]);return _>=0?(_>0&&(b.lastNeed=_-1),_):--w<x||_===-2?0:(_=i(v[w]),_>=0?(_>0&&(b.lastNeed=_-2),_):--w<x||_===-2?0:(_=i(v[w]),_>=0?(_>0&&(_===2?_=0:b.lastNeed=_-3),_):0))}function o(b,v,x){if((v[0]&192)!==128)return b.lastNeed=0,"�";if(b.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return b.lastNeed=1,"�";if(b.lastNeed>2&&v.length>2&&(v[2]&192)!==128)return b.lastNeed=2,"�"}}function c(b){var v=this.lastTotal-this.lastNeed,x=o(this,b);if(x!==void 0)return x;if(this.lastNeed<=b.length)return b.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,v,0,b.length),this.lastNeed-=b.length}function l(b,v){var x=a(this,b,v);if(!this.lastNeed)return b.toString("utf8",v);this.lastTotal=x;var w=b.length-(x-this.lastNeed);return b.copy(this.lastChar,0,w),b.toString("utf8",v,w)}function u(b){var v=b&&b.length?this.write(b):"";return this.lastNeed?v+"�":v}function d(b,v){if((b.length-v)%2===0){var x=b.toString("utf16le",v);if(x){var w=x.charCodeAt(x.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",v,b.length-1)}function h(b){var v=b&&b.length?this.write(b):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,x)}return v}function f(b,v){var x=(b.length-v)%3;return x===0?b.toString("base64",v):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",v,b.length-x))}function p(b){var v=b&&b.length?this.write(b):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function y(b){return b.toString(this.encoding)}function g(b){return b&&b.length?this.write(b):""}return c_}var l_,w5;function PD(){if(w5)return l_;w5=1;var s=Vp().codes.ERR_STREAM_PREMATURE_CLOSE;function e(i){var a=!1;return function(){if(!a){a=!0;for(var o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];i.apply(this,c)}}}function t(){}function n(i){return i.setHeader&&typeof i.abort=="function"}function r(i,a,o){if(typeof a=="function")return r(i,null,a);a||(a={}),o=e(o||t);var c=a.readable||a.readable!==!1&&i.readable,l=a.writable||a.writable!==!1&&i.writable,u=function(){i.writable||h()},d=i._writableState&&i._writableState.finished,h=function(){l=!1,d=!0,c||o.call(i)},f=i._readableState&&i._readableState.endEmitted,p=function(){c=!1,f=!0,l||o.call(i)},y=function(x){o.call(i,x)},g=function(){var x;if(c&&!f)return(!i._readableState||!i._readableState.ended)&&(x=new s),o.call(i,x);if(l&&!d)return(!i._writableState||!i._writableState.ended)&&(x=new s),o.call(i,x)},b=function(){i.req.on("finish",h)};return n(i)?(i.on("complete",h),i.on("abort",g),i.req?b():i.on("request",b)):l&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",p),i.on("finish",h),a.error!==!1&&i.on("error",y),i.on("close",g),function(){i.removeListener("complete",h),i.removeListener("abort",g),i.removeListener("request",b),i.req&&i.req.removeListener("finish",h),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",h),i.removeListener("end",p),i.removeListener("error",y),i.removeListener("close",g)}}return l_=r,l_}var u_,x5;function uW(){if(x5)return u_;x5=1;var s;function e(x,w,_){return w=t(w),w in x?Object.defineProperty(x,w,{value:_,enumerable:!0,configurable:!0,writable:!0}):x[w]=_,x}function t(x){var w=n(x,"string");return typeof w=="symbol"?w:String(w)}function n(x,w){if(typeof x!="object"||x===null)return x;var _=x[Symbol.toPrimitive];if(_!==void 0){var T=_.call(x,w);if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(x)}var r=PD(),i=Symbol("lastResolve"),a=Symbol("lastReject"),o=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function h(x,w){return{value:x,done:w}}function f(x){var w=x[i];if(w!==null){var _=x[d].read();_!==null&&(x[l]=null,x[i]=null,x[a]=null,w(h(_,!1)))}}function p(x){At.nextTick(f,x)}function y(x,w){return function(_,T){x.then(function(){if(w[c]){_(h(void 0,!0));return}w[u](_,T)},T)}}var g=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((s={get stream(){return this[d]},next:function(){var w=this,_=this[o];if(_!==null)return Promise.reject(_);if(this[c])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise(function(D,N){At.nextTick(function(){w[o]?N(w[o]):D(h(void 0,!0))})});var T=this[l],S;if(T)S=new Promise(y(T,this));else{var C=this[d].read();if(C!==null)return Promise.resolve(h(C,!1));S=new Promise(this[u])}return this[l]=S,S}},e(s,Symbol.asyncIterator,function(){return this}),e(s,"return",function(){var w=this;return new Promise(function(_,T){w[d].destroy(null,function(S){if(S){T(S);return}_(h(void 0,!0))})})}),s),g),v=function(w){var _,T=Object.create(b,(_={},e(_,d,{value:w,writable:!0}),e(_,i,{value:null,writable:!0}),e(_,a,{value:null,writable:!0}),e(_,o,{value:null,writable:!0}),e(_,c,{value:w._readableState.endEmitted,writable:!0}),e(_,u,{value:function(C,D){var N=T[d].read();N?(T[l]=null,T[i]=null,T[a]=null,C(h(N,!1))):(T[i]=C,T[a]=D)},writable:!0}),_));return T[l]=null,r(w,function(S){if(S&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"){var C=T[a];C!==null&&(T[l]=null,T[i]=null,T[a]=null,C(S)),T[o]=S;return}var D=T[i];D!==null&&(T[l]=null,T[i]=null,T[a]=null,D(h(void 0,!0))),T[c]=!0}),w.on("readable",p.bind(null,T)),T};return u_=v,u_}var h_,_5;function hW(){return _5||(_5=1,h_=function(){throw new Error("Readable.from is not available in the browser")}),h_}var d_,T5;function q6(){if(T5)return d_;T5=1,d_=D;var s;D.ReadableState=C,FD().EventEmitter;var e=function(ue,we){return ue.listeners(we).length},t=I6(),n=ew().Buffer,r=(typeof _s<"u"?_s:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(se){return n.from(se)}function a(se){return n.isBuffer(se)||se instanceof r}var o=K6(),c;o&&o.debuglog?c=o.debuglog("stream"):c=function(){};var l=aW(),u=X6(),d=V6(),h=d.getHighWaterMark,f=Vp().codes,p=f.ERR_INVALID_ARG_TYPE,y=f.ERR_STREAM_PUSH_AFTER_EOF,g=f.ERR_METHOD_NOT_IMPLEMENTED,b=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,v,x,w;jl()(D,t);var _=u.errorOrDestroy,T=["error","close","destroy","pause","resume"];function S(se,ue,we){if(typeof se.prependListener=="function")return se.prependListener(ue,we);!se._events||!se._events[ue]?se.on(ue,we):Array.isArray(se._events[ue])?se._events[ue].unshift(we):se._events[ue]=[we,se._events[ue]]}function C(se,ue,we){s=s||Rp(),se=se||{},typeof we!="boolean"&&(we=ue instanceof s),this.objectMode=!!se.objectMode,we&&(this.objectMode=this.objectMode||!!se.readableObjectMode),this.highWaterMark=h(this,se,"readableHighWaterMark",we),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=se.emitClose!==!1,this.autoDestroy=!!se.autoDestroy,this.destroyed=!1,this.defaultEncoding=se.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,se.encoding&&(v||(v=xE().StringDecoder),this.decoder=new v(se.encoding),this.encoding=se.encoding)}function D(se){if(s=s||Rp(),!(this instanceof D))return new D(se);var ue=this instanceof s;this._readableState=new C(se,this,ue),this.readable=!0,se&&(typeof se.read=="function"&&(this._read=se.read),typeof se.destroy=="function"&&(this._destroy=se.destroy)),t.call(this)}Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ue){this._readableState&&(this._readableState.destroyed=ue)}}),D.prototype.destroy=u.destroy,D.prototype._undestroy=u.undestroy,D.prototype._destroy=function(se,ue){ue(se)},D.prototype.push=function(se,ue){var we=this._readableState,H;return we.objectMode?H=!0:typeof se=="string"&&(ue=ue||we.defaultEncoding,ue!==we.encoding&&(se=n.from(se,ue),ue=""),H=!0),N(this,se,ue,!1,H)},D.prototype.unshift=function(se){return N(this,se,null,!0,!1)};function N(se,ue,we,H,_e){c("readableAddChunk",ue);var K=se._readableState;if(ue===null)K.reading=!1,he(se,K);else{var U;if(_e||(U=F(K,ue)),U)_(se,U);else if(K.objectMode||ue&&ue.length>0)if(typeof ue!="string"&&!K.objectMode&&Object.getPrototypeOf(ue)!==n.prototype&&(ue=i(ue)),H)K.endEmitted?_(se,new b):M(se,K,ue,!0);else if(K.ended)_(se,new y);else{if(K.destroyed)return!1;K.reading=!1,K.decoder&&!we?(ue=K.decoder.write(ue),K.objectMode||ue.length!==0?M(se,K,ue,!1):O(se,K)):M(se,K,ue,!1)}else H||(K.reading=!1,O(se,K))}return!K.ended&&(K.length<K.highWaterMark||K.length===0)}function M(se,ue,we,H){ue.flowing&&ue.length===0&&!ue.sync?(ue.awaitDrain=0,se.emit("data",we)):(ue.length+=ue.objectMode?1:we.length,H?ue.buffer.unshift(we):ue.buffer.push(we),ue.needReadable&&j(se)),O(se,ue)}function F(se,ue){var we;return!a(ue)&&typeof ue!="string"&&ue!==void 0&&!se.objectMode&&(we=new p("chunk",["string","Buffer","Uint8Array"],ue)),we}D.prototype.isPaused=function(){return this._readableState.flowing===!1},D.prototype.setEncoding=function(se){v||(v=xE().StringDecoder);var ue=new v(se);this._readableState.decoder=ue,this._readableState.encoding=this._readableState.decoder.encoding;
vendor: 6,369 bytes, line 826
826for(var we=this._readableState.buffer.head,H="";we!==null;)H+=ue.write(we.data),we=we.next;return this._readableState.buffer.clear(),H!==""&&this._readableState.buffer.push(H),this._readableState.length=H.length,this};var L=1073741824;function A(se){return se>=L?se=L:(se--,se|=se>>>1,se|=se>>>2,se|=se>>>4,se|=se>>>8,se|=se>>>16,se++),se}function X(se,ue){return se<=0||ue.length===0&&ue.ended?0:ue.objectMode?1:se!==se?ue.flowing&&ue.length?ue.buffer.head.data.length:ue.length:(se>ue.highWaterMark&&(ue.highWaterMark=A(se)),se<=ue.length?se:ue.ended?ue.length:(ue.needReadable=!0,0))}D.prototype.read=function(se){c("read",se),se=parseInt(se,10);var ue=this._readableState,we=se;if(se!==0&&(ue.emittedReadable=!1),se===0&&ue.needReadable&&((ue.highWaterMark!==0?ue.length>=ue.highWaterMark:ue.length>0)||ue.ended))return c("read: emitReadable",ue.length,ue.ended),ue.length===0&&ue.ended?W(this):j(this),null;if(se=X(se,ue),se===0&&ue.ended)return ue.length===0&&W(this),null;var H=ue.needReadable;c("need readable",H),(ue.length===0||ue.length-se<ue.highWaterMark)&&(H=!0,c("length less than watermark",H)),ue.ended||ue.reading?(H=!1,c("reading or ended",H)):H&&(c("do read"),ue.reading=!0,ue.sync=!0,ue.length===0&&(ue.needReadable=!0),this._read(ue.highWaterMark),ue.sync=!1,ue.reading||(se=X(we,ue)));var _e;return se>0?_e=P(se,ue):_e=null,_e===null?(ue.needReadable=ue.length<=ue.highWaterMark,se=0):(ue.length-=se,ue.awaitDrain=0),ue.length===0&&(ue.ended||(ue.needReadable=!0),we!==se&&ue.ended&&W(this)),_e!==null&&this.emit("data",_e),_e};function he(se,ue){if(c("onEofChunk"),!ue.ended){if(ue.decoder){var we=ue.decoder.end();we&&we.length&&(ue.buffer.push(we),ue.length+=ue.objectMode?1:we.length)}ue.ended=!0,ue.sync?j(se):(ue.needReadable=!1,ue.emittedReadable||(ue.emittedReadable=!0,ee(se)))}}function j(se){var ue=se._readableState;c("emitReadable",ue.needReadable,ue.emittedReadable),ue.needReadable=!1,ue.emittedReadable||(c("emitReadable",ue.flowing),ue.emittedReadable=!0,At.nextTick(ee,se))}function ee(se){var ue=se._readableState;c("emitReadable_",ue.destroyed,ue.length,ue.ended),!ue.destroyed&&(ue.length||ue.ended)&&(se.emit("readable"),ue.emittedReadable=!1),ue.needReadable=!ue.flowing&&!ue.ended&&ue.length<=ue.highWaterMark,ie(se)}function O(se,ue){ue.readingMore||(ue.readingMore=!0,At.nextTick(pe,se,ue))}function pe(se,ue){for(;!ue.reading&&!ue.ended&&(ue.length<ue.highWaterMark||ue.flowing&&ue.length===0);){var we=ue.length;if(c("maybeReadMore read 0"),se.read(0),we===ue.length)break}ue.readingMore=!1}D.prototype._read=function(se){_(this,new g("_read()"))},D.prototype.pipe=function(se,ue){var we=this,H=this._readableState;switch(H.pipesCount){case 0:H.pipes=se;break;case 1:H.pipes=[H.pipes,se];break;default:H.pipes.push(se);break}H.pipesCount+=1,c("pipe count=%d opts=%j",H.pipesCount,ue);var _e=(!ue||ue.end!==!1)&&se!==At.stdout&&se!==At.stderr,K=_e?R:Z;H.endEmitted?At.nextTick(K):we.once("end",K),se.on("unpipe",U);function U(ae,ye){c("onunpipe"),ae===we&&ye&&ye.hasUnpiped===!1&&(ye.hasUnpiped=!0,ce())}function R(){c("onend"),se.end()}var E=q(we);se.on("drain",E);var Q=!1;function ce(){c("cleanup"),se.removeListener("close",I),se.removeListener("finish",$),se.removeListener("drain",E),se.removeListener("error",k),se.removeListener("unpipe",U),we.removeListener("end",R),we.removeListener("end",Z),we.removeListener("data",V),Q=!0,H.awaitDrain&&(!se._writableState||se._writableState.needDrain)&&E()}we.on("data",V);function V(ae){c("ondata");var ye=se.write(ae);c("dest.write",ye),ye===!1&&((H.pipesCount===1&&H.pipes===se||H.pipesCount>1&&Y(H.pipes,se)!==-1)&&!Q&&(c("false write response, pause",H.awaitDrain),H.awaitDrain++),we.pause())}function k(ae){c("onerror",ae),Z(),se.removeListener("error",k),e(se,"error")===0&&_(se,ae)}S(se,"error",k);function I(){se.removeListener("finish",$),Z()}se.once("close",I);function $(){c("onfinish"),se.removeListener("close",I),Z()}se.once("finish",$);function Z(){c("unpipe"),we.unpipe(se)}return se.emit("pipe",we),H.flowing||(c("pipe resume"),we.resume()),se};function q(se){return function(){var we=se._readableState;c("pipeOnDrain",we.awaitDrain),we.awaitDrain&&we.awaitDrain--,we.awaitDrain===0&&e(se,"data")&&(we.flowing=!0,ie(se))}}D.prototype.unpipe=function(se){var ue=this._readableState,we={hasUnpiped:!1};if(ue.pipesCount===0)return this;if(ue.pipesCount===1)return se&&se!==ue.pipes?this:(se||(se=ue.pipes),ue.pipes=null,ue.pipesCount=0,ue.flowing=!1,se&&se.emit("unpipe",this,we),this);if(!se){var H=ue.pipes,_e=ue.pipesCount;ue.pipes=null,ue.pipesCount=0,ue.flowing=!1;for(var K=0;K<_e;K++)H[K].emit("unpipe",this,{hasUnpiped:!1});return this}var U=Y(ue.pipes,se);return U===-1?this:(ue.pipes.splice(U,1),ue.pipesCount-=1,ue.pipesCount===1&&(ue.pipes=ue.pipes[0]),se.emit("unpipe",this,we),this)},D.prototype.on=function(se,ue){var we=t.prototype.on.call(this,se,ue),H=this._readableState;return se==="data"?(H.readableListening=this.listenerCount("readable")>0,H.flowing!==!1&&this.resume()):se==="readable"&&!H.endEmitted&&!H.readableListening&&(H.readableListening=H.needReadable=!0,H.flowing=!1,H.emittedReadable=!1,c("on readable",H.length,H.reading),H.length?j(this):H.reading||At.nextTick(re,this)),we},D.prototype.addListener=D.prototype.on,D.prototype.removeListener=function(se,ue){var we=t.prototype.removeListener.call(this,se,ue);return se==="readable"&&At.nextTick(B,this),we},D.prototype.removeAllListeners=function(se){var ue=t.prototype.removeAllListeners.apply(this,arguments);return(se==="readable"||se===void 0)&&At.nextTick(B,this),ue};function B(se){var ue=se._readableState;ue.readableListening=se.listenerCount("readable")>0,ue.resumeScheduled&&!ue.paused?ue.flowing=!0:se.listenerCount("data")>0&&se.resume()}function re(se){c("readable nexttick read 0"),se.read(0)}D.prototype.resume=function(){var se=this._readableState;return se.flowing||(c("resume"),se.flowing=!se.readableListening,le(this,se)),se.paused=!1,this};function le(se,ue){ue.resumeScheduled||(ue.resumeScheduled=!0,At.nextTick(ge,se,ue))}function ge(se,ue){c("resume",ue.reading),ue.reading||se.read(0),ue.resumeScheduled=!1,se.emit("resume"),ie(se),ue.flowing&&!ue.reading&&se.read(0)}D.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit
826("pause")),this._readableState.paused=!0,this};function ie(se){var ue=se._readableState;for(c("flow",ue.flowing);ue.flowing&&se.read()!==null;);}D.prototype.wrap=function(se){var ue=this,we=this._readableState,H=!1;se.on("end",function(){if(c("wrapped end"),we.decoder&&!we.ended){var U=we.decoder.end();U&&U.length&&ue.push(U)}ue.push(null)}),se.on("data",function(U){if(c("wrapped data"),we.decoder&&(U=we.decoder.write(U)),!(we.objectMode&&U==null)&&!(!we.objectMode&&(!U||!U.length))){var R=ue.push(U);R||(H=!0,se.pause())}});for(var _e in se)this[_e]===void 0&&typeof se[_e]=="function"&&(this[_e]=(function(R){return function(){return se[R].apply(se,arguments)}})(_e));for(var K=0;K<T.length;K++)se.on(T[K],this.emit.bind(this,T[K]));return this._read=function(U){c("wrapped _read",U),H&&(H=!1,se.resume())},this},typeof Symbol=="function"&&(D.prototype[Symbol.asyncIterator]=function(){return x===void 0&&(x=uW()),x(this)}),Object.defineProperty(D.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(D.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(D.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(ue){this._readableState&&(this._readableState.flowing=ue)}}),D._fromList=P,Object.defineProperty(D.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function P(se,ue){if(ue.length===0)return null;var we;return ue.objectMode?we=ue.buffer.shift():!se||se>=ue.length?(ue.decoder?we=ue.buffer.join(""):ue.buffer.length===1?we=ue.buffer.first():we=ue.buffer.concat(ue.length),ue.buffer.clear()):we=ue.buffer.consume(se,ue.decoder),we}function W(se){var ue=se._readableState;c("endReadable",ue.endEmitted),ue.endEmitted||(ue.ended=!0,At.nextTick(te,ue,se))}function te(se,ue){if(c("endReadableNT",se.endEmitted,se.length),!se.endEmitted&&se.length===0&&(se.endEmitted=!0,ue.readable=!1,ue.emit("end"),se.autoDestroy)){var we=ue._writableState;(!we||we.autoDestroy&&we.finished)&&ue.destroy()}}typeof Symbol=="function"&&(D.from=function(se,ue){return w===void 0&&(w=hW()),w(D,se,ue)});function Y(se,ue){for(var we=0,H=se.length;we<H;we++)if(se[we]===ue)return we;return-1}return d_}var f_,S5;function Y6(){if(S5)return f_;S5=1,f_=o;var s=Vp().codes,e=s.ERR_METHOD_NOT_IMPLEMENTED,t=s.ERR_MULTIPLE_CALLBACK,n=s.ERR_TRANSFORM_ALREADY_TRANSFORMING,r=s.ERR_TRANSFORM_WITH_LENGTH_0,i=Rp();jl()(o,i);function a(u,d){var h=this._transformState;h.transforming=!1;var f=h.writecb;if(f===null)return this.emit("error",new t);h.writechunk=null,h.writecb=null,d!=null&&this.push(d),f(u);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function o(u){if(!(this instanceof o))return new o(u);i.call(this,u),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",c)}function c(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(d,h){l(u,d,h)}):l(this,null,null)}o.prototype.push=function(u,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,u,d)},o.prototype._transform=function(u,d,h){h(new e("_transform()"))},o.prototype._write=function(u,d,h){var f=this._transformState;if(f.writecb=h,f.writechunk=u,f.writeencoding=d,!f.transforming){var p=this._readableState;(f.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},o.prototype._read=function(u){var d=this._transformState;d.writechunk!==null&&!d.transforming?(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform)):d.needTransform=!0},o.prototype._destroy=function(u,d){i.prototype._destroy.call(this,u,function(h){d(h)})};function l(u,d,h){if(d)return u.emit("error",d);if(h!=null&&u.push(h),u._writableState.length)throw new r;if(u._transformState.transforming)throw new n;return u.push(null)}return f_}var p_,E5;function dW(){if(E5)return p_;E5=1,p_=e;var s=Y6();jl()(e,s);function e(t){if(!(this instanceof e))return new e(t);s.call(this,t)}return e.prototype._transform=function(t,n,r){r(null,t)},p_}var g_,D5;function fW(){if(D5)return g_;D5=1;var s;function e(h){var f=!1;return function(){f||(f=!0,h.apply(void 0,arguments))}}var t=Vp().codes,n=t.ERR_MISSING_ARGS,r=t.ERR_STREAM_DESTROYED;function i(h){if(h)throw h}function a(h){return h.setHeader&&typeof h.abort=="function"}function o(h,f,p,y){y=e(y);var g=!1;h.on("close",function(){g=!0}),s===void 0&&(s=PD()),s(h,{readable:f,writable:p},function(v){if(v)return y(v);g=!0,y()});var b=!1;return function(v){if(!g&&!b){if(b=!0,a(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();y(v||new r("pipe"))}}}function c(h){h()}function l(h,f){return h.pipe(f)}function u(h){return!h.length||typeof h[h.length-1]!="function"?i:h.pop()}function d(){for(var h=arguments.length,f=new Array(h),p=0;p<h;p++)f[p]=arguments[p];var y=u(f);if(Array.isArray(f[0])&&(f=f[0]),f.length<2)throw new n("streams");var g,b=f.map(function(v,x){var w=x<f.length-1,_=x>0;return o(v,w,_,function(T){g||(g=T),T&&b.forEach(c),!w&&(b.forEach(c),y(g))})});return f.reduce(l)}return g_=d,g_}var m_,C5;function OD(){if(C5)return m_;C5=1,m_=t;var s=FD().EventEmitter,e=jl();e(t,s),t.Readable=q6(),t.Writable=G6(),t.Duplex=Rp(),t.Transform=Y6(),t.PassThrough=dW(),t.finished=PD(),t.pipeline=fW(),t.Stream=t;function t(){s.call(this)}return t.prototype.pipe=function(n,r){var i=this;function a(f){n.writable&&n.write(f)===!1&&i.pause&&i.pause()}i.on("data",a);function o(){i.readable&&i.resume&&i.resume()}n.on("drain",o),!n._isStdio&&(!r||r.end!==!1)&&(i.on("end",l),i.on("close",u));var c=!1;function l(){c||(c=!0,n.end())}function u(){c||(c=!0,typeof n.destroy=="function"&&n.destroy())}function d(f){if(h(),s.listenerCount(this,"error")===0)throw f}i.on("error",d),n.on("error",d);function h(){i.removeListener("data",a),n.removeListener("drain",o),i.removeListener("end",l),i.removeListener("close",u),i.removeListener("error",d),n.removeListener("error",d),i.removeListener("end",h),i.removeListener("close",h),n.removeListener("close",h)}return i.on("end",h),i.on("close",h),n.on("close",h),n.emit("pipe",i),n},m_}var A5;function pW(){return A5||(A5=1,(function(s){(function(e){e.parser=function(P,W){return new n(P,W)},e.SAXParser=n,e.SAXStream=u,e.createStream=l,e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(P,W){if(!(this instanceof n))return new n(P,W);var te=this;i(te),te.q=te.c="",te.bufferCheckPosition=e.MAX_BUFFER_LENGTH,te.opt=W||{},te.opt.lowercase=te.opt.lowercase||te.opt.lowercasetags,te.looseCase=te.opt.lowercase?"toLowerCase":"toUpperCase",te.tags=[],te.closed=te.closedRoot=te.sawRoot=!1,te.tag=te.error=null,te.strict=!!P,te.noscript=!!(P||te.opt.noscript),te.state=D.BEGIN,te.strictEntities=te.opt.strictEntities,te.ENTITIES=te.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),te.attribList=[],te.opt.xmlns&&(te.ns=Object.create(y)),te.trackPosition=te.opt.position!==!1,te.trackPosition&&(te.position=te.line=te.column=0),M(te,"onready")}Object.create||(Object.create=function(P){function W(){}W.prototype=P;var te=new W;return te}
vendor: 30,840 bytes, lines 826-836
826),Object.keys||(Object.keys=function(P){var W=[];for(var te in P)P.hasOwnProperty(te)&&W.push(te);return W});function r(P){for(var W=Math.max(e.MAX_BUFFER_LENGTH,10),te=0,Y=0,se=t.length;Y<se;Y++){var ue=P[t[Y]].length;if(ue>W)switch(t[Y]){case"textNode":L(P);break;case"cdata":F(P,"oncdata",P.cdata),P.cdata="";break;case"script":F(P,"onscript",P.script),P.script="";break;default:X(P,"Max buffer length exceeded: "+t[Y])}te=Math.max(te,ue)}var we=e.MAX_BUFFER_LENGTH-te;P.bufferCheckPosition=we+P.position}function i(P){for(var W=0,te=t.length;W<te;W++)P[t[W]]=""}function a(P){L(P),P.cdata!==""&&(F(P,"oncdata",P.cdata),P.cdata=""),P.script!==""&&(F(P,"onscript",P.script),P.script="")}n.prototype={end:function(){he(this)},write:ie,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){a(this)}};var o;try{o=OD().Stream}catch{o=function(){}}var c=e.EVENTS.filter(function(P){return P!=="error"&&P!=="end"});function l(P,W){return new u(P,W)}function u(P,W){if(!(this instanceof u))return new u(P,W);o.apply(this),this._parser=new n(P,W),this.writable=!0,this.readable=!0;var te=this;this._parser.onend=function(){te.emit("end")},this._parser.onerror=function(Y){te.emit("error",Y),te._parser.error=null},this._decoder=null,c.forEach(function(Y){Object.defineProperty(te,"on"+Y,{get:function(){return te._parser["on"+Y]},set:function(se){if(!se)return te.removeAllListeners(Y),te._parser["on"+Y]=se,se;te.on(Y,se)},enumerable:!0,configurable:!1})})}u.prototype=Object.create(o.prototype,{constructor:{value:u}}),u.prototype.write=function(P){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(P)){if(!this._decoder){var W=xE().StringDecoder;this._decoder=new W("utf8")}P=this._decoder.write(P)}return this._parser.write(P.toString()),this.emit("data",P),!0},u.prototype.end=function(P){return P&&P.length&&this.write(P),this._parser.end(),!0},u.prototype.on=function(P,W){var te=this;return!te._parser["on"+P]&&c.indexOf(P)!==-1&&(te._parser["on"+P]=function(){var Y=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Y.splice(0,0,P),te.emit.apply(te,Y)}),o.prototype.on.call(te,P,W)};var d="[CDATA[",h="DOCTYPE",f="http://www.w3.org/XML/1998/namespace",p="http://www.w3.org/2000/xmlns/",y={xml:f,xmlns:p},g=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,b=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,v=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,x=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function w(P){return P===" "||P===` 827`||P==="\r"||P===" "}function _(P){return P==='"'||P==="'"}function T(P){return P===">"||w(P)}function S(P,W){return P.test(W)}function C(P,W){return!S(P,W)}var D=0;e.STATE={BEGIN:D++,BEGIN_WHITESPACE:D++,TEXT:D++,TEXT_ENTITY:D++,OPEN_WAKA:D++,SGML_DECL:D++,SGML_DECL_QUOTED:D++,DOCTYPE:D++,DOCTYPE_QUOTED:D++,DOCTYPE_DTD:D++,DOCTYPE_DTD_QUOTED:D++,COMMENT_STARTING:D++,COMMENT:D++,COMMENT_ENDING:D++,COMMENT_ENDED:D++,CDATA:D++,CDATA_ENDING:D++,CDATA_ENDING_2:D++,PROC_INST:D++,PROC_INST_BODY:D++,PROC_INST_ENDING:D++,OPEN_TAG:D++,OPEN_TAG_SLASH:D++,ATTRIB:D++,ATTRIB_NAME:D++,ATTRIB_NAME_SAW_WHITE:D++,ATTRIB_VALUE:D++,ATTRIB_VALUE_QUOTED:D++,ATTRIB_VALUE_CLOSED:D++,ATTRIB_VALUE_UNQUOTED:D++,ATTRIB_VALUE_ENTITY_Q:D++,ATTRIB_VALUE_ENTITY_U:D++,CLOSE_TAG:D++,CLOSE_TAG_SAW_WHITE:D++,SCRIPT:D++,SCRIPT_ENDING:D++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(P){var W=e.ENTITIES[P],te=typeof W=="number"?String.fromCharCode(W):W;e.ENTITIES[P]=te});for(var N in e.STATE)e.STATE[e.STATE[N]]=N;D=e.STATE;function M(P,W,te){P[W]&&P[W](te)}function F(P,W,te){P.textNode&&L(P),M(P,W,te)}function L(P){P.textNode=A(P.opt,P.textNode),P.textNode&&M(P,"ontext",P.textNode),P.textNode=""}function A(P,W){return P.trim&&(W=W.trim()),P.normalize&&(W=W.replace(/\s+/g," ")),W}function X(P,W){return L(P),P.trackPosition&&(W+=` 828Line: `+P.line+` 829Column: `+P.column+` 830Char: `+P.c),W=new Error(W),P.error=W,M(P,"onerror",W),P}function he(P){return P.sawRoot&&!P.closedRoot&&j(P,"Unclosed root tag"),P.state!==D.BEGIN&&P.state!==D.BEGIN_WHITESPACE&&P.state!==D.TEXT&&X(P,"Unexpected end"),L(P),P.c="",P.closed=!0,M(P,"onend"),n.call(P,P.strict,P.opt),P}function j(P,W){if(typeof P!="object"||!(P instanceof n))throw new Error("bad call to strictFail");P.strict&&X(P,W)}function ee(P){P.strict||(P.tagName=P.tagName[P.looseCase]());var W=P.tags[P.tags.length-1]||P,te=P.tag={name:P.tagName,attributes:{}};P.opt.xmlns&&(te.ns=W.ns),P.attribList.length=0,F(P,"onopentagstart",te)}function O(P,W){var te=P.indexOf(":"),Y=te<0?["",P]:P.split(":"),se=Y[0],ue=Y[1];return W&&P==="xmlns"&&(se="xmlns",ue=""),{prefix:se,local:ue}}function pe(P){if(P.strict||(P.attribName=P.attribName[P.looseCase]()),P.attribList.indexOf(P.attribName)!==-1||P.tag.attributes.hasOwnProperty(P.attribName)){P.attribName=P.attribValue="";return}if(P.opt.xmlns){var W=O(P.attribName,!0),te=W.prefix,Y=W.local;if(te==="xmlns")if(Y==="xml"&&P.attribValue!==f)j(P,"xml: prefix must be bound to "+f+` 831Actual: `+P.attribValue);else if(Y==="xmlns"&&P.attribValue!==p)j(P,"xmlns: prefix must be bound to "+p+` 832Actual: `+P.attribValue);else{var se=P.tag,ue=P.tags[P.tags.length-1]||P;se.ns===ue.ns&&(se.ns=Object.create(ue.ns)),se.ns[Y]=P.attribValue}P.attribList.push([P.attribName,P.attribValue])}else P.tag.attributes[P.attribName]=P.attribValue,F(P,"onattribute",{name:P.attribName,value:P.attribValue});P.attribName=P.attribValue=""}function q(P,W){if(P.opt.xmlns){var te=P.tag,Y=O(P.tagName);te.prefix=Y.prefix,te.local=Y.local,te.uri=te.ns[Y.prefix]||"",te.prefix&&!te.uri&&(j(P,"Unbound namespace prefix: "+JSON.stringify(P.tagName)),te.uri=Y.prefix);var se=P.tags[P.tags.length-1]||P;te.ns&&se.ns!==te.ns&&Object.keys(te.ns).forEach(function(V){F(P,"onopennamespace",{prefix:V,uri:te.ns[V]})});for(var ue=0,we=P.attribList.length;ue<we;ue++){var H=P.attribList[ue],_e=H[0],K=H[1],U=O(_e,!0),R=U.prefix,E=U.local,Q=R===""?"":te.ns[R]||"",ce={name:_e,value:K,prefix:R,local:E,uri:Q};R&&R!=="xmlns"&&!Q&&(j(P,"Unbound namespace prefix: "+JSON.stringify(R)),ce.uri=R),P.tag.attributes[_e]=ce,F(P,"onattribute",ce)}P.attribList.length=0}P.tag.isSelfClosing=!!W,P.sawRoot=!0,P.tags.push(P.tag),F(P,"onopentag",P.tag),W||(!P.noscript&&P.tagName.toLowerCase()==="script"?P.state=D.SCRIPT:P.state=D.TEXT,P.tag=null,P.tagName=""),P.attribName=P.attribValue="",P.attribList.length=0}function B(P){if(!P.tagName){j(P,"Weird empty close tag."),P.textNode+="</>",P.state=D.TEXT;return}if(P.script){if(P.tagName!=="script"){P.script+="</"+P.tagName+">",P.tagName="",P.state=D.SCRIPT;return}F(P,"onscript",P.script),P.script=""}var W=P.tags.length,te=P.tagName;P.strict||(te=te[P.looseCase]());for(var Y=te;W--;){var se=P.tags[W];if(se.name!==Y)j(P,"Unexpected close tag");else break}if(W<0){j(P,"Unmatched closing tag: "+P.tagName),P.textNode+="</"+P.tagName+">",P.state=D.TEXT;return}P.tagName=te;for(var ue=P.tags.length;ue-- >W;){var we=P.tag=P.tags.pop();P.tagName=P.tag.name,F(P,"onclosetag",P.tagName);var H={};for(var _e in we.ns)H[_e]=we.ns[_e];var K=P.tags[P.tags.length-1]||P;P.opt.xmlns&&we.ns!==K.ns&&Object.keys(we.ns).forEach(function(U){var R=we.ns[U];F(P,"onclosenamespace",{prefix:U,uri:R})})}W===0&&(P.closedRoot=!0),P.tagName=P.attribValue=P.attribName="",P.attribList.length=0,P.state=D.TEXT}function re(P){var W=P.entity,te=W.toLowerCase(),Y,se="";return P.ENTITIES[W]?P.ENTITIES[W]:P.ENTITIES[te]?P.ENTITIES[te]:(W=te,W.charAt(0)==="#"&&(W.charAt(1)==="x"?(W=W.slice(2),Y=parseInt(W,16),se=Y.toString(16)):(W=W.slice(1),Y=parseInt(W,10),se=Y.toString(10))),W=W.replace(/^0+/,""),isNaN(Y)||se.toLowerCase()!==W?(j(P,"Invalid character entity"),"&"+P.entity+";"):String.fromCodePoint(Y))}function le(P,W){W==="<"?(P.state=D.OPEN_WAKA,P.startTagPosition=P.position):w(W)||(j(P,"Non-whitespace before first tag."),P.textNode=W,P.state=D.TEXT)}function ge(P,W){var te="";return W<P.length&&(te=P.charAt(W)),te}function ie(P){var W=this;if(this.error)throw this.error;if(W.closed)return X(W,"Cannot write after close. Assign an onready handler.");if(P===null)return he(W);typeof P=="object"&&(P=P.toString());for(var te=0,Y="";Y=ge(P,te++),W.c=Y,!!Y;)switch(W.trackPosition&&(W.position++,Y===` 833`?(W.line++,W.column=0):W.column++),W.state){case D.BEGIN:if(W.state=D.BEGIN_WHITESPACE,Y==="\uFEFF")continue;le(W,Y);continue;case D.BEGIN_WHITESPACE:le(W,Y);continue;case D.TEXT:if(W.sawRoot&&!W.closedRoot){for(var se=te-1;Y&&Y!=="<"&&Y!=="&";)Y=ge(P,te++),Y&&W.trackPosition&&(W.position++,Y===` 834`?(W.line++,W.column=0):W.column++);W.textNode+=P.substring(se,te-1)}Y==="<"&&!(W.sawRoot&&W.closedRoot&&!W.strict)?(W.state=D.OPEN_WAKA,W.startTagPosition=W.position):(!w(Y)&&(!W.sawRoot||W.closedRoot)&&j(W,"Text data outside of root node."),Y==="&"?W.state=D.TEXT_ENTITY:W.textNode+=Y);continue;case D.SCRIPT:Y==="<"?W.state=D.SCRIPT_ENDING:W.script+=Y;continue;case D.SCRIPT_ENDING:Y==="/"?W.state=D.CLOSE_TAG:(W.script+="<"+Y,W.state=D.SCRIPT);continue;case D.OPEN_WAKA:if(Y==="!")W.state=D.SGML_DECL,W.sgmlDecl="";else if(!w(Y))if(S(g,Y))W.state=D.OPEN_TAG,W.tagName=Y;else if(Y==="/")W.state=D.CLOSE_TAG,W.tagName="";else if(Y==="?")W.state=D.PROC_INST,W.procInstName=W.procInstBody="";else{if(j(W,"Unencoded <"),W.startTagPosition+1<W.position){var ue=W.position-W.startTagPosition;Y=new Array(ue).join(" ")+Y}W.textNode+="<"+Y,W.state=D.TEXT}continue;case D.SGML_DECL:(W.sgmlDecl+Y).toUpperCase()===d?(F(W,"onopencdata"),W.state=D.CDATA,W.sgmlDecl="",W.cdata=""):W.sgmlDecl+Y==="--"?(W.state=D.COMMENT,W.comment="",W.sgmlDecl=""):(W.sgmlDecl+Y).toUpperCase()===h?(W.state=D.DOCTYPE,(W.doctype||W.sawRoot)&&j(W,"Inappropriately located doctype declaration"),W.doctype="",W.sgmlDecl=""):Y===">"?(F(W,"onsgmldeclaration",W.sgmlDecl),W.sgmlDecl="",W.state=D.TEXT):(_(Y)&&(W.state=D.SGML_DECL_QUOTED),W.sgmlDecl+=Y);continue;case D.SGML_DECL_QUOTED:Y===W.q&&(W.state=D.SGML_DECL,W.q=""),W.sgmlDecl+=Y;continue;case D.DOCTYPE:Y===">"?(W.state=D.TEXT,F(W,"ondoctype",W.doctype),W.doctype=!0):(W.doctype+=Y,Y==="["?W.state=D.DOCTYPE_DTD:_(Y)&&(W.state=D.DOCTYPE_QUOTED,W.q=Y));continue;case D.DOCTYPE_QUOTED:W.doctype+=Y,Y===W.q&&(W.q="",W.state=D.DOCTYPE);continue;case D.DOCTYPE_DTD:W.doctype+=Y,Y==="]"?W.state=D.DOCTYPE:_(Y)&&(W.state=D.DOCTYPE_DTD_QUOTED,W.q=Y);continue;case D.DOCTYPE_DTD_QUOTED:W.doctype+=Y,Y===W.q&&(W.state=D.DOCTYPE_DTD,W.q="");continue;case D.COMMENT:Y==="-"?W.state=D.COMMENT_ENDING:W.comment+=Y;continue;case D.COMMENT_ENDING:Y==="-"?(W.state=D.COMMENT_ENDED,W.comment=A(W.opt,W.comment),W.comment&&F(W,"oncomment",W.comment),W.comment=""):(W.comment+="-"+Y,W.state=D.COMMENT);continue;case D.COMMENT_ENDED:Y!==">"?(j(W,"Malformed comment"),W.comment+="--"+Y,W.state=D.COMMENT):W.state=D.TEXT;continue;case D.CDATA:Y==="]"?W.state=D.CDATA_ENDING:W.cdata+=Y;continue;case D.CDATA_ENDING:Y==="]"?W.state=D.CDATA_ENDING_2:(W.cdata+="]"+Y,W.state=D.CDATA);continue;case D.CDATA_ENDING_2:Y===">"?(W.cdata&&F(W,"oncdata",W.cdata),F(W,"onclosecdata"),W.cdata="",W.state=D.TEXT):Y==="]"?W.cdata+="]":(W.cdata+="]]"+Y,W.state=D.CDATA);continue;case D.PROC_INST:Y==="?"?W.state=D.PROC_INST_ENDING:w(Y)?W.state=D.PROC_INST_BODY:W.procInstName+=Y;continue;case D.PROC_INST_BODY:if(!W.procInstBody&&w(Y))continue;Y==="?"?W.state=D.PROC_INST_ENDING:W.procInstBody+=Y;continue;case D.PROC_INST_ENDING:Y===">"?(F(W,"onprocessinginstruction",{name:W.procInstName,body:W.procInstBody}),W.procInstName=W.procInstBody="",W.state=D.TEXT):(W.procInstBody+="?"+Y,W.state=D.PROC_INST_BODY);continue;case D.OPEN_TAG:S(b,Y)?W.tagName+=Y:(ee(W),Y===">"?q(W):Y==="/"?W.state=D.OPEN_TAG_SLASH:(w(Y)||j(W,"Invalid character in tag name"),W.state=D.ATTRIB));continue;case D.OPEN_TAG_SLASH:Y===">"?(q(W,!0),B(W)):(j(W,"Forward-slash in opening tag not followed by >"),W.state=D.ATTRIB);continue;case D.ATTRIB:if(w(Y))continue;Y===">"?q(W):Y==="/"?W.state=D.OPEN_TAG_SLASH:S(g,Y)?(W.attribName=Y,W.attribValue="",W.state=D.ATTRIB_NAME):j(W,"Invalid attribute name");continue;case D.ATTRIB_NAME:Y==="="?W.state=D.ATTRIB_VALUE:Y===">"?(j(W,"Attribute without value"),W.attribValue=W.attribName,pe(W),q(W)):w(Y)?W.state=D.ATTRIB_NAME_SAW_WHITE:S(b,Y)?W.attribName+=Y:j(W,"Invalid attribute name");continue;case D.ATTRIB_NAME_SAW_WHITE:if(Y==="=")W.state=D.ATTRIB_VALUE;else{if(w(Y))continue;j(W,"Attribute without value"),W.tag.attributes[W.attribName]="",W.attribValue="",F(W,"onattribute",{name:W.attribName,value:""}),W.attribName="",Y===">"?q(W):S(g,Y)?(W.attribName=Y,W.state=D.ATTRIB_NAME):(j(W,"Invalid attribute name"),W.state=D.ATTRIB)}continue;case D.ATTRIB_VALUE:if(w(Y))continue;_(Y)?(W.q=Y,W.state=D.ATTRIB_VALUE_QUOTED):(j(W,"Unquoted attribute value"),W.state=D.ATTRIB_VALUE_UNQUOTED,W.attribValue=Y);continue;case D.ATTRIB_VALUE_QUOTED:if(Y!==W.q){Y==="&"?W.state=D.ATTRIB_VALUE_ENTITY_Q:W.attribValue+=Y;continue}pe(W),W.q="",W.state=D.ATTRIB_VALUE_CLOSED;continue;case D.ATTRIB_VALUE_CLOSED:w(Y)?W.state=D.ATTRIB:Y===">"?q(W):Y==="/"?W.state=D.OPEN_TAG_SLASH:S(g,Y)?(j(W,"No whitespace between attributes"),W.attribName=Y,W.attribValue="",W.state=D.ATTRIB_NAME):j(W,"Invalid attribute name");continue;case D.ATTRIB_VALUE_UNQUOTED:if(!T(Y)){Y==="&"?W.state=D.ATTRIB_VALUE_ENTITY_U:W.attribValue+=Y;continue}pe(W),Y===">"?q(W):W.state=D.ATTRIB;continue;case D.CLOSE_TAG:if(W.tagName)Y===">"?B(W):S(b,Y)?W.tagName+=Y:W.script?(W.script+="</"+W.tagName,W.tagName="",W.state=D.SCRIPT):(w(Y)||j(W,"Invalid tagname in closing tag"),W.state=D.CLOSE_TAG_SAW_WHITE);else{if(w(Y))continue;C(g,Y)?W.script?(W.script+="</"+Y,W.state=D.SCRIPT):j(W,"Invalid tagname in closing tag."):W.tagName=Y}continue;case D.CLOSE_TAG_SAW_WHITE:if(w(Y))continue;Y===">"?B(W):j(W,"Invalid characters in closing tag");continue;case D.TEXT_ENTITY:case D.ATTRIB_VALUE_ENTITY_Q:case D.ATTRIB_VALUE_ENTITY_U:var we,H;switch(W.state){case D.TEXT_ENTITY:we=D.TEXT,H="textNode";break;case D.ATTRIB_VALUE_ENTITY_Q:we=D.ATTRIB_VALUE_QUOTED,H="attribValue";break;case D.ATTRIB_VALUE_ENTITY_U:we=D.ATTRIB_VALUE_UNQUOTED,H="attribValue";break}Y===";"?(W[H]+=re(W),W.entity="",W.state=we):S(W.entity.length?x:v,Y)?W.entity+=Y:(j(W,"Invalid character in entity name"),W[H]+="&"+W.entity+Y,W.entity="",W.state=we);continue;default:throw new Error(W,"Unknown state: "+W.state)}return W.position>=W.bufferCheckPosition&&r(W),W}String.fromCodePoint||(function(){var P=String.fromCharCode,W=Math.floor,te=function(){var Y=16384,se=[],ue,we,H=-1,_e=arguments.length;if(!_e)return"";for(var K="";++H<_e;){var U=Number(arguments[H]);if(!isFinite(U)||U<0||U>1114111||W(U)!==U)throw RangeError("Invalid code point: "+U);U<=65535?se.push(U):(U-=65536,ue=(U>>10)+55296,we=U%1024+56320,se.push(ue,we)),(H+1===_e||se.length>Y)&&(K+=P.apply(null,se),se.length=0)}return K};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:te,configurable:!0,writable:!0}):String.fromCodePoint=te})()})(s)})(ex)),ex}var y_,k5;function LD(){return k5||(k5=1,y_={isArray:function(s){return Array.isArray?Array.isArray(s):Object.prototype.toString.call(s)==="[object Array]"}}),y_}var b_,N5;function BD(){if(N5)return b_;N5=1;var s=LD().isArray;return b_={copyOptions:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n},ensureFlagExists:function(e,t){(!(e in t)||typeof t[e]!="boolean")&&(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||typeof e.spaces!="number"&&typeof e.spaces!="string")&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){(!("alwaysArray"in e)||typeof e.alwaysArray!="boolean"&&!s(e.alwaysArray))&&(e.alwaysArray=!1)},ensureKeyExists:function(e,t){(!(e+"Key"in t)||typeof t[e+"Key"]!="string")&&(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}},b_}var v_,F5;function Z6(){if(F5)return v_;F5=1;var s=pW(),e=BD(),t=LD().isArray,n,r;function i(b){return n=e.copyOptions(b),e.ensureFlagExists("ignoreDeclaration",n),e.ensureFlagExists("ignoreInstruction",n),e.ensureFlagExists("ignoreAttributes",n),e.ensureFlagExists("ignoreText",n),e.ensureFlagExists("ignoreComment",n),e.ensureFlagExists("ignoreCdata",n),e.ensureFlagExists("ignoreDoctype",n),e.ensureFlagExists("compact",n),e.ensureFlagExists("alwaysChildren",n),e.ensureFlagExists("addParent",n),e.ensureFlagExists("trim",n),e.ensureFlagExists("nativeType",n),e.ensureFlagExists("nativeTypeAttributes",n),e.ensureFlagExists("sanitize",n),e.ensureFlagExists("instructionHasAttributes",n),e.ensureFlagExists("captureSpacesBetweenElements",n),e.ensureAlwaysArrayExists(n),e.ensureKeyExists("declaration",n),e.ensureKeyExists("instruction",n),e.ensureKeyExists("attributes",n),e.ensureKeyExists("text",n),e.ensureKeyExists("comment",n),e.ensureKeyExists("cdata",n),e.ensureKeyExists("doctype",n),e.ensureKeyExists("type",n),e.ensureKeyExists("name",n),e.ensureKeyExists("elements",n),e.ensureKeyExists("parent",n),e.checkFnExists("doctype",n),e.checkFnExists("instruction",n),e.checkFnExists("cdata",n),e.checkFnExists("comment",n),e.checkFnExists("text",n),e.checkFnExists("instructionName",n),e.checkFnExists("elementName",n),e.checkFnExists("attributeName",n),e.checkFnExists("attributeValue",n),e.checkFnExists("attributes",n),n}function a(b){var v=Number(b);if(!isNaN(v))return v;var x=b.toLowerCase();return x==="true"?!0:x==="false"?!1:b}function o(b,v){var x;if(n.compact){if(!r[n[b+"Key"]]&&(t(n.alwaysArray)?n.alwaysArray.indexOf(n[b+"Key"])!==-1:n.alwaysArray)&&(r[n[b+"Key"]]=[]),r[n[b+"Key"]]&&!t(r[n[b+"Key"]])&&(r[n[b+"Key"]]=[r[n[b+"Key"]]]),b+"Fn"in n&&typeof v=="string"&&(v=n[b+"Fn"](v,r)),b==="instruction"&&("instructionFn"in n||"instructionNameFn"in n)){for(x in v)if(v.hasOwnProperty(x))if("instructionFn"in n)v[x]=n.instructionFn(v[x],x,r);else{var w=v[x];delete v[x],v[n.instructionNameFn(x,w,r)]=w}}t(r[n[b+"Key"]])?r[n[b+"Key"]].push(v):r[n[b+"Key"]]=v}else{r[n.elementsKey]||(r[n.elementsKey]=[]);var _={};if(_[n.typeKey]=b,b==="instruction"){for(x in v)if(v.hasOwnProperty(x))break;_[n.nameKey]="instructionNameFn"in n?n.instructionNameFn(x,v,r):x,n.instructionHasAttributes?(_[n.attributesKey]=v[x][n.attributesKey],"instructionFn"in n&&(_[n.attributesKey]=n.instructionFn(_[n.attributesKey],x,r))):("instructionFn"in n&&(v[x]=n.instructionFn(v[x],x,r)),_[n.instructionKey]=v[x])}else b+"Fn"in n&&(v=n[b+"Fn"](v,r)),_[n[b+"Key"]]=v;n.addParent&&(_[n.parentKey]=r),r[n.elementsKey].push(_)}}function c(b){if("attributesFn"in n&&b&&(b=n.attributesFn(b,r)),(n.trim||"attributeValueFn"in n||"attributeNameFn"in n||n.nativeTypeAttributes)&&b){var v;for(v in b)if(b.hasOwnProperty(v)&&(n.trim&&(b[v]=b[v].trim()),n.nativeTypeAttributes&&(b[v]=a(b[v])),"attributeValueFn"in n&&(b[v]=n.attributeValueFn(b[v],v,r)),"attributeNameFn"in n)){var x=b[v];delete b[v],b[n.attributeNameFn(v,b[v],r)]=x}}return b}function l(b){var v={};if(b.body&&(b.name.toLowerCase()==="xml"||n.instructionHasAttributes)){for(var x=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,w;(w=x.exec(b.body))!==null;)v[w[1]]=w[2]||w[3]||w[4];v=c(v)}if(b.name.toLowerCase()==="xml"){if(n.ignoreDeclaration)return;r[n.declarationKey]={},Object.keys(v).length&&(r[n.declarationKey][n.attributesKey]=v),n.addParent&&(r[n.declarationKey][n.parentKey]=r)}else{if(n.ignoreInstruction)return;n.trim&&(b.body=b.body.trim());var _={};n.instructionHasAttributes&&Object.keys(v).length?(_[b.name]={},_[b.name][n.attributesKey]=v):_[b.name]=b.body,o("instruction",_)}}function u(b,v){var x;if(typeof b=="object"&&(v=b.attributes,b=b.name),v=c(v),"elementNameFn"in n&&(b=n.elementNameFn(b,r)),n.compact){if(x={},!n.ignoreAttributes&&v&&Object.keys(v).length){x[n.attributesKey]={};var w;for(w in v)v.hasOwnProperty(w)&&(x[n.attributesKey][w]=v[w])}!(b in r)&&(t(n.alwaysArray)?n.alwaysArray.indexOf(b)!==-1:n.alwaysArray)&&(r[b]=[]),r[b]&&!t(r[b])&&(r[b]=[r[b]]),t(r[b])?r[b].push(x):r[b]=x}else r[n.elementsKey]||(r[n.elementsKey]=[]),x={},x[n.typeKey]="element",x[n.nameKey]=b,!n.ignoreAttributes&&v&&Object.keys(v).length&&(x[n.attributesKey]=v),n.alwaysChildren&&(x[n.elementsKey]=[]),r[n.elementsKey].push(x);x[n.parentKey]=r,r=x}function d(b){n.ignoreText||!b.trim()&&!n.captureSpacesBetweenElements||(n.trim&&(b=b.trim()),n.nativeType&&(b=a(b)),n.sanitize&&(b=b.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")),o("text",b))}function h(b){n.ignoreComment||(n.trim&&(b=b.trim()),o("comment",b))}function f(b){var v=r[n.parentKey];n.addParent||delete r[n.parentKey],r=v}function p(b){n.ignoreCdata||(n.trim&&(b=b.trim()),o("cdata",b))}function y(b){n.ignoreDoctype||(b=b.replace(/^ /,""),n.trim&&(b=b.trim()),o("doctype",b))}function g(b){b.note=b}return v_=function(b,v){var x=s.parser(!0,{}),w={};if(r=w,n=i(v),x.opt={strictEntities:!0},x.onopentag=u,x.ontext=d,x.oncomment=h,x.onclosetag=f,x.onerror=g,x.oncdata=p,x.ondoctype=y,x.onprocessinginstruction=l,x.write(b).close(),w[n.elementsKey]){var _=w[n.elementsKey];delete w[n.elementsKey],w[n.elementsKey]=_,delete w.text}return w},v_}var w_,U5;function gW(){if(U5)return w_;U5=1;var s=BD(),e=Z6();function t(n){var r=s.copyOptions(n);return s.ensureSpacesExists(r),r}return w_=function(n,r){var i,a,o,c;return i=t(r),a=e(n,i),c="compact"in i&&i.compact?"_parent":"parent","addParent"in i&&i.addParent?o=JSON.stringify(a,function(l,u){return l===c?"_":u},i.spaces):o=JSON.stringify(a,null,i.spaces),o.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},w_}var x_,R5;function J6(){if(R5)return x_;R5=1;var s=BD(),e=LD().isArray,t,n;function r(x){var w=s.copyOptions(x);return s.ensureFlagExists("ignoreDeclaration",w),s.ensureFlagExists("ignoreInstruction",w),s.ensureFlagExists("ignoreAttributes",w),s.ensureFlagExists("ignoreText",w),s.ensureFlagExists("ignoreComment",w),s.ensureFlagExists("ignoreCdata",w),s.ensureFlagExists("ignoreDoctype",w),s.ensureFlagExists("compact",w),s.ensureFlagExists("indentText",w),s.ensureFlagExists("indentCdata",w),s.ensureFlagExists("indentAttributes",w),s.ensureFlagExists("indentInstruction",w),s.ensureFlagExists("fullTagEmptyElement",w),s.ensureFlagExists("noQuotesForNativeAttributes",w),s.ensureSpacesExists(w),typeof w.spaces=="number"&&(w.spaces=Array(w.spaces+1).join(" ")),s.ensureKeyExists("declaration",w),s.ensureKeyExists("instruction",w),s.ensureKeyExists("attributes",w),s.ensureKeyExists("text",w),s.ensureKeyExists("comment",w),s.ensureKeyExists("cdata",w),s.ensureKeyExists("doctype",w),s.ensureKeyExists("type",w),s.ensureKeyExists("name",w),s.ensureKeyExists("elements",w),s.checkFnExists("doctype",w),s.checkFnExists("instruction",w),s.checkFnExists("cdata",w),s.checkFnExists("comment",w),s.checkFnExists("text",w),s.checkFnExists("instructionName",w),s.checkFnExists("elementName",w),s.checkFnExists("attributeName",w),s.checkFnExists("attributeValue",w),s.checkFnExists("attributes",w),s.checkFnExists("fullTagEmptyElement",w),w}function i(x,w,_){return(!_&&x.spaces?` 835`:"")+Array(w+1).join(x.spaces)}function a(x,w,_){if(w.ignoreAttributes)return"";"attributesFn"in w&&(x=w.attributesFn(x,n,t));var T,S,C,D,N=[];for(T in x)x.hasOwnProperty(T)&&x[T]!==null&&x[T]!==void 0&&(D=w.noQuotesForNativeAttributes&&typeof x[T]!="string"?"":'"',S=""+x[T],S=S.replace(/"/g,"""),C="attributeNameFn"in w?w.attributeNameFn(T,S,n,t):T,N.push(w.spaces&&w.indentAttributes?i(w,_+1,!1):" "),N.push(C+"="+D+("attributeValueFn"in w?w.attributeValueFn(S,T,n,t):S)+D));return x&&Object.keys(x).length&&w.spaces&&w.indentAttributes&&N.push(i(w,_,!1)),N.join("")}function o(x,w,_){return t=x,n="xml",w.ignoreDeclaration?"":"<?xml"+a(x[w.attributesKey],w,_)+"?>"}function c(x,w,_){if(w.ignoreInstruction)return"";var T;for(T in x)if(x.hasOwnProperty(T))break;var S="instructionNameFn"in w?w.instructionNameFn(T,x[T],n,t):T;if(typeof x[T]=="object")return t=x,n=S,"<?"+S+a(x[T][w.attributesKey],w,_)+"?>";var C=x[T]?x[T]:"";return"instructionFn"in w&&(C=w.instructionFn(C,T,n,t)),"<?"+S+(C?" "+C:"")+"?>"}function l(x,w){return w.ignoreComment?"":"<!--"+("commentFn"in w?w.commentFn(x,n,t):x)+"-->"}function u(x,w){return w.ignoreCdata?"":"<![CDATA["+("cdataFn"in w?w.cdataFn(x,n,t):x.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function d(x,w){return w.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in w?w.doctypeFn(x,n,t):x)+">"}function h(x,w){return w.ignoreText?"":(x=""+x,x=x.replace(/&/g,"&"),x=x.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"textFn"in w?w.textFn(x,n,t):x)}function f(x,w){var _;if(x.elements&&x.elements.length)for(_=0;_<x.elements.length;++_)switch(x.elements[_][w.typeKey]){case"text":if(w.indentText)return!0;break;case"cdata":if(w.indentCdata)return!0;break;case"instruction":if(w.indentInstruction)return!0;break;case"doctype":case"comment":case"element":return!0;default:return!0}return!1}function p(x,w,_){t=x,n=x.name;var T=[],S="elementNameFn"in w?w.elementNameFn(x.name,x):x.name;T.push("<"+S),x[w.attributesKey]&&T.push(a(x[w.attributesKey],w,_));var C=x[w.elementsKey]&&x[w.elementsKey].length||x[w.attributesKey]&&x[w.attributesKey]["xml:space"]==="preserve";return C||("fullTagEmptyElementFn"in w?C=w.fullTagEmptyElementFn(x.name,x):C=w.fullTagEmptyElement),C?(T.push(">"),x[w.elementsKey]&&x[w.elementsKey].length&&(T.push(y(x[w.elementsKey],w,_+1)),t=x,n=x.name),T.push(w.spaces&&f(x,w)?` 836`+Array(_+1).join(w.spaces):""),T.push("</"+S+">")):T.push("/>"),T.join("")}function y(x,w,_,T){return x.reduce(function(S,C){var D=i(w,_,T&&!S);switch(C.type){case"element":return S+D+p(C,w,_);case"comment":return S+D+l(C[w.commentKey],w);case"doctype":return S+D+d(C[w.doctypeKey],w);case"cdata":return S+(w.indentCdata?D:"")+u(C[w.cdataKey],w);case"text":return S+(w.indentText?D:"")+h(C[w.textKey],w);case"instruction":var N={};return N[C[w.nameKey]]=C[w.attributesKey]?C:C[w.instructionKey],S+(w.indentInstruction?D:"")+c(N,w,_)}},"")}function g(x,w,_){var T;for(T in x)if(x.hasOwnProperty(T))switch(T){case w.parentKey:case w.attributesKey:break;case w.textKey:if(w.indentText||_)return!0;break;case w.cdataKey:if(w.indentCdata||_)return!0;break;case w.instructionKey:if(w.indentInstruction||_)return!0;break;case w.doctypeKey:case w.commentKey:return!0;default:return!0}return!1}function b(x,w,_,T,S){t=x,n=w;var C="elementNameFn"in _?_.elementNameFn(w,x):w;if(typeof x>"u"||x===null||x==="")return"fullTagEmptyElementFn"in _&&_.fullTagEmptyElementFn(w,x)||_.fullTagEmptyElement?"<"+C+"></"+C+">":"<"+C+"/>";var D=[];if(w){if(D.push("<"+C),typeof x!="object")return D.push(">"+h(x,_)+"</"+C+">"),D.join("");x[_.attributesKey]&&D.push(a(x[_.attributesKey],_,T));var N=g(x,_,!0)||x[_.attributesKey]&&x[_.attributesKey]["xml:space"]==="preserve";if(N||("fullTagEmptyElementFn"in _?N=_.fullTagEmptyElementFn(w,x):N=_.fullTagEmptyElement),N)D.push(">");else return D.push("/>"),D.join("")}return D.push(v(x,_,T+1,!1)),t=x,n=w,w&&D.push((S?i(_,T,!1):"")+"</"+C+">"),D.join("")}function v(x,w,_,T){var S,C,D,N=[];for(C in x)if(x.hasOwnProperty(C))for(D=e(x[C])?x[C]:[x[C]],S=0;S<D.length;++S){switch(C){case w.declarationKey:N.push(o(D[S],w,_));break;case w.instructionKey:N.push((w.indentInstruction?i(w,_,T):"")+c(D[S],w,_));break;case w.attributesKey:case w.parentKey:break;case w.textKey:N.push((w.indentText?i(w,_,T):"")+h(D[S],w));break;case w.cdataKey:N.push((w.indentCdata?i(w,_,T):"")+u(D[S],w));break;case w.doctypeKey:N.push(i(w,_,T)+d(D[S],w));break;case w.commentKey:N.push(i(w,_,T)+l(D[S],w));break;default:N.push(i(w,_,T)+b(D[S],C,w,_,g(D[S],w)))}T=T&&!N.length}return N.join("")}return x_=function(x,w){w=r(w);var _=[];return t=x,n="_root_",w.compact?_.push(v(x,w,0,!0)):(x[w.declarationKey]&&_.push(o(x[w.declarationKey],w,0)),x[w.elementsKey]&&x[w.elementsKey].length&&_.push(y(x[w.elementsKey],w,0,!_.length))),_.join("")},x_}var __,I5;function mW(){if(I5)return __;I5=1;var s=J6();return __=function(e,t){e instanceof Buffer&&(e=e.toString());var n=null;if(typeof e=="string")try{n=JSON.parse(e)}
836catch{throw new Error("The JSON structure is invalid")}else n=e;return s(n,t)},__}var T_,M5;function yW(){if(M5)return T_;M5=1;var s=Z6(),e=gW(),t=J6(),n=mW();return T_={xml2js:s,xml2json:e,js2xml:t,json2xml:n},T_}var Q6=yW();const WD=s=>{switch(s.type){case void 0:case"element":const e=new vW(s.name,s.attributes),t=s.elements||[];for(const n of t){const r=WD(n);r!==void 0&&e.push(r)}return e;case"text":return s.text;default:return}};class bW extends Nt{}class vW extends $e{static fromXmlString(e){const t=Q6.xml2js(e,{compact:!1});return WD(t)}constructor(e,t){super(e),t&&this.root.push(new bW(t))}push(e){this.root.push(e)}}class wW extends $e{constructor(e){super(""),this._attr=e}prepForXml(e){return{_attr:this._attr}}}class e8 extends $e{constructor(e,t){super(e),t&&(this.root=t.root)}}const zr=s=>{if(isNaN(s))throw new Error(`Invalid value '${s}' specified. Must be an integer.`);return Math.floor(s)},rw=s=>{const e=zr(s);if(e<0)throw new Error(`Invalid value '${s}' specified. Must be a positive integer.`);return e},t8=(s,e)=>{const t=e*2;if(s.length!==t||isNaN(+`0x${s}`))throw new Error(`Invalid hex value '${s}'. Expected ${t} digit hex value`);return s},P5=s=>t8(s,1),jD=s=>{const e=s.slice(-2),t=s.substring(0,s.length-2);return`${Number(t)}${e}`},n8=s=>{const e=jD(s);if(parseFloat(e)<0)throw new Error(`Invalid value '${e}' specified. Expected a positive number.`);return e},Ip=s=>{if(s==="auto")return s;const e=s.charAt(0)==="#"?s.substring(1):s;return t8(e,3)},rc=s=>typeof s=="string"?jD(s):zr(s),xW=s=>typeof s=="string"?n8(s):rw(s),Ar=s=>typeof s=="string"?n8(s):rw(s),_W=s=>{const e=s.substring(0,s.length-1);return`${Number(e)}%`},r8=s=>typeof s=="number"?zr(s):s.slice(-1)==="%"?_W(s):jD(s),TW=rw,SW=rw,EW=s=>s.toISOString();class je extends $e{constructor(e,t=!0){super(e),t!==!0&&this.root.push(new $r({val:t}))}}class S_ extends $e{constructor(e,t){super(e),this.root.push(new $r({val:xW(t)}))}}class DW extends $e{}class Ih extends $e{constructor(e,t){super(e),this.root.push(new $r({val:t}))}}const ag=(s,e)=>new gt({name:s,attributes:{value:{key:"w:val",value:e}}});class qg extends $e{constructor(e,t){super(e),this.root.push(new $r({val:t}))}}class ql extends $e{constructor(e,t){super(e),this.root.push(t)}}class gt extends $e{constructor({name:e,attributes:t,children:n}){super(e),t&&this.root.push(new x9(t)),n&&this.root.push(...n)}}const Bn={START:"start",CENTER:"center",LEFT:"left",RIGHT:"right",JUSTIFIED:"both"},i8=s=>new gt({name:"w:jc",attributes:{val:{key:"w:val",value:s}}}),En=(s,{color:e,size:t,space:n,style:r})=>new gt({name:s,attributes:{style:{key:"w:val",value:r},color:{key:"w:color",value:e===void 0?void 0:Ip(e)},size:{key:"w:sz",value:t===void 0?void 0:TW(t)},space:{key:"w:space",value:n===void 0?void 0:SW(n)}}}),hu={SINGLE:"single",NONE:"none"};class CW extends Wl{constructor(e){super("w:pBdr"),e.top&&this.root.push(En("w:top",e.top)),e.bottom&&this.root.push(En("w:bottom",e.bottom)),e.left&&this.root.push(En("w:left",e.left)),e.right&&this.root.push(En("w:right",e.right)),e.between&&this.root.push(En("w:between",e.between))}}class AW extends $e{constructor(){super("w:pBdr");const e=En("w:bottom",{color:"auto",space:1,style:hu.SINGLE,size:6});this.root.push(e)}}const kW=({start:s,end:e,left:t,right:n,hanging:r,firstLine:i})=>new gt({name:"w:ind",attributes:{start:{key:"w:start",value:s===void 0?void 0:rc(s)},end:{key:"w:end",value:e===void 0?void 0:rc(e)},left:{key:"w:left",value:t===void 0?void 0:rc(t)},right:{key:"w:right",value:n===void 0?void 0:rc(n)},hanging:{key:"w:hanging",value:r===void 0?void 0:Ar(r)},firstLine:{key:"w:firstLine",value:i===void 0?void 0:Ar(i)}}}),NW=()=>new gt({name:"w:br"}),zD={BEGIN:"begin",END:"end",SEPARATE:"separate"},HD=(s,e)=>new gt({name:"w:fldChar",attributes:{type:{key:"w:fldCharType",value:s},dirty:{key:"w:dirty",value:e}}}),n0=s=>HD(zD.BEGIN,s),r0=s=>HD(zD.SEPARATE,s),i0=s=>HD(zD.END,s),E_={DECIMAL:"decimal",LOWER_ROMAN:"lowerRoman",LOWER_LETTER:"lowerLetter"},Mp={DEFAULT:"default",PRESERVE:"preserve"};class Pp extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{space:"xml:space"})}}class FW extends $e{constructor(){super("w:instrText"),this.root.push(new Pp({space:Mp.PRESERVE})),this.root.push("PAGE")}}class UW extends $e{constructor(){super("w:instrText"),this.root.push(new Pp({space:Mp.PRESERVE})),this.root.push("NUMPAGES")}}class RW extends $e{constructor(){super("w:instrText"),this.root.push(new Pp({space:Mp.PRESERVE})),this.root.push("SECTIONPAGES")}}class IW extends $e{constructor(){super("w:instrText"),this.root.push(new Pp({space:Mp.PRESERVE})),this.root.push("SECTION")}}const iw=({fill:s,color:e,type:t})=>new gt({name:"w:shd",attributes:{fill:{key:"w:fill",value:s===void 0?void 0:Ip(s)},color:{key:"w:color",value:e===void 0?void 0:Ip(e)},type:{key:"w:val",value:t}}});class As extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}}class MW extends $e{constructor(e){super("w:del"),this.root.push(new As({id:e.id,author:e.author,date:e.date}))}}class PW extends $e{constructor(e){super("w:ins"),this.root.push(new As({id:e.id,author:e.author,date:e.date}))}}const OW={DOT:"dot"},LW=(s=OW.DOT)=>new gt({name:"w:em",attributes:{val:{key:"w:val",value:s}}});class BW extends $e{constructor(e){super("w:spacing"),this.root.push(new $r({val:rc(e)}))}}class WW extends $e{constructor(e){super("w:color"),this.root.push(new $r({val:Ip(e)}))}}class jW extends $e{constructor(e){super("w:highlight"),this.root.push(new $r({val:e}))}}class zW extends $e{constructor(e){super("w:highlightCs"),this.root.push(new $r({val:e}))}}const HW=s=>new gt({name:"w:lang",attributes:{value:{key:"w:val",value:s.value},eastAsia:{key:"w:eastAsia",value:s.eastAsia},bidirectional:{key:"w:bidi",value:s.bidirectional}}}),D_=(s,e)=>{if(typeof s=="string"){const n=s;return new gt({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:n},cs:{key:"w:cs",value:n},eastAsia:{key:"w:eastAsia",value:n},hAnsi:{key:"w:hAnsi",value:n},hint:{key:"w:hint",value:e}}})}const t=s;return new gt({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:t.ascii},cs:{key:"w:cs",value:t.cs},eastAsia:{key:"w:eastAsia",value:t.eastAsia},hAnsi:{key:"w:hAnsi",value:t.hAnsi},hint:{key:"w:hint",value:t.hint}}})},s8=s=>new gt({name:"w:vertAlign",attributes:{val:{key:"w:val",value:s}}}),$W=()=>s8("superscript"),KW=()=>s8("subscript"),o8={SINGLE:"single"},XW=(s=o8.SINGLE,e)=>new gt({name:"w:u",attributes:{val:{key:"w:val",value:s},color:{key:"w:color",value:e===void 0?void 0:Ip(e)}}});class ad extends Wl{constructor(e){var t,n;if(super("w:rPr"),!e)return;e.style&&this.push(new Ih("w:rStyle",e.style)),e.font&&(typeof e.font=="string"?this.push(D_(e.font)):"name"in e.font?this.push(D_(e.font.name,e.font.hint)):this.push(D_(e.font))),e.bold!==void 0&&this.push(new je("w:b",e.bold)),(e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript)&&this.push(new je("w:bCs",(t=e.boldComplexScript)!=null?t:e.bold)),e.italics!==void 0&&this.push(new je("w:i",e.italics)),(e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript)&&this.push(new je("w:iCs",(n=e.italicsComplexScript)!=null?n:e.italics)),e.smallCaps!==void 0?this.push(new je("w:smallCaps",e.smallCaps)):e.allCaps!==void 0&&this.push(new je("w:caps",e.allCaps)),e.strike!==void 0&&this.push(new je("w:strike",e.strike)),e.doubleStrike!==void 0&&this.push(new je("w:dstrike",e.doubleStrike)),e.emboss!==void 0&&this.push(new je("w:emboss",e.emboss)),e.imprint!==void 0&&this.push(new je("w:imprint",e.imprint)),e.noProof!==void 0&&this.push(new je("w:noProof",e.noProof)),e.snapToGri
836d!==void 0&&this.push(new je("w:snapToGrid",e.snapToGrid)),e.vanish&&this.push(new je("w:vanish",e.vanish)),e.color&&this.push(new WW(e.color)),e.characterSpacing&&this.push(new BW(e.characterSpacing)),e.scale!==void 0&&this.push(new qg("w:w",e.scale)),e.kern&&this.push(new S_("w:kern",e.kern)),e.position&&this.push(new Ih("w:position",e.position)),e.size!==void 0&&this.push(new S_("w:sz",e.size));const r=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;r&&this.push(new S_("w:szCs",r)),e.highlight&&this.push(new jW(e.highlight));const i=e.highlightComplexScript===void 0||e.highlightComplexScript===!0?e.highlight:e.highlightComplexScript;i&&this.push(new zW(i)),e.underline&&this.push(XW(e.underline.type,e.underline.color)),e.effect&&this.push(new Ih("w:effect",e.effect)),e.border&&this.push(En("w:bdr",e.border)),e.shading&&this.push(iw(e.shading)),e.subScript&&this.push(KW()),e.superScript&&this.push($W()),e.rightToLeft!==void 0&&this.push(new je("w:rtl",e.rightToLeft)),e.emphasisMark&&this.push(LW(e.emphasisMark.type)),e.language&&this.push(HW(e.language)),e.specVanish&&this.push(new je("w:specVanish",e.vanish)),e.math&&this.push(new je("w:oMath",e.math)),e.revision&&this.push(new GW(e.revision))}push(e){this.root.push(e)}}class VW extends ad{constructor(e){super(e),e!=null&&e.insertion&&this.push(new PW(e.insertion)),e!=null&&e.deletion&&this.push(new MW(e.deletion))}}class GW extends $e{constructor(e){super("w:rPrChange"),this.root.push(new As({id:e.id,author:e.author,date:e.date})),this.addChildElement(new ad(e))}}let O5=class extends $e{constructor(e){var t;super("w:t"),typeof e=="string"?(this.root.push(new Pp({space:Mp.PRESERVE})),this.root.push(e)):(this.root.push(new Pp({space:(t=e.space)!=null?t:Mp.DEFAULT})),this.root.push(e.text))}};const jg={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"};class yb extends $e{constructor(e){if(super("w:r"),Be(this,"properties"),this.properties=new ad(e),this.root.push(this.properties),e.break)for(let t=0;t<e.break;t++)this.root.push(NW());if(e.children)for(const t of e.children){if(typeof t=="string"){switch(t){case jg.CURRENT:this.root.push(n0()),this.root.push(new FW),this.root.push(r0()),this.root.push(i0());break;case jg.TOTAL_PAGES:this.root.push(n0()),this.root.push(new UW),this.root.push(r0()),this.root.push(i0());break;case jg.TOTAL_PAGES_IN_SECTION:this.root.push(n0()),this.root.push(new RW),this.root.push(r0()),this.root.push(i0());break;case jg.CURRENT_SECTION:this.root.push(n0()),this.root.push(new IW),this.root.push(r0()),this.root.push(i0());break;default:this.root.push(new O5(t));break}continue}this.root.push(t)}else e.text!==void 0&&this.root.push(new O5(e.text))}}class Zh extends yb{constructor(e){super(typeof e=="string"?{text:e}:e)}}var C_={},Zt={},A_,L5;function bb(){if(L5)return A_;L5=1,A_=s;function s(e,t){if(!e)throw new Error(t||"Assertion failed")}return s.equal=function(t,n,r){if(t!=n)throw new Error(r||"Assertion failed: "+t+" != "+n)},A_}var B5;function na(){if(B5)return Zt;B5=1;var s=bb(),e=jl();Zt.inherits=e;function t(F,L){return(F.charCodeAt(L)&64512)!==55296||L<0||L+1>=F.length?!1:(F.charCodeAt(L+1)&64512)===56320}function n(F,L){if(Array.isArray(F))return F.slice();if(!F)return[];var A=[];if(typeof F=="string")if(L){if(L==="hex")for(F=F.replace(/[^a-z0-9]+/ig,""),F.length%2!==0&&(F="0"+F),he=0;he<F.length;he+=2)A.push(parseInt(F[he]+F[he+1],16))}else for(var X=0,he=0;he<F.length;he++){var j=F.charCodeAt(he);j<128?A[X++]=j:j<2048?(A[X++]=j>>6|192,A[X++]=j&63|128):t(F,he)?(j=65536+((j&1023)<<10)+(F.charCodeAt(++he)&1023),A[X++]=j>>18|240,A[X++]=j>>12&63|128,A[X++]=j>>6&63|128,A[X++]=j&63|128):(A[X++]=j>>12|224,A[X++]=j>>6&63|128,A[X++]=j&63|128)}else for(he=0;he<F.length;he++)A[he]=F[he]|0;return A}Zt.toArray=n;function r(F){for(var L="",A=0;A<F.length;A++)L+=o(F[A].toString(16));return L}Zt.toHex=r;function i(F){var L=F>>>24|F>>>8&65280|F<<8&16711680|(F&255)<<24;return L>>>0}Zt.htonl=i;function a(F,L){for(var A="",X=0;X<F.length;X++){var he=F[X];L==="little"&&(he=i(he)),A+=c(he.toString(16))}return A}Zt.toHex32=a;function o(F){return F.length===1?"0"+F:F}Zt.zero2=o;function c(F){return F.length===7?"0"+F:F.length===6?"00"+F:F.length===5?"000"+F:F.length===4?"0000"+F:F.length===3?"00000"+F:F.length===2?"000000"+F:F.length===1?"0000000"+F:F}Zt.zero8=c;function l(F,L,A,X){var he=A-L;s(he%4===0);for(var j=new Array(he/4),ee=0,O=L;ee<j.length;ee++,O+=4){var pe;X==="big"?pe=F[O]<<24|F[O+1]<<16|F[O+2]<<8|F[O+3]:pe=F[O+3]<<24|F[O+2]<<16|F[O+1]<<8|F[O],j[ee]=pe>>>0}return j}Zt.join32=l;function u(F,L){for(var A=new Array(F.length*4),X=0,he=0;X<F.length;X++,he+=4){var j=F[X];L==="big"?(A[he]=j>>>24,A[he+1]=j>>>16&255,A[he+2]=j>>>8&255,A[he+3]=j&255):(A[he+3]=j>>>24,A[he+2]=j>>>16&255,A[he+1]=j>>>8&255,A[he]=j&255)}return A}Zt.split32=u;function d(F,L){return F>>>L|F<<32-L}Zt.rotr32=d;function h(F,L){return F<<L|F>>>32-L}Zt.rotl32=h;function f(F,L){return F+L>>>0}
836Zt.sum32=f;function p(F,L,A){return F+L+A>>>0}Zt.sum32_3=p;function y(F,L,A,X){return F+L+A+X>>>0}Zt.sum32_4=y;function g(F,L,A,X,he){return F+L+A+X+he>>>0}Zt.sum32_5=g;function b(F,L,A,X){var he=F[L],j=F[L+1],ee=X+j>>>0,O=(ee<X?1:0)+A+he;F[L]=O>>>0,F[L+1]=ee}Zt.sum64=b;function v(F,L,A,X){var he=L+X>>>0,j=(he<L?1:0)+F+A;return j>>>0}Zt.sum64_hi=v;function x(F,L,A,X){var he=L+X;return he>>>0}Zt.sum64_lo=x;function w(F,L,A,X,he,j,ee,O){var pe=0,q=L;q=q+X>>>0,pe+=q<L?1:0,q=q+j>>>0,pe+=q<j?1:0,q=q+O>>>0,pe+=q<O?1:0;var B=F+A+he+ee+pe;return B>>>0}Zt.sum64_4_hi=w;function _(F,L,A,X,he,j,ee,O){var pe=L+X+j+O;return pe>>>0}Zt.sum64_4_lo=_;function T(F,L,A,X,he,j,ee,O,pe,q){var B=0,re=L;re=re+X>>>0,B+=re<L?1:0,re=re+j>>>0,B+=re<j?1:0,re=re+O>>>0,B+=re<O?1:0,re=re+q>>>0,B+=re<q?1:0;var le=F+A+he+ee+pe+B;return le>>>0}Zt.sum64_5_hi=T;function S(F,L,A,X,he,j,ee,O,pe,q){var B=L+X+j+O+q;return B>>>0}Zt.sum64_5_lo=S;function C(F,L,A){var X=L<<32-A|F>>>A;return X>>>0}Zt.rotr64_hi=C;function D(F,L,A){var X=F<<32-A|L>>>A;return X>>>0}Zt.rotr64_lo=D;function N(F,L,A){return F>>>A}Zt.shr64_hi=N;function M(F,L,A){var X=F<<32-A|L>>>A;return X>>>0}return Zt.shr64_lo=M,Zt}var k_={},W5;function vb(){if(W5)return k_;W5=1;var s=na(),e=bb();function t(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return k_.BlockHash=t,t.prototype.update=function(r,i){if(r=s.toArray(r,i),this.pending?this.pending=this.pending.concat(r):this.pending=r,this.pendingTotal+=r.length,this.pending.length>=this._delta8){r=this.pending;var a=r.length%this._delta8;this.pending=r.slice(r.length-a,r.length),this.pending.length===0&&(this.pending=null),r=s.join32(r,0,r.length-a,this.endian);for(var o=0;o<r.length;o+=this._delta32)this._update(r,o,o+this._delta32)}return this},t.prototype.digest=function(r){return this.update(this._pad()),e(this.pending===null),this._digest(r)},t.prototype._pad=function(){var r=this.pendingTotal,i=this._delta8,a=i-(r+this.padLength)%i,o=new Array(a+this.padLength);o[0]=128;for(var c=1;c<a;c++)o[c]=0;if(r<<=3,this.endian==="big"){for(var l=8;l<this.padLength;l++)o[c++]=0;o[c++]=0,o[c++]=0,o[c++]=0,o[c++]=0,o[c++]=r>>>24&255,o[c++]=r>>>16&255,o[c++]=r>>>8&255,o[c++]=r&255}else for(o[c++]=r&255,o[c++]=r>>>8&255,o[c++]=r>>>16&255,o[c++]=r>>>24&255,o[c++]=0,o[c++]=0,o[c++]=0,o[c++]=0,l=8;l<this.padLength;l++)o[c++]=0;return o},k_}var Yl={},ho={},j5;function a8(){if(j5)return ho;j5=1;var s=na(),e=s.rotr32;function t(u,d,h,f){if(u===0)return n(d,h,f);if(u===1||u===3)return i(d,h,f);if(u===2)return r(d,h,f)}ho.ft_1=t;function n(u,d,h){return u&d^~u&h}ho.ch32=n;function r(u,d,h){return u&d^u&h^d&h}ho.maj32=r;function i(u,d,h){return u^d^h}ho.p32=i;function a(u){return e(u,2)^e(u,13)^e(u,22)}ho.s0_256=a;function o(u){return e(u,6)^e(u,11)^e(u,25)}ho.s1_256=o;function c(u){return e(u,7)^e(u,18)^u>>>3}ho.g0_256=c;function l(u){return e(u,17)^e(u,19)^u>>>10}return ho.g1_256=l,ho}var N_,z5;
836function qW(){if(z5)return N_;z5=1;var s=na(),e=vb(),t=a8(),n=s.rotl32,r=s.sum32,i=s.sum32_5,a=t.ft_1,o=e.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return s.inherits(l,o),N_=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(d,h){for(var f=this.W,p=0;p<16;p++)f[p]=d[h+p];for(;p<f.length;p++)f[p]=n(f[p-3]^f[p-8]^f[p-14]^f[p-16],1);var y=this.h[0],g=this.h[1],b=this.h[2],v=this.h[3],x=this.h[4];for(p=0;p<f.length;p++){var w=~~(p/20),_=i(n(y,5),a(w,g,b,v),x,f[p],c[w]);x=v,v=b,b=n(g,30),g=y,y=_}this.h[0]=r(this.h[0],y),this.h[1]=r(this.h[1],g),this.h[2]=r(this.h[2],b),this.h[3]=r(this.h[3],v),this.h[4]=r(this.h[4],x)},l.prototype._digest=function(d){return d==="hex"?s.toHex32(this.h,"big"):s.split32(this.h,"big")},N_}var F_,H5;function c8(){if(H5)return F_;H5=1;var s=na(),e=vb(),t=a8(),n=bb(),r=s.sum32,i=s.sum32_4,a=s.sum32_5,o=t.ch32,c=t.maj32,l=t.s0_256,u=t.s1_256,d=t.g0_256,h=t.g1_256,f=e.BlockHash,p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;f.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=p,this.W=new Array(64)}return s.inherits(y,f),F_=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(b,v){for(var x=this.W,w=0;w<16;w++)x[w]=b[v+w];for(;w<x.length;w++)x[w]=i(h(x[w-2]),x[w-7],d(x[w-15]),x[w-16]);var _=this.h[0],T=this.h[1],S=this.h[2],C=this.h[3],D=this.h[4],N=this.h[5],M=this.h[6],F=this.h[7];for(n(this.k.length===x.length),w=0;w<x.length;w++){var L=a(F,u(D),o(D,N,M),this.k[w],x[w]),A=r(l(_),c(_,T,S));F=M,M=N,N=D,D=r(C,L),C=S,S=T,T=_,_=r(L,A)}this.h[0]=r(this.h[0],_),this.h[1]=r(this.h[1],T),this.h[2]=r(this.h[2],S),this.h[3]=r(this.h[3],C),this.h[4]=r(this.h[4],D),this.h[5]=r(this.h[5],N),this.h[6]=r(this.h[6],M),this.h[7]=r(this.h[7],F)},y.prototype._digest=function(b){return b==="hex"?s.toHex32(this.h,"big"):s.split32(this.h,"big")},F_}var U_,$5;function YW(){if($5)return U_;$5=1;var s=na(),e=c8();function t(){if(!(this instanceof t))return new t;e.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return s.inherits(t,e),U_=t,t.blockSize=512,t.outSize=224,t.hmacStrength=192,t.padLength=64,t.prototype._digest=function(r){return r==="hex"?s.toHex32(this.h.slice(0,7),"big"):s.split32(this.h.slice(0,7),"big")},U_}var R_,K5;function l8(){if(K5)return R_;K5=1;var s=na(),e=vb(),t=bb(),n=s.rotr64_hi,r=s.rotr64_lo,i=s.shr64_hi,a=s.shr64_lo,o=s.sum64,c=s.sum64_hi,l=s.sum64_lo,u=s.sum64_4_hi,d=s.sum64_4_lo,h=s.sum64_5_hi,f=s.sum64_5_lo,p=e.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,
8361322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function g(){if(!(this instanceof g))return new g;p.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}s.inherits(g,p),R_=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(A,X){for(var he=this.W,j=0;j<32;j++)he[j]=A[X+j];for(;j<he.length;j+=2){var ee=M(he[j-4],he[j-3]),O=F(he[j-4],he[j-3]),pe=he[j-14],q=he[j-13],B=D(he[j-30],he[j-29]),re=N(he[j-30],he[j-29]),le=he[j-32],ge=he[j-31];he[j]=u(ee,O,pe,q,B,re,le,ge),he[j+1]=d(ee,O,pe,q,B,re,le,ge)}},g.prototype._update=function(A,X){this._prepareBlock(A,X);var he=this.W,j=this.h[0],ee=this.h[1],O=this.h[2],pe=this.h[3],q=this.h[4],B=this.h[5],re=this.h[6],le=this.h[7],ge=this.h[8],ie=this.h[9],P=this.h[10],W=this.h[11],te=this.h[12],Y=this.h[13],se=this.h[14],ue=this.h[15];t(this.k.length===he.length);for(var we=0;we<he.length;we+=2){var H=se,_e=ue,K=S(ge,ie),U=C(ge,ie),R=b(ge,ie,P,W,te),E=v(ge,ie,P,W,te,Y),Q=this.k[we],ce=this.k[we+1],V=he[we],k=he[we+1],I=h(H,_e,K,U,R,E,Q,ce,V,k),$=f(H,_e,K,U,R,E,Q,ce,V,k);H=_(j,ee),_e=T(j,ee),K=x(j,ee,O,pe,q),U=w(j,ee,O,pe,q,B);var Z=c(H,_e,K,U),ae=l(H,_e,K,U);se=te,ue=Y,te=P,Y=W,P=ge,W=ie,ge=c(re,le,I,$),ie=l(le,le,I,$),re=q,le=B,q=O,B=pe,O=j,pe=ee,j=c(I,$,Z,ae),ee=l(I,$,Z,ae)}o(this.h,0,j,ee),o(this.h,2,O,pe),o(this.h,4,q,B),o(this.h,6,re,le),o(this.h,8,ge,ie),o(this.h,10,P,W),o(this.h,12,te,Y),o(this.h,14,se,ue)},g.prototype._digest=function(A){return A==="hex"?s.toHex32(this.h,"big"):s.split32(this.h,"big")};function b(L,A,X,he,j){var ee=L&X^~L&j;return ee<0&&(ee+=4294967296),ee}function v(L,A,X,he,j,ee){var O=A&he^~Aⅇreturn O<0&&(O+=4294967296),O}function x(L,A,X,he,j){var ee=L&X^L&j^X&j;return ee<0&&(ee+=4294967296),ee}function w(L,A,X,he,j,ee){var O=A&he^A&ee^heⅇreturn O<0&&(O+=4294967296),O}function _(L,A){var X=n(L,A,28),he=n(A,L,2),j=n(A,L,7),ee=X^he^j;return ee<0&&(ee+=4294967296),ee}function T(L,A){var X=r(L,A,28),he=r(A,L,2),j=r(A,L,7),ee=X^he^j;return ee<0&&(ee+=4294967296),ee}function S(L,A){var X=n(L,A,14),he=n(L,A,18),j=n(A,L,9),ee=X^he^j;return ee<0&&(ee+=4294967296),ee}function C(L,A){var X=r(L,A,14),he=r(L,A,18),j=r(A,L,9),ee=X^he^j;return ee<0&&(ee+=4294967296),ee}function D(L,A){var X=n(L,A,1),he=n(L,A,8),j=i(L,A,7),ee=X^he^j;return ee<0&&(ee+=4294967296),ee}function N(L,A){var X=r(L,A,1),he=r(L,A,8),j=a(L,A,7),ee=X^he^j;return ee<0&&(ee+=4294967296),ee}function M(L,A){var X=n(L,A,19),he=n(A,L,29),j=i(L,A,6),ee=X^he^j;return ee<0&&(ee+=4294967296),ee}function F(L,A){var X=r(L,A,19),he=r(A,L,29),j=a(L,A,6),ee=X^he^j;return ee<0&&(ee+=4294967296),ee}return R_}var I_,X5;function ZW(){if(X5)return I_;X5=1;var s=na(),e=l8();function t(){if(!(this instanceof t))return new t;e.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return s.inherits(t,e),I_=t,t.blockSize=1024,t.outSize=384,t.hmacStrength=192,t.padLength=128,t.prototype._digest=function(r){return r==="hex"?s.toHex32(this.h.slice(0,12),"big"):s.split32(this.h.slice(0,12),"big")},I_}var V5;function JW(){return V5||(V5=1,Yl.sha1=qW(),Yl.sha224=YW(),Yl.sha256=c8(),Yl.sha384=ZW(),Yl.sha512=l8()),Yl}var M_={},G5;function QW(){if(G5)return M_;G5=1;var s=na(),e=vb(),t=s.rotl32,n=s.sum32,r=s.sum32_3,i=s.sum32_4,a=e.BlockHash;function o(){if(!(this instanceof o))return new o;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}s.inherits(o,a),M_.ripemd160=o,o.blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(g,b){for(var v=this.h[0],x=this.h[1],w=this.h[2],_=this.h[3],T=this.h[4],S=v,C=x,D=w,N=_,M=T,F=0;F<80;F++){var L=n(t(i(v,c(F,x,w,_),g[d[F]+b],l(F)),f[F]),T);
836v=T,T=_,_=t(w,10),w=x,x=L,L=n(t(i(S,c(79-F,C,D,N),g[h[F]+b],u(F)),p[F]),M),S=M,M=N,N=t(D,10),D=C,C=L}L=r(this.h[1],w,N),this.h[1]=r(this.h[2],_,M),this.h[2]=r(this.h[3],T,S),this.h[3]=r(this.h[4],v,C),this.h[4]=r(this.h[0],x,D),this.h[0]=L},o.prototype._digest=function(g){return g==="hex"?s.toHex32(this.h,"little"):s.split32(this.h,"little")};function c(y,g,b,v){return y<=15?g^b^v:y<=31?g&b|~g&v:y<=47?(g|~b)^v:y<=63?g&v|b&~v:g^(b|~v)}function l(y){return y<=15?0:y<=31?1518500249:y<=47?1859775393:y<=63?2400959708:2840853838}function u(y){return y<=15?1352829926:y<=31?1548603684:y<=47?1836072691:y<=63?2053994217:0}var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],p=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return M_}var P_,q5;function ej(){if(q5)return P_;q5=1;var s=na(),e=bb();function t(n,r,i){if(!(this instanceof t))return new t(n,r,i);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(s.toArray(r,i))}return P_=t,t.prototype._init=function(r){r.length>this.blockSize&&(r=new this.Hash().update(r).digest()),e(r.length<=this.blockSize);for(var i=r.length;i<this.blockSize;i++)r.push(0);for(i=0;i<r.length;i++)r[i]^=54;for(this.inner=new this.Hash().update(r),i=0;i<r.length;i++)r[i]^=106;this.outer=new this.Hash().update(r)},t.prototype.update=function(r,i){return this.inner.update(r,i),this},t.prototype.digest=function(r){return this.outer.update(this.inner.digest()),this.outer.digest(r)},P_}var Y5;function tj(){return Y5||(Y5=1,(function(s){var e=s;e.utils=na(),e.common=vb(),e.sha=JW(),e.ripemd=QW(),e.hmac=ej(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(C_)),C_}tj();let nj="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",rj=(s,e=21)=>(t=e)=>{let n="",r=t|0;for(;r--;)n+=s[Math.random()*s.length|0];return n},ij=(s=21)=>{let e="",t=s|0;for(;t--;)e+=nj[Math.random()*64|0];return e};const dr=s=>Math.floor(s*72*20),$D=(s=0)=>{let e=s;return()=>++e},sj=()=>$D(),oj=()=>$D(1),aj=()=>$D(),cj=()=>ij().toLowerCase(),cg=s=>rj("1234567890abcdef",s)(),lj=()=>`${cg(8)}-${cg(4)}-${cg(4)}-${cg(4)}-${cg(12)}`,O_=s=>new Uint8Array(new TextEncoder().encode(s));class uj extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{xmlns:"xmlns"})}}const hj={EXTERNAL:"External"},dj=(s,e,t,n)=>new gt({name:"Relationship",attributes:{id:{key:"Id",value:s},type:{key:"Type",value:e},target:{key:"Target",value:t},targetMode:{key:"TargetMode",value:n}}});class zl extends $e{constructor(){super("Relationships"),this.root.push(new uj({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}addRelationship(e,t,n,r){this.root.push(dj(`rId${e}`,t,n,r))}get RelationshipCount(){return this.root.length-1}}class fj extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}}class pj extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{"xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps"})}}class gj extends $e{constructor({id:e,initials:t,author:n,date:r=new Date,children:i}){super("w:comment"),this.root.push(new fj({id:e,initials:t,author:n,date:r.toISOString()}));for(const a of i)this.root.push(a)}}class mj extends $e{constructor({children:e}){super("w:comments"),Be(this,"relationships"),this.root.push(new pj({"xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));for(const t of e)this.root.push(new gj(t));this.relationships=new zl}get Relationships(){return this.relationships}}class yj extends DW{constructor(){super("w:endnoteRef")}}class bj extends $e{constructor(){super("w:pageBreakBefore")}}const Op={AUTO:"auto"},vj=({after:s,before:e,line:t,lineRule:n,beforeAutoSpacing:r,afterAutoSpacing:i})=>new gt({name:"w:spacing",attributes:{after:{key:"w:after",value:s},before:{key:"w:before",value:e},line:{key:"w:line",value:t},lineRule:{key:"w:lineRule",value:n},beforeAutoSpacing:{key:"w:beforeAutospacing",value:r},afterAutoSpacing:{key:"w:afterAutospacing",value:i}}}),L_={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3"},s0=s=>new gt({name:"w:pStyle",attributes:{val:{key:"w:val",value:s}}}),Z5={LEFT:"left",RIGHT:"right"},wj=({type:s,position:e,leader:t})=>new gt({name:"w:tab",attributes:{val:{key:"w:val",value:s},pos:{key:"w:pos",value:e},leader:{key:"w:leader",value:t}}}),xj=s=>new gt({name:"w:tabs",children:s.map(e=>wj(e))});class B_ extends $e{constructor(e,t){super("w:numPr"),this.root.push(new _j(t)),this.root.push(new Tj(e))}}class _j extends $e{constructor(e){if(super("w:ilvl"),e>
8369)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new $r({val:e}))}}class Tj extends $e{constructor(e){super("w:numId"),this.root.push(new $r({val:typeof e=="string"?`{${e}}`:e}))}}class u8 extends $e{constructor(){super(...arguments),Be(this,"fileChild",Symbol())}}class Sj extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}}class Ej extends $e{constructor(e,t,n){super("w:hyperlink"),Be(this,"linkId"),this.linkId=t;const r={history:1,anchor:n||void 0,id:n?void 0:`rId${this.linkId}`},i=new Sj(r);this.root.push(i),e.forEach(a=>{this.root.push(a)})}}class Dj extends $e{constructor(e){super("w:externalHyperlink"),this.options=e}}class Cj extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{id:"w:id",name:"w:name"})}}class Aj extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{id:"w:id"})}}class kj{constructor(e){Be(this,"bookmarkUniqueNumericId",aj()),Be(this,"start"),Be(this,"children"),Be(this,"end");const t=this.bookmarkUniqueNumericId();this.start=new Nj(e.id,t),this.children=e.children,this.end=new Fj(t)}}class Nj extends $e{constructor(e,t){super("w:bookmarkStart");const n=new Cj({name:e,id:t});this.root.push(n)}}class Fj extends $e{constructor(e){super("w:bookmarkEnd");const t=new Aj({id:e});this.root.push(t)}}const Uj=s=>new gt({name:"w:outlineLvl",attributes:{val:{key:"w:val",value:s}}}),o0=({id:s,fontKey:e,subsetted:t},n)=>new gt({name:n,attributes:Et({id:{key:"r:id",value:s}},e?{fontKey:{key:"w:fontKey",value:`{${e}}`}}:{}),children:[...t?[new je("w:subsetted",t)]:[]]}),Rj=({name:s,altName:e,panose1:t,charset:n,family:r,notTrueType:i,pitch:a,sig:o,embedRegular:c,embedBold:l,embedItalic:u,embedBoldItalic:d})=>new gt({name:"w:font",attributes:{name:{key:"w:name",value:s}},children:[...e?[ag("w:altName",e)]:[],...t?[ag("w:panose1",t)]:[],...n?[ag("w:charset",n)]:[],ag("w:family",r),...i?[new je("w:notTrueType",i)]:[],ag("w:pitch",a),...o?[new gt({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:o.usb0},usb1:{key:"w:usb1",value:o.usb1},usb2:{key:"w:usb2",value:o.usb2},usb3:{key:"w:usb3",value:o.usb3},csb0:{key:"w:csb0",value:o.csb0},csb1:{key:"w:csb1",value:o.csb1}}})]:[],...c?[o0(c,"w:embedRegular")]:[],...l?[o0(l,"w:embedBold")]:[],...u?[o0(u,"w:embedItalic")]:[],...d?[o0(d,"w:embedBoldItalic")]:[]]}),Ij=({name:s,index:e,fontKey:t,characterSet:n})=>Rj({name:s,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:n,family:"auto",pitch:"variable",embedRegular:{fontKey:t,id:`rId${e}`}}),Mj=s=>new gt({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:s.map((e,t)=>Ij({name:e.name,index:t+1,fontKey:e.fontKey,characterSet:e.characterSet}))});class h8{constructor(e){Be(this,"fontTable"),Be(this,"relationships"),Be(this,"fontOptionsWithKey",[]),this.options=e,this.fontOptionsWithKey=e.map(t=>to(Et({},t),{fontKey:lj()})),this.fontTable=Mj(this.fontOptionsWithKey),this.relationships=new zl;for(let t=0;t<e.length;t++)this.relationships.addRelationship(t+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font",`fonts/${e[t].name}.odttf`)}get View(){return this.fontTable}get Relationships(){return this.relationships}}const Pj=()=>new gt({name:"w:wordWrap",attributes:{val:{key:"w:val",value:0}}}),Oj=s=>{var e,t;return new gt({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:s.anch
836orLock},dropCap:{key:"w:dropCap",value:s.dropCap},width:{key:"w:w",value:s.width},height:{key:"w:h",value:s.height},x:{key:"w:x",value:s.position?s.position.x:void 0},y:{key:"w:y",value:s.position?s.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:s.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:s.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(e=s.space)==null?void 0:e.horizontal},spaceVertical:{key:"w:vSpace",value:(t=s.space)==null?void 0:t.vertical},rule:{key:"w:hRule",value:s.rule},alignmentX:{key:"w:xAlign",value:s.alignment?s.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:s.alignment?s.alignment.y:void 0},lines:{key:"w:lines",value:s.lines},wrap:{key:"w:wrap",value:s.wrap}}})};class Jh extends Wl{constructor(e){var t,n;if(super("w:pPr",e==null?void 0:e.includeIfEmpty),Be(this,"numberingReferences",[]),!e)return this;e.heading&&this.push(s0(e.heading)),e.bullet&&this.push(s0("ListParagraph")),e.numbering&&!e.style&&!e.heading&&(e.numbering.custom||this.push(s0("ListParagraph"))),e.style&&this.push(s0(e.style)),e.keepNext!==void 0&&this.push(new je("w:keepNext",e.keepNext)),e.keepLines!==void 0&&this.push(new je("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new bj),e.frame&&this.push(Oj(e.frame)),e.widowControl!==void 0&&this.push(new je("w:widowControl",e.widowControl)),e.bullet&&this.push(new B_(1,e.bullet.level)),e.numbering?(this.numberingReferences.push({reference:e.numbering.reference,instance:(t=e.numbering.instance)!=null?t:0}),this.push(new B_(`${e.numbering.reference}-${(n=e.numbering.instance)!=null?n:0}`,e.numbering.level))):e.numbering===!1&&this.push(new B_(0,0)),e.border&&this.push(new CW(e.border)),e.thematicBreak&&this.push(new AW),e.shading&&this.push(iw(e.shading)),e.wordWrap&&this.push(Pj()),e.overflowPunctuation&&this.push(new je("w:overflowPunct",e.overflowPunctuation));const r=[...e.rightTabStop!==void 0?[{type:Z5.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:Z5.LEFT,position:e.leftTabStop}]:[]];r.length>0&&this.push(xj(r)),e.bidirectional!==void 0&&this.push(new je("w:bidi",e.bidirectional)),e.spacing&&this.push(vj(e.spacing)),e.indent&&this.push(kW(e.indent)),e.contextualSpacing!==void 0&&this.push(new je("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(i8(e.alignment)),e.outlineLevel!==void 0&&this.push(Uj(e.outlineLevel)),e.suppressLineNumbers!==void 0&&this.push(new je("w:suppressLineNumbers",e.suppressLineNumbers)),e.autoSpaceEastAsianText!==void 0&&this.push(new je("w:autoSpaceDN",e.autoSpaceEastAsianText)),e.run&&this.push(new VW(e.run)),e.revision&&this.push(new Lj(e.revision))}push(e){this.root.push(e)}prepForXml(e){if(!(e.viewWrapper instanceof h8))for(const t of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(t.reference,t.instance);return super.prepForXml(e)}}class Lj extends $e{constructor(e){super("w:pPrChange"),this.root.push(new As({id:e.id,author:e.author,date:e.date})),this.root.push(new Jh(to(Et({},e),{includeIfEmpty:!0})))}}class tr extends u8{constructor(e){if(super("w:p"),Be(this,"properties"),typeof e=="string")return this.properties=new Jh({}),this.root.push(this.properties),this.root.push(new Zh(e)),this;if(this.properties=new Jh(e),this.root.push(this.properties),e.text&&this.root.push(new Zh(e.text)),e.children)for(const t of e.children){if(t instanceof kj){this.root.push(t.start);for(const n of t.children)this.root.push(n);this.root.push(t.end);continue}this.root.push(t)}}prepForXml(e){for(const t of this.root)if(t instanceof Dj){const n=this.root.indexOf(t),r=new Ej(t.options.children,cj());e.viewWrapper.Relationships.addRelationship(r.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",t.options.link,hj.EXTERNAL),this.root[n]=r}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}const Bj=s=>new gt({name:"w:gridCol",attributes:s!==void 0?{width:{key:"w:w",value:Ar(s)}}:void 0});class d8 extends $e{constructor(e,t){super("w:tblGrid");for(const n of e)this.root.push(Bj(n));t&&this.root.push(new jj(t))}}
836class Wj extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{id:"w:id"})}}class jj extends $e{constructor(e){super("w:tblGridChange"),this.root.push(new Wj({id:e.id})),this.root.push(new d8(e.columnWidths))}}class zj extends $e{constructor(e){super("w:ins"),this.root.push(new As({id:e.id,author:e.author,date:e.date}))}}class Hj extends $e{constructor(e){super("w:del"),this.root.push(new As({id:e.id,author:e.author,date:e.date}))}}class $j extends $e{constructor(e){super("w:cellIns"),this.root.push(new As({id:e.id,author:e.author,date:e.date}))}}class Kj extends $e{constructor(e){super("w:cellDel"),this.root.push(new As({id:e.id,author:e.author,date:e.date}))}}class Xj extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date",verticalMerge:"w:vMerge",verticalMergeOriginal:"w:vMergeOrig"})}}class Vj extends $e{constructor(e){super("w:cellMerge"),this.root.push(new Xj(e))}}const Gj={TOP:"top",CENTER:"center",BOTTOM:"bottom"};to(Et({},Gj),{BOTH:"both"});const f8=s=>new gt({name:"w:vAlign",attributes:{verticalAlign:{key:"w:val",value:s}}}),p8=({marginUnitType:s=X1.DXA,top:e,left:t,bottom:n,right:r})=>[{name:"w:top",size:e},{name:"w:left",size:t},{name:"w:bottom",size:n},{name:"w:right",size:r}].filter(i=>i.size!==void 0).map(({name:i,size:a})=>V1(i,{type:s,size:a})),qj=s=>{const e=p8(s);if(e.length!==0)return new gt({name:"w:tblCellMar",children:e})},Yj=s=>{const e=p8(s);if(e.length!==0)return new gt({name:"w:tcMar",children:e})},X1={AUTO:"auto",DXA:"dxa",PERCENTAGE:"pct"},V1=(s,{type:e=X1.AUTO,size:t})=>{let n=t;return e===X1.PERCENTAGE&&typeof t=="number"&&(n=`${t}%`),new gt({name:s,attributes:{type:{key:"w:type",value:e},size:{key:"w:w",value:r8(n)}}})};class Zj extends Wl{constructor(e){super("w:tcBorders"),e.top&&this.root.push(En("w:top",e.top)),e.start&&this.root.push(En("w:start",e.start)),e.left&&this.root.push(En("w:left",e.left)),e.bottom&&this.root.push(En("w:bottom",e.bottom)),e.end&&this.root.push(En("w:end",e.end)),e.right&&this.root.push(En("w:right",e.right))}}class Jj extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{val:"w:val"})}}class Qj extends $e{constructor(e){super("w:gridSpan"),this.root.push(new Jj({val:zr(e)}))}}const g8={CONTINUE:"continue",RESTART:"restart"};class ez extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{val:"w:val"})}}class J5 extends $e{constructor(e){super("w:vMerge"),this.root.push(new ez({val:e}))}}class tz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{val:"w:val"})}}class nz extends $e{constructor(e){super("w:textDirection"),this.root.push(new tz({val:e}))}}class m8 extends Wl{constructor(e){if(super("w:tcPr",e.includeIfEmpty),e.width&&this.root.push(V1("w:tcW",e.width)),e.columnSpan&&this.root.push(new Qj(e.columnSpan)),e.verticalMerge?this.root.push(new J5(e.verticalMerge)):e.rowSpan&&e.rowSpan>1&&this.root.push(new J5(g8.RESTART)),e.borders&&this.root.push(new Zj(e.borders)),e.shading&&this.root.push(iw(e.shading)),e.margins){const t=Yj(e.margins);t&&this.root.push(t)}e.textDirection&&this.root.push(new nz(e.textDirection)),e.verticalAlign&&this.root.push(f8(e.verticalAlign)),e.insertion&&this.root.push(new $j(e.insertion)),e.deletion&&this.root.push(new Kj(e.deletion)),e.revision&&this.root.push(new rz(e.revision)),e.cellMerge&&this.root.push(new Vj(e.cellMerge))}}class rz extends $e{constructor(e){super("w:tcPrChange"),this.root.push(new As({id:e.id,author:e.author,date:e.date})),this.root.push(new m8(to(Et({},e),{includeIfEmpty:!0})))}}class KD extends $e{constructor(e){super("w:tc"),this.options=e,this.root.push(new m8(e));for(const t of e.children)this.root.push(t)}prepForXml(e){return this.root[this.root.length-1]instanceof tr||this.root.push(new tr({})),super.prepForXml(e)}}const gd={style:hu.NONE,size:0,color:"auto"},md={style:hu.SINGLE,size:4,color:"auto"};class y8 extends $e{constructor(e){var t,n,r,i,a,o;super("w:tblBorders"),this.root.push(En("w:top",(t=e.top)!=null?t:md)),this.root.push(En("w:left",(n=e.left)!=null?n:md)),this.root.push(En("w:bottom",(r=e.bottom)!=null?r:md)),this.root.push(En("w:right",(i=e.right)!=null?i:md)),this.root.push(En("w:insideH",(a=e.insideHorizontal)!=null?a:md)),this.root.push(En("w:insideV",(o=e.insideVertical)!=null?o:md))}}Be(y8,"NONE",{top:gd,bottom:gd,left:gd,right:gd,insideHorizontal:gd,insideVertical:gd});const iz=s=>new gt({name:"w:tblOverlap",attributes:{val:{key:"w:val",value:s}}}),sz=({horizontalAnchor:s,verticalAnchor:e,absoluteHorizontalPosition:t,relativeHorizontalPosition:n,absoluteVerticalPosition:r,relativeVerticalPosition:i,bottomFromText:a,topFromText:o,leftFromText:c,rightFromText:l,overlap:u})=>new gt({name:"w:tblpPr",attributes:{leftFromText:{key:"w:leftFromText",value:c===void 0?void 0:Ar(c)},rightFromText:{key:"w:rightFromText",value:l===void 0?void 0:Ar(l)},topFromText:{key:"w:topFromText",value:o===void 0?void 0:Ar(o)},bottomFromText:{key:"w:bottomFromText",value:a===void 0?void 0:Ar(a)},absoluteHorizontalPosition:{key:"w:tblpX",value:t===void 0?void 0:rc(t)},absoluteVerticalPosition:{key:"w:tblpY",value:r===void 0?void 0:rc(r)},horizontalAnchor:{key:"w:horzAnchor",value:s}
836,relativeHorizontalPosition:{key:"w:tblpXSpec",value:n},relativeVerticalPosition:{key:"w:tblpYSpec",value:i},verticalAnchor:{key:"w:vertAnchor",value:e}},children:u?[iz(u)]:void 0}),oz=s=>new gt({name:"w:tblLayout",attributes:{type:{key:"w:type",value:s}}}),az={DXA:"dxa"},b8=({type:s=az.DXA,value:e})=>new gt({name:"w:tblCellSpacing",attributes:{type:{key:"w:type",value:s},value:{key:"w:w",value:r8(e)}}}),cz=({firstRow:s,lastRow:e,firstColumn:t,lastColumn:n,noHBand:r,noVBand:i})=>new gt({name:"w:tblLook",attributes:{firstRow:{key:"w:firstRow",value:s},lastRow:{key:"w:lastRow",value:e},firstColumn:{key:"w:firstColumn",value:t},lastColumn:{key:"w:lastColumn",value:n},noHBand:{key:"w:noHBand",value:r},noVBand:{key:"w:noVBand",value:i}}});class v8 extends Wl{constructor(e){if(super("w:tblPr",e.includeIfEmpty),e.style&&this.root.push(new Ih("w:tblStyle",e.style)),e.float&&this.root.push(sz(e.float)),e.visuallyRightToLeft!==void 0&&this.root.push(new je("w:bidiVisual",e.visuallyRightToLeft)),e.width&&this.root.push(V1("w:tblW",e.width)),e.alignment&&this.root.push(i8(e.alignment)),e.indent&&this.root.push(V1("w:tblInd",e.indent)),e.borders&&this.root.push(new y8(e.borders)),e.shading&&this.root.push(iw(e.shading)),e.layout&&this.root.push(oz(e.layout)),e.cellMargin){const t=qj(e.cellMargin);t&&this.root.push(t)}e.tableLook&&this.root.push(cz(e.tableLook)),e.cellSpacing&&this.root.push(b8(e.cellSpacing)),e.revision&&this.root.push(new lz(e.revision))}}class lz extends $e{constructor(e){super("w:tblPrChange"),this.root.push(new As({id:e.id,author:e.author,date:e.date})),this.root.push(new v8(to(Et({},e),{includeIfEmpty:!0})))}}class uz extends u8{constructor({rows:e,width:t,columnWidths:n=Array(Math.max(...e.map(g=>g.CellCount))).fill(100),columnWidthsRevision:r,margins:i,indent:a,float:o,layout:c,style:l,borders:u,alignment:d,visuallyRightToLeft:h,tableLook:f,cellSpacing:p,revision:y}){super("w:tbl"),this.root.push(new v8({borders:u??{},width:t??{size:100},indent:a,float:o,layout:c,style:l,alignment:d,cellMargin:i,visuallyRightToLeft:h,tableLook:f,cellSpacing:p,revision:y})),this.root.push(new d8(n,r));for(const g of e)this.root.push(g);e.forEach((g,b)=>{if(b===e.length-1)return;let v=0;g.cells.forEach(x=>{if(x.options.rowSpan&&x.options.rowSpan>1){const w=new KD({rowSpan:x.options.rowSpan-1,columnSpan:x.options.columnSpan,borders:x.options.borders,children:[],verticalMerge:g8.CONTINUE});e[b+1].addCellToColumnIndex(w,v)}v+=x.options.columnSpan||1})})}}const hz=(s,e)=>new gt({name:"w:trHeight",attributes:{value:{key:"w:val",value:Ar(s)},rule:{key:"w:hRule",value:e}}});class w8 extends Wl{constructor(e){super("w:trPr",e.includeIfEmpty),e.cantSplit!==void 0&&this.root.push(new je("w:cantSplit",e.cantSplit)),e.tableHeader!==void 0&&this.root.push(new je("w:tblHeader",e.tableHeader)),e.height&&this.root.push(hz(e.height.value,e.height.rule)),e.cellSpacing&&this.root.push(b8(e.cellSpacing)),e.insertion&&this.root.push(new zj(e.insertion)),e.deletion&&this.root.push(new Hj(e.deletion)),e.revision&&this.root.push(new dz(e.revision))}}class dz extends $e{constructor(e){super("w:trPrChange"),this.root.push(new As({id:e.id,author:e.author,date:e.date})),this.root.push(new w8(to(Et({},e),{includeIfEmpty:!0})))}}class fz extends $e{constructor(e){super("w:tr"),this.options=e,this.root.push(new w8(e));for(const t of e.children)this.root.push(t)}get CellCount(){return this.options.children.length}get cells(){return this.root.filter(e=>e instanceof KD)}addCellToIndex(e,t){this.root.splice(t+1,0,e)}addCellToColumnIndex(e,t){const n=this.columnIndexToRootIndex(t,!0);this.addCellToIndex(e,n-1)}rootIndexToColumnIndex(e){if(e<1||e>=this.root.length)throw new Error(`cell 'rootIndex' should between 1 to ${this.root.length-1}`);let t=0;for(let n=1;n<e;n++){const r=this.root[n];t+=r.options.columnSpan||1}return t}columnIndexToRootIndex(e,t=!1){if(e<0)throw new Error("cell 'columnIndex' should not less than zero");let n=0,r=1;for(;n<=e;){if(r>=this.root.length){if(t)return this.root.length;throw new Error(`cell 'columnIndex' should not great than ${n-1}`)}const i=this.root[r];r+=1,n+=i&&i.options.columnSpan||1}return r-1}}class pz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class gz extends $e{constructor(){super("Properties"),this.root.push(new pz({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class mz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{xmlns:"xmlns"})}}const ca=(s,e)=>new gt({name:"Default",attributes:{contentType:{key:"ContentType",value:s},extension:{key:"Extension",value:e}}}),Ei=(s,e)=>new gt({name:"Override",attributes:{contentType:{key:"ContentType",value:s},partName:{key:"PartName",value:e}}});class yz extends $e{constructor(){super("Types"),this.root.push(new mz({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(ca("image/png","png")),this.root.push(ca("image/jpeg","jpeg")),this.root.push(ca("image/jpeg","jpg")),this.root.push(ca("image/bmp","bmp")),this.root.push(ca("image/gif","gif")),this.root.push(ca("image/svg+xml","svg")),this.root.push(ca("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(ca("application/xml","xml")),this.root.push(ca("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(Ei("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(Ei("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(Ei("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(Ei("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(Ei("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(Ei("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(Ei("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(Ei("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml","/word/endnotes.xml")),this.root.push(Ei("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(Ei("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml")),this.root.push(Ei("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml"))}addFooter(e){this.root.push(Ei("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addHeader(e){this.root.push(Ei("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}}const Q5={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"};class sw extends Nt{constructor(e,t){super(Et({Ignorable:t},Object.fromEntries(e.map(n=>[n,Q5[n]])))),Be(this,"xmlKeys",Et({Ignorable:"mc:Ignorable"},Object.fromEntries(Object.keys(Q5).map(n=>[n,`xmlns:${n}`]))))}}class bz extends $e{constructor(e){super("cp:coreProperties"),this.root.push(new sw(["cp","dc","dcterms","dcmitype","xsi"])),e.title&&this.root.push(new ql("dc:title",e.title)),e.subject&&this.root.push(new ql("dc:subject",e.subject)),e.creator&&this.root.push(new ql("dc:creator",e.creator)),e.keywords&&this.root.push(new ql("cp:keywords",e.keywords)),e.description&&this.root.push(new ql("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new ql("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new ql("cp:revision",String(e.revision))),this.root.push(new eN("dcterms:created")),this.root.push(new eN("dcterms:modified"))}}class vz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{type:"xsi:type"})}}class eN extends $e{constructor(e){super(e),this.root.push(new vz({type:"dcterms:W3CDTF"})),this.root.push(EW(new Date))}}class wz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}}class xz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{formatId:"fmtid",pid:"pid",name:"name"})}}class _z extends $e{constructor(e,t){super("property"),this.root.push(new xz({formatId:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new Tz(t.value))}}class Tz extends $e{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class Sz extends $e{constructor(e){super("Properties"),Be(this,"nextId"),Be(this,"properties",[]),this.root.push(new wz({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;
836for(const t of e)this.addCustomProperty(t)}prepForXml(e){return this.properties.forEach(t=>this.root.push(t)),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new _z(this.nextId++,e))}}const Ez=({space:s,count:e,separate:t,equalWidth:n,children:r})=>new gt({name:"w:cols",attributes:{space:{key:"w:space",value:s===void 0?void 0:Ar(s)},count:{key:"w:num",value:e===void 0?void 0:zr(e)},separate:{key:"w:sep",value:t},equalWidth:{key:"w:equalWidth",value:n}},children:!n&&r?r:void 0}),Dz=({type:s,linePitch:e,charSpace:t})=>new gt({name:"w:docGrid",attributes:{type:{key:"w:type",value:s},linePitch:{key:"w:linePitch",value:zr(e)},charSpace:{key:"w:charSpace",value:t?zr(t):void 0}}}),qd={DEFAULT:"default",FIRST:"first",EVEN:"even"},tN={HEADER:"w:headerReference",FOOTER:"w:footerReference"},W_=(s,e)=>new gt({name:s,attributes:{type:{key:"w:type",value:e.type||qd.DEFAULT},id:{key:"r:id",value:`rId${e.id}`}}}),Cz=({countBy:s,start:e,restart:t,distance:n})=>new gt({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:s===void 0?void 0:zr(s)},start:{key:"w:start",value:e===void 0?void 0:zr(e)},restart:{key:"w:restart",value:t},distance:{key:"w:distance",value:n===void 0?void 0:Ar(n)}}});class nN extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}}class Az extends Wl{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new nN({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new nN({})),e.pageBorderTop&&this.root.push(En("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(En("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(En("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(En("w:right",e.pageBorderRight))}}const kz=(s,e,t,n,r,i,a)=>new gt({name:"w:pgMar",attributes:{top:{key:"w:top",value:rc(s)},right:{key:"w:right",value:Ar(e)},bottom:{key:"w:bottom",value:rc(t)},left:{key:"w:left",value:Ar(n)},header:{key:"w:header",value:Ar(r)},footer:{key:"w:footer",value:Ar(i)},gutter:{key:"w:gutter",value:Ar(a)}}}),Nz=({start:s,formatType:e,separator:t})=>new gt({name:"w:pgNumType",attributes:{start:{key:"w:start",value:s===void 0?void 0:zr(s)},formatType:{key:"w:fmt",value:e},separator:{key:"w:chapSep",value:t}}}),_E={PORTRAIT:"portrait",LANDSCAPE:"landscape"},Fz=({width:s,height:e,orientation:t,code:n})=>{const r=Ar(s),i=Ar(e);return new gt({name:"w:pgSz",attributes:{width:{key:"w:w",value:t===_E.LANDSCAPE?i:r},height:{key:"w:h",value:t===_E.LANDSCAPE?r:i},orientation:{key:"w:orient",value:t},code:{key:"w:code",value:n}}})};class Uz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{val:"w:val"})}}class Rz extends $e{constructor(e){super("w:textDirection"),this.root.push(new Uz({val:e}))}}const Iz={CONTINUOUS:"continuous"},Mz=s=>new gt({name:"w:type",attributes:{val:{key:"w:val",value:s}}}),Zl={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},j_={WIDTH:11906,HEIGHT:16838,ORIENTATION:_E.PORTRAIT};class x8 extends $e{constructor({page:{size:{width:e=j_.WIDTH,height:t=j_.HEIGHT,orientation:n=j_.ORIENTATION}={},margin:{top:r=Zl.TOP,right:i=Zl.RIGHT,bottom:a=Zl.BOTTOM,left:o=Zl.LEFT,header:c=Zl.HEADER,footer:l=Zl.FOOTER,gutter:u=Zl.GUTTER}={},pageNumbers:d={},borders:h,textDirection:f}={},grid:{linePitch:p=360,charSpace:y,type:g}={},headerWrapperGroup:b={},footerWrapperGroup:v={},lineNumbers:x,titlePage:w,verticalAlign:_,column:T,type:S,revision:C}={}){super("w:sectPr"),this.addHeaderFooterGroup(tN.HEADER,b),this.addHeaderFooterGroup(tN.FOOTER,v),S&&this.root.push(Mz(S)),this.root.push(Fz({width:e,height:t,orientation:n})),this.root.push(kz(r,i,a,o,c,l,u)),h&&this.root.push(new Az(h)),x&&this.root.push(Cz(x)),this.root.push(Nz(d)),T&&this.root.push(Ez(T)),_&&this.root.push(f8(_)),w!==void 0&&this.root.push(new je("w:titlePg",w)),f&&this.root.push(new Rz(f)),C&&this.root.push(new Pz(C)),this.root.push(Dz({linePitch:p,charSpace:y,type:g}))}addHeaderFooterGroup(e,t){t.default&&this.root.push(W_(e,{type:qd.DEFAULT,id:t.default.View.ReferenceId})),t.first&&this.root.push(W_(e,{type:qd.FIRST,id:t.first.View.ReferenceId})),t.even&&this.root.push(W_(e,{type:qd.EVEN,id:t.even.View.ReferenceId}))}}class Pz extends $e{constructor(e){super("w:sectPrChange"),this.root.push(new As({id:e.id,author:e.author,date:e.date})),this.root.push(new x8(e))}}class Oz extends $e{constructor(){super("w:body"),Be(this,"sections",[])}addSection(e){const t=this.sections.pop();this.root.push(this.createSectionParagraph(t)),this.sections.push(new x8(e))}prepForXml(e){return this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(e)}push(e){this.root.push(e)}createSectionParagraph(e){const t=new tr({}),n=new Jh({});return n.push(e),t.addChildElement(n),t}}class Lz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}}class Bz extends $e{constructor(e){super("w:background"),this.root.push(new Lz({color:e.color===void 0?void 0:Ip(e.color),themeColor:e.themeColor,themeShade:e.themeShade===void 0?void 0:P5(e.themeShade),themeTint:e.themeTint===void 0?void 0:P5(e.themeTint)}))}}class Wz extends $e{constructor(e){super("w:document"),Be(this,"body"),this.root.push(new sw(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps","cx","cx1","cx2","cx3","cx4","cx5","cx6","cx7","cx8","aink","am3d","w16cex","w16cid","w16","w16sdtdh","w16se"],"w14 w15 wp14")),this.body=new Oz,e.background&&this.root.push(new Bz(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}}class jz{constructor(e){Be(this,"document"),Be(this,"relationships"),this.document=new Wz(e),this.relationships=new zl}get View(){return this.document}get Relationships(){return this.relationships}}class zz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class Hz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class $z extends yb{constructor(){super({style:"EndnoteReference"}),this.root.push(new yj)}}const rN={SEPARATOR:"separator",CONTINUATION_SEPARATOR:"continuationSeparator"};class z_ extends $e{constructor(e){super("w:endnote"),this.root.push(new Hz({type:e.type,id:e.id}));for(let t=0;t<e.children.length;t++){const n=e.children[t];t===0&&n.addRunToFront(new $z),this.root.push(n)}}}class Kz extends $e{constructor(){super("w:continuationSeparator")}}class _8 extends yb{constructor(){super({}),this.root.push(new Kz)}}class Xz extends $e{constructor(){super("w:separator")}}class T8 extends yb{constructor(){super({}),this.root.push(new Xz)}}class Vz extends $e{constructor(){super("w:endnotes"),this.root.push(new zz({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const e=new z_({id:-1,type:rN.SEPARATOR,children:[new tr({spacing:{after:0,line:240,lineRule:Op.AUTO},children:[new T8]})]});this.root.push(e);const t=new z_({id:0,type:rN.CONTINUATION_SEPARATOR,children:[new tr({spacing:{after:0,line:240,lineRule:Op.AUTO},children:[new _8]})]});this.root.push(t)}createEndnote(e,t){const n=new z_({id:e,children:t});this.root.push(n)}}class Gz{constructor(){Be(this,"endnotes"),Be(this,"relationships"),this.endnotes=new Vz,this.relationships=new zl}get View(){return this.endnotes}get Relationships(){return this.relationships}}class qz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"})}}let Yz=class extends e8{constructor(e,t){super("w:ftr",t),Be(this,"refId"),this.refId=e,t||this.root.push(new qz({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class Zz{constructor(e,t,n){Be(this,"footer"),Be(this,"relationships"),this.media=e,this.footer=new Yz(t,n),this.relationships=new zl}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class Jz extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{type:"w:type",id:"w:id"})}}class Qz extends $e{constructor(){super("w:footnoteRef")}}class eH extends yb{constructor(){super({style:"FootnoteReference"}),this.root.push(new Qz)}}const iN={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"};class H_ extends $e{constructor(e){super("w:footnote"),this.root.push(new Jz({type:e.type,id:e.id}));for(let t=0;t<e.children.length;t++){const n=e.children[t];t===0&&n.addRunToFront(new eH),this.root.push(n)}}}class tH extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class nH extends $e{constructor(){super("w:footnotes"),this.root.push(new tH({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const e=new H_({id:-1,type:iN.SEPERATOR,children:[new tr({spacing:{after:0,line:240,lineRule:Op.AUTO},children:[new T8]})]});this.root.push(e);const t=new H_({id:0,type:iN.CONTINUATION_SEPERATOR,children:[new tr({spacing:{after:0,line:240,lineRule:Op.AUTO},children:[new _8]})]});this.root.push(t)}createFootNote(e,t){const n=new H_({id:e,children:t});this.root.push(n)}}class rH{constructor(){Be(this,"footnotess"),Be(this,"relationships"),this.footnotess=new nH,this.relationships=new zl}get View(){return this.footnotess}get Relationships(){return this.relationships}}class iH extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",w16cid:"xmlns:w16cid",w16se:"xmlns:w16se"})}}let sH=class extends e8{constructor(e,t){super("w:hdr",t),Be(this,"refId"),this.refId=e,t||this.root.push(new iH({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}};class oH{constructor(e,t,n){Be(this,"header"),Be(this,"relationships"),this.media=e,this.header=new sH(t,n),this.relationships=new zl}add(e){return this.header.add(e),this}addChildElement(e){this.header.addChildElement(e)}get View(){return this.header}get Relationships(){return this.relationships}get Media(){return this.media}}class aH{constructor(){Be(this,"map"),this.map=new Map}addImage(e,t){this.map.set(e,t)}get Array(){return Array.from(this.map.values())}}const la={BULLET:"bullet"};class cH extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{ilvl:"w:ilvl",tentative:"w15:tentative"})}}class lH extends $e{constructor(e){su
836per("w:numFmt"),this.root.push(new $r({val:e}))}}class uH extends $e{constructor(e){super("w:lvlText"),this.root.push(new $r({val:e}))}}class hH extends $e{constructor(e){super("w:lvlJc"),this.root.push(new $r({val:e}))}}class dH extends $e{constructor(e){super("w:suff"),this.root.push(new $r({val:e}))}}class fH extends $e{constructor(){super("w:isLgl")}}class pH extends $e{constructor({level:e,format:t,text:n,alignment:r=Bn.START,start:i=1,style:a,suffix:o,isLegalNumberingStyle:c}){if(super("w:lvl"),Be(this,"paragraphProperties"),Be(this,"runProperties"),this.root.push(new qg("w:start",zr(i))),t&&this.root.push(new lH(t)),o&&this.root.push(new dH(o)),c&&this.root.push(new fH),n&&this.root.push(new uH(n)),this.root.push(new hH(r)),this.paragraphProperties=new Jh(a&&a.paragraph),this.runProperties=new ad(a&&a.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new cH({ilvl:zr(e),tentative:1}))}}class gH extends pH{}class mH extends $e{constructor(e){super("w:multiLevelType"),this.root.push(new $r({val:e}))}}class yH extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}}class sN extends $e{constructor(e,t){super("w:abstractNum"),Be(this,"id"),this.root.push(new yH({abstractNumId:zr(e),restartNumberingAfterBreak:0})),this.root.push(new mH("hybridMultilevel")),this.id=e;for(const n of t)this.root.push(new gH(n))}}class bH extends $e{constructor(e){super("w:abstractNumId"),this.root.push(new $r({val:e}))}}class vH extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{numId:"w:numId"})}}class oN extends $e{constructor(e){if(super("w:num"),Be(this,"numId"),Be(this,"reference"),Be(this,"instance"),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new vH({numId:zr(e.numId)})),this.root.push(new bH(zr(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(const t of e.overrideLevels)this.root.push(new xH(t.num,t.start))}}class wH extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{ilvl:"w:ilvl"})}}class xH extends $e{constructor(e,t){super("w:lvlOverride"),this.root.push(new wH({ilvl:e})),t!==void 0&&this.root.push(new TH(t))}}class _H extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{val:"w:val"})}}class TH extends $e{constructor(e){super("w:startOverride"),this.root.push(new _H({val:e}))}}class SH extends $e{constructor(e){super("w:numbering"),Be(this,"abstractNumberingMap",new Map),Be(this,"concreteNumberingMap",new Map),Be(this,"referenceConfigMap",new Map),Be(this,"abstractNumUniqueNumericId",sj()),Be(this,"concreteNumUniqueNumericId",oj()),this.root.push(new sw(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps"],"w14 w15 wp14"));const t=new sN(this.abstractNumUniqueNumericId(),[{level:0,format:la.BULLET,text:"â",alignment:Bn.LEFT,style:{paragraph:{indent:{left:dr(.5),hanging:dr(.25)}}}},{level:1,format:la.BULLET,text:"â",alignment:Bn.LEFT,style:{paragraph:{indent:{left:dr(1),hanging:dr(.25)}}}},{level:2,format:la.BULLET,text:"â ",alignment:Bn.LEFT,style:{paragraph:{indent:{left:2160,hanging:dr(.25)}}}},{level:3,format:la.BULLET,text:"â",alignment:Bn.LEFT,style:{paragraph:{indent:{left:2880,hanging:dr(.25)}}}},{level:4,format:la.BULLET,text:"â",alignment:Bn.LEFT,style:{paragraph:{indent:{left:3600,hanging:dr(.25)}}}},{level:5,format:la.BULLET,text:"â ",alignment:Bn.LEFT,style:{paragraph:{indent:{left:4320,hanging:dr(.25)}}}},{level:6,format:la.BULLET,text:"â",alignment:Bn.LEFT,style:{paragraph:{indent:{left:5040,hanging:dr(.25)}}}},{level:7,format:la.BULLET,text:"â",alignment:Bn.LEFT,style:{paragraph:{indent:{left:5760,hanging:dr(.25)}}}},{level:8,format:la.BULLET,text:"â",alignment:Bn.LEFT,style:{paragraph:{indent:{left:6480,hanging:dr(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new oN({numId:1,abstractNumId:t.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",t);for(const n of e.config)this.abstractNumberingMap.set(n.reference,new sN(this.abstractNumUniqueNumericId(),n.levels)),this.referenceConfigMap.set(n.reference,n.levels)}
836prepForXml(e){for(const t of this.abstractNumberingMap.values())this.root.push(t);for(const t of this.concreteNumberingMap.values())this.root.push(t);return super.prepForXml(e)}createConcreteNumberingInstance(e,t){const n=this.abstractNumberingMap.get(e);if(!n)return;const r=`${e}-${t}`;if(this.concreteNumberingMap.has(r))return;const i=this.referenceConfigMap.get(e),a=i&&i[0].start,o={numId:this.concreteNumUniqueNumericId(),abstractNumId:n.id,reference:e,instance:t,overrideLevels:[typeof a=="number"&&Number.isInteger(a)?{num:0,start:a}:{num:0,start:1}]};this.concreteNumberingMap.set(r,new oN(o))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}const EH=s=>new gt({name:"w:compatSetting",attributes:{version:{key:"w:val",value:s},name:{key:"w:name",value:"compatibilityMode"},uri:{key:"w:uri",value:"http://schemas.microsoft.com/office/word"}}});class DH extends $e{constructor(e){super("w:compat"),e.version&&this.root.push(EH(e.version)),e.useSingleBorderforContiguousCells&&this.root.push(new je("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new je("w:wpJustification",e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new je("w:noTabHangInd",e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new je("w:noLeading",e.noLeading)),e.spaceForUnderline&&this.root.push(new je("w:spaceForUL",e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new je("w:noColumnBalance",e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new je("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new je("w:noExtraLineSpacing",e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new je("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new je("w:ulTrailSpace",e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new je("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new je("w:spacingInWholePoints",e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new je("w:lineWrapLikeWord6",e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new je("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new je("w:printColBlack",e.printColorsBlack)),e.spaceWidth&&this.root.push(new je("w:wpSpaceWidth",e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new je("w:showBreaksInFrames",e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new je("w:subFontBySize",e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new je("w:suppressBottomSpacing",e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new je("w:suppressTopSpacing",e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new je("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new je("w:suppressTopSpacingWP",e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new je("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new je("w:swapBordersFacingPages",e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new je("w:convMailMergeEsc",e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new je("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new je("w:mwSmallCaps",e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new je("w:usePrinterMetrics",e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new je("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new je("w:wrapTrailSpaces",e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new je("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new je("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new je("w:alignTablesRowByRow",e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new je("w:forgetLastTabAlignment",e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new je("w:adjustLineHeightInTable",e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new je("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new je("w:noSpaceRaiseLower",e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new je("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new je("w:layoutRawTableWidth",e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new je("w:layoutTableRowsApart",e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new je("w:useWord97LineBreakRules",e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new je("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables)),e.doNotSnapToGri
836dInCell&&this.root.push(new je("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new je("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new je("w:applyBreakingRules",e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new je("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new je("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new je("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new je("w:growAutofit",e.growAutofit)),e.useFELayout&&this.root.push(new je("w:useFELayout",e.useFELayout)),e.useNormalStyleForList&&this.root.push(new je("w:useNormalStyleForList",e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new je("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new je("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new je("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new je("w:doNotSuppressIndentation",e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new je("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new je("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new je("w:underlineTabInNumList",e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new je("w:displayHangulFixedWidth",e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new je("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new je("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new je("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new je("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new je("w:useAnsiKerningPairs",e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new je("w:cachedColBalance",e.cachedColumnBalance))}}class CH extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}}class AH extends $e{constructor(e){var t,n,r,i,a,o,c,l;super("w:settings"),this.root.push(new CH({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new je("w:displayBackgroundShape",!0)),e.trackRevisions!==void 0&&this.root.push(new je("w:trackRevisions",e.trackRevisions)),e.evenAndOddHeaders!==void 0&&this.root.push(new je("w:evenAndOddHeaders",e.evenAndOddHeaders)),e.updateFields!==void 0&&this.root.push(new je("w:updateFields",e.updateFields)),e.defaultTabStop!==void 0&&this.root.push(new qg("w:defaultTabStop",e.defaultTabStop)),((t=e.hyphenation)==null?void 0:t.autoHyphenation)!==void 0&&this.root.push(new je("w:autoHyphenation",e.hyphenation.autoHyphenation)),((n=e.hyphenation)==null?void 0:n.hyphenationZone)!==void 0&&this.root.push(new qg("w:hyphenationZone",e.hyphenation.hyphenationZone)),((r=e.hyphenation)==null?void 0:r.consecutiveHyphenLimit)!==void 0&&this.root.push(new qg("w:consecutiveHyphenLimit",e.hyphenation.consecutiveHyphenLimit)),((i=e.hyphenation)==null?void 0:i.doNotHyphenate
836Caps)!==void 0&&this.root.push(new je("w:doNotHyphenateCaps",e.hyphenation.doNotHyphenateCaps)),this.root.push(new DH(to(Et({},(a=e.compatibility)!=null?a:{}),{version:(l=(c=(o=e.compatibility)==null?void 0:o.version)!=null?c:e.compatibilityModeVersion)!=null?l:15})))}}class S8 extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{val:"w:val"})}}class kH extends $e{constructor(e){super("w:name"),this.root.push(new S8({val:e}))}}class NH extends $e{constructor(e){super("w:uiPriority"),this.root.push(new S8({val:zr(e)}))}}class FH extends Nt{constructor(){super(...arguments),Be(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}}class E8 extends $e{constructor(e,t){super("w:style"),this.root.push(new FH(e)),t.name&&this.root.push(new kH(t.name)),t.basedOn&&this.root.push(new Ih("w:basedOn",t.basedOn)),t.next&&this.root.push(new Ih("w:next",t.next)),t.link&&this.root.push(new Ih("w:link",t.link)),t.uiPriority!==void 0&&this.root.push(new NH(t.uiPriority)),t.semiHidden!==void 0&&this.root.push(new je("w:semiHidden",t.semiHidden)),t.unhideWhenUsed!==void 0&&this.root.push(new je("w:unhideWhenUsed",t.unhideWhenUsed)),t.quickFormat!==void 0&&this.root.push(new je("w:qFormat",t.quickFormat))}}class wb extends E8{constructor(e){super({type:"paragraph",styleId:e.id},e),Be(this,"paragraphProperties"),Be(this,"runProperties"),this.paragraphProperties=new Jh(e.paragraph),this.runProperties=new ad(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}
836class Gp extends E8{constructor(e){super({type:"character",styleId:e.id},Et({uiPriority:99,unhideWhenUsed:!0},e)),Be(this,"runProperties"),this.runProperties=new ad(e.run),this.root.push(this.runProperties)}}class Hl extends wb{constructor(e){super(Et({basedOn:"Normal",next:"Normal",quickFormat:!0},e))}}class UH extends Hl{constructor(e){super(Et({id:"Title",name:"Title"},e))}}class RH extends Hl{constructor(e){super(Et({id:"Heading1",name:"Heading 1"},e))}}class IH extends Hl{constructor(e){super(Et({id:"Heading2",name:"Heading 2"},e))}}class MH extends Hl{constructor(e){super(Et({id:"Heading3",name:"Heading 3"},e))}}class PH extends Hl{constructor(e){super(Et({id:"Heading4",name:"Heading 4"},e))}}class OH extends Hl{constructor(e){super(Et({id:"Heading5",name:"Heading 5"},e))}}class LH extends Hl{constructor(e){super(Et({id:"Heading6",name:"Heading 6"},e))}}class BH extends Hl{constructor(e){super(Et({id:"Strong",name:"Strong"},e))}}class WH extends wb{constructor(e){super(Et({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}}class jH extends wb{constructor(e){super(Et({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Op.AUTO}},run:{size:20}},e))}}class zH extends Gp{constructor(e){super(Et({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class HH extends Gp{constructor(e){super(Et({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}}class $H extends wb{constructor(e){super(Et({id:"EndnoteText",name:"endnote text",link:"EndnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Op.AUTO}},run:{size:20}},e))}}class KH extends Gp{constructor(e){super(Et({id:"EndnoteReference",name:"endnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}}class XH extends Gp{constructor(e){super(Et({id:"EndnoteTextChar",name:"Endnote Text Char",basedOn:"DefaultParagraphFont",link:"EndnoteText",semiHidden:!0,run:{size:20}},e))}}class VH extends Gp{constructor(e){super(Et({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:o8.SINGLE}}},e))}}class $_ extends $e{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(const t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(const t of e.paragraphStyles)this.root.push(new wb(t));if(e.characterStyles)for(const t of e.characterStyles)this.root.push(new Gp(t))}}class GH extends $e{constructor(e){super("w:pPrDefault"),this.root.push(new Jh(e))}}class qH extends $e{constructor(e){super("w:rPrDefault"),this.root.push(new ad(e))}}class YH extends $e{constructor(e){super("w:docDefaults"),Be(this,"runPropertiesDefaults"),Be(this,"paragraphPropertiesDefaults"),this.runPropertiesDefaults=new qH(e.run),this.paragraphPropertiesDefaults=new GH(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class ZH{newInstance(e){const t=Q6.xml2js(e,{compact:!1});let n;for(const i of t.elements||[])i.name==="w:styles"&&(n=i);if(n===void 0)throw new Error("can not find styles element");const r=n.elements||[];return{initialStyles:new wW(n.attributes),importedStyles:r.map(i=>WD(i))}}}class K_{newInstance(e={}){var t;return{initialStyles:new sw(["mc","r","w","w14","w15"],"w14 w15"),importedStyles:[new YH((t=e.document)!=null?t:{}),new UH(Et({run:{size:56}},e.title)),new RH(Et({run:{color:"2E74B5",size:32}},e.heading1)),new IH(Et({run:{color:"2E74B5",size:26}},e.heading2)),new MH(Et({run:{color:"1F4D78",size:24}},e.heading3)),new PH(Et({run:{color:"2E74B5",italics:!0}},e.heading4)),new OH(Et({run:{color:"2E74B5"}},e.heading5)),new LH(Et({run:{color:"1F4D78"}},e.heading6)),new BH(Et({run:{bold:!0}},e.strong)),new WH(e.listParagraph||{}),new VH(e.hyperlink||{}),new zH(e.footnoteReference||{}),new jH(e.footnoteText||{}),new HH(e.footnoteTextChar||{}),new KH(e.endnoteReference||{}),new $H(e.endnoteText||{}),new XH(e.endnoteTextChar||{})]}}}let JH=class{constructor(e){Be(this,"currentRelationshipId",1),Be(this,"documentWrapper"),Be(this,"headers",[]),Be(this,"footers",[]),Be(this,"coreProperties"),Be(this,"numbering"),Be(this,"media"),Be(this,"fileRelationships"),Be(this,"footnotesWrapper"),Be(this,"endnotesWrapper"),Be(this,"settings"),Be(this,"contentTypes"),Be(this,"customProperties"),Be(this,"appProperties"),Be(this,"styles"),Be(this,"comments"),Be(this,"fontWrapper");var t,n,r,i,a,o,c,l,u,d,h,f,p;if(this.coreProperties=new bz(to(Et({},e),{creator:(t=e.creator)!=null?t:"Un-named",revision:(n=e.revision)!=null?n:1,lastModifiedBy:(r=e.lastModifiedBy)!=null?r:"Un-named"})),this.numbering=new SH(e.numbering?e.numbering:{config:[]}),this.comments=new mj((i=e.comments)!=null?i:{children:[]}),this.fileRelationships=new zl,this.customProperties=new Sz((a=e.customProperties)!=null?a:[]),this.appProperties=new gz,this.footnotesWrapper=new rH,this.endnotesWrapper=new Gz,this.contentTypes=new yz,this.documentWrapper=new jz({background:e.background}),this.settings=new AH({compatibilityModeVersion:e.compatabilityModeVersion,compatibility:e.compatibility,evenAndOddHeaders:!!e.evenAndOddHeaderAndFooters,trackRevisions:(o=e.features)==null?void 0:o.trackRevisions,updateFields:(c=e.features)==null?void 0:c.updateFields,defaultTabStop:e.defaultTabStop,hyphenation:{autoHyphenation:(l=e.hyphenation)==null?void 0:l.autoHyphenation,hyphenationZone:(u=e.hyphenation)==null?void 0:u.hyphenationZone,consecutiveHyphenLimit:(d=e.hyphenation)==null?void 0:d.consecutiveHyphenLimit,doNotHyphenate
836Caps:(h=e.hyphenation)==null?void 0:h.doNotHyphenateCaps}}),this.media=new aH,e.externalStyles!==void 0){const g=new K_().newInstance((f=e.styles)==null?void 0:f.default),v=new ZH().newInstance(e.externalStyles);this.styles=new $_(to(Et({},v),{importedStyles:[...g.importedStyles,...v.importedStyles]}))}else if(e.styles){const g=new K_().newInstance(e.styles.default);this.styles=new $_(Et(Et({},g),e.styles))}else{const y=new K_;this.styles=new $_(y.newInstance())}this.addDefaultRelationships();for(const y of e.sections)this.addSection(y);if(e.footnotes)for(const y in e.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(y),e.footnotes[y].children);if(e.endnotes)for(const y in e.endnotes)this.endnotesWrapper.View.createEndnote(parseFloat(y),e.endnotes[y].children);this.fontWrapper=new h8((p=e.fonts)!=null?p:[])}addSection({headers:e={},footers:t={},children:n,properties:r}){this.documentWrapper.View.Body.addSection(to(Et({},r),{headerWrapperGroup:{default:e.default?this.createHeader(e.default):void 0,first:e.first?this.createHeader(e.first):void 0,even:e.even?this.createHeader(e.even):void 0},footerWrapperGroup:{default:t.default?this.createFooter(t.default):void 0,first:t.first?this.createFooter(t.first):void 0,even:t.even?this.createFooter(t.even):void 0}}));for(const i of n)this.documentWrapper.View.add(i)}createHeader(e){const t=new oH(this.media,this.currentRelationshipId++);for(const n of e.options.children)t.add(n);return this.addHeaderToDocument(t),t}createFooter(e){const t=new Zz(this.media,this.currentRelationshipId++);for(const n of e.options.children)t.add(n);return this.addFooterToDocument(t),t}addHeaderToDocument(e,t=qd.DEFAULT){this.headers.push({header:e,type:t}),this.documentWrapper.Relationships.addRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(e,t=qd.DEFAULT){this.footers.push({footer:e,type:t}),this.documentWrapper.Relationships.addRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){this.fileRelationships.addRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.addRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.addRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.addRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes","endnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments","comments.xml")}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map(e=>e.header)}get Footers(){return this.footers.map(e=>e.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Endnotes(){return this.endnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get FontTable(){return this.fontWrapper}};class QH{constructor(e={children:[]}){Be(this,"options"),this.options=e}}class e${constructor(e={children:[]}){Be(this,"options"),this.options=e}}var t$=OD();function a0(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var X_={exports:{}},aN;function n$(){return aN||(aN=1,(function(s,e){(function(t){s.exports=t()})(function(){return(function t(n,r,i){function a(l,u){if(!r[l]){if(!n[l]){var d=typeof a0=="function"&&a0;if(!u&&d)return d(l,!0);if(o)return o(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var f=r[l]={exports:{}};n[l][0].call(f.exports,function(p){var y=n[l][1][p];return a(y||p)},f,f.exports,t,n,r,i)}return r[l].exports}for(var o=typeof a0=="function"&&a0,c=0;c<i.length;c++)a(i[c]);return a})({1:[function(t,n,r){var i=t("./utils"),a=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 2,654 bytes, line 836
836+/=";r.encode=function(c){for(var l,u,d,h,f,p,y,g=[],b=0,v=c.length,x=v,w=i.getTypeOf(c)!=="string";b<c.length;)x=v-b,d=w?(l=c[b++],u=b<v?c[b++]:0,b<v?c[b++]:0):(l=c.charCodeAt(b++),u=b<v?c.charCodeAt(b++):0,b<v?c.charCodeAt(b++):0),h=l>>2,f=(3&l)<<4|u>>4,p=1<x?(15&u)<<2|d>>6:64,y=2<x?63&d:64,g.push(o.charAt(h)+o.charAt(f)+o.charAt(p)+o.charAt(y));return g.join("")},r.decode=function(c){var l,u,d,h,f,p,y=0,g=0,b="data:";if(c.substr(0,b.length)===b)throw new Error("Invalid base64 input, it looks like a data url.");var v,x=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===o.charAt(64)&&x--,c.charAt(c.length-2)===o.charAt(64)&&x--,x%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=a.uint8array?new Uint8Array(0|x):new Array(0|x);y<c.length;)l=o.indexOf(c.charAt(y++))<<2|(h=o.indexOf(c.charAt(y++)))>>4,u=(15&h)<<4|(f=o.indexOf(c.charAt(y++)))>>2,d=(3&f)<<6|(p=o.indexOf(c.charAt(y++))),v[g++]=l,f!==64&&(v[g++]=u),p!==64&&(v[g++]=d);return v}},{"./support":30,"./utils":32}],2:[function(t,n,r){var i=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),c=t("./stream/DataLengthProbe");function l(u,d,h,f,p){this.compressedSize=u,this.uncompressedSize=d,this.crc32=h,this.compression=f,this.compressedContent=p}l.prototype={getContentWorker:function(){var u=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),d=this;return u.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(u,d,h){return u.pipe(new o).pipe(new c("uncompressedSize")).pipe(d.compressWorker(h)).pipe(new c("compressedSize")).withStreamInfo("compression",d)},n.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,r){var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,r){var i=t("./utils"),a=(function(){for(var o,c=[],l=0;l<256;l++){o=l;for(var u=0;u<8;u++)o=1&o?3988292384^o>>>1:o>>>1;c[l]=o}return c})();n.exports=function(o,c){return o!==void 0&&o.length?i.getTypeOf(o
vendor: 6,512 bytes, lines 836-837
836)!=="string"?(function(l,u,d,h){var f=a,p=h+d;l^=-1;for(var y=h;y<p;y++)l=l>>>8^f[255&(l^u[y])];return-1^l})(0|c,o,o.length,0):(function(l,u,d,h){var f=a,p=h+d;l^=-1;for(var y=h;y<p;y++)l=l>>>8^f[255&(l^u.charCodeAt(y))];return-1^l})(0|c,o,o.length,0):0}},{"./utils":32}],5:[function(t,n,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,n,r){var i=null;i=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:i}},{lie:37}],7:[function(t,n,r){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=t("pako"),o=t("./utils"),c=t("./stream/GenericWorker"),l=i?"uint8array":"array";function u(d,h){c.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=h,this.meta={}}r.magic="\b\0",o.inherits(u,c),u.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(l,d.data),!1)},u.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(h){d.push({data:h,meta:d.meta})}},r.compressWorker=function(d){return new u("Deflate",d)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,r){function i(f,p){var y,g="";for(y=0;y<p;y++)g+=String.fromCharCode(255&f),f>>>=8;return g}function a(f,p,y,g,b,v){var x,w,_=f.file,T=f.compression,S=v!==l.utf8encode,C=o.transformTo("string",v(_.name)),D=o.transformTo("string",l.utf8encode(_.name)),N=_.comment,M=o.transformTo("string",v(N)),F=o.transformTo("string",l.utf8encode(N)),L=D.length!==_.name.length,A=F.length!==N.length,X="",he="",j="",ee=_.dir,O=_.date,pe={crc32:0,compressedSize:0,uncompressedSize:0};p&&!y||(pe.crc32=f.crc32,pe.compressedSize=f.compressedSize,pe.uncompressedSize=f.uncompressedSize);var q=0;p&&(q|=8),S||!L&&!A||(q|=2048);var B=0,re=0;ee&&(B|=16),b==="UNIX"?(re=798,B|=(function(ge,ie){var P=ge;return ge||(P=ie?16893:33204),(65535&P)<<16})(_.unixPermissions,ee)):(re=20,B|=(function(ge){return 63&(ge||0)})(_.dosPermissions)),x=O.getUTCHours(),x<<=6,x|=O.getUTCMinutes(),x<<=5,x|=O.getUTCSeconds()/2,w=O.getUTCFullYear()-1980,w<<=4,w|=O.getUTCMonth()+1,w<<=5,w|=O.getUTCDate(),L&&(he=i(1,1)+i(u(C),4)+D,X+="up"+i(he.length,2)+he),A&&(j=i(1,1)+i(u(M),4)+F,X+="uc"+i(j.length,2)+j);var le="";return le+=` 837\0`,le+=i(q,2),le+=T.magic,le+=i(x,2),le+=i(w,2),le+=i(pe.crc32,4),le+=i(pe.compressedSize,4),le+=i(pe.uncompressedSize,4),le+=i(C.length,2),le+=i(X.length,2),{fileRecord:d.LOCAL_FILE_HEADER+le+C+X,dirRecord:d.CENTRAL_FILE_HEADER+i(re,2)+le+i(M.length,2)+"\0\0\0\0"+i(B,4)+i(g,4)+C+X+M}}var o=t("../utils"),c=t("../stream/GenericWorker"),l=t("../utf8"),u=t("../crc32"),d=t("../signature");function h(f,p,y,g){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=p,this.zipPlatform=y,this.encodeFileName=g,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(h,c),h.prototype.push=function(f){var p=f.meta.percent||0,y=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,c.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:y?(p+100*(y-g-1))/y:100}}))},h.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var p=this.streamFiles&&!f.file.dir;if(p){var y=a(f,p,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:y.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(f){this.accumulate=!1;var p=this.streamFiles&&!f.file.dir,y=a(f,p,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(y.dirRecord),p)this.push({data:(function(g){return d.DATA_DESCRIPTOR+i(g.crc32,4)+i(g.compressedSize,4)+i(g.uncompressedSize,4)})(f),meta:{percent:100}});else for(this.push({data:y.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var f=this.bytesWritten,p=0;p<this.dirRecords.length;p++)this.push({data:this.dirRecords[p],meta:{percent:100}});var y=this.bytesWritten-f,g=(function(b,v,x,w,_){var T=o.transformTo("string",_(w));return d.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(b,2)+i(b,2)+i(v,4)+i(x,4)+i(T.length,2)+T})(this.dirRecords.length,y,f,this.zipComment,this.encodeFileName);this.push({data:g,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(f){this._sources.push(f);var p=this;return f.on("data",function(y){p.processChunk(y)}),f.on("end",function(){p.closedSource(p.previous.streamInfo),p._sources.length?p.prepareNextSource():p.end()}),f.on("error",function(y){p.error(y)}),this},h.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(f){var p=this._sources;if(!c.prototype.error.call(this,f))return!1;for(var y=0;y<p.length;y++)try{p[y].error(f)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var f=this._sources,p=0;p<f.length;p++)f[p].lock()},n.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,n,r){var i=t("../compressions"),a=t("./ZipFileWorker");r.generateWorker=function(o,c,l){var u=new a(c.streamFiles,l,c.platform,c.encodeFileName),d=0;try{o.forEach(function(h,f){d++;var p=(function(v,x){var w=v||x,_=i[w];if(!_)throw new Error(w+" is not a valid compression method !");return _})(f.options.compression,c.compression),y=f.options.compressionOptions||c.compressionOptions||{},g=f.dir,b=f.date;f._compressWorker(p,y).withStreamInfo("file",{name:h,dir:g,date:b,comment:f.comment||"",unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions}).pipe(u)}
vendor: 43,761 bytes, line 837
837),u.entriesCount=d}catch(h){u.error(h)}return u}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,n,r){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var a=new i;for(var o in this)typeof this[o]!="function"&&(a[o]=this[o]);return a}}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.10.1",i.loadAsync=function(a,o){return new i().loadAsync(a,o)},i.external=t("./external"),n.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,n,r){var i=t("./utils"),a=t("./external"),o=t("./utf8"),c=t("./zipEntries"),l=t("./stream/Crc32Probe"),u=t("./nodejsUtils");function d(h){return new a.Promise(function(f,p){var y=h.decompressed.getContentWorker().pipe(new l);y.on("error",function(g){p(g)}).on("end",function(){y.streamInfo.crc32!==h.decompressed.crc32?p(new Error("Corrupted zip : CRC32 mismatch")):f()}).resume()})}n.exports=function(h,f){var p=this;return f=i.extend(f||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(h)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",h,!0,f.optimizedBinaryString,f.base64).then(function(y){var g=new c(f);return g.load(y),g}).then(function(y){var g=[a.Promise.resolve(y)],b=y.files;if(f.checkCRC32)for(var v=0;v<b.length;v++)g.push(d(b[v]));return a.Promise.all(g)}).then(function(y){for(var g=y.shift(),b=g.files,v=0;v<b.length;v++){var x=b[v],w=x.fileNameStr,_=i.resolve(x.fileNameStr);p.file(_,x.decompressed,{binary:!0,optimizedBinaryString:!0,date:x.date,dir:x.dir,comment:x.fileCommentStr.length?x.fileCommentStr:null,unixPermissions:x.unixPermissions,dosPermissions:x.dosPermissions,createFolders:f.createFolders}),x.dir||(p.file(_).unsafeOriginalName=w)}return g.zipComment.length&&(p.comment=g.zipComment),p})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,n,r){var i=t("../utils"),a=t("../stream/GenericWorker");function o(c,l){a.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(l)}i.inherits(o,a),o.prototype._bindStream=function(c){var l=this;(this._stream=c).pause(),c.on("data",function(u){l.push({data:u,meta:{percent:0}})}).on("error",function(u){l.isPaused?this.generatedError=u:l.error(u)}).on("end",function(){l.isPaused?l._upstreamEnded=!0:l.end()})},o.prototype.pause=function(){return!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,n,r){var i=t("readable-stream").Readable;function a(o,c,l){i.call(this,c),this._helper=o;var u=this;o.on("data",function(d,h){u.push(d)||u._helper.pause(),l&&l(h)}).on("error",function(d){u.emit("error",d)}).on("end",function(){u.push(null)})}t("../utils").inherits(a,i),a.prototype._read=function(){this._helper.resume()},n.exports=a},{"../utils":32,"readable-stream":16}],14:[function(t,n,r){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,a){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,a);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,a)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var a=new Buffer(i);return a.fill(0),a},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(t,n,r){function i(_,T,S){var C,D=o.getTypeOf(T),N=o.extend(S||{},u);N.date=N.date||new Date,N.compression!==null&&(N.compression=N.compression.toUpperCase()),typeof N.unixPermissions=="string"&&(N.unixPermissions=parseInt(N.unixPermissions,8)),N.unixPermissions&&16384&N.unixPermissions&&(N.dir=!0),N.dosPermissions&&16&N.dosPermissions&&(N.dir=!0),N.dir&&(_=b(_)),N.createFolders&&(C=g(_))&&v.call(this,C,!0);var M=D==="string"&&N.binary===!1&&N.base64===!1;S&&S.binary!==void 0||(N.binary=!M),(T instanceof d&&T.uncompressedSize===0||N.dir||!T||T.length===0)&&(N.base64=!1,N.binary=!0,T="",N.compression="STORE",D="string");var F=null;F=T instanceof d||T instanceof c?T:p.isNode&&p.isStream(T)?new y(_,T):o.prepareContent(_,T,N.binary,N.optimizedBinaryString,N.base64);var L=new h(_,F,N);this.files[_]=L}var a=t("./utf8"),o=t("./utils"),c=t("./stream/GenericWorker"),l=t("./stream/StreamHelper"),u=t("./defaults"),d=t("./compressedObject"),h=t("./zipObject"),f=t("./generate"),p=t("./nodejsUtils"),y=t("./nodejs/NodejsStreamInputAdapter"),g=function(_){_.slice(-1)==="/"&&(_=_.substring(0,_.length-1));var T=_.lastIndexOf("/");return 0<T?_.substring(0,T):""},b=function(_){return _.slice(-1)!=="/"&&(_+="/"),_},v=function(_,T){return T=T!==void 0?T:u.createFolders,_=b(_),this.files[_]||i.call(this,_,null,{dir:!0,createFolders:T}),this.files[_]};function x(_){return Object.prototype.toString.call(_)==="[object RegExp]"}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(_){var T,S,C;for(T in this.files)C=this.files[T],(S=T.slice(this.root.length,T.length))&&T.slice(0,this.root.length)===this.root&&_(S,C)},filter:function(_){var T=[];return this.forEach(function(S,C){_(S,C)&&T.push(C)}),T},file:function(_,T,S){if(arguments.length!==1)return _=this.root+_,i.call(this,_,T,S),this;if(x(_)){var C=_;return this.filter(function(N,M){return!M.dir&&C.test(N)})}var D=this.files[this.root+_];return D&&!D.dir?D:null},folder:function(_){if(!_)return this;if(x(_))return this.filter(function(D,N){return N.dir&&_.test(D)});var T=this.root+_,S=v.call(this,T),C=this.clone();return C.root=S.name,C},remove:function(_){_=this.root+_;var T=this.files[_];if(T||(_.slice(-1)!=="/"&&(_+="/"),T=this.files[_]),T&&!T.dir)delete this.files[_];else for(var S=this.filter(function(D,N){return N.name.slice(0,_.length)===_}),C=0;C<S.length;C++)delete this.files[S[C].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(_){var T,S={};try{if((S=o.extend(_||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=S.type.toLowerCase(),S.compression=S.compression.toUpperCase(),S.type==="binarystring"&&(S.type="string"),!S.type)throw new Error("No output type specified.");o.checkSupport(S.type),S.platform!=="darwin"&&S.platform!=="freebsd"&&S.platform!=="linux"&&S.platform!=="sunos"||(S.platform="UNIX"),S.platform==="win32"&&(S.platform="DOS");var C=S.comment||this.comment||"";T=f.generateWorker(this,S,C)}catch(D){(T=new c("error")).error(D)}return new l(T,S.type||"string",S.mimeType)},generateAsync:function(_,T){return this.generateInternalStream(_).accumulate(T)},generateNodeStream:function(_,T){return(_=_||{}).type||(_.type="nodebuffer"),this.generateInternalStream(_).toNodejsStream(T)}};n.exports=w},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,n,r){n.exports=t("stream")},{stream:void 0}],17:[function(t,n,r){var i=t("./DataReader");function a(o){i.call(this,o);for(var c=0;c<this.data.length;c++)o[c]=255&o[c]}t("../utils").inherits(a,i),a.prototype.byteAt=function(o){return this.data[this.zero+o]},a.prototype.lastIndexOfSignature=function(o){for(var c=o.charCodeAt(0),l=o.charCodeAt(1),u=o.charCodeAt(2),d=o.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===c&&this.data[h+1]===l&&this.data[h+2]===u&&this.data[h+3]===d)return h-this.zero;return-1},a.prototype.readAndCheckSignature=function(o){var c=o.charCodeAt(0),l=o.charCodeAt(1),u=o.charCodeAt(2),d=o.charCodeAt(3),h=this.readData(4);return c===h[0]&&l===h[1]&&u===h[2]&&d===h[3]},a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},n.exports=a},{"../utils":32,"./DataReader":18}],18:[function(t,n,r){var i=t("../utils");function a(o){this.data=o,this.length=o.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(o){this.checkIndex(this.index+o)},checkIndex:function(o){if(this.length<this.zero+o||o<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+o+"). Corrupted zip ?")},setIndex:function(o){this.checkIndex(o),this.index=o},skip:function(o){this.setIndex(this.index+o)},byteAt:function(){},readInt:function(o){var c,l=0;for(this.checkOffset(o),c=this.index+o-1;c>=this.index;c--)l=(l<<8)+this.byteAt(c);return this.index+=o,l},readString:function(o){return i.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},n.exports=a},{"../utils":32}],19:[function(t,n,r){var i=t("./Uint8ArrayReader");function a(o){i.call(this,o)}t("../utils").inherits(a,i),a.prototype.readData=function(o){this.checkOffset(o);var c=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},n.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,r){var i=t("./DataReader");function a(o){i.call(this,o)}t("../utils").inherits(a,i),a.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},a.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},a.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},a.prototype.readData=function(o){this.checkOffset(o);var c=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},n.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,n,r){var i=t("./ArrayReader");function a(o){i.call(this,o)}t("../utils").inherits(a,i),a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},n.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,r){var i=t("../utils"),a=t("../support"),o=t("./ArrayReader"),c=t("./StringReader"),l=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");n.exports=function(d){var h=i.getTypeOf(d);return i.checkSupport(h),h!=="string"||a.uint8array?h==="nodebuffer"?new l(d):a.uint8array?new u(i.transformTo("uint8array",d)):new o(i.transformTo("array",d)):new c(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,r){r.LOCAL_FILE_HEADER="PK��",r.CENTRAL_FILE_HEADER="PK��",r.CENTRAL_DIRECTORY_END="PK��",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",r.ZIP64_CENTRAL_DIRECTORY_END="PK��",r.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,r){var i=t("./GenericWorker"),a=t("../utils");function o(c){i.call(this,"ConvertWorker to "+c),this.destType=c}a.inherits(o,i),o.prototype.processChunk=function(c){this.push({data:a.transformTo(this.destType,c.data),meta:c.meta})},n.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,r){var i=t("./GenericWorker"),a=t("../crc32");function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,i),o.prototype.processChunk=function(c){this.streamInfo.crc32=a(c.data,this.streamInfo.crc32||0),this.push(c)},n.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,r){var i=t("../utils"),a=t("./GenericWorker");function o(c){a.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}i.inherits(o,a),o.prototype.processChunk=function(c){if(c){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+c.data.length}a.prototype.processChunk.call(this,c)},n.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,r){var i=t("../utils"),a=t("./GenericWorker");function o(c){a.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(u){l.dataIsReady=!0,l.data=u,l.max=u&&u.length||0,l.type=i.getTypeOf(u),l.isPaused||l._tickAndRepeat()},function(u){l.error(u)})}i.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,l);break;case"uint8array":c=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":c=this.data.slice(this.index,l)}return this.index=l,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,r){function i(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,o){return this._listeners[a].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,o){if(this._listeners[a])for(var c=0;c<this._listeners[a].length;c++)this._listeners[a][c].call(this,o)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var o=this;return a.on("data",function(c){o.processChunk(c)}),a.on("end",function(){o.end()}),a.on("error",function(c){o.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var a=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,o){return this.extraStreamInfo[a]=o,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},n.exports=i},{}],29:[function(t,n,r){var i=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),c=t("../base64"),l=t("../support"),u=t("../external"),d=null;if(l.nodestream)try{d=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(p,y){return new u.Promise(function(g,b){var v=[],x=p._internalType,w=p._outputType,_=p._mimeType;p.on("data",function(T,S){v.push(T),y&&y(S)}).on("error",function(T){v=[],b(T)}).on("end",function(){try{var T=(function(S,C,D){switch(S){case"blob":return i.newBlob(i.transformTo("arraybuffer",C),D);case"base64":return c.encode(C);default:return i.transformTo(S,C)}})(w,(function(S,C){var D,N=0,M=null,F=0;for(D=0;D<C.length;D++)F+=C[D].length;switch(S){case"string":return C.join("");case"array":return Array.prototype.concat.apply([],C);case"uint8array":for(M=new Uint8Array(F),D=0;D<C.length;D++)M.set(C[D],N),N+=C[D].length;return M;case"nodebuffer":return Buffer.concat(C);default:throw new Error("concat : unsupported type '"+S+"'")}})(x,v),_);g(T)}catch(S){b(S)}v=[]}).resume()})}function f(p,y,g){var b=y;switch(y){case"blob":case"arraybuffer":b="uint8array";break;case"base64":b="string"}try{this._internalType=b,this._outputType=y,this._mimeType=g,i.checkSupport(b),this._worker=p.pipe(new a(b)),p.lock()}catch(v){this._worker=new o("error"),this._worker.error(v)}}f.prototype={accumulate:function(p){return h(this,p)},on:function(p,y){var g=this;return p==="data"?this._worker.on(p,function(b){y.call(g,b.data,b.meta)}):this._worker.on(p,function(){i.delay(y,arguments,g)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(p){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:this._outputType!=="nodebuffer"},p)}},n.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,n,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",r.nodebuffer=typeof Buffer<"u",r.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")r.blob=!1;else{var i=new ArrayBuffer(0);try{r.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(i),r.blob=a.getBlob("application/zip").size===0}catch{r.blob=!1}}}try{r.nodestream=!!t("readable-stream").Readable}catch{r.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,r){for(var i=t("./utils"),a=t("./support"),o=t("./nodejsUtils"),c=t("./stream/GenericWorker"),l=new Array(256),u=0;u<256;u++)l[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;l[254]=l[254]=1;function d(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}r.utf8encode=function(f){return a.nodebuffer?o.newBufferFrom(f,"utf-8"):(function(p){var y,g,b,v,x,w=p.length,_=0;for(v=0;v<w;v++)(64512&(g=p.charCodeAt(v)))==55296&&v+1<w&&(64512&(b=p.charCodeAt(v+1)))==56320&&(g=65536+(g-55296<<10)+(b-56320),v++),_+=g<128?1:g<2048?2:g<65536?3:4;for(y=a.uint8array?new Uint8Array(_):new Array(_),v=x=0;x<_;v++)(64512&(g=p.charCodeAt(v)))==55296&&v+1<w&&(64512&(b=p.charCodeAt(v+1)))==56320&&(g=65536+(g-55296<<10)+(b-56320),v++),g<128?y[x++]=g:(g<2048?y[x++]=192|g>>>6:(g<65536?y[x++]=224|g>>>12:(y[x++]=240|g>>>18,y[x++]=128|g>>>12&63),y[x++]=128|g>>>6&63),y[x++]=128|63&g);return y})(f)},r.utf8decode=function(f){return a.nodebuffer?i.transformTo("nodebuffer",f).toString("utf-8"):(function(p){var y,g,b,v,x=p.length,w=new Array(2*x);for(y=g=0;y<x;)if((b=p[y++])<128)w[g++]=b;else if(4<(v=l[b]))w[g++]=65533,y+=v-1;else{for(b&=v===2?31:v===3?15:7;1<v&&y<x;)b=b<<6|63&p[y++],v--;1<v?w[g++]=65533:b<65536?w[g++]=b:(b-=65536,w[g++]=55296|b>>10&1023,w[g++]=56320|1023&b)}return w.length!==g&&(w.subarray?w=w.subarray(0,g):w.length=g),i.applyFromCharCode(w)})(f=i.transformTo(a.uint8array?"uint8array":"array",f))},i.inherits(d,c),d.prototype.processChunk=function(f){var p=i.transformTo(a.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var y=p;(p=new Uint8Array(y.length+this.leftOver.length)).set(this.leftOver,0),p.set(y,this.leftOver.length)}else p=this.leftOver.concat(p);this.leftOver=null}var g=(function(v,x){var w;for((x=x||v.length)>v.length&&(x=v.length),w=x-1;0<=w&&(192&v[w])==128;)w--;return w<0||w===0?x:w+l[v[w]]>x?w:x})(p),b=p;g!==p.length&&(a.uint8array?(b=p.subarray(0,g),this.leftOver=p.subarray(g,p.length)):(b=p.slice(0,g),this.leftOver=p.slice(g,p.length))),this.push({data:r.utf8decode(b),meta:f.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=d,i.inherits(h,c),h.prototype.processChunk=function(f){this.push({data:r.utf8encode(f.data),meta:f.meta})},r.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,r){var i=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),c=t("./external");function l(y){return y}function u(y,g){for(var b=0;b<y.length;++b)g[b]=255&y.charCodeAt(b);return g}t("setimmediate"),r.newBlob=function(y,g){r.checkSupport("blob");try{return new Blob([y],{type:g})}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return b.append(y),b.getBlob(g)}catch{throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(y,g,b){var v=[],x=0,w=y.length;if(w<=b)return String.fromCharCode.apply(null,y);for(;x<w;)g==="array"||g==="nodebuffer"?v.push(String.fromCharCode.apply(null,y.slice(x,Math.min(x+b,w)))):v.push(String.fromCharCode.apply(null,y.subarray(x,Math.min(x+b,w)))),x+=b;return v.join("")},stringifyByChar:function(y){for(var g="",b=0;b<y.length;b++)g+=String.fromCharCode(y[b]);return g},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,o.allocBuffer(1)).length===1}catch{return!1}})()}};function h(y){var g=65536,b=r.getTypeOf(y),v=!0;if(b==="uint8array"?v=d.applyCanBeUsed.uint8array:b==="nodebuffer"&&(v=d.applyCanBeUsed.nodebuffer),v)for(;1<g;)try{return d.stringifyByChunk(y,b,g)}catch{g=Math.floor(g/2)}return d.stringifyByChar(y)}function f(y,g){for(var b=0;b<y.length;b++)g[b]=y[b];return g}r.applyFromCharCode=h;var p={};p.string={string:l,array:function(y){return u(y,new Array(y.length))},arraybuffer:function(y){return p.string.uint8array(y).buffer},uint8array:function(y){return u(y,new Uint8Array(y.length))},nodebuffer:function(y){return u(y,o.allocBuffer(y.length))}},p.array={string:h,array:l,arraybuffer:function(y){return new Uint8Array(y).buffer},uint8array:function(y){return new Uint8Array(y)},nodebuffer:function(y){return o.newBufferFrom(y)}},p.arraybuffer={string:function(y){return h(new Uint8Array(y))},array:function(y){return f(new Uint8Array(y),new Array(y.byteLength))},arraybuffer:l,uint8array:function(y){return new Uint8Array(y)},nodebuffer:function(y){return o.newBufferFrom(new Uint8Array(y))}},p.uint8array={string:h,array:function(y){return f(y,new Array(y.length))},arraybuffer:function(y){return y.buffer},uint8array:l,nodebuffer:function(y){return o.newBufferFrom(y)}},p.nodebuffer={string:h,array:function(y){return f(y,new Array(y.length))},arraybuffer:function(y){return p.nodebuffer.uint8array(y).buffer},uint8array:function(y){return f(y,new Uint8Array(y.length))},nodebuffer:l},r.transformTo=function(y,g){if(g=g||"",!y)return g;r.checkSupport(y);var b=r.getTypeOf(g);return p[b][y](g)},r.resolve=function(y){for(var g=y.split("/"),b=[],v=0;v<g.length;v++){var x=g[v];x==="."||x===""&&v!==0&&v!==g.length-1||(x===".."?b.pop():b.push(x))}return b.join("/")},r.getTypeOf=function(y){return typeof y=="string"?"string":Object.prototype.toString.call(y)==="[object Array]"?"array":i.nodebuffer&&o.isBuffer(y)?"nodebuffer":i.uint8array&&y instanceof Uint8Array?"uint8array":i.arraybuffer&&y instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(y){if(!i[y.toLowerCase()])throw new Error(y+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(y){var g,b,v="";for(b=0;b<(y||"").length;b++)v+="\\x"+((g=y.charCodeAt(b))<16?"0":"")+g.toString(16).toUpperCase();return v},r.delay=function(y,g,b){setImmediate(function(){y.apply(b||null,g||[])})},r.inherits=function(y,g){function b(){}b.prototype=g.prototype,y.prototype=new b},r.extend=function(){var y,g,b={};for(y=0;y<arguments.length;y++)for(g in arguments[y])Object.prototype.hasOwnProperty.call(arguments[y],g)&&b[g]===void 0&&(b[g]=arguments[y][g]);return b},r.prepareContent=function(y,g,b,v,x){return c.Promise.resolve(g).then(function(w){return i.blob&&(w instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(w))!==-1)&&typeof FileReader<"u"?new c.Promise(function(_,T){var S=new FileReader;S.onload=function(C){_(C.target.result)},S.onerror=function(C){T(C.target.error)},S.readAsArrayBuffer(w)}):w}).then(function(w){var _=r.getTypeOf(w);return _?(_==="arraybuffer"?w=r.transformTo("uint8array",w):_==="string"&&(x?w=a.decode(w):b&&v!==!0&&(w=(function(T){return u(T,i.uint8array?new Uint8Array(T.length):new Array(T.length))})(w))),w):c.Promise.reject(new Error("Can't read the data of '"+y+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,n,r){var i=t("./reader/readerFor"),a=t("./utils"),o=t("./signature"),c=t("./zipEntry"),l=t("./support");function u(d){this.files=[],this.loadOptions=d}u.prototype={checkSignature:function(d){if(!this.reader.readAndCheckSignature(d)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(h)+", expected "+a.pretty(d)+")")}},isSignature:function(d,h){var f=this.reader.index;this.reader.setIndex(d);var p=this.reader.readString(4)===h;return this.reader.setIndex(f),p},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var d=this.reader.readData(this.zipCommentLength),h=l.uint8array?"uint8array":"array",f=a.transformTo(h,d);this.zipComment=this.loadOptions.decodeFileName(f)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var d,h,f,p=this.zip64EndOfCentralSize-44;0<p;)d=this.reader.readInt(2),h=this.reader.readInt(4),f=this.reader.readData(h),this.zip64ExtensibleData[d]={id:d,length:h,value:f}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var d,h;for(d=0;d<this.files.length;d++)h=this.files[d],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var d;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(d=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(d);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var d=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(d<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(d);var h=d;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,(d=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(d),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var f=this.centralDirOffset+this.centralDirSize;this.zip64&&(f+=20,f+=12+this.zip64EndOfCentralSize);var p=h-f;if(0<p)this.isSignature(h,o.CENTRAL_FILE_HEADER)||(this.reader.zero=p);else if(p<0)throw new Error("Corrupted zip: missing "+Math.abs(p)+" bytes.")},prepareReader:function(d){this.reader=i(d)},load:function(d){this.prepareReader(d),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,n,r){var i=t("./reader/readerFor"),a=t("./utils"),o=t("./compressedObject"),c=t("./crc32"),l=t("./utf8"),u=t("./compressions"),d=t("./support");function h(f,p){this.options=f,this.loadOptions=p}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(f){var p,y;if(f.skip(22),this.fileNameLength=f.readInt(2),y=f.readInt(2),this.fileName=f.readData(this.fileNameLength),f.skip(y),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((p=(function(g){for(var b in u)if(Object.prototype.hasOwnProperty.call(u,b)&&u[b].magic===g)return u[b];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,p,f.readData(this.compressedSize))},readCentralPart:function(f){this.versionMadeBy=f.readInt(2),f.skip(2),this.bitFlag=f.readInt(2),this.compressionMethod=f.readString(2),this.date=f.readDate(),this.crc32=f.readInt(4),this.compressedSize=f.readInt(4),this.uncompressedSize=f.readInt(4);var p=f.readInt(2);if(this.extraFieldsLength=f.readInt(2),this.fileCommentLength=f.readInt(2),this.diskNumberStart=f.readInt(2),this.internalFileAttributes=f.readInt(2),this.externalFileAttributes=f.readInt(4),this.localHeaderOffset=f.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");f.skip(p),this.readExtraFields(f),this.parseZIP64ExtraField(f),this.fileComment=f.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var f=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var p,y,g,b=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4<b;)p=f.readInt(2),y=f.readInt(2),g=f.readData(y),this.extraFields[p]={id:p,length:y,value:g};f.setIndex(b)},handleUTF8:function(){var f=d.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=l.utf8decode(this.fileName),this.fileCommentStr=l.utf8decode(this.fileComment);else{var p=this.findExtraFieldUnicodePath();if(p!==null)this.fileNameStr=p;else{var y=a.transformTo(f,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(y)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var b=a.transformTo(f,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(b)}}},findExtraFieldUnicodePath:function(){var f=this.extraFields[28789];if(f){var p=i(f.value);return p.readInt(1)!==1||c(this.fileName)!==p.readInt(4)?null:l.utf8decode(p.readData(f.length-5))}return null},findExtraFieldUnicodeComment:function(){var f=this.extraFields[25461];if(f){var p=i(f.value);return p.readInt(1)!==1||c(this.fileComment)!==p.readInt(4)?null:l.utf8decode(p.readData(f.length-5))}return null}},n.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,n,r){function i(p,y,g){this.name=p,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=y,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}}var a=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),c=t("./utf8"),l=t("./compressedObject"),u=t("./stream/GenericWorker");i.prototype={internalStream:function(p){var y=null,g="string";try{if(!p)throw new Error("No output type specified.");var b=(g=p.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),y=this._decompressWorker();var v=!this._dataBinary;v&&!b&&(y=y.pipe(new c.Utf8EncodeWorker)),!v&&b&&(y=y.pipe(new c.Utf8DecodeWorker))}catch(x){(y=new u("error")).error(x)}return new a(y,g,"")},async:function(p,y){return this.internalStream(p).accumulate(y)},nodeStream:function(p,y){return this.internalStream(p||"nodebuffer").toNodejsStream(y)},_compressWorker:function(p,y){if(this._data instanceof l&&this._data.compression.magic===p.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new c.Utf8EncodeWorker)),l.createWorkerFrom(g,p,y)},_decompressWorker:function(){return this._data instanceof l?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var d=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<d.length;f++)i.prototype[d[f]]=h;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,n,r){(function(i){var a,o,c=i.MutationObserver||i.WebKitMutationObserver;if(c){var l=0,u=new c(p),d=i.document.createTextNode("");u.observe(d,{characterData:!0}),a=function(){d.data=l=++l%2}}else if(i.setImmediate||i.MessageChannel===void 0)a="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var y=i.document.createElement("script");y.onreadystatechange=function(){p(),y.onreadystatechange=null,y.parentNode.removeChild(y),y=null},i.document.documentElement.appendChild(y)}:function(){setTimeout(p,0)};else{var h=new i.MessageChannel;h.port1.onmessage=p,a=function(){h.port2.postMessage(0)}}var f=[];function p(){var y,g;o=!0;for(var b=f.length;b;){for(g=f,f=[],y=-1;++y<b;)g[y]();b=f.length}o=!1}n.exports=function(y){f.push(y)!==1||o||a()}}).call(this,typeof _s<"u"?_s:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,n,r){var i=t("immediate");function a(){}var o={},c=["REJECTED"],l=["FULFILLED"],u=["PENDING"];function d(b){if(typeof b!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,b!==a&&y(this,b)}function h(b,v,x){this.promise=b,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof x=="function"&&(this.onRejected=x,this.callRejected=this.otherCallRejected)}function f(b,v,x){i(function(){var w;try{w=v(x)}catch(_){return o.reject(b,_)}w===b?o.reject(b,new TypeError("Cannot resolve promise with itself")):o.resolve(b,w)})}function p(b){var v=b&&b.then;if(b&&(typeof b=="object"||typeof b=="function")&&typeof v=="function")return function(){v.apply(b,arguments)}}function y(b,v){var x=!1;function w(S){x||(x=!0,o.reject(b,S))}function _(S){x||(x=!0,o.resolve(b,S))}var T=g(function(){v(_,w)});T.status==="error"&&w(T.value)}function g(b,v){var x={};try{x.value=b(v),x.status="success"}catch(w){x.status="error",x.value=w}return x}(n.exports=d).prototype.finally=function(b){if(typeof b!="function")return this;var v=this.constructor;return this.then(function(x){return v.resolve(b()).then(function(){return x})},function(x){return v.resolve(b()).then(function(){throw x})})},d.prototype.catch=function(b){return this.then(null,b)},d.prototype.then=function(b,v){if(typeof b!="function"&&this.state===l||typeof v!="function"&&this.state===c)return this;var x=new this.constructor(a);return this.state!==u?f(x,this.state===l?b:v,this.outcome):this.queue.push(new h(x,b,v)),x},h.prototype.callFulfilled=function(b){o.resolve(this.promise,b)},h.prototype.otherCallFulfilled=function(b){f(this.promise,this.onFulfilled,b)},h.prototype.callRejected=function(b){o.reject(this.promise,b)},h.prototype.otherCallRejected=function(b){f(this.promise,this.onRejected,b)},o.resolve=function(b,v){var x=g(p,v);if(x.status==="error")return o.reject(b,x.value);var w=x.value;if(w)y(b,w);else{b.state=l,b.outcome=v;for(var _=-1,T=b.queue.length;++_<T;)b.queue[_].callFulfilled(v)}return b},o.reject=function(b,v){b.state=c,b.outcome=v;for(var x=-1,w=b.queue.length;++x<w;)b.queue[x].callRejected(v);return b},d.resolve=function(b){return b instanceof this?b:o.resolve(new this(a),b)},d.reject=function(b){var v=new this(a);return o.reject(v,b)},d.all=function(b){var v=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=b.length,w=!1;if(!x)return this.resolve([]);for(var _=new Array(x),T=0,S=-1,C=new this(a);++S<x;)D(b[S],S);return C;function D(N,M){v.resolve(N).then(function(F){_[M]=F,++T!==x||w||(w=!0,o.resolve(C,_))},function(F){w||(w=!0,o.reject(C,F))})}},d.race=function(b){var v=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=b.length,w=!1;if(!x)return this.resolve([]);for(var _=-1,T=new this(a);++_<x;)S=b[_],v.resolve(S).then(function(C){w||(w=!0,o.resolve(T,C))},function(C){w||(w=!0,o.reject(T,C))});var S;return T}},{immediate:36}],38:[function(t,n,r){var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),n.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,n,r){var i=t("./zlib/deflate"),a=t("./utils/common"),o=t("./utils/strings"),c=t("./zlib/messages"),l=t("./zlib/zstream"),u=Object.prototype.toString,d=0,h=-1,f=0,p=8;function y(b){if(!(this instanceof y))return new y(b);this.options=a.assign({level:h,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},b||{});var v=this.options;v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&v.windowBits<16&&(v.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var x=i.deflateInit2(this.strm,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(x!==d)throw new Error(c[x]);if(v.header&&i.deflateSetHeader(this.strm,v.header),v.dictionary){var w;if(w=typeof v.dictionary=="string"?o.string2buf(v.dictionary):u.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(x=i.deflateSetDictionary(this.strm,w))!==d)throw new Error(c[x]);this._dict_set=!0}}function g(b,v){var x=new y(v);if(x.push(b,!0),x.err)throw x.msg||c[x.err];return x.result}y.prototype.push=function(b,v){var x,w,_=this.strm,T=this.options.chunkSize;if(this.ended)return!1;w=v===~~v?v:v===!0?4:0,typeof b=="string"?_.input=o.string2buf(b):u.call(b)==="[object ArrayBuffer]"?_.input=new Uint8Array(b):_.input=b,_.next_in=0,_.avail_in=_.input.length;do{if(_.avail_out===0&&(_.output=new a.Buf8(T),_.next_out=0,_.avail_out=T),(x=i.deflate(_,w))!==1&&x!==d)return this.onEnd(x),!(this.ended=!0);_.avail_out!==0&&(_.avail_in!==0||w!==4&&w!==2)||(this.options.to==="string"?this.onData(o.buf2binstring(a.shrinkBuf(_.output,_.next_out))):this.onData(a.shrinkBuf(_.output,_.next_out)))}while((0<_.avail_in||_.avail_out===0)&&x!==1);return w===4?(x=i.deflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===d):w!==2||(this.onEnd(d),!(_.avail_out=0))},y.prototype.onData=function(b){this.chunks.push(b)},y.prototype.onEnd=function(b){b===d&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg},r.Deflate=y,r.deflate=g,r.deflateRaw=function(b,v){return(v=v||{}).raw=!0,g(b,v)},r.gzip=function(b,v){return(v=v||{}).gzip=!0,g(b,v)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,n,r){var i=t("./zlib/inflate"),a=t("./utils/common"),o=t("./utils/strings"),c=t("./zlib/constants"),l=t("./zlib/messages"),u=t("./zlib/zstream"),d=t("./zlib/gzheader"),h=Object.prototype.toString;function f(y){if(!(this instanceof f))return new f(y);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},y||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||y&&y.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var b=i.inflateInit2(this.strm,g.windowBits);if(b!==c.Z_OK)throw new Error(l[b]);this.header=new d,i.inflateGetHeader(this.strm,this.header)}function p(y,g){var b=new f(g);if(b.push(y,!0),b.err)throw b.msg||l[b.err];return b.result}f.prototype.push=function(y,g){var b,v,x,w,_,T,S=this.strm,C=this.options.chunkSize,D=this.options.dictionary,N=!1;if(this.ended)return!1;v=g===~~g?g:g===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof y=="string"?S.input=o.binstring2buf(y):h.call(y)==="[object ArrayBuffer]"?S.input=new Uint8Array(y):S.input=y,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new a.Buf8(C),S.next_out=0,S.avail_out=C),(b=i.inflate(S,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&D&&(T=typeof D=="str
837ing"?o.string2buf(D):h.call(D)==="[object ArrayBuffer]"?new Uint8Array(D):D,b=i.inflateSetDictionary(this.strm,T)),b===c.Z_BUF_ERROR&&N===!0&&(b=c.Z_OK,N=!1),b!==c.Z_STREAM_END&&b!==c.Z_OK)return this.onEnd(b),!(this.ended=!0);S.next_out&&(S.avail_out!==0&&b!==c.Z_STREAM_END&&(S.avail_in!==0||v!==c.Z_FINISH&&v!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(x=o.utf8border(S.output,S.next_out),w=S.next_out-x,_=o.buf2string(S.output,x),S.next_out=w,S.avail_out=C-w,w&&a.arraySet(S.output,S.output,x,w,0),this.onData(_)):this.onData(a.shrinkBuf(S.output,S.next_out)))),S.avail_in===0&&S.avail_out===0&&(N=!0)}while((0<S.avail_in||S.avail_out===0)&&b!==c.Z_STREAM_END);return b===c.Z_STREAM_END&&(v=c.Z_FINISH),v===c.Z_FINISH?(b=i.inflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===c.Z_OK):v!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(S.avail_out=0))},f.prototype.onData=function(y){this.chunks.push(y)},f.prototype.onEnd=function(y){y===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},r.Inflate=f,r.inflate=p,r.inflateRaw=function(y,g){return(g=g||{}).raw=!0,p(y,g)},r.ungzip=p},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,n,r){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";r.assign=function(c){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var u=l.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var d in u)u.hasOwnProperty(d)&&(c[d]=u[d])}}return c},r.shrinkBuf=function(c,l){return c.length===l?c:c.subarray?c.subarray(0,l):(c.length=l,c)};var a={arraySet:function(c,l,u,d,h){if(l.subarray&&c.subarray)c.set(l.subarray(u,u+d),h);else for(var f=0;f<d;f++)c[h+f]=l[u+f]},flattenChunks:function(c){var l,u,d,h,f,p;for(l=d=0,u=c.length;l<u;l++)d+=c[l].length;for(p=new Uint8Array(d),l=h=0,u=c.length;l<u;l++)f=c[l],p.set(f,h),h+=f.length;return p}},o={arraySet:function(c,l,u,d,h){for(var f=0;f<d;f++)c[h+f]=l[u+f]},flattenChunks:function(c){return[].concat.apply([],c)}};r.setTyped=function(c){c?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,a)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(i)},{}],42:[function(t,n,r){var i=t("./common"),a=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch{a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{o=!1}for(var c=new i.Buf8(256),l=0;l<256;l++)c[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function u(d,h){if(h<65537&&(d.subarray&&o||!d.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(d,h));for(var f="",p=0;p<h;p++)f+=String.fromCharCode(d[p]);return f}c[254]=c[254]=1,r.string2buf=function(d){var h,f,p,y,g,b=d.length,v=0;for(y=0;y<b;y++)(64512&(f=d.charCodeAt(y)))==55296&&y+1<b&&(64512&(p=d.charCodeAt(y+1)))==56320&&(f=65536+(f-55296<<10)+(p-56320),y++),v+=f<128?1:f<2048?2:f<65536?3:4;for(h=new i.Buf8(v),y=g=0;g<v;y++)(64512&(f=d.charCodeAt(y)))==55296&&y+1<b&&(64512&(p=d.charCodeAt(y+1)))==56320&&(f=65536+(f-55296<<10)+(p-56320),y++),f<128?h[g++]=f:(f<2048?h[g++]=192|f>>>6:(f<65536?h[g++]=224|f>>>12:(h[g++]=240|f>>>18,h[g++]=128|f>>>12&63),h[g++]=128|f>>>6&63),h[g++]=128|63&f);return h},r.buf2binstring=function(d){return u(d,d.length)},r.binstring2buf=function(d){for(var h=new i.Buf8(d.length),f=0,p=h.length;f<p;f++)h[f]=d.charCodeAt(f);return h},r.buf2string=function(d,h){var f,p,y,g,b=h||d.length,v=new Array(2*b);for(f=p=0;f<b;)if((y=d[f++])<128)v[p++]=y;else if(4<(g=c[y]))v[p++]=65533,f+=g-1;else{for(y&=g===2?31:g===3?15:7;1<g&&f<b;)y=y<<6|63&d[f++],g--;1<g?v[p++]=65533:y<65536?v[p++]=y:(y-=65536,v[p++]=55296|y>>10&1023,v[p++]=56320|1023&y)}return u(v,p)},r.utf8border=function(d,h){var f;for((h=h||d.length)>d.length&&(h=d.length),f=h-1;0<=f&&(192&d[f])==128;)f--;return f<0||f===0?h:f+c[d[f]]>h?f:h}},{"./common":41}],43:[function(t,n,r){n.exports=function(i,a,o,c){for(var l=65535&i|0,u=i>>>16&65535|0,d=0;o!==0;){for(o-=d=2e3<o?2e3:o;u=u+(l=l+a[c++]|0)|0,--d;);l%=65521,u%=65521}return l|u<<16|0}},{}],44:[function(t,n,r){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ER
vendor: 4,115 bytes, line 837
837ROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,n,r){var i=(function(){for(var a,o=[],c=0;c<256;c++){a=c;for(var l=0;l<8;l++)a=1&a?3988292384^a>>>1:a>>>1;o[c]=a}return o})();n.exports=function(a,o,c,l){var u=i,d=l+c;a^=-1;for(var h=l;h<d;h++)a=a>>>8^u[255&(a^o[h])];return-1^a}},{}],46:[function(t,n,r){var i,a=t("../utils/common"),o=t("./trees"),c=t("./adler32"),l=t("./crc32"),u=t("./messages"),d=0,h=4,f=0,p=-2,y=-1,g=4,b=2,v=8,x=9,w=286,_=30,T=19,S=2*w+1,C=15,D=3,N=258,M=N+D+1,F=42,L=113,A=1,X=2,he=3,j=4;function ee(H,_e){return H.msg=u[_e],_e}function O(H){return(H<<1)-(4<H?9:0)}function pe(H){for(var _e=H.length;0<=--_e;)H[_e]=0}function q(H){var _e=H.state,K=_e.pending;K>H.avail_out&&(K=H.avail_out),K!==0&&(a.arraySet(H.output,_e.pending_buf,_e.pending_out,K,H.next_out),H.next_out+=K,_e.pending_out+=K,H.total_out+=K,H.avail_out-=K,_e.pending-=K,_e.pending===0&&(_e.pending_out=0))}function B(H,_e){o._tr_flush_block(H,0<=H.block_start?H.block_start:-1,H.strstart-H.block_start,_e),H.block_start=H.strstart,q(H.strm)}function re(H,_e){H.pending_buf[H.pending++]=_e}function le(H,_e){H.pending_buf[H.pending++]=_e>>>8&255,H.pending_buf[H.pending++]=255&_e}function ge(H,_e){var K,U,R=H.max_chain_length,E=H.strstart,Q=H.prev_length,ce=H.nice_match,V=H.strstart>H.w_size-M?H.strstart-(H.w_size-M):0,k=H.window,I=H.w_mask,$=H.prev,Z=H.strstart+N,ae=k[E+Q-1],ye=k[E+Q];H.prev_length>=H.good_match&&(R>>=2),ce>H.lookahead&&(ce=H.lookahead);do if(k[(K=_e)+Q]===ye&&k[K+Q-1]===ae&&k[K]===k[E]&&k[++K]===k[E+1]){E+=2,K++;do;while(k[++E]===k[++K]&&k[++E]===k[++K]&&k[++E]===k[++K]&&k[++E]===k[++K]&&k[++E]===k[++K]&&k[++E]===k[++K]&&k[++E]===k[++K]&&k[++E]===k[++K]&&E<Z);if(U=N-(Z-E),E=Z-N,Q<U){if(H.match_start=_e,ce<=(Q=U))break;ae=k[E+Q-1],ye=k[E+Q]}}while((_e=$[_e&I])>V&&--R!=0);return Q<=H.lookahead?Q:H.lookahead}function ie(H){var _e,K,U,R,E,Q,ce,V,k,I,$=H.w_size;do{if(R=H.window_size-H.lookahead-H.strstart,H.strstart>=$+($-M)){for(a.arraySet(H.window,H.window,$,$,0),H.match_start-=$,H.strstart-=$,H.block_start-=$,_e=K=H.hash_size;U=H.head[--_e],H.head[_e]=$<=U?U-$:0,--K;);for(_e=K=$;U=H.prev[--_e],H.prev[_e]=$<=U?U-$:0,--K;);R+=$}if(H.strm.avail_in===0)break;if(Q=H.strm,ce=H.window,V=H.strstart+H.lookahead,k=R,I=void 0,I=Q.avail_in,k<I&&(I=k),K=I===0?0:(Q.avail_in-=I,a.arraySet(ce,Q.input,Q.next_in,I,V),Q.state.wrap===1?Q.adler=c(Q.adler,ce,I,V):Q.state.wrap===2&&(Q.adler=l(Q.adler,ce,I,V)),Q.next_in+=I,Q.total_in+=I,I),H.lookahead+=K,H.lookahead+H.insert>=D)for(E=H.strstart-H.insert,H.ins_h=H.window[E],H.ins_h=(H.ins_h<<H.hash_shift^H.window[E+1])&H.hash_mask;H.insert&&(H.ins_h=(H.ins_h<<H.hash_shift^H.window[E+D-1])&H.hash_mask,H.prev[E&H.w_mask]=H.head[H.ins_h],H.head[H.ins_h]=E,E++,H.insert--,!(H.lookahead+H.insert<D)););}while(H.lookahead<M&&H.strm.avail_in!==0)}function P(H,_e){for(var K,U;;){if(H.lookahead<M){if(ie(H),H.lookahead<M&&_e===d)return A;if(H.lookahead===0)break}if(K=0,H.lookahead>=D&&(H.ins_h=(H.ins_h<<H.hash_shift^H.window[H.strstart+D-1])&H.hash_mask,K=H.prev[H.strstart&H.w_mask]=H.head[H.ins_h],H.head[H.ins_h]=H.strstart),K!==0&&H.strstart-K<=H.w_size-M&&(H.match_length=ge(H,K)),H.match_length>=D)if(U=o._tr_tally(H,H.strstart-H.match_start,H.match_length-D),H.lookahead-=H.match_length,H.match_length<=H.max_lazy_match&&H.lookahead>=D){for(H.match_length--;H.strstart++,H.ins_h=(H.ins_h<<H.hash_shift^H.window[H.strstart+D-1])&H.hash_mask,K=H.prev[H.strstart&H.w_mask]=H.head[H.ins_h],H.head[H.ins_h]=H.strstart,--H.match_length!=0;);H.strstart++}else H.strstart+=H.match_length,H.match_length=0,H.ins_h=H.window[H.strstart],H.ins_h=(H.ins_h<<H.hash_shift^H.window[H.strstart+1])&H.hash_mask;else U=o._tr_tally(H,0,H.window[H.strstart]),H.lookahead--,H.strstart++;if(U&&(B(H,!1),H.strm.avail_out===0))return A}return H.insert=H.strstart<D-1?H.strstart:D-1,_e===h?(B(H,!0),H.strm.avail_out===0?he:j):H.last_lit&&(B(H,!1),H.strm.avail_out===0)?A:X}function W(H,_e){for(var K,U,R;;
vendor: 32,130 bytes, line 837
837){if(H.lookahead<M){if(ie(H),H.lookahead<M&&_e===d)return A;if(H.lookahead===0)break}if(K=0,H.lookahead>=D&&(H.ins_h=(H.ins_h<<H.hash_shift^H.window[H.strstart+D-1])&H.hash_mask,K=H.prev[H.strstart&H.w_mask]=H.head[H.ins_h],H.head[H.ins_h]=H.strstart),H.prev_length=H.match_length,H.prev_match=H.match_start,H.match_length=D-1,K!==0&&H.prev_length<H.max_lazy_match&&H.strstart-K<=H.w_size-M&&(H.match_length=ge(H,K),H.match_length<=5&&(H.strategy===1||H.match_length===D&&4096<H.strstart-H.match_start)&&(H.match_length=D-1)),H.prev_length>=D&&H.match_length<=H.prev_length){for(R=H.strstart+H.lookahead-D,U=o._tr_tally(H,H.strstart-1-H.prev_match,H.prev_length-D),H.lookahead-=H.prev_length-1,H.prev_length-=2;++H.strstart<=R&&(H.ins_h=(H.ins_h<<H.hash_shift^H.window[H.strstart+D-1])&H.hash_mask,K=H.prev[H.strstart&H.w_mask]=H.head[H.ins_h],H.head[H.ins_h]=H.strstart),--H.prev_length!=0;);if(H.match_available=0,H.match_length=D-1,H.strstart++,U&&(B(H,!1),H.strm.avail_out===0))return A}else if(H.match_available){if((U=o._tr_tally(H,0,H.window[H.strstart-1]))&&B(H,!1),H.strstart++,H.lookahead--,H.strm.avail_out===0)return A}else H.match_available=1,H.strstart++,H.lookahead--}return H.match_available&&(U=o._tr_tally(H,0,H.window[H.strstart-1]),H.match_available=0),H.insert=H.strstart<D-1?H.strstart:D-1,_e===h?(B(H,!0),H.strm.avail_out===0?he:j):H.last_lit&&(B(H,!1),H.strm.avail_out===0)?A:X}function te(H,_e,K,U,R){this.good_length=H,this.max_lazy=_e,this.nice_length=K,this.max_chain=U,this.func=R}function Y(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new a.Buf16(2*S),this.dyn_dtree=new a.Buf16(2*(2*_+1)),this.bl_tree=new a.Buf16(2*(2*T+1)),pe(this.dyn_ltree),pe(this.dyn_dtree),pe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(C+1),this.heap=new a.Buf16(2*w+1),pe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*w+1),pe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function se(H){var _e;return H&&H.state?(H.total_in=H.total_out=0,H.data_type=b,(_e=H.state).pending=0,_e.pending_out=0,_e.wrap<0&&(_e.wrap=-_e.wrap),_e.status=_e.wrap?F:L,H.adler=_e.wrap===2?0:1,_e.last_flush=d,o._tr_init(_e),f):ee(H,p)}function ue(H){var _e=se(H);return _e===f&&(function(K){K.window_size=2*K.w_size,pe(K.head),K.max_lazy_match=i[K.level].max_lazy,K.good_match=i[K.level].good_length,K.nice_match=i[K.level].nice_length,K.max_chain_length=i[K.level].max_chain,K.strstart=0,K.block_start=0,K.lookahead=0,K.insert=0,K.match_length=K.prev_length=D-1,K.match_available=0,K.ins_h=0})(H.state),_e}function we(H,_e,K,U,R,E){if(!H)return p;var Q=1;if(_e===y&&(_e=6),U<0?(Q=0,U=-U):15<U&&(Q=2,U-=16),R<1||x<R||K!==v||U<8||15<U||_e<0||9<_e||E<0||g<E)return ee(H,p);U===8&&(U=9);var ce=new Y;return(H.state=ce).strm=H,ce.wrap=Q,ce.gzhead=null,ce.w_bits=U,ce.w_size=1<<ce.w_bits,ce.w_mask=ce.w_size-1,ce.hash_bits=R+7,ce.hash_size=1<<ce.hash_bits,ce.hash_mask=ce.hash_size-1,ce.hash_shift=~~((ce.hash_bits+D-1)/D),ce.window=new a.Buf8(2*ce.w_size),ce.head=new a.Buf16(ce.hash_size),ce.prev=new a.Buf16(ce.w_size),ce.lit_bufsize=1<<R+6,ce.pending_buf_size=4*ce.lit_bufsize,ce.pending_buf=new a.Buf8(ce.pending_buf_size),ce.d_buf=1*ce.lit_bufsize,ce.l_buf=3*ce.lit_bufsize,ce.level=_e,ce.strategy=E,ce.method=K,ue(H)}i=[new te(0,0,0,0,function(H,_e){var K=65535;for(K>H.pending_buf_size-5&&(K=H.pending_buf_size-5);;){if(H.lookahead<=1){if(ie(H),H.lookahead===0&&_e===d)return A;if(H.lookahead===0)break}H.strstart+=H.lookahead,H.lookahead=0;var U=H.block_start+K;if((H.strstart===0||H.strstart>=U)&&(H.lookahead=H.strstart-U,H.strstart=U,B(H,!1),H.strm.avail_out===0)||H.strstart-H.block_start>=H.w_size-M&&(B(H,!1),H.strm.avail_out===0))return A}return H.insert=0,_e===h?(B(H,!0),H.strm.avail_out===0?he:j):(H.strstart>H.block_start&&(B(H,!1),H.strm.avail_out),A)}),new te(4,4,8,4,P),new te(4,5,16,8,P),new te(4,6,32,32,P),new te(4,4,16,16,W),new te(8,16,32,32,W),new te(8,16,128,128,W),new te(8,32,128,256,W),new te(32,128,258,1024,W),new te(32,258,258,4096,W)],r.deflateInit=function(H,_e){return we(H,_e,v,15,8,0)},r.deflateInit2=we,r.deflateReset=ue,r.deflateResetKeep=se,r.deflateSetHeader=function(H,_e){return H&&H.state?H.state.wrap!==2?p:(H.state.gzhead=_e,f):p},r.deflate=function(H,_e){var K,U,R,E;if(!H||!H.state||5<_e||_e<0)return H?ee(H,p):p;if(U=H.state,!H.output||!H.input&&H.avail_in!==0||U.status===666&&_e!==h)return ee(H,H.avail_out===0?-5:p);if(U.strm=H,K=U.last_flush,U.last_flush=_e,U.status===F)if(U.wrap===2)H.adler=0,re(U,31),re(U,139),re(U,8),U.gzhead?(re(U,(U.gzhead.text?1:0)+(U.gzhead.hcrc?2:0)+(U.gzhead.extra?4:0)+(U.gzhead.name?8:0)+(U.gzhead.comment?16:0)),re(U,255&U.gzhead.time),re(U,U.gzhead.time>>8&255),re(U,U.gzhead.time>>16&255),re(U,U.gzhead.time>>24&255),re(U,U.level===9?2:2<=U.strategy||U.level<2?4:0),re(U,255&U.gzhead.os),U.gzhead.extra&&U.gzhead.extra.length&&(re(U,255&U.gzhead.extra.length),re(U,U.gzhead.extra.length>>8&255)),U.gzhead.hcrc&&(H.adler=l(H.adler,U.pending_buf,U.pending,0)),U.gzindex=0,U.status=69):(re(U,0),re(U,0),re(U,0),re(U,0),re(U,0),re(U,U.level===9?2:2<=U.strategy||U.level<2?4:0),re(U,3),U.status=L);else{var Q=v+(U.w_bits-8<<4)<<8;Q|=(2<=U.strategy||U.level<2?0:U.level<6?1:U.level===6?2:3)<<6,U.strstart!==0&&(Q|=32),Q+=31-Q%31,U.status=L,le(U,Q),U.strstart!==0&&(le(U,H.adler>>>16),le(U,65535&H.adler)),H.adler=1}if(U.status===69)if(U.gzhead.extra){for(R=U.pending;U.gzindex<(65535&U.gzhead.extra.length)&&(U.pending!==U.pending_buf_size||(U.gzhead.hcrc&&U.pending>R&&(H.adler=l(H.adler,U.pending_buf,U.pending-R,R)),q(H),R=U.pending,U.pending!==U.pending_buf_size));)re(U,255&U.gzhead.extra[U.gzindex]),U.gzindex++;U.gzhead.hcrc&&U.pending>R&&(H.adler=l(H.adler,U.pending_buf,U.pending-R,R)),U.gzindex===U.gzhead.extra.length&&(U.gzindex=0,U.status=73)}else U.status=73;if(U.status===73)if(U.gzhead.name){R=U.pending;do{if(U.pending===U.pending_buf_size&&(U.gzhead.hcrc&&U.pending>R&&(H.adler=l(H.adler,U.pending_buf,U.pending-R,R)),q(H),R=U.pending,U.pending===U.pending_buf_size)){E=1;break}E=U.gzindex<U.gzhead.name.length?255&U.gzhead.name.charCodeAt(U.gzindex++):0,re(U,E)}while(E!==0);U.gzhead.hcrc&&U.pending>R&&(H.adler=l(H.adler,U.pending_buf,U.pending-R,R)),E===0&&(U.gzindex=0,U.status=91)}else U.status=91;if(U.status===91)if(U.gzhead.comment){R=U.pending;do{if(U.pending===U.pending_buf_size&&(U.gzhead.hcrc&&U.pending>R&&(H.adler=l(H.adler,U.pending_buf,U.pending-R,R)),q(H),R=U.pending,U.pending===U.pending_buf_size)){E=1;break}E=U.gzindex<U.gzhead.comment.length?255&U.gzhead.comment.charCodeAt(U.gzindex++):0,re(U,E)}while(E!==0);U.gzhead.hcrc&&U.pending>R&&(H.adler=l(H.adler,U.pending_buf,U.pending-R,R)),E===0&&(U.status=103)}else U.status=103;if(U.status===103&&(U.gzhead.hcrc?(U.pending+2>U.pending_buf_size&&q(H),U.pending+2<=U.pending_buf_size&&(re(U,255&H.adler),re(U,H.adler>>8&255),H.adler=0,U.status=L)):U.status=L),U.pending!==0){if(q(H),H.avail_out===0)return U.last_flush=-1,f}else if(H.avail_in===0&&O(_e)<=O(K)&&_e!==h)return ee(H,-5);if(U.status===666&&H.avail_in!==0)return ee(H,-5);if(H.avail_in!==0||U.lookahead!==0||_e!==d&&U.status!==666){var ce=U.strategy===2?(function(V,k){for(var I;;){if(V.lookahead===0&&(ie(V),V.lookahead===0)){if(k===d)return A;break}if(V.match_length=0,I=o._tr_tally(V,0,V.window[V.strstart]),V.lookahead--,V.strstart++,I&&(B(V,!1),V.strm.avail_out===0))return A}return V.insert=0,k===h?(B(V,!0),V.strm.avail_out===0?he:j):V.last_lit&&(B(V,!1),V.strm.avail_out===0)?A:X})(U,_e):U.strategy===3?(function(V,k){for(var I,$,Z,ae,ye=V.window;;){if(V.lookahead<=N){if(ie(V),V.lookahead<=N&&k===d)return A;if(V.lookahead===0)break}if(V.match_length=0,V.lookahead>=D&&0<V.strstart&&($=ye[Z=V.strstart-1])===ye[++Z]&&$===ye[++Z]&&$===ye[++Z]){ae=V.strstart+N;do;while($===ye[++Z]&&$===ye[++Z]&&$===ye[++Z]&&$===ye[++Z]&&$===ye[++Z]&&$===ye[++Z]&&$===ye[++Z]&&$===ye[++Z]&&Z<ae);V.match_length=N-(ae-Z),V.match_length>V.lookahead&&(V.match_length=V.lookahead)}if(V.match_length>=D?(I=o._tr_tally(V,1,V.match_length-D),V.lookahead-=V.match_length,V.strstart+=V.match_length,V.match_length=0):(I=o._tr_tally(V,0,V.window[V.strstart]),V.lookahead--,V.strstart++),I&&(B(V,!1),V.strm.avail_out===0))return A}return V.insert=0,k===h?(B(V,!0),V.strm.avail_out===0?he:j):V.last_lit&&(B(V,!1),V.strm.avail_out===0)?A:X})(U,_e):i[U.level].func(U,_e);if(ce!==he&&ce!==j||(U.status=666),ce===A||ce===he)return H.avail_out===0&&(U.last_flush=-1),f;if(ce===X&&(_e===1?o._tr_align(U):_e!==5&&(o._tr_stored_block(U,0,0,!1),_e===3&&(pe(U.head),U.lookahead===0&&(U.strstart=0,U.block_start=0,U.insert=0))),q(H),H.avail_out===0))return U.last_flush=-1,f}return _e!==h?f:U.wrap<=0?1:(U.wrap===2?(re(U,255&H.adler),re(U,H.adler>>8&255),re(U,H.adler>>16&255),re(U,H.adler>>24&255),re(U,255&H.total_in),re(U,H.total_in>>8&255),re(U,H.total_in>>16&255),re(U,H.total_in>>24&255)):(le(U,H.adler>>>16),le(U,65535&H.adler)),q(H),0<U.wrap&&(U.wrap=-U.wrap),U.pending!==0?f:1)},r.deflateEnd=function(H){var _e;return H&&H.state?(_e=H.state.status)!==F&&_e!==69&&_e!==73&&_e!==91&&_e!==103&&_e!==L&&_e!==666?ee(H,p):(H.state=null,_e===L?ee(H,-3):f):p},r.deflateSetDictionary=function(H,_e){var K,U,R,E,Q,ce,V,k,I=_e.length;if(!H||!H.state||(E=(K=H.state).wrap)===2||E===1&&K.status!==F||K.lookahead)return p;for(E===1&&(H.adler=c(H.adler,_e,I,0)),K.wrap=0,I>=K.w_size&&(E===0&&(pe(K.head),K.strstart=0,K.block_start=0,K.insert=0),k=new a.Buf8(K.w_size),a.arraySet(k,_e,I-K.w_size,K.w_size,0),_e=k,I=K.w_size),Q=H.avail_in,ce=H.next_in,V=H.input,H.avail_in=I,H.next_in=0,H.input=_e,ie(K);K.lookahead>=D;){for(U=K.strstart,R=K.lookahead-(D-1);K.ins_h=(K.ins_h<<K.hash_shift^K.window[U+D-1])&K.hash_mask,K.prev[U&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=U,U++,--R;);K.strstart=U,K.lookahead=D-1,ie(K)}return K.strstart+=K.lookahead,K.block_start=K.strstart,K.insert=K.lookahead,K.lookahead=0,K.match_length=K.prev_length=D-1,K.match_available=0,H.next_in=ce,H.input=V,H.avail_in=Q,K.wrap=E,f},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,n,r){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,n,r){n.exports=function(i,a){var o,c,l,u,d,h,f,p,y,g,b,v,x,w,_,T,S,C,D,N,M,F,L,A,X;o=i.state,c=i.next_in,A=i.input,l=c+(i.avail_in-5),u=i.next_out,X=i.output,d=u-(a-i.avail_out),h=u+(i.avail_out-257),f=o.dmax,p=o.wsize,y=o.whave,g=o.wnext,b=o.window,v=o.hold,x=o.bits,w=o.lencode,_=o.distcode,T=(1<<o.lenbits)-1,S=(1<<o.distbits)-1;e:do{x<15&&(v+=A[c++]<<x,x+=8,v+=A[c++]<<x,x+=8),C=w[v&T];t:for(;;){if(v>>>=D=C>>>24,x-=D,(D=C>>>16&255)===0)X[u++]=65535&C;else{if(!(16&D)){if((64&D)==0){C=w[(65535&C)+(v&(1<<D)-1)];continue t}if(32&D){o.mode=12;break e}i.msg="invalid literal/length code",o.mode=30;break e}N=65535&C,(D&=15)&&(x<D&&(v+=A[c++]<<x,x+=8),N+=v&(1<<D)-1,v>>>=D,x-=D),x<15&&(v+=A[c++]<<x,x+=8,v+=A[c++]<<x,x+=8),C=_[v&S];n:for(;;){if(v>>>=D=C>>>24,x-=D,!(16&(D=C>>>16&255))){if((64&D)==0){C=_[(65535&C)+(v&(1<<D)-1)];continue n}i.msg="invalid distance code",o.mode=30;break e}if(M=65535&C,x<(D&=15)&&(v+=A[c++]<<x,(x+=8)<D&&(v+=A[c++]<<x,x+=8)),f<(M+=v&(1<<D)-1)){i.msg="invalid distance too far back",o.mode=30;break e}if(v>>>=D,x-=D,(D=u-d)<M){if(y<(D=M-D)&&o.sane){i.msg="invalid distance too far back",o.mode=30;break e}if(L=b,(F=0)===g){if(F+=p-D,D<N){for(N-=D;X[u++]=b[F++],--D;);F=u-M,L=X}}else if(g<D){if(F+=p+g-D,(D-=g)<N){for(N-=D;X[u++]=b[F++],--D;);if(F=0,g<N){for(N-=D=g;X[u++]=b[F++],--D;);F=u-M,L=X}}}else if(F+=g-D,D<N){for(N-=D;X[u++]=b[F++],--D;);F=u-M,L=X}for(;2<N;)X[u++]=L[F++],X[u++]=L[F++],X[u++]=L[F++],N-=3;N&&(X[u++]=L[F++],1<N&&(X[u++]=L[F++]))}else{for(F=u-M;X[u++]=X[F++],X[u++]=X[F++],X[u++]=X[F++],2<(N-=3););N&&(X[u++]=X[F++],1<N&&(X[u++]=X[F++]))}break}}break}}while(c<l&&u<h);c-=N=x>>3,v&=(1<<(x-=N<<3))-1,i.next_in=c,i.next_out=u,i.avail_in=c<l?l-c+5:5-(c-l),i.avail_out=u<h?h-u+257:257-(u-h),o.hold=v,o.bits=x}},{}],49:[function(t,n,r){var i=t("../utils/common"),a=t("./adler32"),o=t("./crc32"),c=t("./inffast"),l=t("./inftrees"),u=1,d=2,h=0,f=-2,p=1,y=852,g=592;function b(F){return(F>>>24&255)+(F>>>8&65280)+((65280&F)<<8)+((255&F)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function x(F){var L;return F&&F.state?(L=F.state,F.total_in=F.total_out=L.total=0,F.msg="",L.wrap&&(F.adler=1&L.wrap),L.mode=p,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new i.Buf32(y),L.distcode=L.distdyn=new i.Buf32(g),L.sane=1,L.back=-1,h):f}function w(F){var L;return F&&F.state?((L=F.state).wsize=0,L.whave=0,L.wnext=0,x(F)):f}function _(F,L){var A,X;return F&&F.state?(X=F.state,L<0?(A=0,L=-L):(A=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15<L)?f:(X.window!==null&&X.wbits!==L&&(X.window=null),X.wrap=A,X.wbits=L,w(F))):f}function T(F,L){var A,X;return F?(X=new v,(F.state=X).window=null,(A=_(F,L))!==h&&(F.state=null),A):f}var S,C,D=!0;function N(F){if(D){var L;for(S=new i.Buf32(512),C=new i.Buf32(32),L=0;L<144;)F.lens[L++]=8;for(;L<256;)F.lens[L++]=9;for(;L<280;)F.lens[L++]=7;for(;L<288;)F.lens[L++]=8;for(l(u,F.lens,0,288,S,0,F.work,{bits:9}),L=0;L<32;)F.lens[L++]=5;l(d,F.lens,0,32,C,0,F.work,{bits:5}),D=!1}F.lencode=S,F.lenbits=9,F.distcode=C,F.distbits=5}function M(F,L,A,X){var he,j=F.state;return j.window===null&&(j.wsize=1<<j.wbits,j.wnext=0,j.whave=0,j.window=new i.Buf8(j.wsize)),X>=j.wsize?(i.arraySet(j.window,L,A-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):(X<(he=j.wsize-j.wnext)&&(he=X),i.arraySet(j.window,L,A-X,he,j.wnext),(X-=he)?(i.arraySet(j.window,L,A-X,X,0),j.wnext=X,j.whave=j.wsize):(j.wnext+=he,j.wnext===j.wsize&&(j.wnext=0),j.whave<j.wsize&&(j.whave+=he))),0}r.inflateReset=w,r.inflateReset2=_,r.inflateResetKeep=x,r.inflateInit=function(F){return T(F,15)},r.inflateInit2=T,r.inflate=function(F,L){var A,X,he,j,ee,O,pe,q,B,re,le,ge,ie,P,W,te,Y,se,ue,we,H,_e,K,U,R=0,E=new i.Buf8(4),Q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!F||!F.state||!F.output||!F.input&&F.avail_in!==0)return f;(A=F.state).mode===12&&(A.mode=13),ee=F.next_out,he=F.output,pe=F.avail_out,j=F.next_in,X=F.input,O=F.avail_in,q=A.hold,B=A.bits,re=O,le=pe,_e=h;e:for(;;)switch(A.mode){case p:if(A.wrap===0){A.mode=13;break}for(;B<16;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}if(2&A.wrap&&q===35615){E[A.check=0]=255&q,E[1]=q>>>8&255,A.check=o(A.check,E,2,0),B=q=0,A.mode=2;break}if(A.flags=0,A.head&&(A.head.done=!1),!(1&A.wrap)||(((255&q)<<8)+(q>>8))%31){F.msg="incorrect header check",A.mode=30;break}if((15&q)!=8){F.msg="unknown compression method",A.mode=30;break}if(B-=4,H=8+(15&(q>>>=4)),A.wbits===0)A.wbits=H;else if(H>A.wbits){F.msg="invalid window size",A.mode=30;break}A.dmax=1<<H,F.adler=A.check=1,A.mode=512&q?10:12,B=q=0;break;case 2:for(;B<16;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}if(A.flags=q,(255&A.flags)!=8){F.msg="unknown compression method",A.mode=30;break}if(57344&A.flags){F.msg="unknown header flags set",A.mode=30;break}A.head&&(A.head.text=q>>8&1),512&A.flags&&(E[0]=255&q,E[1]=q>>>8&255,A.check=o(A.check,E,2,0)),B=q=0,A.mode=3;case 3:for(;B<32;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}A.head&&(A.head.time=q),512&A.flags&&(E[0]=255&q,E[1]=q>>>8&255,E[2]=q>>>16&255,E[3]=q>>>24&255,A.check=o(A.check,E,4,0)),B=q=0,A.mode=4;case 4:for(;B<16;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}A.head&&(A.head.xflags=255&q,A.head.os=q>>8),512&A.flags&&(E[0]=255&q,E[1]=q>>>8&255,A.check=o(A.check,E,2,0)),B=q=0,A.mode=5;case 5:if(1024&A.flags){for(;B<16;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}A.length=q,A.head&&(A.head.extra_len=q),512&A.flags&&(E[0]=255&q,E[1]=q>>>8&255,A.check=o(A.check,E,2,0)),B=q=0}else A.head&&(A.head.extra=null);A.mode=6;case 6:if(1024&A.flags&&(O<(ge=A.length)&&(ge=O),ge&&(A.head&&(H=A.head.extra_len-A.length,A.head.extra||(A.head.extra=new Array(A.head.extra_len)),i.arraySet(A.head.extra,X,j,ge,H)),512&A.flags&&(A.check=o(A.check,X,ge,j)),O-=ge,j+=ge,A.length-=ge),A.length))break e;A.length=0,A.mode=7;case 7:if(2048&A.flags){if(O===0)break e;for(ge=0;H=X[j+ge++],A.head&&H&&A.length<65536&&(A.head.name+=String.fromCharCode(H)),H&&ge<O;);if(512&A.flags&&(A.check=o(A.check,X,ge,j)),O-=ge,j+=ge,H)break e}else A.head&&(A.head.name=null);A.length=0,A.mode=8;case 8:if(4096&A.flags){if(O===0)break e;for(ge=0;H=X[j+ge++],A.head&&H&&A.length<65536&&(A.head.comment+=String.fromCharCode(H)),H&&ge<O;);if(512&A.flags&&(A.check=o(A.check,X,ge,j)),O-=ge,j+=ge,H)break e}else A.head&&(A.head.comment=null);A.mode=9;case 9:if(512&A.flags){for(;B<16;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}if(q!==(65535&A.check)){F.msg="header crc mismatch",A.mode=30;break}B=q=0}A.head&&(A.head.hcrc=A.flags>>9&1,A.head.done=!0),F.adler=A.check=0,A.mode=12;break;case 10:for(;B<32;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}F.adler=A.check=b(q),B=q=0,A.mode=11;case 11:if(A.havedict===0)return F.next_out=ee,F.avail_out=pe,F.next_in=j,F.avail_in=O,A.hold=q,A.bits=B,2;F.adler=A.check=1,A.mode=12;case 12:if(L===5||L===6)break e;case 13:if(A.last){q>>>=7&B,B-=7&B,A.mode=27;break}for(;B<3;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}switch(A.last=1&q,B-=1,3&(q>>>=1)){case 0:A.mode=14;break;case 1:if(N(A),A.mode=20,L!==6)break;q>>>=2,B-=2;break e;case 2:A.mode=17;break;case 3:F.msg="invalid block type",A.mode=30}q>>>=2,B-=2;break;case 14:for(q>>>=7&B,B-=7&B;B<32;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}if((65535&q)!=(q>>>16^65535)){F.msg="invalid stored block lengths",A.mode=30;break}if(A.length=65535&q,B=q=0,A.mode=15,L===6)break e;case 15:A.mode=16;case 16:if(ge=A.length){if(O<ge&&(ge=O),pe<ge&&(ge=pe),ge===0)break e;i.arraySet(he,X,j,ge,ee),O-=ge,j+=ge,pe-=ge,ee+=ge,A.length-=ge;break}A.mode=12;break;case 17:for(;B<14;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}if(A.nlen=257+(31&q),q>>>=5,B-=5,A.ndist=1+(31&q),q>>>=5,B-=5,A.ncode=4+(15&q),q>>>=4,B-=4,286<A.nlen||30<A.ndist){F.msg="too many length or distance symbols",A.mode=30;break}A.have=0,A.mode=18;case 18:for(;A.have<A.ncode;){for(;B<3;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}A.lens[Q[A.have++]]=7&q,q>>>=3,B-=3}for(;A.have<19;)A.lens[Q[A.have++]]=0;if(A.lencode=A.lendyn,A.lenbits=7,K={bits:A.lenbits},_e=l(0,A.lens,0,19,A.lencode,0,A.work,K),A.lenbits=K.bits,_e){F.msg="invalid code lengths set",A.mode=30;break}A.have=0,A.mode=19;case 19:for(;A.have<A.nlen+A.ndist;){for(;te=(R=A.lencode[q&(1<<A.lenbits)-1])>>>16&255,Y=65535&R,!((W=R>>>24)<=B);){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}if(Y<16)q>>>=W,B-=W,A.lens[A.have++]=Y;else{if(Y===16){for(U=W+2;B<U;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}if(q>>>=W,B-=W,A.have===0){F.msg="invalid bit length repeat",A.mode=30;break}H=A.lens[A.have-1],ge=3+(3&q),q>>>=2,B-=2}else if(Y===17){for(U=W+3;B<U;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}B-=W,H=0,ge=3+(7&(q>>>=W)),q>>>=3,B-=3}else{for(U=W+7;B<U;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}B-=W,H=0,ge=11+(127&(q>>>=W)),q>>>=7,B-=7}if(A.have+ge>A.nlen+A.ndist){F.msg="invalid bit length repeat",A.mode=30;break}for(;ge--;)A.lens[A.have++]=H}}if(A.mode===30)break;if(A.lens[256]===0){F.msg="invalid code -- missing end-of-block",A.mode=30;break}if(A.lenbits=9,K={bits:A.lenbits},_e=l(u,A.lens,0,A.nlen,A.lencode,0,A.work,K),A.lenbits=K.bits,_e){F.msg="invalid literal/lengths set",A.mode=30;break}if(A.distbits=6,A.distcode=A.distdyn,K={bits:A.distbits},_e=l(d,A.lens,A.nlen,A.ndist,A.distcode,0,A.work,K),A.distbits=K.bits,_e){F.msg="invalid distances set",A.mode=30;break}if(A.mode=20,L===6)break e;case 20:A.mode=21;case 21:if(6<=O&&258<=pe){F.next_out=ee,F.avail_out=pe,F.next_in=j,F.avail_in=O,A.hold=q,A.bits=B,c(F,le),ee=F.next_out,he=F.output,pe=F.avail_out,j=F.next_in,X=F.input,O=F.avail_in,q=A.hold,B=A.bits,A.mode===12&&(A.back=-1);break}for(A.back=0;te=(R=A.lencode[q&(1<<A.lenbits)-1])>>>16&255,Y=65535&R,!((W=R>>>24)<=B);){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}if(te&&(240&te)==0){for(se=W,ue=te,we=Y;te=(R=A.lencode[we+((q&(1<<se+ue)-1)>>se)])>>>16&255,Y=65535&R,!(se+(W=R>>>24)<=B);){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}q>>>=se,B-=se,A.back+=se}if(q>>>=W,B-=W,A.back+=W,A.length=Y,te===0){A.mode=26;break}if(32&te){A.back=-1,A.mode=12;break}if(64&te){F.msg="invalid literal/length code",A.mode=30;break}A.extra=15&te,A.mode=22;case 22:if(A.extra){for(U=A.extra;B<U;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}A.length+=q&(1<<A.extra)-1,q>>>=A.extra,B-=A.extra,A.back+=A.extra}A.was=A.length,A.mode=23;case 23:for(;te=(R=A.distcode[q&(1<<A.distbits)-1])>>>16&255,Y=65535&R,!((W=R>>>24)<=B);){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}if((240&te)==0){for(se=W,ue=te,we=Y;te=(R=A.distcode[we+((q&(1<<se+ue)-1)>>se)])>>>16&255,Y=65535&R,!(se+(W=R>>>24)<=B);){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}q>>>=se,B-=se,A.back+=se}if(q>>>=W,B-=W,A.back+=W,64&te){F.msg="invalid distance code",A.mode=30;break}A.offset=Y,A.extra=15&te,A.mode=24;case 24:if(A.extra){for(U=A.extra;B<U;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}A.offset+=q&(1<<A.extra)-1,q>>>=A.extra,B-=A.extra,A.back+=A.extra}if(A.offset>A.dmax){F.msg="invalid distance too far back",A.mode=30;break}A.mode=25;case 25:if(pe===0)break e;if(ge=le-pe,A.offset>ge){if((ge=A.offset-ge)>A.whave&&A.sane){F.msg="invalid distance too far back",A.mode=30;break}ie=ge>A.wnext?(ge-=A.wnext,A.wsize-ge):A.wnext-ge,ge>A.length&&(ge=A.length),P=A.window}else P=he,ie=ee-A.offset,ge=A.length;for(pe<ge&&(ge=pe),pe-=ge,A.length-=ge;he[ee++]=P[ie++],--ge;);A.length===0&&(A.mode=21);break;case 26:if(pe===0)break e;he[ee++]=A.length,pe--,A.mode=21;break;case 27:if(A.wrap){for(;B<32;){if(O===0)break e;O--,q|=X[j++]<<B,B+=8}if(le-=pe,F.total_out+=le,A.total+=le,le&&(F.adler=A.check=A.flags?o(A.check,he,le,ee-le):a(A.check,he,le,ee-le)),le=pe,(A.flags?q:b(q))!==A.check){F.msg="incorrect data check",A.mode=30;break}B=q=0}A.mode=28;case 28:if(A.wrap&&A.flags){for(;B<32;){if(O===0)break e;O--,q+=X[j++]<<B,B+=8}if(q!==(4294967295&A.total)){F.msg="incorrect length check",A.mode=30;break}B=q=0}A.mode=29;case 29:_e=1;break e;case 30:_e=-3;break e;case 31:return-4;case 32:default:return f}return F.next_out=ee,F.avail_out=pe,F.next_in=j,F.avail_in=O,A.hold=q,A.bits=B,(A.wsize||le!==F.avail_out&&A.mode<30&&(A.mode<27||L!==4))&&M(F,F.output,F.next_out,le-F.avail_out)?(A.mode=31,-4):(re-=F.avail_in,le-=F.avail_out,F.total_in+=re,F.total_out+=le,A.total+=le,A.wrap&&le&&(F.adler=A.check=A.flags?o(A.check,he,le,F.next_out-le):a(A.check,he,le,F.next_out-le)),F.data_type=A.bits+(A.last?64:0)+(A.mode===12?128:0)+(A.mode===20||A.mode===15?256:0),(re==0&&le===0||L===4)&&_e===h&&(_e=-5),_e)},r.inflateEnd=function(F){if(!F||!F.state)return f;var L=F.state;return L.window&&(L.window=null),F.state=null,h},r.inflateGetHeader=function(F,L){var A;return F&&F.state?(2&(A=F.state).wrap)==0?f:((A.head=L).done=!1,h):f},r.inflateSetDictionary=function(F,L){var A,X=L.length;return F&&F.state?(A=F.state).wrap!==0&&A.mode!==11?f:A.mode===11&&a(1,L,X,0)!==A.check?-3:M(F,L,X,X)?(A.mode=31,-4):(A.havedict=1,h):f},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,n,r){var i=t("../utils/common"),a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(u,d,h,f,p,y,g,b){var v,x,w,_,T,S,C,D,N,M=b.bits,F=0,L=0,A=0,X=0,he=0,j=0,ee=0,O=0,pe=0,q=0,B=null,re=0,le=new i.Buf16(16),ge=new i.Buf16(16),ie=null,P=0;for(F=0;F<=15;F++)le[F]=0;for(L=0;L<f;L++)le[d[h+L]]++;for(he=M,X=15;1<=X&&le[X]===0;X--);if(X<he&&(he=X),X===0)return p[y++]=20971520,p[y++]=20971520,b.bits=1,0;for(A=1;A<X&&le[A]===0;A++);for(he<A&&(he=A),F=O=1;F<=15;F++)if(O<<=1,(O-=le[F])<0)return-1;if(0<O&&(u===0||X!==1))return-1;for(ge[1]=0,F=1;F<15;F++)ge[F+1]=ge[F]+le[F];for(L=0;L<f;L++)d[h+L]!==0&&(g[ge[d[h+L]]++]=L);if(S=u===0?(B=ie=g,19):u===1?(B=a,re-=257,ie=o,P-=257,256):(B=c,ie=l,-1),F=A,T=y,ee=L=q=0,w=-1,_=(pe=1<<(j=he))-1,u===1&&852<pe||u===2&&592<pe)return 1;for(;;){for(C=F-ee,N=g[L]<S?(D=0,g[L]):g[L]>S?(D=ie[P+g[L]],B[re+g[L]]):(D=96,0),v=1<<F-ee,A=x=1<<j;p[T+(q>>ee)+(x-=v)]=C<<24|D<<16|N|0,x!==0;);for(v=1<<F-1;q&v;)v>>=1;if(v!==0?(q&=v-1,q+=v):q=0,L++,--le[F]==0){if(F===X)break;F=d[h+g[L]]}if(he<F&&(q&_)!==w){for(ee===0&&(ee=he),T+=A,O=1<<(j=F-ee);j+ee<X&&!((O-=le[j+ee])<=0);)j++,O<<=1;if(pe+=1<<j,u===1&&852<pe||u===2&&592<pe)return 1;p[w=q&_]=he<<24|j<<16|T-y|0}}return q!==0&&(p[T+q]=F-ee<<24|64<<16|0),b.bits=he,0}},{"../utils/common":41}],51:[function(t,n,r){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,n,r){var i=t("../utils/common"),a=0,o=1;function c(R){for(var E=R.length;0<=--E;)R[E]=0}var l=0,u=29,d=256,h=d+1+u,f=30,p=19,y=2*h+1,g=15,b=16,v=7,x=256,w=16,_=17,T=18,S=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],C=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=new Array(2*(h+2));c(M);var F=new Array(2*f);c(F);var L=new Array(512);c(L);var A=new Array(256);c(A);var X=new Array(u);c(X);var he,j,ee,O=new Array(f);function pe(R,E,Q,ce,V){this.static_tree=R,this.extra_bits=E,this.extra_base=Q,this.elems=ce,this.max_length=V,this.has_stree=R&&R.length}function q(R,E){this.dyn_tree=R,this.max_code=0,this.stat_desc=E}function B(R){return R<256?L[R]:L[256+(R>>>7)]}function re(R,E){R.pending_buf[R.pending++]=255&E,R.pending_buf[R.pending++]=E>>>8&255}function le(R,E,Q){R.bi_valid>b-Q?(R.bi_buf|=E<<R.bi_valid&65535,re(R,R.bi_buf),R.bi_buf=E>>b-R.bi_valid,R.bi_valid+=Q-b):(R.bi_buf|=E<<R.bi_valid&65535,R.bi_valid+=Q)}function ge(R,E,Q){le(R,Q[2*E],Q[2*E+1])}function ie(R,E){for(var Q=0;Q|=1&R,R>>>=1,Q<<=1,0<--E;);return Q>>>1}function P(R,E,Q){var ce,V,k=new Array(g+1),I=0;for(ce=1;ce<=g;ce++)k[ce]=I=I+Q[ce-1]<<1;for(V=0;V<=E;V++){var $=R[2*V+1];$!==0&&(R[2*V]=ie(k[$]++,$))}}function W(R){var E;for(E=0;E<h;E++)R.dyn_ltree[2*E]=0;for(E=0;E<f;E++)R.dyn_dtree[2*E]=0;for(E=0;E<p;E++)R.bl_tree[2*E]=0;R.dyn_ltree[2*x]=1,R.opt_len=R.static_len=0,R.last_lit=R.matches=0}function te(R){8<R.bi_valid?re(R,R.bi_buf):0<R.bi_valid&&(R.pending_buf[R.pending++]=R.bi_buf),R.bi_buf=0,R.bi_valid=0}function Y(R,E,Q,ce){var V=2*E,k=2*Q;return R[V]<R[k]||R[V]===R[k]&&ce[E]<=ce[Q]}function se(R,E,Q){for(var ce=R.heap[Q],V=Q<<1;V<=R.heap_len&&(V<R.heap_len&&Y(E,R.heap[V+1],R.heap[V],R.depth)&&V++,!Y(E,ce,R.heap[V],R.depth));)R.heap[Q]=R.heap[V],Q=V,V<<=1;R.heap[Q]=ce}function ue(R,E,Q){var ce,V,k,I,$=0;if(R.last_lit!==0)for(;ce=R.pending_buf[R.d_buf+2*$]<<8|R.pending_buf[R.d_buf+2*$+1],V=R.pending_buf[R.l_buf+$],$++,ce===0?ge(R,V,E):(ge(R,(k=A[V])+d+1,E),(I=S[k])!==0&&le(R,V-=X[k],I),ge(R,k=B(--ce),Q),(I=C[k])!==0&&le(R,ce-=O[k],I)),$<R.last_lit;);ge(R,x,E)}function we(R,E){var Q,ce,V,k=E.dyn_tree,I=E.stat_desc.static_tree,$=E.stat_desc.has_stree,Z=E.stat_desc.elems,ae=-1;for(R.heap_len=0,R.heap_max=y,Q=0;Q<Z;Q++)k[2*Q]!==0?(R.heap[++R.heap_len]=ae=Q,R.depth[Q]=0):k[2*Q+1]=0;for(;R.heap_len<2;)k[2*(V=R.heap[++R.heap_len]=ae<2?++ae:0)]=1,R.depth[V]=0,R.opt_len--,$&&(R.static_len-=I[2*V+1]);for(E.max_code=ae,Q=R.heap_len>>1;1<=Q;Q--)se(R,k,Q);for(V=Z;Q=R.heap[1],R.heap[1]=R.heap[R.heap_len--],se(R,k,1),ce=R.heap[1],R.heap[--R.heap_max]=Q,R.heap[--R.heap_max]=ce,k[2*V]=k[2*Q]+k[2*ce],R.depth[V]=(R.depth[Q]>=R.depth[ce]?R.depth[Q]:R.depth[ce])+1,k[2*Q+1]=k[2*ce+1]=V,R.heap[1]=V++,se(R,k,1),2<=R.heap_len;);R.heap[--R.heap_max]=R.heap[1],(function(ye,me){var xe,De,Re,Ue,Ke,nt,Ye=me.dyn_tree,dt=me.max_code,Ae=me.stat_desc.static_tree,Le=me.stat_desc.has_stree,He=me.stat_desc.extra_bits,Ze=me.stat_desc.extra_base,Qe=me.stat_desc.max_length,it=0;for(Ue=0;Ue<=g;Ue++)ye.bl_count[Ue]=0;for(Ye[2*ye.heap[ye.heap_max]+1]=0,xe=ye.heap_max+1;xe<y;xe++)Qe<(Ue=Ye[2*Ye[2*(De=ye.heap[xe])+1]+1]+1)&&(Ue=Qe,it++),Ye[2*De+1]=Ue,dt<De||(ye.bl_count[Ue]++,Ke=0,Ze<=De&&(Ke=He[De-Ze]),nt=Ye[2*De],ye.opt_len+=nt*(Ue+Ke),Le&&(ye.static_len+=nt*(Ae[2*De+1]+Ke)));if(it!==0){do{for(Ue=Qe-1;ye.bl_count[Ue]===0;)Ue--;ye.bl_count[Ue]--,ye.bl_count[Ue+1]+=2,ye.bl_count[Qe]--,it-=2}while(0<it);for(Ue=Qe;Ue!==0;Ue--)for(De=ye.bl_count[Ue];De!==0;)dt<(Re=ye.heap[--xe])||(Ye[2*Re+1]!==Ue&&(ye.opt_len+=(Ue-Ye[2*Re+1])*Ye[2*Re],Ye[2*Re+1]=Ue),De--)}})(R,E),P(k,ae,R.bl_count)}function H(R,E,Q){var ce,V,k=-1,I=E[1],$=0,Z=7,ae=4;for(I===0&&(Z=138,ae=3),E[2*(Q+1)+1]=65535,ce=0;ce<=Q;ce++)V=I,I=E[2*(ce+1)+1],++$<Z&&V===I||($<ae?R.bl_tree[2*V]+=$:V!==0?(V!==k&&R.bl_tree[2*V]++,R.bl_tree[2*w]++):$<=10?R.bl_tree[2*_]++:R.bl_tree[2*T]++,k=V,ae=($=0)===I?(Z=138,3):V===I?(Z=6,3):(Z=7,4))}function _e(R,E,Q){var ce,V,k=-1,I=E[1],$=0,Z=7,ae=4;for(I===0&&(Z=138,ae=3),ce=0;ce<=Q;ce++)if(V=I,I=E[2*(ce+1)+1],!(++$<Z&&V===I)){if($<ae)for(;ge(R,V,R.bl_tree),--$!=0;);else V!==0?(V!==k&&(ge(R,V,R.bl_tree),$--),ge(R,w,R.bl_tree),le(R,$-3,2)):$<=10?(ge(R,_,R.bl_tree),le(R,$-3,3)):(ge(R,T,R.bl_tree),le(R,$-11,7));k=V,ae=($=0)===I?(Z=138,3):V===I?(Z=6,3):(Z=7,4)}}c(O);var K=!1;function U(R,E,Q,ce){le(R,(l<<1)+(ce?1:0),3),(function(V,k,I,$){te(V),re(V,I),re(V,~I),i.arraySet(V.pending_buf,V.window,k,I,V.pending),V.pending+=I})(R,E,Q)}r._tr_init=function(R){K||((function(){var E,Q,ce,V,k,I=new Array(g+1);for(V=ce=0;V<u-1;V++)for(X[V]=ce,E=0;E<1<<S[V];E++)A[ce++]=V;for(A[ce-1]=V,V=k=0;V<16;V++)for(O[V]=k,E=0;E<1<<C[V];E++)L[k++]=V;for(k>>=7;V<f;V++)for(O[V]=k<<7,E=0;E<1<<C[V]-7;E++)L[256+k++]=V;for(Q=0;Q<=g;Q++)I[Q]=0;for(E=0;E<=143;)M[2*E+1]=8,E++,I[8]++;for(;E<=255;)M[2*E+1]=9,E++,I[9]++;for(;E<=279;)M[2*E+1]=7,E++,I[7]++;for(;E<=287;)M[2*E+1]=8,E++,I[8]++;for(P(M,h+1,I),E=0;E<f;E++)F[2*E+1]=5,F[2*E]=ie(E,5);he=new pe(M,S,d+1,h,g),j=new pe(F,C,0,f,g),ee=new pe(new Array(0),D,0,p,v)})(),K=!0),R.l_desc=new q(R.dyn_ltree,he),R.d_desc=new q(R.dyn_dtree,j),R.bl_desc=new q(R.bl_tree,ee),R.bi_buf=0,R.bi_valid=0,W(R)},r._tr_stored_block=U,r._tr_flush_block=function(R,E,Q,ce){var V,k,I=0;0<R.level?(R.strm.data_type===2&&(R.strm.data_type=(function($){var Z,ae=4093624447;for(Z=0;Z<=31;Z++,ae>>>=1)if(1&ae&&$.dyn_ltree[2*Z]!==0)return a;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return o;for(Z=32;Z<d;Z++)if($.dyn_ltree[2*Z]!==0)return o;return a})(R)),we(R,R.l_desc),we(R,R.d_desc),I=(function($){var Z;for(H($,$.dyn_ltree,$.l_desc.max_code),H($,$.dyn_dtree,$.d_desc.max_code),we($,$.bl_desc),Z=p-1;3<=Z&&$.bl_tree[2*N[Z]+1]===0;Z--);return $.opt_len+=3*(Z+1)+5+5+4,Z})(R),V=R.opt_len+3+7>>>3,(k=R.static_len+3+7>>>3)<=V&&(V=k)):V=k=Q+5,Q+4<=V&&E!==-1?U(R,E,Q,ce):R.strategy===4||k===V?(le(R,2+(ce?1:0),3),ue(R,M,F)):(le(R,4+(ce?1:0),3),(function($,Z,ae,ye){var me;
837for(le($,Z-257,5),le($,ae-1,5),le($,ye-4,4),me=0;me<ye;me++)le($,$.bl_tree[2*N[me]+1],3);_e($,$.dyn_ltree,Z-1),_e($,$.dyn_dtree,ae-1)})(R,R.l_desc.max_code+1,R.d_desc.max_code+1,I+1),ue(R,R.dyn_ltree,R.dyn_dtree)),W(R),ce&&te(R)},r._tr_tally=function(R,E,Q){return R.pending_buf[R.d_buf+2*R.last_lit]=E>>>8&255,R.pending_buf[R.d_buf+2*R.last_lit+1]=255&E,R.pending_buf[R.l_buf+R.last_lit]=255&Q,R.last_lit++,E===0?R.dyn_ltree[2*Q]++:(R.matches++,E--,R.dyn_ltree[2*(A[Q]+d+1)]++,R.dyn_dtree[2*B(E)]++),R.last_lit===R.lit_bufsize-1},r._tr_align=function(R){le(R,2,3),ge(R,x,M),(function(E){E.bi_valid===16?(re(E,E.bi_buf),E.bi_buf=0,E.bi_valid=0):8<=E.bi_valid&&(E.pending_buf[E.pending++]=255&E.bi_buf,E.bi_buf>>=8,E.bi_valid-=8)})(R)}},{"../utils/common":41}],53:[function(t,n,r){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,n,r){(function(i){(function(a,o){if(!a.setImmediate){var c,l,u,d,h=1,f={},p=!1,y=a.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(a);g=g&&g.setTimeout?g:a,c={}.toString.call(a.process)==="[object process]"?function(w){At.nextTick(function(){v(w)})}:(function(){if(a.postMessage&&!a.importScripts){var w=!0,_=a.onmessage;return a.onmessage=function(){w=!1},a.postMessage("","*"),a.onmessage=_,w}})()?(d="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",x,!1):a.attachEvent("onmessage",x),function(w){a.postMessage(d+w,"*")}):a.MessageChannel?((u=new MessageChannel).port1.onmessage=function(w){v(w.data)},function(w){u.port2.postMessage(w)}):y&&"onreadystatechange"in y.createElement("script")?(l=y.documentElement,function(w){var _=y.createElement("script");_.onreadystatechange=function(){v(w),_.onreadystatechange=null,l.removeChild(_),_=null},l.appendChild(_)}):function(w){setTimeout(v,0,w)},g.setImmediate=function(w){typeof w!="function"&&(w=new Function(""+w));for(var _=new Array(arguments.length-1),T=0;T<_.length;T++)_[T]=arguments[T+1];var S={callback:w,args:_};return f[h]=S,c(h),h++},g.clearImmediate=b}function b(w){delete f[w]}function v(w){if(p)setTimeout(v,0,w);else{var _=f[w];if(_){p=!0;try{(function(T){var S=T.callback,C=T.args;switch(C.length){case 0:S();break;case 1:S(C[0]);break;case 2:S(C[0],C[1]);break;case 3:S(C[0],C[1],C[2]);break;default:S.apply(o,C)}})(_)}finally{b(w),p=!1}}}}
837function x(w){w.source===a&&typeof w.data=="string"&&w.data.indexOf(d)===0&&v(+w.data.slice(d.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof _s<"u"?_s:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(X_)),X_.exports}var r$=n$();const i$=k6(r$);var lg={exports:{}},V_,cN;function s$(){if(cN)return V_;cN=1;var s={"&":"&",'"':""","'":"'","<":"<",">":">"};function e(t){return t&&t.replace?t.replace(/([&"<>'])/g,function(n,r){return s[r]}):t}return V_=e,V_}var lN;function o$(){if(lN)return lg.exports;lN=1;var s=s$(),e=OD().Stream,t=" ";function n(l,u){typeof u!="object"&&(u={indent:u});var d=u.stream?new e:null,h="",f=!1,p=u.indent?u.indent===!0?t:u.indent:"",y=!0;function g(_){y?At.nextTick(_):_()}function b(_,T){if(T!==void 0&&(h+=T),_&&!f&&(d=d||new e,f=!0),_&&f){var S=h;g(function(){d.emit("data",S)}),h=""}}function v(_,T){o(b,a(_,p,p?1:0),T)}function x(){if(d){var _=h;g(function(){d.emit("data",_),d.emit("end"),d.readable=!1,d.emit("close")})}}function w(_){var T=_.encoding||"UTF-8",S={version:"1.0",encoding:T};_.standalone&&(S.standalone=_.standalone),v({"?xml":{_attr:S}}),h=h.replace("/>","?>")}return g(function(){y=!1}),u.declaration&&w(u.declaration),l&&l.forEach?l.forEach(function(_,T){var S;T+1===l.length&&(S=x),v(_,S)}):v(l,x),d?(d.readable=!0,d):h}function r(){var l=Array.prototype.slice.call(arguments),u={_elem:a(l)};return u.push=function(d){if(!this.append)throw new Error("not assigned to a parent!");var h=this,f=this._elem.indent;o(this.append,a(d,f,this._elem.icount+(f?1:0)),function(){h.append(!0)})},u.close=function(d){d!==void 0&&this.push(d),this.end&&this.end()},u}function i(l,u){return new Array(u||0).join(l||"")}function a(l,u,d){d=d||0;var h=i(u,d),f,p=l,y=!1;if(typeof l=="object"){var g=Object.keys(l);if(f=g[0],p=l[f],p&&p._elem)return p._elem.name=f,p._elem.icount=d,p._elem.indent=u,p._elem.indents=h,p._elem.interrupt=p,p._elem}var b=[],v=[],x;function w(_){var T=Object.keys(_);T.forEach(function(S){b.push(c(S,_[S]))})}switch(typeof p){case"object":if(p===null)break;p._attr&&w(p._attr),p._cdata&&v.push(("<![CDATA["+p._cdata).replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]>"),p.forEach&&(x=!1,v.push(""),p.forEach(function(_){if(typeof _=="object"){var T=Object.keys(_)[0];T=="_attr"?w(_._attr):v.push(a(_,u,d+1))}else v.pop(),x=!0,v.push(s(_))}),x||v.push(""));break;default:v.push(s(p))}return{name:f,interrupt:y,attributes:b,content:v,icount:d,indents:h,indent:u}}function o(l,u,d){if(typeof u!="object")return l(!1,u);var h=u.interrupt?1:u.content.length;function f(){for(;u.content.length;){var y=u.content.shift();if(y!==void 0){if(p(y))return;o(l,y)}}l(!1,(h>1?u.indents:"")+(u.name?"</"+u.name+">":"")+(u.indent&&!d?` 838`:"")),d&&d()}function p(y){return y.interrupt?(y.interrupt.append=l,y.interrupt.end=f,y.interrupt=!1,l(!0),!0):!1}if(l(!1,u.indents+(u.name?"<"+u.name:"")+(u.attributes.length?" "+u.attributes.join(" "):"")+(h?u.name?">":"":u.name?"/>":"")+(u.indent&&h>1?` 839`:"")),!h)return l(!1,u.indent?` 840`:"");p(u)||f()}function c(l,u){return l+'="'+s(u)+'"'}return lg.exports=n,lg.exports.element=lg.exports.Element=r,lg.exports}var a$=o$();const yn=k6(a$),ug=0,G_=32,c$=32,l$=(s,e)=>{const t=e.replace(/-/g,"");if(t.length!==c$)throw new Error(`Error: Cannot extract GUID from font filename: ${e}`);const r=t.replace(/(..)/g,"$1 ").trim().split(" ").map(c=>parseInt(c,16));r.reverse();const a=s.slice(ug,G_).map((c,l)=>c^r[l%r.length]),o=new Uint8Array(ug+a.length+Math.max(0,s.length-G_));return o.set(s.slice(0,ug)),o.set(a,ug),o.set(s.slice(G_),ug+a.length),o};class u${format(e,t={stack:[]}){const n=e.prepForXml(t);if(n)return n;throw Error("XMLComponent did not format correctly")}}class h${replace(e,t,n){let r=e;return t.forEach((i,a)=>{r=r.replace(new RegExp(`{${i.fileName}}`,"g"),(n+a).toString())}),r}getMediaData(e,t){return t.Array.filter(n=>e.search(`{${n.fileName}}`)>0)}}class d${replace(e,t){let n=e;for(const r of t)n=n.replace(new RegExp(`{${r.reference}-${r.instance}}`,"g"),r.numId.toString());return n}}class f${constructor(){Be(this,"formatter"),Be(this,"imageReplacer"),Be(this,"numberingReplacer"),this.formatter=new u$,this.imageReplacer=new h$,this.numberingReplacer=new d$}compile(e,t,n=[]){const r=new i$,i=this.xmlifyFile(e,t),a=new Map(Object.entries(i));for(const[,o]of a)if(Array.isArray(o))for(const c of o)r.file(c.path,O_(c.data));else r.file(o.path,O_(o.data));for(const o of n)r.file(o.path,O_(o.data));for(const o of e.Media.Array)o.type!=="svg"?r.file(`word/media/${o.fileName}`,o.data):(r.file(`word/media/${o.fileName}`,o.data),r.file(`word/media/${o.fallback.fileName}`,o.fallback.data));for(const{data:o,name:c,fontKey:l}of e.FontTable.fontOptionsWithKey){const[u]=c.split(".");r.file(`word/fonts/${u}.odttf`,l$(o,l))}return r}xmlifyFile(e,t){const n=e.Document.Relationships.RelationshipCount+1,r=yn(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),i=e.Comments.Relationships.RelationshipCount+1,a=yn(this.formatter.format(e.Comments,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),o=e.FootNotes.Relationships.RelationshipCount+1,c=yn(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),l=this.imageReplacer.getMediaData(r,e.Media),u=this.imageReplacer.getMediaData(a,e.Media),d=this.imageReplacer.getMediaData(c,e.Media);return{Relationships:{data:(l.forEach((h,f)=>{e.Document.Relationships.addRelationship(n+f,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${h.fileName}`)}),e.Document.Relationships.addRelationship(e.Document.Relationships.RelationshipCount+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable","fontTable.xml"),yn(this.formatter.format(e.Document.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const h=this.imageReplacer.replace(r,l,n);return this.numberingReplacer.replace(h,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const h=yn(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(h,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:yn(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:yn(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:yn(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map((h,f)=>{const p=yn(this.formatter.format(h.View,{viewWrapper:h,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});
840return this.imageReplacer.getMediaData(p,e.Media).forEach((g,b)=>{h.Relationships.addRelationship(b,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${g.fileName}`)}),{data:yn(this.formatter.format(h.Relationships,{viewWrapper:h,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${f+1}.xml.rels`}}),FooterRelationships:e.Footers.map((h,f)=>{const p=yn(this.formatter.format(h.View,{viewWrapper:h,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(p,e.Media).forEach((g,b)=>{h.Relationships.addRelationship(b,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${g.fileName}`)}),{data:yn(this.formatter.format(h.Relationships,{viewWrapper:h,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${f+1}.xml.rels`}}),Headers:e.Headers.map((h,f)=>{const p=yn(this.formatter.format(h.View,{viewWrapper:h,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),y=this.imageReplacer.getMediaData(p,e.Media),g=this.imageReplacer.replace(p,y,0);return{data:this.numberingReplacer.replace(g,e.Numbering.ConcreteNumbering),path:`word/header${f+1}.xml`}}),Footers:e.Footers.map((h,f)=>{const p=yn(this.formatter.format(h.View,{viewWrapper:h,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),y=this.imageReplacer.getMediaData(p,e.Media),g=this.imageReplacer.replace(p,y,0);return{data:this.numberingReplacer.replace(g,e.Numbering.ConcreteNumbering),path:`word/footer${f+1}.xml`}}),ContentTypes:{data:yn(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:yn(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:yn(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:(()=>{const h=this.imageReplacer.replace(c,d,o);return this.numberingReplacer.replace(h,e.Numbering.ConcreteNumbering)})(),path:"word/footnotes.xml"},FootNotesRelationships:{data:(d.forEach((h,f)=>{e.FootNotes.Relationships.addRelationship(o+f,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${h.fileName}`)}),yn(this.formatter.format(e.FootNotes.Relationships,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/footnotes.xml.rels"},Endnotes:{data:yn(this.formatter.format(e.Endnotes.View,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/endnotes.xml"},EndnotesRelationships:{data:yn(this.formatter.format(e.Endnotes.Relationships,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/endnotes.xml.rels"},Settings:{data:yn(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:(()=>{const h=this.imageReplacer.replace(a,u,i);return this.numberingReplacer.replace(h,e.Numbering.ConcreteNumbering)})(),path:"word/comments.xml"},CommentsRelationships:{data:(u.forEach((h,f)=>{e.Comments.Relationships.addRelationship(i+f,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${h.fileName}`)}),yn(this.formatter.format(e.Comments.Relationships,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})),path:"word/_rels/comments.xml.rels"},FontTable:{data:yn(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:yn(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"}}}}const p$={WITH_2_BLANKS:" "},uN=s=>
840s===!0?p$.WITH_2_BLANKS:s===!1?void 0:s,D8=class Ud{static pack(e,t,n){return v9(this,arguments,function*(r,i,a,o=[]){return this.compiler.compile(r,uN(a),o).generateAsync({type:i,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})})}static toString(e,t,n=[]){return Ud.pack(e,"string",t,n)}static toBuffer(e,t,n=[]){return Ud.pack(e,"nodebuffer",t,n)}static toBase64String(e,t,n=[]){return Ud.pack(e,"base64",t,n)}static toBlob(e,t,n=[]){return Ud.pack(e,"blob",t,n)}static toArrayBuffer(e,t,n=[]){return Ud.pack(e,"arraybuffer",t,n)}static toStream(e,t,n=[]){const r=new t$.Stream;return this.compiler.compile(e,uN(t),n).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(a=>{r.emit("data",a),r.emit("end")}),r}};Be(D8,"compiler",new f$);let g$=D8;const wc="Times New Roman",m$=16,C8=Math.round(m$*.75*2),yo=120;function c0(s,e){if(!s)return null;const t=new RegExp(`${e}\\s*:\\s*([^;]+)`,"i"),n=s.match(t);return n?n[1].trim():null}function A8(s){const e=s.getAttribute("style")||"";return{fontFamily:c0(e,"font-family"),fontSize:c0(e,"font-size"),color:c0(e,"color"),textAlign:c0(e,"text-align")}}function y$(s){if(!s)return;if(s=s.trim(),s.startsWith("#"))return s.slice(1);const e=s.match(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);if(e){const t=parseInt(e[1]).toString(16).padStart(2,"0"),n=parseInt(e[2]).toString(16).padStart(2,"0"),r=parseInt(e[3]).toString(16).padStart(2,"0");return`${t}${n}${r}`}}function k8(s){if(!s)return;const e=parseFloat(s);if(!isNaN(e))return Math.round(e*.75*2)}function N8(s){if(s)return(s.split(",")[0]??"").replace(/['"]/g,"").trim()||void 0}function b$(s){if(s)switch(s.trim()){case"left":return Bn.LEFT;case"center":return Bn.CENTER;case"right":return Bn.RIGHT;case"justify":return Bn.JUSTIFIED;default:return}}function v$(s){const e=A8(s);return b$(e.textAlign)}function F8(s,e){const t={text:s,font:e.fontFamily||wc,size:e.fontSize||
840C8,...e.bold&&{bold:!0},...e.italic&&{italics:!0},...e.underline&&{underline:{}},...e.strikethrough&&{strike:!0},...e.color&&{color:e.color}};return new Zh(t)}function vl(s,e={}){const t=[];for(const n of Array.from(s.childNodes)){if(n.nodeType===Node.TEXT_NODE){const d=n.textContent||"";if(!d)continue;t.push(F8(d,e));continue}if(n.nodeType!==Node.ELEMENT_NODE)continue;const r=n,i=r.tagName.toLowerCase(),a=A8(r),o={...e};(i==="strong"||i==="b"||r.classList.contains("font-bold"))&&(o.bold=!0),(i==="em"||i==="i"||r.classList.contains("italic"))&&(o.italic=!0),(i==="u"||r.classList.contains("underline"))&&(o.underline=!0),(i==="s"||i==="del"||r.classList.contains("line-through"))&&(o.strikethrough=!0);const c=N8(a.fontFamily);c&&(o.fontFamily=c);const l=k8(a.fontSize);l&&(o.fontSize=l);const u=y$(a.color);if(u&&(o.color=u),i==="br"){t.push(new Zh({break:1}));continue}t.push(...vl(r,o))}return t}function w$(s){var r;const e=s.tagName.toLowerCase(),t=v$(s);if(e==="h1"||e==="h2"||e==="h3"){const i={h1:L_.HEADING_1,h2:L_.HEADING_2,h3:L_.HEADING_3},a={h1:Math.round(16*1.75*.75*2),h2:Math.round(16*1.4*.75*2),h3:Math.round(16*1.15*.75*2)},o=vl(s,{fontSize:a[e],bold:!0}),c={heading:i[e],children:o,spacing:{before:yo*2,after:yo},...t&&{alignment:t}};return[new tr(c)]}if(e==="table")return[x$(s)];if(e==="ul"||e==="ol")return U8(s,e==="ol",0);if(e==="blockquote"){const i=vl(s);return i.unshift(F8("| ",{color:"9ca3af"})),[new tr({children:i,indent:{left:dr(.5)},spacing:{before:yo,after:yo}})]}if(e==="p"||e==="div"){const i={children:vl(s),spacing:{before:yo,after:yo},...t&&{alignment:t}};return[new tr(i)]}return((r=s.textContent)==null?void 0:r.trim())?[new tr({children:vl(s),spacing:{before:yo,after:yo}})]:[]}function x$(s){const e=[],t=s.querySelectorAll("tr");for(const n of Array.from(t)){const r=[],i=n.querySelectorAll("td, th");for(const a of Array.from(i)){const o=a.tagName.toLowerCase()==="th"||a.classList.contains("lexical-table-cell-header"),l=vl(a,o?{bold:!0}:{});r.push(new KD({children:[new tr({children:l})],shading:o?{fill:"f3f4f6"}:void 0}))}r.length>0&&e.push(new fz({children:r}))}return new uz({rows:e,width:{size:100,type:X1.PERCENTAGE}})}function U8(s,e,t){const n=[];for(const r of Array.from(s.children))if(r.tagName.toLowerCase()==="li"){const i=r.querySelector("ul, ol"),a=vl(r);if(n.push(new tr({children:a,bullet:e?void 0:{level:t},numbering:e?{reference:"default-numbering",level:t}:void 0,spacing:{before:40,after:40}})),i){const o=i.tagName.toLowerCase()==="ol";n.push(...U8(i,o,t+1))}}return n}function hN(s){var i;const n=new DOMParser().parseFromString(`<div>${s}</div>`,"text/html").body.firstElementChild;if(!n)return[new tr({})];const r=[];for(const a of Array.from(n.childNodes))if(a.nodeType===Node.TEXT_NODE){const o=(i=a.textContent)==null?void 0:i.trim();o&&r.push(new tr({children:[new Zh({text:o,font:wc,size:16})]}))}else if(a.nodeType===Node.ELEMENT_NODE){const o=vl(a);r.push(new tr({children:o.length?o:[new Zh({text:" ",font:wc,size:16})]}))}return r.length?r:[new tr({})]}async function _$(s,e="document"){const{contentHtml:t,headerHtml:n,footerHtml:r,showPageNumbers:i,margins:a,pageSize:o,orientation:c,pageBorder:l}=s,h=new DOMParser().parseFromString(`<div>${t}</div>`,"text/html").body.firstElementChild,f=[];if(h)for(const w of Array.from(h.children))f.push(...w$(w));f.length===0&&f.push(new tr({}));const p=wv(o,c),y=n?{headers:{default:new QH({children:hN(n)})}}:{};let g={};if(r||i){const w=[];if(r&&w.push(...hN(r)),i){const _={left:Bn.LEFT,center:Bn.CENTER,right:Bn.RIGHT};w.push(new tr({alignment:_[s.pageNumberAlign]||Bn.RIGHT,children:[new Zh({children:[jg.CURRENT],size:k8(s.pageNumberFontSize)||20,font:N8(s.pageNumberFontFamily)||wc,color:"9ca3af"})]}))}g={footers:{default:new e$({children:w})}}}const b={children:f,properties:{page:{size:{width:dr(p.width),height:dr(p.height),orientation:c==="landscape"?"landscape":void 0},margin:{top:dr(a.top),right:dr(a.right),bottom:dr(a.bottom),left:dr(a.left)},borders:T$(l)?{pageBorderTop:l.top?{style:hu.SINGLE,size:6,color:"1a1a1a"}:void 0,pageBorderRight:l.right?{style:hu.SINGLE,size:6,color:"1a1a1a"}:void 0,pageBorderBottom:l.bottom?{style:hu.SINGLE,size:6,color:"1a1a1a"}:void 0,pageBorderLeft:l.left?{style:hu.SINGLE,size:6,color:"1a1a1a"}:void 0}:void 0,pageNumbers:i?{start:1}:void 0},type:Iz.CONTINUOUS},...y,...g},v=new JH({styles:{default:{document:{run:{font:wc,size:C8,color:"
8401f2937"},paragraph:{spacing:{before:yo,after:yo,line:360}}},heading1:{run:{font:wc,size:Math.round(16*1.75*.75*2),bold:!0,color:"1f2937"}},heading2:{run:{font:wc,size:Math.round(16*1.4*.75*2),bold:!0,color:"1f2937"}},heading3:{run:{font:wc,size:Math.round(16*1.15*.75*2),bold:!0,color:"1f2937"}}}},numbering:{config:[{reference:"default-numbering",levels:[{level:0,format:E_.DECIMAL,text:"%1.",alignment:Bn.START},{level:1,format:E_.LOWER_LETTER,text:"%2.",alignment:Bn.START},{level:2,format:E_.LOWER_ROMAN,text:"%3.",alignment:Bn.START}]}]},sections:[b]}),x=await g$.toBlob(v);S$(x,`${e}.docx`)}function T$(s){return s.top||s.right||s.bottom||s.left}function S$(s,e){const t=URL.createObjectURL(s),n=document.createElement("a");n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}function E$(s){A6(s)}async function D$(s,e="document"){await _$(s,e)}function C$(s,e={}){const t=s.cloneNode(!0);return e.keepPageBreaks?k$(t):(t.querySelectorAll("[data-page-split-cont]").forEach(n=>{const r=n.previousElementSibling;if(r){if(n.tagName.toLowerCase()==="table"&&r.tagName.toLowerCase()==="table"){const a=r.querySelector(":scope > tbody")??r.appendChild(n.ownerDocument.createElement("tbody"));n.querySelectorAll(":scope > tbody > tr, :scope > tr").forEach(o=>a.appendChild(o))}else for(;n.firstChild;)r.appendChild(n.firstChild);const i=n.style.marginBottom;i&&i!=="0px"?r.style.marginBottom=i:r.style.removeProperty("margin-bottom"),r.removeAttribute("data-page-split-head"),n.remove()}else n.removeAttribute("data-page-split-cont"),n.style.removeProperty("margin-top"),n.style.removeProperty("list-style")}),t.querySelectorAll("[data-page-split-head]").forEach(n=>{n.removeAttribute("data-page-split-head"),n.style.removeProperty("margin-bottom")}),t.querySelectorAll("[data-page-break-margin]").forEach(n=>{n.removeAttribute("data-page-break-margin"),n.style.removeProperty("margin-top")}),t.querySelectorAll("tr[data-page-rowsplit-cont]").forEach(n=>{const r=n.previousElementSibling;if(r&&r.tagName.toLowerCase()==="tr"){const i=Array.from(r.children),a=Array.from(n.children);if(i.length===a.length){for(let o=0;o<i.length;o++){const c=i[o],l=a[o],u=Array.from(l.children).filter(d=>(d.textContent??"").trim()!==""||d.querySelector("img, table"));if(u.length>0){const d=c.lastElementChild;d&&(d.textContent??"").trim()===""&&!d.querySelector("img, table")&&d.remove(),u.forEach(h=>c.appendChild(h))}c.children.length===0&&c.appendChild(n.ownerDocument.createElement("p"))}n.remove();return}}n.removeAttribute("data-page-rowsplit-cont")}),t.querySelectorAll("[data-page-rowsplit-head]").forEach(n=>{n.removeAttribute("data-page-rowsplit-head")}),t.innerHTML)}const A$=new Set(["ul","ol","li","p","h1","h2","h3","h4","h5","h6","blockquote","div"]);function k$(s){const e=t=>{t.setAttribute("data-print-page-start","true"),t.style.marginTop="0px";for(let n=t;n.parentElement&&n.parentElement!==s&&n.parentElement.firstElementChild===n;n=n.parentElement)n.parentElement.style.marginTop="0px";for(let n=t.firstElementChild;n&&A$.has(n.tagName.toLowerCase());n=n.firstElementChild)n.style.marginTop="0px"};return s.querySelectorAll("[data-page-break-margin]").forEach(t=>{t.removeAttribute("data-page-break-margin"),e(t)}),s.querySelectorAll("[data-page-split-cont]").forEach(t=>{t.removeAttribute("data-page-split-cont")}),s.querySelectorAll("[data-page-split-head]").forEach(t=>{t.removeAttribute("data-page-split-head")}),s.querySelectorAll("tr[data-page-rowsplit-cont]").forEach(t=>{t.removeAttribute("data-page-rowsplit-cont")}),s.querySelectorAll("[data-page-rowsplit-head]").forEach(t=>{t.removeAttribute("data-page-rowsplit-head")}),s.innerHTML}const dN="off",fN=440;function N$(){const s=wi(h=>h.typingScript),e=wi(h=>h.typingEnabled),t=wi(h=>h.setTypingScript),[n,r]=Ee.useState(!1),i=Ee.useRef(null),a=Ee.useRef(null),o=oo(n,a,fN,"right"),c=e?s:null,l=c??s??YI,u=Ee.useMemo(()=>qI(l),[l]),d=ZI(l);return Ee.useEffect(()=>{if(!n)return;const h=f=>{i.current&&!i.current.contains(f.target)&&r(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[n]),G.jsxs("div",{className:"relative flex items-center gap-0.5",ref:i,children:[G.jsxs("select",{value:c??dN,onChange:h=>t(QI(h.target.value)?h.target.value:null),title:"Typing language â type the sound of the word in English letters and it is written in the script (Ctrl+Space switches)",className:`h-7 w-44 rounded border bg-white px-1.5 text-xs outline-none hover:border-gray-300 focus:border-yellow-500 dark:bg-gray-800 dark:hover:border-gray-500 dark:focus:border-yellow-500 ${c?"border-yellow-400 text-gray-900 dark:border-yellow-600 dark:text-gray-100":"border-gray-200 text-gray-700 dark:border-gray-600 dark:text-gray-300"}`,children:[G.jsx("option",{value:dN,children:"Type in: English"}),JI.map(h=>G.jsxs("option",{value:h.id,children:[h.nativeName," â ",h.languages]}
840,h.id))]}),G.jsx("button",{ref:a,type:"button",onClick:()=>r(h=>!h),title:"How to type in this script",className:`flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-semibold transition-colors ${n?"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:"?"}),n&&G.jsxs("div",{"data-typing-guide":l,className:`absolute top-full z-50 mt-1 max-h-[70vh] overflow-y-auto rounded-lg border border-gray-200 bg-white p-3 text-xs text-gray-700 shadow-lg dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300 ${o==="right"?"right-0":"left-0"}`,style:{width:fN},children:[G.jsxs("div",{className:"mb-1 text-sm font-semibold text-gray-900 dark:text-gray-100",children:["Typing ",d.nativeName,G.jsxs("span",{className:"ml-1 font-normal text-gray-500 dark:text-gray-400",children:["(",d.languages,")"]})]}),G.jsxs("p",{className:"mb-2 leading-relaxed",children:["Type the sound of each word in English letters; it is written in the script as you type, and the letters you typed show under the caret. Space, Enter or punctuation ends the word.",G.jsx("b",{children:" Backspace"})," removes the last letter you typed, ",G.jsx("b",{children:"Esc"})," keeps the current word in English letters, and ",G.jsx("b",{children:"Ctrl+Space"})," switches between English and ",d.nativeName,"."]}),u.map(h=>G.jsxs("div",{className:"mb-2",children:[G.jsx("div",{className:"mb-0.5 font-semibold text-gray-800 dark:text-gray-200",children:h.title}),h.note&&G.jsx("div",{className:"mb-1 text-[11px] leading-snug text-gray-500 dark:text-gray-400",children:h.note}),G.jsx("div",{className:"flex flex-wrap gap-1",children:h.rows.map(f=>G.jsxs("span",{className:"inline-flex items-baseline gap-1 rounded border border-gray-200 bg-gray-50 px-1 py-0.5 dark:border-gray-600 dark:bg-gray-900",children:[G.jsx("kbd",{className:"font-mono text-[11px] text-gray-600 dark:text-gray-400",children:f.keys}),G.jsx("span",{className:"text-sm text-gray-900 dark:text-gray-100",children:f.native}),f.withConsonant&&G.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:f.withConsonant})]},f.keys))})]},h.title))]})]})}const F$=[{label:"12",value:"12px"},{label:"14",value:"14px"},{label:"16",value:"16px"},{label:"18",value:"18px"},{label:"20",value:"20px"},{label:"24",value:"24px"},{label:"28",value:"28px"},{label:"32",value:"32px"},{label:"36",value:"36px"},{label:"48",value:"48px"}],TE=[{label:"1.0",value:"1"},{label:"1.15",value:"1.15"},{label:"1.5",value:"1.5"},{label:"2.0",value:"2"}],U$=[{label:"Default",value:""},{label:"Black",value:"#000000"},{label:"Dark Gray",value:"#4b5563"},{label:"Gray",value:"#9ca3af"},{label:"Red",value:"#ef4444"},{label:"Orange",value:"#f97316"},{label:"Yellow",value:"#eab308"},{label:"Green",value:"#22c55e"},{label:"Blue",value:"#3b82f6"},{label:"Purple",value:"#a855f7"},{label:"Pink",value:"#ec4899"}];function R$(){const[s]=Kt(),[e,t]=Ee.useState(!1),[n,r]=Ee.useState(!1),[i,a]=Ee.useState(!1),[o,c]=Ee.useState(!1),[l,u]=Ee.useState("paragraph"),[d,h]=Ee.useState(""),[f,p]=Ee.useState(""),[y,g]=Ee.useState("14px"),[b,v]=Ee.useState(""),[x,w]=Ee.useState("1.15"),{showHeader:_,showFooter:T,showPageNumbers:S,toggleHeader:C,toggleFooter:D,zoom:N,setZoom:M,margins:F,pageBorder:L,pageSize:A,orientation:X,pageNumberAlign:he,pageNumberFontFamily:j,pageNumberFontSize:ee}=wi(),O=Ee.useCallback(()=>{var U,R;const K=Oe();if(Ie(K)){t(K.hasFormat("bold")),r(K.hasFormat("italic")),a(K.hasFormat("strikethrough")),c(K.hasFormat("underline")),p(Vg(K,"font-family",""));const E=Vg(K,"font-size","");if(E)g(E);
840else{const k=K.anchor.getNode().getKey(),I=s.getElementByKey(k)||s.getElementByKey(K.anchor.getNode().getParentOrThrow().getKey());if(I){const $=Math.round(parseFloat(window.getComputedStyle(I).fontSize));g(`${$}px`)}else g("14px")}v(Vg(K,"color",""));const Q=K.anchor.getNode(),ce=Q.getKey()==="root"?Q:Q.getTopLevelElementOrThrow();if(Fe(ce)){h(ce.getFormatType());const k=Fe(Q)&&!Q.isInline()?Q:hm(Q),$=k.getStyle().match(/line-height:\s*([^;]+)/);let Z=null;const ae=(U=$==null?void 0:$[1])==null?void 0:U.trim();if(ae){const ye=parseFloat(ae);isNaN(ye)||(Z=ye)}if(Z===null){const ye=s.getElementByKey(k.getKey());if(ye){const me=window.getComputedStyle(ye);if(me.lineHeight==="normal")Z=1.2;else{const xe=parseFloat(me.lineHeight),De=parseFloat(me.fontSize);!isNaN(xe)&&!isNaN(De)&&De>0&&(Z=xe/De)}}}w(M$(Z))}const V=ce.getType();if(V==="heading"){const k=ce.getTag();u(k)}else if(V==="list"){const k=(R=ce.getListType)==null?void 0:R.call(ce);u(k==="number"?"ol":"ul")}else u(V)}},[]);Ee.useEffect(()=>s.registerUpdateListener(({editorState:K})=>{K.read(()=>O())}),[s,O]);const pe=Ee.useCallback(K=>{s.update(()=>
840{const U=Oe();Ie(U)&&FR(U,K)})},[s]),q=K=>pe({"font-family":K}),B=K=>pe({"font-size":K}),re=K=>pe({color:K}),le=Ee.useCallback(K=>{s.update(()=>{const U=Oe();if(!Ie(U))return;const R=U.getNodes(),E=new Set;for(const Q of R){const ce=Fe(Q)&&!Q.isInline()?Q:hm(Q);E.add(ce)}for(const Q of E){const ce=R8(Q.getStyle(),"line-height",K);Q.setStyle(ce);const V=s.getElementByKey(Q.getKey());V&&(V.style.lineHeight=K)}}),w(K)},[s]),ge=K=>{s.update(()=>{const U=Oe();Ie(U)&&(l===K?zb(U,()=>ct()):zb(U,()=>Vo(K)))})},ie=()=>{s.update(()=>{const K=Oe();Ie(K)&&(l==="quote"?zb(K,()=>ct()):zb(K,()=>TD()))})},P=K=>{l===K?s.dispatchCommand(DD,void 0):s.dispatchCommand(p6,void 0)},[W,te]=Ee.useState(!1),Y=Ee.useRef(null),se=Ee.useRef(null),ue=oo(W,se,160,"right"),we=Ee.useCallback(K=>{const U=s.getRootElement();if(!U)return null;const R=document.querySelector(".page-margin-header .page-margin-editable"),E=document.querySelector(".page-margin-footer .page-margin-editable");return{contentHtml:C$(U,{keepPageBreaks:K==="print"}),headerHtml:_&&R?R.innerHTML:null,footerHtml:T&&E?E.innerHTML:null,showPageNumbers:S,pageBorder:L,pageSize:A,orientation:X,margins:F,pageNumberAlign:he,pageNumberFontFamily:j,pageNumberFontSize:ee}},[s,_,T,S,L,A,X,F,he,j,ee]),H=Ee.useCallback(()=>{const K=we("print");K&&A6(K)},[we]),_e=Ee.useCallback(async K=>{te(!1);const U=we(K==="pdf"?"print":"docx");U&&(K==="pdf"?E$(U):await D$(U))},[s,we]);return Ee.useEffect(()=>{if(!W)return;const K=U=>{Y.current&&!Y.current.contains(U.target)&&te(!1)};return document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[W]),G.jsxs("div",{className:"border-b border-gray-200 dark:border-gray-700",children:[G.jsxs("div",{className:"flex flex-wrap items-center gap-1 px-3 pt-2",children:[G.jsx(ND,{value:f,onChange:q,title:"Font Family",defaultLabel:"Default (Times New Roman)",className:"h-7 w-48 rounded border border-gray-200 bg-white px-1.5 text-xs text-gray-700 outline-none hover:border-gray-300 focus:border-yellow-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:border-gray-500 dark:focus:border-yellow-500"}),G.jsx(pN,{value:y,onChange:B,title:"Font Size",options:F$,width:"w-16"}),G.jsx(I$,{value:b,onChange:re}),G.jsx(Fs,{}),G.jsx($n,{onClick:()=>s.dispatchCommand(qi,"bold"),active:e,title:"Bold",children:"B"}),G.jsx($n,{onClick:()=>s.dispatchCommand(qi,"italic"),active:n,title:"Italic",children:G.jsx("span",{className:"italic",children:"I"})}),G.jsx($n,{onClick:()=>s.dispatchCommand(qi,"underline"),active:o,title:"Underline",children:G.jsx("span",{className:"underline",children:"U"})}),G.jsx($n,{onClick:()=>s.dispatchCommand(qi,"strikethrough"),active:i,title:"Strikethrough",children:G.jsx("span",{className:"line-through",children:"S"})}),G.jsx(Fs,{}),G.jsx($n,{onClick:()=>ge("h1"),active:l==="h1",title:"Heading 1",children:"H1"}),G.jsx($n,{onClick:()=>ge("h2"),active:l==="h2",title:"Heading 2",children:"H2"}),G.jsx($n,{onClick:()=>ge("h3"),active:l==="h3",title:"Heading 3",children:"H3"}),G.jsx(Fs,{}),G.jsx($n,{onClick:()=>s.dispatchCommand(cu,"left"),active:d==="left"||d==="",title:"Align Left",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h10.5M3.75 17.25h16.5"})})}),G.jsx($n,{onClick:()=>s.dispatchCommand(cu,"center"),active:d==="center",title:"Align Center",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M6.75 12h10.5M3.75 17.25h16.5"})})}),G.jsx($n,{onClick:()=>s.dispatchCommand(cu,"right"),active:d==="right",title:"Align Right",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M9.75 12h10.5M3.75 17.25h16.5"})})}),G.jsx($n,{onClick:()=>s.dispatchCommand(cu,"justify"),active:d==="justify",title:"Justify",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5M3.75 17.25h16.5"})})}),G.jsx(Fs,{}),G.jsx(pN,{value:x,onChange:le,title:"Line Spacing",options:TE,width:"w-14"}),G.jsx(q7,{}),G.jsx(Fs,{}),G.jsx($n,{onClick:()=>P("ul"),active:l==="ul",title:"Bullet List",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zM3.75 12h.007v.008H3.75V12zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm-.375 5.25h.007v.008H3.75v-.008zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})})}),G.jsx(J7,{active:l==="ol"}),G.jsx(Fs,{}),G.jsx($n,{onClick:ie,active:l==="quote",title:"Blockquote",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.
840026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})})}),G.jsx(V7,{}),G.jsx(Fs,{}),G.jsx($n,{onClick:()=>s.dispatchCommand(Lv,void 0),title:"Undo",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3"})})}),G.jsx($n,{onClick:()=>s.dispatchCommand(Bv,void 0),title:"Redo",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 15l6-6m0 0l-6-6m6 6H9a6 6 0 000 12h3"})})}),G.jsx(Fs,{}),G.jsx(N$,{})]}),G.jsxs("div",{className:"flex flex-wrap items-center gap-1 px-3 pb-2 pt-1",children:[G.jsx(_7,{}),G.jsx(E7,{}),G.jsx(Fs,{}),G.jsx($n,{onClick:C,active:_,title:"Toggle Header",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4.5h18M3 4.5v3h18v-3M3 4.5v15h18v-15"})})}),G.jsx($n,{onClick:D,active:T,title:"Toggle Footer",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 19.5h18M3 19.5v-3h18v3M3 19.5v-15h18v15"})})}),G.jsx($7,{}),G.jsx(A7,{}),G.jsx(Fs,{}),G.jsx($n,{onClick:()=>M(N-10),title:"Zoom Out",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM13.5 10.5h-6"})})}),G.jsxs("span",{className:"min-w-8 text-center text-xs text-gray-600 dark:text-gray-400",children:[N,"%"]}),G.jsx($n,{onClick:()=>M(N+10),title:"Zoom In",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM10.5 7.5v6m3-3h-6"})})}),G.jsx(Fs,{}),G.jsx(e9,{}),G.jsx($n,{onClick:H,title:"Print Document",children:G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.72 13.829c-.24.03-.48.062-.72.096m.72-.096a42.415 42.415 0 0110.56 0m-10.56 0L6.34 18m10.94-4.171c.24.03.48.062.72.096m-.72-.096L17.66 18m0 0l.229 2.523a1.125 1.125 0 01-1.12 1.227H7.231c-.662 0-1.18-.568-1.12-1.227L6.34 18m11.318 0h1.091A2.25 2.25 0 0021 15.75V9.456c0-1.081-.768-2.015-1.837-2.175a48.055 48.055 0 00-1.913-.247M6.34 18H5.25A2.25 2.25 0 013 15.75V9.456c0-1.081.768-2.015 1.837-2.175a48.041 48.041 0 011.913-.247m10.5 0a48.536 48.536 0 00-10.5 0m10.5 0V3.375c0-.621-.504-1.125-1.125-1.125h-8.25c-.621 0-1.125.504-1.125 1.125v3.659M18.75 9H5.25"})})}),G.jsxs("div",{ref:Y,className:"relative ml-auto",children:[G.jsxs("button",{ref:se,type:"button",onClick:()=>te(K=>!K),title:"Download",className:"flex h-7 items-center gap-1 rounded px-2 text-xs font-semibold text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",children:[G.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"Download",G.jsx("svg",{className:`h-3 w-3 transition-transform ${W?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),W&&G.jsxs("div",{className:`absolute top-full z-50 mt-1 w-40 rounded-lg border border-gray-200 bg-white py-1 shadow-lg dark:border-gray-700 dark:bg-gray-800 ${ue==="right"?"right-0":"left-0"}`,children:[G.jsxs("button",{type:"button",onClick:()=>_e("pdf"),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-sm text-gray-700 transition-colors hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-700",children:[G.jsx("svg",{className:"h-4 w-4 text-red-500",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"PDF (.pdf)"]}),G.jsxs("button",{type:"button",onClick:()=>_e("docx"),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-sm text-gray-700 transition-colors hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-700",children:[G.jsx("svg",{className:"h-4 w-4 text-blue-500",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"Word (.docx)"]})]})]})]})]})}function $n({onClick:s,active:e,title:t,children:n}){return G.jsx("button",{type:"button",onClick:s,title:t,className:`flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-semibold transition-colors ${e?"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100":"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200"}`,children:n})}function pN({value:s,onChange:e,title:t,options:n,width:r}){const i=Ee.useRef(null),[a,o]=Ee.useState();return Ee.useLayoutEffect(()=>{if(r||!i.current)return;const c=window.getComputedStyle(i.current),u=document.createElement("canvas").getContext("2d");if(!u)return;u.font=`${c.fontStyle} ${c.fontVariant} ${c.fontWeight} ${c.fontSize} ${c.fontFamily}`;let d=0;for(const h of n){const f=u.measureText(h.label).width;f>d&&(d=f)}o(Math.ceil(d)+38)},[n,r]),G.jsx("select",{ref:i,value:s,onChange:c=>e(c.target.value),title:t,style:r?void 0:{width:a},className:`${r??""} h-7 rounded border border-gray-200 bg-white px-1.5 text-xs text-gray-700 outline-none hover:border-gray-300 focus:border-yellow-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:border-gray-500 dark:focus:border-yellow-500`,children:n.map(c=>G.jsx("option",{value:c.value,children:c.label},c.value))})}function I$({value:s,onChange:e}){const[t,n]=Ee.useState(!1),r=Ee.useRef(null),i=Ee.useRef(null),a=oo(t,i,208,"left");return Ee.useEffect(()=>{if(!t)return;function o(c){r.current&&!r.current.contains(c.target)&&n(!1)}return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[t]),G.jsxs("div",{className:"relative",ref:r,children:[G.jsx("button",{ref:i,type:"button",onClick:()=>n(o=>!o),title:"Font Color",className:"flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-semibold text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",children:G.jsxs("span",{className:"flex flex-col items-center",children:[G.jsx("span",{children:"A"}),G.jsx("span",{className:"-mt-0.5 h-0.75 w-3.5 rounded-sm",style:{backgroundColor:s||"#000000"}})]})}),t&&G.jsx("div",{className:`absolute top-full z-50 mt-1 w-52 rounded-lg border border-gray-200 bg-white p-2.5 shadow-lg dark:border-gray-700 dark:bg-gray-800 ${a==="right"?"right-0":"left-0"}`,children:G.jsxs("div",{className:"grid grid-cols-6 gap-1.5",children:[U$.map(o=>G.jsx("button",{type:"button",title:o.label,onClick:()=>{e(o.value),n(!1)},className:`aspect-square w-full rounded border transition-transform hover:scale-110 ${s===o.value?"border-yellow-500 ring-1 ring-yellow-500":"border-gray-200 dark:border-gray-600"}`,style:{backgroundColor:o.value||"#ffffff"},children:!o.value&&G.jsx("svg",{className:"mx-auto h-3.5 w-3.5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})})},o.value||"default")),G.jsxs("label",{title:"Custom color",className:"flex aspect-square w-full cursor-pointer items-center justify-center rounded border border-dashed border-gray-300 transition-transform hover:scale-110 dar
840k:border-gray-500",children:[G.jsx("input",{type:"color",className:"invisible absolute h-0 w-0",value:s||"#000000",onChange:o=>{e(o.target.value),n(!1)}}),G.jsx("svg",{className:"h-3.5 w-3.5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})})]})]})})]})}function Fs(){return G.jsx("div",{className:"mx-1 h-5 w-px bg-gray-200 dark:bg-gray-700"})}function M$(s){var n;if(s===null||isNaN(s))return"1.15";let e=((n=TE[0])==null?void 0:n.value)??"1.15",t=1/0;for(const r of TE){const i=Math.abs(parseFloat(r.value)-s);i<t&&(t=i,e=r.value)}return e}function R8(s,e,t){const n=new Map;if(s)for(const r of s.split(";")){const i=r.indexOf(":");if(i>0){const a=r.slice(0,i).trim(),o=r.slice(i+1).trim();a&&o&&n.set(a,o)}}return n.set(e,t),Array.from(n.entries()).map(([r,i])=>`${r}: ${i}`).join("; ")}const xc=jp("pgsfHead",{parse:s=>s===!0}),Mh=jp("pgsfCont",{parse:s=>s===!0});function Rs(s,e){const t=new RegExp(`(?:^|;)\\s*${e}\\s*:\\s*([^;]+)`),n=s.match(t);return n?n[1].trim():null}function Rd(s,e,t){const n=XD(s).filter(r=>VD(r)!==e);return n.push(`${e}: ${t}`),n.join("; ")}function I8(s,e){return XD(s).filter(t=>VD(t)!==e).join("; ")}function XD(s){return s.split(";").map(e=>e.trim()).filter(Boolean)}function VD(s){const e=s.indexOf(":");return e<0?null:s.slice(0,e).trim()}function GD(s){const e=s.getStyle(),t=s.getStart(),n=s.getTag()==="ol"&&t>1?Rd(e,"--lt-counter-start",String(t-1)):I8(e,"--lt-counter-start");n!==e&&s.setStyle(n)}function ma(s){GD(s);let e=s.getStart();for(const t of s.getChildren())st(t)&&(t.getValue()!==e&&t.setValue(e),at(t.getFirstChild())||e++)}const P$=new Set(["list-style","list-style-type","--marker-size","--marker-color","--marker-weight","--marker-style"]);function O$(s){return XD(s).filter(e=>{const t=VD(e);return!(t&&P$.has(t))}).join("; ")}function L$(s,e){let t=0;for(const n of s.getChildren()){if(n.is(e))break;!st(n)||at(n.getFirstChild())||Br(n,Mh)||t++}return t}function B$(s,e){const t=ei(s);return t.setStart(e),GD(t),t}function W$(s){if(at(s.getFirstChild()))return null;const e=s.getParent();if(!at(e))return null;const t=ct();t.setFormat(s.getFormatType()),t.setTextFormat(s.getTextFormat()),t.setTextStyle(s.getTextStyle());const n=O$(s.getStyle());n&&t.setStyle(n);const r=s.getChildrenSize()===0;for(const l of s.getChildren())t.append(l);const i=[];let a=s,o=e,c=null;for(;;){const l=a.getNextSiblings().filter(st),u=o.getTag()==="ol"?o.getStart()+L$(o,a):1;let d=null;if(c||l.length>0){d=B$(o,u),c&&d.append(c);for(const p of l)d.append(p);i.push(d)}i.push(o),(a.is(s)||a.getChildrenSize()===0)&&a.remove(!0);const h=o.getParent(),f=st(h)?h.getParent():null;if(st(h)&&at(f)){o.getChildrenSize()===0&&o.remove(!0),c=null,d&&(c=Cs(),c.append(d)),a=h,o=f;continue}o.getChildrenSize()===0?(o.insertBefore(t),o.remove(!0)):o.insertAfter(t),d&&t.insertAfter(d);break}for(const l of i)l.isAttached()&&ma(l);return r&&t.select(),t}const j$="custom-number-list";class Rl extends Bl{static getType(){return"custom-list"}static clone(e){return new Rl(e.__start,e.__key)}static importJSON(e){return new Rl(e.start)}constructor(e=1,t){super("number",e,t),this.__tag="ol"}getListType(){return j$}$config(){return this.config("custom-list",{$transform:e=>{ma(e)},extends:ai})}exportJSON(){return{...super.exportJSON(),type:"custom-list",listType:"number"}}}function SE(s=1){return Ds(new Rl(s))}function z$(s){return s instanceof Rl}const H$={paragraph:"",heading:{h1:"",h2:"",h3:""},list:{ul:"lexical-list-ul",ol:"lexical-list-ol",listitem:"lexical-listitem",nested:{listitem:"lexical-nested-listitem"}},quote:"",table:"lexical-table",tableCell:"lexical-table-cell",tableCellHeader:"lexical-table-cell-header",tableRow:"lexical-table-row",tableCellSelected:"lexical-table-cell-selected",tableScrollableWrapper:"lexical-table-scroll-wrapper",text:{bold:"font-bold",italic:"italic",underline:"underline",strikethrough:"line-through"}},$$=[Zv,_D,Bl,sd,Rl,Qo,mc,Xp];function M8(s){return{namespace:s,theme:H$,nodes:$$,onError:e=>{console.error("Lexical error:",e)}}}
840const K$=new Set(["Shift","Control","Alt","Meta","CapsLock","AltGraph","NumLock","ScrollLock","Fn","FnLock","Hyper","Super","Symbol","SymbolLock"]);function X$(s){return(s.key===" "||s.code==="Space")&&s.ctrlKey&&!s.altKey&&!s.metaKey}function V$(s,e){if(!s.isCollapsed())return!1;const{anchor:t}=s;if(t.type!=="text")return!1;const n=t.getNode();if(!We(n))return!1;const r=t.offset;return r>=e.length&&n.getTextContent().slice(r-e.length,r)===e}function q_(s,e){const{anchor:t}=s;s.anchor.set(t.key,t.offset-e,"text")}function G$(s){const e=Oe(),t=s.getRootElement(),n=window.getSelection();if(t&&n&&n.rangeCount>0){const r=n.getRangeAt(0);if(t.contains(r.startContainer)&&t.contains(r.endContainer)){const i=Pl();if(i.applyDOMRange(r),(i.anchor.key!=="root"||i.focus.key!=="root")&&!(Ie(e)&&e.is(i)))return Ie(e)&&(i.format=e.format,i.style=e.style),Yt(i),i}}return Ie(e)?e:null}function q$(s){const e=s.getRootElement(),t=window.getSelection();if(!e||!t||t.rangeCount===0)return null;const n=t.getRangeAt(0);if(!e.contains(n.startContainer))return null;const r=n.getClientRects()[0]??n.getBoundingClientRect();if(r.width||r.height)return r;const i=n.startContainer instanceof Element?n.startContainer:n.startContainer.parentElement;return i?i.getBoundingClientRect():null}function P8(){const[s]=Kt(),e=wi(o=>o.typingScript),n=wi(o=>o.typingEnabled)?e:null,r=Ee.useRef(null),[i,a]=Ee.useState(null);return Ee.useEffect(()=>{r.current=null,a(null)},[n]),Ee.useEffect(()=>{const o=()=>{r.current=null},c=f=>{if(X$(f))return f.preventDefault(),o(),wi.getState().toggleTyping(),!0;if(!n)return!1;const p=f.key;if(K$.has(p))return!1;if(f.ctrlKey||f.metaKey||f.altKey)return o(),!1;const y=G$(s);if(!y)return o(),!1;let g=r.current;if(g&&!V$(y,g.out)&&(g=null),p.length===1&&e4(p,(g==null?void 0:g.latin)??"")){f.preventDefault();const v=((g==null?void 0:g.latin)??"")+p,x=BC(v,n);return g&&(q_(y,g.out.length),xl(sc)),y.insertText(x),r.current={latin:v,out:x},!0}if(p==="Backspace"&&g){f.preventDefault();const v=g.latin.slice(0,-1),x=v?BC(v,n):"";return q_(y,g.out.length),xl(sc),x?y.insertText(x):y.removeText(),r.current=v?{latin:v,out:x}:null,!0}if(p==="Escape"&&g)return f.preventDefault(),q_(y,g.out.length),xl(sc),y.insertText(g.latin),o(),!0;const b=p.length===1?t4[p]:void 0;return b?(f.preventDefault(),o(),y.insertText(b),!0):(o(),!1)},l=s.registerCommand($E,c,Al),u=s.registerCommand(kU,()=>(o(),!1),Al),d=s.registerRootListener((f,p)=>{p==null||p.removeEventListener("mousedown",o),f==null||f.addEventListener("mousedown",o)}),h=s.registerUpdateListener(()=>{const f=r.current;if(!f){a(y=>y&&null);return}const p=q$(s);a(p?{latin:f.latin,left:p.left,top:p.bottom}:null)});return()=>{l(),u(),d(),h(),o()}},[s,n]),i?Dp.createPortal(G.jsx("div",{"aria-hidden":"true","data-typing-hint":i.latin,className:"pointer-events-none fixed z-1000 rounded bg-gray-800 px-1.5 py-0.5 font-mono text-[11px] leading-4 text-white shadow-md dark:bg-gray-100 dark:text-gray-900",style:{left:i.left,top:i.top+3},children:i.latin}),document.body):null}const Y$=[{label:"8",value:"8px"},{label:"9",value:"9px"},{label:"10",value:"10px"},{label:"11",value:"11px"},{label:"12",value:"12px"},{label:"14",value:"14px"},{label:"16",value:"16px"},{label:"18",value:"18px"},{label:"20",value:"20px"},{label:"24",value:"24px"}];function gN(){const[s]=Kt(),[e,t]=Ee.useState("left"),[n,r]=Ee.useState(""),[i,a]=Ee.useState("12px"),o=Ee.useCallback(()=>{const u=Oe();if(Ie(u)){const d=u.anchor.getNode(),h=Fe(d)?d:d.getParent();if(h){const f=h.getFormatType();t(f||"left")}r(Vg(u,"font-family","")),a(Vg(u,"font-size","12px"))}},[]);Ee.useEffect(()=>s.registerUpdateListener(({editorState:u})=>{u.read(()=>o())}),[s,o]);const c=Ee.useCallback(u=>{s.update(()=>{const d=Oe();Ie(d)&&FR(d,u)})},[s]),l=[{value:"left",title:"Align Left",icon:G.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 6h18M3 12h12M3 18h18"})})},{value:"center",title:"Align Center",icon:G.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 6h18M6 12h12M3 18h18"})})},{value:"right",title:"Align Right",icon:G.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:G.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 6h18M9 12h12M3 18h18"})})}];return G.jsxs("div",{className:"hf-zone-toolbar",children:[G.jsx(ND,{value:n,title:"Font Family",defaultLabel:"Default",onMouseDown:u=>u.stopPropagation(),onChange:u=>c({"font-family":u}),className:"hf-select hf-select-font"}),G.jsx("select",{value:i,title:"Font Size",onMouseDown:u=>u.stopPropagation(),onChange:u=>c({"font-size":u.target.value}),className:"hf-select hf-select-size",children:Y$.map(u=>G.jsx("option",{value:u.value,children:u.label},u.value))}),G.jsx("div",{className:"hf-toolbar-divider"}),l.map(u=>G.jsx("button",{type:"button",title:u.title,onMouseDown:d=>{d.preventDefault(),s.dispatchCommand(cu,u.value)},className:`hf-align-btn ${e===u.value?"hf-align-btn-active":""}`,children:u.icon},u.value))]})}function Z$({type:s,instanceId:e}){const[t]=Kt(),n=Ee.useRef(!1),r=s==="header"?"headerState":"footerState",i=s==="header"?"headerSourceId":"footerSourceId",a=s==="header"?"setHeaderState":"setFooterState";return Ee.useEffect(()=>t.registerUpdateListener(({editorState:o,tags:c})=>{if(n.current||c.has("history-merge"))return;const l=o.toJSON();WC.getState()[a](l,e)}),[t,e,a]),Ee.useEffect(()=>WC.subscribe(o=>{const c=o[r],l=o[i];if(!c||l===e)return;n.current=!0;const u=t.parseEditorState(c);t.setEditorState(u,{tag:"history-merge"}),n.current=!1}),[t,e,r,i]),null}function mN({type:s}){const e=Ee.useId(),t=Ee.useMemo(()=>M8(`Lawttorney-${s}`),[s]),n=s==="header";return G.jsx("div",{className:`page-margin-zone ${n?"page-margin-header":"page-margin-footer"}`,children:G.jsxs(DR,{initialConfig:t,children:[n&&G.jsx(gN,{}),G.jsx(s6,{contentEditable:G.jsx(a6,{className:"lexical-editor page-margin-editable"}),placeholder:null,ErrorBoundary:m6}),!n&&G.jsx(gN,{}),G.jsx(u6,{}),G.jsx(P8,{}),G.jsx(Z$,{type:s,instanceId:e})]})})}const Y_="data-page-break-margin",Z_="data-page-split-head",l0="data-page-split-cont",u0="data-page-rowsplit-head",h0="data-page-rowsplit-cont",O8="page-flow-split",yN=40,Ld=1,Bd=jp("pgsrHead",{parse:s=>s===!0}),G1=jp("pgsrCont",{parse:s=>s===!0}),yd=jp("pgsrFiller",{parse:s=>s===!0});function Yd(s){const e=document.createRange();e.selectNodeContents(s);const t=Array.from(e.getClientRects()).filter(r=>r.height>0);t.sort((r,i)=>r.top-i.top);const n=[];for(const r of t){const i=n[n.length-1];i&&r.top<i.refTop+Math.max(2,r.height*.5)?(i.top=Math.min(i.top,r.top),i.bottom=Math.max(i.bottom,r.bottom)):n.push({top:r.top,bottom:r.bottom,refTop:r.top})}return n.map(({top:r,bottom:i})=>({top:r,bottom:i}))}function qD(s){if(s.tagName.toLowerCase()==="table")return s;const e=s.querySelector(":scope > table");return e instanceof HTMLElement?e:null}function Id(s){return qD(s)!==null}function EE(s){const e=qD(s);return e?Array.from(e.querySelectorAll("tr")).filter(t=>t.closest("table")===e):[]}function L8(s){const e=[];for(const t of EE(s)){const n=t.getBoundingClientRect();n.height>0&&e.push({top:n.top,bottom:n.bottom})}return e}function Lp(s){return Array.from(s.children).filter(e=>{const t=e.tagName.toLowerCase();return t==="td"||t==="th"})}function ow(s){const e=Array.from(s.children);if(e.length===0)return Yd(s);const t=[];for(const n of e)t.push(...Yd(n));return t.sort((n,r)=>n.top-r.top),t}function B8(s){return Lp(s).some(e=>(e.getAttribute("colspan")??"1")!=="1"||(e.getAttribute("rowspan")??"1")!=="1")}function J$(s){return B8(s)?!1:Lp(s).some(e=>ow(e).length>=2)}function bN(s,e,t,n){const i=s.getBoundingClientRect().height/n;if(i>t+Ld)return!1;const a=Lp(s),o=Lp(e);if(a.length!==o.length||a.length===0)return!1;const c=y=>{const g=ow(y);return g.length===0?0:(g[g.length-1].bottom-g[0].top)/n};let l=!1,u=0,d=0;for(let y=0;y<a.length;y++){const g=c(a[y]),b=c(o[y]);b>0&&(l=!0),u=Math.max(u,g),d=Math.max(d,g+b)}if(!l)return!1;const h=Math.max(0,i-u);return d+h>t-32}function Q$(s,e){const t=Lp(s);if(t.length===0)return null;const n=1,r=[];let i=!1,a=!1;for(const o of t){const c=ow(o);if(c.length===0||c[c.length-1].bottom<=e+n){c.length>0&&(i=!0),r.push({action:"none"});continue}const l=c.find(d=>d.bottom>e+n);if(a=!0,l===c[0]){r.push({action:"all"});continue}const u=W8(o,l.top-.5);if(!u)return null;i=!0,r.push({action:"point",...u})}return i&&a?r:null}function eK(s,e){const t=qD(s);if(!t)return[];const n=Array.from(t.querySelectorAll("tr")).filter(i=>i.closest("table")===t);let r=[];for(const i of n){const a=Array.from(i.children);a.length>r.length&&(r=a)}return r.map(i=>i.getBoundingClientRect().width/(e||1))}function vN(s,e,t,n,r,i,a){const o=[];let c=e,l=t-a;for(let u=0;u<s.length;u++)if(!((s[u].bottom-c)/r<=l+Ld)){if(u===0)return o;o.push(u),c=s[u].top,l=n-i-a}return o}function wN(s){return Id(s)?L8(s):Yd(s)}function W8(s,e){const t=document.createTreeWalker(s,NodeFilter.SHOW_TEXT),n=document.createRange(),r=1;let i=t.nextNode();for(;i;){const a=i.data.length;if(a>0){n.setStart(i,0),n.setEnd(i,a);const o=Array.from(n.getClientRects()),c=o.some(l=>l.top>=e-r);if(o.length>0&&c){let l=-1/0;for(let u=0;u<a;u++){n.setStart(i,u),n.setEnd(i,u+1);const d=n.getClientRects();if(d.length>0&&(l=d[0].top),l>=e-r)return{node:i,offset:u}}}}i=t.nextNode()}return null}function tK(s){const e={pairByHeadEl:new Map,headKeyByEl:new Map,contKeyByEl:new Map,contEls:new Set,headEls:new Set,splittableByEl:new Map,tableByEl:new Map,strays:[],rowPairsAdj:[],lastRowHeadByTableEl:new Map,firstRowContByTableEl:new Map,rowStrays:[],rowKeyByEl:new Map};return s.getEditorState().read(()=>{var o;const t=$t(),n=[];for(const c of t.getChildren())if(at(c)){const l=c.getListType(),u=(l==="bullet"||l==="number")&&!(c.getStyle()||"").includes("--lt-");for(const d of c.getChildren())st(d)&&n.push({node:d,parentKey:c.getKey(),isParagraph:!1,isListItem:!0,isTable:!1,splittable:u})}else if(Fe(c)){const l=fn(c);if(n.push({node:c,parentKey:"root",isParagraph:no(c),isListItem:!1,isTable:l,splittable:no(c)||l}),l){const u=s.getElementByKey(c.getKey()),d=c.getChildren().filter(Lt),h=Br(c,xc),f=Br(c,Mh);for(let p=0;p<d.length;p++){const y=d[p],g=y.getKey(),b=s.getElementByKey(g);b&&e.rowKeyByEl.set(b,g);const v=Br(y,Bd);if(Br(y,G1)){const w=d[p-1];if(w&&Br(w,Bd)&&b){const T=s.getElementByKey(w.getKey());T&&e.rowPairsAdj.push({headKey:w.getKey(),contKey:g,headEl:T,contEl:b})}else p===0&&f&&b&&u?e.firstRowContByTableEl.set(u,{key:g,el:b}):e.rowStrays.push({key:g,which:"cont"})}if(v){const w=d[p+1];w&&Br(w,G1)||(p===d.length-1&&h&&b&&u?e.lastRowHeadByTableEl.set(u,{key:g,el:b}):e.rowStrays.push({key:g,which:"head"}))}}}}const r=new Set,i=[];let a=null;for(const c of n){const{node:l}=c,u=l.getKey(),d=Br(l,xc),h=Br(l,Mh),f=s.getElementByKey(u);if(f&&c.splittable&&(c.isTable?e.tableByEl.set(f,u):e.splittableByEl.set(f,u)),h){const p=a!==null&&a.isHead&&f!==null&&a.entry.parentKey===c.parentKey&&a.entry.isParagraph===c.isParagraph&&a.entry.isListItem===c.isListItem&&a.entry.isTable===c.isTable&&((o=l.getPreviousSibling())==null?void 0:o.getKey())===a.key,y=a?s.getElementByKey(a.key):null;p&&y&&f?(e.pairByHeadEl.set(y,f),e.headKeyByEl.set(y,a.key),e.contKeyByEl.set(f,u),e.headEls.add(y),e.contEls.add(f),r.add(a.key)):e.strays.push({key:u,which:"cont"})}d&&i.push(u),a={entry:c,key:u,isHead:d}}for(const c of i)r.has(c)||e.strays.push({key:c,which:"head"})}),e}function nK(s,e){let t=!1;return s.update(()=>{var a,o,c;xl("historic"),xl(O8);for(const{key:l,which:u}of e.strips){const d=ft(l);Fe(d)&&ui(d,u==="head"?xc:Mh,!1)}for(const{headKey:l,contKey:u}of e.merges){const d=ft(l),h=ft(u);if(!Fe(d)||!Fe(h)||((a=h.getPreviousSibling())==null?void 0:a.getKey())!==l)continue;d.append(...h.getChildren());const f=Br(h,xc);h.remove(),ui(d,xc,f)}for(const{key:l,which:u}of e.rowStrips??[]){const d=ft(l);Lt(d)&&ui(d,u==="head"?Bd:G1,!1)}for(const{headKey:l,contKey:u}of e.rowMerges??[]){const d=ft(l),h=ft(u);
840if(!Lt(d)||!Lt(h)||((o=h.getPreviousSibling())==null?void 0:o.getKey())!==l)continue;const f=d.getChildren().filter(ot),p=h.getChildren().filter(ot);if(f.length!==p.length)continue;for(let g=0;g<f.length;g++){const b=f[g],v=p[g];for(const x of b.getChildren())Br(x,yd)&&x.getTextContentSize()===0&&x.remove();for(const x of v.getChildren()){if(Br(x,yd)&&x.getTextContentSize()===0){x.remove();continue}b.append(x)}b.getChildrenSize()===0&&b.append(ct())}const y=Br(h,Bd);h.remove(),ui(d,Bd,y)}const n=e.split;if(n){const l=Gn(n.node);if(!We(l))return;const u=l.getParent();if(!u||u.getKey()!==n.blockKey||!(no(u)||st(u)))return;const d=l.getTextContentSize();let h;if(n.offset<=0)h=l.getIndexWithinParent();else if(n.offset>=d)h=l.getIndexWithinParent()+1;else{const y=l.splitText(n.offset),g=y[y.length-1];if(!g||y.length<2)return;h=g.getIndexWithinParent()}if(h<=0||h>=u.getChildrenSize())return;const f=u.getChildren().slice(h),p=st(u)?Cs():ct();p.setFormat(u.getFormatType()),p.setIndent(u.getIndent()),p.setDirection(u.getDirection()),p.setStyle(u.getStyle()),ui(p,Mh,!0),ui(u,xc,!0),u.insertAfter(p),p.append(...f),t=!0}const r=e.tableSplit;if(r){const l=ft(r.tableKey);if(!fn(l))return;const u=l.getChildren().filter(Lt),d=[...new Set(r.rowIndices)].filter(y=>y>0&&y<u.length).sort((y,g)=>y-g);if(d.length===0)return;const h=l.getColWidths(),f=h?[...h]:r.colWidths.length>0?[...r.colWidths]:null;!h&&f&&l.setColWidths([...f]);let p=l;for(let y=0;y<d.length;y++){const g=d[y],b=y+1<d.length?d[y+1]:u.length,v=u.slice(g,b);if(v.length===0)continue;const x=od();x.setFormat(l.getFormatType()),x.setIndent(l.getIndent()),x.setDirection(l.getDirection()),x.setStyle(l.getStyle()),f&&x.setColWidths([...f]),ui(x,Mh,!0),ui(p,xc,!0),p.insertAfter(x),x.append(...v),p=x}t=!0}const i=e.rowSplit;if(i){const l=ft(i.rowKey);if(!Lt(l))return;const u=l.getChildren().filter(ot);if(u.length!==i.cells.length)return;const d=[];for(let f=0;f<u.length;f++){const p=i.cells[f];if(p.action!=="point")continue;const y=Gn(p.node);if(!We(y))return;const g=y.getParent();if(!g||!Fe(g)||((c=g.getParent())==null?void 0:c.getKey())!==u[f].getKey())return;d.push({cellIndex:f,blockIndex:g.getIndexWithinParent(),node:p.node,offset:p.offset})}const h=hc();ui(h,G1,!0),ui(l,Bd,!0);for(let f=0;f<u.length;f++){const p=u[f],y=i.cells[f],g=si(p.getHeaderStyles());g.setStyle(p.getStyle());const b=p.getBackgroundColor();if(b&&g.setBackgroundColor(b),y.action==="none"){const v=ct();ui(v,yd,!0),g.append(v)}else if(y.action==="all"){g.append(...p.getChildren());const v=ct();ui(v,yd,!0),p.append(v)}else{const v=d.find(D=>D.cellIndex===f),x=Gn(v.node);if(!We(x))return;const w=x.getParent();if(!w||!Fe(w))return;const _=x.getTextContentSize();let T;if(v.offset<=0)T=x.getIndexWithinParent();else if(v.offset>=_)T=x.getIndexWithinParent()+1;else{const D=x.splitText(v.offset),N=D[D.length-1];if(!N||D.length<2)return;T=N.getIndexWithinParent()}const C=p.getChildren().slice(v.blockIndex+1);if(T<=0){if(g.append(w,...C),p.getChildrenSize()===0){const D=ct();ui(D,yd,!0),p.append(D)}}else if(T>=w.getChildrenSize())if(C.length===0){const D=ct();ui(D,yd,!0),g.append(D)}else g.append(...C);else{const D=w.getChildren().slice(T),N=ct();N.setFormat(w.getFormatType()),N.setIndent(w.getIndent()),N.setDirection(w.getDirection()),N.setStyle(w.getStyle()),N.append(...D),g.append(N,...C)}}h.append(g)}l.insertAfter(h),t=!0}},{discrete:!0}),t}function rK({contentAreaHeight:s,deadZoneHeight:e,verticalPadding:t,onPageCountChange:n}){const[r]=Kt(),i=Ee.useRef(!1),a=Ee.useRef(null),o=Ee.useRef(1),c=Ee.useCallback(()=>{const u=r.getRootElement();if(!u||i.current||s<=0)return;i.current=!0;const d=u.closest(".editor-canvas-bg"),h=(d==null?void 0:d.scrollTop)??null,f=()=>{const w=document.activeElement;if(w!==u&&!u.contains(w))return null;const _=window.getSelection();if(!_||_.rangeCount===0||!_.isCollapsed)return null;const T=_.getRangeAt(0);if(!u.contains(T.startContainer))return null;const S=T.getClientRects();if(S.length>0)return S[0].top;let C=T.startContainer;if(C instanceof HTMLElement&&C.childNodes.length>0){const N=Math.min(T.startOffset,C.childNodes.length-1);C=C.childNodes[N]}const D=C instanceof HTMLElement?C:C.parentElement;return D?D.getBoundingClientRect().top:null},p=d?f():null,y=!r.isComposing(),g=new Set,b=u.getBoundingClientRect(),v=u.offsetWidth>0?b.width/u.offsetWidth:1,x=(w,_)=>{u.querySelectorAll(`[${Y_}]`).forEach(W=>{W.style.marginTop="",W.removeAttribute(Y_)}),u.querySelectorAll(`[${Z_}]`).forEach(W=>{W.style.marginBottom="",W.removeAttribute(Z_)}),u.querySelectorAll(`[${l0}]`).forEach(W=>{W.style.marginTop="",W.style.listStyle="",W.removeAttribute(l0)}),u.querySelectorAll(`[${u0}]`).forEach(W=>{W.removeAttribute(u0)}),u.querySelectorAll(`[${h0}]`).forEach(W=>{W.removeAttribute(h0)});for(const W of w.headEls)W.style.marginBottom="0px",W.setAttribute(Z_,"true");for(const W of w.contEls)W.style.marginTop="0px",W.tagName.toLowerCase()==="li"&&(W.style.listStyle="none"),W.setAttribute(l0,"true");const S=new Set;for(const W of w.contEls){const te=W.parentElement;W.tagName.toLowerCase()==="li"&&(te==null?void 0:te.tagName.toLowerCase())==="ol"&&S.add(te)}for(const W of S){let te=parseInt(W.getAttribute("start")??"1",10)||1;for(const Y of Array.from(W.children)){if(!(Y instanceof HTMLLIElement)||Y.hasAttribute(l0))continue;
840const se=Y.firstElementChild,ue=se==null?void 0:se.tagName.toLowerCase();ue==="ul"||ue==="ol"||(Y.value=te++)}}for(const W of w.rowPairsAdj)W.headEl.setAttribute(u0,"true"),W.contEl.setAttribute(h0,"true");for(const W of w.lastRowHeadByTableEl.values())W.el.setAttribute(u0,"true");for(const W of w.firstRowContByTableEl.values())W.el.setAttribute(h0,"true");const C=Array.from(u.children);if(C.length===0)return{kind:"layout-done",numPages:1};const D=u.parentElement,N=D?Math.max(t,(u.getBoundingClientRect().top-D.getBoundingClientRect().top)/(v||1)):t,M=s-N-t,F=[],L=new Map,A=new Map;for(const W of C){const te=W.tagName.toLowerCase();if((te==="ul"||te==="ol")&&W.children.length>=1){const Y=Array.from(W.children),se=window.getComputedStyle(W),ue=parseFloat(se.marginTop)||0,we=parseFloat(se.marginBottom)||0;L.set(Y[0],ue),A.set(Y[Y.length-1],we),F.push(...Y)}else F.push(W)}const X=F.map(W=>{const te=window.getComputedStyle(W),Y=parseFloat(te.marginTop)||0,se=parseFloat(te.marginBottom)||0,ue=Math.max(Y,L.get(W)??0),we=Math.max(se,A.get(W)??0);return{el:W,top:W.offsetTop,height:W.offsetHeight+we,naturalMarginTop:ue,naturalMarginBottom:we}});let he=0,j=M;const ee=e+2*t,O=s-2*t,pe=[],q=[],B=(W,te,Y)=>{let se=0;for(const ue of W)if((ue.bottom-te)/v<=Y+Ld)se++;else break;return se};let re=0;for(const{el:W,top:te,height:Y,naturalMarginTop:se,naturalMarginBottom:ue}of X){const we=te+he;for(;we>=j+ee;)j+=e+s;const H=Math.max(se,re);let _e=0,K=we,U=j;we>=j&&(_e=j+ee-we,K=we+_e,U=j+e+s);const R=(k,I)=>{W.style.marginTop=`${H+k}px`,W.setAttribute(Y_,"true"),he+=k,j=I},E=w.pairByHeadEl.get(W);let Q=!1,ce=!1;if(E){const k=wN(W),I=wN(E),$=W.getBoundingClientRect().top,Z=Id(W)?K+Y>U:!(k.length>0&&B(k,$,U-K)===k.length),ae=Z?U+ee:K,ye=Z?U+e+s:U,me=ye-ae,xe=w.lastRowHeadByTableEl.get(W),De=w.firstRowContByTableEl.get(E);let Re=!1;if(xe&&De){const Ue=B(k,$,me)===k.length,Ke=(xe.el.getBoundingClientRect().top-$)/v;Re=Ue&&bN(xe.el,De.el,me-Ke,v)}else if(k.length>0&&I.length>0){const Ue=B([...k,...I],$,me);if(Ue===0&&k.length===1){if(_&&Id(W)){const Ke=EE(W)[0],nt=Ke?w.rowKeyByEl.get(Ke):void 0;ce=!!(Ke&&nt&&!g.has(nt)&&J$(Ke))}Re=!ce}else Re=Ue===k.length}if(Re){Z?R(ae-we,ye):_e>0&&R(_e,U),re=ue;continue}if(_&&!ce){const Ue=w.headKeyByEl.get(W),Ke=w.contKeyByEl.get(E);Ue&&Ke&&pe.push({headKey:Ue,contKey:Ke}),Q=!0}}if(_&&Id(W)&&K+Y<=U){const k=W.getBoundingClientRect();for(const I of w.rowPairsAdj){if(!W.contains(I.headEl))continue;const $=I.headEl.getBoundingClientRect(),Z=K+($.top-k.top)/v;bN(I.headEl,I.contEl,U-Z,v)||q.push({headKey:I.headKey,contKey:I.contKey})}}if(K+Y>U){if(_e===0){const $=W.getBoundingClientRect();let Z;if(Id(W))Z=($.bottom-$.top)/v;else{const ae=Yd(W);Z=ae.length?(ae[ae.length-1].bottom-$.top)/v:($.bottom-$.top)/v}if(K+Z<=U+Ld){re=ue;continue}}const k=w.tableByEl.get(W);if(_&&!Q&&k&&!g.has(k)){const $=L8(W),Z=W.getBoundingClientRect(),ae=Z.top,ye=$.length?Math.max(0,($[0].top-ae)/v):0,me=$.length?Math.max(0,(Z.bottom-$[$.length-1].bottom)/v):0,xe=pe.length>0||q.length>0;if(!xe){const De=O-ye-me,Re=EE(W);let Ue=ae,Ke=U-K-me,nt=!1;for(let Ye=0;Ye<Re.length;Ye++){const dt=Re[Ye],Ae=dt.getBoundingClientRect();if(Ae.height<=0)continue;if((Ae.bottom-Ue)/v<=Ke+Ld){nt=!1;continue}const He=w.rowKeyByEl.get(dt),Ze=Ke-(Ae.top-Ue)/v;if(He&&!g.has(He)&&!B8(dt)&&Ze>0){let Qe=-1/0;for(const an of Lp(dt)){const de=ow(an);de.length&&(Qe=Math.max(Qe,de[de.length-1].bottom))}const it=Qe>-1/0?Math.max(0,(Ae.bottom-Qe)/v):0,bt=Ae.top+(Ze-it)*v,xn=bt>Ae.top+1?Q$(dt,bt):null;if(xn)return{kind:"mutate",mutation:{merges:[],strips:w.strays,rowStrips:w.rowStrays,rowSplit:{rowKey:He,cells:xn}}};Ze>=De-Ld&&g.add(He)}Ue=Ae.top,Ke=De,nt?nt=!1:(nt=!0,Ye--)}}if(!xe&&$.length>=2){let De=vN($,ae,U-K,O,v,ye,me);if(De.length===0&&_e===0&&(De=vN($,ae,O,O,v,ye,me)),De.length>0)return{kind:"mutate",mutation:{merges:[],strips:w.strays,rowStrips:w.rowStrays,tableSplit:{tableKey:k,rowIndices:De,colWidths:eK(W,v)}}}}}const I=w.splittableByEl.get(W);if(_&&!Q&&I&&!g.has(I)){const $=Yd(W);if($.length>=2){const Z=W.getBoundingClientRect().top;for(const ae of _e>0?[U-K]:[U-K,O]){const ye=B($,Z,ae);if(ye>
840=1&&ye<$.length){const me=$[ye],xe=W8(W,me.top-.5);if(xe)return{kind:"mutate",mutation:{merges:pe,strips:w.strays,split:{blockKey:I,...xe}}};g.add(I);break}if(ye>=$.length)break}}}_e>0?R(_e,U):R(U-K+ee,U+e+s)}else _e>0&&R(_e,U);re=ue}if(_&&(pe.length>0||w.strays.length>0||q.length>0||w.rowStrays.length>0))return{kind:"mutate",mutation:{merges:pe,strips:w.strays,rowMerges:q,rowStrips:w.rowStrays}};let le=0,ge=null;for(const W of Array.from(u.children)){const te=W.offsetTop+W.offsetHeight;te>le&&(le=te,ge=W)}if(ge&&!Id(ge)){const W=Yd(ge);if(W.length){const te=ge.getBoundingClientRect(),Y=(W[W.length-1].bottom-te.top)/v;le=ge.offsetTop+Math.min(ge.offsetHeight,Y)}}let ie=1,P=M;for(;le>P;)ie++,P+=e+s;return{kind:"layout-done",numPages:ie}};try{let w=o.current;for(let _=0;_<yN;_++){const T=y&&_<yN-1,S=tK(r),C=x(S,T);if(C.kind==="layout-done"){w=C.numPages;break}const D=nK(r,C.mutation);C.mutation.split&&!D&&g.add(C.mutation.split.blockKey),C.mutation.tableSplit&&!D&&g.add(C.mutation.tableSplit.tableKey),C.mutation.rowSplit&&!D&&g.add(C.mutation.rowSplit.rowKey)}w!==o.current&&(o.current=w,n(w))}catch(w){console.error("[page-break] recalc failed:",w)}finally{if(d&&h!==null&&(d.scrollTop!==h&&(d.scrollTop=h),p!==null)){const w=f();if(w!==null){const _=w+d.scrollTop-(p+h),T=d.getBoundingClientRect(),S=48;Math.abs(_)>32&&(w<T.top+S?d.scrollTop-=T.top+S-w:w>T.bottom-S&&(d.scrollTop+=w-(T.bottom-S)))}}i.current=!1}},[r,s,e,t,n]),l=Ee.useCallback(()=>{a.current!==null&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{a.current=null,c()})},[c]);return Ee.useEffect(()=>{const u=r.getRootElement();if(!u)return;l();const d=new MutationObserver(()=>{i.current||l()});d.observe(u,{childList:!0,subtree:!0,characterData:!0,attributes:!1});const h=new ResizeObserver(()=>{i.current||l()});return h.observe(u),()=>{d.disconnect(),h.disconnect(),a.current!==null&&cancelAnimationFrame(a.current)}},[r,l]),Ee.useEffect(()=>{l()},[s,e,l]),Ee.useEffect(()=>r.registerCommand(ic,u=>{if(!u){const b=Oe();if(!Ie(b)||!b.isCollapsed())return!1;const v=b.anchor.getNode().getTopLevelElement();if(no(v)&&v.getTextContentSize()===0){const x=v.getNextSibling();if(Fe(x))return v.remove(),x.selectStart(),!0}return!1}const d=Oe();if(!Ie(d)||!d.isCollapsed())return!1;const h=d.anchor;if(h.offset!==0)return!1;const f=h.getNode(),p=St(f,b=>no(b)||st(b));if(!p||!Fe(p)||!Br(p,Mh)||!(h.type==="element"?f===p:f===p.getFirstDescendant()))return!1;const g=p.getPreviousSibling();return!Fe(g)||!Br(g,xc)||g.selectEnd(),!1},Qn),[r]),Ee.useEffect(()=>r.registerCommand(cb,()=>(requestAnimationFrame(()=>{requestAnimationFrame(()=>{a.current!==null&&(cancelAnimationFrame(a.current),a.current=null),c()})}),!1),ru),[r,c]),Ee.useEffect(()=>r.registerUpdateListener(({dirtyElements:u,dirtyLeaves:d,tags:h})=>{u.size===0&&d.size===0||h.has(O8)||l()}),[r,l]),null}function iK(){const[s]=Kt();return Ee.useEffect(()=>s.registerCommand(td,e=>{if(e.shiftKey)return!1;const t=Oe();if(!Ie(t))return!1;const n=t.anchor.getNode(),r=BB(n);if(!ot(r))return!1;const i=WB(r),a=Ul(r);if(!a)return!1;const o=a.getChildren().filter(Lt),c=o[o.length-1];if(!c||i.getKey()!==c.getKey())return!1;const l=c.getChildren().filter(ot),u=l[l.length-1];return!u||r.getKey()!==u.getKey()?!1:(e.preventDefault(),e.stopPropagation(),HB(!1),!0)},Qn),[s]),null}const sK='font-family: Consolas, "Courier New", monospace;',oK="margin-bottom: 0; line-height: 1.25;";function YD(s,e){e.some(t=>t.mono)&&s.setStyle(oK)}function q1(s){const e=wn(s.text);if(s.bold&&e.toggleFormat("bold"),s.italic&&e.toggleFormat("italic"),s.mono){const t=s.monoSize?` font-size: ${s.monoSize}px;`:"";e.setStyle(sK+t)}return e}function aK(){const[s]=Kt();return Ee.useEffect(()=>{const e=t=>{var r;const n=t.detail;(r=n==null?void 0:n.blocks)!=null&&r.length&&s.update(()=>{const i=$t();if(n.replace)for(const c of i.getChildren())c.remove();else for(const c of i.getChildren())if(c.getTextContent().trim()==="")c.remove();else break;const a=(c,l)=>{for(const u of l)u.text&&c.append(q1(u))},o=[];for(const c of n.blocks)if(c.type==="list-item"){const l=o[o.length-1];l&&"items"in l&&l.type==="list-group"&&l.ordered===c.ordered?l.items.push(c):o.push({type:"list-group",ordered:c.ordered,items:[c]})}else o.push(c);
840for(const c of o)if(c.type==="list-group"){const l=Ts(c.ordered?"number":"bullet");for(const u of c.items){const d=Cs();for(const h of u.segments)h.text&&d.append(q1(h));l.append(d)}i.append(l)}else if(c.type==="heading"){const l=`h${c.level}`,u=Vo(l);a(u,c.segments),i.append(u)}else if(c.type==="table"){const l=od();for(const u of c.rows){const d=hc();for(const h of u){const f=si(un.NO_STATUS),p=ct();a(p,h),f.append(p),d.append(f)}l.append(d)}i.append(l)}else{const l=ct();a(l,c.segments),YD(l,c.segments),i.append(l)}i.getChildrenSize()===0&&i.append(ct())})};return window.addEventListener("insert-to-editor",e),()=>window.removeEventListener("insert-to-editor",e)},[s]),null}function bd(s){s=s.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),s=s.replace(/`([^`]+)`/g,"$1");const e=[],t=/\*\*\*(.+?)\*\*\*|\*\*(.+?)\*\*|\*([^*\s][^*]*?)\*/g;let n=0,r;for(;(r=t.exec(s))!==null;)r.index>n&&e.push({text:s.slice(n,r.index),bold:!1}),r[1]!==void 0?e.push({text:r[1],bold:!0,italic:!0}):r[2]!==void 0?e.push({text:r[2],bold:!0}):e.push({text:r[3],bold:!1,italic:!0}),n=t.lastIndex;return n<s.length&&e.push({text:s.slice(n),bold:!1}),e.length>0?e:[{text:s,bold:!1}]}function xN(s){return s.replace(/^\|/,"").replace(/\|$/,"").split("|").map(e=>e.trim())}function J_(s,e){const t=s[e],n=t.trim();return!!(!n||n.startsWith("```")||/^#{1,6}\s+/.test(n)||/^[-*_]{3,}\s*$/.test(n)||/^\s*[-*+]\s+/.test(t)||/^\s*\d+[.)]\s+/.test(t)||t.includes("|")&&e+1<s.length&&/^\|?\s*[-:|]+[-|\s:]*$/.test(s[e+1]))}function ZD(s){const e=s.split(` 841`),t=[];let n=0;for(;n<e.length;){const r=e[n];if(!r.trim()){n++;continue}if(r.trim().startsWith("```")){n++;const l=[];for(;n<e.length&&!e[n].trim().startsWith("```");)l.push(e[n]),n++;n<e.length&&n++;const u=Math.max(1,...l.map(h=>h.length)),d=Math.max(7,Math.min(13,Math.floor(560/(u*.6))));for(const h of l){const f=(h||" ").replace(/ /g,"Â ");t.push({type:"paragraph",segments:[{text:f,bold:!1,mono:!0,monoSize:d}]})}continue}const i=r.match(/^(#{1,6})\s+(.+)/);if(i){const l=Math.min(i[1].length,3);t.push({type:"heading",level:l,segments:bd(i[2])}),n++;continue}if(/^[-*_]{3,}\s*$/.test(r.trim())){n++;continue}if(r.includes("|")&&n+1<e.length&&/^\|?\s*[-:|]+[-|\s:]*$/.test(e[n+1])){const l=[],u=xN(r);for(u.length&&l.push(u.map(d=>bd(d))),n+=2;n<e.length&&e[n].includes("|")&&e[n].trim()!=="";){const d=xN(e[n]);d.length&&l.push(d.map(h=>bd(h))),n++}l.length&&t.push({type:"table",rows:l});continue}const a=r.match(/^\s*[-*+]\s+(.+)/);if(a){const l=[a[1]];for(n++;n<e.length&&!J_(e,n);)l.push(e[n].trim()),n++;t.push({type:"list-item",ordered:!1,segments:bd(l.join(" "))});continue}const o=r.match(/^\s*\d+[.)]\s+(.+)/);if(o){const l=[o[1]];for(n++;n<e.length&&!J_(e,n);)l.push(e[n].trim()),n++;t.push({type:"list-item",ordered:!0,segments:bd(l.join(" "))});continue}const c=[r];for(n++;n<e.length&&!J_(e,n);)c.push(e[n]),n++;t.push({type:"paragraph",segments:bd(c.join(" "))})}return t}function cK(s){const e=s.split(` 842`);let t=0;for(const n of e){const r=n.trim();if(/^#{1,6}\s+/.test(r)&&t++,/^\s*[-*+]\s+/.test(r)&&t++,/^\s*\d+[.)]\s+/.test(r)&&t++,(/\*\*.+?\*\*/.test(r)||/__.+?__/.test(r))&&t++,/^\|?\s*[-:|]+[-|\s:]*$/.test(r)&&t++,r.startsWith("```")&&t++,/^[-*_]{3,}\s*$/.test(r)&&t++,t>=2)return!0}return!1}function lK(s){try{const e=JSON.parse(s);if(e&&typeof e=="object"&&typeof e.title=="string"&&Array.isArray(e.content)&&e.content.every(t=>typeof t=="string"))return e}catch{}return null}function uK(s){const e=s.split(` 843`),t=[];for(const n of e){const r=n.trim();if(/^[A-H]$/.test(r)||/^\d{3}\s+[A-H]$/.test(r)||/^\d{3}\s+SUPREME COURT REPORTS/.test(r)||/^DIGITAL SUPREME COURT REPORTS$/.test(r))continue;const i=r.replace(/^[A-H]\s+(?=[A-Za-z("])/,"");t.push(i)}return t.join(` 844`)}function hK(s,e){const t=[];t.push({type:"heading",level:1,segments:[{text:s,bold:!0}]});for(const n of e){const i=uK(n).split(/\n{2,}/);for(const a of i){const o=a.replace(/\s*\n\s*/g," ").trim();if(!o)continue;if(/^[A-Z][A-Z\s.,&@()]+\s+v[s]?\.\s+[A-Z][A-Z\s.,&@()]+$/.test(o)){t.push({type:"heading",level:2,segments:[{text:o,bold:!0}]});continue}if(/^[A-Z][A-Z\s:]+$/.test(o)&&o.length<80){t.push({type:"heading",level:3,segments:[{text:o,bold:!0}]});continue}if(/^\[.*JJ?\.\]$/.test(o)){t.push({type:"paragraph",segments:[{text:o,bold:!0}]});continue}if(/^\[\d{4}\]\s+\d+\s+S\.C\.R\.\s+\d+/.test(o)){t.push({type:"paragraph",segments:[{text:o,bold:!1}]});continue}const c=o.match(/^(\d+)\.\s+(.+)/);
844if(c){t.push({type:"paragraph",segments:[{text:`${c[1]}. `,bold:!0},{text:c[2],bold:!1}]});continue}const l=o.match(/^([a-z])\.\s+(.+)/);if(l){t.push({type:"list-item",ordered:!1,segments:[{text:`${l[1]}. ${l[2]}`,bold:!1}]});continue}if(o.startsWith('"')&&o.endsWith('"')){t.push({type:"paragraph",segments:[{text:o,bold:!1}]});continue}if(o.startsWith("Held:")){t.push({type:"paragraph",segments:[{text:"Held: ",bold:!0},{text:o.slice(5).trim(),bold:!1}]});continue}const u=o.match(/^(Code of Criminal Procedure.*?|Constitution of India.*?|Evidence Act.*?|Interpretation of Statutes.*?|Words and Phrases.*?)[:]\s*(.*)/s);if(u){t.push({type:"paragraph",segments:[{text:u[1]+": ",bold:!0},{text:u[2],bold:!1}]});continue}if(/^(Issue for consideration|Case Law Reference|Headnotes prepared by):/.test(o)){const d=o.indexOf(":");t.push({type:"paragraph",segments:[{text:o.slice(0,d+1)+" ",bold:!0},{text:o.slice(d+1).trim(),bold:!1}]});continue}t.push({type:"paragraph",segments:[{text:o,bold:!1}]})}}return t}function d0(s,e){for(const t of e)t.text&&s.append(q1(t))}function dK(s){const e=[];for(const n of s)if(n.type==="list-item"){const r=e[e.length-1];r&&"items"in r&&r.type==="list-group"&&r.ordered===n.ordered?r.items.push(n):e.push({type:"list-group",ordered:n.ordered,items:[n]})}else e.push(n);const t=[];for(const n of e)if(n.type==="list-group"){const r=Ts(n.ordered?"number":"bullet");for(const i of n.items){const a=Cs();d0(a,i.segments),r.append(a)}t.push(r)}else if(n.type==="heading"){const r=`h${n.level}`,i=Vo(r);d0(i,n.segments),t.push(i)}else if(n.type==="table"){const r=od();for(const i of n.rows){const a=hc();for(const o of i){const c=si(un.NO_STATUS),l=ct();d0(l,o),c.append(l),a.append(c)}r.append(a)}t.push(r)}else{const r=ct();d0(r,n.segments),YD(r,n.segments),t.push(r)}return t}function _N(s,e){s.update(()=>{const t=Oe();if(!Ie(t))return;t.removeText();const i=t.anchor.getNode().getTopLevelElement();if(!i)return;const a=dK(e);let o=i;for(const l of a)o.insertAfter(l),o=l;i.getTextContent().trim()===""&&i.remove();const c=a[a.length-1];c&&c.selectEnd()})}function fK(){const[s]=Kt();return Ee.useEffect(()=>s.registerCommand(cb,e=>{var i,a;const t=(i=e.clipboardData)==null?void 0:i.getData("text/html"),n=(a=e.clipboardData)==null?void 0:a.getData("text/plain");if(t&&t.trim().length>0)return e.preventDefault(),s.update(()=>{const c=new DOMParser().parseFromString(t,"text/html"),l=xD(s,c);if(l.length>0){const u=Oe();Ie(u)&&u.removeText(),I1(l)}}),!0;if(!n)return!1;const r=lK(n);if(r){e.preventDefault();const o=hK(r.title,r.content);return o.length&&_N(s,o),!0}if(cK(n)){e.preventDefault();const o=ZD(n);return o.length&&_N(s,o),!0}return!1},Qn),[s]),null}const pK=new Set(["margin-top"]),gK=["--lt-counter-start"];function mK(){const[s]=Kt();return Ee.useEffect(()=>{const t=[rd,Zv,_D,sd,Bl,Rl].map(n=>s.registerMutationListener(n,r=>{s.getEditorState().read(()=>{for(const[i,a]of r){if(a==="destroyed")continue;const o=s.getElementByKey(i),c=s.getEditorState()._nodeMap.get(i);if(o&&c&&Fe(c)){const l=c.getStyle(),u=new Set;if(l)for(const d of l.split(";")){const h=d.indexOf(":");if(h>0){const f=d.slice(0,h).trim(),p=d.slice(h+1).trim();f&&p&&!pK.has(f)&&(o.style.setProperty(f,p),u.add(f))}}for(const d of gK)u.has(d)||o.style.removeProperty(d)}}})}));return()=>t.forEach(n=>n())},[s]),null}function yK(s){try{const e=JSON.parse(s);if(e&&typeof e=="object"&&typeof e.title=="string"&&Array.isArray(e.content)&&e.content.every(t=>typeof t=="string"))return e}catch{}return null}function bK(s){const e=s.split(` 845`);let t=0;for(const n of e){const r=n.trim();if(/^#{1,6}\s+/.test(r)&&t++,/^\s*[-*+]\s+/.test(r)&&t++,/^\s*\d+[.)]\s+/.test(r)&&t++,(/\*\*.+?\*\*/.test(r)||/__.+?__/.test(r))&&t++,/^\|?\s*[-:|]+[-|\s:]*$/.test(r)&&t++,r.startsWith("```")&&t++,/^[-*_]{3,}\s*$/.test(r)&&t++,t>=2)return!0}return!1}function vK(s){const e=s.split(` 846`),t=[];for(const n of e){const r=n.trim();if(/^[A-H]$/.test(r)||/^\d{3}\s+[A-H]$/.test(r)||/^\d{3}\s+SUPREME COURT REPORTS/.test(r)||/^DIGITAL SUPREME COURT REPORTS$/.test(r))continue;const i=r.replace(/^[A-H]\s+(?=[A-Za-z("])/,"");t.push(i)}return t.join(` 847`)}function wK(s,e){const t=[];t.push({type:"heading",level:1,segments:[{text:s,bold:!0}]});for(const n of e){const i=vK(n).split(/\n{2,}/);for(const a of i){const o=a.replace(/\s*\n\s*/g," ").trim();if(!o)continue;if(/^[A-Z][A-Z\s.,&@()]+\s+v[s]?\.\s+[A-Z][A-Z\s.,&@()]+$/.test(o)){t.push({type:"heading",level:2,segments:[{text:o,bold:!0}]});continue}if(/^[A-Z][A-Z\s:]+$/.test(o)&&o.length<80){t.push({type:"heading",level:3,segments:[{text:o,bold:!0}]});continue}if(/^\[.*JJ?\.\]$/.test(o)){t.push({type:"paragraph",segments:[{text:o,bold:!0}]});continue}const c=o.match(/^(\d+)\.\s+(.+)/);
847if(c){t.push({type:"paragraph",segments:[{text:`${c[1]}. `,bold:!0},{text:c[2],bold:!1}]});continue}if(o.startsWith("Held:")){t.push({type:"paragraph",segments:[{text:"Held: ",bold:!0},{text:o.slice(5).trim(),bold:!1}]});continue}t.push({type:"paragraph",segments:[{text:o,bold:!1}]})}}return t}function f0(s,e){for(const t of e)t.text&&s.append(q1(t))}function xK(s){const e=[];for(const n of s)if(n.type==="list-item"){const r=e[e.length-1];r&&"items"in r&&r.type==="list-group"&&r.ordered===n.ordered?r.items.push(n):e.push({type:"list-group",ordered:n.ordered,items:[n]})}else e.push(n);const t=[];for(const n of e)if(n.type==="list-group"){const r=Ts(n.ordered?"number":"bullet");for(const i of n.items){const a=Cs();f0(a,i.segments),r.append(a)}t.push(r)}else if(n.type==="heading"){const r=`h${n.level}`,i=Vo(r);f0(i,n.segments),t.push(i)}else if(n.type==="table"){const r=od();for(const i of n.rows){const a=hc();for(const o of i){const c=si(un.NO_STATUS),l=ct();f0(l,o),c.append(l),a.append(c)}r.append(a)}t.push(r)}else{const r=ct();f0(r,n.segments),YD(r,n.segments),t.push(r)}return t}function _K(s){const e=yK(s);return e?wK(e.title,e.content):bK(s)?ZD(s):null}function TN(s){var n;let e=null;if(document.caretRangeFromPoint)e=document.caretRangeFromPoint(s.clientX,s.clientY);else{const r=(n=document.caretPositionFromPoint)==null?void 0:n.call(document,s.clientX,s.clientY);r&&(e=document.createRange(),e.setStart(r.offsetNode,r.offset),e.collapse(!0))}if(!e)return!1;const t=Pl();return t.applyDOMRange(e),Yt(t),!0}function TK(){const[s]=Kt();return Ee.useEffect(()=>{const e=s.registerCommand(JE,n=>{var i;const r=(i=n.dataTransfer)==null?void 0:i.types;return r!=null&&r.includes("text/html")||r!=null&&r.includes("text/plain")?(n.preventDefault(),!0):!1},Qn),t=s.registerCommand(ZE,n=>{var a,o,c;if((a=n.dataTransfer)!=null&&a.types.includes("application/x-lexical-drag"))return!1;const r=(o=n.dataTransfer)==null?void 0:o.getData("text/html"),i=(c=n.dataTransfer)==null?void 0:c.getData("text/plain");if(!r&&!i)return!1;if(n.preventDefault(),r&&r.trim().length>0)return s.update(()=>{const u=new DOMParser().parseFromString(r,"text/html"),d=xD(s,u);d.length>0&&(TN(n)||$t().selectEnd(),I1(d))}),!0;if(i){const l=_K(i);s.update(()=>{const u=l&&l.length>0?xK(l):i.split(` 848`).filter(d=>d.trim()).map(d=>{const h=ct();return h.append(wn(d)),h});u.length!==0&&(TN(n)||$t().selectEnd(),I1(u))})}return!0},Qn);return()=>{e(),t()}},[s]),null}function SK(){const[s]=Kt();return Ee.useEffect(()=>{const e=s.registerCommand(Wv,n=>{const r=Oe();if(!Ie(r)||!r.isCollapsed()||r.anchor.offset!==0)return!1;let i=r.anchor.getNode();for(;i&&!st(i);){const a=i.getParent();if(!a)return!1;i=a}return!st(i)||i.getTextContent().length>0||i.getStyle().includes("list-style")?!1:(n==null||n.preventDefault(),i.setStyle("list-style: none"),!0)},Al),t=s.registerCommand(Np,n=>{const r=Oe();if(!Ie(r)||!r.isCollapsed())return!1;let i=r.anchor.getNode();for(;i&&!st(i);)i=i.getParent();if(!st(i)||i.getTextContent().length>0)return!1;const a=i.getFirstChild();return a&&at(a)?!1:(n==null||n.preventDefault(),s.update(()=>{const o=i.getParent();if(!at(o))return;const c=o.getParent();if(st(c)){c.insertAfter(i),o.getChildrenSize()===0&&o.remove(),i.selectStart();return}const l=ct(),u=i.getPreviousSiblings(),d=i.getNextSiblings();if(u.length===0&&d.length===0)o.replace(l);else if(d.length===0)o.insertAfter(l),i.remove();else if(u.length===0)o.insertBefore(l),i.remove();else{const h=o.getListType(),f=z$(o)?SE():Ts(h);for(const p of d)f.append(p);o.insertAfter(l),l.insertAfter(f),i.remove()}l.select()}),!0)},Al);return()=>{e(),t()}},[s]),null}const EK=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function SN(s){if(s<1)return String(s);let e=s,t="";for(const[n,r]of EK)for(;e>=n;)t+=r,e-=n;return t}function DE(s){const e={I:1,V:5,X:10,L:50,C:100,D:500,M:1e3},t=s.toUpperCase();if(!/^[IVXLCDM]+$/.test(t))return 0;let n=0;for(let r=0;r<t.length;r++){const i=e[t[r]],a=e[t[r+1]];a&&i<a?n-=i:n+=i}return n}function EN(s){if(s<1)return String(s);let e=s,t="";for(;e>0;){const n=(e-1)%26;t=String.fromCharCode(65+n)+t,e=Math.floor((e-1)/26)}return t}function CE(s){if(!/^[A-Za-z]+$/.test(s))return 0;const e=s.toUpperCase();let t=0;for(let n=0;n<e.length;n++)t=t*26+(e.charCodeAt(n)-64);return t}function po(s,e){switch(e){case"upper-roman":return SN(s);case"lower-roman":return SN(s).toLowerCase();case"upper-alpha":return EN(s);case"lower-alpha":return EN(s).toLowerCase();default:return String(s)}}function DN(s,e){const t=s.trim();if(!t)return null;switch(e){case"upper-roman":case"lower-roman":{const n=DE(t);return n>0?n:null}case"upper-alpha":case"lower-alpha":{const n=CE(t);return n>0?n:null}default:{const n=parseInt(t,10);return Number.isFinite(n)&&n>0?n:null}}}function Y1(s){let e=s.match(/^([IVXLCDM]+)\.\s/);return e?{raw:e[1],value:DE(e[1]),style:"upper-roman"}:(e=s.match(/^([ivxlcdm]+)\.\s/),e?{raw:e[1],value:DE(e[1]),style:"lower-roman"}:(e=s.match(/^(\d+)\.\s/),e?{raw:e[1],value:parseInt(e[1],10),style:"decimal"}:(e=s.match(/^([A-Z]+)\.\s/),e?{raw:e[1],value:CE(e[1]),style:"upper-alpha"}:(e=s.match(/^([a-z]+)\.\s/),e?{raw:e[1],value:CE(e[1]),style:"lower-alpha"}:null))))}function DK(){const[s]=Kt();return Ee.useEffect(()=>s.registerCommand(Np,e=>{const t=Oe();if(!Ie(t)||!t.isCollapsed())return!1;const n=t.anchor.getNode(),r=n.getTopLevelElement();if(!r||!i6(r))return!1;const i=r.getLastDescendant();if(n!==i||t.anchor.offset!==n.getTextContentSize())return!1;const a=Y1(r.getTextContent());if(!a)return!1;const o=`${po(a.value+1,a.style)}. `;return e==null||e.preventDefault(),s.update(()=>{const c=Vo(r.getTag()),l=r.getFirstChild(),u=We(l)&&l.hasFormat("bold"),d=wn(o);u&&d.toggleFormat("bold"),c.append(d),r.insertAfter(c),d.selectEnd()}),!0},Qn),[s]),null}function CK(){const[s]=Kt();return Ee.useEffect(()=>s.registerCommand(td,e=>{if(e.shiftKey)return!1;const t=Oe();if(!Ie(t))return!1;const r=t.anchor.getNode().getTopLevelElement();if(!r||st(r))return!1;const i=r.getTextContent(),a=Y1(i);let o=0;if(a)o=a.raw.length+2;else if(i===""){const c=r.getPreviousSibling();if(!c||!i6(c))return!1}else return!1;return e.preventDefault(),s.update(()=>{if(o>0){let u=r.getFirstChild();for(;u&&!We(u);)if(Fe(u))u=u.getFirstChild();else{u=null;break}if(u&&We(u)){const d=u.getTextContent();d.length>=o&&u.setTextContent(d.slice(o))}}const c=Ts("number"),l=Cs();for(const u of r.getChildren())l.append(u);c.append(l),r.replace(c),l.selectEnd()}),!0},Qn),[s]),null}function hg(s){return s.getTag()==="ol"}function AK(s){const e=[];let t=s;for(;t;){const r=t.getParent();if(!at(r))break;const i=r.getStart()+t.getIndexWithinParent();e.unshift({list:r,itemNumber:i});const a=r.getParent();t=st(a)?a:null}const n=e.findIndex(r=>Rs(r.list.getStyle(),"--lt-multi-level")!==null);return n<0?null:e.slice(n).map(r=>r.itemNumber).join(".")}const kK=[{label:"â",value:"disc"},{label:"â",value:"circle"},{label:"âª",value:"square"},{label:"â",value:'"\\25C6 "'},{label:"â¤",value:'"\\27A4 "'}],NK=[{label:"1",value:"decimal"},{label:"I",value:"upper-roman"},{label:"i",value:"lower-roman"},{label:"A",value:"upper-alpha"},{label:"a",value:"lower-alpha"},{label:"1.1",value:"multi-level"}
848],FK=[{label:"S",value:"0.75em"},{label:"M",value:"1em"},{label:"L",value:"1.5em"},{label:"XL",value:"2em"}],UK=[{label:"Default",value:"currentColor",swatch:"transparent"},{label:"Black",value:"#111827",swatch:"#111827"},{label:"Red",value:"#dc2626",swatch:"#dc2626"},{label:"Orange",value:"#ea580c",swatch:"#ea580c"},{label:"Green",value:"#16a34a",swatch:"#16a34a"},{label:"Blue",value:"#2563eb",swatch:"#2563eb"},{label:"Purple",value:"#9333ea",swatch:"#9333ea"}],RK=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function CN(s){if(s<1)return String(s);let e=s,t="";for(const[n,r]of RK)for(;e>=n;)t+=r,e-=n;return t}function IK(s){const e={I:1,V:5,X:10,L:50,C:100,D:500,M:1e3},t=s.toUpperCase();if(!/^[IVXLCDM]+$/.test(t))return 0;let n=0;for(let r=0;r<t.length;r++){const i=e[t[r]],a=e[t[r+1]];a&&i<a?n-=i:n+=i}return n}function AN(s){if(s<1)return String(s);let e=s,t="";for(;e>0;){const n=(e-1)%26;t=String.fromCharCode(65+n)+t,e=Math.floor((e-1)/26)}return t}function MK(s){if(!/^[A-Za-z]+$/.test(s))return 0;const e=s.toUpperCase();let t=0;for(let n=0;n<e.length;n++)t=t*26+(e.charCodeAt(n)-64);return t}function Q_(s,e,t=""){if(e==="multi-level")return t?`${t}.${s}`:String(s);switch(e){case"upper-roman":return CN(s);case"lower-roman":return CN(s).toLowerCase();case"upper-alpha":return AN(s);case"lower-alpha":return AN(s).toLowerCase();case"decimal":default:return String(s)}}function kN(s,e){const t=s.trim();if(!t)return null;if(e==="multi-level"){const n=t.split(".").map(i=>i.trim()).filter(Boolean);if(n.length===0)return null;const r=n.map(i=>parseInt(i,10));return r.some(i=>!Number.isFinite(i)||i<1)?null:r[r.length-1]}switch(e){case"upper-roman":case"lower-roman":{const n=IK(t);return n>0?n:null}case"upper-alpha":case"lower-alpha":{const n=MK(t);return n>0?n:null}default:{const n=parseInt(t,10);return Number.isFinite(n)&&n>0?n:null}}}function PK(s){const e=s.trim().split(".").map(t=>t.trim()).filter(Boolean);return e.length>1?e.slice(0,-1).join("."):""}const OK=8;function LK(s,e){const t=s.getBoundingClientRect(),n=window.getComputedStyle(s),r=parseFloat(n.paddingLeft)||0;return e>=t.left-32&&e<=t.left+r+OK}function j8(s,e){for(const t of Array.from(s.children)){if(!(t instanceof HTMLLIElement))continue;const n=t.getBoundingClientRect();if(e<n.top||e>n.bottom)continue;const r=t.firstElementChild;return r&&(r.tagName==="UL"||r.tagName==="OL")?j8(r,e):t}return null}function BK(){const[s]=Kt(),[e,t]=Ee.useState(null),[n,r]=Ee.useState("");Ee.useEffect(()=>{const p=s.getRootElement();if(!p)return;const y=g=>{const b=g.target;let v=b.closest("li");const x=b.closest("ul, ol");if(x&&p.contains(x)&&(!v||v.contains(x))&&(v=j8(x,g.clientY)),!v||!p.contains(v))return;const w=v.firstElementChild;w&&(w.tagName==="UL"||w.tagName==="OL")||LK(v,g.clientX)&&(g.preventDefault(),s.read(()=>{const _=Gn(v);if(!st(_))return;const T=_.getParent();if(!at(T)||T.getListType()==="check")return;const C=T.getStyle(),D=_.getStyle(),N=T.getStart()+_.getIndexWithinParent(),M=Rs(C,"list-style-type"),F=Rs(C,"--lt-multi-level")!==null,L=AK(_),A=L?L.split(".").slice(0,-1).join("."):"",X=F?"multi-level":M??"decimal";r(Q_(N,X,A)),t({x:g.clientX,y:g.clientY,listType:hg(T)?"number":"bullet",liKey:_.getKey(),currentBulletStyle:M??"disc",currentNumberStyle:X,currentMarkerSize:Rs(D,"--marker-size")??Rs(C,"--marker-size")??"1em",currentMarkerColor:Rs(D,"--marker-color")??Rs(C,"--marker-color")??"currentColor",currentMarkerWeight:Rs(D,"--marker-weight")??Rs(C,"--marker-weight")??"inherit",currentMarkerStyle:Rs(D,"--marker-style")??Rs(C,"--marker-style")??"inherit",clickedItemNumber:N,multiLevelPrefix:A})}))};return p.addEventListener("contextmenu",y),()=>{p.removeEventListener("contextmenu",y)}},[s]),Ee.useEffect(()=>{if(!e)return;const p=()=>t(null),y=g=>{g.key==="Escape"&&t(null)};return document.addEventListener("mousedown",p),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",y)}},[e]),Ee.useEffect(()=>{let p=!1;const y=b=>{p&&b.getStart()!==1&&st(b.getParent())&&!s.getEditorState()._nodeMap.has(b.getKey())&&b.setStart(1),GD(b)},g=()=>(p=!0,!1);return Ti(s.registerCommand(td,g,Al),s.registerCommand(D1,g,Al),s.registerUpdateListener(()=>{p=!1}),s.registerNodeTransform(Bl,y),s.registerNodeTransform(Rl,y))},[s]);const i=Ee.useCallback(()=>{e&&(s.update(()=>{const p=ft(e.liKey);if(!st(p))return;const y=p.getParent();if(!at(y)||!hg(y))return;let g=y.getPreviousSibling();for(;g&&!(at(g)&&hg(g));)g=g.getPreviousSibling();if(!at(g))return;const b=g.getStart()+g.getChildrenSize(),v=p.getIndexWithinParent();y.setStart(b-v),ma(y)}),t(null))},[s,e]),a=Ee.useCallback(()=>{e&&(s.update(()=>{const p=ft(e.liKey);if(!st(p))return;const y=p.getParent();if(!at(y)||!hg(y))return;if(p.getIndexWithinParent()===0){y.setStart(1),ma(y);return}const b=[p,...p.getNextSiblings()],v=SE(1);for(const x of b)v.append(x);y.insertAfter(v),ma(y),ma(v)}),t(null))},[s,e]),o=Ee.useCallback(()=>
848{if(!e)return;const p=kN(n,e.currentNumberStyle);p===null||p<1||(s.update(()=>{const y=ft(e.liKey);if(!st(y))return;const g=y.getParent();if(!at(g)||!hg(g))return;if(y.getIndexWithinParent()===0){g.setStart(p),ma(g);return}const v=[y,...y.getNextSiblings()],x=SE(p);for(const w of v)x.append(w);g.insertAfter(x),ma(g),ma(x)}),t(null))},[s,e,n]),c=Ee.useCallback(()=>{e&&(s.update(()=>{const p=ft(e.liKey);st(p)&&W$(p)}),t(null))},[s,e]),l=Ee.useCallback((p,y,g)=>{e&&(s.update(()=>{const b=ft(e.liKey);if(!st(b))return;const v=b.getParent();if(!at(v))return;const x=Rd(v.getStyle(),p,y);v.setStyle(x);const w=s.getElementByKey(v.getKey());w instanceof HTMLElement&&(w.style.cssText=x)}),t(b=>b&&{...b,[g]:y}))},[s,e]),u=Ee.useCallback((p,y,g)=>{e&&(s.update(()=>{const b=ft(e.liKey);if(!st(b))return;const v=Rd(b.getStyle(),p,y);b.setStyle(v);const x=s.getElementByKey(b.getKey());x instanceof HTMLElement&&(x.style.cssText=v)}),t(b=>b&&{...b,[g]:y}))},[s,e]),d=Ee.useCallback(p=>{e&&(s.update(()=>{const y=ft(e.liKey);if(!st(y))return;const g=y.getParent();if(!at(g))return;let b=g.getStyle();p==="multi-level"?(b=Rd(b,"list-style-type","none"),b=Rd(b,"--lt-multi-level","1")):(b=I8(b,"--lt-multi-level"),b=Rd(b,"list-style-type",p)),g.setStyle(b);const v=s.getElementByKey(g.getKey());v instanceof HTMLElement&&(v.style.cssText=b)}),t(y=>y&&{...y,currentNumberStyle:p}),r(Q_(e.clickedItemNumber,p,e.multiLevelPrefix)))},[s,e]),h=Ee.useCallback(p=>{if(!e)return;const g=kN(n,e.currentNumberStyle)??e.clickedItemNumber,b=Math.max(1,g+p),v=e.currentNumberStyle==="multi-level"?PK(n)||e.multiLevelPrefix:"";r(Q_(b,e.currentNumberStyle,v))},[e,n]);if(!e)return null;const f=e.listType==="number";return Dp.createPortal(G.jsxs("div",{style:{position:"fixed",top:e.y,left:e.x,zIndex:1e3},className:"min-w-64 rounded-md border border-gray-200 bg-white p-1 shadow-lg dark:border-gray-700 dark:bg-gray-800",onMouseDown:p=>p.stopPropagation(),children:[f&&G.jsxs(G.Fragment,{children:[G.jsx(p0,{onClick:i,children:"Continue previous numbering"}),G.jsx(p0,{onClick:a,children:"Restart numbering from here (1)"}),G.jsxs("div",{className:"flex items-center gap-1 px-2 py-1",children:[G.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-300",children:"Start at:"}),G.jsx("button",{type:"button",onClick:()=>h(-1),title:"Decrease",className:"flex h-6 w-6 items-center justify-center rounded border border-gray-300 text-sm leading-none text-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:text-gray-200 dark:hover:bg-gray-700",children:"â"}),G.jsx("input",{type:"text",value:n,onChange:p=>r(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),o())},className:"w-16 rounded border border-gray-300 px-1.5 py-0.5 text-center text-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100"}),G.jsx("button",{type:"button",onClick:()=>h(1),title:"Increase",className:"flex h-6 w-6 items-center justify-center rounded border border-gray-300 text-sm leading-none text-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:text-gray-200 dark:hover:bg-gray-700",children:"+"}),G.jsx("button",{type:"button",onClick:o,className:"ml-1 rounded bg-blue-500 px-2 py-0.5 text-xs font-medium text-white hover:bg-blue-600",children:"Apply"})]}),G.jsx(p0,{onClick:c,children:"Remove number from this line"}),G.jsx(g0,{}),G.jsx(dg,{children:"Number"}),G.jsx(fg,{children:NK.map(p=>G.jsx(pg,{selected:e.currentNumberStyle===p.value,onClick:()=>d(p.value),small:!0,children:p.label},p.value))}),G.jsx(g0,{})]}),!f&&G.jsxs(G.Fragment,{children:[G.jsx(p0,{onClick:c,children:"Remove bullet from this line"}),G.jsx(g0,{}),G.jsx(dg,{children:"Bullet"}),G.jsx(fg,{children:kK.map(p=>G.jsx(pg,{selected:e.currentBulletStyle===p.value,onClick:()=>l("list-style-type",p.value,"currentBulletStyle"),children:p.label},p.value))}),G.jsx(g0,{})]}),G.jsx(dg,{children:"Size"}),G.jsx(fg,{children:FK.map(p=>G.jsx(pg,{selected:e.currentMarkerSize===p.value,onClick:()=>u("--marker-size",p.value,"currentMarkerSize"),small:!0,children:p.label},p.value))}),G.jsx(dg,{children:"Color"}),G.jsx(fg,{children:UK.map(p=>G.jsx("button",{type:"button",title:p.label,onClick:()=>u("--marker-color",p.value,"currentMarkerColor"),className:`flex h-7 w-7 items-center justify-center rounded ${e.currentMarkerColor===p.value?"ring-2 ring-blue-400":"ring-1 ring-gray-200 hover:ring-gray-300 dark:ring-gray-600"}
848`,children:G.jsx("span",{className:"block h-4 w-4 rounded-full border border-gray-300 dark:border-gray-500",style:{background:p.swatch}})},p.value))}),G.jsx(dg,{children:"Style"}),G.jsxs(fg,{children:[G.jsx(pg,{selected:e.currentMarkerWeight==="bold",onClick:()=>u("--marker-weight",e.currentMarkerWeight==="bold"?"inherit":"bold","currentMarkerWeight"),children:G.jsx("span",{className:"font-bold",children:"B"})}),G.jsx(pg,{selected:e.currentMarkerStyle==="italic",onClick:()=>u("--marker-style",e.currentMarkerStyle==="italic"?"inherit":"italic","currentMarkerStyle"),children:G.jsx("span",{className:"italic",children:"I"})})]})]}),document.body)}function p0({children:s,onClick:e}){return G.jsx("button",{type:"button",onClick:e,className:"block w-full rounded px-3 py-1.5 text-left text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700",children:s})}function dg({children:s}){return G.jsx("div",{className:"mt-1 px-2 text-[10px] uppercase tracking-wide text-gray-500 dark:text-gray-400",children:s})}function fg({children:s}){return G.jsx("div",{className:"flex items-center gap-1 px-1 py-0.5",children:s})}function g0(){return G.jsx("div",{className:"my-1 border-t border-gray-200 dark:border-gray-700"})}function pg({children:s,selected:e,onClick:t,small:n}){return G.jsx("button",{type:"button",onClick:t,className:`flex h-8 w-8 items-center justify-center rounded ${n?"text-xs font-semibold":"text-base"} ${e?"bg-blue-100 text-blue-700 ring-1 ring-blue-400 dark:bg-blue-900 dark:text-blue-300":"text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700"}`,children:s})}const WK=[{label:"1",value:"decimal"},{label:"I",value:"upper-roman"},{label:"i",value:"lower-roman"},{label:"A",value:"upper-alpha"},{label:"a",value:"lower-alpha"}];function jK(s,e,t,n){const r=document.createTreeWalker(s,NodeFilter.SHOW_TEXT),i=document.createRange();let a=!1,o=0,c=r.nextNode();for(;c;){const u=c.length;if(a||(i.setStart(c,0),a=!0),o+u>=n){i.setEnd(c,n-o);break}o+=u,c=r.nextNode()}if(!a)return!1;const l=i.getBoundingClientRect();return e>=l.left-8&&e<=l.right+8&&t>=l.top-4&&t<=l.bottom+4}function z8(s){let e=s.getFirstChild();for(;e&&!We(e);)if(Fe(e))e=e.getFirstChild();else return null;return We(e)?e:null}function gg(s,e,t){const n=z8(s);if(!n)return;const r=n.getTextContent();r.length<e||n.setTextContent(t+r.slice(e))}function zK(){const[s]=Kt(),[e,t]=Ee.useState(null),[n,r]=Ee.useState("");Ee.useEffect(()=>{const h=s.getRootElement();if(!h)return;const f=p=>{const g=p.target.closest("p, h1, h2, h3, h4, h5, h6");if(!g||!h.contains(g)||g.closest("li"))return;const b=g.textContent??"",v=Y1(b);
848if(!v)return;const x=v.raw.length+2;jK(g,p.clientX,p.clientY,x)&&(p.preventDefault(),s.read(()=>{const w=Gn(g),_=w&&Fe(w)?w:null;_&&(t({x:p.clientX,y:p.clientY,blockKey:_.getKey(),style:v.style,value:v.value,prefixLength:x}),r(po(v.value,v.style)))}))};return h.addEventListener("contextmenu",f),()=>h.removeEventListener("contextmenu",f)},[s]),Ee.useEffect(()=>{if(!e)return;const h=()=>t(null),f=p=>{p.key==="Escape"&&t(null)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",f)}},[e]);const i=Ee.useCallback(()=>{if(!e)return;const h=e;s.update(()=>{const f=ft(h.blockKey);if(!f||!Fe(f))return;let p=f.getPreviousSibling(),y=null;for(;p;){if(Fe(p)){const v=Y1(p.getTextContent());if(v&&v.style===h.style){y=v.value;break}}p=p.getPreviousSibling()}if(y===null)return;const g=y+1,b=`${po(g,h.style)}. `;gg(f,h.prefixLength,b)}),t(null)},[s,e]),a=Ee.useCallback(()=>{if(!e)return;const h=e;s.update(()=>{const f=ft(h.blockKey);if(!f||!Fe(f))return;const p=`${po(1,h.style)}. `;gg(f,h.prefixLength,p)}),t(null)},[s,e]),o=Ee.useCallback(()=>{if(!e)return;const h=DN(n,e.style);if(h===null||h<1)return;const f=e;s.update(()=>{const p=ft(f.blockKey);if(!p||!Fe(p))return;const y=`${po(h,f.style)}. `;gg(p,f.prefixLength,y)}),t(null)},[s,e,n]),c=Ee.useCallback(h=>{if(!e)return;const p=DN(n,e.style)??e.value,y=Math.max(1,p+h);r(po(y,e.style))},[e,n]),l=Ee.useCallback(()=>{if(!e)return;const h=e;s.update(()=>{var b;const f=ft(h.blockKey);if(!f||!Fe(f))return;const p=z8(f);if(!p)return;const g=((b=p.getTextContent().slice(h.prefixLength).match(/^[ \t]*/))==null?void 0:b[0].length)??0;gg(f,h.prefixLength+g,"")}),t(null)},[s,e]),u=Ee.useCallback(h=>{if(!e)return;const f=e;s.update(()=>{const p=ft(f.blockKey);if(!p||!Fe(p))return;const y=`${po(f.value,h)}. `;gg(p,f.prefixLength,y)}),t(p=>p&&{...p,style:h,prefixLength:po(p.value,h).length+2}),r(po(e.value,h))},[s,e]),d=`Restart numbering from here (${po(1,(e==null?void 0:e.style)??"upper-roman")})`;return e?Dp.createPortal(G.jsxs("div",{style:{position:"fixed",top:e.y,left:e.x,zIndex:1e3},className:"min-w-64 rounded-md border border-gray-200 bg-white p-1 shadow-lg dark:border-gray-700 dark:bg-gray-800",onMouseDown:h=>h.stopPropagation(),children:[G.jsx(eT,{onClick:i,children:"Continue previous numbering"}),G.jsx(eT,{onClick:a,children:d}),G.jsxs("div",{className:"flex items-center gap-1 px-2 py-1",children:[G.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-300",children:"Start at:"}),G.jsx("button",{type:"button",onClick:()=>c(-1),title:"Decrease",className:"flex h-6 w-6 items-center justify-center rounded border border-gray-300 text-sm leading-none text-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:text-gray-200 dark:hover:bg-gray-700",children:"â"}),G.jsx("input",{type:"text",value:n,onChange:h=>r(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),o())},className:"w-16 rounded border border-gray-300 px-1.5 py-0.5 text-center text-sm dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100"}),G.jsx("button",{type:"button",onClick:()=>c(1),title:"Increase",className:"flex h-6 w-6 items-center justify-center rounded border border-gray-300 text-sm leading-none text-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:text-gray-200 dark:hover:bg-gray-700",children:"+"}),G.jsx("button",{type:"button",onClick:o,className:"ml-1 rounded bg-blue-500 px-2 py-0.5 text-xs font-medium text-white hover:bg-blue-600",children:"Apply"})]}),G.jsx(eT,{onClick:l,children:"Remove numbering from this paragraph"}),G.jsx(KK,{}),G.jsx(HK,{children:"Number"}),G.jsx($K,{children:WK.map(h=>G.jsx(XK,{selected:e.style===h.value,onClick:()=>u(h.value),small:!0,children:h.label},h.value))})]}),document.body):null}function eT({children:s,onClick:e}){return G.jsx("button",{type:"button",onClick:e,className:"block w-full rounded px-3 py-1.5 text-left text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700",children:s})}function HK({children:s}){return G.jsx("div",{className:"mt-1 px-2 text-[10px] uppercase tracking-wide text-gray-500 dark:text-gray-400",children:s})}function $K({children:s}){return G.jsx("div",{className:"flex items-center gap-1 px-1 py-0.5",children:s})}function KK(){return G.jsx("div",{className:"my-1 border-t border-gray-200 dark:border-gray-700"})}function XK({children:s,selected:e,onClick:t,small:n}){return G.jsx("button",{type:"button",onClick:t,className:`flex h-8 w-8 items-center justify-center rounded ${n?"text-xs font-semibold":"text-base"} ${e?"bg-blue-100 text-blue-700 ring-1 ring-blue-400 dark:bg-blue-900 dark:text-blue-300":"text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-700"}`,children:s})}const NN=8,FN=8,mg=40,UN="data-column-resize-handle";function VK(){const[s]=Kt(),t=wi(f=>f.zoom)/100,[n,r]=Ee.useState(null),[i,a]=Ee.useState(null),[o,c]=Ee.useState(null),l=Ee.useRef(null);l.current=i,Ee.useEffect(()=>{const f=p=>
848{if(l.current)return;const y=p.target;if(!y||y.closest(`[${UN}]`))return;const g=y.closest("td, th"),b=g==null?void 0:g.closest("table.lexical-table");if(!g||!b){r(C=>C&&null);return}const v=g.getBoundingClientRect(),x=v.right-p.clientX;if(x>NN||x<-NN){r(C=>C&&null);return}const w=g.parentElement;if(!w)return;const _=Array.from(w.children).indexOf(g);let T=null;if(s.read(()=>{const C=Gn(g);if(!C||!ot(C))return;const D=Ul(C);D&&(T=D.getKey())}),!T)return;const S=b.getBoundingClientRect();r({tableKey:T,cellIndex:_,cellRight:v.right,tableTop:S.top,tableHeight:S.height})};return document.addEventListener("mousemove",f),()=>document.removeEventListener("mousemove",f)},[s]);const u=Ee.useCallback(f=>{if(!n)return;f.preventDefault(),f.stopPropagation();const p=GK(s,n.tableKey);if(!p)return;const y=p.querySelector("tr");if(!y)return;const b=Array.from(y.children).map(v=>v.getBoundingClientRect().width/t);b.length!==0&&(a({tableKey:n.tableKey,cellIndex:n.cellIndex,startClientX:f.clientX,startWidths:b,columnCount:b.length}),c(f.clientX))},[s,n,t]);if(Ee.useEffect(()=>{if(!i)return;const f=g=>{c(g.clientX);const b=(g.clientX-i.startClientX)/t,v=[...i.startWidths],x=i.cellIndex;if(x>=i.columnCount-1){const _=i.startWidths[x]??0;v[x]=Math.max(mg,_+b)}else{const _=i.startWidths[x]??0,T=i.startWidths[x+1]??0;let S=b;_+S<mg&&(S=mg-_),T-S<mg&&(S=T-mg),v[x]=_+S,v[x+1]=T-S}s.update(()=>{const _=ft(i.tableKey);_ instanceof Qo&&_.setColWidths(v)},{tag:"history-merge"})},p=()=>{a(null),r(null),c(null)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",p);const y=document.body.style.userSelect;return document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",p),document.body.style.userSelect=y}},[i,s,t]),!n)return null;const d=i&&o!=null?o:n.cellRight,h=!!i;return Dp.createPortal(G.jsxs(G.Fragment,{children:[G.jsx("div",{[UN]:"true",onMouseDown:u,style:{position:"fixed",left:d-FN/2,top:n.tableTop,width:FN,height:n.tableHeight,cursor:"col-resize",zIndex:50,background:"transparent"}}),G.jsx("div",{style:{position:"fixed",left:d-1,top:n.tableTop,width:2,height:n.tableHeight,background:h?"#3b82f6":"#60a5fa",opacity:h?.9:.7,pointerEvents:"none",zIndex:49}})]}),document.body)}function GK(s,e){const t=s.getElementByKey(e);return t?t.tagName==="TABLE"?t:t.querySelector("table"):null}const qK=M8("LawttorneyEditor");function AE(s,e){var n;if(document.caretRangeFromPoint)return document.caretRangeFromPoint(s,e);const t=(n=document.caretPositionFromPoint)==null?void 0:n.call(document,s,e);if(t){const r=document.createRange();return r.setStart(t.offsetNode,t.offset),r.collapse(!0),r}return null}function YK(){const[s]=Kt();return{handleClick:Ee.useCallback(t=>{const n=t.target;if(n.closest('[contenteditable="true"]')||n.closest("button")||n.closest("input")||n.closest("select"))return;const r=s.getRootElement();if(!r)return;r.focus({preventScroll:!0});const i=t.clientX,a=t.clientY;let o=null;const c="p, li, h1, h2, h3, h4, h5, h6, td, th, blockquote, pre",l=Array.from(r.querySelectorAll(c)).filter(d=>!d.querySelector(c));if(l.length>0){let d=null,h=1/0;for(const f of l){const p=f.getBoundingClientRect(),y=a<p.top?p.top-a:a>p.bottom?a-p.bottom:0;y<h&&(h=y,d=f)}if(d){const f=d.getBoundingClientRect(),p=Math.max(f.left+1,Math.min(i,f.right-1)),y=Math.max(f.top+1,Math.min(a,f.bottom-1));o=AE(p,y)}}else o=AE(i,a);const u=!!o&&r.contains(o.startContainer);s.update(()=>{if(o&&u){const d=Pl();d.applyDOMRange(o),Yt(d);return}Ie(Oe())||$t().selectEnd()})},[s])}}function ZK(){const[s]=Kt();return Ee.useCallback(e=>{const t=e.target;if(t.closest(".page-margin-zone")||t.closest("button, input, select"))return;const n=t.closest('[contenteditable="true"]');if(n&&t!==n)return;const r=e.currentTarget.querySelector(".editor-pages-surface");if(!r)return;const{margins:i,pageSize:a,orientation:o,zoom:c,showHeader:l,showFooter:u,toggleHeader:d,toggleFooter:h}=wi.getState(),{width:f,height:p}=wv(a,o),y=f*$o,g=p*$o,b=c/100,v=r.getBoundingClientRect(),x=(e.clientX-v.left)/b,w=(e.clientY-v.top)/b;if(x<0||x>y)return;const _=g+go,T=r.querySelectorAll(".editor-page-outline").length,S=Math.floor(w/_);if(S<0||S>=T)return;const C=w-S*_;let D;if(C>=0&&C<=i.top*$o)D="header";else if(C>=g-i.bottom*$o&&C<=g)D="footer";else return;e.preventDefault();const N=D==="header"?l:u;if((D==="header"?d:h)(),N){s.focus();return}const{clientX:M,clientY:F}=e;let L=0;const A=()=>{const X=document.querySelectorAll(`.page-margin-${D} .page-margin-editable`),he=X[S]??X[0];if(!he){L++<5&&requestAnimationFrame(A);return}
848he.focus({preventScroll:!0});const j=window.getSelection();if(!j)return;const ee=AE(M,F);let O;ee&&he.contains(ee.startContainer)?O=ee:(O=document.createRange(),O.selectNodeContents(he),O.collapse(!1)),j.removeAllRanges(),j.addRange(O)};requestAnimationFrame(A)},[s])}function JK({children:s}){const{handleClick:e}=YK(),t=ZK(),n=Ee.useCallback(i=>{i.dataTransfer.types.includes("text/plain")&&(i.preventDefault(),i.dataTransfer.dropEffect="copy")},[]),r=Ee.useCallback(i=>{if(i.target.closest('[contenteditable="true"]')||!i.dataTransfer.getData("text/plain"))return;i.preventDefault();const c=i.currentTarget.querySelector('[contenteditable="true"]');if(c){const l=new DragEvent("drop",{bubbles:!0,cancelable:!0,dataTransfer:i.nativeEvent.dataTransfer});c.dispatchEvent(l)}},[]);return G.jsx("div",{className:"editor-canvas-bg",onClick:e,onDoubleClick:t,onDragOver:n,onDrop:r,children:s})}const $o=96,go=24,ua=10,tT=12;function QK(){const{margins:s,showHeader:e,showFooter:t,showPageNumbers:n,pageBorder:r,pageSize:i,orientation:a,zoom:o,pageNumberAlign:c,pageNumberFontFamily:l,pageNumberFontSize:u}=wi(),{width:d,height:h}=wv(i,a),[f,p]=Ee.useState(1),y=d*$o,g=h*$o,b=s.top*$o,v=s.bottom*$o,x=s.left*$o,w=s.right*$o,_=o/100,T=g-b-v,S=v+go+b,C=f*g+(f-1)*go,D=Ee.useCallback(N=>{p(N)},[]);return G.jsx("div",{className:"flex h-full min-w-0 flex-col bg-white dark:bg-gray-900",children:G.jsxs(DR,{initialConfig:qK,children:[G.jsx(R$,{}),G.jsx(JK,{children:G.jsx("div",{style:{transform:`scale(${_})`,transformOrigin:"top center"},children:G.jsxs("div",{className:"editor-pages-surface",style:{width:y,minHeight:C,position:"relative"},children:[Array.from({length:f},(N,M)=>G.jsx("div",{className:"editor-page-outline",style:{top:M*(g+go),width:y,height:g,zIndex:0}},`outline-${M}`)),G.jsxs("div",{style:{position:"relative",zIndex:1},children:[G.jsx("div",{style:{height:b}}),G.jsxs("div",{style:{paddingLeft:x+ua,paddingRight:w+ua,paddingTop:tT,paddingBottom:tT,minHeight:T,position:"relative"},children:[G.jsx(s6,{contentEditable:G.jsx(a6,{className:"lexical-editor relative text-gray-800 outline-none dark:text-gray-200"}),placeholder:G.jsx("div",{className:"editor-placeholder",style:{top:0,left:x+ua},children:"Start writing here..."}),ErrorBoundary:m6}),G.jsx(u6,{}),G.jsx(FB,{shouldPreserveNumbering:!0}),G.jsx(SK,{}),G.jsx(DK,{}),G.jsx(CK,{}),G.jsx(w7,{}),G.jsx(iK,{}),G.jsx(MB,{}),G.jsx(rK,{contentAreaHeight:T,deadZoneHeight:S,verticalPadding:tT,onPageCountChange:D}),G.jsx(aK,{}),G.jsx(fK,{}),G.jsx(TK,{}),G.jsx(mK,{}),G.jsx(P8,{}),G.jsx(c4,{}),G.jsx(BK,{}),G.jsx(zK,{}),G.jsx(VK,{})]})]}),e&&Array.from({length:f},(N,M)=>G.jsx("div",{style:{position:"absolute",top:M*(g+go),left:0,right:0,height:b,paddingLeft:x+ua,paddingRight:w+ua,display:"flex",alignItems:"flex-end",paddingBottom:4,zIndex:4},children:G.jsx(mN,{type:"header"})},`header-${M}`)),t&&Array.from({length:f},(N,M)=>G.jsx("div",{style:{position:"absolute",top:(M+1)*g+M*go-v,left:0,right:0,height:v,paddingLeft:x+ua,paddingRight:w+ua,display:"flex",alignItems:"flex-start",paddingTop:4,zIndex:4},children:G.jsx(mN,{type:"footer"})},`footer-${M}`)),(r.top||r.right||r.bottom||r.left)&&Array.from({length:f},(N,M)=>G.jsx("div",{className:"editor-page-border",style:{top:M*(g+go)+b,left:x,width:y-x-w,height:T,zIndex:2,borderTopWidth:r.top?1:0,borderRightWidth:r.right?1:0,borderBottomWidth:r.bottom?1:0,borderLeftWidth:r.left?1:0}},`border-${M}`)),Array.from({length:f-1},(N,M)=>G.jsx("div",{className:"editor-page-separator",style:{top:(M+1)*g+M*go,height:go,zIndex:3}},`sep-${M}`)),n&&Array.from({length:f},(N,M)=>G.jsx("div",{className:"editor-page-number",style:{top:(M+1)*g+M*go-v,zIndex:5,textAlign:c,fontFamily:l||void 0,fontSize:u,lineHeight:1.6,paddingLeft:x+ua,paddingRight:w+ua,paddingTop:6,pointerEvents:"none"},children:M+1},`pagenum-${M}`))]})})})]})})}function wX(){const s=$I(),e=MN(),t=s.state,n=t==null?void 0:t.content,r=(t==null?void 0:t.globalThreadId)??null;return Ee.useEffect(()=>{if(!n)return;const i=setTimeout(()=>{const o={blocks:ZD(n),replace:!0};window.dispatchEvent(new CustomEvent("insert-to-editor",{detail:o}
848)),e(s.pathname,{replace:!0,state:{}})},300);return()=>clearTimeout(i)},[n,e,s.pathname]),G.jsxs("div",{className:"flex h-full",children:[G.jsx("div",{className:"w-2/5 shrink-0",children:G.jsx(NP,{initialThreadId:r})}),G.jsx("div",{className:"min-w-0 flex-1",children:G.jsx(QK,{})})]})}export{wX as EditorPage};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.