@docx-editor.dev/core 2.29.0 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +22 -26
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +47 -40
- package/dist/binding.js +1 -1
- package/dist/bookmark-names-DDuAra_V.d.ts +37 -0
- package/dist/{chrome-print-CAs51cpq.d.ts → chrome-print-BWvaVEhD.d.ts} +577 -243
- package/dist/chunk-243W4WW2.cjs +2 -0
- package/dist/{chunk-G4HOFIKJ.js → chunk-2E2RPEKX.js} +1 -1
- package/dist/chunk-4S24UOPG.js +30 -0
- package/dist/chunk-5JPIEN54.cjs +3 -0
- package/dist/{chunk-7WQ7AAHW.cjs → chunk-5SO5QDMV.cjs} +1 -1
- package/dist/{chunk-UHHYFIDT.cjs → chunk-6IDOVU6L.cjs} +1 -1
- package/dist/chunk-DBOOTED4.cjs +30 -0
- package/dist/chunk-EOTAXOJY.cjs +5 -0
- package/dist/chunk-FDAKJ2SJ.cjs +30 -0
- package/dist/chunk-FNNOJNGY.js +3 -0
- package/dist/chunk-FT33HRZP.js +5 -0
- package/dist/{chunk-W35WTWAO.cjs → chunk-HC6YNKUI.cjs} +1 -1
- package/dist/chunk-HZ66UCIS.js +2 -0
- package/dist/{chunk-MM5QBMTE.cjs → chunk-IBRBNT37.cjs} +1 -1
- package/dist/chunk-IVIN7X43.js +30 -0
- package/dist/chunk-LZY6B6IV.js +4 -0
- package/dist/chunk-MOYYRVFV.cjs +2 -0
- package/dist/{chunk-OMCG63ZF.js → chunk-N6B3BXCL.js} +1 -1
- package/dist/chunk-Q5K2GGNG.js +2 -0
- package/dist/chunk-R2XINWVE.js +7 -0
- package/dist/chunk-SUEXVBPR.js +1 -0
- package/dist/chunk-T2QQHG5C.js +18 -0
- package/dist/{chunk-LSZ6KPKK.js → chunk-VWIJKH4A.js} +1 -1
- package/dist/chunk-WO4V6PNS.cjs +18 -0
- package/dist/chunk-XMJKFURD.cjs +4 -0
- package/dist/{chunk-BY2ACZZ6.cjs → chunk-XSTGE3NI.cjs} +1 -1
- package/dist/chunk-YQWMI6J5.cjs +7 -0
- package/dist/{chunk-RCLZXP3B.js → chunk-ZCJS7D7S.js} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -5
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +3 -4
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +8 -9
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +12 -13
- package/dist/contracts/types.d.ts +2 -2
- package/dist/{custom-node-writes-Bn6uciLb.d.ts → custom-node-writes-TeUvMP13.d.ts} +2 -2
- package/dist/{diagnostic-context-B8M79cfK.d.ts → diagnostic-context-DJ0P1uZE.d.ts} +3 -2
- package/dist/{diagnostic-hints-BeVjfNOv.d.ts → diagnostic-hints-C9JlLz1L.d.ts} +12 -5
- package/dist/{document-protection-CUb55pl_.d.ts → document-protection-C8x3P2J6.d.ts} +1 -1
- package/dist/{editor-CZQZmTIU.d.ts → editor-B2ShlO23.d.ts} +368 -52
- package/dist/{editor-scope-7o9xweiJ.d.ts → editor-scope-C7ke1KJG.d.ts} +57 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +5 -3
- package/dist/editor.d.ts +606 -34
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +17 -15
- package/dist/export.js +2 -2
- package/dist/{font-resolver-lSBLirLR.d.ts → font-resolver-CWh40DYp.d.ts} +1 -1
- package/dist/font-shaping-policy-BvpkrfxM.d.ts +7 -0
- package/dist/{headless-document-view-pp3q7wIh.d.ts → headless-document-view-qOpaCF82.d.ts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +24 -24
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-BD-dF_rn.d.ts → layout-shaping-CWS3j0Xr.d.ts} +3 -2
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +112 -44
- package/dist/layout.js +1 -1
- package/dist/{note-properties-qQUjO1GQ.d.ts → note-properties-QsKh24sM.d.ts} +1 -1
- package/dist/{omml-equation-BUbU0utM.d.ts → omml-equation-BsLAa2lX.d.ts} +38 -8
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +20 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-DYzzz2ej.d.ts → protocol-COZJUKUY.d.ts} +94 -2
- package/dist/{review-paragraph-order-CN_0l2Cb.d.ts → review-paragraph-order-C_QbCKcH.d.ts} +1 -1
- package/dist/{semantic-cell-selection-eYag3P47.d.ts → semantic-cell-selection-Cub9FDa8.d.ts} +2 -2
- package/dist/{semantic-interaction-kR_QB845.d.ts → semantic-interaction-dApRIYpt.d.ts} +1 -1
- package/dist/{semantic-paint-ZayFF3tD.d.ts → semantic-paint-DLzA8sjP.d.ts} +3 -3
- package/dist/{semantic-record-queries-Bsgth6lv.d.ts → semantic-record-queries-3yp9o11g.d.ts} +1 -1
- package/dist/{semantic-records-DQmumPgL.d.ts → semantic-records-B-akgRch.d.ts} +207 -139
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +49 -136
- package/dist/store.js +1 -1
- package/dist/{tree-package-store-CovjNARF.d.ts → tree-package-store-B8l8DX3Z.d.ts} +612 -428
- package/dist/{tree-session-contract-CZVAGl51.d.ts → tree-session-contract-DeLRqohz.d.ts} +28 -13
- package/dist/{types-barrel-DuC5QBNC.d.ts → types-barrel-CkF2JbU4.d.ts} +1146 -745
- package/package.json +2 -2
- package/dist/chunk-236O4YQW.js +0 -2
- package/dist/chunk-6JPL6ZAS.cjs +0 -5
- package/dist/chunk-6ZQP4HQ7.js +0 -3
- package/dist/chunk-BCXH4BXB.js +0 -5
- package/dist/chunk-CAJEXXVG.cjs +0 -4
- package/dist/chunk-CPWLFPWC.js +0 -30
- package/dist/chunk-D7ZMDMPX.cjs +0 -3
- package/dist/chunk-DOHF6FA7.cjs +0 -30
- package/dist/chunk-DVX32P2P.js +0 -27
- package/dist/chunk-E4LOMDNL.js +0 -1
- package/dist/chunk-EKLM7NWB.cjs +0 -7
- package/dist/chunk-G3K63G7P.cjs +0 -27
- package/dist/chunk-JLVBDYVQ.cjs +0 -2
- package/dist/chunk-LQX36Z5P.js +0 -7
- package/dist/chunk-OSFOJTHU.cjs +0 -18
- package/dist/chunk-T6K2QYNZ.cjs +0 -2
- package/dist/chunk-TRGAVV2Y.js +0 -4
- package/dist/chunk-U4JZVSOE.js +0 -2
- package/dist/chunk-YQ5G6LC7.js +0 -18
- package/dist/image-resources-tXLQShoC.d.ts +0 -211
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import {f,c,d,e}from'./chunk-RIYSCEFQ.js';import {se as se$1,n,l,p,j as j$1,k,r,i,o,u,a,g,f as f$2,oa as oa$1,sa as sa$1,Ua,Ea as Ea$1,Me,Le,ha as ha$1,fd,ja,ic,gc,fc,vc,Vc,$a,F,E,q as q$1,Dd,Cd,Ra as Ra$1,za,He,Ed,t,b,e as e$1,c as c$1,m,Ha,Na,td,Bc,Xc,Uc,dc,hc,Aa as Aa$1,h,ia as ia$1,ya as ya$1}from'./chunk-4S24UOPG.js';import {f as f$1,pl,$b,Zb,cc,_b,Sj,lh,sl,rl,ql,Nb,Xb,c as c$2,b as b$1}from'./chunk-T2QQHG5C.js';var or=(e,t,n)=>{let r=e<0n,o=r?-e:e,a=o/t,i=o%t;if(n!=="towardZero"){let u=i*2n;(u>t||u===t&&(n==="halfAwayFromZero"||n==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let c=r?-a:a,s=Number(c);if(!Number.isSafeInteger(s))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return s},Ze=(e,t,n$1,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(n$1)||n$1<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");if(e===0||n$1===0)return n(0);let o=e*n$1;if(Number.isSafeInteger(o)){let a=Math.abs(o),i=a%t,c=(a-i)/t;return r!=="towardZero"&&(i>t-i||i===t-i&&(r==="halfAwayFromZero"||r==="halfToEven"&&c%2!==0))&&(c+=1),n(c===0?0:o<0?-c:c)}return n(or(BigInt(e)*BigInt(n$1),BigInt(t),r))},$t=(e,t,n,r)=>{if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("font size must be a positive integer number of half points");if(t>Math.floor(Number.MAX_SAFE_INTEGER/n))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=t*n,a=e*2;return i=>Ze(i,a,o,r)},qt=(e,t,n)=>{let r=t*n,o=e*2;return a=>a*r/o};var ar=4096,Zt=e=>typeof e=="number"?String(e):JSON.stringify(e)??typeof e,Oe=class{constructor(t){this.onRestart=t;}onRestart;#e=new Map;keyOf(t$1,n){let r=t(n),o=this.#e.get(r);o===void 0&&(this.#e.size>=ar&&(this.#e.clear(),this.onRestart()),o=this.#e.size,this.#e.set(r,o));let a=`${o}\0${Zt(t$1.fontSizeHalfPoints)}\0${Zt(t$1.bidiLevel)}\0`,i=t$1.context;return !i||i.before===""&&i.after===""?`${a}-${t$1.text}`:`${a}c${i.before.length},${i.after.length}\0${i.before}${i.after}${t$1.text}`}clear(){this.#e.clear();}};var Q=Object.freeze({name:"HarfBuzz",version:"14.4.0"}),se=null,ae=null;function Qe(){return se?Promise.resolve():ae||(ae=import('./dist-PKZR6RSH.js').then(e=>{let t=e.versionString();if(t!==Q.version)throw new O("shapingLibraryMismatch",{diagnostic:f(Q.version,t)});se=e;}).catch(e$1=>{throw ae=null,e$1 instanceof O?e$1:c(e$1)?new O("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new O("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),ae)}function ir(){return se!==null}function sr(){if(!se)throw new O("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return se}var O=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(t,n={}){super(`HarfBuzz shaping failed (${t})`,{cause:n.cause}),this.code=t,this.limit=n.limit,this.actual=n.actual,this.diagnostic=n.diagnostic;}},cr=16*1024*1024,lr=1e6,ur=1e6,dr=1e6,pr=4,fr=512,yr=1024*1024,mr=16*1024*1024,hr=32*1024*1024,gr=64*1024*1024,Sr=64*1024*1024,xr=1e6,br=1e6,Rr=1e6,Fr=64,Cr=4096,vr=4*1024*1024,Er=64*1024*1024,Lr=64*1024*1024,Or=256*1024*1024,Tr=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),Jt=["cmap","head","hhea","hmtx","maxp"],Br=(e,t)=>e[t]<<8|e[t+1],Ir=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,Ar=(e,t)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?Ir(e,12+t*4):0,wr=(e,t)=>{let n=Ar(e,t),r=Br(e,n+4),o=new Set;for(let a=0;a<r;a+=1){let i=n+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},Pr=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),_r=(e,t)=>{let n=l(e,t);if(!n.valid)return n;let r=wr(e,t);for(let o of Jt)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},et=_r,z=(e,t,n)=>{if(!Number.isSafeInteger(e)||e<=0||e>n)throw new RangeError(`${t} must be a positive safe integer no greater than ${n}`);return e},Mr=(e,t,n$1)=>{if(t.length===0)return [];let r=[],o=0;for(;o<t.length;){let a=t[o].cluster,i=o+1,c=t[o].advanceX;for(;i<t.length&&t[i].cluster===a;)c+=t[i].advanceX,i+=1;let s=n(c);r.push({textStart:a,textEnd:n$1==="rtl"?t[o-1]?.cluster??e.length:t[i]?.cluster??e.length,glyphStart:o,glyphEnd:i,advance:s,caretEdges:Object.freeze([n(0),s]),fontSpan:0}),o=i;}return r},G=64,K=8,X=8,Qt=32,tt=G+2*K,kr=G+K+X,Nr=G+K+2*X,zr=G+K+X,en=G+8*K,tn=G+8*X+K,Dr=G+6*X+K,Hr=G+3*X+2*K,Gr=G+3*X,ce=e=>G+e.length*Uint16Array.BYTES_PER_ELEMENT,nt=e=>zr+ce(e),ie=e=>Qt+e*K,Ur=(e,t)=>tt+ce(e)+kr+nt(t),Wr=e=>en+ce(e)+ie(e.length)+e.length*tn,Kr=e=>{let t=new Set(e.glyphs.map(n=>n.outline));return en+ce(e.text)+ie(e.glyphs.length)+e.glyphs.length*tn+ie(e.clusters.length)+e.clusters.length*Dr+e.clusters.reduce((n,r)=>n+ie(r.caretEdges.length),0)+ie(e.fontSpans.length)+e.fontSpans.length*Hr+(e.exactAdvancesX===void 0?0:Qt+e.exactAdvancesX.length*X)+Gr+[...t].reduce((n,r)=>n+nt(r.path),0)},Xr=(e,t)=>tt+ce(e)+Nr+t,Je=class{#e;#p;#f;#y;#m;#R;#h;#l=0;#F;#g;#S;#c;#x;#u;#t;#o=new Map;#i=new Map;#s=new Map;#n=new Map;#C=new Oe(()=>{this.#n.clear(),this.#r=0,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0}));});#a=0;#r=0;#b=0;#d;constructor(t,n){p(this),this.#e=t,this.#p=z(n.maxFontBytes??cr,"maximum font bytes",Sr),this.#f=z(n.maxInputUtf16??lr,"maximum input UTF-16 code units",xr),this.#y=z(n.maxCodepoints??ur,"maximum input code points",br),this.#m=z(n.maxGlyphs??dr,"maximum shaped glyphs",Rr),this.#h=z(n.maxCachedFontBytes??64*1024*1024,"maximum cached font bytes",64*1024*1024),this.#R=z(n.maxCachedFaces??pr,"maximum cached faces",Fr),this.#F=z(n.maxCachedShapes??fr,"maximum cached shape results",Cr),this.#g=z(n.maxOutlineBytes??yr,"maximum outline bytes",vr),this.#S=z(n.maxCachedOutlineBytes??mr,"maximum cached outline bytes",Er),this.#c=z(n.maxShapedRunBytes??hr,"maximum shaped run bytes",Lr),this.#x=z(n.maxCachedShapeBytes??gr,"maximum cached shape bytes",Or),this.#u=n.instrumentation?.onFaceCacheEvent,this.#t=n.instrumentation,this.#d=new this.#e.Buffer;}dispose(){this.#o.clear(),this.#l=0,this.#i.clear(),this.#s.clear(),this.#n.clear(),this.#C.clear(),this.#a=0,this.#r=0,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#d=void 0;}#E(t,n){let r=this.#o.get(t.identity);if(r)return this.#o.delete(t.identity),this.#o.set(t.identity,r),this.#u?.(Object.freeze({kind:"hit",identity:t.identity})),r;let o=j$1(t);for(let l of Jt)if(!o.has(l))throw new O("malformedFont",{diagnostic:`missing required ${l} table`});this.#t?.onByteCopy?.();let a=new this.#e.Blob(Pr(n)),i=new this.#e.Face(a,t.faceIndex),c=new this.#e.Font(i),s=c.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(s.ascender)||!Number.isSafeInteger(s.descender)||!Number.isSafeInteger(s.lineGap))throw new O("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});c.setScale(i.upem,i.upem);let u={identity:t.identity,blob:a,face:i,font:c,unitsPerEm:i.upem,byteLength:n.byteLength};if(n.byteLength<=this.#h){for(;this.#o.size>=this.#R||this.#l+n.byteLength>this.#h;){let l=this.#o.keys().next().value;if(l===void 0)break;this.#l-=this.#o.get(l).byteLength,this.#o.delete(l),this.#u?.(Object.freeze({kind:"evicted",identity:l}));}this.#o.set(t.identity,u),this.#l+=n.byteLength;}return this.#u?.(Object.freeze({kind:"created",identity:t.identity})),u}#L(t,n){let r=this.#i.get(t.identity)?.get(n);if(r)return this.#s.delete(r),this.#s.set(r,void 0),this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#a})),r.outline;this.#t?.onOutlinePathCall?.();let o=t.font.glyphToPath(n),a=nt(o);if(a>this.#g)throw new O("outlineOverLimit",{limit:this.#g,actual:a});let i=Object.freeze({path:o,unitsPerEm:t.unitsPerEm}),c=Ur(t.identity,o)+3*tt+2*X;if(c>this.#S)return this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#a})),i;for(;this.#a+c>this.#S;){let l=this.#s.keys().next().value;if(l===void 0)break;this.#s.delete(l);let d=this.#i.get(l.identity);d.delete(l.glyphId),d.size===0&&this.#i.delete(l.identity),this.#a-=l.bytes,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#a}));}let s=this.#i.get(t.identity);s||this.#i.set(t.identity,s=new Map);let u={outline:i,bytes:c,identity:t.identity,glyphId:n};return s.set(n,u),this.#s.set(u,void 0),this.#a+=c,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#a})),i}#v(t){if(t.length>this.#f)throw new O("textOverLimit",{limit:this.#f,actual:t.length});let n=0;for(let r=0;r<t.length;){let o=t.codePointAt(r);if(r+=o>65535?2:1,n+=1,n>this.#y)throw new O("codepointsOverLimit",{limit:this.#y,actual:n})}}shape(t){if(!this.#d)throw new O("disposed");if(k(t.environment.font),t.environment.font.byteLength>this.#p)throw new O("fontOverLimit",{limit:this.#p,actual:t.environment.font.byteLength});this.#v(t.text);let n$1=Wr(t.text);if(n$1>this.#c)throw new O("shapedRunOverLimit",{limit:this.#c,actual:n$1});let r$1=r(t.environment),o$1=this.#C.keyOf(t,r$1),a=this.#n.get(o$1);if(a)return this.#b-a.stamp>=Math.max(1,this.#n.size>>1)&&(this.#n.delete(o$1),this.#n.set(o$1,a),a.stamp=++this.#b),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r$1.shapingLibrary.name!==Q.name||r$1.shapingLibrary.version!==Q.version)throw new O("shapingLibraryMismatch");if(r$1.normalization!=="none")throw new O("unsupportedNormalization");if(!Number.isSafeInteger(t.bidiLevel)||t.bidiLevel<0||(t.bidiLevel&1)===1!=(r$1.direction==="rtl"))throw new O("invalidBidiLevel");if(Object.keys(r$1.variationAxes).length>0)throw new O("unsupportedVariationAxes");if(r$1.fallbackOrder.length>0)throw new O("unsupportedFallback");let i$1=i(r$1.font),c=j$1(r$1.font);if([...Tr].some(m=>c.has(m))&&!c.has("glyf")&&!c.has("CFF "))throw new O("unsupportedColorFont");let s=t.text;this.#v(s);let u$1=t.context?.before??"",l=t.context?.after??"",d=o,g=Math.max(String(u$1).length,String(l).length);if(typeof u$1!="string"||typeof l!="string"||g>d)throw new O("textOverLimit",{limit:d,actual:g});try{let m=this.#E(r$1.font,i$1),{face:S,font:b}=m,f=this.#d;f.reset(),u$1||l?f.addText(u$1+s+l,u$1.length,s.length):f.addText(s),f.setDirection(r$1.direction==="rtl"?this.#e.Direction.RTL:this.#e.Direction.LTR),f.setScript(r$1.script),f.setLanguage(r$1.language),f.setClusterLevel(this.#e.ClusterLevel.MONOTONE_CHARACTERS);let h=Object.entries(r$1.features).map(([A,k])=>new this.#e.Feature(A,k));this.#t?.onShapeCall?.(),this.#e.shape(b,f,h);let x=f.getLength();if(x>this.#m)throw new O("glyphOverLimit",{limit:this.#m,actual:x});let R=f.getGlyphInfos(),F=f.getGlyphPositions(),v=$t(S.upem,t.fontSizeHalfPoints,r$1.fixedPointScale,r$1.roundingMode),I=qt(S.upem,t.fontSizeHalfPoints,r$1.fixedPointScale),T=[],y=n(0),p=n(0),C=new Map,E=R.map((A,k)=>{let W=F[k];T.push(I(W?.xAdvance??0));let ht=v(W?.xAdvance??0),gt=v(W?.yAdvance??0),rr={id:A.codepoint,cluster:A.cluster-u$1.length,originX:y,originY:p,advanceX:ht,advanceY:gt,offsetX:v(W?.xOffset??0),offsetY:v(W?.yOffset??0),outline:C.get(A.codepoint)??(()=>{let St=this.#L(m,A.codepoint);return C.set(A.codepoint,St),St})()};return y=n(y+ht),p=n(p+gt),rr}),L=b.hExtents(),B=u({text:s,direction:r$1.direction,bidiLevel:t.bidiLevel,glyphs:E,exactAdvancesX:T,clusters:Mr(s,E,r$1.direction),fontSpans:E.length===0?[]:[{glyphStart:0,glyphEnd:E.length,font:r$1.font,fallbackIndex:null}],metrics:{ascent:v(L.ascender),descent:v(-L.descender),lineGap:v(L.lineGap)}},r$1),M=Kr(B);if(M>this.#c)throw new O("shapedRunOverLimit",{limit:this.#c,actual:M});let w=Xr(o$1,M);if(w>this.#x)return this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),B;for(;this.#n.size>=this.#F||this.#r+w>this.#x;){let A=this.#n.keys().next().value;if(A===void 0)break;let k=this.#n.get(A);this.#n.delete(A),this.#r-=k.bytes,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#n.set(o$1,{run:B,bytes:w,stamp:++this.#b}),this.#r+=w,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),B}catch(m){throw m instanceof O?m:new O("malformedFont",{diagnostic:m instanceof Error?m.message:"HarfBuzz shaping failed"})}}},rt=(e={})=>new Je(sr(),e);var ot=Object.freeze({maxFontBytes:16*1024*1024,maxInputUtf16:1e6,maxCodepoints:1e6,maxGlyphs:1e6,maxCachedFaces:32,maxCachedFontBytes:64*1024*1024,maxCachedShapes:512,maxOutlineBytes:1024*1024,maxCachedOutlineBytes:16*1024*1024,maxShapedRunBytes:32*1024*1024,maxCachedShapeBytes:64*1024*1024}),Ka=Object.freeze({...ot,maxCachedShapes:4096});function nn(e){let t={maxFontBytes:e.maxFontBytes,maxInputUtf16:e.maxInputUtf16,maxCodepoints:e.maxCodepoints,maxGlyphs:e.maxGlyphs,maxOutlineBytes:e.maxOutlineBytes,maxShapedRunBytes:e.maxShapedRunBytes},n=["docx-editor-layout-harfbuzz-execution-policy",1,Object.entries(t).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>Object.freeze([r,o]))];return `layout-shaper-policy:sha256:${f$1(new TextEncoder().encode(JSON.stringify(n)))}`}function rn(e,t=ot){let n=e?.maxFontBytes??t.maxFontBytes;if(!Number.isSafeInteger(n)||n<=0||n>a)throw new RangeError(`Font shaping byte ceiling must be between 1 and ${a}`);return n===t.maxFontBytes?t:Object.freeze({...t,maxFontBytes:n})}function on(e,t,n=false){let r=false,o=Object.freeze({shape(a){if(r)throw new O("disposed");let i=a.environment.font;if(k(i),i.byteLength>t.maxFontBytes)throw new O("fontOverLimit",{limit:t.maxFontBytes,actual:i.byteLength});return e.shape(a)},dispose(){r||(r=true,n&&e.dispose?.());}});return q$1(e)?p(o):o}var jr=Object.freeze({}),an=b,Vr="16.0.0",Yr="none",$r=1e3,qr="halfToEven",ln="cluster-edges-only",Zr="Latn",Jr=new Uint8Array(0);var j=class extends Error{code="overLimit";constructor(t){super(t),this.name="LayoutShapingConfigurationError";}};function Qr(e,t){let n=e.epoch,r=e.maxFontBytes,o=e.sources,a$1=e.substitutions,i=e.defaultFont,c=e.language;if(!Number.isSafeInteger(r)||r<=0||r>a)throw new j(`Font byte ceiling must not exceed the engine hard maximum of ${a}`);let s=o.length,u=a$1?.length??0;if(s===0||s>b)throw new j(`Font source count must be between 1 and ${b}`);if(u>an)throw new j(`Font substitution count must not exceed ${an}`);let l=0,d=[];for(let S=0;S<s;S+=1){let b=o[S],f=b.request,h=b.availability,x=b.id,R=b.hash,F=b.faceIndex,v=h==="forbidden",I=v?Jr:b.bytes;if(!v){if(typeof x!="string"||x.length===0)throw new TypeError("Resolved font id must not be empty");let T;try{T=e$1(I);}catch{throw new j(`Font source ${x} must provide genuine bytes`)}if(T>r)throw new j(`Font source ${x} exceeds the per-font byte ceiling`);if(l+=T,l>c$1)throw new j(`Font sources exceed the aggregate byte ceiling of ${c$1}`)}d.push(t&&g(b)!==void 0?b:Object.freeze({request:Object.freeze({family:f.family,weight:f.weight,style:f.style}),id:x,bytes:I,hash:R,faceIndex:F,...h?{availability:h}:{}}));}let g$1;if(a$1){g$1=[];for(let S=0;S<u;S+=1){let b=a$1[S],f=b.from,h=b.to,x=b.lineMetrics;g$1.push(Object.freeze({from:Object.freeze({family:f.family,weight:f.weight,style:f.style}),to:Object.freeze({family:h.family,weight:h.weight,style:h.style}),...x?{lineMetrics:Object.freeze({heightEm:x.heightEm,baselineEm:x.baselineEm})}:{}}));}}let m={epoch:n,maxFontBytes:r,sources:Object.freeze(d),substitutions:g$1?Object.freeze(g$1):void 0,defaultFont:Object.freeze({family:i.family,sizeHalfPoints:i.sizeHalfPoints}),language:c};return Object.freeze(m)}function sn(e,t){let n=e.map((o,a)=>({value:o,index:a,key:h(t(o))})),r=new Set;for(let o of n){if(r.has(o.key))return e;r.add(o.key);}return n.sort((o,a)=>o.key<a.key?-1:o.key>a.key?1:o.index-a.index).map(({value:o})=>o)}function eo(e,t){let n={family:e.family},r={sizeHalfPoints:e.sizeHalfPoints};return {...n,...t?r:{}}}function cn(e,t){let n=s=>({family:s.family,weight:s.weight,style:s.style}),r=t?e.sources:sn(e.sources,s=>s.request),o=e.substitutions??[],a=t?o:sn(o,s=>s.from),i={sources:r.map(s=>{let u=s.availability??"available",l={request:n(s.request),availability:u};if(u==="forbidden")return {...l,...t?{id:s.id,faceIndex:s.faceIndex,declaredHash:s.hash}:{}};let d=g(s);if(d==null)throw new TypeError("Font configuration identity requires prepared source bytes");return {...l,...t?{id:s.id}:{},faceIndex:s.faceIndex,declaredHash:s.hash,actualHash:d,byteLength:s.bytes.byteLength}}),substitutions:a.map(s=>({from:n(s.from),to:n(s.to),lineMetrics:s.lineMetrics?{heightEm:s.lineMetrics.heightEm,baselineEm:s.lineMetrics.baselineEm}:null})),defaultFont:eo(e.defaultFont,t),language:e.language||"en"},c={epoch:e.epoch,maxFontBytes:e.maxFontBytes};return {version:1,...t?c:{},...i}}var to=Symbol("prepared-layout-font-configuration"),Te=new WeakMap;function no(e){return Te.has(e)}function ro(e){let t=Te.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.configuration}function ni(e){let t=Te.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.sharedShapingFingerprint}function at(e,t){return un(e,t,false)}function ri(e,t){return un(e,t,true)}function un(e,t,n){let r=Qr(e,n),o=Object.freeze({epoch:r.epoch,maxFontBytes:r.maxFontBytes,sources:Object.freeze(r.sources.map(d=>n&&g(d)!==void 0?d:f$2(d,{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash}))),substitutions:r.substitutions,defaultFont:r.defaultFont,language:r.language}),a=new TextEncoder,i=cn(o,true),c=a.encode(JSON.stringify(i)),s=cn(o,false),u=a.encode(JSON.stringify(s)),l=Object.freeze({[to]:true,fingerprint:`font-config:${f$1(c)}`});return Te.set(l,{configuration:o,sharedShapingFingerprint:`shared-font-config:${f$1(u)}`}),l}function oo(e){return at(e).fingerprint}function ao(e,t){let n=new TextEncoder().encode(JSON.stringify({version:1,environment:e,executionPolicy:nn(t),ligatureCaretPolicy:ln,fallback:ia$1}));return `shaping:${f$1(n)}`}async function dn(e,t,n,r,o=false){let i=no(e)?e:at(e,t),c=ro(i),{epoch:s,maxFontBytes:u,sources:l,substitutions:d,defaultFont:g}=c,m$1=c.language||"en",S=i.fingerprint,b=m({epoch:s,maxFontBytes:u,resources:l,substitutions:d,validateFont:et,instrumentation:{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash,onAdmission:t?.onFontAdmission}});await Qe();let f=Object.freeze({script:Zr,variationAxes:Object.freeze({}),shapingLibrary:Q,unicodeDataVersion:Vr,normalization:Yr,language:m$1,features:jr,...o?{documentLigatures:true}:{},fixedPointScale:$r,roundingMode:qr});return Object.freeze({fonts:b,shaper:on(n??rt(r),r,n===void 0),defaultFont:g,environment:f,ligatureCaretPolicy:ln,operation:Object.freeze({resourceEpoch:b.epoch,configEpoch:s,extensionFingerprint:S,shapingHash:ao(f,r),producerVersion:1})})}async function io(e,t,n){return dn(e,t,void 0,rn(n))}async function oi(e,t,n,r,o=false){return dn(e,r,t,n,o)}function so(e){e.shaper.dispose?.();}function it(e){let t=new Set([0,e.text.length]);for(let r of oa$1(e.text))t.add(r.utf16From),t.add(r.utf16To);let n=new Set([0,e.text.length]);for(let r of e.clusters)n.add(r.textStart),n.add(r.textEnd);return [...t].filter(r=>n.has(r)).sort((r,o)=>r-o)}function Be(e,t){return it(e).includes(t)}function co(e,t){return Be(e,t)}function lo(e,t,n){return n>=t&&Be(e,t)&&Be(e,n)}function uo(e){let t=oa$1(e.text);return it(e).map(n=>n===e.text.length?t.length:t.findIndex(r=>r.utf16From===n))}var ct="und";function mn(){return typeof Intl.Segmenter=="function"}function po(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${ct})`);return e}function hn(){let e=new(po())(ct,{granularity:"word"});return {segment(t){let n=[];for(let r of e.segment(t)){let o=r.index,a=o+r.segment.length;n.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return n}}}var fo=/^[\p{L}\p{N}']$/u,yo=/^\s$/u;function pn(e){return fo.test(e)}function fn(e){return yo.test(e)}function st(e,t,n,r){let o=e[t],a=e[n-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function gn(e){let t=oa$1(e);if(t.length===0)return [];let n=[],r=0;for(;r<t.length;){let o=t[r];if(fn(o.text)){let a=r+1;for(;a<t.length&&fn(t[a].text);)a+=1;n.push(st(t,r,a,false)),r=a;continue}if(pn(o.text)){let a=r+1;for(;a<t.length&&pn(t[a].text);)a+=1;n.push(st(t,r,a,true)),r=a;continue}n.push(st(t,r,r+1,false)),r+=1;}return n}function Sn(){return {segment:gn}}function xn(e={}){let t=e.isIntlAvailable??mn,n=e.createIntlBoundary??hn,r=e.createFallbackBoundary??Sn;if(!t())return r();try{return n()}catch{return r()}}var yn;function bn(){return yn??=xn(),yn}function mo(e,t=bn()){return t.segment(e)}function ho(e,t){return t.map(n=>({graphemeFrom:sa$1(e,n.utf16From),graphemeTo:sa$1(e,n.utf16To),wordLike:n.wordLike}))}var Rn={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},dt=Object.keys(Rn),Fn=dt.filter(e=>Rn[e]==="coarse-gate"),Ie=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},ee=(e,t)=>{if(e.trim().length===0)throw new TypeError(`${t} must not be blank`)},go={resourceEpoch:Ie,configEpoch:Ie,extensionFingerprint:ee,shapingHash:ee,producerVersion:Ie},So=(e,t)=>{go[t](e[t],t);},te=e=>{for(let t of dt)So(e,t);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},xo=(e,t)=>{let n=te(e),r=te(t),o=dt.filter(a=>n[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},lt=e=>{let t=e.map(({key:n,fingerprint:r})=>(ee(n,"resource dependency key"),ee(r,"resource dependency fingerprint"),Object.freeze({key:n,fingerprint:r}))).sort((n,r)=>n.key<r.key?-1:n.key>r.key?1:0);for(let n=1;n<t.length;n+=1)if(t[n-1].key===t[n].key)throw new TypeError(`Duplicate resource dependency: ${t[n].key}`);return Object.freeze(t)},bo=e=>(Ie(e.revision,"revision"),ee(e.dependencyFingerprint,"dependencyFingerprint"),ee(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:lt(e.resourceDependencies),...te(e)})),Ro=(e,t)=>{let n=lt(e),r=lt(t),o=Math.max(n.length,r.length);for(let a=0;a<o;a+=1){let i=n[a],c=r[a];if(i?.key!==c?.key||i?.fingerprint!==c?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??c.key}}return null};function Fo(e,t){if(e.dependencyFingerprint!==t.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==t.inputFingerprint)return {hit:false,reason:"input-changed"};let n=Ro(e.resourceDependencies,t.resourceDependencies);if(n)return n;for(let r of Fn)if(e[r]!==t[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var ut=class{entries=new Map;get(t,n){let r=this.entries.get(t);if(!r)return {hit:false,reason:"absent"};let o=Fo(r.provenance,n);return o||{hit:true,value:r.value,provenance:r.provenance}}set(t,n,r){this.entries.set(t,{value:n,provenance:bo(r)});}evictEpoch(t){let n=te(t),r=0;for(let[o,a]of this.entries){let i=a.provenance;Fn.some(c=>i[c]!==n[c])&&(this.entries.delete(o),r+=1);}return r}evictResources(t,n){let r=te(t),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(s=>n.get(s.key)!==s.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function Cn(e){return e.projected===true?null:e.range}function vo(e,t,n){let{page:r,story:o,host:a,noteScopeId:i,noteAreaKind:c}=e,s=o==="header"||o==="footer"?u=>ya$1(u,e.origin,{x:r.box.x,y:r.box.y}):void 0;Ha(a,(u,l)=>{let{textboxDepth:d,textboxOwner:g,textboxPath:m,storyOrigin:S}=l,b=d===0?o:"textbox";for(let f of u.lines){let h=[...Na(f)].sort((x,R)=>(t.get(x.paragraphId)??Number.MAX_SAFE_INTEGER)-(t.get(R.paragraphId)??Number.MAX_SAFE_INTEGER));for(let x of h)for(let R of x.spans)n({page:r,story:b,rootStory:o,root:e,storyOrigin:S,absoluteBox:Object.freeze({x:S.x+R.box.x,y:S.y+R.box.y,width:R.box.width,height:R.box.height}),noteScopeId:i,noteAreaKind:c,textboxDepth:d,textboxOwner:g,textboxPath:m,paragraph:u,paragraphId:x.paragraphId,line:f,span:R,sourceRange:Cn(R)});}},e.origin,s);}function Eo(e,t){let n=new Map(Ua(e).map((r,o)=>[r,o]));Ea$1(e,r=>vo(r,n,t));}var Oo=1,vn=4,Y=Object.freeze({top:0,right:0,bottom:0,left:0}),En=new WeakMap;function To(e,t){let n=Bo(e);return n===Y?t:Me(t,n)}function Bo(e){let t=e.vectorShape;if(!t)return Y;let{cx:n,cy:r}=t.extentEmu;if(!(n>=0)||!(r>=0)||n===0&&r===0)return Y;let o=En.get(t);if(o||(o=Io(t),En.set(t,o)),o===Y)return Y;let a=e.paintBounds,i=e.geometry.contentBounds;if(!(a.width>0||i.width<=0)||!(a.height>0||i.height<=0))return Y;let c=n>0?i.width/n:i.height/r,s=r>0?i.height/r:i.width/n,u=(d,g,m)=>{if(m<-1e-3)return 0;let S=d*g-Math.max(0,m);return Number.isFinite(S)&&S>0?S:0},l={left:u(o.left,c,i.x-a.x),top:u(o.top,s,i.y-a.y),right:u(o.right,c,a.x+a.width-(i.x+i.width)),bottom:u(o.bottom,s,a.y+a.height-(i.y+i.height))};return l.left||l.top||l.right||l.bottom?Object.freeze(l):Y}function Io(e){let{cx:t,cy:n}=e.extentEmu,r=0,o=0,a=t,i=n,c=(l,d)=>{r=Math.min(r,l),a=Math.max(a,l),o=Math.min(o,d),i=Math.max(i,d);},s=Oo,u=l=>l.x>=-s&&l.x<=t+s&&l.y>=-s&&l.y<=n+s;for(let l of e.components){if(l.strokeHex===null||l.strokeInset===true)continue;let d=Math.max(1,Le(l.strokeWidthEmu))/2;l.subpathsEmu.forEach((g,m)=>{let S=l.subpathsClosed?.[m]!==false,b=Ao(g,S),f=S&&b.length>2?b.length:b.length-1,h=[];for(let R=0;R<f;R+=1){let F=b[R],v=b[(R+1)%b.length],I=Math.hypot(v.x-F.x,v.y-F.y),T={x:-(v.y-F.y)/I,y:(v.x-F.x)/I};if(h.push(T),!!wo(F,v,-s,t+s,-s,n+s))for(let y=0;y<2;y+=1){let p=V[y],C=F.x+(v.x-F.x)*p,E=F.y+(v.y-F.y)*p;c(C+T.x*d,E+T.y*d),c(C-T.x*d,E-T.y*d);}}if(!S&&h.length&&(l.strokeCap==="round"||l.strokeCap==="square")){for(let[R,F,v]of [[b[0],h[0],-1],[b[b.length-1],h[h.length-1],1]])if(u(R))if(l.strokeCap==="round")c(R.x-d,R.y-d),c(R.x+d,R.y+d);else {let I=R.x+v*F.y*d,T=R.y-v*F.x*d;c(I+F.x*d,T+F.y*d),c(I-F.x*d,T-F.y*d);}}let x=S&&b.length>2?h.length:h.length-1;for(let R=0;R<x;R+=1){let F=b[(R+1)%b.length];if(!u(F))continue;if(l.strokeJoin==="round"){c(F.x-d,F.y-d),c(F.x+d,F.y+d);continue}if(l.strokeJoin==="bevel")continue;let v=h[R],I=h[(R+1)%h.length],T=1+v.x*I.x+v.y*I.y;if(T<2/(vn*vn))continue;let y=v.y*-I.x- -v.x*I.y;if(y===0)continue;let p=y>0?-1:1;c(F.x+p*(v.x+I.x)*d/T,F.y+p*(v.y+I.y)*d/T);}});for(let g of l.arrowheadsEmu??[])if(!(!g[0]||!u(g[0])))for(let m of g)c(m.x,m.y);}return r>=0&&o>=0&&a<=t&&i<=n?Y:Object.freeze({left:-r,top:-o,right:a-t,bottom:i-n})}function Ao(e,t){let n=[];for(let a of e){let i=n[n.length-1];(!i||i.x!==a.x||i.y!==a.y)&&n.push(a);}let r=n[0],o=n[n.length-1];return t&&n.length>1&&r.x===o.x&&r.y===o.y&&n.pop(),n}var V=new Float64Array(2);function wo(e,t,n,r,o,a){let i=t.x-e.x,c=t.y-e.y;return V[0]=0,V[1]=1,Ae(-i,e.x-n)&&Ae(i,r-e.x)&&Ae(-c,e.y-o)&&Ae(c,a-e.y)}function Ae(e,t){if(e===0)return t>=0;let n=t/e;return e<0?V[0]=Math.max(V[0],n):V[1]=Math.min(V[1],n),V[0]<=V[1]}var Po=new Map([["roman","serif"],["swiss","sans"],["modern","mono"]]);function xi(e,t){return t==="fixed"?"mono":e?Po.get(e):void 0}var _o=new Map([["calibri","sans"],["arial","sans"],["helvetica","sans"],["verdana","sans"],["tahoma","sans"],["segoe ui","sans"],["aptos","sans"],["century gothic","sans"],["carlito","sans"],["cambria","serif"],["times new roman","serif"],["georgia","serif"],["garamond","serif"],["book antiqua","serif"],["palatino linotype","serif"],["caladea","serif"],["courier new","mono"],["consolas","mono"]]);function Ln(e){let t=e.trim().toLowerCase(),n=_o.get(t);if(n)return n;let r=t.split(/[\s_-]+/);if(r.includes("mono")||r.includes("monospace")||r.includes("courier"))return "mono";if(r.includes("sans"))return "sans";if(r.includes("serif")||r.includes("roman"))return "serif"}var bi={serif:"Times New Roman",sans:"Arial",mono:"Courier New"};var pt="Calibri, Carlito, Helvetica, Arial, sans-serif",Mo='"Times New Roman", "Liberation Serif", Tinos, serif',ko='"Courier New", "Liberation Mono", Cousine, monospace';function No(e,t=pt){if(!e)return t;let n=Ln(e);return n==="serif"?Mo:n==="mono"?ko:t}var Oi=new Map([["calibri","Carlito"]]),zo=65536,Do=256;function On(e,t){return e===void 0?Math.max(1,Math.floor(t)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function Tn(e){let t=new Map,n=0;return {get(r){let o=t.get(r);if(o!==void 0)return t.delete(r),t.set(r,o),o},set(r,o){for(t.has(r)&&t.delete(r),t.set(r,o);t.size>e;){let a=t.keys().next();if(a.done)break;t.delete(a.value),n+=1;}},get size(){return t.size},get evictions(){return n}}}var Bn=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function In(e=null){return e!=null&&typeof e.measureText=="function"}function An(e={}){let t=e.scale??1;if(!(t>0)||!Number.isFinite(t))return null;let n=e.fallbackFamily??pt,r=e.context??null;if(!In(r))return null;let o=r,a=Tn(On(e.maxWidthEntries,zo)),i=Tn(On(e.maxMetricsEntries,Do)),c=e.fontAlias,s=l=>{let d=l.fontFamily&&Bn.test(l.fontFamily)?l.fontFamily:null,g=d?c?.(d):void 0,m=g&&Bn.test(g)?g:null,S=No(d,n),b=d?m?`"${m}", "${d}", ${S}`:`"${d}", ${S}`:n,f=l.bold?"bold":"normal",h=l.italic?"italic":"normal",x=l.smallCaps?"small-caps":"normal",R=l.fontSizePt*ha$1(l)*t;return `${h} ${x} ${f} ${R}px ${b}`},u=(l,d,g)=>l/t*(g.horizontalScalePercent/100)+d.length*g.characterSpacingPt;return {measure(l,d){if(l.length===0)return 0;let g=s(d),m=`${g}\0${fd(d)}\0${l}`,S=a.get(m);if(S!==void 0)return u(S,l,d);o.font=g,"fontKerning"in o&&(o.fontKerning=fd(d)?"normal":"none");let b=o.measureText(l).width;return a.set(m,b),u(b,l,d)},inkBounds(l,d){if(!l||l.length>2||d.shaping?.direction==="rtl"||oa$1(l).length!==1)return;o.font=s(d),"fontKerning"in o&&(o.fontKerning=fd(d)?"normal":"none");let g=o.textAlign,m=o.direction,S;try{g!==void 0&&(o.textAlign="left"),m!==void 0&&(o.direction="ltr"),S=o.measureText(l);}finally{g!==void 0&&(o.textAlign=g),m!==void 0&&(o.direction=m);}let b=S.actualBoundingBoxLeft,f=S.actualBoundingBoxRight;if(b===void 0||f===void 0||!Number.isFinite(b)||!Number.isFinite(f))return;let h=d.horizontalScalePercent/(100*t);return {left:-b*h,right:f*h}},textOutline(l,d){if(!l||d.shaping?.direction==="rtl")return;o.font=s(d),"fontKerning"in o&&(o.fontKerning=fd(d)?"normal":"none");let g=o.textAlign,m=o.textBaseline,S;try{g!==void 0&&(o.textAlign="left"),m!==void 0&&(o.textBaseline="alphabetic"),S=o.measureText(l);}finally{g!==void 0&&(o.textAlign=g),m!==void 0&&(o.textBaseline=m);}let b=[-(S.actualBoundingBoxLeft??NaN),-(S.actualBoundingBoxAscent??NaN),S.actualBoundingBoxRight??NaN,S.actualBoundingBoxDescent??NaN].map(F=>F/t);if(b.some(F=>!Number.isFinite(F)))return;let[f,h,x,R]=b;if(!(!(x>f)||!(R>h)))return {path:null,ink:{left:f,top:h,right:x,bottom:R}}},lineMetrics(l){let d=l.fontSizePt*ha$1(l),g=s(l),m=i.get(g);if(m)return m;let S=d*1.15,b=d*.8;o.font=g,"fontKerning"in o&&(o.fontKerning=fd(l)?"normal":"none");let f=o.measureText("Hxg"),h=f.fontBoundingBoxAscent,x=f.fontBoundingBoxDescent;if(typeof h=="number"&&Number.isFinite(h)&&h>0&&(b=h/t,typeof x=="number"&&Number.isFinite(x)&&x>=0)){let F=(h+x)/t;F>0&&(S=Math.max(F,S));}S>0||(S=d*1.15);let R={height:S,baseline:b};return i.set(g,R),R}}}function Ho(e=1,t={}){let n=An({...t,scale:t.scale??e});return n?{measurer:n,producer:t.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:ja(),producer:"fixed-measurer"}}function Go(e){let t;return n=>{t===void 0&&(t=ic(e.pages)?.hosts??null);let r=t?.get(n);return r?gc(r.pageNumber,r.format):null}}function wn(e,t){let n=td(e,t.displayMode??$a),r=Bc({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},n).listItems,o=t.package?{footnotesPart:lh(t.package,"footnote"),endnotesPart:lh(t.package,"endnote")}:void 0,a=Xc(n,r,o,t.package?Uc(t.package,e,n):void 0,t.displayMode??$a);return {blocks:n,notes:o,context:a}}function Pn(e,t,n,r,o){for(let a of t){if(r.length>=pl)return;if(n.tokenForParagraph(a.id)!==""&&sl(e,a.id)===null)for(let i of rl(a)){if(r.length>=pl)return;if(!i.rewritable)continue;let c=dc(i.instruction);if(c===null)continue;let s=n.liveValueOf(i.fieldNodeId,c);if(s===null&&o&&n.pageRefProjectionOf){let u=n.pageRefProjectionOf(i.fieldNodeId,c);if(u){let l=o(u.targetParagraphId);l!==null&&l.length>0&&hc(u.calibration,u.cached,l,Number.NaN)&&(s=l);}}s===null||s===i.cachedText||s.length>ql||s.includes("\r")||r.push({paragraphId:a.id,fieldNodeId:i.fieldNodeId,text:s});}}}function Uo(e,t){let{blocks:n,context:r}=wn(e,t);if(r===null)return null;let o=[];return Pn(e,fc(vc(n)),r,o,t.pageRefPageNumberOf),o.length===0?null:{op:"refreshFieldResults",updates:o}}function zi(e,t){let{notes:n,context:r}=wn(e,t);if(r===null||n===void 0)return [];let o=[],a=[{noteKind:"footnote",notesPart:n.footnotesPart},{noteKind:"endnote",notesPart:n.endnotesPart}];for(let{noteKind:i,notesPart:c}of a){if(!c)continue;let s=[];for(let u of Vc(c,t.displayMode??$a)){if(s.length>=pl)break;Pn(c,fc(vc(u)),r,s);}s.length>0&&o.push({noteKind:i,op:{op:"refreshFieldResults",updates:s}});}return o}function Wo(e){return e.box}function _n(e,t){if(e.kind==="paragraph"){t.add(e.paragraphId);return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)_n(o,t);}function Ko(e){let t=new Map,n=(o,a,i)=>{if(!(o.kind==="textValue"||i>Nb*4)){for(let c of o.children)if(c.kind!=="textValue"){if(c.kind==="paragraph"){for(let s of r)t.get(s)?.push(c.id);n(c,c.id,i+1);continue}if(c.kind==="contentControl"){t.set(c.id,[]),r.push(c.id);let s=Xb(c);s&&n(s,a,i+1),r.pop();let u=t.get(c.id);u&&u.length===0&&a!==null&&u.push(a);continue}n(c,a,i+1);}}},r=[];return n(e,null,0),t}function Xo(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return {x:n,y:r,width:Math.max(e.x+e.width,t.x+t.width)-n,height:Math.max(e.y+e.height,t.y+t.height)-r}}function jo(e,t){let n=$b(e.root);if(n.length===0)return Vo;let r=new Map;t.pages.forEach((i,c)=>{(u=>{for(let l of u){let d=new Set;_n(l,d);for(let g of d){let m=r.get(g)??[];m.push({pageIndex:c,box:Wo(l)}),r.set(g,m);}}})(i.fragments);});let o=Ko(e.root),a=[];for(let i of n){let c=Zb(i.node),s=[...i.ancestors.map(g=>Zb(g).lock),c.lock],u=o.get(i.node.id)??[],l=new Map;for(let g of u)for(let m of r.get(g)??[]){let S=l.get(m.pageIndex);l.set(m.pageIndex,S?Xo(S,m.box):m.box);}let d=[...l.entries()].sort((g,m)=>g[0]-m[0]).map(([g,m])=>({pageIndex:g,...m}));a.push({controlId:i.node.id,type:c.type,level:_b(i.node),depth:i.depth,lock:c.lock,effectiveLock:cc(s),showingPlaceholder:c.showingPlaceholder,temporary:c.temporary,...c.tag===void 0?{}:{tag:c.tag},...c.alias===void 0?{}:{alias:c.alias},...c.id===void 0?{}:{id:c.id},...c.dataBinding===void 0?{}:{dataBinding:c.dataBinding},paragraphIds:u,fragments:d});}return a}var Vo=Object.freeze([]);function Nn(e,t,n){for(let r of e.lines??[]){let o=r.spans;if(!o){if(n<r.range.end)return r.box.y;continue}let a=0,i=0;for(let c of o)c.range.paragraphId===t&&(a+=1,i=c.range.end);if(a===o.length?n<r.range.end:a>0&&n<i)return r.box.y}return e.fragmentY}function oa(e,t){let n=new Map;for(let r of e.pages)for(let[o,a]of aa(r,t))n.has(o)||n.set(o,a);return n}var Mn=new WeakMap;function aa(e,t){let n=Mn.get(t);n||(n=new WeakMap,Mn.set(t,n));let r=n.get(e);if(r)return r;let o=new Map;for(let a of t(e)){let i=new Set([a.paragraphId]);for(let c of a.lines??[])for(let s of c.spans??[])i.add(s.range.paragraphId);for(let c of i)o.has(c)||o.set(c,{pageIndex:e.index,contentY:e.contentBox.y,fragmentY:a.box.y,...a.lines?{lines:a.lines}:{}});}return n.set(e,o),o}function ia(e,t){let n=Sj(e);if(!n)return null;let r=t.get(n.start.paragraphId);if(!r)return null;let o=kn.get(e);if(o?.anchor===r)return o.geometry;let a={pageIndex:r.pageIndex,y:r.contentY+Nn(r,n.start.paragraphId,n.start.offset)};return kn.set(e,{anchor:r,geometry:a}),a}var kn=new WeakMap;var zn=new WeakMap;function sa(e){let t=zn.get(e);if(t!==void 0)return t;let n=i(e),r=new DataView(n.buffer,n.byteOffset,n.byteLength),o=false,a=r.getUint32(0)===1953784678?r.getUint32(12+e.faceIndex*4):0,i$1=r.getUint16(a+4);for(let c=0;c<i$1;c++){let s=a+12+c*16;if(r.getUint32(s)!==1330851634)continue;let u=r.getUint32(s+8),l=r.getUint32(s+12);l>=86&&u<=n.byteLength-l&&r.getUint16(u)>=1&&(o=(r.getUint32(u+78)&1966080)!==0);break}return zn.set(e,o),o}function Dn(e,t,n,r,o){let a=n.height-r;if(Math.abs(a-t)>o||!sa(e))return n;let i=Math.max(n.height,t*1.3),c=n.baseline-r;return {height:i,baseline:c+(i-a)/2}}var ca="abcdefghijklmnopqrstuvwxyz";function D(e){let t=Math.round(e.fontSizePt*2);return Math.max(1,t)}function U(e,t,n,r,o){let a=r.shaping?.context;return e.shape({text:o,fontSizeHalfPoints:D(r),bidiLevel:r.shaping?.direction==="rtl"?1:0,environment:la(t,n,r),...a?{context:a}:{}})}var Hn=new WeakMap;function la(e,t,n){if(!Object.isFrozen(e)||!Object.isFrozen(e.features)||!Object.isFrozen(e.variationAxes)||!Object.isFrozen(e.shapingLibrary))return Gn(e,t,n);let r=n.shaping?.direction??"ltr",o=n.shaping?.script,a=`${r}|${o??""}|${fd(n)?1:0}|${e.documentLigatures?F(n):""}|${n.smallCaps?1:0}`,i=Hn.get(e);i||Hn.set(e,i=new WeakMap);let c=i.get(t);c||i.set(t,c=new Map);let s=c.get(a);return s||c.set(a,s=Gn(e,t,n)),s}function Gn(e,t,n){return r({...e,font:t,direction:n.shaping?.direction??"ltr",script:n.shaping?.script==="Zyyy"?e.script:n.shaping?.script??e.script,features:{...e.features,kern:fd(n)?1:0,...e.documentLigatures?E(n):{},...n.smallCaps?{smcp:1}:{}},fallbackOrder:[]})}function we(e,t,n,r,o){let a=o.get(n);if(a!==void 0)return a;let i=true;try{for(let c of ca){let s=U(e,t,n,{...r,smallCaps:!0},c),u=U(e,t,n,{...r,smallCaps:!1},c);if(!(s.glyphs.length!==u.glyphs.length||s.glyphs.some((d,g)=>d.id!==u.glyphs[g]?.id))){i=!1;break}}}catch{i=false;}return o.set(n,i),i}function Un(e,t,n,r,o){let a=new WeakMap;return (i,c)=>{let s=ha$1(c),u=a.get(i);u||(u=new Map,a.set(i,u));let l=D(c),d=u.get(l);if(d)return s===1?d:{height:d.height*s,baseline:d.baseline*s};let g,m=true,S=i.substitution?.lineMetrics;if(S){let b=l/2;g={height:S.heightEm*b,baseline:S.baselineEm*b};}else try{let b=U(e,t,i,c,""),f=b.metrics.ascent/t.fixedPointScale,h=b.metrics.descent/t.fixedPointScale,x=l/2,R=f+h,F=x*r,v=R>F?F/R:1,I=R*v,T=Math.min(Math.max(0,b.metrics.lineGap/t.fixedPointScale),I*o),y=I+T;y>0?g=Dn(i,x,{height:y,baseline:f*v+T},T,2/t.fixedPointScale):(g=n.lineMetrics(c),m=!1);}catch{g=n.lineMetrics(c),m=false;}return m?(u.set(l,g),s===1?g:{height:g.height*s,baseline:g.baseline*s}):g}}var ft=2048,ua=32,da=new Map([["symbol",{ascent:2059,descent:450,advances:[512,682,1460,1024,1124,1706,1593,899,682,682,1024,1124,512,1124,512,569,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,569,569,1124,1124,1124,909,1124,1479,1366,1479,1253,1251,1563,1235,1479,682,1292,1479,1405,1821,1479,1479,1573,1518,1139,1212,1251,1413,899,1573,1321,1628,1251,682,1767,682,1348,1024,1024,1292,1124,1124,1012,899,1067,842,1235,674,1235,1124,1124,1180,1067,1124,1124,1067,1124,1235,899,1180,1460,1405,1010,1405,1012,983,410,983,1124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1270,506,1124,342,1460,1024,1542,1542,1542,1542,2134,2021,1235,2021,1235,819,1124,842,1124,1124,1460,1012,942,1124,1124,1124,1124,2048,1235,2048,1348,1686,1405,1628,2021,1573,1573,1686,1573,1573,1460,1460,1460,1460,1460,1460,1460,1573,1460,1618,1618,1823,1686,1124,512,1460,1235,1235,2134,2021,1235,2021,1235,1012,674,1618,1618,1610,1460,786,786,786,786,786,786,1012,1012,1012,1012,0,674,561,1405,1405,1405,786,786,786,786,786,786,1012,1012,1012,0]}],["wingdings",{ascent:1841,descent:432,advances:[2048,2110,2344,2665,2752,1830,2492,938,2220,1826,2319,2319,2399,2399,2951,2956,2245,2751,1431,1431,1826,1135,1233,2196,1941,2208,1924,1825,1826,1826,1825,1863,1863,1203,1624,1381,1381,1929,1929,1124,1124,1826,1727,1727,1727,2275,1352,1739,2230,1819,1803,1332,1665,1529,1529,1480,1420,1627,1813,1826,1834,1825,2368,2159,1974,2233,1927,1911,1937,2099,1902,2245,2181,1597,2150,2603,1529,1951,1529,1825,1825,1825,1825,937,1529,2020,1825,1183,2171,2171,1825,1826,1826,1086,1086,0,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,2048,2048,2048,2048,2048,2048,2048,2048,641,937,641,1825,1825,1825,1825,1825,1951,937,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2146,2146,2146,2146,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2566,2566,1627,1627,1825,1825,1825,1825,1825,1825,2006,2006,1825,1825,1589,1589,1589,1589,2186,2186,1825,1825,1787,1787,1787,1787,1825,1825,1660,1660,2171,1660,1601,1601,1601,1601,987,789,1301,1609,1826,1826,2119]}],["wingdings 2",{ascent:1727,descent:432,advances:[2048,2110,2090,2073,2086,2344,2045,2220,989,1431,1431,1826,1431,1431,1826,1431,1431,1826,1431,1431,2320,2246,1826,1826,1826,2320,2170,2170,1381,1381,1938,1938,1938,1938,1928,1928,1928,1928,1047,1047,1047,1047,1178,1178,1178,1178,1826,1321,1568,1826,1826,1826,1826,1825,1825,1826,1826,2226,1727,1548,1579,984,1035,864,1018,2048,2048,2048,2048,2048,2048,2048,2048,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,0,1899,1899,1453,1453,1673,1332,1431,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2048,2048,542,740,1135,1825,1825,1825,1825,1825,1825,1825,542,740,1135,1825,1825,1825,1825,1825,1825,1825,1825,1825,624,764,903,1461,2020,2020,2020,2020,2020,542,641,740,1135,1529,1529,1085,1085,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1496,1825,0,0,0,0,0,0]}],["wingdings 3",{ascent:1900,descent:432,advances:[2048,1825,1825,1135,1135,1444,1444,1444,1444,1825,1825,1135,1135,1677,1677,1135,1135,1135,1135,1135,1135,1135,1135,1135,1135,1135,1825,1825,1455,1455,1455,1455,2010,2010,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2220,1825,1751,1114,1115,1660,1660,1930,1930,1930,1930,1924,1924,1924,1924,1930,1930,1931,1931,1825,1825,1232,1232,1444,1444,1444,1444,1825,1232,2005,2005,2005,2005,1801,1801,1801,1801,1801,1801,1801,1801,1085,1085,1825,0,1825,1825,1825,1825,1825,1627,1627,1825,1825,1825,1825,789,789,1825,1825,987,987,1825,1825,1184,1184,1825,1825,1579,1579,1825,1825,888,888,1825,1825,1381,1381,1825,1825,1875,1875,1825,1825,1825,1825,1825,1825,1825,789,592,493,394,1825,1825,1825,1825,1825,1085,1085,1381,1381,1628,1628,1184,1184,900,900,1825,1825,1019,1019,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1291,1291,1291,1291,1961,1961,1825,1825,1540,1540,1540,1540,2096,2096,1825,1825,1688,1688,1688,1688,2277,2277,1825,1825,1885,1885,1885,1885,543,543,1234,1234,766,766,1234,1234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}],["webdings",{ascent:1638,descent:410,advances:[1024,2048,2048,2048,2048,2028,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1100,1100,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1144,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,0,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2500,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1377,1377,2048,1726,1058,2048,2048,2048,2048,877,1240,2048,2048,2048,2048,1357,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2645,2048,2048,2048,2048]}]]);function pa(e){if(b$1(e))return da.get(e.toLowerCase())}function Wn(e,t,n,r){let o=D(r)/2*ha$1(r)*(r.horizontalScalePercent/100)/ft,a=[];for(let i=0;i<n.length;i++){let c=c$2(n.charCodeAt(i),t),s=c===null?0:e.advances[c-ua]??0;if(s===0)return;a.push(s*o+r.characterSpacingPt);}return a}function Kn(e){let t=new WeakMap,n=r=>{let o=t.get(r);return o===void 0&&(o=pa(r.fontFamily)??null,t.set(r,o)),o};return {...e,measure(r,o){let a=n(o),i=a&&Wn(a,o.fontFamily,r,o);if(!i)return e.measure(r,o);let c=0;for(let s of i)c+=s;return c},caretAdvances(r,o){let a=n(o),i=a&&Wn(a,o.fontFamily,r,o);if(!i)return e.caretAdvances?.(r,o);let c=[0];for(let s of i)c.push(c[c.length-1]+s);return c},lineMetrics(r,o){let a=n(r);if(!a)return e.lineMetrics(r,o);let i=D(r)/2*ha$1(r);return {height:(a.ascent+a.descent)*i/ft,baseline:a.ascent*i/ft}}}}var fa={M:2,L:2,Q:4,C:6,Z:0},Xn=e=>{let t=Math.round(e*1e3)/1e3;return String(Object.is(t,-0)?0:t)};function jn(e,t,n){if(!(t>0)||!(n>0))return;let r=[],o=0,a=1/0,i=-1/0,c=1/0,s=-1/0;for(let u of e.glyphs){if(u.id===0)return;let l=u.outline.path,d=u.outline.unitsPerEm;if(!l)continue;if(!(d>0)||!l.startsWith("M")||/[^MLQCZ0-9eE+.,\s-]/u.test(l))return;let g=t*(u.drawScale??1)/d,m=(u.originX+u.offsetX)/n,S=(u.originY+u.offsetY)/n;for(let b of l.matchAll(/([MLQCZ])([^MLQCZ]*)/gu)){let f=b[1],h=b[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(h.length!==fa[f]||h.some(R=>!Number.isFinite(R)))return;let x=f;for(let R=0;R<h.length;R+=2){let F=m+h[R]*g,v=-(S+h[R+1]*g);a=Math.min(a,F),i=Math.max(i,F),c=Math.min(c,v),s=Math.max(s,v),x+=`${R?" ":""}${Xn(F)} ${Xn(v)}`;}if(o+=x.length,o>2e6)return;r.push(x);}}if(!(!r.length||!(i>a)||!(s>c)))return Object.freeze({path:r.join(""),ink:Object.freeze({left:a,top:c,right:i,bottom:s})})}var yt=new WeakMap;function ya(e){let t=yt.get(e);if(t!==void 0)return t??void 0;let n=e.path;if(!n.startsWith("M")||n.length>1e6||/[^MLQCZ0-9eE+.,\s-]/u.test(n))return;let r=1/0,o=-1/0,a=n.matchAll(/([MLQCZ])([^MLQCZ]*)/gu);for(let c of a){let s=c[1]==="Z"?0:c[1]==="C"?6:c[1]==="Q"?4:2,u=c[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(u.length!==s||u.some(l=>!Number.isFinite(l))){yt.set(e,null);return}for(let l=0;l<u.length;l+=2)r=Math.min(r,u[l]),o=Math.max(o,u[l]);}let i=Number.isFinite(r)&&Number.isFinite(o)?{left:r,right:o}:void 0;return yt.set(e,i??null),i}function Vn(e,t,n,r){if(e.clusters.length!==1||e.glyphs.length===0)return;let o=1/0,a=-1/0;for(let c of e.glyphs){if(c.id===0)return;let s=ya(c.outline),u=c.outline.unitsPerEm;if(!s||!(u>0))return;let l=(c.originX+c.offsetX)/n;o=Math.min(o,l+s.left*t*(c.drawScale??1)/u),a=Math.max(a,l+s.right*t*(c.drawScale??1)/u);}let i={left:o*r,right:a*r};return Number.isFinite(i.left)&&Number.isFinite(i.right)?i:void 0}function ma(e,t,n){if(t<12)return null;if(e.getUint32(0)!==1953784678)return 0;let o=12+(Number.isSafeInteger(n)&&n>0?n:0)*4;if(o+4>t)return null;let a=e.getUint32(o);return a+12<=t?a:null}function Yn(e,t,n,r,o){let a=e.getUint16(n+4);if(a>4096||n+12+a*16>t)return null;for(let i=0;i<a;i+=1){let c=n+12+i*16;if(e.getUint32(c)!==r)continue;let s=e.getUint32(c+8),u=e.getUint32(c+12);return u<o||s+u>t?null:s}return null}function $n(e,t){let n=e.byteLength,r=new DataView(e.buffer,e.byteOffset,n),o=ma(r,n,t);if(o===null)return null;let a=Yn(r,n,o,1751474532,54);if(a===null)return null;let i=r.getUint16(a+18);if(i<=0)return null;let c=Yn(r,n,o,1330851634,30);if(c===null)return null;let s=r.getInt16(c+26)/i,u=r.getInt16(c+28)/i;return !(s>0)||s>1||!(Math.abs(u)<=1)?null:{offsetEm:u,thicknessEm:s}}var ha=.5,ga=4,qn=4096;function Zn(e){let t="environment"in e?e.environment:void 0,n="environment"in e?void 0:e,{shaper:r,resolveFont:o}=e,a=Kn(e.fallback),i=t??{shapingLibrary:n.shapingLibrary,unicodeDataVersion:n.unicodeDataVersion,script:n?.script??"Latn",fixedPointScale:n?.fixedPointScale??1e3,normalization:n?.normalization??"none",features:n?.features??{},roundingMode:n?.roundingMode??"halfToEven",language:n?.language??"en",variationAxes:{}},c=new WeakMap,s=new WeakMap,u=q$1(r),l=Un(r,i,a,ga,ha),d=new WeakMap,g=new WeakMap,m=new Array(qn),S=0,b=(y,p,C)=>{let E=m[S];E&&E.cache.delete(E.text),y.set(p,C),m[S]={cache:y,text:p},S=(S+1)%qn;},f=y=>{let p=d.get(y);if(p!==void 0)return p;let C=o(y);return d.set(y,C),C},h=(y,p,C)=>{let E=C?s:c,L=E.get(y);L||(L=new Map,E.set(y,L));let B=L.get(p);return B||(B=new Map,L.set(p,B)),B},x=new WeakMap,R=y=>{if(!y.shaping?.wordSpacingPt)return y;let p=x.get(y);return p||(p={...y,shaping:{...y.shaping,wordSpacingPt:void 0}},x.set(y,p)),p},F$1=(y,p)=>p.shaping?.wordSpacingPt?Ed(y)*p.shaping.wordSpacingPt:0,v=(y,p)=>a.measure(y,R(p))+F$1(y,p),I=(y,p)=>{let C=Math.max(0,a.measure(y,R(p))),E=a.caretAdvances?.(y,R(p))??Cd(y,C);if(!E||E.length!==y.length+1)return Cd(y,v(y,p));let L=Math.max(0,v(y,p)),B=0,M=0;return E.map((w,A)=>{if(A===0)return 0;y[A-1]===" "&&M++;let k=w+M*(p.shaping?.wordSpacingPt??0);return B=Math.max(B,Math.min(L,Number.isFinite(k)?k:B)),A===y.length?L:B})},T=new WeakMap;return {hasResolvedFont(y){return f(y)!==null},strikeoutMetrics(y){let p=f(y);if(!p)return;let C=T.get(p);if(C===void 0&&(C=$n(p.bytes,p.faceIndex),T.set(p,C)),!C)return;let E=D(y)/2*ha$1(y);return {offsetPt:C.offsetEm*E,thicknessPt:C.thicknessEm*E}},measure(y,p){if(y.length===0)return 0;let C=f(p);if(!C)return v(y,p);let E=h(C,D(p),p.smallCaps),L=p.shaping?.context,B=p.shaping?`1:${JSON.stringify(L?[p.shaping.script,p.shaping.direction,y,L.before,L.after]:[p.shaping.script,p.shaping.direction,y])}`:`0:${y}`,M=`${fd(p)?1:0}:${F(p)}:${B}`,w=E.get(M);if(w===void 0){let A=0;try{if(p.smallCaps&&!we(r,i,C,p,g))return v(y,p);let k=U(r,i,C,p,y);if(k.glyphs.some(W=>W.id===0))return v(y,p);for(let W of k.glyphs)A+=W.advanceX;}catch{return v(y,p)}w=A/i.fixedPointScale,b(E,M,w);}return w*ha$1(p)*(p.horizontalScalePercent/100)+y.length*p.characterSpacingPt+F$1(y,p)},inkBounds(y,p){if(!y||y.length>2||p.shaping?.direction==="rtl"||oa$1(y).length!==1)return;let C=f(p);if(!C)return a.inkBounds?.(y,p);try{if(p.smallCaps&&!we(r,i,C,p,g))return a.inkBounds?.(y,p);let E=U(r,i,C,p,y);return Vn(E,D(p)/2,i.fixedPointScale,ha$1(p)*p.horizontalScalePercent/100)}catch{return}},textOutline(y,p){let C=f(p);if(!C)return a.textOutline?.(y,p);try{let E=U(r,i,C,p,y);return jn(E,D(p)/2,i.fixedPointScale)??a.textOutline?.(y,p)}catch{return a.textOutline?.(y,p)}},caretAdvances(y,p){let C=f(p);if(!C)return I(y,p);try{if(p.smallCaps&&!we(r,i,C,p,g))return I(y,p);let E=U(r,i,C,p,y);return E.glyphs.some(L=>L.id===0)?I(y,p):Dd(y,E,ha$1(p)*(p.horizontalScalePercent/100)/i.fixedPointScale,p.characterSpacingPt,p.shaping?.wordSpacingPt??0)??Cd(y,E.glyphs.reduce((L,B)=>L+B.advanceX,0)*ha$1(p)*(p.horizontalScalePercent/100)/i.fixedPointScale+y.length*p.characterSpacingPt+F$1(y,p))}catch{return I(y,p)}},lineMetrics(y,p){let C=f(y);if(!C)return a.lineMetrics(y,p);if(!p||/^[\t\n\r\f ]*$/.test(p))return l(C,y);if(u){let E=l(C,y),L=Math.max(0,E.baseline),B=Math.max(0,E.height-E.baseline);return L+B>0?{height:L+B,baseline:L}:E}try{let E=U(r,i,C,y,p),L=0,B=0;for(let M of E.fontSpans){let w=l(M.font,y);L=Math.max(L,w.baseline),B=Math.max(B,w.height-w.baseline);}if(L+B>0)return {height:L+B,baseline:L}}catch{}return l(C,y)}}}function Sa(e,t){return Zn({...t,shaper:e.shaper,environment:e.environment})}function xa(e){let{layout:t,viewport:n}=e,r=new Set;if(!n){for(let s of t.pages)r.add(s.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=n.top+n.height,i=-1,c=-1;for(let s of t.pages){let u=s.box.y;u+s.box.height>=n.top&&u<=a&&(i===-1&&(i=s.index),c=s.index);}if(i===-1){let s=ba(t,n.top);s!==null&&(i=s,c=s);}if(i!==-1){let s=Math.max(0,i-o),u=Math.min(t.pages.length-1,c+o);for(let l=s;l<=u;l+=1)r.add(l);}for(let s of e.pinnedPages??[])s>=0&&s<t.pages.length&&r.add(s);return r}function ba(e,t){let n=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=t<o.box.y?o.box.y-t:t>o.box.y+o.box.height?t-(o.box.y+o.box.height):0;a<r&&(r=a,n=o.index);}return n}var Jn=["text-local","paragraph-local","flow-structural","global"];function Qn(e,t){return Jn.indexOf(t)>Jn.indexOf(e)?t:e}function Ra(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function Fa(e){let{run:t,currentRevision:n,publish:r,schedule:o}=e,a=null,i=null,c=null,s=0,u=0;function l(f){let h=e.runCooperatively;if(!h)return t(f);let x=h(f);c=x;try{for(;;){let R=x.step();if(R)return R;if(n()!==f.revision)return x.cancel(),u+=1,null;if(c!==x)return null}}finally{c===x&&(c=null);}}function d(f){let h=m(n());h.impact=Qn(h.impact,f.impact),h.structural=h.structural||f.structural;for(let x of f.paragraphIds)h.paragraphIds.add(x);for(let x of f.created)h.created.add(x);for(let x of f.deleted)h.deleted.add(x);for(let x of f.dependencyKeys)h.dependencyKeys.add(x);}let g=f=>({impact:f.impact,paragraphIds:f.paragraphIds,created:f.created,deleted:f.deleted,dependencyKeys:f.dependencyKeys,structural:f.structural,revision:f.revision});function m(f){return a||(a=Ra(f)),a.revision=Math.max(a.revision,f),a}function S(){!o||i||(i=o(()=>{i=null,b();}));}function b(){i&&(i(),i=null),c&&(c.cancel(),c=null,u+=1);let f=a;if(!f)return false;a=null;let h=g(f),x=l(h);return !x||x.revision!==n()?(s+=1,d(h),S(),false):(r(x,h),true)}return {notify(f){let h=m(n());h.impact=Qn(h.impact,f.impact);for(let x of f.dirty)h.paragraphIds.add(x);for(let x of f.created)h.created.add(x),h.paragraphIds.add(x);for(let x of f.deleted)h.deleted.add(x),h.paragraphIds.add(x);for(let x of f.dependencyKeys)h.dependencyKeys.add(x);for(let x of f.splitJoin)h.structural=true,"split"in x?(h.paragraphIds.add(x.split.from),h.paragraphIds.add(x.split.tail)):(h.paragraphIds.add(x.join.kept),h.paragraphIds.add(x.join.removed));(f.impact==="flow-structural"||f.impact==="global")&&(h.structural=true),S();},invalidateAll(f,h){let x=m(f);x.impact="flow-structural",x.structural=true,h&&x.dependencyKeys.add(h),S();},flush:b,pending:()=>a?g(a):null,cancel(){i?.(),i=null,c?.cancel(),c=null,a=null;},get staleDiscards(){return s},get cancelledRuns(){return u}}}var er=new WeakMap;function q(e){let t=er.get(e);if(t)return t;let n=new Map,r=new Map,o=new Map,a=new Map,i=(s,u,l,d)=>{for(let g of s){if(g.kind==="paragraph")continue;let m=g.tableId;a.set(m,Math.max(a.get(m)??0,(g.columnEdges?.length??1)-1));let S=o.get(m);S||(S=new Map,o.set(m,S),n.set(m,[]),r.set(m,new Map));for(let b of g.rows){let f=S.get(b.id);f===void 0&&(f=S.size,S.set(b.id,f),r.get(m).set(f,b.cells));for(let h of b.cells)n.get(m).push({pageIndex:u,tableId:m,row:b,cell:h,rowIndex:f,isHeaderRepeat:b.isHeaderRepeat,offsetX:l,offsetY:d}),i(h.blocks,u,l,d);}}};for(let s of e.pages){i(s.fragments,s.index,0,0);for(let u of [s.header,s.footer])u&&i(u.fragments,s.index,u.box.x-s.contentBox.x,u.box.y-s.contentBox.y);for(let u of [s.footnotes,s.endnotes])if(u)for(let l of u.notes)i(l.fragments,s.index,l.box.x-s.contentBox.x,l.box.y-s.contentBox.y);}let c=new Map;for(let[s,u]of n)c.set(s,{placed:u,rows:r.get(s)??new Map,columnCount:a.get(s)??0});return er.set(e,c),c}function Ca(e){let t=e.columnCount;for(let n of e.rows.values())for(let r of n)t=Math.max(t,$(r).to+1);return t}var $=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function va(e,t,n){if(t.tableId!==n.tableId)return null;let r=q(e).get(t.tableId);if(!r)return null;let o=Math.min(t.rowIndex,n.rowIndex),a=Math.max(t.rowIndex,n.rowIndex),i=Math.min($(t).from,$(n).from),c=Math.max($(t).to,$(n).to),s=m=>{let{from:S,to:b}=$(m);return b>=i&&S<=c},u=m=>(r.rows.get(m)??[]).some(S=>S.vMergeContinue&&s(S)),l=r.rows.size+Ca(r)+2;for(let m=0;!(m>l);m+=1){let S=false;for(let[b,f]of r.rows)if(!(b<o||b>a))for(let h of f){if(!s(h))continue;let{from:x,to:R}=$(h);x<i&&(i=x,S=true),R>c&&(c=R,S=true);}for(;o>0&&u(o);)o-=1,S=true;for(;u(a+1);)a+=1,S=true;if(!S)break}let d=[],g=new Set;for(let m of r.placed){if(m.isHeaderRepeat||m.rowIndex<o||m.rowIndex>a)continue;let{from:S,to:b}=$(m.cell);b<i||S>c||g.has(m.cell.id)||(g.add(m.cell.id),d.push(m.cell.id));}return d.length===0?null:{kind:"cells",tableId:t.tableId,cellIds:d,rows:{from:o,to:a},columns:{from:i,to:c},text:Ea(e,t.tableId,d)}}function Is(e,t){return nr(e,t,true)}function Pe(e,t){return nr(e,t,false)}function nr(e,t,n){let r=new Set(t),o=[],a=new Set;for(let i of q(e).values())for(let c of i.placed)if(!(c.isHeaderRepeat||!r.has(c.cell.id)))for(let s of c.cell.blocks)n&&s.kind!=="paragraph"||le(s,o,a);return o}function le(e,t,n){if(e.kind==="paragraph"){for(let r of Ra$1(e))n.has(r)||(n.add(r),t.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)le(a,t,n);}function Ea(e,t,n){let r=Pe(e,n),o=r[0],a=r[r.length-1];return !o||!a?La(e,t):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:se$1(e,a).length}}}function La(e,t){let n=q(e).get(t);for(let o of n?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let c of o.cell.blocks)le(c,a,new Set);let i=a[0];if(i){let c={paragraphId:i,offset:0};return {anchor:c,head:c}}}for(let o of e.pages)for(let a of za(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function Oa(e){let t=[...za(e)];for(let n of [e.header,e.footer])n&&t.push(...Aa$1(n.fragments));for(let n of [e.footnotes,e.endnotes])if(n)for(let r of n.notes)t.push(...Aa$1(r.fragments));return t}function Ta(e,t){let n=new Set(Pe(e,t)),r=[],o=new Set;for(let a of e.pages)for(let i of Oa(a))if(n.has(i.paragraphId))for(let c of i.lines)for(let s of c.spans){let u=`${s.range.paragraphId}:${s.range.start}:${s.range.end}`;o.has(u)||(o.add(u),r.push(s));}return r}function Ba(e,t){let n=new Set(t),r=[];for(let o of q(e).values())for(let a of o.placed)n.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x+a.offsetX,y:a.cell.box.y+a.offsetY,width:a.cell.box.width,height:a.cell.box.height});return r}function Ia(e,t,n=se$1){let r=q(e).get(t.tableId);if(!r)return "";let o=new Set(t.cellIds),a=r.placed.some(s=>s.cell.logicalGridColumn!==void 0),i=new Map,c=new Set;for(let s of r.placed){if(s.isHeaderRepeat||!o.has(s.cell.id)||c.has(s.cell.id))continue;c.add(s.cell.id);let u=Pe(e,[s.cell.id]).map(g=>n(e,g)).join(`
|
|
2
|
+
`),l=i.get(s.rowIndex),d=s.cell.gridColumn+(a?Math.max(1,s.cell.gridSpan)-1:0);l?l.set(d,u):i.set(s.rowIndex,new Map([[d,u]]));}return [...i.keys()].sort((s,u)=>s-u).map(s=>{let u=i.get(s),l=[];for(let d=0;d<=t.columns.to-t.columns.from;d+=1){let g=a?t.columns.to-d:t.columns.from+d;l.push(u.get(g)??"");}return l.join(" ")}).join(`
|
|
3
|
+
`)}function mt(e,t){return He(e,t)}function As(e,t,n){if(n){let a=mt(e,t);if(!a||a.tableId!==n.tableId)return null;let i=n.cellIds[0];if(!i)return null;let c=q(e).get(n.tableId);if(!c)return null;for(let s of c.placed)if(s.cell.id===i)return {tableId:n.tableId,rowId:s.row.id,cellId:i,cellIds:n.cellIds,gridColumnIndex:s.cell.logicalGridColumn??s.cell.gridColumn,isHeaderRepeat:s.isHeaderRepeat};return null}let r=mt(e,t);if(!r)return null;let o=q(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let c of a.cell.blocks)le(c,i,new Set);if(i.includes(t))return {tableId:r.tableId,rowId:a.row.id,cellId:a.cell.id,cellIds:[a.cell.id],gridColumnIndex:a.cell.logicalGridColumn??a.cell.gridColumn,isHeaderRepeat:a.row.isHeaderRepeat}}return null}var tr=new WeakMap;function ws(e,t){let n=tr.get(e);if(n)return n.get(t)??null;let r=new Map;for(let[o,a]of q(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let c=[];for(let u of i.cell.blocks)le(u,c,new Set);let s={tableId:o,rowId:i.row.id,cellId:i.cell.id,rowIndex:i.rowIndex,gridColumn:i.cell.gridColumn,gridSpan:i.cell.gridSpan};for(let u of c){let l=r.get(u);l&&l.tableId.length>=o.length||r.set(u,s);}}return tr.set(e,r),r.get(t)??null}function Aa(e,t,n){if(![e,t,n].every(Number.isFinite)||t<=0||n<=0)return {offsetPt:0,count:0};let r=Math.ceil(e/n-1e-9)*n;if(!Number.isFinite(r))return {offsetPt:0,count:0};let o=Math.max(0,r-e);return {offsetPt:o,count:Math.min(8192,Math.max(0,Math.floor((t-o)/n+1e-9)))}}export{Nn as $,mn as A,hn as B,gn as C,Sn as D,xn as E,bn as F,mo as G,ho as H,te as I,xo as J,ut as K,Cn as L,Eo as M,To as N,xi as O,Ln as P,bi as Q,pt as R,No as S,Oi as T,In as U,An as V,Ho as W,Go as X,Uo as Y,zi as Z,jo as _,Ze as a,oa as aa,Q as b,ia as ba,Qe as c,U as ca,ir as d,we as da,O as e,Zn as ea,et as f,Sa as fa,rt as g,xa as ga,Ka as h,Fa as ha,nn as i,va as ia,rn as j,Is as ja,j as k,Pe as ka,no as l,Ta as la,ro as m,Ba as ma,ni as n,Ia as na,at as o,mt as oa,ri as p,As as pa,oo as q,ws as qa,io as r,Aa as ra,oi as s,so as t,it as u,Be as v,co as w,lo as x,uo as y,ct as z};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import {d,f,c}from'./chunk-2E2RPEKX.js';import {d as d$1}from'./chunk-ZCJS7D7S.js';import {a as a$1}from'./chunk-VWIJKH4A.js';import {T,ua,ja,na,ma,ea,da,ca,aa,ba,ka,Aa,sa,Ba}from'./chunk-Q5K2GGNG.js';import {b,a}from'./chunk-N6B3BXCL.js';import {ub,tb,g,nd,Oc,Ta,Ee,Eb,El,lf,lh,Na,Eg,Dg,bd,rk,zj,Pg,rg,Qg,ri,jf,hj,Sc,la,mb,qf,J,hf,gf,rb,mh,jj,lb,Ed,ui,vi,Vg,bi,wa,ya,va,xa,sh,Uc,Wc,He,Ua,Mj,Tj,Ck,wb,vb,Rc,wi,mg,yf,$c,ob,Ld,qd,fb,Qc,ef,Kc,yc,Ac,oc}from'./chunk-T2QQHG5C.js';import {Schema}from'prosemirror-model';import {EditorState,TextSelection}from'prosemirror-state';import {EditorView}from'prosemirror-view';import {keymap}from'prosemirror-keymap';import {joinBackward,deleteSelection,joinForward,splitBlock,selectTextblockEnd,selectTextblockStart,baseKeymap}from'prosemirror-commands';function Y(t){return t.attributes?.val}function W(t){let e=Y(t);return e===void 0||!(e==="0"||e==="false"||e==="off")}var Bo=/^[0-9A-Fa-f]{6}$/,Lo=/^\d{1,6}$/;function Je(t){return t===void 0||t==="auto"?null:Bo.test(t)?`#${t}`:null}var _o={single:"solid",words:"solid",thick:"solid",double:"double",dotted:"dotted",dottedHeavy:"dotted",dash:"dashed",dashedHeavy:"dashed",dashLong:"dashed",dashLongHeavy:"dashed",dotDash:"dashed",dashDotHeavy:"dashed",dotDotDash:"dashed",dashDotDotHeavy:"dashed",wave:"wavy",wavyHeavy:"wavy",wavyDouble:"wavy"},jo={black:"#000000",blue:"#0000ff",cyan:"#00ffff",darkBlue:"#000080",darkCyan:"#008080",darkGray:"#808080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",green:"#00ff00",lightGray:"#c0c0c0",magenta:"#ff00ff",red:"#ff0000",yellow:"#ffff00",white:"#ffffff"};function Ho(t){return !t||!/^[\w \-.+]{1,64}$/.test(t)?null:`"${t}"`}function Dn(t,e=false){let n=nd(t);return n===null||Math.abs(n)>999999||!e&&n<0?null:n}function V(t,e=false){let n=Dn(t,e);return n===null?null:`${n/20}pt`}function An(t){let e=[],n=[],r=null,a=null;for(let o of t)switch(o.localName){case "b":e.push(`font-weight:${W(o)?"bold":"normal"}`);break;case "i":e.push(`font-style:${W(o)?"italic":"normal"}`);break;case "u":{let i=Y(o)??"single";if(i==="none"||!W(o))break;n.push("underline"),r=_o[i]??"solid",a=Je(o.attributes?.color);break}case "strike":W(o)&&n.push("line-through");break;case "dstrike":W(o)&&n.push("line-through");break;case "caps":W(o)&&e.push("text-transform:uppercase");break;case "smallCaps":W(o)&&e.push("font-variant:small-caps");break;case "vertAlign":{let i=Y(o);i==="superscript"?e.push("vertical-align:super","font-size:0.75em"):i==="subscript"&&e.push("vertical-align:sub","font-size:0.75em");break}case "color":{let i=Je(Y(o));i&&e.push(`color:${i}`);break}case "highlight":{let i=jo[Y(o)??""];i&&e.push(`background-color:${i}`);break}case "sz":{let i=Y(o);i!==void 0&&Lo.test(i)&&e.push(`font-size:${Number(i)/2}pt`);break}case "rFonts":{let i=Ho(o.attributes?.ascii??o.attributes?.hAnsi);i&&e.push(`font-family:${i}`);break}case "spacing":{let i=V(Y(o),true);i&&e.push(`letter-spacing:${i}`);break}}return n.length>0&&(e.push(`text-decoration-line:${[...new Set(n)].join(" ")}`),r&&e.push(`text-decoration-style:${r}`),a&&e.push(`text-decoration-color:${a}`)),e.join(";")}var zo={left:"left",start:"left",right:"right",end:"right",center:"center",both:"justify",distribute:"justify"};function Fn(t){let e=[];for(let n of t)switch(n.localName){case "jc":{let r=zo[Y(n)??""];r&&e.push(`text-align:${r}`);break}case "ind":{let r=V(n.attributes?.left??n.attributes?.start,true),a=V(n.attributes?.right??n.attributes?.end,true),o=V(n.attributes?.firstLine),i=V(n.attributes?.hanging);r&&e.push(`margin-left:${r}`),a&&e.push(`margin-right:${a}`),o?e.push(`text-indent:${o}`):i&&e.push(`text-indent:-${i}`);break}case "spacing":{let r=V(n.attributes?.before),a=V(n.attributes?.after);r&&e.push(`margin-top:${r}`),a&&e.push(`margin-bottom:${a}`);let o=Dn(n.attributes?.line),i=n.attributes?.lineRule;o!==null&&i!=="exact"&&i!=="atLeast"?e.push(`line-height:${(o/240).toFixed(3)}`):o!==null&&e.push(`line-height:${o/20}pt`);break}case "shd":{let r=Je(n.attributes?.fill);r&&e.push(`background-color:${r}`);break}case "pageBreakBefore":W(n)&&e.push("break-before:page");break;}return e.join(";")}var w=new Schema({nodes:{doc:{content:"paragraph+"},paragraph:{content:"inline*",group:"block",attrs:{nodeId:{default:null},props:{default:[]}},toDOM:t=>{let e=Fn(t.attrs.props??[]);return ["p",{"data-node-id":String(t.attrs.nodeId??""),...e?{style:e}:{}},0]},parseDOM:[{tag:"p",getAttrs:t=>typeof t=="string"?null:{nodeId:t.getAttribute("data-node-id")||null,props:[]}}]},text:{group:"inline"},tab:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"tab",class:"docx-tab"},"\u2192"],parseDOM:[{tag:'span[data-token="tab"]'}]},hardBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["br"],parseDOM:[{tag:"br"}]},pageBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"page-break",class:"docx-page-break"}],parseDOM:[{tag:'span[data-token="page-break"]'}]},unknownInline:{inline:true,group:"inline",atom:true,selectable:false,draggable:false,attrs:{nodeId:{default:null},label:{default:""}},toDOM:t=>["span",{"data-token":"unknown","data-node-id":String(t.attrs.nodeId??""),contenteditable:"false",class:"docx-unknown-inline",title:String(t.attrs.label||"Content this editor cannot edit yet. It is preserved.")}],parseDOM:[{tag:'span[data-token="unknown"]',getAttrs:t=>typeof t=="string"?false:{nodeId:t.getAttribute("data-node-id")||null,label:""}}]}},marks:{runProps:{attrs:{props:{default:[]}},excludes:"runProps",toDOM:t=>{let e=t.attrs.props??[],n=An(e);return ["span",{"data-run-props":Uo(e),...n?{style:n}:{}},0]},parseDOM:[{tag:"span[data-run-props]",getAttrs:t=>{if(typeof t=="string")return false;let e=Wo(t.getAttribute("data-run-props"));return e?{props:e}:false}}]}}});function Uo(t){return JSON.stringify(Array.isArray(t)?t:[])}function Wo(t){if(!t)return null;try{let e=JSON.parse(t);if(!Array.isArray(e))return null;let n=[];for(let r of e){if(typeof r!="object"||r===null)return null;let a=r;if(typeof a.localName!="string"||a.attributes!==void 0&&(typeof a.attributes!="object"||a.attributes===null))return null;n.push(a.attributes===void 0?{localName:a.localName}:{localName:a.localName,attributes:a.attributes});}return n}catch{return null}}function Ge(t){for(let e of t.marks)if(e.type.name==="runProps")return e.attrs.props??[];return []}function Te(t,e){return JSON.stringify(Ie(t))===JSON.stringify(Ie(e))}function Ie(t){return [...t].map(e=>({localName:e.localName,attributes:Object.fromEntries(Object.entries(e.attributes??{}).sort(([n],[r])=>n<r?-1:1))})).sort((e,n)=>e.localName<n.localName?-1:1)}function Ke(t){if(!t||t.kind==="textValue")return [];let e=[];for(let n of t.children){if(n.kind==="textValue"||n.namespaceUri!==la||n.localName==="rPrChange"||n.localName==="pPrChange")continue;let r={};for(let a of n.attributes)a.namespaceUri===la&&(r[a.localName]=a.value);e.push(Object.keys(r).length>0?{localName:n.localName,attributes:r}:{localName:n.localName});}return e}function Bn(t){return t.kind==="textValue"?"":`${{drawing:"Picture",pict:"Picture",object:"Embedded object",fldSimple:"Field",hyperlink:"Hyperlink",sdt:"Content control",tbl:"Table"}[t.localName]??t.localName} \u2014 preserved, not editable yet`}function F(t){if(t.kind==="textValue")return [];let e=[],n=o=>{if(o.kind!=="run")return;let i=o.children.find(d=>d.kind==="runProperties"),l=Ke(i);for(let d of o.children)if(d.kind!=="runProperties"){if(d.kind==="tab"){e.push({kind:"tab"});continue}if(d.kind==="hardBreak"){e.push(ob(d)?{kind:"pageBreak"}:{kind:"hardBreak"});continue}if(d.kind==="text"){let u="";for(let x of d.children)x.kind==="textValue"&&(u+=x.value);u.length>0&&e.push({kind:"text",text:u,props:l});continue}e.push({kind:"unknown",nodeId:d.id,label:Bn(d),modelLength:d.kind==="drawing"||Ld(d)||qd(d)||fb(d)!==null?1:0});}},r=o=>{if(o.kind==="run"){n(o);return}e.push({kind:"unknown",nodeId:o.id,label:Bn(o),modelLength:0});},a=(o,i)=>{for(let l of o)if(!(l.kind==="textValue"||l.kind==="paragraphProperties")&&!(i>=wa)){if(ya(l)&&!va(l.kind)&&i<wa){a(l.children.filter(d=>!sh(l,d)),xa(l,i));continue}if(Uc(l)){let d=Wc(l);d&&a(d,xa(l,i));continue}r(l);}};return a(t.children,0),e}function ae(t){let e=[],n=r=>{if(r.kind!=="textValue"){if(r.kind==="body"){for(let a of r.children)a.kind==="paragraph"&&e.push(a);return}for(let a of r.children)n(a);}};return n(t.root),e}var Ln=ub(16),_n=tb();function Yo(t,e){let n=_n.get(t);if(!n){let r=[];Sc([t],r,0),n=Object.freeze(r),_n.set(t,n,n.length);}for(let r of n)e.push(r);}function B(t){let e=Ln.get(t);if(e)return e;let n=[];for(let r of Oc(t))if(r.root.kind!=="textValue")for(let a of r.root.children)Yo(a,n);return Ln.set(t,n),n}function q(t){let e=ae(t).map(n=>{let r=n.kind==="textValue"?void 0:n.children.find(o=>o.kind==="paragraphProperties"),a=F(n).map(o=>{switch(o.kind){case "text":return w.text(o.text,o.props.length>0?[w.marks.runProps.create({props:o.props})]:[]);case "tab":return w.node("tab");case "hardBreak":return w.node("hardBreak");case "pageBreak":return w.node("pageBreak");default:return w.node("unknownInline",{nodeId:o.nodeId,label:o.label})}});return w.node("paragraph",{nodeId:n.id,props:Ke(r)},a)});return w.node("doc",null,e.length>0?e:[w.node("paragraph")])}function Jo(t,e){let n=[];return t.forEach(r=>{if(r.isText&&r.text){n.push({kind:"text",text:r.text,props:Ge(r)});return}r.type.name==="tab"?n.push({kind:"tab"}):r.type.name==="hardBreak"?n.push({kind:"hardBreak"}):r.type.name==="pageBreak"?n.push({kind:"pageBreak"}):r.type.name==="unknownInline"&&n.push({kind:"unknown",nodeId:String(r.attrs.nodeId??""),label:String(r.attrs.label??""),modelLength:e.has(String(r.attrs.nodeId??""))?1:0});}),n}function D(t){let e="";for(let n of t)n.kind==="text"?e+=n.text:n.kind==="tab"?e+=" ":n.kind==="hardBreak"?e+=`
|
|
2
|
+
`:n.kind==="pageBreak"?e+=mb:n.modelLength===1&&(e+=qf);return e}function j(t){let e=[],n=0;for(let r of t)r.kind==="text"?n+=r.text.length:r.kind==="tab"||r.kind==="hardBreak"||r.kind==="pageBreak"?n+=1:(e.push(`${r.nodeId}@${n}`),n+=r.modelLength);return e}function Go(t,e){if(t===e)return null;let n=0,r=Math.min(t.length,e.length);for(;n<r&&t[n]===e[n];)n+=1;let a=t.length,o=e.length;for(;a>n&&o>n&&t[a-1]===e[o-1];)a-=1,o-=1;return {start:n,endBefore:a,endAfter:o}}function jn(t){let e=[];for(let n of t)if(n.kind==="text")for(let r=0;r<n.text.length;r+=1)e.push(n.props);else n.kind==="tab"||n.kind==="hardBreak"||n.kind==="pageBreak"?e.push(e[e.length-1]??[]):n.kind==="unknown"&&n.modelLength===1&&e.push([]);return e}function Ko(t,e,n,r,a){let o=[],i=D(e),l=D(n),d=Go(i,l),u=[],x=0,m=false;for(let y of e){if(y.kind!=="unknown"){x+=y.kind==="text"?y.text.length:1;continue}let p=x;y.modelLength===1&&d&&(d.start<x+1&&d.endBefore>x&&(m=true),d.endBefore<=x&&(p+=d.endAfter-d.endBefore)),u.push(`${y.nodeId}@${p}`),x+=y.modelLength;}if(m||JSON.stringify(u)!==JSON.stringify(j(n)))return {ok:false,reason:"unknown-content-moved",detail:t};if(Te(r,a)||o.push({op:"setParagraphProperties",paragraphId:t,properties:Ie(a)}),d&&(d.endBefore>d.start&&o.push({op:"deleteText",paragraphId:t,start:d.start,end:d.endBefore}),d.endAfter>d.start)){let y=l.slice(d.start,d.endAfter),p=d.start,g="",k=()=>{g.length!==0&&(o.push({op:"insertText",paragraphId:t,offset:p,text:g}),p+=g.length,g="");};for(let O of y)O===" "?(k(),o.push({op:"insertTab",paragraphId:t,offset:p}),p+=1):O===`
|
|
3
|
+
`?(k(),o.push({op:"insertHardBreak",paragraphId:t,offset:p}),p+=1):O===mb?(k(),o.push({op:"insertPageBreak",paragraphId:t,offset:p}),p+=1):g+=O;k();}if(!d){let y=jn(e),p=jn(n),g=0;for(;g<p.length;){if(Te(y[g]??[],p[g])){g+=1;continue}let k=g,O=p[g];for(;g<p.length&&Te(p[g],O)&&!Te(y[g]??[],p[g]);)g+=1;o.push({op:"setRunProperties",paragraphId:t,start:k,end:g,properties:Ie(O)});}}return {ok:true,ops:o}}function Xe(t,e){let n=ae(t),r=new Set;for(let l of n)for(let d of F(l))d.kind==="unknown"&&d.modelLength===1&&r.add(d.nodeId);let a=l=>Jo(l,r),o=[];if(e.forEach(l=>{l.type.name==="paragraph"&&o.push(l);}),o.length!==e.childCount)return {ok:false,reason:"unsupported-node"};let i=o.length-n.length;if(i===0){let l=[];for(let[d,u]of o.entries()){let x=n[d];if(u.attrs.nodeId!==x.id)return {ok:false,reason:"paragraph-reordered",detail:String(u.attrs.nodeId)};let m=Ko(x.id,F(x),a(u),Ke(x.kind==="textValue"?void 0:x.children.find(y=>y.kind==="paragraphProperties")),u.attrs.props??[]);if(!m.ok)return m;l.push(...m.ops);}return {ok:true,ops:l}}return i===1?Xo(n,o,a):i===-1?Qo(n,o,a):{ok:false,reason:"paragraph-count-unexplained",detail:String(i)}}function Xo(t,e,n){for(let r=0;r<t.length;r+=1){let a=t[r],o=e[r],i=e[r+1];if(!o||!i||o.attrs.nodeId!==a.id)continue;let l=i.attrs.nodeId;if(l!==null&&l!==a.id)continue;let d=n(o),u=n(i),x=F(a),m=D(d);if(m+D(u)===D(x)&&JSON.stringify(j([...d,...u]))===JSON.stringify(j(x))&&Hn(t,e,r,n)&&zn(t,e,r+1,r+2,n))return {ok:true,ops:[{op:"splitParagraph",paragraphId:a.id,offset:m.length}]}}return {ok:false,reason:"split-not-clean"}}function Qo(t,e,n){for(let r=0;r+1<t.length;r+=1){let a=t[r],o=t[r+1],i=e[r];if(!i||i.attrs.nodeId!==a.id)continue;let l=[...F(a),...F(o)],d=n(i);if(D(d)===D(l)&&JSON.stringify(j(d))===JSON.stringify(j(l))&&Hn(t,e,r,n)&&zn(t,e,r+2,r+1,n))return {ok:true,ops:[{op:"joinParagraphs",firstId:a.id,secondId:o.id}]}}return {ok:false,reason:"join-not-clean"}}function Hn(t,e,n,r){for(let a=0;a<n;a+=1){let o=e[a],i=t[a];if(!o||o.attrs.nodeId!==i.id||D(r(o))!==D(F(i))||JSON.stringify(j(r(o)))!==JSON.stringify(j(F(i))))return false}return true}function zn(t,e,n,r,a){for(let o=0;n+o<t.length;o+=1){let i=t[n+o],l=e[r+o];if(!l||l.attrs.nodeId!==i.id||D(a(l))!==D(F(i))||JSON.stringify(j(a(l)))!==JSON.stringify(j(F(i))))return false}return true}function Vo(t,e){return Ta(t,e)!==null}function Qe(t,e,n){if(!n||n.created.length>0||n.deleted.length>0||n.splitJoin.length>0)return q(e);let r=new Map;t.forEach(d=>{let u=d.attrs.nodeId;typeof u=="string"&&r.set(u,d);});let a=new Set(n.dirty),o=ae(e);if(o.length!==t.childCount)return q(e);let i=q(e),l=[];for(let[d,u]of o.entries()){let x=r.get(u.id);l.push(x&&!a.has(u.id)?x:i.child(d));}return w.node("doc",null,l)}var qo=8*1024*1024;function $n(){let t=new WeakMap;function*e(r){let a=t.get(r);if(a)return a.slice();let o=yield*He(r);return t=new WeakMap,o.byteLength<=qo&&t.set(r,o.slice()),o}return Object.assign(r=>{let a=e(r);for(;;){let o=a.next();if(o.done)return o.value}},{steps:e})}function Wn(t){return B(t).map(e=>hj(t,e.id)??"").join(`
|
|
4
|
+
`)}var Zo=64,Un=new WeakMap;function Ve(t,e=0){if(e>Zo)return false;let n=Un.get(t);if(n!==void 0)return n;let r=false;for(let a of t.children)if(a.kind!=="textValue"&&(a.kind==="commentRangeStart"||a.kind==="commentReference"||Ve(a,e+1))){r=true;break}return rb(t)&&Un.set(t,r),r}var er="/word/numbering.xml";function tr(t,e,n){if(t.relationships!==e.relationships||t.contentTypes!==e.contentTypes||t.parts.size!==e.parts.size)return false;for(let[r,a]of e.parts)if(!(r===n||r===er)&&t.parts.get(r)!==a)return false;return true}function nr(t,e){let n=t.kind==="revision"?t.ranges[0]??null:t.range;if(!n)return null;let r=e.get(n.start.paragraphId);return r===void 0?null:r}function Yn(t,e,n){for(let a of e)if(a.ranges.length===0)return false;let r=new Set;for(let a of t)a.kind!=="revision"||a.ranges.length>0||Gn(a,n)||r.add(Mj(a));for(let a of e)if(r.has(Mj(a)))return false;return true}function Jn(t,e,n,r){let a=e.get(n);if(a===void 0)return [...t];let o=[],i=null;for(let l of t){if(l.kind==="revision"&&Gn(l,n)){i===null&&(i=o.length);continue}if(i===null){let d=nr(l,e);d!==null&&d>a&&(i=o.length);}o.push(l);}if(i===null&&(i=o.length),r.length>0){let l=r.length<2?[...r]:[...r].sort((d,u)=>Tj(d,e)-Tj(u,e));o.splice(i,0,...l);}return Ck(o)}function Gn(t,e){return t.ranges.length>0&&t.ranges.every(n=>n.start.paragraphId===e&&n.end.paragraphId===e)}function or(t,e){return t.range?t.range.start.paragraphId===e||t.range.end.paragraphId===e:false}function rr(t,e){return t.revisionKind==="structural"&&t.ranges.some(n=>n.start.paragraphId===e||n.end.paragraphId===e)}function ar(t,e){return t.ranges.length===0||!t.ranges.some(r=>r.start.paragraphId===e||r.end.paragraphId===e)?false:!t.ranges.every(r=>r.start.paragraphId===e&&r.end.paragraphId===e)}function Kn(t,e,n){return t.fromRevision!==e.bodyRevision||n.currentPackageRevision!==e.packageRevision+1&&(n.changePackage!==n.currentPackage||!tr(e.pkg,n.currentPackage,n.part.name))||t.story!==void 0&&t.story.kind!=="body"||t.impact==="global"?false:e.commentsPart===n.commentsPart&&e.commentsExtendedPart===n.commentsExtendedPart}function Xn(t,e){let n=Ua(t,e);if(!n)return false;let r=n.children.findIndex(o=>o.id===e),a=n.children[r-1];return a?.kind==="paragraph"&&rk({...t,root:a}).some(o=>o.paragraphMark)}function Qn(t,e,n,r){if(!Kn(t,e,r)||t.splitJoin.length!==1)return false;let a=t.splitJoin[0],o,i;if("split"in a){if(t.deleted.length>0||t.created.length!==1||t.created[0]!==a.split.tail)return false;o=i=[a.split.from,a.split.tail];}else {if(t.created.length>0||t.deleted.length!==1||t.deleted[0]!==a.join.removed)return false;o=[a.join.kept,a.join.removed],i=[a.join.kept];}for(let d of i){let u=Ta(r.part,d);if(!u||u.kind!=="paragraph"||rk({...r.part,root:u}).length>0)return false}if(Xn(r.part,i[0]))return false;let l=d=>d!==void 0&&o.includes(d);for(let d of n){let u=d.kind==="revision"?d.ranges:d.range?[d.range]:[];for(let x of u)if(l(x.start.paragraphId)||l(x.end.paragraphId))return false}return true}function Vn(t,e,n,r){if(!Kn(t,e,r)||t.dirty.length!==1||t.created.length>0||t.deleted.length>0||t.splitJoin.length>0)return null;let{part:a}=r,o=t.dirty[0],i=Ta(a,o);if(!i||i.kind!=="paragraph"||t.impact!=="text-local"&&(rk({...a,root:i}).length>0||t.impact==="flow-structural"&&Ua(a,o)?.localName!=="body")||Xn(a,o))return null;for(let l of n){if(l.kind==="comment"){if(or(l,o))return null;continue}if(l.kind==="custom"){if(l.range?.start.paragraphId===o)return null;continue}if(rr(l,o)||ar(l,o))return null}return o}function sr(t,e){if(t.size!==e.size)return false;for(let[n,r]of t){let a=e.get(n);if(!a||a.nodeId!==r.nodeId||a.label!==r.label||a.data!==r.data)return false}return true}function ir(t,e){return t.root===e.root&&t.commentsPart===e.commentsPart&&t.commentsExtendedPart===e.commentsExtendedPart&&t.stylesPart===e.stylesPart&&t.furnitureParts.length===e.furnitureParts.length&&t.furnitureParts.every((n,r)=>n===e.furnitureParts[r])&&sr(t.customNodePayloads,e.customNodePayloads)}function qn(){let t=[];return {get(e){let n=t.findIndex(a=>ir(a.inputs,e));if(n<0)return;let[r]=t.splice(n,1);return t.unshift(r),r.items},set(e,n){let r=t.findIndex(a=>a.inputs.root===e.root);r>=0&&t.splice(r,1),t.unshift({inputs:e,items:n}),t.length>8&&(t.length=8);}}}var to=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u,lr=["ascii","hAnsi","cs","eastAsia"],cr=["asciiTheme","hAnsiTheme","cstheme","eastAsiaTheme"],dr=128,ur=/[\u0000-\u001F\u007F-\u009F]/;function A(t){return t.kind!=="textValue"}function Z(t,e){return t.attributes.find(n=>n.localName===e)?.value}function no(t,e){let n=new Map;for(let a of t)for(let o of a.children)if(A(o))for(let[i,l]of ao(o,e))n.has(i)||n.set(i,l);let r=[...n.values()];return r.sort((a,o)=>a<o?-1:a>o?1:0),r}var qe=new WeakMap,oo=16,ro=32;function ao(t,e,n=0){let r=e?.major??null,a=e?.minor??null,o=e?.majorEastAsia??null,i=e?.minorEastAsia??null,l=e?.majorBidi??null,d=e?.minorBidi??null,u=qe.get(t);if(u&&u.major===r&&u.minor===a&&u.majorEastAsia===o&&u.minorEastAsia===i&&u.majorBidi===l&&u.minorBidi===d)return u.byFold;if(t.children.length>=oo&&n<ro&&t.localName!=="rFonts"){let p=new Map;for(let g of t.children)if(A(g))for(let[k,O]of ao(g,e,n+1))p.has(k)||p.set(k,O);return qe.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:i,majorBidi:l,minorBidi:d,byFold:p}),p}let x=new Map,m=p=>{if(!p||!to.test(p))return;let g=p.toLowerCase();x.has(g)||x.set(g,p);},y=[t];for(;y.length>0;){let p=y.pop();if(A(p)){if(p.localName==="rFonts"){for(let g of lr)m(Z(p,g));if(e)for(let g of cr)m(Ba(Z(p,g),e));}for(let g=p.children.length-1;g>=0;g-=1)y.push(p.children[g]);}}return qe.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:i,majorBidi:l,minorBidi:d,byFold:x}),x}function so(t){let e=new Map;for(let r of t)for(let a of r.children)if(A(a))for(let[o,i]of io(a))e.has(o)||e.set(o,i);let n=[...e.values()];return n.sort((r,a)=>r<a?-1:r>a?1:0),n}var Zn=new WeakMap,pr=new Map;function io(t,e=0){let n=Zn.get(t);if(n)return n;let r=i=>{let l=i.size===0?pr:i;return Zn.set(t,l),l},a=new Map;if(t.children.length>=oo&&e<ro&&t.localName!=="sym"){for(let i of t.children)if(A(i))for(let[l,d]of io(i,e+1))a.has(l)||a.set(l,d);return r(a)}let o=[t];for(;o.length>0;){let i=o.pop();if(A(i)){if(i.localName==="sym"&&i.namespaceUri===la){let l=i.attributes.find(u=>u.localName==="font"&&(u.namespaceUri===la||u.namespaceUri===""))?.value,d=c(l);d!==null&&!a.has(d.toLowerCase())&&a.set(d.toLowerCase(),d);}for(let l=i.children.length-1;l>=0;l-=1)o.push(i.children[l]);}}return r(a)}function lo(t){let e=[...t];for(;e.length>0;){let n=e.pop();if(A(n)){if(n.localName==="t"&&n.namespaceUri===la){for(let r of n.children)if(!A(r)&&r.value.length>0)return true;continue}for(let r of n.children)e.push(r);}}return false}var fr=new Set(["paragraph","character","table","numbering"]),mr=/^[0-9A-Fa-f]{6}$/,gr=16,eo=new Map([["normal",0],["title",1],["subtitle",2],["heading 1",11],["heading 2",12],["heading 3",13],["heading 4",14],["heading 5",15],["heading 6",16],["heading 7",17],["heading 8",18],["heading 9",19]]);function co(t){return t.children}function Ze(t,e){for(let n of co(t))if(A(n)&&n.localName===e)return n}function yr(t){return eo.get(t.name.toLowerCase())??eo.get(t.styleId.toLowerCase())??Number.MAX_SAFE_INTEGER}function et(t){return t===void 0||t.length===0||t.length>dr||ur.test(t)?null:t}function uo(t,e){if(!t)return [];let n=new Map;for(let o of t.children){if(!A(o)||o.localName!=="style")continue;let i=et(Z(o,"styleId"));i!==null&&!n.has(i)&&n.set(i,o);}let r=o=>{let i=false,l=false,d=null,u=false,x=false,m=new Set,y=o;for(let k=0;k<gr&&y!==null&&!m.has(y);k+=1){m.add(y);let O=n.get(y);if(!O)break;let b=Ze(O,"rPr");for(let v of b?co(b):[]){if(!A(v))continue;let T=Z(v,"val"),E=T!=="0"&&T!=="false"&&T!=="off";v.localName==="b"&&!u?(i=E,u=true):v.localName==="i"&&!x?(l=E,x=true):v.localName==="color"&&d===null&&T&&mr.test(T)&&(d=T);}let R=Ze(O,"basedOn");y=R?et(Z(R,"val")):null;}let p=e?.(o),g=p?.fontFamily??null;return {fontFamily:g!==null&&to.test(g)?g:null,fontSizePt:p?.fontSizeHalfPoints!=null&&p.fontSizeHalfPoints>0?p.fontSizeHalfPoints/2:null,bold:i,italic:l,color:d}},a=[];for(let[o,i]of n){let l=Z(i,"type");if(l===void 0||!fr.has(l))continue;let d=Ze(i,"name"),u=et(d?Z(d,"val"):void 0);a.push({styleId:o,name:u??o,type:l,preview:r(o)});}return a.map((o,i)=>({entry:o,index:i,rank:yr(o)})).sort((o,i)=>o.rank-i.rank||o.index-i.index).map(o=>o.entry)}var hr=128,xr=/[\u0000-\u001F\u007F-\u009F]/,Pr=/[\u0000-\u001F\u007F-\u009F]/g,kr=200;function nt(t){return t.kind!=="textValue"}function po(t,e){for(let n of t.children)if(nt(n)&&n.localName===e)return n}function tt(t,e){return t.attributes.find(n=>n.localName===e)?.value}function Or(t){let e=new Map;if(!t)return e;for(let n of t.children){if(!nt(n)||n.localName!=="style"||tt(n,"type")!=="paragraph")continue;let r=tt(n,"styleId");if(r===void 0||r.length===0||r.length>hr||xr.test(r))continue;let a=a$1(n);a!==null&&e.set(r,a);}return e}function ot(t){let e=po(t,"pPr"),n=e?po(e,"pStyle"):void 0;return n?tt(n,"val"):void 0}function fo(t,e){let n=Or(e);if(n.size===0)return [];let r=[];for(let a of ae(t)){if(!nt(a))continue;let o=ot(a);if(o===void 0)continue;let i=n.get(o);if(i===void 0)continue;let l=hj(t,a.id)??"",d=a.kind==="paragraph"?jj(a,l):l,u=lb(d).replace(Pr," ").trim().slice(0,kr);u.length!==0&&r.push({text:u,level:i,blockId:a.id});}return r}function Sr(t,e,n){let r=new Map,a=n(t);for(let o of a){let i=r.get(o.hostParagraphId);i?i.push(o):r.set(o.hostParagraphId,[o]);}return r}function br(t,e,n){let r=[];for(let a of Rc(t.root)){let o=e.get(a.id);if(o)for(let i of o)r.push(i);}return r}function mo(t,e,n=wi){let r=[],a=new Map;for(let o of t){if(r.push(o),o.scope?.kind==="note")continue;let i=a.get(o.part);i||(i=Sr(o.part,e,n),a.set(o.part,i));for(let l of br(o,i)){let d=o.scope;r.push({part:o.part,root:l.root,scope:{kind:"frame",id:l.root.id,drawingNodeId:l.drawingNodeId,hostParagraphId:l.hostParagraphId,...d?.kind==="headerFooter"?{owner:d}:{}}});}}return r}var Ne=48,Rr=/[\u0000-\u001F\u007F-\u009F]/g;function vr(t){let e=[],n=mg(t),r=new Map;for(let a of n.segments)yf(a.node)&&r.set(a.node.id,a.formatRunIds??[]);return $c(t.children,0,a=>{if(a.kind==="run"){e.push({id:a.id,start:n.spanOf(a)?.start??0});return}if(yf(a))for(let o of r.get(a.id)??[]){let i=n.spanOf(o);i&&e.push({id:o,start:i.start});}},{descendRevisions:true}),e}function Tr(t){let e=Qc(t);return e?[{part:t,root:e}]:[]}function Ir(t,e){let n=[];for(let r of ["header","footer"])for(let a of t){let o=r==="header"?a.headers:a.footers;for(let[i,l]of o){if(!ef(a,i)||e.has(l.part))continue;e.add(l.part);let d=Oc(l.part).find(u=>u.kind===r);d&&n.push({part:l.part,root:d.root,scope:{kind:"headerFooter",rId:l.rId}});}}return n}function go(t,e,n){if(!t)return [];let r=[];for(let a of Kc(t.root)){let o=yc(a);!Ac(a)||o===null||!n.has(o)||r.push({part:t,root:a,scope:{kind:"note",id:oc(e,o)}});}return r}function Nr(t,e){let n=Tr(t);if(e){let r=new Set;for(let a of Ir(e.headerFooterBySection,r))n.push(a);for(let a of go(e.footnotes,"footnote",e.referencedNoteIds.footnote))n.push(a);for(let a of go(e.endnotes,"endnote",e.referencedNoteIds.endnote))n.push(a);}return mo(n)}function yo(t,e){if(t.length===0)return {index:0,offset:e};for(let n=t.length-1;n>=0;n-=1){let r=t[n].start;if(e>=r)return {index:n,offset:e-r}}return {index:0,offset:e}}function Er(t,e,n){let r=t.findIndex(a=>a.id===e);return r<0?null:{index:r,offset:n}}function rt(t,e){return lb(t).replace(Rr," ").slice(0,e)}var wr=1e3;function ho(t,e,n={},r){let a=n.limit!==void 0&&Number.isInteger(n.limit)&&n.limit>0?Math.min(n.limit,2e3):2e3,o={...n.matchCase===void 0?{}:{matchCase:n.matchCase},...n.wholeWord===void 0?{}:{wholeWord:n.wholeWord}},i=e.slice(0,wr),l=i.map(()=>({matches:[],truncated:false})),d=i.map((x,m)=>sa(x)?m:-1);if(d=d.filter(x=>x>=0),d.length===0)return l;let u=n.stories==="body"?void 0:r;for(let x of Nr(t,u)){let m=0;for(let y of Rc(x.root)){if(y.kind!=="paragraph")continue;let p=m;m+=1;let g=hj(x.part,y.id)??"",k=d$1(y,g);if(k.text.length===0)continue;let O=null,b=false;for(let R of d){let v=l[R],T=a-v.matches.length,E=k.findOccurrences(i[R],Math.max(T,1),o);if(T===0&&E.matches.length>0){v.truncated=true,b=true;continue}for(let N of E.matches){let M=N.start+N.length;O??=vr(y);let L=k.resultRunAddressAt(N.start),ee=L?Er(O,L.runId,L.offset)??yo(O,N.rawStart):yo(O,N.rawStart);v.matches.push({blockId:y.id,start:N.rawStart,length:N.rawEnd-N.rawStart,paragraphIndex:p,runIndex:ee.index,runOffset:ee.offset,...x.scope?{scope:x.scope}:{},text:rt(k.displaySlice(N.start,M),256),contextBefore:rt(k.displaySlice(Math.max(0,N.start-Ne),N.start),Ne),contextAfter:rt(k.displaySlice(M,M+Ne),Ne)});}E.truncated&&(v.truncated=true,b=true);}if(b&&(d=d.filter(R=>!l[R].truncated)),d.length===0)return l}}return l}var Mr=32;function xo(t){let e=null;return((n,r)=>{let a=t.revision(),o=typeof n!="string",i=`${r?.matchCase===true?"c":""}${r?.wholeWord===true?"w":""}`,l=`${r?.limit??""}:${r?.stories??"all"}`,d=JSON.stringify([i,l,n]);e?.revision!==a&&(e={revision:a,results:new Map});let u=e.results.get(d);if(u)return u;let x=t.bodyPart(),m=t.currentPackage(),y={footnote:new Set,endnote:new Set};for(let k of mh(x))y[k.noteKind].add(k.noteId);let p=ho(x,o?n:[n],r,{headerFooterBySection:t.headerFooterBySection(),footnotes:lh(m,"footnote")??null,endnotes:lh(m,"endnote")??null,referencedNoteIds:y}),g=o?p:p[0];return e.results.size>=Mr&&e.results.delete(e.results.keys().next().value),e.results.set(d,g),g})}var Cr=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6"];function se(t,e=null,n=null){return Aa(t,e,n)}function Po(t){let e=Ed(t),n=[];for(let r of Cr){let a=e.get(r);if(!a)return [];n.push({slot:r,hex:a});}return n}var ko=new WeakMap;function st(t){let e=ko.get(t);if(e!==void 0)return e;let n=wb(t),r=n===null||!vb(n)?null:n;return ko.set(t,r),r}var at=class{#e;#t;constructor(e,n){this.#e=e,this.#t=n;}get size(){return this.#e.size}get(e){if(this.#e.has(e))return this.#t.find(n=>e.startsWith(`${n.name}#`))}has(e){return this.get(e)!==void 0}*entries(){for(let e of this.#e.keys()){let n=this.get(e);n&&(yield [e,n]);}}keys(){return this.#e.keys()}*values(){for(let[,e]of this.entries())yield e;}[Symbol.iterator](){return this.entries()}forEach(e,n){for(let[r,a]of this.entries())e.call(n,a,r,this);}};function Oo(t,e){return Object.freeze({...t,partByNode:new at(t.ordinalByNode,e)})}function So(t){let e=new Map,n=new Map,r=new Map,a=new Set,o=new Map,i=new Map,l=0;for(let d of t)for(let u of B(d)){r.set(u.id,l),o.set(u.id,d),l+=1;let x=st(u);if(x===null)continue;e.set(u.id,x);let m=x.toUpperCase(),y=i.get(m);y?(y.push(u.id),a.add(m)):(i.set(m,[u.id]),n.set(m,u.id));}return Object.freeze({paraIdByNode:e,nodeByParaId:n,ordinalByNode:r,ambiguousParaIds:a,partByNode:o,claimantsByParaId:i})}function bo(t,e){let n=t.indexOf("#");if(n<=0)return null;let r=t.slice(0,n),a=e.body.name===r?e.body:void 0;a??=e.openStories.find(l=>l.name===r);let o=a?void 0:e.otherStories.find(l=>l.name===r);if(a??=o?e.normalize(o):void 0,!a)return null;let i=Ta(a,t);return i?.kind==="paragraph"?st(i):null}function it(t){return t.historyToken??t.historyGroup}var Ro={committed:false,rejected:false,opCount:0};function H(t,e){return e===void 0?{committed:false,rejected:true,opCount:t}:{committed:false,rejected:true,opCount:t,reason:e}}function vo(t,e,n={}){let r=e.filter(x=>x.ops.length>0),a=n.partOps??[],o=[...r,...a].reduce((x,m)=>x+m.ops.length,0);if(o===0)return n.packageEdits?.length?H(0,"invalidArgs"):Ro;if([...r,...a].some(x=>x.ops.some(Vg))||[...r,...a].some(x=>x.ops.some(bi)))return H(o,"invalidArgs");let[i,...l]=r,d=[];for(let x of l){let m=t.partFor(x.scope);if(!m)return H(o,"unknown-part");d.push({partName:m.name,ops:x.ops});}let u=t.transact(i?.scope??{kind:"body"},x=>{for(let m of n.packageEdits??[])x.applyPackage(m);for(let m of i?.ops??[])x.apply(m);for(let m of d)for(let y of m.ops)x.applyTo(m.partName,y);for(let m of a)for(let y of m.ops)x.applyTo(m.partName,y);},{...n,historyGroup:it(n)});return u.ok?{committed:true,rejected:false,opCount:o}:H(o,u.reason)}function To(t,e,n,r,a$1,o){let i=o.partOps??[],l=e.length+i.reduce((m,y)=>m+y.ops.length,0);if(l===0&&!o.packageEdits?.length)return Ro;if(i.some(m=>m.ops.some(y=>Vg(y)||bi(y))))return H(l,"invalidArgs");let d=e.filter(m=>Vg(m)||bi(m)).length;if(d>0){if(i.length||o.packageEdits?.length||d!==e.length||e.length!==1)return H(e.length,"invalidArgs");let m=t.applyLifecycleOp(e[0],{actorId:o.actorId,historyGroup:it(o)});return m.ok?{committed:true,rejected:false,opCount:1}:H(1,m.detail??m.reason)}let u=o.recordsHistory===false&&o.actorId&&o.operationId?t.partFor(a$1)?.name:void 0,x=t.transact(a$1,m=>{n!==void 0&&m.selectionBefore(n),r!==void 0&&m.selectionAfter(r);for(let y of o.packageEdits??[])m.applyPackage(y);for(let y of e)m.apply(y);for(let y of i)for(let p of y.ops)m.applyTo(y.partName,p);u&&m.applyPackage(y=>a(y,u,e));},{...o,historyGroup:it(o)});return x.ok?{committed:true,rejected:false,opCount:l}:H(l,x.reason)}var Dr=Object.freeze([]);function Ar(t,e={}){return Fr(Ee(t),e)}function Fr(t,e={}){if(!t.ok)return t;let n=t.package,r=n.parts.get(n.mainDocumentPart);if(!r)return {ok:false,reason:"no-main-document-tree",detail:n.mainDocumentPart};let a=Eb(r),o=new T(n,ua(n,a),e.contentLockPolicy?{contentLockPolicy:e.contentLockPolicy}:{}),i=null,l=null,d$1=null,u=null,x=null;o.subscribe(s=>{u=s,x=o.currentPackage();});let m=()=>o.bodyStore(),y=()=>o.currentPackage(),p=$n(),g=Object.freeze({kind:"body"}),k=(s,c)=>{let f=c?.find(P=>P.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");if(!f)return;let h=J(f);return h.mode==="Internal"&&h.target.ok?s.parts.get(h.target.partName):void 0},O=(s,c,f)=>{if(s.mainRelationships!==f||s.settingsPart!==k(c,f))return false;for(let h of s.resolution)for(let P of [h.headers,h.footers])for(let S of P.values())if(c.parts.get(S.partName)!==S.part)return false;return true},b$1=()=>{let s=y(),c=s.relationships.get(s.mainDocumentPart);if(i&&u&&x===s&&O(i,s,c)&&i.packageRevision===u.fromRevision&&o.packageRevision===u.toRevision&&u.story?.kind==="body"&&u.impact==="text-local"&&u.created.length===0&&u.deleted.length===0&&u.splitJoin.length===0&&(i={...i,packageRevision:o.packageRevision,pkg:s,mainRelationships:c,settingsPart:k(s,c)}),!i||i.packageRevision!==o.packageRevision||i.pkg!==s){let f=hf(s);i={packageRevision:o.packageRevision,pkg:s,mainRelationships:c,settingsPart:k(s,c),resolution:f,parts:gf(f)};}return i},R="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",v="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",T$1=null,E=()=>{let s=y(),c=(s.relationships.get(s.mainDocumentPart)??[]).find(P=>P.type===R),f;if(c){let P=J(c);P.mode==="Internal"&&P.target.ok&&(f=s.parts.get(P.target.partName));}f??=s.parts.get("/word/styles.xml");let h=f?.root??null;return h!==T$1&&(T$1=h,de=null,G=null),T$1},N=null,M=null,L=()=>{let s=y();if(N===s)return M;N=s;let c=(s.relationships.get(s.mainDocumentPart)??[]).find(h=>h.type===v),f;if(c){let h=J(c);h.mode==="Internal"&&h.target.ok&&(f=s.parts.get(h.target.partName));}return f??=s.parts.get("/word/numbering.xml"),M=f?.root??null,M},ee="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",lt=null,ge=null,J$1=()=>{let s=y();if(lt===s)return ge;lt=s;let c=(s.relationships.get(s.mainDocumentPart)??[]).find(P=>P.type===ee),f;if(c){let P=J(c);P.mode==="Internal"&&P.target.ok&&(f=s.parts.get(P.target.partName));}f??=s.parts.get("/word/settings.xml");let h=f?.root??null;return h!==ge&&(ge=h,he=null,de=null,G=null),ge},No="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Eo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",ct=(s,c)=>{let f=y(),h=(f.relationships.get("/")??[]).find(S=>S.type===s),P;if(h){let S=J(h);S.mode==="Internal"&&S.target.ok&&(P=f.parts.get(S.target.partName));}return P??f.parts.get(c)},dt=null,Ee=ui,wo=()=>{let s=y();if(dt===s)return Ee;dt=s;let c=ct(No,"/docProps/core.xml"),f=ct(Eo,"/docProps/app.xml");return Ee=vi(c?.root??null,f?.root??null),Ee},Mo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",ut=null,ye=null,te=()=>{let s=y();if(ut===s)return ye;ut=s;let c=(s.relationships.get(s.mainDocumentPart)??[]).find(P=>P.type===Mo),f;if(c){let P=J(c);P.mode==="Internal"&&P.target.ok&&(f=s.parts.get(P.target.partName));}f??=s.parts.get("/word/theme/theme1.xml");let h=f?.root??null;return h!==ye&&(ye=h,he=null,we=null,de=null,G=null),ye},Co="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",pt=null,ft=()=>{let s=y(),c=(s.relationships.get(s.mainDocumentPart)??[]).find(P=>P.type===Co),f=c?J(c):null;return (f?.mode==="Internal"&&f.target.ok?s.parts.get(f.target.partName):void 0)??s.parts.get("/word/fontTable.xml")},Do=()=>(pt??=Object.freeze(lf(y(),ft())),pt),ie=null,ne=null,le=null,ce=null,de=null,we=null,he=null,mt=()=>{let s=[m().part.root],c=new Set;for(let f of z())c.has(f)||(c.add(f),s.push(f.root));return s},Me=()=>{let s=mt(),c=E();return c&&s.splice(1,0,c),s},G=null,xe=null,ue=null,oe=null,gt=new WeakMap,Pe=null,yt=s=>{let c=gt.get(s);if(c)return c;let f=Eb(s);return gt.set(s,f),f},ht=()=>{let s=o.packageRevision,c=o.openStoryToken();if(!oe||oe.revision!==s||oe.openStories!==c){let f=o.openStoryParts(),h=new Set(f.map(C=>C.name)),P=z().filter(C=>!h.has(C.name)).map(yt),S=[m().part,...f,...P],I=oe,_=I!==null&&u!==null&&I.openStories===c&&I.revision===u.fromRevision&&s===u.toRevision&&u.impact==="text-local"&&u.created.length===0&&u.deleted.length===0&&u.splitJoin.length===0&&I.parts.length===S.length&&I.parts.every((C,K)=>C.name===S[K]?.name);oe={revision:s,openStories:c,parts:S,index:_&&I?Oo(I.index,S):So(S)};}return oe.index},xt=qn(),Ao=()=>{let s=m().part.name,c=new Map;for(let f of [m().part,...z()])for(let[h,P]of ka(y(),f.name,s))c.set(h,P);return c},Fo=()=>[m().part,...z()],z=()=>{let s=[],c=new Set;for(let h of b$1().parts)for(let P of [h.headers,h.footers])for(let S of P.values())c.has(S)||(c.add(S),s.push(S));let f=y();for(let h of ["footnote","endnote"]){let P=lh(f,h);!P||c.has(P)||(c.add(P),s.push(P));}return s},Pt={ok:true,session:{editable:B(m().part).length>0,paragraphIds:()=>B(m().part).map(s=>s.id),paragraphIdsIn(s=g){let c=o.partFor(s);return c?B(c).map(f=>f.id):[]},part:()=>m().part,partFor:s=>o.partFor(s),currentPackage:y,collaborationPort:s=>b(o,{documentId:s}),applyTreeOps(s,c,f,h=g,P={}){return To(o,s,c,f,h,P)},applyTreeOpsAtomic(s,c={}){return vo(o,s,c)},projectDoc:()=>q(m().part),reconcile:s=>Qe(s,m().part,u),lastCommitWasStructural:()=>u!==null&&(u.created.length>0||u.deleted.length>0||u.splitJoin.length>0||u.impact==="global"),applyPmDoc(s){let c=m(),f=Xe(c.part,s);if(!f.ok)return {committed:false,rejected:true,opCount:0,reason:f.reason};if(f.ops.length===0)return {committed:false,rejected:false,opCount:0};let h=o.transact(g,P=>{for(let S of f.ops)P.apply(S);});return h.ok?{committed:true,rejected:false,opCount:f.ops.length}:{committed:false,rejected:true,opCount:f.ops.length,reason:h.reason}},storyParts:Fo,bodyText:()=>Wn(m().part),storyText(s){let c=o.partFor(s);return c?B(c).map(f=>hj(c,f.id)??"").join(`
|
|
5
|
+
`):null},revision:()=>m().revision,revisionFor:s=>o.revisionFor(s),packageRevision:()=>o.packageRevision,canUndo:()=>o.canUndo,canRedo:()=>o.canRedo,undo:()=>{let s=o.selectionForUndo();return o.undo()===null?null:s},redo:()=>{let s=o.selectionForRedo();return o.redo()===null?null:s},beginComposition:(s=g)=>{o.beginComposition(s);},endComposition:()=>o.endComposition(),subscribe(s){return o.subscribe(s)},save(){return p(y())},saveSteps(){return p.steps(y())},headerFooterParts:()=>{let s=b$1().parts;return s[s.length-1]??jf(y())},headerFooterPartsBySection:()=>b$1().parts,headerFooterResolutionBySection:()=>b$1().resolution,documentFonts(){return ie&&ie.revision===o.packageRevision||(ie={revision:o.packageRevision,fonts:no(Me(),se(te(),J$1()))}),ie.fonts},symbolFontFamilies(){return le&&le.revision===o.packageRevision||(le={revision:o.packageRevision,fonts:so(Me())}),le.fonts},renderedFontFamilies(){let s=E();return ne&&ne.revision===o.packageRevision&&ne.styles===s||(ne={revision:o.packageRevision,styles:s,families:f(mt(),s,se(te(),J$1()))}),ne.families},rendersText(){return ce&&ce.revision===o.packageRevision||(ce={revision:o.packageRevision,rendersText:lo(Me())}),ce.rendersText},documentStyles(){let s=E(),c=te(),f=J$1();G??=d(s,se(c,f));let h=G;return de??=uo(s,P=>h(P)),de},stylesRoot:()=>E(),documentThemeFonts(){let s=te(),c=J$1();return he??=se(s,c,ft()?.root??null),he},numberingRoot:()=>L(),settingsRoot:()=>J$1(),documentProperties:()=>wo(),trackingSettings:()=>ri(J$1()),documentThemeColors(){let s=te();return we??=Po(s),we},effectiveRunDefaults(s,c){let f=E(),h=te(),P=J$1();G??=d(f,se(h,P));let S=m();if(!xe||xe.revision!==S.revision){let I=new Map;for(let _ of B(S.part))_.kind!=="textValue"&&I.set(_.id,ot(_)??null);xe={revision:S.revision,byId:I};}return G(xe.byId.get(s)??null,c)},documentOutline(){let s=m();return ue&&ue.revision===s.revision||(ue={revision:s.revision,outline:fo(s.part,E())}),ue.outline},findText:xo({revision:()=>o.packageRevision,bodyPart:()=>m().part,currentPackage:y,headerFooterBySection:()=>b$1().resolution}),embeddedFonts:Do,paragraphAnchors:ht,paraIdOf:s=>bo(s,{body:m().part,openStories:o.openStoryParts(),otherStories:z(),normalize:yt}),nodeIdOf:s=>ht().nodeByParaId.get(s.toUpperCase())??null,relationshipTarget:(s,c=g)=>{let f=y(),h=o.partFor(c);return h?Qg(f,h.name,s):null},bookmarks:()=>{let s=o.packageRevision;if(!Pe||Pe.revision!==s){let c=new Map(rg(m().part));for(let f of z())for(let[h,P]of rg(f))c.has(h)||c.set(h,P);Pe={revision:s,index:c};}return Pe.index},ensureHyperlinkRelationship(s,c=g){let f=o.partFor(c);return f?Na(o,()=>{let h=y(),P=Pg(h,s,f.name);return P?(P.pkg!==h&&o.replacePackageShell(P.pkg),P.relationshipId):null},h=>h!==null):null},reviewItems(){let s=e.reviewModel;if(!s)return Dr;let c=m(),f=`${o.packageRevision}:${c.revision}`;if(l&&l.revisionKey===f)return l.items;let h=y(),P=h.parts.get(aa(h,c.part.name)),S=h.parts.get(ba(h,c.part.name)),I={root:c.part.root,commentsPart:P,commentsExtendedPart:S,stylesPart:bd(h),furnitureParts:z(),customNodePayloads:Ao()},_=()=>xt.get(I)??s.collectReviewItems({storyPart:c.part,furnitureParts:I.furnitureParts,stylesPart:I.stylesPart,commentsPart:P,commentsExtendedPart:S,customNodePayloads:I.customNodePayloads}),C={part:c.part,commentsPart:P,commentsExtendedPart:S,currentPackageRevision:o.packageRevision,currentPackage:h,changePackage:x},K,ke=null;if(l&&u&&Qn(u,l,l.items,C))K=l.items;else {let pe=l&&u?Vn(u,l,l.items,C):null,Ce=pe&&l?s.revisionItemsOfParagraph(c.part,pe):null;pe&&l&&Ce&&Yn(l.items,Ce,pe)?(ke=l.paragraphOrder??zj(c.part),K=Jn(l.items,ke,pe,Ce)):(ke=zj(c.part),K=_());}return xt.set(I,K),l={revisionKey:f,bodyRevision:c.revision,packageRevision:o.packageRevision,items:K,paragraphOrder:ke,commentsPart:P,commentsExtendedPart:S,pkg:h},l.items},hasReviewContent(){let s=o.packageRevision;if(!d$1||d$1.revision!==s){let c=bd(y()),f=[m().part,...z(),...c?[c]:[]];d$1={revision:s,present:f.some(h=>Ve(h.root)||rk(h).length>0)};}return d$1.present},replyToComment(s,c,f,h,P,S=g,I,_={}){let C=ca(o,{anchor:{paragraphId:c.paragraphId,start:c.start,end:c.end,...c.endParagraphId===void 0?{}:{endParagraphId:c.endParagraphId}},author:h,text:f,...P===void 0?{}:{date:P},...s===null?{}:{replyToCommentId:s},...I===void 0?{}:{actorId:I}},S,_.historyToken);return C.ok?C.commentId:null},setCommentResolved(s,c,f={}){return da(o,s,c,f.historyToken).ok},deleteComment(s,c=g,f,h){return this.deleteComments([{commentId:s}],c,f,h)},deleteComments(s,c=g,f,h={}){return ea(o,s,c,f,h.historyToken)},insertCustomNode(s,c=g,f={}){return ma(o,s,c,f.historyToken)},removeCustomNode(s,c=g){return na(o,s,c)},sweepCustomNodePayloads(s){return Na(o,()=>{let c=m(),f=ja(o.currentPackage(),c.part.name,s);return f.ok?f.removed.length===0?{ok:true,removed:[]}:(o.replacePackageShell(f.pkg),{ok:true,removed:f.removed}):{ok:false,reason:f.reason}},c=>c.ok&&c.removed.length>0)},ensureListDefinition(s){return Na(o,()=>{let c=Dg(y(),s);return c?(o.replacePackageShell(c.pkg),N=null,M=null,c.numId):null},c=>c!==null)},ensureNumberingLevel(s,c,f){return Na(o,()=>{let h=y(),P=Eg(h,s,c,f);return P?P!==h?(o.replacePackageShell(P),N=null,M=null,{ok:true,changed:true}):{ok:true,changed:false}:{ok:false,changed:false}},h=>h.changed).ok},insertImage(s,c){return o.insertImage(s,c)},replaceImage(s,c,f,h,P,S){return o.replaceImage(s,c,f,h,P,S)},deleteImage(s,c){return o.deleteImage(s,c)},deleteImageTracked(s,c,f){return o.deleteImageTracked(s,c,f)},applyImageProperties(s,c){return o.applyImageProperties(s,c)},applyFragmentPaste(s,c){return o.applyFragmentPaste(s,c)}}};return El(Pt.session,o),Pt}var Br=g.projection;function Gr(t,e,n){let r=t.filter(a=>a.localName!==e);return r.length!==t.length?r:[...r,n?{localName:e,attributes:n}:{localName:e}]}function Kr(t,e,n={}){let r=null,a=false,o=()=>n.onChange?.(i()),i=()=>({revision:e.revision(),canUndo:e.canUndo(),canRedo:e.canRedo(),lastRejection:r}),l=p=>{a=true;let g=u.state.tr.replaceWith(0,u.state.doc.content.size,p.content);g.setMeta("addToHistory",false),u.dispatch(g),a=false;},d=p=>()=>(p()&&(l(e.projectDoc()),o()),true),u=new EditorView(t,{state:EditorState.create({doc:e.projectDoc(),plugins:[keymap({...baseKeymap,Home:selectTextblockStart,End:selectTextblockEnd,"Mod-z":d(()=>e.undo()!==null),"Mod-y":d(()=>e.redo()!==null),"Shift-Mod-z":d(()=>e.redo()!==null),"Mod-b":(p,g)=>y(p,g,"b"),"Mod-i":(p,g)=>y(p,g,"i"),"Mod-u":(p,g)=>y(p,g,"u",{val:"single"})})]}),editable:()=>e.editable,handleDOMEvents:{keydown:p=>(x(p),false),beforeinput:(p,g)=>{let k=g;if(p.composing)return false;x(p);let O=k.inputType;if(O==="insertText"&&k.data!=null){k.preventDefault();let{from:b,to:R}=p.state.selection;return p.dispatch(p.state.tr.insertText(k.data,b,R)),true}if(O==="deleteContentBackward"){k.preventDefault();let{from:b,empty:R}=p.state.selection;return R?b>0?p.dispatch(p.state.tr.delete(b-1,b)):joinBackward(p.state,p.dispatch):deleteSelection(p.state,p.dispatch),true}if(O==="deleteContentForward"){k.preventDefault();let{from:b,to:R,empty:v}=p.state.selection;return v?R<p.state.doc.content.size?p.dispatch(p.state.tr.delete(b,b+1)):joinForward(p.state,p.dispatch):deleteSelection(p.state,p.dispatch),true}return O==="insertParagraph"?(k.preventDefault(),splitBlock(p.state,p.dispatch),true):false},compositionstart:()=>(e.beginComposition(),false),compositionend:()=>(e.endComposition(),o(),false)},dispatchTransaction(p){let g=u.state.apply(p);if(a||!p.docChanged){u.updateState(g);return}let k=e.applyPmDoc(g.doc);if(k.rejected){r=String(k.reason??"rejected"),u.updateState(g),l(e.projectDoc()),o();return}r=null,u.updateState(k.committed&&e.lastCommitWasStructural()?m(g):g),o();}});function x(p){if(p.composing||a)return;let g=p.dom.ownerDocument.getSelection(),k=g?.anchorNode,O=g?.focusNode;if(!(!g||!k||!O)&&!(!p.dom.contains(k)||!p.dom.contains(O)))try{let b=p.posAtDOM(k,g.anchorOffset),R=p.posAtDOM(O,g.focusOffset),v=p.state.selection;if(v.anchor===b&&v.head===R)return;let T=TextSelection.create(p.state.doc,b,R);p.dispatch(p.state.tr.setSelection(T).setMeta("addToHistory",!1));}catch{}}function m(p){let g=e.paragraphIds(),k=p.tr,O=false,b=0;return p.doc.forEach((R,v)=>{let T=g[b];b+=1,!(R.type.name!=="paragraph"||T===void 0)&&R.attrs.nodeId!==T&&(k=k.setNodeMarkup(v,void 0,{...R.attrs,nodeId:T}),O=true);}),O?p.apply(k.setMeta("addToHistory",false)):p}function y(p,g,k,O){let b=w.marks.runProps;if(!g)return true;let{from:R,to:v,empty:T}=p.selection;if(T)return true;let N=p.doc.resolve(R).marks().find(ee=>ee.type===b)?.attrs.props??[],M=Gr(N,k,O),L=p.tr;return L.removeMark(R,v,b),M.length>0&&L.addMark(R,v,b.create({props:M})),g(L),true}return {view:u,state:i,undo:()=>d(()=>e.undo()!==null)(),redo:()=>d(()=>e.redo()!==null)(),toggleRunProperty(p,g){y(u.state,u.dispatch.bind(u),p,g);},destroy:()=>u.destroy()}}export{w as a,Ge as b,ae as c,B as d,q as e,Xe as f,Vo as g,Qe as h,ot as i,Ar as j,Fr as k,Br as l,Kr as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkDOHF6FA7_cjs=require('./chunk-DOHF6FA7.cjs'),chunkT6K2QYNZ_cjs=require('./chunk-T6K2QYNZ.cjs'),chunkOSFOJTHU_cjs=require('./chunk-OSFOJTHU.cjs');var Kt=Object.freeze({}),zt=Object.freeze([]);function Ht(e){let t=Object.keys(e);if(t.length===0)return Kt;let r={};for(let n of t){let o=e[n];o!==void 0&&(r[n]=o);}return Object.freeze(r)}function Wt(e){let t=new Map(chunkOSFOJTHU_cjs.og(e.part())),r=new Set([e.part()]);for(let o of e.headerFooterPartsBySection())for(let a of [o.headers,o.footers])for(let i of a.values())if(!r.has(i)){r.add(i);for(let[s,c]of chunkOSFOJTHU_cjs.og(i))t.has(s)||t.set(s,c);}let n=e.currentPackage();for(let o of ["footnote","endnote"]){let a=chunkOSFOJTHU_cjs.ch(n,o);if(!(!a||r.has(a))){r.add(a);for(let[i,s]of chunkOSFOJTHU_cjs.og(a))t.has(i)||t.set(i,s);}}return t}function $t(e,t){let r=chunkDOHF6FA7_cjs.ne(e,t);if(!r)return null;let n=e.pages[r.pageIndex];if(!n)return null;let o=chunkDOHF6FA7_cjs.xe(n),a=chunkDOHF6FA7_cjs.ze(e,t.paragraphId,r.pageIndex),i=Object.freeze({x:r.x+a.x,y:r.y+a.y,height:r.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:r.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function Ut(e,t){let r=[];for(let n of t.values()){let o=$t(e,n);o&&r.push(o);}return r.length===0?zt:Object.freeze(r)}function ft(e,t){return {documentMetadata:Ht(e.documentProperties()),destinations:Ut(t,Wt(e))}}function Er(e,t){let r=e.destinations;if(r){for(let n of r)if(n.anchor.name===t)return n}}function yt(e={}){return Object.freeze({async decode(t,r,n){let o=chunkOSFOJTHU_cjs.ie(t,r);if(!o)throw new Error(`Unsupported or malformed ${r} image`);if(o.pixelWidth>n.maxDimension||o.pixelHeight>n.maxDimension||o.pixelWidth>n.maxPixels/o.pixelHeight)throw new Error("Image dimensions exceed resource limits");return Object.freeze({pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight,dpiX:o.dpiX??96,dpiY:o.dpiY??96})},...e.convertPreserved?{convertPreserved:e.convertPreserved}:{}})}var gt=new WeakMap;function ht(e,t){let r=gt.get(e);r||(r=chunkDOHF6FA7_cjs.Ke(e),gt.set(e,r));let n=r.styleCascade(),o=new Set;if(t===e.part())for(let c of chunkDOHF6FA7_cjs.qd(t,void 0,void 0,n,r.numberingIndex()))for(let h of chunkDOHF6FA7_cjs.ob(c)?.slice(0,-1)??[])o.add(h.paragraph.id);let a=c=>{if(c.kind==="textValue")return false;let h=c.children.find(d=>d.kind!=="textValue"&&d.namespaceUri===chunkOSFOJTHU_cjs.la&&d.localName==="pPr"),p=h?.kind!=="textValue"?h?.children.find(d=>d.kind!=="textValue"&&d.namespaceUri===chunkOSFOJTHU_cjs.la&&d.localName==="rPr"):void 0;return p!==void 0&&chunkOSFOJTHU_cjs.Aa(p,"vanish")},i=0,s=(c,h)=>{if(++i>chunkOSFOJTHU_cjs.Hd||h>chunkOSFOJTHU_cjs.$||c.kind==="textValue")return false;if(c.kind==="paragraph"&&!o.has(c.id)&&(chunkDOHF6FA7_cjs.od(c,n,false)||a(c))&&chunkOSFOJTHU_cjs.jg(c).length>0)return true;for(let p of c.children){if(i>=chunkOSFOJTHU_cjs.Hd)break;if(s(p,h+1))return true}return false};return s(t.root,0)}var wt=new WeakMap,Gt=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function Yt(e,t){let r=wt.get(e.root);if(r&&r.stylesPart===t)return r.codes;let n=chunkOSFOJTHU_cjs.ab(t),o=new Set,a=[{node:e.root,scope:chunkOSFOJTHU_cjs.td(),depth:0,mcSelected:false,framed:false}],i=0;for(;a.length;){let{node:c,scope:h,depth:p,mcSelected:d,framed:y}=a.pop();if(++i>chunkOSFOJTHU_cjs.Hd||p>chunkOSFOJTHU_cjs.$){o.add("scan-limit");break}if(c.kind==="textValue")continue;if(i+a.length+c.children.length>chunkOSFOJTHU_cjs.Hd){o.add("scan-limit");break}let g=chunkOSFOJTHU_cjs.sd(h,c),w=y||n(c),l=chunkOSFOJTHU_cjs.rd(c)?c:void 0;if(l){if(chunkOSFOJTHU_cjs.Ld(l,g).drawing)continue;let m=chunkOSFOJTHU_cjs.Kd(l,g);m.refused&&o.add("scan-limit"),m.branch&&a.push({node:m.branch,scope:g,depth:p+1,mcSelected:true,framed:w});continue}if(!d&&chunkOSFOJTHU_cjs.od(c)&&!(w&&c.localName==="object")){let m=chunkOSFOJTHU_cjs.qd(c,e.name)?.textboxStory?.content;m&&a.push({node:m,scope:g,depth:p+1,mcSelected:d,framed:w});continue}if(c.namespaceUri==="urn:schemas-microsoft-com:vml"&&c.localName==="textbox"){o.add("legacy-textbox");continue}c.namespaceUri==="urn:schemas-microsoft-com:vml"&&Gt.has(c.localName)&&!c.children.some(m=>m.kind!=="textValue"&&m.namespaceUri==="urn:schemas-microsoft-com:vml"&&m.localName==="textbox")&&o.add("legacy-drawing");for(let m of c.children)a.push({node:m,scope:g,depth:p+1,mcSelected:d,framed:w});}let s=Object.freeze([...o]);return wt.set(e.root,{stylesPart:t,codes:s}),s}function xt(e){let t=new Set([e.part()]);for(let r of e.headerFooterPartsBySection())for(let n of [r.headers,r.footers])for(let o of n.values())t.add(o);for(let r of ["footnote","endnote"]){let n=chunkOSFOJTHU_cjs.ch(e.currentPackage(),r);n&&t.add(n);}return Object.freeze([...t].flatMap(r=>[...Yt(r,chunkOSFOJTHU_cjs.bd(e.currentPackage())),...ht(e,r)?["unsupported-style-separator"]:[]].map(n=>Object.freeze({code:n,partName:r.name}))))}function bt(e){return chunkOSFOJTHU_cjs.kf(e.fieldResults,()=>chunkDOHF6FA7_cjs.ff(Xt(e)))}function Xt(e){return chunkDOHF6FA7_cjs.gf(e.fieldResults,qt(e))}function*qt(e){let t=e.defaultTabStopPt?.(),r=e.view.part().name,n={view:e.view,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,compatibilityMode:e.compatibilityMode?.(),inlineDrawingLayoutForPart:e.inlineDrawingLayoutForPart,drawingTokenForParagraphForPart:e.drawingTokenForParagraphForPart,drawingLayoutEpochForPart:e.drawingLayoutEpochForPart,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter},o=chunkDOHF6FA7_cjs.Ze(n),a={view:e.view,revision:e.revision,measurer:e.measurer,cache:e.cache,session:e.session,producer:e.producer,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,furniture:e.furniture,compatibilityMode:e.compatibilityMode,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,fieldResults:e.fieldResults,inlineDrawingLayout:e.inlineDrawingLayout,drawingTokenForParagraph:e.drawingTokenForParagraph,drawingLayoutEpoch:e.drawingLayoutEpoch,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter,bodyBlockLimit:e.bodyBlockLimit},i={measurer:a.measurer,cache:a.cache,session:a.session,producer:a.producer,styleCascade:a.styleCascade?.(),defaultTabStopPt:a.defaultTabStopPt,compatibilityMode:a.compatibilityMode?.(),numberingIndex:a.numberingIndex?.(),sectionFurniture:a.furniture.sectionFurniture(),furniture:a.furniture.furniture(),evenAndOddHeaders:a.view.headerFooterPartsBySection()[0]?.evenAndOddHeaders===true,projectLink:a.linkProjectors.projectLink,projectFieldLink:a.projectFieldLink,showFieldCodes:a.showFieldCodes,fieldResults:a.fieldResults,documentProperties:a.view.documentProperties(),inlineDrawingLayout:a.inlineDrawingLayout,drawingTokenForParagraph:a.drawingTokenForParagraph,drawingLayoutEpoch:a.drawingLayoutEpoch,projectionTokenForParagraph:s=>a.linkProjectors.tokenForParagraphForPart(r,s),projectionTokenForTable:s=>a.linkProjectors.tokenForTableForPart(r,s),projectionEpoch:a.linkProjectors.epochForPart(r),notes:o,displayMode:a.displayMode,revisionAuthorFilter:a.revisionAuthorFilter,bodyBlockLimit:a.bodyBlockLimit};return yield*chunkDOHF6FA7_cjs.If(a.view.part(),a.revision,i)}var Jt=65536;function St(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function Qt(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function Zt(e,t,r){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===r:true}function er(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let r=null;return chunkDOHF6FA7_cjs.Ba(e,n=>{if(r||!Zt(t,n.story,n.noteScopeId))return;let o=n.story==="header"||n.story==="footer"?a=>chunkDOHF6FA7_cjs.wa(a,n.origin,{x:e.box.x,y:e.box.y}):void 0;chunkDOHF6FA7_cjs.Fa(n.host,(a,i)=>{if(r||i.textboxDepth===0)return;let s=i.textboxPath.map(c=>c.drawingNodeId);Qt(s,t.textboxPath)&&(r=St(e,i.storyOrigin));},n.origin,o);}),r}function tr(e,t){if(t.story==="textbox")return er(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?chunkDOHF6FA7_cjs.ye(e,e.header.box):{x:0,y:0};case "footer":return e.footer?chunkDOHF6FA7_cjs.ye(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let n=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return n?chunkDOHF6FA7_cjs.ye(e,n.box):{x:0,y:0}}case "note-separator":{let r=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes,n=r?.separator?.box;return r?.continuationNotice&&chunkDOHF6FA7_cjs.Fa(r.continuationNotice,o=>{o.paragraphId===t.source.start.paragraphId&&(n=r.continuationNotice.box);}),n?chunkDOHF6FA7_cjs.ye(e,n):{x:0,y:0}}default:return {x:0,y:0}}}function It(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function Rt(e,t){let r=chunkDOHF6FA7_cjs.xe(e);return Object.freeze({x:r.x+t.x,y:r.y+t.y,width:t.width,height:t.height})}function rr(e,t){let r=chunkDOHF6FA7_cjs.ne(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!r||r.pageIndex!==t.pageIndex)return;let n=e.pages[r.pageIndex];if(!n)return;let o=tr(n,t),a=Object.freeze([It({x:r.x+o.x,y:r.y+o.y,width:0,height:r.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>Rt(n,i)))})}function nr(e,t,r){let n=r.filter(i=>i.pageIndex===t.pageIndex);if(n.length===0)return Ot(t)?rr(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(n.map(i=>It(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>Rt(o,i)))})}function Ot(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function vt(e,t){return `${e}\0${t}`}function or(e,t,r){let n=Math.max(e.start,t.offset),o=Math.min(e.end,r.offset);return o>n?{start:n,end:o}:null}function ar(e,t){let r=new Map,n=new Map,o=new Set,a=0;let i=(s,c)=>{if(a>=Jt)return false;a+=1;let h=vt(s.pageIndex,c),p=n.get(h);return p?p.push(s):n.set(h,[s]),true};for(let[s,c]of t.entries())for(let[h,p]of c.occurrences.entries()){if(Ot(p)||p.source.start.paragraphId!==p.source.end.paragraphId)continue;o.add(p.pageIndex);let d=`${s}\0${h}`,y={paragraphId:p.source.start.paragraphId,offset:p.source.start.offset},g={paragraphId:p.source.end.paragraphId,offset:p.source.end.offset},w=y.offset<=g.offset?{from:y,to:g}:{from:g,to:y};i({key:d,from:w.from,to:w.to,pageIndex:p.pageIndex},w.from.paragraphId);}if(n.size===0)return r;for(let s of e.pages)o.has(s.index)&&chunkDOHF6FA7_cjs.Ba(s,c=>{let h=c.story==="header"||c.story==="footer"?p=>chunkDOHF6FA7_cjs.wa(p,c.origin,{x:s.box.x,y:s.box.y}):void 0;chunkDOHF6FA7_cjs.Fa(c.host,(p,d)=>{let y=St(s,d.storyOrigin);for(let g of p.lines)for(let w of chunkDOHF6FA7_cjs.La(g)){let l=n.get(vt(s.index,w.paragraphId));if(l)for(let m of l){let b=or(w,m.from,m.to);if(!b)continue;let x=chunkDOHF6FA7_cjs.ge(g,b.start,void 0,w),v=chunkDOHF6FA7_cjs.ge(g,b.end,void 0,w,b.end>b.start),I=r.get(m.key)??[];I.push({pageIndex:s.index,x:Math.min(x,v)+y.x,y:g.box.y+y.y,width:Math.abs(v-x),height:g.box.height}),r.set(m.key,I);}}},c.origin,h);});return r}function kt(e,t){let r=false;for(let o of t)if(o.occurrences.length!==0){r=true;break}if(!r)return t;let n=ar(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,c)=>{let h=`${a}\0${c}`,p=nr(e,s,n.get(h)??[]);return p?{...s,geometry:p}:s});return {...o,occurrences:Object.freeze(i)}})}function ir(e){let t=new Map,r=[{node:e.root,depth:0}];for(;r.length>0;){let{node:n,depth:o}=r.pop();if(!(n.kind==="textValue"||o>64)){n.kind==="paragraph"&&!t.has(n.id)&&t.set(n.id,t.size);for(let a=n.children.length-1;a>=0;a-=1)r.push({node:n.children[a],depth:o+1});}}return t}function Mt(){let e=new Map,t=n=>{let o=e.get(n.root);if(o)return o;let a=ir(n);return e.set(n.root,a),a},r={retainRevisionItems:false,revisionSites:chunkOSFOJTHU_cjs.$j,locations:chunkOSFOJTHU_cjs.ek,commentAnchors:chunkOSFOJTHU_cjs._h,deepOrder:t};return Object.freeze({collectReviewItems:n=>chunkOSFOJTHU_cjs.ik(n,r),deepParagraphOrderOfPart:t})}function sr(e,t){if(t)return true;let r=e.map(n=>n.root);for(;r.length>0;){let n=r.pop();if(chunkOSFOJTHU_cjs.Zj(n))return true;if(n.kind!=="textValue")for(let o of n.children)r.push(o);}return false}function cr(e,t){let r=[],n=new Set([t.name]),o=a=>{!a||n.has(a.name)||(n.add(a.name),r.push(a));};for(let a of chunkOSFOJTHU_cjs.ff(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(chunkOSFOJTHU_cjs.ch(e,"footnote")),o(chunkOSFOJTHU_cjs.ch(e,"endnote")),r}function dr(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return chunkOSFOJTHU_cjs.ch(e,"footnote")?.name??null;case "endnote":return chunkOSFOJTHU_cjs.ch(e,"endnote")?.name??null;case "note-separator":return chunkOSFOJTHU_cjs.ch(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function ur(e,t){let r=new Map;for(let n of e){let o=t.get(n.partName),a=o?.get(n.start.paragraphId),i=o?.get(n.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),c=Math.max(a,i),h=r.get(n.partName);r.set(n.partName,{lower:Math.min(h?.lower??s,s),upper:Math.max(h?.upper??c,c)});}return r}function lr(e,t,r,n,o){let a=new Map(r.map(d=>[d.name,o(d)])),i=ur(n,a),s=new Map,c=new Map,h=(d,y,g,w,l,m,b)=>{let x=a.get(d)?.get(l),v=i.get(d);if(x===void 0||!v||x<v.lower||x>v.upper)return;let I=s.get(d)??new Map;s.set(d,I);let V=c.get(d)??new Map;c.set(d,V);let W=JSON.stringify([y.story,y.noteScopeId,y.noteAreaKind]),K=g==="textbox"?JSON.stringify([W,"textbox",w]):W,$=I.get(l)??[],j=`${l}\0${y.page.index}\0${K}`,T=V.get(j);T||(T={pageIndex:y.page.index,story:g,rootStory:y.story,textboxPath:w,noteScopeId:y.noteScopeId,noteAreaKind:y.noteAreaKind,laneKey:K,intervals:[],intervalKeys:new Set},V.set(j,T),$.push(T),I.set(l,$));let U=`${m}\0${b}`;T.intervalKeys?.has(U)||(T.intervalKeys?.add(U),T.intervals.push({start:m,end:b}));};chunkDOHF6FA7_cjs.Ca(e,d=>{let y=dr(t,d);!y||!i.has(y)||chunkDOHF6FA7_cjs.Fa(d.host,(g,w)=>{let l=w.textboxDepth>0?"textbox":d.story,m=w.textboxPath.map(x=>x.drawingNodeId),b=[];for(let x of g.lines){for(let v of x.spans)b.push(v.range);for(let v of x.drawings??[])b.push({paragraphId:v.paragraphId,start:v.start,end:v.start+1});}b.length===0&&b.push({paragraphId:g.range.paragraphId,start:g.range.start,end:g.range.end});for(let{paragraphId:x,start:v,end:I}of b)h(y,d,l,m,x,v,I);});}),chunkDOHF6FA7_cjs.Ea(e,d=>{let y=d.drawing.ownerPartName;d.drawing.accessibility.hidden||!i.has(y)||h(y,d.root,d.story,d.textboxPath.map(g=>g.drawingNodeId),d.drawing.paragraphId,d.drawing.start,d.drawing.start+1);});for(let d of s.values())for(let y of d.values())for(let g of y){g.intervals.sort((l,m)=>l.start-m.start||l.end-m.end);let w=[];for(let l of g.intervals){let m=w.at(-1);m&&l.start<=m.end?m.end=Math.max(m.end,l.end):w.push({...l});}g.intervals.splice(0,g.intervals.length,...w),g.intervalKeys=void 0;}let p=new Map;for(let[d,y]of s){let g=a.get(d);if(!g)continue;let w=[];for(let[l,m]of y){let b=g.get(l);b!==void 0&&w.push({paragraphId:l,position:b,laneKeys:new Set(m.map(({laneKey:x})=>x))});}w.sort((l,m)=>l.position-m.position),p.set(d,w);}return {byPart:s,orderByPart:a,visibleByPart:p}}function Dt(e,t){let r=0,n=e.length;for(;r<n;){let o=r+n>>>1;e[o].position<t?r=o+1:n=o;}return r}function pr(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let r=t.orderByPart.get(e.partName),n=t.visibleByPart.get(e.partName),o=r?.get(e.start.paragraphId),a=r?.get(e.end.paragraphId);if(!r||!n||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),c=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:d})=>d)??[]),h=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:d})=>d)??[]),p=new Set([...c].filter(d=>h.has(d)));return p.size===0?[e.start.paragraphId,e.end.paragraphId]:n.slice(Dt(n,i),Dt(n,s+1)).filter(d=>[...d.laneKeys].some(y=>p.has(y))).map(d=>d.paragraphId)}function mr(e,t,r,n){return n?e.intervals.filter(a=>a.start<=t&&t<a.end).length>0?[{start:t,end:t}]:[]:e.intervals.flatMap(o=>{if(o.start===o.end)return [];let a={start:Math.max(o.start,t),end:Math.min(o.end,r)};return a.end>a.start?[a]:[]})}function fr(e,t){let r=Number.NEGATIVE_INFINITY;for(let n of e)for(let o of n.intervals)r=Math.max(r,o.end);return t!==r?new Set:new Set(e.filter(n=>n.intervals.some(o=>o.end===r)))}function Lt(e,t,r){let n=[],o=new Set;for(let[a,i]of e.entries()){let s=r===void 0?void 0:r===null?"neutral":a<r?"replaced":"replacement";for(let c of pr(i,t)){let h=t.byPart.get(i.partName)?.get(c)??[],d=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,y=c===i.start.paragraphId?i.start.offset:0,g=c===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,w=d?fr(h,y):new Set;for(let l of h){let m=mr(l,y,g,d);d&&m.length===0&&w.has(l)&&(m=[{start:y,end:y}]);for(let b of m){let x=`${l.pageIndex}\0${l.story}\0${l.noteScopeId??""}\0${l.noteAreaKind??""}\0${l.textboxPath.join("\0")}\0${i.partName}\0${c}\0${b.start}\0${b.end}\0${s??""}`;o.has(x)||(o.add(x),n.push({pageIndex:l.pageIndex,physicalPageNumber:l.pageIndex+1,story:l.story,rootStory:l.rootStory,textboxPath:l.textboxPath,noteScopeId:l.noteScopeId,noteAreaKind:l.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:c,offset:b.start},end:{paragraphId:c,offset:b.end}}}));}}}}return n}function At(e,t){let r=2166136261,n=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);r=Math.imul(r^a,16777619)>>>0,n=Math.imul(n^a+o,2246822507)>>>0,n^=n>>>13;}return `${e}_${t.length.toString(36)}_${r.toString(36)}_${n.toString(36)}`}function Et(e,t,r=At){let n=new Map;for(let a of t){let i=r(e,a),s=n.get(i)??new Set;s.add(a),n.set(i,s);}let o=new Map;for(let[a,i]of n){let s=[...i].sort();for(let[c,h]of s.entries())o.set(h,s.length===1?a:`${a}_${c.toString(36)}`);}return o}function yr(e){let t=new Set,r=new Set;for(let n of e){if(n.kind==="comment"){t.add(n.id),n.parentId!==void 0&&t.add(n.parentId),n.parentRevisionId!==void 0&&r.add(n.parentRevisionId);for(let o of n.replyIds)t.add(o);}if(n.kind==="revision"){r.add(n.id),n.pairedWith!==void 0&&r.add(n.pairedWith);for(let o of n.replyIds)t.add(o);}}return {comment:Et("comment",t),revision:Et("change",r)}}function _(e,t,r){return e.get(r)??At(t,r)}function gr(e,t,r){return e.kind==="revision"?{kind:"tracked-change",id:_(r.revision,"change",e.id),change:e.revisionKind,...e.structuralChanges?{structuralChanges:e.structuralChanges}:{},...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:chunkOSFOJTHU_cjs.jb(e.text),replacedText:chunkOSFOJTHU_cjs.jb(e.replacedText),nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:_(r.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(n=>_(r.comment,"comment",n)),occurrences:t?Lt(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]}:e.kind!=="comment"?null:{kind:"comment",id:_(r.comment,"comment",e.id),author:e.comment.author,initials:chunkOSFOJTHU_cjs.Oj(e.comment),...e.comment.date!==void 0?{date:e.comment.date}:{},text:chunkOSFOJTHU_cjs.Mj(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:_(r.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:_(r.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(n=>_(r.comment,"comment",n)),orphaned:e.orphaned,occurrences:t&&e.range?Lt([e.range],t):[]}}function Ft(e,t){let r=t.parts.get(t.mainDocumentPart);if(!r)return [];let n=cr(t,r),o=[r,...n],a=t.parts.get(chunkT6K2QYNZ_cjs.aa(t,r.name));if(!sr(o,a))return [];let i=Mt(),s=i.collectReviewItems({storyPart:r,furnitureParts:n,commentsPart:a,commentsExtendedPart:t.parts.get(chunkT6K2QYNZ_cjs.ba(t,r.name))});if(s.length===0)return [];let c=s.flatMap(d=>chunkOSFOJTHU_cjs.yj(d)),h=c.length>0?lr(e,t,o,c,i.deepParagraphOrderOfPart):null,p=yr(s);return s.map(d=>gr(d,h,p)).filter(d=>d!==null)}var hr=new Set(["part","validatedHandle"]);function Tt(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function q(e,t,r,n,o){if(!(n!==void 0&&hr.has(n))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(r.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),r.add(e);try{if(Array.isArray(e)){for(let a of e)q(a,t,r,void 0,o);Object.freeze(e);return}if(!Tt(e))throw new TypeError("Semantic layout publication encountered a non-record value");for(let a of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,a);if(i){if(!("value"in i))throw new TypeError("Semantic layout publication encountered an accessor property");q(i.value,t,r,a,o);}}Object.freeze(e);}finally{r.delete(e);}}}}}function Ct(e){if(!Tt(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let n of e.pages)if(!(n===null||typeof n!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(n,o);if(!a||!("value"in a))continue;let i=a.value;if(i===null||typeof i!="object"||t.has(i))continue;let s=new Set;s.add(e),q(i,new Set,s,o),t.add(i);}let r=(n,o)=>{let a=new Set;for(let i of n){let s=new Set;s.add(e),q(i,a,s,void 0,o);}Object.freeze(n);};for(let n of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,n);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(n==="pages"&&Array.isArray(o.value)){r(o.value,t);continue}if(n==="reviewArtifacts"&&Array.isArray(o.value)){r(o.value);continue}let a=new Set;a.add(e),q(o.value,new Set,a,n);}return Object.freeze(e),e}var wr=Object.freeze([]),k=class extends Error{constructor(r,n,o){super(n,o);this.code=r;this.name="ExportResourceError";}code};function xr(e){try{return e instanceof k}catch{return false}}function br(e){try{return e instanceof chunkDOHF6FA7_cjs.Ue}catch{return false}}function Pr(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function vr(e){if(xr(e))return e;let t=br(e),r=Pr(e),n=r?`: ${r}`:"",o=new k(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${n}`:`Export layout failed${n}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function Sr(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("resourceTimeoutMs must be a positive finite number");return Math.max(1,e)}function Nt(e){if(e==="all-markup"||e==="simple-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, simple-markup, proposed, or original")}var Ir=50,ye=64;function Rr(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Or(e){let t=false;return chunkDOHF6FA7_cjs.Ea(e,({drawing:r})=>{Rr(r.resource)&&(t=true);}),t}function jt(e){return !ArrayBuffer.isView(e)}function Yn(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};if(t.revisionAuthorSlots!==void 0&&(!t.revisionAuthorSlots||typeof t.revisionAuthorSlots!="object"||Array.isArray(t.revisionAuthorSlots)))throw new TypeError("revisionAuthorSlots must map author names to nonnegative safe integers.");let r=t.revisionAuthorSlots===void 0?void 0:Object.freeze(Object.fromEntries(Object.entries(t.revisionAuthorSlots).map(([f,P])=>{if(!Number.isSafeInteger(P)||P<0)throw new TypeError("revisionAuthorSlots values must be nonnegative safe integers.");return [f,P]}))),n=t.revisionMarkup?chunkDOHF6FA7_cjs.Va(t.revisionMarkup):void 0,o=n?{revisionMarkup:n,hiddenAuthors:new Set,cacheKey:JSON.stringify(n)}:void 0,a=Nt(t.displayMode??chunkDOHF6FA7_cjs.Za),i=jt(e),s=jt(e)?{ok:true,view:e}:chunkT6K2QYNZ_cjs.Ba(e);if(!s.ok)return s;let c=s.view,h=t.reuseAcrossRevisions??i,p=Sr(t.resourceTimeoutMs),d=t.measurer??chunkDOHF6FA7_cjs.ha(),y=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),g=chunkDOHF6FA7_cjs.Ge({retainAcrossPasses:h}),w=0,l=new Set,m=()=>{w+=1;for(let f of l)f();l.clear();},b=chunkDOHF6FA7_cjs.Me({session:c,decodePort:t.imageDecodePort??yt(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:m}),x={view:c,measurer:d,paragraphCache:g,sessions:new Map,completed:new Map,inFlight:new Map,styles:chunkDOHF6FA7_cjs.Ke(c),fieldLinks:new Map,links:chunkDOHF6FA7_cjs.$e(c),drawingBundle:b,furniture:new Map},v=new AbortController,I=t.signal,V=false,W=()=>V?new k("aborted","Export resource settlement was aborted"):new k("disposed","Export session has been disposed"),K=()=>{V=true,$();};function $(){let f=x;if(f){x=null,I?.removeEventListener("abort",K),v.abort(I?.reason),f.drawingBundle.dispose(),f.paragraphCache.clear();for(let P of f.completed.values())chunkDOHF6FA7_cjs.hc(P.internal),chunkDOHF6FA7_cjs.hf(P.internal);for(let P of f.fieldLinks.values())P.registry.clear();f.fieldLinks.clear(),f.completed.clear(),f.inFlight.clear(),f.furniture.clear(),f.sessions.clear(),m();}}I?.addEventListener("abort",K,{once:true}),I?.aborted&&K();let j=()=>{if(!x)throw W();if(v.signal.aborted)throw new k("aborted","Export resource settlement was aborted")},T=(f,P,D,u)=>w!==f||x?.view.packageRevision()!==P||x?.view.currentPackage()!==D?Promise.resolve():(j(),new Promise((B,O)=>{let M=false,C,L=A=>{M||(M=true,C!==void 0&&clearTimeout(C),l.delete(E),v.signal.removeEventListener("abort",G),A?O(A):B());},E=()=>L(),G=()=>L(new k("aborted","Export resource settlement was aborted")),Y=()=>{if(x?.view.packageRevision()!==P||x?.view.currentPackage()!==D){L();return}let A=u-Date.now();if(A<=0){L(new k("timedOut",`Image resources did not settle within ${p}ms`));return}C=setTimeout(Y,Math.min(Ir,A));};if(l.add(E),v.signal.addEventListener("abort",G,{once:true}),w!==f||x?.view.packageRevision()!==P||x?.view.currentPackage()!==D){L();return}Y();})),U=async(f,P=0,D=Date.now()+p)=>{if(j(),Date.now()>=D)throw new k("timedOut",`Export layout did not stabilize within ${p}ms`);let u=x,B=D,O=u.view.packageRevision(),M=u.view.currentPackage(),C=u.completed.get(f);if(C&&C.revision===O&&C.pkg===M)return C.published;let L=()=>{if(u.view.packageRevision()===O&&u.view.currentPackage()===M)return null;if(P>=ye-1)throw new k("nonConvergent","Document revision did not stabilize during export layout");return U(f,P+1,B)},E=u.fieldLinks.get(f);if(!E||E.revision!==O||E.pkg!==M){let R=E?.registry??chunkDOHF6FA7_cjs.af();R.clear(),E={revision:O,pkg:M,registry:R},u.fieldLinks.set(f,E),u.furniture.delete(f);}let G=E.registry,Y=u.sessions.get(f)??chunkDOHF6FA7_cjs.Gf();u.sessions.set(f,Y);let A=u.furniture.get(f);A||(A=chunkDOHF6FA7_cjs.Ye({view:u.view,measurer:u.measurer,producer:y,cache:u.paragraphCache,styleCascade:u.styles.styleCascade,numberingIndex:u.styles.numberingIndex,defaultTabStopPt:u.styles.defaultTabStopPt,compatibilityMode:u.styles.compatibilityMode,displayMode:chunkDOHF6FA7_cjs.Ya(f),revisionAuthorFilter:f==="simple-markup"?chunkDOHF6FA7_cjs._a(o):o,showFieldCodes:false,inlineDrawingLayoutForPart:R=>u.drawingBundle.contextForPart(R),drawingLayoutTokenForPart:R=>u.drawingBundle.cacheTokenForPart(R),drawingTokenForParagraphForPart:(R,ae)=>u.drawingBundle.drawingTokenForParagraph(ae,R),linkProjectors:u.links,projectFieldLink:R=>G.project(R)}),u.furniture.set(f,A));for(let R=0;R<ye;R+=1){let ae=w;u.drawingBundle.sync(u.view);let he=L();if(he)return he;let N=bt({view:u.view,revision:u.view.packageRevision(),measurer:u.measurer,cache:u.paragraphCache,session:Y,producer:y,styleCascade:u.styles.styleCascade,defaultTabStopPt:u.styles.defaultTabStopPt,numberingIndex:u.styles.numberingIndex,furniture:A,compatibilityMode:u.styles.compatibilityMode,linkProjectors:u.links,projectFieldLink:S=>G.project(S),inlineDrawingLayout:u.drawingBundle.bodyContext,inlineDrawingLayoutForPart:S=>u.drawingBundle.contextForPart(S),drawingTokenForParagraph:S=>u.drawingBundle.drawingTokenForParagraph(S,u.view.part().name),drawingTokenForParagraphForPart:(S,J)=>u.drawingBundle.drawingTokenForParagraph(J,S),drawingLayoutEpoch:u.drawingBundle.cacheTokenForPart(u.view.part().name),drawingLayoutEpochForPart:S=>u.drawingBundle.cacheTokenForPart(S),displayMode:chunkDOHF6FA7_cjs.Ya(f),revisionAuthorFilter:f==="simple-markup"?chunkDOHF6FA7_cjs._a(o):o,showFieldCodes:false,bodyBlockLimit:void 0,fieldResults:"atomic"});if(!Or(N)){let S=L();if(S)return S;h||(chunkDOHF6FA7_cjs.hc(N),chunkDOHF6FA7_cjs.hf(N),u.paragraphCache.clear(),u.sessions.delete(f),u.furniture.delete(f));let J=Ft(N,M),Bt=J.length===0?wr:Object.freeze(kt(N,J)),_t=ft(u.view,N),Vt={...N,..._t,reviewDisplayMode:f,...n?{revisionMarkup:n}:{},...r?{revisionAuthorSlots:r}:{},facingPages:[...M.parts.values()].some(Pe=>Pe.root.localName==="settings"&&Pe.root.children.some(Q=>Q.kind!=="textValue"&&(Q.localName==="mirrorMargins"||Q.localName==="evenAndOddHeaders")&&!Q.attributes.some(ve=>ve.localName==="val"&&["0","false","off"].includes(ve.value)))),contentWarnings:xt(u.view),reviewArtifacts:Bt},be=Ct(Vt);return u.completed.set(f,{revision:O,pkg:M,internal:N,published:be}),be}let we=ae;for(;u.drawingBundle.pendingResourceCount()>0;){await T(we,O,M,B),we=w,j();let S=L();if(S)return S}j();let xe=L();if(xe)return xe}throw new k("nonConvergent",`Image resources did not reach quiescence after ${ye} layout passes`)},ge=f=>{let P;try{P=Nt(f);}catch(O){return Promise.reject(O)}if(!x)return Promise.reject(W());let D=x,u=D.inFlight.get(P);if(u)return u;let B=U(P).catch(O=>{throw vr(O)}).finally(()=>D.inFlight.delete(P));return D.inFlight.set(P,B),B};return {ok:true,session:{layout:()=>ge(a),layoutFor:ge,validatedImageBytes(f){let P=x;return !P||f.resource.kind!=="ready"?null:P.drawingBundle.mintValidatedBytes(f.resource.validatedHandle,f.resource.contentId)?.slice()??null},dispose:$}}}exports.a=Xt;exports.b=Er;exports.c=yt;exports.d=k;exports.e=Yn;
|
|
1
|
+
'use strict';var chunkDBOOTED4_cjs=require('./chunk-DBOOTED4.cjs'),chunk243W4WW2_cjs=require('./chunk-243W4WW2.cjs'),chunkWO4V6PNS_cjs=require('./chunk-WO4V6PNS.cjs');var Kt=Object.freeze({}),zt=Object.freeze([]);function Ht(e){let t=Object.keys(e);if(t.length===0)return Kt;let r={};for(let n of t){let o=e[n];o!==void 0&&(r[n]=o);}return Object.freeze(r)}function Wt(e){let t=new Map(chunkWO4V6PNS_cjs.rg(e.part())),r=new Set([e.part()]);for(let o of e.headerFooterPartsBySection())for(let a of [o.headers,o.footers])for(let i of a.values())if(!r.has(i)){r.add(i);for(let[s,c]of chunkWO4V6PNS_cjs.rg(i))t.has(s)||t.set(s,c);}let n=e.currentPackage();for(let o of ["footnote","endnote"]){let a=chunkWO4V6PNS_cjs.lh(n,o);if(!(!a||r.has(a))){r.add(a);for(let[i,s]of chunkWO4V6PNS_cjs.rg(a))t.has(i)||t.set(i,s);}}return t}function $t(e,t){let r=chunkDBOOTED4_cjs.qe(e,t);if(!r)return null;let n=e.pages[r.pageIndex];if(!n)return null;let o=chunkDBOOTED4_cjs.Be(n),a=chunkDBOOTED4_cjs.De(e,t.paragraphId,r.pageIndex),i=Object.freeze({x:r.x+a.x,y:r.y+a.y,height:r.height});return Object.freeze({anchor:Object.freeze({...t}),pageIndex:r.pageIndex,pageContent:i,pageStack:Object.freeze({x:o.x+i.x,y:o.y+i.y})})}function Ut(e,t){let r=[];for(let n of t.values()){let o=$t(e,n);o&&r.push(o);}return r.length===0?zt:Object.freeze(r)}function ft(e,t){return {documentMetadata:Ht(e.documentProperties()),destinations:Ut(t,Wt(e))}}function Er(e,t){let r=e.destinations;if(r){for(let n of r)if(n.anchor.name===t)return n}}function yt(e={}){return Object.freeze({async decode(t,r,n){let o=chunkWO4V6PNS_cjs.ke(t,r);if(!o)throw new Error(`Unsupported or malformed ${r} image`);if(o.pixelWidth>n.maxDimension||o.pixelHeight>n.maxDimension||o.pixelWidth>n.maxPixels/o.pixelHeight)throw new Error("Image dimensions exceed resource limits");return Object.freeze({pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight,dpiX:o.dpiX??96,dpiY:o.dpiY??96})},...e.convertPreserved?{convertPreserved:e.convertPreserved}:{}})}var gt=new WeakMap;function ht(e,t){let r=gt.get(e);r||(r=chunkDBOOTED4_cjs.Oe(e),gt.set(e,r));let n=r.styleCascade(),o=new Set;if(t===e.part())for(let c of chunkDBOOTED4_cjs.td(t,void 0,void 0,n,r.numberingIndex()))for(let h of chunkDBOOTED4_cjs.qb(c)?.slice(0,-1)??[])o.add(h.paragraph.id);let a=c=>{if(c.kind==="textValue")return false;let h=c.children.find(d=>d.kind!=="textValue"&&d.namespaceUri===chunkWO4V6PNS_cjs.la&&d.localName==="pPr"),p=h?.kind!=="textValue"?h?.children.find(d=>d.kind!=="textValue"&&d.namespaceUri===chunkWO4V6PNS_cjs.la&&d.localName==="rPr"):void 0;return p!==void 0&&chunkWO4V6PNS_cjs.Aa(p,"vanish")},i=0,s=(c,h)=>{if(++i>chunkWO4V6PNS_cjs.Jd||h>chunkWO4V6PNS_cjs.$||c.kind==="textValue")return false;if(c.kind==="paragraph"&&!o.has(c.id)&&(chunkDBOOTED4_cjs.rd(c,n,false)||a(c))&&chunkWO4V6PNS_cjs.mg(c).length>0)return true;for(let p of c.children){if(i>=chunkWO4V6PNS_cjs.Jd)break;if(s(p,h+1))return true}return false};return s(t.root,0)}var wt=new WeakMap,Gt=new Set(["shape","rect","roundrect","oval","line","group","arc","curve","polyline","image"]);function Yt(e,t){let r=wt.get(e.root);if(r&&r.stylesPart===t)return r.codes;let n=chunkWO4V6PNS_cjs.ab(t),o=new Set,a=[{node:e.root,scope:chunkWO4V6PNS_cjs.vd(),depth:0,mcSelected:false,framed:false}],i=0;for(;a.length;){let{node:c,scope:h,depth:p,mcSelected:d,framed:y}=a.pop();if(++i>chunkWO4V6PNS_cjs.Jd||p>chunkWO4V6PNS_cjs.$){o.add("scan-limit");break}if(c.kind==="textValue")continue;if(i+a.length+c.children.length>chunkWO4V6PNS_cjs.Jd){o.add("scan-limit");break}let g=chunkWO4V6PNS_cjs.ud(h,c),w=y||n(c),l=chunkWO4V6PNS_cjs.td(c)?c:void 0;if(l){if(chunkWO4V6PNS_cjs.Nd(l,g).drawing)continue;let m=chunkWO4V6PNS_cjs.Md(l,g);m.refused&&o.add("scan-limit"),m.branch&&a.push({node:m.branch,scope:g,depth:p+1,mcSelected:true,framed:w});continue}if(!d&&chunkWO4V6PNS_cjs.qd(c)&&!(w&&c.localName==="object")){let m=chunkWO4V6PNS_cjs.sd(c,e.name)?.textboxStory?.content;m&&a.push({node:m,scope:g,depth:p+1,mcSelected:d,framed:w});continue}if(c.namespaceUri==="urn:schemas-microsoft-com:vml"&&c.localName==="textbox"){o.add("legacy-textbox");continue}c.namespaceUri==="urn:schemas-microsoft-com:vml"&&Gt.has(c.localName)&&!c.children.some(m=>m.kind!=="textValue"&&m.namespaceUri==="urn:schemas-microsoft-com:vml"&&m.localName==="textbox")&&o.add("legacy-drawing");for(let m of c.children)a.push({node:m,scope:g,depth:p+1,mcSelected:d,framed:w});}let s=Object.freeze([...o]);return wt.set(e.root,{stylesPart:t,codes:s}),s}function xt(e){let t=new Set([e.part()]);for(let r of e.headerFooterPartsBySection())for(let n of [r.headers,r.footers])for(let o of n.values())t.add(o);for(let r of ["footnote","endnote"]){let n=chunkWO4V6PNS_cjs.lh(e.currentPackage(),r);n&&t.add(n);}return Object.freeze([...t].flatMap(r=>[...Yt(r,chunkWO4V6PNS_cjs.bd(e.currentPackage())),...ht(e,r)?["unsupported-style-separator"]:[]].map(n=>Object.freeze({code:n,partName:r.name}))))}function bt(e){return chunkWO4V6PNS_cjs.nf(e.fieldResults,()=>chunkDBOOTED4_cjs.jf(Xt(e)))}function Xt(e){return chunkDBOOTED4_cjs.kf(e.fieldResults,qt(e))}function*qt(e){let t=e.defaultTabStopPt?.(),r=e.view.part().name,n={view:e.view,measurer:e.measurer,producer:e.producer,cache:e.cache,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,compatibilityMode:e.compatibilityMode?.(),inlineDrawingLayoutForPart:e.inlineDrawingLayoutForPart,drawingTokenForParagraphForPart:e.drawingTokenForParagraphForPart,drawingLayoutEpochForPart:e.drawingLayoutEpochForPart,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter},o=chunkDBOOTED4_cjs.bf(n),a={view:e.view,revision:e.revision,measurer:e.measurer,cache:e.cache,session:e.session,producer:e.producer,styleCascade:e.styleCascade,numberingIndex:e.numberingIndex,defaultTabStopPt:t,furniture:e.furniture,compatibilityMode:e.compatibilityMode,linkProjectors:e.linkProjectors,projectFieldLink:e.projectFieldLink,showFieldCodes:e.showFieldCodes,fieldResults:e.fieldResults,inlineDrawingLayout:e.inlineDrawingLayout,drawingTokenForParagraph:e.drawingTokenForParagraph,drawingLayoutEpoch:e.drawingLayoutEpoch,displayMode:e.displayMode,revisionAuthorFilter:e.revisionAuthorFilter,bodyBlockLimit:e.bodyBlockLimit},i={measurer:a.measurer,cache:a.cache,session:a.session,producer:a.producer,styleCascade:a.styleCascade?.(),defaultTabStopPt:a.defaultTabStopPt,compatibilityMode:a.compatibilityMode?.(),numberingIndex:a.numberingIndex?.(),sectionFurniture:a.furniture.sectionFurniture(),furniture:a.furniture.furniture(),evenAndOddHeaders:a.view.headerFooterPartsBySection()[0]?.evenAndOddHeaders===true,projectLink:a.linkProjectors.projectLink,projectFieldLink:a.projectFieldLink,showFieldCodes:a.showFieldCodes,fieldResults:a.fieldResults,documentProperties:a.view.documentProperties(),inlineDrawingLayout:a.inlineDrawingLayout,drawingTokenForParagraph:a.drawingTokenForParagraph,drawingLayoutEpoch:a.drawingLayoutEpoch,projectionTokenForParagraph:s=>a.linkProjectors.tokenForParagraphForPart(r,s),projectionTokenForTable:s=>a.linkProjectors.tokenForTableForPart(r,s),projectionEpoch:a.linkProjectors.epochForPart(r),notes:o,displayMode:a.displayMode,revisionAuthorFilter:a.revisionAuthorFilter,bodyBlockLimit:a.bodyBlockLimit};return yield*chunkDBOOTED4_cjs.Pf(a.view.part(),a.revision,i)}var Jt=65536;function St(e,t){return {x:t.x-e.contentBox.x,y:t.y-e.contentBox.y}}function Qt(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function Zt(e,t,r){return e.rootStory!==t?false:t==="footnote"||t==="endnote"?e.noteScopeId===r:true}function er(e,t){if(t.story!=="textbox"||t.textboxPath.length===0)return null;let r=null;return chunkDBOOTED4_cjs.Da(e,n=>{if(r||!Zt(t,n.story,n.noteScopeId))return;let o=n.story==="header"||n.story==="footer"?a=>chunkDBOOTED4_cjs.ya(a,n.origin,{x:e.box.x,y:e.box.y}):void 0;chunkDBOOTED4_cjs.Ha(n.host,(a,i)=>{if(r||i.textboxDepth===0)return;let s=i.textboxPath.map(c=>c.drawingNodeId);Qt(s,t.textboxPath)&&(r=St(e,i.storyOrigin));},n.origin,o);}),r}function tr(e,t){if(t.story==="textbox")return er(e,t)??{x:0,y:0};switch(t.rootStory){case "body":return {x:0,y:0};case "header":return e.header?chunkDBOOTED4_cjs.Ce(e,e.header.box):{x:0,y:0};case "footer":return e.footer?chunkDBOOTED4_cjs.Ce(e,e.footer.box):{x:0,y:0};case "footnote":case "endnote":{let n=(t.rootStory==="footnote"?e.footnotes:e.endnotes)?.notes.find(o=>o.scopeId===t.noteScopeId);return n?chunkDBOOTED4_cjs.Ce(e,n.box):{x:0,y:0}}case "note-separator":{let r=t.noteAreaKind==="endnotes"?e.endnotes:e.footnotes,n=r?.separator?.box;return r?.continuationNotice&&chunkDBOOTED4_cjs.Ha(r.continuationNotice,o=>{o.paragraphId===t.source.start.paragraphId&&(n=r.continuationNotice.box);}),n?chunkDBOOTED4_cjs.Ce(e,n):{x:0,y:0}}default:return {x:0,y:0}}}function It(e){return Object.freeze({x:e.x,y:e.y,width:e.width,height:e.height})}function Rt(e,t){let r=chunkDBOOTED4_cjs.Be(e);return Object.freeze({x:r.x+t.x,y:r.y+t.y,width:t.width,height:t.height})}function rr(e,t){let r=chunkDBOOTED4_cjs.qe(e,{paragraphId:t.source.start.paragraphId,offset:t.source.start.offset},{preferredPageIndex:t.pageIndex});if(!r||r.pageIndex!==t.pageIndex)return;let n=e.pages[r.pageIndex];if(!n)return;let o=tr(n,t),a=Object.freeze([It({x:r.x+o.x,y:r.y+o.y,width:0,height:r.height})]);return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>Rt(n,i)))})}function nr(e,t,r){let n=r.filter(i=>i.pageIndex===t.pageIndex);if(n.length===0)return Ot(t)?rr(e,t):void 0;let o=e.pages[t.pageIndex];if(!o)return;let a=Object.freeze(n.map(i=>It(i)));return Object.freeze({pageContent:a,pageStack:Object.freeze(a.map(i=>Rt(o,i)))})}function Ot(e){return e.source.start.paragraphId===e.source.end.paragraphId&&e.source.start.offset===e.source.end.offset}function vt(e,t){return `${e}\0${t}`}function or(e,t,r){let n=Math.max(e.start,t.offset),o=Math.min(e.end,r.offset);return o>n?{start:n,end:o}:null}function ar(e,t){let r=new Map,n=new Map,o=new Set,a=0;let i=(s,c)=>{if(a>=Jt)return false;a+=1;let h=vt(s.pageIndex,c),p=n.get(h);return p?p.push(s):n.set(h,[s]),true};for(let[s,c]of t.entries())for(let[h,p]of c.occurrences.entries()){if(Ot(p)||p.source.start.paragraphId!==p.source.end.paragraphId)continue;o.add(p.pageIndex);let d=`${s}\0${h}`,y={paragraphId:p.source.start.paragraphId,offset:p.source.start.offset},g={paragraphId:p.source.end.paragraphId,offset:p.source.end.offset},w=y.offset<=g.offset?{from:y,to:g}:{from:g,to:y};i({key:d,from:w.from,to:w.to,pageIndex:p.pageIndex},w.from.paragraphId);}if(n.size===0)return r;for(let s of e.pages)o.has(s.index)&&chunkDBOOTED4_cjs.Da(s,c=>{let h=c.story==="header"||c.story==="footer"?p=>chunkDBOOTED4_cjs.ya(p,c.origin,{x:s.box.x,y:s.box.y}):void 0;chunkDBOOTED4_cjs.Ha(c.host,(p,d)=>{let y=St(s,d.storyOrigin);for(let g of p.lines)for(let w of chunkDBOOTED4_cjs.Na(g)){let l=n.get(vt(s.index,w.paragraphId));if(l)for(let m of l){let b=or(w,m.from,m.to);if(!b)continue;let x=chunkDBOOTED4_cjs.je(g,b.start,void 0,w),v=chunkDBOOTED4_cjs.je(g,b.end,void 0,w,b.end>b.start),I=r.get(m.key)??[];I.push({pageIndex:s.index,x:Math.min(x,v)+y.x,y:g.box.y+y.y,width:Math.abs(v-x),height:g.box.height}),r.set(m.key,I);}}},c.origin,h);});return r}function kt(e,t){let r=false;for(let o of t)if(o.occurrences.length!==0){r=true;break}if(!r)return t;let n=ar(e,t);return t.map((o,a)=>{if(o.occurrences.length===0)return o;let i=o.occurrences.map((s,c)=>{let h=`${a}\0${c}`,p=nr(e,s,n.get(h)??[]);return p?{...s,geometry:p}:s});return {...o,occurrences:Object.freeze(i)}})}function ir(e){let t=new Map,r=[{node:e.root,depth:0}];for(;r.length>0;){let{node:n,depth:o}=r.pop();if(!(n.kind==="textValue"||o>64)){n.kind==="paragraph"&&!t.has(n.id)&&t.set(n.id,t.size);for(let a=n.children.length-1;a>=0;a-=1)r.push({node:n.children[a],depth:o+1});}}return t}function Mt(){let e=new Map,t=n=>{let o=e.get(n.root);if(o)return o;let a=ir(n);return e.set(n.root,a),a},r={retainRevisionItems:false,revisionSites:chunkWO4V6PNS_cjs.sk,locations:chunkWO4V6PNS_cjs.xk,commentAnchors:chunkWO4V6PNS_cjs.ii,deepOrder:t};return Object.freeze({collectReviewItems:n=>chunkWO4V6PNS_cjs.Bk(n,r),deepParagraphOrderOfPart:t})}function sr(e,t){if(t)return true;let r=e.map(n=>n.root);for(;r.length>0;){let n=r.pop();if(chunkWO4V6PNS_cjs.qk(n))return true;if(n.kind!=="textValue")for(let o of n.children)r.push(o);}return false}function cr(e,t){let r=[],n=new Set([t.name]),o=a=>{!a||n.has(a.name)||(n.add(a.name),r.push(a));};for(let a of chunkWO4V6PNS_cjs.if(e)){for(let i of a.headers.values())o(i);for(let i of a.footers.values())o(i);}return o(chunkWO4V6PNS_cjs.lh(e,"footnote")),o(chunkWO4V6PNS_cjs.lh(e,"endnote")),r}function dr(e,t){switch(t.story){case "body":return e.mainDocumentPart;case "header":case "footer":return t.host.partName;case "footnote":return chunkWO4V6PNS_cjs.lh(e,"footnote")?.name??null;case "endnote":return chunkWO4V6PNS_cjs.lh(e,"endnote")?.name??null;case "note-separator":return chunkWO4V6PNS_cjs.lh(e,t.noteAreaKind==="footnotes"?"footnote":"endnote")?.name??null;default:return t}}function ur(e,t){let r=new Map;for(let n of e){let o=t.get(n.partName),a=o?.get(n.start.paragraphId),i=o?.get(n.end.paragraphId);if(a===void 0||i===void 0)continue;let s=Math.min(a,i),c=Math.max(a,i),h=r.get(n.partName);r.set(n.partName,{lower:Math.min(h?.lower??s,s),upper:Math.max(h?.upper??c,c)});}return r}function lr(e,t,r,n,o){let a=new Map(r.map(d=>[d.name,o(d)])),i=ur(n,a),s=new Map,c=new Map,h=(d,y,g,w,l,m,b)=>{let x=a.get(d)?.get(l),v=i.get(d);if(x===void 0||!v||x<v.lower||x>v.upper)return;let I=s.get(d)??new Map;s.set(d,I);let V=c.get(d)??new Map;c.set(d,V);let W=JSON.stringify([y.story,y.noteScopeId,y.noteAreaKind]),K=g==="textbox"?JSON.stringify([W,"textbox",w]):W,$=I.get(l)??[],j=`${l}\0${y.page.index}\0${K}`,T=V.get(j);T||(T={pageIndex:y.page.index,story:g,rootStory:y.story,textboxPath:w,noteScopeId:y.noteScopeId,noteAreaKind:y.noteAreaKind,laneKey:K,intervals:[],intervalKeys:new Set},V.set(j,T),$.push(T),I.set(l,$));let U=`${m}\0${b}`;T.intervalKeys?.has(U)||(T.intervalKeys?.add(U),T.intervals.push({start:m,end:b}));};chunkDBOOTED4_cjs.Ea(e,d=>{let y=dr(t,d);!y||!i.has(y)||chunkDBOOTED4_cjs.Ha(d.host,(g,w)=>{let l=w.textboxDepth>0?"textbox":d.story,m=w.textboxPath.map(x=>x.drawingNodeId),b=[];for(let x of g.lines){for(let v of x.spans)b.push(v.range);for(let v of x.drawings??[])b.push({paragraphId:v.paragraphId,start:v.start,end:v.start+1});}b.length===0&&b.push({paragraphId:g.range.paragraphId,start:g.range.start,end:g.range.end});for(let{paragraphId:x,start:v,end:I}of b)h(y,d,l,m,x,v,I);});}),chunkDBOOTED4_cjs.Ga(e,d=>{let y=d.drawing.ownerPartName;d.drawing.accessibility.hidden||!i.has(y)||h(y,d.root,d.story,d.textboxPath.map(g=>g.drawingNodeId),d.drawing.paragraphId,d.drawing.start,d.drawing.start+1);});for(let d of s.values())for(let y of d.values())for(let g of y){g.intervals.sort((l,m)=>l.start-m.start||l.end-m.end);let w=[];for(let l of g.intervals){let m=w.at(-1);m&&l.start<=m.end?m.end=Math.max(m.end,l.end):w.push({...l});}g.intervals.splice(0,g.intervals.length,...w),g.intervalKeys=void 0;}let p=new Map;for(let[d,y]of s){let g=a.get(d);if(!g)continue;let w=[];for(let[l,m]of y){let b=g.get(l);b!==void 0&&w.push({paragraphId:l,position:b,laneKeys:new Set(m.map(({laneKey:x})=>x))});}w.sort((l,m)=>l.position-m.position),p.set(d,w);}return {byPart:s,orderByPart:a,visibleByPart:p}}function Dt(e,t){let r=0,n=e.length;for(;r<n;){let o=r+n>>>1;e[o].position<t?r=o+1:n=o;}return r}function pr(e,t){if(e.start.paragraphId===e.end.paragraphId)return [e.start.paragraphId];let r=t.orderByPart.get(e.partName),n=t.visibleByPart.get(e.partName),o=r?.get(e.start.paragraphId),a=r?.get(e.end.paragraphId);if(!r||!n||o===void 0||a===void 0)return [e.start.paragraphId,e.end.paragraphId];let i=Math.min(o,a),s=Math.max(o,a),c=new Set(t.byPart.get(e.partName)?.get(e.start.paragraphId)?.map(({laneKey:d})=>d)??[]),h=new Set(t.byPart.get(e.partName)?.get(e.end.paragraphId)?.map(({laneKey:d})=>d)??[]),p=new Set([...c].filter(d=>h.has(d)));return p.size===0?[e.start.paragraphId,e.end.paragraphId]:n.slice(Dt(n,i),Dt(n,s+1)).filter(d=>[...d.laneKeys].some(y=>p.has(y))).map(d=>d.paragraphId)}function mr(e,t,r,n){return n?e.intervals.filter(a=>a.start<=t&&t<a.end).length>0?[{start:t,end:t}]:[]:e.intervals.flatMap(o=>{if(o.start===o.end)return [];let a={start:Math.max(o.start,t),end:Math.min(o.end,r)};return a.end>a.start?[a]:[]})}function fr(e,t){let r=Number.NEGATIVE_INFINITY;for(let n of e)for(let o of n.intervals)r=Math.max(r,o.end);return t!==r?new Set:new Set(e.filter(n=>n.intervals.some(o=>o.end===r)))}function Lt(e,t,r){let n=[],o=new Set;for(let[a,i]of e.entries()){let s=r===void 0?void 0:r===null?"neutral":a<r?"replaced":"replacement";for(let c of pr(i,t)){let h=t.byPart.get(i.partName)?.get(c)??[],d=i.start.paragraphId===i.end.paragraphId&&i.start.offset===i.end.offset,y=c===i.start.paragraphId?i.start.offset:0,g=c===i.end.paragraphId?i.end.offset:Number.POSITIVE_INFINITY,w=d?fr(h,y):new Set;for(let l of h){let m=mr(l,y,g,d);d&&m.length===0&&w.has(l)&&(m=[{start:y,end:y}]);for(let b of m){let x=`${l.pageIndex}\0${l.story}\0${l.noteScopeId??""}\0${l.noteAreaKind??""}\0${l.textboxPath.join("\0")}\0${i.partName}\0${c}\0${b.start}\0${b.end}\0${s??""}`;o.has(x)||(o.add(x),n.push({pageIndex:l.pageIndex,physicalPageNumber:l.pageIndex+1,story:l.story,rootStory:l.rootStory,textboxPath:l.textboxPath,noteScopeId:l.noteScopeId,noteAreaKind:l.noteAreaKind,...s?{revisionRole:s}:{},source:{partName:i.partName,start:{paragraphId:c,offset:b.start},end:{paragraphId:c,offset:b.end}}}));}}}}return n}function At(e,t){let r=2166136261,n=2654435769;for(let o=0;o<t.length;o+=1){let a=t.charCodeAt(o);r=Math.imul(r^a,16777619)>>>0,n=Math.imul(n^a+o,2246822507)>>>0,n^=n>>>13;}return `${e}_${t.length.toString(36)}_${r.toString(36)}_${n.toString(36)}`}function Et(e,t,r=At){let n=new Map;for(let a of t){let i=r(e,a),s=n.get(i)??new Set;s.add(a),n.set(i,s);}let o=new Map;for(let[a,i]of n){let s=[...i].sort();for(let[c,h]of s.entries())o.set(h,s.length===1?a:`${a}_${c.toString(36)}`);}return o}function yr(e){let t=new Set,r=new Set;for(let n of e){if(n.kind==="comment"){t.add(n.id),n.parentId!==void 0&&t.add(n.parentId),n.parentRevisionId!==void 0&&r.add(n.parentRevisionId);for(let o of n.replyIds)t.add(o);}if(n.kind==="revision"){r.add(n.id),n.pairedWith!==void 0&&r.add(n.pairedWith);for(let o of n.replyIds)t.add(o);}}return {comment:Et("comment",t),revision:Et("change",r)}}function _(e,t,r){return e.get(r)??At(t,r)}function gr(e,t,r){return e.kind==="revision"?{kind:"tracked-change",id:_(r.revision,"change",e.id),change:e.revisionKind,...e.structuralChanges?{structuralChanges:e.structuralChanges}:{},...e.markDirection?{markDirection:e.markDirection}:{},author:e.author,...e.date!==void 0?{date:e.date}:{},text:chunkWO4V6PNS_cjs.jb(e.text),replacedText:chunkWO4V6PNS_cjs.jb(e.replacedText),nesting:e.nesting,...e.replacedRangeCount!==void 0?{replacedRangeCount:e.replacedRangeCount}:{},readOnly:e.readOnly,...e.pairedWith!==void 0?{pairedWith:_(r.revision,"change",e.pairedWith)}:{},replyIds:e.replyIds.map(n=>_(r.comment,"comment",n)),occurrences:t?Lt(e.ranges,t,e.revisionKind==="replace"?e.replacedRangeCount??null:void 0):[]}:e.kind!=="comment"?null:{kind:"comment",id:_(r.comment,"comment",e.id),author:e.comment.author,initials:chunkWO4V6PNS_cjs.fk(e.comment),...e.comment.date!==void 0?{date:e.comment.date}:{},text:chunkWO4V6PNS_cjs.dk(e.comment),resolved:e.resolved,...e.parentId!==void 0?{parentId:_(r.comment,"comment",e.parentId)}:{},...e.parentRevisionId!==void 0?{parentRevisionId:_(r.revision,"change",e.parentRevisionId)}:{},replyIds:e.replyIds.map(n=>_(r.comment,"comment",n)),orphaned:e.orphaned,occurrences:t&&e.range?Lt([e.range],t):[]}}function Ft(e,t){let r=t.parts.get(t.mainDocumentPart);if(!r)return [];let n=cr(t,r),o=[r,...n],a=t.parts.get(chunk243W4WW2_cjs.aa(t,r.name));if(!sr(o,a))return [];let i=Mt(),s=i.collectReviewItems({storyPart:r,furnitureParts:n,commentsPart:a,commentsExtendedPart:t.parts.get(chunk243W4WW2_cjs.ba(t,r.name))});if(s.length===0)return [];let c=s.flatMap(d=>chunkWO4V6PNS_cjs.Rj(d)),h=c.length>0?lr(e,t,o,c,i.deepParagraphOrderOfPart):null,p=yr(s);return s.map(d=>gr(d,h,p)).filter(d=>d!==null)}var hr=new Set(["part","validatedHandle"]);function Tt(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function q(e,t,r,n,o){if(!(n!==void 0&&hr.has(n))){if(typeof e=="function")throw new TypeError("Semantic layout publication encountered a function value");if(!(e===null||typeof e!="object")&&!o?.has(e)){if(r.has(e))throw new TypeError("Semantic layout publication encountered a cyclic record graph");if(!t.has(e)){t.add(e),r.add(e);try{if(Array.isArray(e)){for(let a of e)q(a,t,r,void 0,o);Object.freeze(e);return}if(!Tt(e))throw new TypeError("Semantic layout publication encountered a non-record value");for(let a of Reflect.ownKeys(e)){let i=Object.getOwnPropertyDescriptor(e,a);if(i){if(!("value"in i))throw new TypeError("Semantic layout publication encountered an accessor property");q(i.value,t,r,a,o);}}Object.freeze(e);}finally{r.delete(e);}}}}}function Ct(e){if(!Tt(e))throw new TypeError("Semantic layout publication encountered a non-record value");let t=new Set;for(let n of e.pages)if(!(n===null||typeof n!="object"))for(let o of ["header","footer"]){let a=Object.getOwnPropertyDescriptor(n,o);if(!a||!("value"in a))continue;let i=a.value;if(i===null||typeof i!="object"||t.has(i))continue;let s=new Set;s.add(e),q(i,new Set,s,o),t.add(i);}let r=(n,o)=>{let a=new Set;for(let i of n){let s=new Set;s.add(e),q(i,a,s,void 0,o);}Object.freeze(n);};for(let n of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,n);if(!o)continue;if(!("value"in o))throw new TypeError("Semantic layout publication encountered an accessor property");if(n==="pages"&&Array.isArray(o.value)){r(o.value,t);continue}if(n==="reviewArtifacts"&&Array.isArray(o.value)){r(o.value);continue}let a=new Set;a.add(e),q(o.value,new Set,a,n);}return Object.freeze(e),e}var wr=Object.freeze([]),k=class extends Error{constructor(r,n,o){super(n,o);this.code=r;this.name="ExportResourceError";}code};function xr(e){try{return e instanceof k}catch{return false}}function br(e){try{return e instanceof chunkDBOOTED4_cjs.Ye}catch{return false}}function Pr(e){try{return e instanceof Error&&typeof e.message=="string"&&e.message.length>0?e.message:null}catch{return null}}function vr(e){if(xr(e))return e;let t=br(e),r=Pr(e),n=r?`: ${r}`:"",o=new k(t?"layoutInvariant":"layoutFailed",t?`Authored geometry could not be represented within the bounded page model${n}`:`Export layout failed${n}`);return Object.defineProperty(o,"cause",{configurable:true,value:e}),o}function Sr(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("resourceTimeoutMs must be a positive finite number");return Math.max(1,e)}function Nt(e){if(e==="all-markup"||e==="simple-markup"||e==="proposed"||e==="original")return e;throw new RangeError("displayMode must be all-markup, simple-markup, proposed, or original")}var Ir=50,ye=64;function Rr(e){switch(e.kind){case "pending":return true;case "ready":case "unrenderable":case "external":case "missing":return false;default:return e}}function Or(e){let t=false;return chunkDBOOTED4_cjs.Ga(e,({drawing:r})=>{Rr(r.resource)&&(t=true);}),t}function jt(e){return !ArrayBuffer.isView(e)}function Yn(e,t={}){if(t.signal?.aborted)return {ok:false,reason:"aborted"};if(t.revisionAuthorSlots!==void 0&&(!t.revisionAuthorSlots||typeof t.revisionAuthorSlots!="object"||Array.isArray(t.revisionAuthorSlots)))throw new TypeError("revisionAuthorSlots must map author names to nonnegative safe integers.");let r=t.revisionAuthorSlots===void 0?void 0:Object.freeze(Object.fromEntries(Object.entries(t.revisionAuthorSlots).map(([f,P])=>{if(!Number.isSafeInteger(P)||P<0)throw new TypeError("revisionAuthorSlots values must be nonnegative safe integers.");return [f,P]}))),n=t.revisionMarkup?chunkDBOOTED4_cjs.Xa(t.revisionMarkup):void 0,o=n?{revisionMarkup:n,hiddenAuthors:new Set,cacheKey:JSON.stringify(n)}:void 0,a=Nt(t.displayMode??chunkDBOOTED4_cjs.$a),i=jt(e),s=jt(e)?{ok:true,view:e}:chunk243W4WW2_cjs.Ca(e);if(!s.ok)return s;let c=s.view,h=t.reuseAcrossRevisions??i,p=Sr(t.resourceTimeoutMs),d=t.measurer??chunkDBOOTED4_cjs.ja(),y=t.producer??(t.measurer?"host-export-measurer":"export-fixed-measurer"),g=chunkDBOOTED4_cjs.Ke({retainAcrossPasses:h}),w=0,l=new Set,m=()=>{w+=1;for(let f of l)f();l.clear();},b=chunkDBOOTED4_cjs.Qe({session:c,decodePort:t.imageDecodePort??yt(t.convertPreservedImage?{convertPreserved:t.convertPreservedImage}:void 0),onResourcesChanged:m}),x={view:c,measurer:d,paragraphCache:g,sessions:new Map,completed:new Map,inFlight:new Map,styles:chunkDBOOTED4_cjs.Oe(c),fieldLinks:new Map,links:chunkDBOOTED4_cjs.df(c),drawingBundle:b,furniture:new Map},v=new AbortController,I=t.signal,V=false,W=()=>V?new k("aborted","Export resource settlement was aborted"):new k("disposed","Export session has been disposed"),K=()=>{V=true,$();};function $(){let f=x;if(f){x=null,I?.removeEventListener("abort",K),v.abort(I?.reason),f.drawingBundle.dispose(),f.paragraphCache.clear();for(let P of f.completed.values())chunkDBOOTED4_cjs.jc(P.internal),chunkDBOOTED4_cjs.lf(P.internal);for(let P of f.fieldLinks.values())P.registry.clear();f.fieldLinks.clear(),f.completed.clear(),f.inFlight.clear(),f.furniture.clear(),f.sessions.clear(),m();}}I?.addEventListener("abort",K,{once:true}),I?.aborted&&K();let j=()=>{if(!x)throw W();if(v.signal.aborted)throw new k("aborted","Export resource settlement was aborted")},T=(f,P,D,u)=>w!==f||x?.view.packageRevision()!==P||x?.view.currentPackage()!==D?Promise.resolve():(j(),new Promise((B,O)=>{let M=false,C,L=A=>{M||(M=true,C!==void 0&&clearTimeout(C),l.delete(E),v.signal.removeEventListener("abort",G),A?O(A):B());},E=()=>L(),G=()=>L(new k("aborted","Export resource settlement was aborted")),Y=()=>{if(x?.view.packageRevision()!==P||x?.view.currentPackage()!==D){L();return}let A=u-Date.now();if(A<=0){L(new k("timedOut",`Image resources did not settle within ${p}ms`));return}C=setTimeout(Y,Math.min(Ir,A));};if(l.add(E),v.signal.addEventListener("abort",G,{once:true}),w!==f||x?.view.packageRevision()!==P||x?.view.currentPackage()!==D){L();return}Y();})),U=async(f,P=0,D=Date.now()+p)=>{if(j(),Date.now()>=D)throw new k("timedOut",`Export layout did not stabilize within ${p}ms`);let u=x,B=D,O=u.view.packageRevision(),M=u.view.currentPackage(),C=u.completed.get(f);if(C&&C.revision===O&&C.pkg===M)return C.published;let L=()=>{if(u.view.packageRevision()===O&&u.view.currentPackage()===M)return null;if(P>=ye-1)throw new k("nonConvergent","Document revision did not stabilize during export layout");return U(f,P+1,B)},E=u.fieldLinks.get(f);if(!E||E.revision!==O||E.pkg!==M){let R=E?.registry??chunkDBOOTED4_cjs.ef();R.clear(),E={revision:O,pkg:M,registry:R},u.fieldLinks.set(f,E),u.furniture.delete(f);}let G=E.registry,Y=u.sessions.get(f)??chunkDBOOTED4_cjs.Nf();u.sessions.set(f,Y);let A=u.furniture.get(f);A||(A=chunkDBOOTED4_cjs.af({view:u.view,measurer:u.measurer,producer:y,cache:u.paragraphCache,styleCascade:u.styles.styleCascade,numberingIndex:u.styles.numberingIndex,defaultTabStopPt:u.styles.defaultTabStopPt,compatibilityMode:u.styles.compatibilityMode,displayMode:chunkDBOOTED4_cjs._a(f),revisionAuthorFilter:f==="simple-markup"?chunkDBOOTED4_cjs.ab(o):o,showFieldCodes:false,inlineDrawingLayoutForPart:R=>u.drawingBundle.contextForPart(R),drawingLayoutTokenForPart:R=>u.drawingBundle.cacheTokenForPart(R),drawingTokenForParagraphForPart:(R,ae)=>u.drawingBundle.drawingTokenForParagraph(ae,R),linkProjectors:u.links,projectFieldLink:R=>G.project(R)}),u.furniture.set(f,A));for(let R=0;R<ye;R+=1){let ae=w;u.drawingBundle.sync(u.view);let he=L();if(he)return he;let N=bt({view:u.view,revision:u.view.packageRevision(),measurer:u.measurer,cache:u.paragraphCache,session:Y,producer:y,styleCascade:u.styles.styleCascade,defaultTabStopPt:u.styles.defaultTabStopPt,numberingIndex:u.styles.numberingIndex,furniture:A,compatibilityMode:u.styles.compatibilityMode,linkProjectors:u.links,projectFieldLink:S=>G.project(S),inlineDrawingLayout:u.drawingBundle.bodyContext,inlineDrawingLayoutForPart:S=>u.drawingBundle.contextForPart(S),drawingTokenForParagraph:S=>u.drawingBundle.drawingTokenForParagraph(S,u.view.part().name),drawingTokenForParagraphForPart:(S,J)=>u.drawingBundle.drawingTokenForParagraph(J,S),drawingLayoutEpoch:u.drawingBundle.cacheTokenForPart(u.view.part().name),drawingLayoutEpochForPart:S=>u.drawingBundle.cacheTokenForPart(S),displayMode:chunkDBOOTED4_cjs._a(f),revisionAuthorFilter:f==="simple-markup"?chunkDBOOTED4_cjs.ab(o):o,showFieldCodes:false,bodyBlockLimit:void 0,fieldResults:"atomic"});if(!Or(N)){let S=L();if(S)return S;h||(chunkDBOOTED4_cjs.jc(N),chunkDBOOTED4_cjs.lf(N),u.paragraphCache.clear(),u.sessions.delete(f),u.furniture.delete(f));let J=Ft(N,M),Bt=J.length===0?wr:Object.freeze(kt(N,J)),_t=ft(u.view,N),Vt={...N,..._t,reviewDisplayMode:f,...n?{revisionMarkup:n}:{},...r?{revisionAuthorSlots:r}:{},facingPages:[...M.parts.values()].some(Pe=>Pe.root.localName==="settings"&&Pe.root.children.some(Q=>Q.kind!=="textValue"&&(Q.localName==="mirrorMargins"||Q.localName==="evenAndOddHeaders")&&!Q.attributes.some(ve=>ve.localName==="val"&&["0","false","off"].includes(ve.value)))),contentWarnings:xt(u.view),reviewArtifacts:Bt},be=Ct(Vt);return u.completed.set(f,{revision:O,pkg:M,internal:N,published:be}),be}let we=ae;for(;u.drawingBundle.pendingResourceCount()>0;){await T(we,O,M,B),we=w,j();let S=L();if(S)return S}j();let xe=L();if(xe)return xe}throw new k("nonConvergent",`Image resources did not reach quiescence after ${ye} layout passes`)},ge=f=>{let P;try{P=Nt(f);}catch(O){return Promise.reject(O)}if(!x)return Promise.reject(W());let D=x,u=D.inFlight.get(P);if(u)return u;let B=U(P).catch(O=>{throw vr(O)}).finally(()=>D.inFlight.delete(P));return D.inFlight.set(P,B),B};return {ok:true,session:{layout:()=>ge(a),layoutFor:ge,validatedImageBytes(f){let P=x;return !P||f.resource.kind!=="ready"?null:P.drawingBundle.mintValidatedBytes(f.resource.validatedHandle,f.resource.contentId)?.slice()??null},dispose:$}}}exports.a=Xt;exports.b=Er;exports.c=yt;exports.d=k;exports.e=Yn;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {O,Q as Q$1,P}from'./chunk-FNNOJNGY.js';import {h,a,b,e,c,f,Xd,Xb,_b,ac,bc,$b,Yc,Yb,Zb,nc,kd,Ac,_e,Ze as Ze$1,d,y,Jb,ca,Lb,ld,kc,od}from'./chunk-4S24UOPG.js';import {b as b$1,a as a$1}from'./chunk-2E2RPEKX.js';import {rb,wa,la,xa,Yc as Yc$1,f as f$1,a as a$2,J as J$1}from'./chunk-T2QQHG5C.js';var tt=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function V(e){let t=new Map;for(let n of e)if(Array.isArray(n)){for(let o of n.slice(0,2048)){if(typeof o!="string"||!tt.test(o))continue;let r=o.toLowerCase();if(t.has(r)||t.set(r,o),t.size===2048)break}if(t.size===2048)break}return Object.freeze([...t.values()])}function _t(e){let t=e&&"failures"in e?e.failures:void 0;return e==null||(e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&(t===void 0||Array.isArray(t)&&t.length===0)?void 0:e}var Ue=64,ie=Object.freeze({family:"Calibri",sizeHalfPoints:22}),Lt=ie;function G(e,...t){let n=[e,...t],o=[],r=new Set;for(let l of n)for(let c of l.sources??[]){let u=h(c.request);r.has(u)||(r.add(u),o.push(c));}let s=[],i=new Set;for(let l of n)for(let c of l.substitutions??[]){let u=h(c.from);r.has(u)||i.has(u)||(i.add(u),s.push(c));}let a$1=V(n.map(l=>l.supportedFamilies));return Object.freeze({...a$1.length?{supportedFamilies:a$1}:{},epoch:e.epoch??0,maxFontBytes:e.maxFontBytes??a,sources:Object.freeze(o),...s.length>0?{substitutions:Object.freeze(s)}:{},defaultFont:e.defaultFont??ie,...e.language!==void 0?{language:e.language}:{}})}var nt=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function W(e){let t=e?.defaultFont?.family;return t!==void 0&&nt.test(t)?t:ie.family}var ot="docx-editor.dev/font-resolver",Ve=Symbol.for("docx-editor.dev/font-resolver");function zt(e){let t={value:true,enumerable:false,configurable:true};try{Object.defineProperty(e,Ve,t),Object.defineProperty(e,ot,t);}catch(n){throw new TypeError("defineFontResolver cannot mark a frozen or sealed function; mark it before freezing, or wrap it in a fresh function and mark that.",{cause:n})}return e}function jt(e){return typeof e=="function"&&e[Ve]===true}var le=class extends RangeError{constructor(n,o,r){super(`Font source ${n.family} (${o} bytes) exceeds the shaping byte ceiling (${r} bytes)`);this.request=n;}request},ce=class extends AggregateError{causes;constructor(t){let n=Object.freeze(t.slice(0,b*2));super(n,`Font origin rejected all ${n.length} face and substitution candidates`),this.causes=n;}},Q=e=>`${e.family.trim().toLowerCase()} ${e.weight} ${e.style}`;function rt(e,t,n){let o=new Map(e.map(r=>[Q(r),r]));for(let[r,s]of t)o.set(r,s);for(let r of n)o.has(Q(r.to))&&o.set(Q(r.from),r.from);return [...o.values()]}async function Ut(e,t,n={}){return Xe(e,t,n)}async function $t(e,t,n={}){return Xe(e,t,n)}async function Xe(e,t,n){let o=n.maxExecutionFontBytes??a;if(!Number.isSafeInteger(o)||o<=0||o>a)throw new RangeError("Font execution byte ceiling is outside the supported range");let r=e.map(st),s,i=[],a$1=[],l=new Map,c=new Set,u=0,d=[],g=new Set,p=[],A=t.resolvedFaces??[],S=t.defaultFamily;for(let m=0;m<e.length;m+=1){Ke(t.signal);let F=e[m],h$1=rt(A,l,d),R;try{let w=r[m],O;if(w){let f=await $e(w,t.signal);if(!f.ok)throw f.cause;O=f.value;}else if(typeof F=="function"){let f=await $e(Promise.resolve(F(lt(t,S,h$1,u))).then(b=>({ok:!0,value:b}),b=>({ok:!1,cause:b})),t.signal);if(!f.ok)throw f.cause;O=f.value;}else O=F;if(O==null)continue;if(typeof O=="function"){J(n,F,m,new TypeError("A font origin answered with a function; pass the resolver itself rather than a function returning one"));continue}let k="failures"in O?O.failures:void 0,P=[];if(Array.isArray(k)){let f=Math.min(k.length,b);for(let b=0;b<f;b++)P.push(k[b]);k.length>f&&P.push(new Error("Additional font-origin failures were omitted"));}else k!==void 0&&P.push(k);let v;try{v=it(O,c,u,g,s?"maxFontBytes"in s&&s.maxFontBytes!==void 0?s.maxFontBytes:a:void 0,n.reserveOwnedBytes,n.instrumentation,o);}catch(f){for(let b of new Set(P))J(n,F,m,b);throw f}R=v;for(let f of new Set([...v.dropped,...P]))J(n,F,m,f);let T=v.fragment;T.supportedFamilies&&i.push(T.supportedFamilies),p.push(...P);let j=(T.sources??[]).map(f=>(h(f.request),[Q(f.request),f.request])),x=[...T.substitutions??[]];!s&&"defaultFont"in T&&(S=W(T)),s||(s=T);let E=new Set(v.sourceKeys);if(E.size>0){d=d.filter(f=>!E.has(h(f.from)));for(let f of E)g.delete(f);}a$1.push(...T.sources??[]);for(let f of v.sourceKeys)c.add(f);u+=v.ownedBytes;for(let[f,b]of j)l.set(f,b);for(let f of x)d.push(f),g.add(h(f.from));}catch(w){if(R?.releaseOwnedBytes?.(),t.signal?.aborted)throw t.signal.reason??w;if(w instanceof Z)throw w.cause;J(n,F,m,w);continue}}if(!s)return;let{epoch:C,...L}=G({...s,supportedFamilies:V(i),sources:a$1,substitutions:d});return p.length===0?L:{...L,failures:Object.freeze(p)}}var Z=class extends Error{constructor(n){super("Unable to reserve owned font bytes");this.cause=n;this.name="FontOwnershipReservationError";}cause},ee=class extends RangeError{};async function $e(e,t){if(!t)return e;Ke(t);let n,o=new Promise((s,i)=>{n=i;}),r=()=>n?.(t.reason);t.addEventListener("abort",r,{once:true});try{return await Promise.race([e,o])}finally{t.removeEventListener("abort",r);}}function st(e){if(e===null||typeof e!="object")return;let t;try{t=e.then;}catch(n){return Promise.resolve({ok:false,cause:n})}if(typeof t=="function")return Promise.resolve(e).then(n=>({ok:true,value:n}),n=>({ok:false,cause:n}))}function it(e$1,t,n,o,r,s,i,a$1=a){let l=e$1.sources??[],c$1=e$1.substitutions??[],u="maxFontBytes"in e$1?e$1.maxFontBytes:void 0,d="defaultFont"in e$1?e$1.defaultFont:void 0,g="epoch"in e$1?e$1.epoch:void 0,p="language"in e$1?e$1.language:void 0;if(!Array.isArray(l)||!Array.isArray(c$1))throw new TypeError("Font origin sources and substitutions must be arrays");let A=l.length,S=c$1.length;if(A>b)throw new RangeError(`Font source count must not exceed ${b}`);if(S>b)throw new RangeError(`Font substitution count must not exceed ${b}`);let C=u??a;if(!Number.isSafeInteger(C)||C<=0||C>a)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${a}`);let L=Math.min(r??C,a$1),m=0,F=[],h$1=new Set,R=[],w=[];for(let x=0;x<A;x+=1){let E=l[x];try{let f=ae(E.request),b$1=h(f);if(t.has(b$1)||h$1.has(b$1))continue;let D=E.availability,M=E.faceIndex,q=E.hash,re=E.id;if(D!==void 0&&D!=="available"&&D!=="forbidden")throw new TypeError("Font source availability must be available or forbidden");if(!Number.isSafeInteger(M)||M<0)throw new RangeError("Font face index must be a non-negative safe integer");if(typeof q!="string"||q.length===0)throw new TypeError("Font source hash must be a non-empty string");let K;if(D!=="forbidden"){if(typeof re!="string"||re.length===0)throw new TypeError("Font source id must be a non-empty string");K=E.bytes;let U=e(K);if(U>L)throw U<=(r??C)?new le(f,U,a$1):new RangeError(`Font source ${f.family} (${U} bytes) exceeds the effective base byte ceiling (${L} bytes)`);if(t.has(b$1)||h$1.has(b$1))continue;if(n+m+U>c)throw new RangeError(`Font sources exceed the aggregate byte ceiling of ${c}`);m+=U;}else K=new Uint8Array(0);if(t.has(b$1)||h$1.has(b$1))continue;if(t.size+h$1.size>=b)throw new ee(`Font source count must not exceed ${b}`);h$1.add(b$1),F.push(b$1),R.push(Object.freeze({request:f,id:re,bytes:K,hash:q,faceIndex:M,...D?{availability:D}:{}}));}catch(f){if(f instanceof ee)throw f;w.push(f);}}let O=new Set,k=[];for(let x=0;x<S;x+=1){let E=c$1[x];try{let f=ae(E.from),b=ae(E.to);h(f),h(b);let D=E.lineMetrics,M=D?Object.freeze({heightEm:D.heightEm,baselineEm:D.baselineEm}):void 0;if(M&&(!Number.isFinite(M.heightEm)||!Number.isFinite(M.baselineEm)||M.heightEm<=0||M.heightEm>4||M.baselineEm<0||M.baselineEm>M.heightEm))throw new RangeError("Font substitution line metrics must fit within a bounded em box");let q=h(f);if(t.has(q)||h$1.has(q)||o.has(q)||O.has(q))continue;O.add(q),k.push(Object.freeze({from:f,to:b,...M?{lineMetrics:M}:{}}));}catch(f){w.push(f);}}if((A>0||S>0)&&R.length===0&&k.length===0&&w.length>0)throw w.length===1?w[0]:new ce(w);let P=o.size;for(let x of h$1)o.has(x)&&(P-=1);if(P+O.size>b)throw new RangeError(`Font substitution count must not exceed ${b}`);let v;if(d!==void 0){let x=d.family,E=d.sizeHalfPoints;if(h({family:x,weight:400,style:"normal"}),!Number.isSafeInteger(E)||E<=0)throw new RangeError("Default font size must be a positive safe integer in half-points");v=Object.freeze({family:x,sizeHalfPoints:E});}if(g!==void 0&&(!Number.isSafeInteger(g)||g<0))throw new RangeError("Font configuration epoch must be a non-negative safe integer");if(p!==void 0&&typeof p!="string")throw new TypeError("Font shaping language must be a string");let T;if(m>0&&s)try{T=s(m);}catch(x){throw new Z(x)}let j;try{j=R.map(x=>f(x,i));}catch(x){throw T?.(),x}return {fragment:Object.freeze({supportedFamilies:V([e$1.supportedFamilies]),sources:Object.freeze(j),substitutions:Object.freeze(k),...g!==void 0?{epoch:g}:{},...u!==void 0?{maxFontBytes:u}:{},...v?{defaultFont:v}:{},...p!==void 0?{language:p}:{}}),sourceKeys:Object.freeze(F),ownedBytes:m,dropped:Object.freeze(w),releaseOwnedBytes:T}}function at(e){return !Number.isSafeInteger(e)||e<=0?0:e>c?c:e}function lt(e,t,n,o){let{committedSourceBytes:r,...s}=e,i=at(o);return {...s,defaultFamily:t,...n.length>0?{resolvedFaces:n}:{},...i>0?{committedSourceBytes:i}:{}}}function ae(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function Ke(e){if(e?.aborted)throw e.reason??new DOMException("Font resolution was aborted","AbortError")}function J(e,t,n,o){let r;try{typeof t=="function"&&t.name.length>0&&(r=t.name);}catch{}try{o instanceof Error&&o.stack;}catch{}let s=Object.freeze({originIndex:n,...r!==void 0?{originName:r}:{},cause:o});if(e.onOriginFailure)try{let a=e.onOriginFailure(s);Promise.resolve(a).catch(l=>{console.warn("[fonts] font-origin diagnostic callback failed",l);});return}catch(a){console.warn("[fonts] font-origin diagnostic callback failed",a);}let i="";try{o instanceof Error&&o.message.length>0&&(i=`: ${o.message}`);}catch{}console.warn(`[fonts] a font origin failed and was skipped${i}`,o);}var ct=256,ut=Object.freeze([]);function te(e){let t=new WeakMap;return (n,o)=>{let r=new Set;for(let s of n){let i=[{node:s,context:o,next:0}],a=l=>{i.pop();let c=i.at(-1)?.found??r;for(let u of l)c.add(u);};for(;i.length;){let l=i[i.length-1],c=t.get(l.node);if(c?.key===l.context.key){a(c.families);continue}if(!l.children){let g=e(l.node,l.context);l.children=g.children,l.found=new Set(g.families);}let u=l.children[l.next++];if(u){i.push({...u,next:0});continue}let d=l.found.size===0?ut:[...l.found];d.length<=ct&&rb(l.node)?t.set(l.node,{key:l.context.key,families:d}):t.delete(l.node),a(d);}}return [...r]}}function ne(e,t){return e.children.flatMap(n=>n.kind==="textValue"?[]:[{node:n,context:t}])}var He=new WeakMap,ft=4096;function Ye(e,t){let n=`${e.baseKey}|${e.depth+1}|${JSON.stringify(t)}`,o=He.get(e);o||He.set(e,o=new Map);let r=o.get(n);if(r)return r;let s={...e,depth:e.depth+1,cellStyle:t,key:n};return o.size<ft&&o.set(n,s),s}function dt(e,t){let{styles:n,theme:o,supplementalFamilies:r,depth:s}=t;if(e.kind==="table"){let l=Xd(e,468,s,n),c=[];for(let u of l?.rows??[])for(let d of u.cells){let g=Ye(t,d.styleFormatting);for(let p of d.blocks)c.push({node:p,context:g});}return {children:c.reverse()}}let i=new Set;if(e.kind==="paragraph"){let l=e.children.find(u=>u.kind==="paragraphProperties"),c=ld(n,l,t.cellStyle).runProperties;for(let u of kc(e,c,void 0,(d,g)=>od(d,g,n),void 0,void 0,"all-markup",void 0,void 0,o)){if(!u.text||u.fontSlot!=="eastAsia"&&!r.has(u.style.fontFamily??""))continue;let d=b$1((u.fontSlot==="eastAsia"?u.style.fontFamilyEastAsia:u.style.fontFamily)??void 0);d&&i.add(d);}}let a=e.localName==="txbxContent"?{...t,cellStyle:void 0,key:`${t.baseKey}|${s}|undefined`}:t;return {families:[...i],children:ne(e,a).reverse()}}function mt(){let e=te(dt),t,n,o=(s,i)=>{if(!t||n!==s||t.theme!==i){let a=kd(s,i);n=s,t={key:`${a.cacheToken}|0|undefined`,baseKey:a.cacheToken,styles:a,theme:i,depth:0,supplementalFamilies:new Set([...Object.values(i.majorSupplemental??{}),...Object.values(i.minorSupplemental??{})])};}return t};return Object.assign((s,i,a)=>e([...s].reverse(),o(i,a)),{warmTableRows(s,i,a,l,c){let u=o(l,c),d=Xd(s,468,u.depth,u.styles)?.rows??[];for(let g of d.slice(i,a))for(let p of g.cells)e(p.blocks,Ye(u,p.styleFormatting));return d.length}})}function Qt(e,t,n){return mt()(e,t,n)}function ue(e,t){return e.attributes.find(n=>n.localName===t)?.value}var gt=te((e,t)=>{let n=[];if(e.namespaceUri===la){if(e.localName==="fldSimple"){let o=Yc(ue(e,"instr")??"")?.font;o&&n.push(o);}if(e.localName==="p")for(let o of yt(e))n.push(o);}return {families:n,children:ne(e,t)}});function fn(e){let t=new Map;for(let n of gt(e,{key:""})){let o=b$1(n);o!==null&&!t.has(o.toLowerCase())&&t.set(o.toLowerCase(),o);}return [...t.values()]}function yt(e){let t=[],n=Xb(),o=[];for(let r=e.children.length-1;r>=0;r-=1){let s=e.children[r];s.kind!=="textValue"&&o.push({node:s,containerDepth:0});}for(;o.length>0;){let{node:r,containerDepth:s}=o.pop();if(s>=wa||r.namespaceUri===la&&r.localName==="p")continue;if(r.namespaceUri===la&&r.localName==="fldChar"){let a=ue(r,"fldCharType");a==="begin"?_b(n):a==="separate"?(n.nesting===1&&Ge(n,t),ac(n)):a==="end"&&(n.nesting===1&&Ge(n,t),bc(n));continue}if(r.namespaceUri===la&&(r.localName==="instrText"||r.localName==="delInstrText")){$b(n,pt(r),r.localName==="delInstrText");continue}if(r.namespaceUri===la&&r.localName==="fldSimple"){let a=Yc(ue(r,"instr")??"");a?.font&&t.push(a.font);}let i=xa(r,s);for(let a=r.children.length-1;a>=0;a-=1){let l=r.children[a];l.kind!=="textValue"&&o.push({node:l,containerDepth:i});}}return Yb(n),t}function Ge(e,t){let n=Zb(e);if(n.overflow)return;let o=Yc(n.instruction);o?.font&&t.push(o.font);}function pt(e){let t="",n=[...e.children].reverse();for(;n.length>0&&t.length<=256;){let o=n.pop();if(o.kind==="textValue")t+=o.value;else for(let r=o.children.length-1;r>=0;r-=1)n.push(o.children[r]);}return t}var Ft=()=>true,ht=/[ᄀ-ᇿ⺀-鿿ꥠ-가-豈-︰-﹏-]/u;function dn(e,t,n,o){if(!t)return [];let r=nc(t),s=kd(n,o),i=new Map;for(let a of e)for(let l of bt(a)){let c=Yc$1(l.children),u=d=>{if(d)for(let g of d.values()){let p=g.markerText===void 0||ht.test(g.markerText);for(let A of [g.markerStyle.fontFamily,p?g.markerStyle.fontFamilyEastAsia:null]){let S=b$1(A??void 0);if(S===null)continue;let C=S.toLowerCase();i.has(C)||i.set(C,S);}}};u(Ac(c,r,s,Ft));for(let d of c){let g=_e(d);for(let p of g.contents)u(Ze$1(p,r,s));}}return [...i.values()].sort((a,l)=>a.localeCompare(l))}function bt(e){if(e.localName==="document"){for(let t of e.children)if(t.kind!=="textValue"&&t.localName==="body")return [t];return []}if(e.localName==="footnotes"||e.localName==="endnotes"){let t=[];for(let n of e.children)n.kind!=="textValue"&&(n.localName==="footnote"||n.localName==="endnote")&&t.push(n);return t}return [e]}var xt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",Je=256,wt=31;function X(e,t){return e.kind!=="textValue"&&e.localName===t&&e.namespaceUri===la}function oe(e,t){return e.attributes.find(n=>n.localName===t&&n.namespaceUri===la)?.value}function Qe(e){let t=(e.relationships.get(e.mainDocumentPart)??[]).find(s=>s.type===xt),n=t?J$1(t):void 0,r=((n?.mode==="Internal"&&n.target.ok?e.parts.get(n.target.partName):void 0)??e.parts.get("/word/fontTable.xml"))?.root;return r&&X(r,"fonts")?r:void 0}function We(e,t){let n=e.children.find(o=>X(o,t));return n&&n.kind!=="textValue"?oe(n,"val"):void 0}function Ze(e){let t=Qe(e),n=new Map;if(!t)return n;let o=0;for(let r of t.children){if(!X(r,"font"))continue;if(++o>Je)break;let s=a$1(oe(r,"name"));if(!s)continue;let i=O(We(r,"family"),We(r,"pitch")),a=s.trim().toLowerCase();i&&!n.has(a)&&n.set(a,i);}return n}function et(e){let t=Qe(e),n=new Map;if(!t)return n;let o=0;for(let r of t.children){if(!X(r,"font"))continue;if(++o>Je)break;let s=a$1(oe(r,"name"));if(!s)continue;let i=r.children.find(u=>X(u,"altName")),a=i&&i.kind!=="textValue"?oe(i,"val"):void 0,l=a!==void 0&&a.length<=wt?a$1(a):null,c=s.trim().toLowerCase();l&&!n.has(c)&&n.set(c,l);}return n}function vn(e,t,n){let o=new Set,r=new Map;for(let s of e.substitutions??[]){let i=s.from.family.trim().toLowerCase();r.has(i)||r.set(i,s.to.family.trim().toLowerCase());}for(let s of e.substitutions??[]){let i=s.from.family.trim().toLowerCase(),a=s.to.family.trim().toLowerCase(),l=[t.alternates.get(i),t.fallbacks.get(i)].some(c=>{let u=c?.trim().toLowerCase();return u!==void 0&&u!==i&&(u===a||r.get(u)===a)});a!==i&&l&&!(n.resolve(s.from)instanceof d)&&o.add(s.from.family.toLowerCase());}return o}function St(e,t){return e.attributes.find(n=>n.localName===t&&n.namespaceUri===la)?.value}var Et=new Set(["document","hdr","ftr","footnotes","endnotes","comments","styles","numbering","glossaryDocument"]),Ot=new Set(["t","delText","instrText","delInstrText"]),Ct=2e6;function Rt(e,t){let n=e.stylesRoot(),o=e.documentThemeFonts(),r=[...y(n),...n?Jb(n).run:[]],s=ca(r,o),i=a$1(s.fontFamily??void 0)??t,a=a$1(Lb([{text:"\xE9",props:r,style:s,start:0,end:1}],o)[0]?.style.fontFamily??void 0)??i,l=a$1(s.fontFamilyEastAsia??void 0),c=a$1(s.complexLane?.fontFamily??void 0)??o.minorBidi??t,u=Ze(e.currentPackage()),d=m=>u.get(m.trim().toLowerCase())??P(m),g=(m,F)=>{let h=d(m);if(!h)return F;let R=d(F);return R===void 0||R===h?F:Q$1[h]},p=new Map,A=new Map,S=0;for(let m of e.currentPackage().parts.values()){if(m.root.namespaceUri!==la||!Et.has(m.root.localName))continue;let F=[m.root];for(;F.length>0&&S<Ct;){S++;let h=F.pop();if(h.kind!=="textValue"){if(h.namespaceUri===la){if(Ot.has(h.localName))continue;if(h.localName==="rFonts"){for(let[R,w]of [["ascii",i],["hAnsi",a],["eastAsia",l],["cs",c]]){let O=a$1(St(h,R));if(!O||!w)continue;let k=O.trim().toLowerCase(),P=p.get(k)??new Set,v=R==="ascii"||R==="hAnsi",T=v?g(O,w):w;if(P.add(T),p.set(k,P),v&&d(O)){let j=A.get(k)??new Set;j.add(T),A.set(k,j);}}continue}}for(let R of h.children)F.push(R);}}}for(let m of a$2)p.delete(m);let C=new Map,L=[];for(let[m,F]of p){let h=A.get(m);F.size===1?C.set(m,[...F][0]):h?.size===1?C.set(m,[...h][0]):L.push(m);}return {fallbacks:C,ambiguousFamilies:L,defaults:new Map([...p].map(([m,F])=>[m,[...F]]))}}function kt(e,t,n=[],o="Calibri"){let r=et(e.currentPackage()),s=Rt(e,o),i=t.flatMap(c=>{let u=r.get(c.trim().toLowerCase());return u?[u]:[]}),a=new Map,l=t.flatMap(c=>s.defaults.get(c.trim().toLowerCase())??[]).filter(c=>c.trim().toLowerCase()!==o.trim().toLowerCase());for(let c of [...t,...i,...n,...l]){let u=a$1(c);if(u&&!a.has(u.trim().toLowerCase())&&a.set(u.trim().toLowerCase(),u),a.size===Ue)break}return {families:[...a.values()],alternates:r,fallbacks:s.fallbacks,ambiguousFamilies:s.ambiguousFamilies}}function Mn(e,t,n){let o=W(n),r=kt(e,t,[],o);return {plan:r,request:{families:r.families,defaultFamily:o}}}function Nn(e,t,n=t.fallbacks){let o=new Map(e.sources.map(c=>[h(c.request),c.request])),r=[],s=new Set((e.substitutions??[]).map(c=>h(c.from))),i=new Map((e.substitutions??[]).map(c=>[h(c.from),c])),a=c=>{let u=o.get(h(c));if(u)return {to:u};let d=i.get(h(c)),g=d&&o.get(h(d.to));if(!(!d||!g))return d.lineMetrics?{to:g,lineMetrics:d.lineMetrics}:{to:g}},l=Math.max(0,b-s.size);for(let c of t.families){let u=c.trim().toLowerCase(),d=t.alternates.get(u),g=n.get(u);for(let p of [400,700])for(let A of ["normal","italic"]){let S={family:c,weight:p,style:A};if(o.has(h(S)))continue;let C=i.has(h(S));for(let L of [d,g]){if(!L||L.trim().toLowerCase()===u)continue;let m={family:L,weight:p,style:A},F=o.get(h(m)),h$1=C?F?{to:F}:void 0:a(m);if(h$1){if(!s.has(h(S))){if(l===0)break;l--;}r.push({from:S,...h$1});break}}}}return G({...e,substitutions:[...r,...e.substitutions??[]]})}function _n(e,t,n){let o=new Set((e.substitutions??[]).map(s=>h(s.from))),r=new Set;for(let s of t.substitutions??[]){if(o.has(h(s.from)))continue;let i=s.from.family.trim().toLowerCase(),a=s.to.family.trim().toLowerCase();[n.alternates.get(i),n.fallbacks.get(i)].some(c=>c?.trim().toLowerCase()===a)||r.add(i);}return r}function Ln(e,t){let n=new Map;for(let[o,r]of e)t(o)||n.set(o,r);return n}var Tt={regular:{weight:400,style:"normal"},bold:{weight:700,style:"normal"},italic:{weight:400,style:"italic"},boldItalic:{weight:700,style:"italic"}};function Bn(e,t){let n=[],o=[],r=0;for(let s of e){let i=s.bytes.byteLength;if(!Number.isSafeInteger(i)||i>t||i>a||i>c-r){o.push(s);continue}r+=i,n.push(s);}return {sources:n,dropped:o}}function Dn(e,t,n){let o=t.reduce((s,i)=>s+i.bytes.byteLength,0),r=new Set(t.filter(s=>s.request.family.trim().length>0).map(s=>h(s.request)));return At(e,{maxFontBytes:n,aggregateBudget:Math.max(0,c-o),shadowedRequests:r})}function At(e,t){let n=[],o=[],r=t.aggregateBudget,s=new Set;for(let i of e){let a=Tt[i.style],l=Object.freeze({family:i.family,weight:a.weight,style:a.style});if(i.family.trim().length===0){o.push({request:l,partName:i.partName,reason:"malformed"});continue}let c=h(l);if(!(t.shadowedRequests?.has(c)||s.has(c))){if(s.add(c),i.bytes.byteLength>t.maxFontBytes||i.bytes.byteLength>r){o.push({request:l,partName:i.partName,reason:"overLimit"});continue}r-=i.bytes.byteLength,n.push({request:l,id:`embedded:${i.partName}#${i.style}`,bytes:i.bytes,hash:f$1(i.bytes),faceIndex:0});}}return {sources:n,dropped:o}}
|
|
2
|
+
export{_n as A,Ln as B,Bn as C,Dn as D,At as E,V as a,_t as b,Ue as c,ie as d,Lt as e,G as f,W as g,ot as h,Ve as i,zt as j,jt as k,le as l,ce as m,Ut as n,$t as o,te as p,ne as q,mt as r,Qt as s,fn as t,yt as u,dn as v,vn as w,kt as x,Mn as y,Nn as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkWO4V6PNS_cjs=require('./chunk-WO4V6PNS.cjs');function U(e){return e.kind!=="textValue"}function k(e,t){for(let l of e.children)if(U(l)&&l.localName===t)return l}function _(e,t){return e.attributes.find(l=>l.localName===t)?.value}function Y(e){let t=k(e,"pPr"),l=t?k(t,"outlineLvl"):void 0;if(l){let i=_(l,"val");return i!==void 0&&/^[0-8]$/.test(i)?Number(i):null}let n=k(e,"name"),o=n?/^heading\s+([1-9])$/i.exec(_(n,"val")?.trim()??""):null;return o?Number(o[1])-1:null}function h(e,t=0,l=e.length,n){let o=new Set,i=new Map,d=new Map,a=n?[n]:[];n&&o.add(n);for(let s=t;s<l;s+=1){let r=e[s].node;if(chunkWO4V6PNS_cjs.vf(r,"begin")){a.push(r.id);continue}if(chunkWO4V6PNS_cjs.vf(r,"separate")){let u=a[a.length-1];u&&(o.add(u),i.set(r.id,u));continue}if(chunkWO4V6PNS_cjs.vf(r,"end")){let u=a.pop();u&&(o.add(u),d.set(r.id,u));}}return {activeBegins:o,separateBegin:i,endBegin:d}}function b(e,t,l){if(chunkWO4V6PNS_cjs.vf(l,"begin"))return t.activeBegins.has(l.id)&&e.push({beginId:l.id,separated:false}),true;if(chunkWO4V6PNS_cjs.vf(l,"separate")){let n=t.separateBegin.get(l.id),o=e[e.length-1];return n&&o?.beginId===n&&(o.separated=true),true}if(chunkWO4V6PNS_cjs.vf(l,"end")){let n=t.endBegin.get(l.id),o=e[e.length-1];return n&&o?.beginId===n&&e.pop(),true}return false}function g(e){for(let t of e)if(!t.separated)return false;return true}function K(e,t){let l=[];chunkWO4V6PNS_cjs.Hf(e,l,t);let n=h(l),o=[];return {consume:i=>b(o,n,i),visible:()=>g(o)}}var j=4096,L=chunkWO4V6PNS_cjs.If*16;function O(){return {out:[],runs:[],symbols:[],symbolDisplays:[],length:0}}function v(e,t,l,n){if(t.length===0||l===n)return;let o=e.runs[e.runs.length-1];if(o?.runId===t&&o.end===l){e.runs[e.runs.length-1]={runId:t,start:o.start,end:n};return}e.runs.push({runId:t,start:l,end:n});}function C(e,t,l,n){let o=chunkWO4V6PNS_cjs.Gf(t);if(o.length>n.left)return false;if(n.left-=o.length,o.length>0){let i=e.length;chunkWO4V6PNS_cjs.eb(t)&&(e.symbols.push(i),e.symbolDisplays.push(chunkWO4V6PNS_cjs.ck(t))),e.out.push(o),e.length+=o.length,v(e,l,i,e.length);}return true}function X(e,t){let l=e.length;t.text.length>0&&e.out.push(t.text),e.length+=t.text.length;for(let n of t.runs)v(e,n.runId,l+n.start,l+n.end);for(let n of t.symbols??[])e.symbols.push(l+n);for(let n of t.symbolDisplays??[])e.symbolDisplays.push(n);}function N(e){let t=e.out.join("");return e.symbols.length>0?{text:t,runs:e.runs,symbols:e.symbols,symbolDisplays:e.symbolDisplays}:{text:t,runs:e.runs}}var H=Object.freeze({text:"",runs:[]});function M(){return {text:chunkWO4V6PNS_cjs.qf,runs:[]}}function $(e,t,l,n){let o=[];if(!chunkWO4V6PNS_cjs.Hf(e,o,l))return null;let i=o.reverse(),d=O();for(;i.length>0;){let a=i.pop();if(!(t==="original"&&a.hiddenInOriginal)){if(chunkWO4V6PNS_cjs.yf(a.node)){let s=[];if(!chunkWO4V6PNS_cjs.Hf(a.node,s,l))return null;for(let r=s.length-1;r>=0;r-=1)i.push(s[r]);continue}if(!chunkWO4V6PNS_cjs.wf(a.node)&&!C(d,a.node,a.runId,n))return null}}return N(d)}function z(e,t,l,n,o){let i=O(),d=[],a=h(e);for(let s of e){let r=s.node;if(!b(d,a,r)&&!chunkWO4V6PNS_cjs.wf(r)&&g(d)&&!(t==="original"&&s.hiddenInOriginal)){if(chunkWO4V6PNS_cjs.yf(r)){let u=o>=chunkWO4V6PNS_cjs.Jf?$(r,t,l,n):V(r,t,l,n,o+1);if(u===null)return null;X(i,u);continue}if(!C(i,r,s.runId,n))return null}}return N(i)}function V(e,t,l,n,o){let i=[];return chunkWO4V6PNS_cjs.Hf(e,i,l)?z(i,t,l,n,o):null}function G(e,t,l){let n=t.node;return e.owned.has(n.id)&&(e.nodesLeft-=1,e.nodesLeft<0&&(e.overflow=true)),n.id===e.endId?true:(n.id===e.span.node.id||b(e.states,e.markers,n)||e.overflow||chunkWO4V6PNS_cjs.wf(n)||chunkWO4V6PNS_cjs.yf(n)||!e.owned.has(n.id)||!g(e.states)||l==="original"&&t.hiddenInOriginal||C(e.result,n,t.runId,e.chars)||(e.overflow=true),false)}function te(e,t,l="allMarkup"){let n=new Map,o=new Map,i=new Map;for(let r of t)r.kind==="complex"?o.set(r.node.id,r):i.set(r.node.id,r);let d=[];chunkWO4V6PNS_cjs.Hf(e,d);let a=new Map;for(let r=0;r<d.length;r+=1)a.set(d[r].node.id,r);let s=null;for(let r=0;r<d.length;r+=1){let u=d[r],y=i.get(u.node.id);if(y)if(s!==null&&!g(s.states))n.set(y.node.id,H);else {let f={left:j},I={left:L},m=V(y.node,l,f,I,0);n.set(y.node.id,m??M());}if(s===null){let f=o.get(u.node.id);if(!f)continue;let I=new Set(f.removeNodeIds),m=-1;for(let S=f.removeNodeIds.length-1;S>=0;S-=1){let x=a.get(f.removeNodeIds[S]);if(!(x===void 0||x<=r)&&chunkWO4V6PNS_cjs.vf(d[x].node,"end")){m=x;break}}let w=d[m];if(!w){n.set(f.node.id,M());continue}s={span:f,owned:I,states:[{beginId:f.node.id,separated:false}],markers:h(d,r+1,m,f.node.id),endId:w.node.id,result:O(),chars:{left:L},nodesLeft:j,overflow:false};}G(s,u,l)&&(n.set(s.span.node.id,s.overflow?M():N(s.result)),s=null);}return s!==null&&n.set(s.span.node.id,M()),n}exports.a=Y;exports.b=K;exports.c=j;exports.d=te;
|