@docx-editor.dev/core 2.33.0 → 2.34.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 +11 -11
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +13 -13
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-CrPI9ZQc.d.ts → chrome-print-DY0xsXm_.d.ts} +163 -112
- package/dist/{chunk-X34QRAUU.cjs → chunk-37IYWENL.cjs} +1 -1
- package/dist/chunk-37RNWL45.js +4 -0
- package/dist/chunk-5HUVQXET.cjs +4 -0
- package/dist/chunk-5JP3QQF7.js +7 -0
- package/dist/chunk-5KOLFKOB.cjs +5 -0
- package/dist/chunk-6MF5PN2E.js +236 -0
- package/dist/chunk-77JT2AU7.js +2 -0
- package/dist/{chunk-2F2UEAE2.js → chunk-7FUORGCW.js} +1 -1
- package/dist/chunk-A5BTVPET.cjs +236 -0
- package/dist/chunk-AFXFH2T2.js +3 -0
- package/dist/chunk-AVCYP7OY.js +5 -0
- package/dist/chunk-BL2E4QRA.js +1 -0
- package/dist/chunk-DB7X4Y6O.js +4 -0
- package/dist/chunk-DR6W23TB.cjs +2 -0
- package/dist/{chunk-2DR4TH6B.js → chunk-DYLB5U42.js} +1 -1
- package/dist/chunk-E5BKDHIP.cjs +1 -0
- package/dist/chunk-IWXBRUPG.cjs +4 -0
- package/dist/{chunk-L3YXJDPX.js → chunk-KCUXXO3Q.js} +1 -1
- package/dist/chunk-KYA4Y2YB.js +1 -0
- package/dist/{chunk-PXMTQ73F.cjs → chunk-L74TCGVH.cjs} +1 -1
- package/dist/chunk-NBSSQSKY.js +30 -0
- package/dist/{chunk-RFUNFTGV.cjs → chunk-NEM774E3.cjs} +1 -1
- package/dist/chunk-NKZVMMHU.cjs +1 -0
- package/dist/chunk-TXIO5WYQ.cjs +32 -0
- package/dist/chunk-UKG2TXWH.cjs +7 -0
- package/dist/chunk-V7CO55DO.cjs +3 -0
- package/dist/chunk-VLQDQNSS.js +1 -0
- package/dist/chunk-VQOAC3VI.cjs +30 -0
- package/dist/chunk-YWJSQA2O.js +32 -0
- package/dist/chunk-ZJ74LCFI.cjs +1 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +3 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +2 -2
- package/dist/contracts/document.d.ts +2 -2
- package/dist/contracts/editor.d.ts +9 -9
- package/dist/contracts/modules.d.ts +11 -11
- package/dist/contracts/types.d.ts +3 -3
- package/dist/{custom-node-writes-AqY5KpVx.d.ts → custom-node-writes-DparEcZK.d.ts} +45 -7
- package/dist/{diagnostic-context-CuzhOX0g.d.ts → diagnostic-context-CkZKkKvB.d.ts} +1 -1
- package/dist/{diagnostic-hints-BtCaCqQC.d.ts → diagnostic-hints-BTyb8yzX.d.ts} +1 -1
- package/dist/{document-protection-BvbpSXbQ.d.ts → document-protection-DdWxihIN.d.ts} +1 -1
- package/dist/{drawing-graphic-kind-CXYGYbB3.d.ts → drawing-graphic-kind-CK0cMc7H.d.ts} +91 -18
- package/dist/{drawing-preview-package-B9lSLRg4.d.ts → drawing-preview-package-fFjXpOMS.d.ts} +1 -1
- package/dist/{editor-B7OOAAie.d.ts → editor-DDCkWqfD.d.ts} +47 -15
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +2 -2
- package/dist/editor.d.ts +200 -75
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +8 -8
- package/dist/export.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +20 -20
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-Ci_BTnSU.d.ts → layout-shaping-Byj-TwsI.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +289 -129
- package/dist/layout.js +1 -1
- package/dist/{metafile-drawing-DtMFyMKq.d.ts → metafile-drawing-Ce6TuWLm.d.ts} +9 -1
- package/dist/{note-properties-DCIJUKIy.d.ts → note-properties-BiunaIQa.d.ts} +31 -7
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +76 -12
- package/dist/output.js +1 -1
- package/dist/{protocol-Cp_QzVxS.d.ts → protocol-Dn44dL4M.d.ts} +184 -120
- package/dist/{review-paragraph-order-BJQ43_r0.d.ts → review-paragraph-order-BWMXAKuA.d.ts} +1 -1
- package/dist/{revision-projection-OVusTS77.d.ts → revision-projection-DwFhgIR0.d.ts} +1 -1
- package/dist/{semantic-cell-selection-CoI5hHBm.d.ts → semantic-cell-selection-DhalxEBH.d.ts} +2 -2
- package/dist/{semantic-interaction-BbA4dgEo.d.ts → semantic-interaction-QeuzEtAk.d.ts} +2 -4
- package/dist/{semantic-paint-B5JcIv9c.d.ts → semantic-paint-BYDZbTiY.d.ts} +4 -4
- package/dist/{semantic-record-queries-DnO8J5_j.d.ts → semantic-record-queries-Bf5bgQL3.d.ts} +1 -1
- package/dist/{semantic-records-DoK0lNjS.d.ts → semantic-records-CzZiWMY8.d.ts} +99 -94
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +31 -16
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-Df4oY2u4.d.ts → tree-op-types-DKvJSH8T.d.ts} +204 -147
- package/dist/{tree-package-store-DXhX1PE-.d.ts → tree-package-store-Cl3BkWXF.d.ts} +1 -1
- package/dist/{tree-session-contract-CF2625mv.d.ts → tree-session-contract-BL50pqs8.d.ts} +14 -7
- package/dist/{unsupported-elements-CUojsaCr.d.ts → unsupported-elements-Bra4QTOM.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-23MKR33J.js +0 -4
- package/dist/chunk-2DEY5NUC.cjs +0 -32
- package/dist/chunk-2GPGAFOJ.cjs +0 -5
- package/dist/chunk-ALD626VU.cjs +0 -2
- package/dist/chunk-AU33YWEJ.js +0 -236
- package/dist/chunk-AXU63LYW.cjs +0 -1
- package/dist/chunk-CM5VZRBV.js +0 -32
- package/dist/chunk-D7FAFFTN.js +0 -1
- package/dist/chunk-DYUVJNDD.cjs +0 -1
- package/dist/chunk-ESYUKD5D.js +0 -2
- package/dist/chunk-F7TGQMVR.js +0 -5
- package/dist/chunk-FLW7KIQX.js +0 -30
- package/dist/chunk-JG4A6W6I.js +0 -7
- package/dist/chunk-JNGLSBPH.js +0 -2
- package/dist/chunk-KE6ZWRIY.cjs +0 -236
- package/dist/chunk-LI42N7OW.cjs +0 -4
- package/dist/chunk-PLKDS4JT.js +0 -1
- package/dist/chunk-R4R3AAE4.js +0 -1
- package/dist/chunk-SVM6PGMS.js +0 -3
- package/dist/chunk-SZURLHR3.cjs +0 -3
- package/dist/chunk-UYCGCVZ2.cjs +0 -1
- package/dist/chunk-XNBYG4XJ.cjs +0 -30
- package/dist/chunk-ZDFJW5XS.cjs +0 -2
- package/dist/chunk-ZWO4JHNN.cjs +0 -7
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import {f,c,d,e}from'./chunk-RIYSCEFQ.js';import {Te,n,l,p,j as j$1,k,r,i,o,A as A$1,B,C,x,u,a,g,f as f$2,ya as ya$1,Ca as Ca$1,eb,Oa as Oa$1,xf,wf,w,O,N,ra as ra$1,y,ta as ta$1,id,gd,Yc,vc,fe as fe$1,lb,q as q$1,dc,ac,$b,ab,Ja as Ja$1,cd,bc,t,b,e as e$1,c as c$1,m,Ra as Ra$1,Ya as Ya$1,tf,Nd,he as he$1,ee,Vc,hd,Ka as Ka$1,ec,h,sa,Ia as Ia$1}from'./chunk-YWJSQA2O.js';import {f as f$1,sn,jc,hc,mc,ic,gj,vn as vn$1,un,tn,Xb,fc,c as c$2,he as he$2,b as b$1}from'./chunk-6MF5PN2E.js';var zr=(e,t,n)=>{let r=e<0n,o=r?-e:e,a=o/t,i=o%t;if(n!=="towardZero"){let l=i*2n;(l>t||l===t&&(n==="halfAwayFromZero"||n==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let s=r?-a:a,c=Number(s);if(!Number.isSafeInteger(c))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return c},ct=(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,s=(a-i)/t;return r!=="towardZero"&&(i>t-i||i===t-i&&(r==="halfAwayFromZero"||r==="halfToEven"&&s%2!==0))&&(s+=1),n(s===0?0:o<0?-s:s)}return n(zr(BigInt(e)*BigInt(n$1),BigInt(t),r))},Sn=(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=>ct(i,a,o,r)},xn=(e,t,n)=>{let r=t*n,o=e*2;return a=>a*r/o};var Pe=(e,t)=>e[t]<<8|e[t+1],bn=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0;function Dr(e,t){let n=(s,c)=>s>=0&&s+c<=e.length;if(!n(0,12))return false;let a=String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"&&n(12+t*4,4)?bn(e,12+t*4):0;if(!n(a,12))return false;let i=Pe(e,a+4);for(let s=0;s<i;s+=1){let c=a+12+s*16;if(!n(c,16))return false;if(!(e[c]===99&&e[c+1]===109&&e[c+2]===97&&e[c+3]===112))continue;let u=bn(e,c+8);if(!n(u,4))return false;let y=Pe(e,u+2);for(let f=0;f<y;f+=1){let p=u+4+f*8;if(!n(p,4))return false;if(Pe(e,p)===3&&Pe(e,p+2)===0)return true}return false}return false}var Rn=new WeakMap;function Fn(e,t){let n=Rn.get(e);return n===void 0&&(n=Dr(t,e.faceIndex),Rn.set(e,n)),n}function Cn(e){let t="",n=false;for(let r=0;r<e.length;r+=1){let o=e.charCodeAt(r);o>=32&&o<=255?(t+=String.fromCharCode(61440+o),n=true):t+=e[r];}return n?t:e}var Hr=4096,En=e=>typeof e=="number"?String(e):JSON.stringify(e)??typeof e,ke=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>=Hr&&(this.#e.clear(),this.onRestart()),o=this.#e.size,this.#e.set(r,o));let a=`${o}\0${En(t$1.fontSizeHalfPoints)}\0${En(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 ie=Object.freeze({name:"HarfBuzz",version:"14.4.0"}),ye=null,fe=null;function ut(){return ye?Promise.resolve():fe||(fe=import('./dist-PKZR6RSH.js').then(e=>{let t=e.versionString();if(t!==ie.version)throw new A("shapingLibraryMismatch",{diagnostic:f(ie.version,t)});ye=e;}).catch(e$1=>{throw fe=null,e$1 instanceof A?e$1:c(e$1)?new A("unsupportedRuntime",{diagnostic:d(e$1),cause:e$1}):new A("wasmUnavailable",{diagnostic:e(e$1),cause:e$1})}),fe)}function Gr(){return ye!==null}function Ur(){if(!ye)throw new A("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return ye}var A=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;}},Kr=16*1024*1024,Wr=1e6,Vr=1e6,jr=1e6,Xr=4,Yr=512,$r=1024*1024,qr=16*1024*1024,Zr=32*1024*1024,Jr=64*1024*1024,Qr=64*1024*1024,eo=1e6,to=1e6,no=1e6,ro=64,oo=4096,ao=4*1024*1024,io=64*1024*1024,so=64*1024*1024,co=256*1024*1024,lo=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),vn=["cmap","head","hhea","hmtx","maxp"],uo=(e,t)=>e[t]<<8|e[t+1],po=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,fo=(e,t)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?po(e,12+t*4):0,mo=(e,t)=>{let n=fo(e,t),r=uo(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},yo=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),ho=(e,t)=>{let n=l(e,t);if(!n.valid)return n;let r=mo(e,t);for(let o of vn)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},dt=ho,U=(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},go=(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,s=t[o].advanceX;for(;i<t.length&&t[i].cluster===a;)s+=t[i].advanceX,i+=1;let c=n(s);r.push({textStart:a,textEnd:n$1==="rtl"?t[o-1]?.cluster??e.length:t[i]?.cluster??e.length,glyphStart:o,glyphEnd:i,advance:c,caretEdges:Object.freeze([n(0),c]),fontSpan:0}),o=i;}return r},V=64,$=8,q=8,Ln=32,pt=V+2*$,So=V+$+q,xo=V+$+2*q,bo=V+$+q,Tn=V+8*$,Bn=V+8*q+$,Ro=V+6*q+$,Fo=V+3*q+2*$,Co=V+3*q,he=e=>V+e.length*Uint16Array.BYTES_PER_ELEMENT,ft=e=>bo+he(e),me=e=>Ln+e*$,Eo=(e,t)=>pt+he(e)+So+ft(t),vo=e=>Tn+he(e)+me(e.length)+e.length*Bn,Lo=e=>{let t=new Set(e.glyphs.map(n=>n.outline));return Tn+he(e.text)+me(e.glyphs.length)+e.glyphs.length*Bn+me(e.clusters.length)+e.clusters.length*Ro+e.clusters.reduce((n,r)=>n+me(r.caretEdges.length),0)+me(e.fontSpans.length)+e.fontSpans.length*Fo+(e.exactAdvancesX===void 0?0:Ln+e.exactAdvancesX.length*q)+Co+[...t].reduce((n,r)=>n+ft(r.path),0)},To=(e,t)=>pt+he(e)+xo+t,lt=class{#e;#p;#f;#m;#y;#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 ke(()=>{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=U(n.maxFontBytes??Kr,"maximum font bytes",Qr),this.#f=U(n.maxInputUtf16??Wr,"maximum input UTF-16 code units",eo),this.#m=U(n.maxCodepoints??Vr,"maximum input code points",to),this.#y=U(n.maxGlyphs??jr,"maximum shaped glyphs",no),this.#h=U(n.maxCachedFontBytes??64*1024*1024,"maximum cached font bytes",64*1024*1024),this.#R=U(n.maxCachedFaces??Xr,"maximum cached faces",ro),this.#F=U(n.maxCachedShapes??Yr,"maximum cached shape results",oo),this.#g=U(n.maxOutlineBytes??$r,"maximum outline bytes",ao),this.#S=U(n.maxCachedOutlineBytes??qr,"maximum cached outline bytes",io),this.#c=U(n.maxShapedRunBytes??Zr,"maximum shaped run bytes",so),this.#x=U(n.maxCachedShapeBytes??Jr,"maximum cached shape bytes",co),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;}#v(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 u of vn)if(!o.has(u))throw new A("malformedFont",{diagnostic:`missing required ${u} table`});this.#t?.onByteCopy?.();let a=new this.#e.Blob(yo(n)),i=new this.#e.Face(a,t.faceIndex),s=new this.#e.Font(i),c=s.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(c.ascender)||!Number.isSafeInteger(c.descender)||!Number.isSafeInteger(c.lineGap))throw new A("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});s.setScale(i.upem,i.upem);let l={identity:t.identity,blob:a,face:i,font:s,unitsPerEm:i.upem,byteLength:n.byteLength};if(n.byteLength<=this.#h){for(;this.#o.size>=this.#R||this.#l+n.byteLength>this.#h;){let u=this.#o.keys().next().value;if(u===void 0)break;this.#l-=this.#o.get(u).byteLength,this.#o.delete(u),this.#u?.(Object.freeze({kind:"evicted",identity:u}));}this.#o.set(t.identity,l),this.#l+=n.byteLength;}return this.#u?.(Object.freeze({kind:"created",identity:t.identity})),l}#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=ft(o);if(a>this.#g)throw new A("outlineOverLimit",{limit:this.#g,actual:a});let i=Object.freeze({path:o,unitsPerEm:t.unitsPerEm}),s=Eo(t.identity,o)+3*pt+2*q;if(s>this.#S)return this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#a})),i;for(;this.#a+s>this.#S;){let u=this.#s.keys().next().value;if(u===void 0)break;this.#s.delete(u);let y=this.#i.get(u.identity);y.delete(u.glyphId),y.size===0&&this.#i.delete(u.identity),this.#a-=u.bytes,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#a}));}let c=this.#i.get(t.identity);c||this.#i.set(t.identity,c=new Map);let l={outline:i,bytes:s,identity:t.identity,glyphId:n};return c.set(n,l),this.#s.set(l,void 0),this.#a+=s,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#a})),i}#E(t){if(t.length>this.#f)throw new A("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.#m)throw new A("codepointsOverLimit",{limit:this.#m,actual:n})}}shape(t){if(!this.#d)throw new A("disposed");if(k(t.environment.font),t.environment.font.byteLength>this.#p)throw new A("fontOverLimit",{limit:this.#p,actual:t.environment.font.byteLength});this.#E(t.text);let n$1=vo(t.text);if(n$1>this.#c)throw new A("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!==ie.name||r$1.shapingLibrary.version!==ie.version)throw new A("shapingLibraryMismatch");if(r$1.normalization!=="none")throw new A("unsupportedNormalization");if(!Number.isSafeInteger(t.bidiLevel)||t.bidiLevel<0||(t.bidiLevel&1)===1!=(r$1.direction==="rtl"))throw new A("invalidBidiLevel");if(Object.keys(r$1.variationAxes).length>0)throw new A("unsupportedVariationAxes");if(r$1.fallbackOrder.length>0)throw new A("unsupportedFallback");let i$1=i(r$1.font),s=j$1(r$1.font);if([...lo].some(p=>s.has(p))&&!s.has("glyf")&&!s.has("CFF "))throw new A("unsupportedColorFont");let c=t.text;this.#E(c);let l=t.context?.before??"",u$1=t.context?.after??"",y=o,f=Math.max(String(l).length,String(u$1).length);if(typeof l!="string"||typeof u$1!="string"||f>y)throw new A("textOverLimit",{limit:y,actual:f});try{let p=this.#v(r$1.font,i$1),{face:g,font:h}=p,d=this.#d;d.reset();let S=Fn(r$1.font,i$1)?Cn:String,x$1=l+c+u$1,R=A$1(x$1)?B(p):void 0,L=M=>S(R?C(M,R):M);l||u$1?d.addText(L(l+c+u$1),l.length,c.length):d.addText(L(c)),d.setDirection(r$1.direction==="rtl"?this.#e.Direction.RTL:this.#e.Direction.LTR),d.setScript(r$1.script),d.setLanguage(r$1.language),d.setClusterLevel(this.#e.ClusterLevel.MONOTONE_CHARACTERS);let E=Object.entries(r$1.features).map(([M,G])=>new this.#e.Feature(M,G));if((r$1.features.kern??1)!==0)for(let[M,G]of x(l+c+u$1))E.push(new this.#e.Feature("kern",0,M,G));this.#t?.onShapeCall?.(),this.#e.shape(h,d,E);let w=d.getLength();if(w>this.#y)throw new A("glyphOverLimit",{limit:this.#y,actual:w});let T=d.getGlyphInfos(),v=d.getGlyphPositions(),O=Sn(g.upem,t.fontSizeHalfPoints,r$1.fixedPointScale,r$1.roundingMode),_=xn(g.upem,t.fontSizeHalfPoints,r$1.fixedPointScale),b=[],m=n(0),F=n(0),C$1=new Map,B$1=T.map((M,G)=>{let ee=v[G],wt=R?.get(x$1.charCodeAt(M.cluster)),At=wt?.advance??ee?.xAdvance??0;b.push(_(At));let It=O(At),Mt=O(ee?.yAdvance??0),xe=wt?.glyph??M.codepoint,Nr={id:xe,cluster:M.cluster-l.length,originX:m,originY:F,advanceX:It,advanceY:Mt,offsetX:O(ee?.xOffset??0),offsetY:O(ee?.yOffset??0),outline:C$1.get(xe)??(()=>{let _t=this.#L(p,xe);return C$1.set(xe,_t),_t})()};return m=n(m+It),F=n(F+Mt),Nr}),I=h.hExtents(),P=u({text:c,direction:r$1.direction,bidiLevel:t.bidiLevel,glyphs:B$1,exactAdvancesX:b,clusters:go(c,B$1,r$1.direction),fontSpans:B$1.length===0?[]:[{glyphStart:0,glyphEnd:B$1.length,font:r$1.font,fallbackIndex:null}],metrics:{ascent:O(I.ascender),descent:O(-I.descender),lineGap:O(I.lineGap)}},r$1),N=Lo(P);if(N>this.#c)throw new A("shapedRunOverLimit",{limit:this.#c,actual:N});let D=To(o$1,N);if(D>this.#x)return this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),P;for(;this.#n.size>=this.#F||this.#r+D>this.#x;){let M=this.#n.keys().next().value;if(M===void 0)break;let G=this.#n.get(M);this.#n.delete(M),this.#r-=G.bytes,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#n.set(o$1,{run:P,bytes:D,stamp:++this.#b}),this.#r+=D,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),P}catch(p){throw p instanceof A?p:new A("malformedFont",{diagnostic:p instanceof Error?p.message:"HarfBuzz shaping failed"})}}},mt=(e={})=>new lt(Ur(),e);var yt=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}),Oi=Object.freeze({...yt,maxCachedShapes:4096});function On(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 wn(e,t=yt){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 An(e,t,n=false){let r=false,o=Object.freeze({shape(a){if(r)throw new A("disposed");let i=a.environment.font;if(k(i),i.byteLength>t.maxFontBytes)throw new A("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 Bo=Object.freeze({}),In=b,Oo="16.0.0",wo="none",Ao=1e3,Io="halfToEven",Pn="cluster-edges-only",Mo="Latn",_o=new Uint8Array(0);var Z=class extends Error{code="overLimit";constructor(t){super(t),this.name="LayoutShapingConfigurationError";}};function Po(e,t){let n=e.epoch,r=e.maxFontBytes,o=e.sources,a$1=e.substitutions,i=e.defaultFont,s=e.language;if(!Number.isSafeInteger(r)||r<=0||r>a)throw new Z(`Font byte ceiling must not exceed the engine hard maximum of ${a}`);let c=o.length,l=a$1?.length??0;if(c===0||c>b)throw new Z(`Font source count must be between 1 and ${b}`);if(l>In)throw new Z(`Font substitution count must not exceed ${In}`);let u=0,y=[];for(let g$1=0;g$1<c;g$1+=1){let h=o[g$1],d=h.request,S=h.availability,x=h.id,R=h.hash,L=h.faceIndex,E=S==="forbidden",w=E?_o:h.bytes;if(!E){if(typeof x!="string"||x.length===0)throw new TypeError("Resolved font id must not be empty");let T;try{T=e$1(w);}catch{throw new Z(`Font source ${x} must provide genuine bytes`)}if(T>r)throw new Z(`Font source ${x} exceeds the per-font byte ceiling`);if(u+=T,u>c$1)throw new Z(`Font sources exceed the aggregate byte ceiling of ${c$1}`)}y.push(t&&g(h)!==void 0?h:Object.freeze({request:Object.freeze({family:d.family,weight:d.weight,style:d.style}),id:x,bytes:w,hash:R,faceIndex:L,...S?{availability:S}:{}}));}let f;if(a$1){f=[];for(let g=0;g<l;g+=1){let h=a$1[g],d=h.from,S=h.to,x=h.lineMetrics;f.push(Object.freeze({from:Object.freeze({family:d.family,weight:d.weight,style:d.style}),to:Object.freeze({family:S.family,weight:S.weight,style:S.style}),...x?{lineMetrics:Object.freeze({heightEm:x.heightEm,baselineEm:x.baselineEm})}:{}}));}}let p={epoch:n,maxFontBytes:r,sources:Object.freeze(y),substitutions:f?Object.freeze(f):void 0,defaultFont:Object.freeze({family:i.family,sizeHalfPoints:i.sizeHalfPoints}),language:s};return Object.freeze(p)}function Mn(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 ko(e,t){let n={family:e.family},r={sizeHalfPoints:e.sizeHalfPoints};return {...n,...t?r:{}}}function _n(e,t){let n=c=>({family:c.family,weight:c.weight,style:c.style}),r=t?e.sources:Mn(e.sources,c=>c.request),o=e.substitutions??[],a=t?o:Mn(o,c=>c.from),i={sources:r.map(c=>{let l=c.availability??"available",u={request:n(c.request),availability:l};if(l==="forbidden")return {...u,...t?{id:c.id,faceIndex:c.faceIndex,declaredHash:c.hash}:{}};let y=g(c);if(y==null)throw new TypeError("Font configuration identity requires prepared source bytes");return {...u,...t?{id:c.id}:{},faceIndex:c.faceIndex,declaredHash:c.hash,actualHash:y,byteLength:c.bytes.byteLength}}),substitutions:a.map(c=>({from:n(c.from),to:n(c.to),lineMetrics:c.lineMetrics?{heightEm:c.lineMetrics.heightEm,baselineEm:c.lineMetrics.baselineEm}:null})),defaultFont:ko(e.defaultFont,t),language:e.language||"en"},s={epoch:e.epoch,maxFontBytes:e.maxFontBytes};return {version:1,...t?s:{},...i}}var No=Symbol("prepared-layout-font-configuration"),Ne=new WeakMap;function zo(e){return Ne.has(e)}function Do(e){let t=Ne.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.configuration}function Gi(e){let t=Ne.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.sharedShapingFingerprint}function ht(e,t){return kn(e,t,false)}function Ui(e,t){return kn(e,t,true)}function kn(e,t,n){let r=Po(e,n),o=Object.freeze({epoch:r.epoch,maxFontBytes:r.maxFontBytes,sources:Object.freeze(r.sources.map(y=>n&&g(y)!==void 0?y:f$2(y,{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash}))),substitutions:r.substitutions,defaultFont:r.defaultFont,language:r.language}),a=new TextEncoder,i=_n(o,true),s=a.encode(JSON.stringify(i)),c=_n(o,false),l=a.encode(JSON.stringify(c)),u=Object.freeze({[No]:true,fingerprint:`font-config:${f$1(s)}`});return Ne.set(u,{configuration:o,sharedShapingFingerprint:`shared-font-config:${f$1(l)}`}),u}function Ho(e){return ht(e).fingerprint}function Go(e,t){let n=new TextEncoder().encode(JSON.stringify({version:1,environment:e,executionPolicy:On(t),ligatureCaretPolicy:Pn,fallback:sa}));return `shaping:${f$1(n)}`}async function Nn(e,t,n,r,o=false){let i=zo(e)?e:ht(e,t),s=Do(i),{epoch:c,maxFontBytes:l,sources:u,substitutions:y,defaultFont:f}=s,p=s.language||"en",g=i.fingerprint,h=m({epoch:c,maxFontBytes:l,resources:u,substitutions:y,validateFont:dt,instrumentation:{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash,onAdmission:t?.onFontAdmission}});await ut();let d=Object.freeze({script:Mo,variationAxes:Object.freeze({}),shapingLibrary:ie,unicodeDataVersion:Oo,normalization:wo,language:p,features:Bo,...o?{documentLigatures:true}:{},fixedPointScale:Ao,roundingMode:Io});return Object.freeze({fonts:h,shaper:An(n??mt(r),r,n===void 0),defaultFont:f,environment:d,ligatureCaretPolicy:Pn,operation:Object.freeze({resourceEpoch:h.epoch,configEpoch:c,extensionFingerprint:g,shapingHash:Go(d,r),producerVersion:1})})}async function Uo(e,t,n){return Nn(e,t,void 0,wn(n))}async function Ki(e,t,n,r,o=false){return Nn(e,r,t,n,o)}function Ko(e){e.shaper.dispose?.();}function gt(e){let t=new Set([0,e.text.length]);for(let r of ya$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 ze(e,t){return gt(e).includes(t)}function Wo(e,t){return ze(e,t)}function Vo(e,t,n){return n>=t&&ze(e,t)&&ze(e,n)}function jo(e){let t=ya$1(e.text);return gt(e).map(n=>n===e.text.length?t.length:t.findIndex(r=>r.utf16From===n))}var xt="und";function Gn(){return typeof Intl.Segmenter=="function"}function Xo(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${xt})`);return e}function Un(){let e=new(Xo())(xt,{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 Yo=/^[\p{L}\p{N}']$/u,$o=/^\s$/u;function zn(e){return Yo.test(e)}function Dn(e){return $o.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 Kn(e){let t=ya$1(e);if(t.length===0)return [];let n=[],r=0;for(;r<t.length;){let o=t[r];if(Dn(o.text)){let a=r+1;for(;a<t.length&&Dn(t[a].text);)a+=1;n.push(St(t,r,a,false)),r=a;continue}if(zn(o.text)){let a=r+1;for(;a<t.length&&zn(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 Wn(){return {segment:Kn}}function Vn(e={}){let t=e.isIntlAvailable??Gn,n=e.createIntlBoundary??Un,r=e.createFallbackBoundary??Wn;if(!t())return r();try{return n()}catch{return r()}}var Hn;function jn(){return Hn??=Vn(),Hn}function qo(e,t=jn()){return t.segment(e)}function Zo(e,t){return t.map(n=>({graphemeFrom:Ca$1(e,n.utf16From),graphemeTo:Ca$1(e,n.utf16To),wordLike:n.wordLike}))}var Xn={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},Ft=Object.keys(Xn),Yn=Ft.filter(e=>Xn[e]==="coarse-gate"),De=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},ce=(e,t)=>{if(e.trim().length===0)throw new TypeError(`${t} must not be blank`)},Jo={resourceEpoch:De,configEpoch:De,extensionFingerprint:ce,shapingHash:ce,producerVersion:De},Qo=(e,t)=>{Jo[t](e[t],t);},le=e=>{for(let t of Ft)Qo(e,t);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},ea=(e,t)=>{let n=le(e),r=le(t),o=Ft.filter(a=>n[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},bt=e=>{let t=e.map(({key:n,fingerprint:r})=>(ce(n,"resource dependency key"),ce(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)},ta=e=>(De(e.revision,"revision"),ce(e.dependencyFingerprint,"dependencyFingerprint"),ce(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:bt(e.resourceDependencies),...le(e)})),na=(e,t)=>{let n=bt(e),r=bt(t),o=Math.max(n.length,r.length);for(let a=0;a<o;a+=1){let i=n[a],s=r[a];if(i?.key!==s?.key||i?.fingerprint!==s?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??s.key}}return null};function ra(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=na(e.resourceDependencies,t.resourceDependencies);if(n)return n;for(let r of Yn)if(e[r]!==t[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var Rt=class{entries=new Map;get(t,n){let r=this.entries.get(t);if(!r)return {hit:false,reason:"absent"};let o=ra(r.provenance,n);return o||{hit:true,value:r.value,provenance:r.provenance}}set(t,n,r){this.entries.set(t,{value:n,provenance:ta(r)});}evictEpoch(t){let n=le(t),r=0;for(let[o,a]of this.entries){let i=a.provenance;Yn.some(s=>i[s]!==n[s])&&(this.entries.delete(o),r+=1);}return r}evictResources(t,n){let r=le(t),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(c=>n.get(c.key)!==c.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function $n(e){return e.projected===true?null:e.range}function aa(e,t,n,r=false){let{page:o,story:a,host:i,noteScopeId:s,noteAreaKind:c}=e,l=a==="header"||a==="footer"?u=>Ia$1(u,e.origin,{x:o.box.x,y:o.box.y}):void 0;Ra$1(i,(u,y)=>{let{textboxDepth:f,textboxOwner:p,textboxPath:g,storyOrigin:h}=y,d=f===0?a:"textbox";if(r&&u.marker&&!u.lines.some(S=>S.spans.length>0)){let S=u.lines[0];if(!S||!u.marker)return;let x={range:{paragraphId:u.paragraphId,start:S.range.start,end:S.range.start},text:"",props:[],style:u.marker.style,box:{...S.box,width:0}};n({page:o,story:d,rootStory:a,root:e,storyOrigin:h,absoluteBox:Object.freeze({x:h.x+x.box.x,y:h.y+x.box.y,width:0,height:x.box.height}),noteScopeId:s,noteAreaKind:c,textboxDepth:f,textboxOwner:p,textboxPath:g,paragraph:u,paragraphId:u.paragraphId,line:S,span:x,sourceRange:null});return}for(let S of u.lines){let x=[...Ya$1(S)].sort((R,L)=>(t.get(R.paragraphId)??Number.MAX_SAFE_INTEGER)-(t.get(L.paragraphId)??Number.MAX_SAFE_INTEGER));for(let R of x)for(let L of R.spans)n({page:o,story:d,rootStory:a,root:e,storyOrigin:h,absoluteBox:Object.freeze({x:h.x+L.box.x,y:h.y+L.box.y,width:L.box.width,height:L.box.height}),noteScopeId:s,noteAreaKind:c,textboxDepth:f,textboxOwner:p,textboxPath:g,paragraph:u,paragraphId:R.paragraphId,line:S,span:L,sourceRange:$n(L)});}},e.origin,l);}function ia(e,t,n={}){let r=new Map(eb(e).map((o,a)=>[o,a]));Oa$1(e,o=>aa(o,r,t,n.spanlessMarkers===true));}var ca=1,qn=4,te=Object.freeze({top:0,right:0,bottom:0,left:0}),Zn=new WeakMap;function la(e,t){let n=ua(e);return n===te?t:xf(t,n)}function ua(e){let t=e.vectorShape;if(!t)return te;let{cx:n,cy:r}=t.extentEmu;if(!(n>=0)||!(r>=0)||n===0&&r===0)return te;let o=Zn.get(t);if(o||(o=da(t),Zn.set(t,o)),o===te)return te;let a=e.paintBounds,i=e.geometry.contentBounds;if(!(a.width>0||i.width<=0)||!(a.height>0||i.height<=0))return te;let s=n>0?i.width/n:i.height/r,c=r>0?i.height/r:i.width/n,l=(f,p,g)=>{if(g<-1e-3)return 0;let h=f*p-Math.max(0,g);return Number.isFinite(h)&&h>0?h:0},u=e.kind==="inlineDrawing"&&e.placeholderGraphicKind===null,y={left:l(o.left,s,i.x-a.x),top:u?0:l(o.top,c,i.y-a.y),right:l(o.right,s,a.x+a.width-(i.x+i.width)),bottom:l(o.bottom,c,a.y+a.height-(i.y+i.height))};return y.left||y.top||y.right||y.bottom?Object.freeze(y):te}function da(e){let{cx:t,cy:n}=e.extentEmu,r=0,o=0,a=t,i=n,s=(y,f)=>{r=Math.min(r,y),a=Math.max(a,y),o=Math.min(o,f),i=Math.max(i,f);},c=e.overflowVisible===true,l=c?1/0:ca,u=y=>y.x>=-l&&y.x<=t+l&&y.y>=-l&&y.y<=n+l;for(let y of e.components){if(c)for(let d of y.subpathsEmu)for(let S of d)s(S.x,S.y);let f=y.clipEmu?void 0:y.shadow;if(f){let d=1/0,S=1/0,x=-1/0,R=-1/0;for(let T of y.subpathsEmu)for(let v of T){let O=c?v.x:Math.max(0,Math.min(t,v.x)),_=c?v.y:Math.max(0,Math.min(n,v.y));d=Math.min(d,O),S=Math.min(S,_),x=Math.max(x,O),R=Math.max(R,_);}let L=wf(f.blurEmu)*.75+(y.strokeHex!==null?Math.max(1,wf(y.strokeWidthEmu))/2:0),E=wf(f.dxEmu),w=wf(f.dyEmu);d<=x&&(s(d+E-L,S+w-L),s(x+E+L,R+w+L));}if(y.strokeHex===null||y.strokeInset===true)continue;let p=Math.max(1,wf(y.strokeWidthEmu))/2,g=l+Math.max(0,wf(y.strokeOutsetEmu??0)),h=d=>d.x>=-g&&d.x<=t+g&&d.y>=-g&&d.y<=n+g;y.subpathsEmu.forEach((d,S)=>{let x=y.subpathsClosed?.[S]!==false,R=pa(d,x),L=x&&R.length>2?R.length:R.length-1,E=[];for(let T=0;T<L;T+=1){let v=R[T],O=R[(T+1)%R.length],_=Math.hypot(O.x-v.x,O.y-v.y),b={x:-(O.y-v.y)/_,y:(O.x-v.x)/_};if(E.push(b),!!fa(v,O,-g,t+g,-g,n+g))for(let m=0;m<2;m+=1){let F=J[m],C=v.x+(O.x-v.x)*F,B=v.y+(O.y-v.y)*F;s(C+b.x*p,B+b.y*p),s(C-b.x*p,B-b.y*p);}}if(!x&&E.length&&(y.strokeCap==="round"||y.strokeCap==="square")){for(let[T,v,O]of [[R[0],E[0],-1],[R[R.length-1],E[E.length-1],1]])if(h(T))if(y.strokeCap==="round")s(T.x-p,T.y-p),s(T.x+p,T.y+p);else {let _=T.x+O*v.y*p,b=T.y-O*v.x*p;s(_+v.x*p,b+v.y*p),s(_-v.x*p,b-v.y*p);}}let w=x&&R.length>2?E.length:E.length-1;for(let T=0;T<w;T+=1){let v=R[(T+1)%R.length];if(!h(v))continue;if(y.strokeJoin==="round"){s(v.x-p,v.y-p),s(v.x+p,v.y+p);continue}if(y.strokeJoin==="bevel")continue;let O=E[T],_=E[(T+1)%E.length],b=1+O.x*_.x+O.y*_.y;if(b<2/(qn*qn))continue;let m=O.y*-_.x- -O.x*_.y;if(m===0)continue;let F=m>0?-1:1;s(v.x+F*(O.x+_.x)*p/b,v.y+F*(O.y+_.y)*p/b);}});for(let d of y.arrowheadsEmu??[])if(!(!d[0]||!u(d[0])))for(let S of d)s(S.x,S.y);}return r>=0&&o>=0&&a<=t&&i<=n?te:Object.freeze({left:-r,top:-o,right:a-t,bottom:i-n})}function pa(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 J=new Float64Array(2);function fa(e,t,n,r,o,a){let i=t.x-e.x,s=t.y-e.y;return J[0]=0,J[1]=1,He(-i,e.x-n)&&He(i,r-e.x)&&He(-s,e.y-o)&&He(s,a-e.y)}function He(e,t){if(e===0)return t>=0;let n=t/e;return e<0?J[0]=Math.max(J[0],n):J[1]=Math.min(J[1],n),J[0]<=J[1]}var ma="abcdefghijklmnopqrstuvwxyz";function z(e){let t=Math.round(e.fontSizePt*2);return Math.max(1,t)}function j(e,t,n,r,o){let a=r.shaping?.context;return e.shape({text:o,fontSizeHalfPoints:z(r),bidiLevel:r.shaping?.direction==="rtl"?1:0,environment:ya(t,n,r),...a?{context:a}:{}})}var Jn=new WeakMap;function ya(e,t,n){if(!Object.isFrozen(e)||!Object.isFrozen(e.features)||!Object.isFrozen(e.variationAxes)||!Object.isFrozen(e.shapingLibrary))return Qn(e,t,n);let r=n.shaping?.direction??"ltr",o=n.shaping?.script,a=`${r}|${o??""}|${w(n)?1:0}|${e.documentLigatures?O(n):""}|${n.smallCaps?1:0}`,i=Jn.get(e);i||Jn.set(e,i=new WeakMap);let s=i.get(t);s||i.set(t,s=new Map);let c=s.get(a);return c||s.set(a,c=Qn(e,t,n)),c}function Qn(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:w(n)?1:0,...e.documentLigatures?N(n):{},...n.smallCaps?{smcp:1}:{}},fallbackOrder:[]})}function Ge(e,t,n,r,o){let a=o.get(n);if(a!==void 0)return a;let i=true;try{for(let s of ma){let c=j(e,t,n,{...r,smallCaps:!0},s),l=j(e,t,n,{...r,smallCaps:!1},s);if(!(c.glyphs.length!==l.glyphs.length||c.glyphs.some((y,f)=>y.id!==l.glyphs[f]?.id))){i=!1;break}}}catch{i=false;}return o.set(n,i),i}var ha=new Map([["garamond",{family:"Garamond",em:er(1765,539,0)}],["segoe ui",{family:"Segoe UI",em:er(2210,514,0)}]]);function er(e,t,n){return {heightEm:(e+t+n)/2048,baselineEm:(e+n)/2048}}function Ct(e){return e?ha.get(e.trim().toLowerCase()):void 0}function Ue(e){let t=Ct(e.fontFamily);if(!t)return;let n=z(e)/2*ra$1(e);return {height:t.em.heightEm*n,baseline:t.em.baselineEm*n}}var ga=new Map([["roman","serif"],["swiss","sans"],["modern","mono"]]);function ds(e,t){return t==="fixed"?"mono":e?ga.get(e):void 0}var Sa=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 tr(e){let t=e.trim().toLowerCase(),n=Sa.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 ps={serif:"Times New Roman",sans:"Arial",mono:"Courier New"};var Et="Calibri, Carlito, Helvetica, Arial, sans-serif",xa='"Times New Roman", "Liberation Serif", Tinos, serif',ba='"Courier New", "Liberation Mono", Cousine, monospace';function Ra(e,t=Et){if(!e)return t;let n=tr(e);return n==="serif"?xa:n==="mono"?ba:t}var bs=new Map([["calibri","Carlito"]]),Fa=65536,Ca=256;function nr(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 rr(e){let t=new Map,n=null,r=null,o=0,a=s=>{s.older?s.older.newer=s.newer:n=s.newer,s.newer?s.newer.older=s.older:r=s.older,s.older=null,s.newer=null;},i=s=>{s.older=r,s.newer=null,r?r.newer=s:n=s,r=s;};return {get(s){let c=t.get(s);if(c!==void 0)return c!==r&&(a(c),i(c)),c.value},set(s,c){let l=t.get(s);if(l){l.value=c,l!==r&&(a(l),i(l));return}let u={key:s,value:c,older:null,newer:null};for(t.set(s,u),i(u);t.size>e&&n;){let y=n;a(y),t.delete(y.key),o+=1;}},get size(){return t.size},get evictions(){return o}}}var or=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function ar(e=null){return e!=null&&typeof e.measureText=="function"}function ir(e={}){let t=e.scale??1;if(!(t>0)||!Number.isFinite(t))return null;let n=e.fallbackFamily??Et,r=e.context??null;if(!ar(r))return null;let o=r,a=rr(nr(e.maxWidthEntries,Fa)),i=rr(nr(e.maxMetricsEntries,Ca)),s=e.fontAlias,c=new Map,l=f=>{let p=c.get(f);if(p!==void 0)return p;let g="The quick brown fox 0123",h=false;for(let d of ["monospace","serif"]){o.font=`32px ${d}`;let S=o.measureText(g).width;if(o.font=`32px "${f}", ${d}`,o.measureText(g).width!==S){h=true;break}}return c.set(f,h),h},u=f=>{let p=f.fontFamily&&or.test(f.fontFamily)?f.fontFamily:null,g=p?s?.(p):void 0,h=g&&or.test(g)?g:null,d=Ra(p,n),S=p?h?`"${h}", "${p}", ${d}`:`"${p}", ${d}`:n,x=f.bold?"bold":"normal",R=f.italic?"italic":"normal",L=f.smallCaps?"small-caps":"normal",E=f.fontSizePt*ra$1(f)*t;return `${R} ${L} ${x} ${E}px ${S}`},y$1=(f,p,g)=>f/t*(g.horizontalScalePercent/100)+p.length*g.characterSpacingPt;return {measure(f,p){if(f.length===0)return 0;let g=u(p),h=y(p,f),d=`${g}\0${h}\0${f}`,S=a.get(d);if(S!==void 0)return y$1(S,f,p);o.font=g,"fontKerning"in o&&(o.fontKerning=h?"normal":"none");let x=o.measureText(f).width;return a.set(d,x),y$1(x,f,p)},inkBounds(f,p){if(!f||f.length>2||p.shaping?.direction==="rtl"||ya$1(f).length!==1)return;o.font=u(p),"fontKerning"in o&&(o.fontKerning=w(p)?"normal":"none");let g=o.textAlign,h=o.direction,d;try{g!==void 0&&(o.textAlign="left"),h!==void 0&&(o.direction="ltr"),d=o.measureText(f);}finally{g!==void 0&&(o.textAlign=g),h!==void 0&&(o.direction=h);}let S=d.actualBoundingBoxLeft,x=d.actualBoundingBoxRight;if(S===void 0||x===void 0||!Number.isFinite(S)||!Number.isFinite(x))return;let R=p.horizontalScalePercent/(100*t);return {left:-S*R,right:x*R}},textOutline(f,p){if(!f||p.shaping?.direction==="rtl")return;o.font=u(p),"fontKerning"in o&&(o.fontKerning=w(p)?"normal":"none");let g=o.textAlign,h=o.textBaseline,d;try{g!==void 0&&(o.textAlign="left"),h!==void 0&&(o.textBaseline="alphabetic"),d=o.measureText(f);}finally{g!==void 0&&(o.textAlign=g),h!==void 0&&(o.textBaseline=h);}let S=[-(d.actualBoundingBoxLeft??NaN),-(d.actualBoundingBoxAscent??NaN),d.actualBoundingBoxRight??NaN,d.actualBoundingBoxDescent??NaN].map(w=>w/t);if(S.some(w=>!Number.isFinite(w)))return;let[x,R,L,E]=S;if(!(!(L>x)||!(E>R)))return {path:null,ink:{left:x,top:R,right:L,bottom:E}}},lineMetrics(f){let p=f.fontSizePt*ra$1(f),g=u(f),h=i.get(g);if(h)return h;let d=Ct(f.fontFamily),S=d&&!l(d.family)&&Ue(f);if(S)return i.set(g,S),S;let x=p*1.15,R=p*.8;o.font=g,"fontKerning"in o&&(o.fontKerning=w(f)?"normal":"none");let L=o.measureText("Hxg"),E=L.fontBoundingBoxAscent,w$1=L.fontBoundingBoxDescent;if(typeof E=="number"&&Number.isFinite(E)&&E>0&&(R=E/t,typeof w$1=="number"&&Number.isFinite(w$1)&&w$1>=0)){let v=(E+w$1)/t;v>0&&(x=Math.max(v,x));}x>0||(x=p*1.15);let T={height:x,baseline:R};return i.set(g,T),T}}}function Ea(e=1,t={}){let n=ir({...t,scale:t.scale??e});return n?{measurer:n,producer:t.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:ta$1(),producer:"fixed-measurer"}}function va(e){let t;return n=>{t===void 0&&(t=id(e.pages)?.hosts??null);let r=t?.get(n);return r?gd(r.pageNumber,r.format):null}}function sr(e,t){let n=tf(e,t.displayMode??lb),r=Nd({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},n).listItems,o=t.package?{footnotesPart:gj(t.package,"footnote"),endnotesPart:gj(t.package,"endnote")}:void 0,a=he$1(n,r,o,t.package?ee(t.package,e,n):void 0,t.displayMode??lb);return {blocks:n,notes:o,context:a}}function cr(e,t,n,r,o){for(let a of t){if(r.length>=sn)return;if(n.tokenForParagraph(a.id)!==""&&vn$1(e,a.id)===null)for(let i of un(a)){if(r.length>=sn)return;if(!i.rewritable)continue;let s=Vc(i.instruction);if(s===null)continue;let c=n.liveValueOf(i.fieldNodeId,s);if(c===null&&o&&n.pageRefProjectionOf){let l=n.pageRefProjectionOf(i.fieldNodeId,s);if(l){let u=o(l.targetParagraphId);u!==null&&u.length>0&&hd(l.calibration,l.cached,u,Number.NaN)&&(c=u);}}c===null||c===i.cachedText||c.length>tn||c.includes("\r")||r.push({paragraphId:a.id,fieldNodeId:i.fieldNodeId,text:c});}}}function La(e,t){let{blocks:n,context:r}=sr(e,t);if(r===null)return null;let o=[];return cr(e,Yc(vc(n)),r,o,t.pageRefPageNumberOf),o.length===0?null:{op:"refreshFieldResults",updates:o}}function As(e,t){let{notes:n,context:r}=sr(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:s}of a){if(!s)continue;let c=[];for(let l of fe$1(s,t.displayMode??lb)){if(c.length>=sn)break;cr(s,Yc(vc(l)),r,c);}c.length>0&&o.push({noteKind:i,op:{op:"refreshFieldResults",updates:c}});}return o}function Ta(e){return e.box}function lr(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)lr(o,t);}function Ba(e){let t=new Map,n=(o,a,i)=>{if(!(o.kind==="textValue"||i>Xb*4)){for(let s of o.children)if(s.kind!=="textValue"){if(s.kind==="paragraph"){for(let c of r)t.get(c)?.push(s.id);n(s,s.id,i+1);continue}if(s.kind==="contentControl"){t.set(s.id,[]),r.push(s.id);let c=fc(s);c&&n(c,a,i+1),r.pop();let l=t.get(s.id);l&&l.length===0&&a!==null&&l.push(a);continue}n(s,a,i+1);}}},r=[];return n(e,null,0),t}function Oa(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 wa(e,t){let n=jc(e.root);if(n.length===0)return Aa;let r=new Map;t.pages.forEach((i,s)=>{(l=>{for(let u of l){let y=new Set;lr(u,y);for(let f of y){let p=r.get(f)??[];p.push({pageIndex:s,box:Ta(u)}),r.set(f,p);}}})(i.fragments);});let o=Ba(e.root),a=[];for(let i of n){let s=hc(i.node),c=[...i.ancestors.map(f=>hc(f).lock),s.lock],l=o.get(i.node.id)??[],u=new Map;for(let f of l)for(let p of r.get(f)??[]){let g=u.get(p.pageIndex);u.set(p.pageIndex,g?Oa(g,p.box):p.box);}let y=[...u.entries()].sort((f,p)=>f[0]-p[0]).map(([f,p])=>({pageIndex:f,...p}));a.push({controlId:i.node.id,type:s.type,level:ic(i.node),depth:i.depth,lock:s.lock,effectiveLock:mc(c),showingPlaceholder:s.showingPlaceholder,temporary:s.temporary,...s.tag===void 0?{}:{tag:s.tag},...s.alias===void 0?{}:{alias:s.alias},...s.id===void 0?{}:{id:s.id},...s.dataBinding===void 0?{}:{dataBinding:s.dataBinding},paragraphIds:l,fragments:y});}return a}var Aa=Object.freeze([]);var Ia=4096;function Ma(e,t=0){if(!(e instanceof Uint8Array)||!Number.isSafeInteger(t)||t<0||e.byteLength<12)return;let n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=(h,d)=>Number.isSafeInteger(h)&&Number.isSafeInteger(d)&&h>=0&&d>=0&&h<=e.length-d,o=h=>n.getUint16(h,false),a=h=>n.getUint32(h,false),i=0,s=false;if(a(0)===1953784678){s=true;let h=a(4),d=a(8);if(![65536,131072].includes(h)||!d||t>=d||!r(12,d*4))return;i=a(12+t*4);}else if(t!==0)return;if(!r(i,12)||![65536,1330926671,1953658213].includes(a(i)))return;let c=o(i+4);if(!c||c>Ia||!r(i+12,c*16))return;let l=new Map;for(let h=0;h<c;h++){let d=i+12+h*16,S=a(d),x=a(d+8),R=a(d+12);if(l.has(S)||!r(x,R))return;l.set(S,{offset:x,length:R});}let u=l.get(1751474532),y=l.get(1330851634);if(!u||u.length<20||!y||y.length<4)return;let f=o(u.offset+18),p=o(y.offset),g=n.getInt16(y.offset+2,false);if(!(f<16||f>16384||p>5||g<=0))return Object.freeze({faceIndex:t,collection:s,unitsPerEm:f,os2Version:p,xAvgCharWidth:g,averageAdvanceEm:g/f})}function ur(e,t=Ma){if(typeof e!="function"||typeof t!="function")return;let n=new WeakMap;return r=>{if(!ec(r))return;let o;try{o=e(r);}catch{return}if(!o||typeof o!="object"||o.substitution!==null||o.family.trim().toLowerCase()!==r.fontFamily?.trim().toLowerCase()||typeof o.hash!="string"||!/^sha256:[0-9a-f]{64}$/u.test(o.hash)||!Number.isSafeInteger(o.faceIndex)||o.faceIndex<0)return;let a=n.get(o);if(a===void 0&&(a=t(o.bytes,o.faceIndex)??null,n.set(o,a)),!a)return;let i=r.fontSizePt*a.averageAdvanceEm/2;return Number.isFinite(i)&&i>=0&&i<=r.fontSizePt?i:void 0}}var K=(e,t)=>e[t]<<8|e[t+1],Q=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0;function _a(e,t){let n=(i,s)=>i>=0&&i+s<=e.length;if(!n(0,12))return null;let r=Q(e,0)===1953784678;if(r&&!n(12+t*4,4))return null;let o=r?Q(e,12+t*4):0;if(!n(o,12))return null;let a=K(e,o+4);for(let i=0;i<a;i+=1){let s=o+12+i*16;if(!n(s,16))return null;if(Q(e,s)!==1668112752)continue;let c=Q(e,s+8);if(!n(c,4))return null;let l=null,u=null,y=K(e,c+2);for(let f=0;f<y;f+=1){let p=c+4+f*8;if(!n(p,8))return null;let g=K(e,p),h=K(e,p+2),d=c+Q(e,p+4);if(!n(d,2)||!(g===0||g===3&&(h===1||h===10)))continue;let x=K(e,d);x===12&&u===null&&(u=d),x===4&&l===null&&(l=d);}return u!==null?{format:12,offset:u}:l!==null?{format:4,offset:l}:null}return null}function Pa(e,t,n){let r=(u,y)=>u>=0&&u+y<=e.length,o=t.offset;if(t.format===12){if(!r(o,16))return false;let u=Q(e,o+12),y=0,f=Math.min(u,Math.floor((e.length-o-16)/12))-1;for(;y<=f;){let p=y+f>>>1,g=o+16+p*12,h=Q(e,g),d=Q(e,g+4);if(n<h)f=p-1;else if(n>d)y=p+1;else return Q(e,g+8)+(n-h)!==0}return false}if(n>65535||!r(o,14))return false;let a=K(e,o+6)>>>1,i=o+14,s=i+a*2+2,c=s+a*2,l=c+a*2;if(!r(l,a*2))return false;for(let u=0;u<a;u+=1){if(n>K(e,i+u*2))continue;let y=K(e,s+u*2);if(n<y)return false;let f=K(e,c+u*2),p=l+u*2,g=K(e,p);if(g===0)return (n+f&65535)!==0;let h=p+g+(n-y)*2;if(!r(h,2))return false;let d=K(e,h);return d!==0&&(d+f&65535)!==0}return false}var dr=new WeakMap;function pr(e,t){let n=i(e),r=dr.get(e);return r===void 0&&(r=_a(n,e.faceIndex),dr.set(e,r)),r?Pa(n,r,t):void 0}var fr=new WeakMap;function ka(e){let t=fr.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 s=0;s<i$1;s++){let c=a+12+s*16;if(r.getUint32(c)!==1330851634)continue;let l=r.getUint32(c+8),u=r.getUint32(c+12);u>=86&&l<=n.byteLength-u&&r.getUint16(l)>=1&&(o=(r.getUint32(l+78)&1966080)!==0);break}return fr.set(e,o),o}var mr=1.3;function yr(e,t,n,r,o,a=false){let i=n.height-r;if(!(Math.abs(i-t)<=o)&&!a||!ka(e))return n;let c=a?i*mr:Math.max(n.height,t*mr),l=n.baseline-r;return {height:c,baseline:l+(c-i)/2}}var Na=.89111328125,za=443/2048,Da=87/2048,Ha=1/2048,Ga=new Set(["Arab","Hebr","Syrc","Thaa","Nkoo"]);function hr(e){return e.latinLane===void 0&&!Ga.has(e.shaping?.script??"")}function gr(e,t,n,r,o,a=true){if(!a||r!==0||!(o>0)||e.trim().toLowerCase()!=="times new roman")return r;let i=(s,c)=>Math.abs(s/o-c)<=Ha;return i(t,Na)&&i(n,za)?Da*o:r}var Ua=.5;function Ka(e,t){if(t.fontFamily===null)return false;let n=e.substitution;return n!==null&&(n.lineMetrics!==void 0||!he$2(n.requested.family,n.resolved.family))?false:e.family===t.fontFamily||he$2(e.family,t.fontFamily)}function Sr(e,t,n,r,o){let a=new WeakMap;return (i,s)=>{let c=ra$1(s),l=a.get(i);l||(l=new Map,a.set(i,l));let u=z(s),y=hr(s),f=Ka(i,s),p=(y?u:-u)+(f?Ua:0),g=l.get(p);if(g)return c===1?g:{height:g.height*c,baseline:g.baseline*c};let h,d=true,S=i.substitution?.lineMetrics;if(S){let x=u/2;h={height:S.heightEm*x,baseline:S.baselineEm*x};}else try{let x=j(e,t,i,s,""),R=x.metrics.ascent/t.fixedPointScale,L=x.metrics.descent/t.fixedPointScale,E=u/2,w=R+L,T=E*r,v=w>T?T/w:1,O=w*v,_=x.metrics.lineGap/t.fixedPointScale,b=Math.min(Math.max(0,gr(i.family,R,L,_,E,y)),O*o),m=O+b;m>0?h=yr(i,E,{height:m,baseline:R*v+b},b,2/t.fixedPointScale,f):(h=n.lineMetrics(s),d=!1);}catch{h=n.lineMetrics(s),d=false;}return d?(l.set(p,h),c===1?h:{height:h.height*c,baseline:h.baseline*c}):h}}var vt=2048,Wa=32,Va=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 ja(e){if(b$1(e))return Va.get(e.toLowerCase())}function xr(e,t,n,r){let o=z(r)/2*ra$1(r)*(r.horizontalScalePercent/100)/vt,a=[];for(let i=0;i<n.length;i++){let s=c$2(n.charCodeAt(i),t),c=s===null?0:e.advances[s-Wa]??0;if(c===0)return;a.push(c*o+r.characterSpacingPt);}return a}function br(e){let t=new WeakMap,n=r=>{let o=t.get(r);return o===void 0&&(o=ja(r.fontFamily)??null,t.set(r,o)),o};return {...e,measure(r,o){let a=n(o),i=a&&xr(a,o.fontFamily,r,o);if(!i)return e.measure(r,o);let s=0;for(let c of i)s+=c;return s},caretAdvances(r,o){let a=n(o),i=a&&xr(a,o.fontFamily,r,o);if(!i)return e.caretAdvances?.(r,o);let s=[0];for(let c of i)s.push(s[s.length-1]+c);return s},lineMetrics(r,o){let a=n(r);if(!a)return e.lineMetrics(r,o);let i=z(r)/2*ra$1(r);return {height:(a.ascent+a.descent)*i/vt,baseline:a.ascent*i/vt}}}}var Xa={M:2,L:2,Q:4,C:6,Z:0},Rr=e=>{let t=Math.round(e*1e3)/1e3;return String(Object.is(t,-0)?0:t)};function Lt(e,t,n){if(!(t>0)||!(n>0))return;let r=[],o=0,a=1/0,i=-1/0,s=1/0,c=-1/0;for(let l of e.glyphs){if(l.id===0)return;let u=l.outline.path,y=l.outline.unitsPerEm;if(!u)continue;if(!(y>0)||!u.startsWith("M")||/[^MLQCZ0-9eE+.,\s-]/u.test(u))return;let f=t*(l.drawScale??1)/y,p=(l.originX+l.offsetX)/n,g=(l.originY+l.offsetY)/n;for(let h of u.matchAll(/([MLQCZ])([^MLQCZ]*)/gu)){let d=h[1],S=h[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(S.length!==Xa[d]||S.some(R=>!Number.isFinite(R)))return;let x=d;for(let R=0;R<S.length;R+=2){let L=p+S[R]*f,E=-(g+S[R+1]*f);a=Math.min(a,L),i=Math.max(i,L),s=Math.min(s,E),c=Math.max(c,E),x+=`${R?" ":""}${Rr(L)} ${Rr(E)}`;}if(o+=x.length,o>2e6)return;r.push(x);}}if(!(!r.length||!(i>a)||!(c>s)))return Object.freeze({path:r.join(""),ink:Object.freeze({left:a,top:s,right:i,bottom:c})})}var Tt=new WeakMap;function Ya(e){let t=Tt.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 s of a){let c=s[1]==="Z"?0:s[1]==="C"?6:s[1]==="Q"?4:2,l=s[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(l.length!==c||l.some(u=>!Number.isFinite(u))){Tt.set(e,null);return}for(let u=0;u<l.length;u+=2)r=Math.min(r,l[u]),o=Math.max(o,l[u]);}let i=Number.isFinite(r)&&Number.isFinite(o)?{left:r,right:o}:void 0;return Tt.set(e,i??null),i}function Fr(e,t,n,r){if(e.clusters.length!==1||e.glyphs.length===0)return;let o=1/0,a=-1/0;for(let s of e.glyphs){if(s.id===0)return;let c=Ya(s.outline),l=s.outline.unitsPerEm;if(!c||!(l>0))return;let u=(s.originX+s.offsetX)/n;o=Math.min(o,u+c.left*t*(s.drawScale??1)/l),a=Math.max(a,u+c.right*t*(s.drawScale??1)/l);}let i={left:o*r,right:a*r};return Number.isFinite(i.left)&&Number.isFinite(i.right)?i:void 0}function $a(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 Cr(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 s=n+12+i*16;if(e.getUint32(s)!==r)continue;let c=e.getUint32(s+8),l=e.getUint32(s+12);return l<o||c+l>t?null:c}return null}function Er(e,t){let n=e.byteLength,r=new DataView(e.buffer,e.byteOffset,n),o=$a(r,n,t);if(o===null)return null;let a=Cr(r,n,o,1751474532,54);if(a===null)return null;let i=r.getUint16(a+18);if(i<=0)return null;let s=Cr(r,n,o,1330851634,30);if(s===null)return null;let c=r.getInt16(s+26)/i,l=r.getInt16(s+28)/i;return !(c>0)||c>1||!(Math.abs(l)<=1)?null:{offsetEm:l,thicknessEm:c}}var Ke=.02;function Bt(e,t){return e.bold===true&&t.request.weight<600}function vr(e){return e.advanceX>0&&e.outline.path.length>0}function Lr(e){let t=0;for(let n of e.glyphs)vr(n)&&t++;return t}function Tr(e,t,n){if(n<=0)return e;let r=new Array(e.length).fill(0);for(let a of t.glyphs){if(!vr(a))continue;let i=Math.min(Math.max(a.cluster+1,1),e.length-1);r[i]+=n;}let o=0;return e.map((a,i)=>(o+=r[i],a+o))}var qa=.5,Za=4096,Ja=4,Br=4096;function Or(e){let t="environment"in e?e.environment:void 0,n="environment"in e?void 0:e,{shaper:r,resolveFont:o}=e,a=br(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:{}},s=new WeakMap,c=new WeakMap,l=q$1(r),u=Sr(r,i,a,Ja,qa),y=new WeakMap,f=new WeakMap,p=new Array(Br),g=0,h=(b,m,F)=>{let C=p[g];C&&C.cache.delete(C.text),b.set(m,F),p[g]={cache:b,text:m},g=(g+1)%Br;},d=b=>{let m=y.get(b);if(m!==void 0)return m;let F=o(b);return y.set(b,F),F},S=ur(d),x=(b,m,F)=>{let C=F?c:s,B=C.get(b);B||(B=new Map,C.set(b,B));let I=B.get(m);return I||(I=new Map,B.set(m,I)),I},R=new WeakMap,L=b=>{if(!b.shaping?.wordSpacingPt)return b;let m=R.get(b);return m||(m={...b,shaping:{...b.shaping,wordSpacingPt:void 0}},R.set(b,m)),m},E=(b,m)=>m.shaping?.wordSpacingPt?bc(b)*m.shaping.wordSpacingPt:0,w$1=(b,m)=>a.measure(b,L(m))+E(b,m),T=(b,m)=>{let F=Math.max(0,a.measure(b,L(m))),C=a.caretAdvances?.(b,L(m))??$b(b,F);if(!C||C.length!==b.length+1)return $b(b,w$1(b,m));let B=Math.max(0,w$1(b,m)),I=0,P=0;return C.map((N,D)=>{if(D===0)return 0;b[D-1]===" "&&P++;let M=N+P*(m.shaping?.wordSpacingPt??0);return I=Math.max(I,Math.min(B,Number.isFinite(M)?M:I)),D===b.length?B:I})},v=new WeakMap,O$1=new WeakMap;return dc({hasResolvedFont(b){return d(b)!==null},faceCovers(b,m){let F=d(m);if(!F)return;let C=O$1.get(F);C||(C=new Map,O$1.set(F,C));let B=C.get(b);if(B!==void 0)return B;let I=true;for(let P of b){let N=pr(F,P.codePointAt(0));if(N===void 0)return;if(!N){I=false;break}}return C.size<Za&&C.set(b,I),I},strikeoutMetrics(b){let m=d(b);if(!m)return;let F=v.get(m);if(F===void 0&&(F=Er(m.bytes,m.faceIndex),v.set(m,F)),!F)return;let C=z(b)/2*ra$1(b);return {offsetPt:F.offsetEm*C,thicknessPt:F.thicknessEm*C}},measure(b,m){if(b.length===0)return 0;let F=d(m);if(!F)return w$1(b,m);let C=x(F,z(m),m.smallCaps),B=m.shaping?.context,I=m.shaping?`1:${JSON.stringify(B?[m.shaping.script,m.shaping.direction,b,B.before,B.after]:[m.shaping.script,m.shaping.direction,b])}`:`0:${b}`,P=Bt(m,F),N=`${w(m)?1:0}:${P?1:0}:${O(m)}:${I}`,D=C.get(N);if(D===void 0){let M=0;try{if(m.smallCaps&&!Ge(r,i,F,m,f))return w$1(b,m);let G=j(r,i,F,m,b);if(G.glyphs.some(ee=>ee.id===0))return w$1(b,m);for(let ee of G.glyphs)M+=ee.advanceX;P&&(M+=Lr(G)*(z(m)/2)*.02*i.fixedPointScale);}catch{return w$1(b,m)}D=M/i.fixedPointScale,h(C,N,D);}return D*ra$1(m)*(m.horizontalScalePercent/100)+b.length*m.characterSpacingPt+E(b,m)},inkBounds(b,m){if(!b||b.length>2||m.shaping?.direction==="rtl"||ya$1(b).length!==1)return;let F=d(m);if(!F)return a.inkBounds?.(b,m);try{if(m.smallCaps&&!Ge(r,i,F,m,f))return a.inkBounds?.(b,m);let C=j(r,i,F,m,b);return Fr(C,z(m)/2,i.fixedPointScale,ra$1(m)*m.horizontalScalePercent/100)}catch{return}},textOutline(b,m){let F=d(m);if(!F)return a.textOutline?.(b,m);try{let C=j(r,i,F,m,b);return Lt(C,z(m)/2,i.fixedPointScale)??a.textOutline?.(b,m)}catch{return a.textOutline?.(b,m)}},caretAdvances(b,m){let F=d(m);if(!F)return T(b,m);try{if(m.smallCaps&&!Ge(r,i,F,m,f))return T(b,m);let C=j(r,i,F,m,b);if(C.glyphs.some(P=>P.id===0))return T(b,m);let B=ac(b,C,ra$1(m)*(m.horizontalScalePercent/100)/i.fixedPointScale,m.characterSpacingPt,m.shaping?.wordSpacingPt??0)??$b(b,C.glyphs.reduce((P,N)=>P+N.advanceX,0)*ra$1(m)*(m.horizontalScalePercent/100)/i.fixedPointScale+b.length*m.characterSpacingPt+E(b,m));if(!B||!Bt(m,F))return B;let I=z(m)/2*.02*ra$1(m)*(m.horizontalScalePercent/100);return Tr(B,C,I)}catch{return T(b,m)}},lineMetrics(b,m){let F=d(b);if(!F)return Ue(b)??a.lineMetrics(b,m);if(!m||/^[\t\n\r\f ]*$/.test(m))return u(F,b);if(l){let C=u(F,b),B=Math.max(0,C.baseline),I=Math.max(0,C.height-C.baseline);return B+I>0?{height:B+I,baseline:B}:C}try{let C=j(r,i,F,b,m),B=0,I=0;for(let P of C.fontSpans){let N=u(P.font,b);B=Math.max(B,N.baseline),I=Math.max(I,N.height-N.baseline);}if(B+I>0)return {height:B+I,baseline:B}}catch{}return u(F,b)}},S)}function Qa(e,t){return Or({...t,shaper:e.shaper,environment:e.environment})}function ei(e){let{layout:t,viewport:n}=e,r=new Set;if(!n){for(let c of t.pages)r.add(c.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=n.top+n.height,i=-1,s=-1;for(let c of t.pages){let l=c.box.y;l+c.box.height>=n.top&&l<=a&&(i===-1&&(i=c.index),s=c.index);}if(i===-1){let c=ti(t,n.top);c!==null&&(i=c,s=c);}if(i!==-1){let c=Math.max(0,i-o),l=Math.min(t.pages.length-1,s+o);for(let u=c;u<=l;u+=1)r.add(u);}for(let c of e.pinnedPages??[])c>=0&&c<t.pages.length&&r.add(c);return r}function ti(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 wr=["text-local","paragraph-local","flow-structural","global"];function Ar(e,t){return wr.indexOf(t)>wr.indexOf(e)?t:e}function ni(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function ri(e){let{run:t,currentRevision:n,publish:r,schedule:o}=e,a=null,i=null,s=null,c=0,l=0;function u(d){let S=e.runCooperatively;if(!S)return t(d);let x=S(d);s=x;try{for(;;){let R=x.step();if(R)return R;if(n()!==d.revision)return x.cancel(),l+=1,null;if(s!==x)return null}}finally{s===x&&(s=null);}}function y(d){let S=p(n());S.impact=Ar(S.impact,d.impact),S.structural=S.structural||d.structural;for(let x of d.paragraphIds)S.paragraphIds.add(x);for(let x of d.created)S.created.add(x);for(let x of d.deleted)S.deleted.add(x);for(let x of d.dependencyKeys)S.dependencyKeys.add(x);}let f=d=>({impact:d.impact,paragraphIds:d.paragraphIds,created:d.created,deleted:d.deleted,dependencyKeys:d.dependencyKeys,structural:d.structural,revision:d.revision});function p(d){return a||(a=ni(d)),a.revision=Math.max(a.revision,d),a}function g(){!o||i||(i=o(()=>{i=null,h();}));}function h(){i&&(i(),i=null),s&&(s.cancel(),s=null,l+=1);let d=a;if(!d)return false;a=null;let S=f(d),x=u(S);return !x||x.revision!==n()?(c+=1,y(S),g(),false):(r(x,S),true)}return {notify(d){let S=p(n());S.impact=Ar(S.impact,d.impact);for(let x of d.dirty)S.paragraphIds.add(x);for(let x of d.created)S.created.add(x),S.paragraphIds.add(x);for(let x of d.deleted)S.deleted.add(x),S.paragraphIds.add(x);for(let x of d.dependencyKeys)S.dependencyKeys.add(x);for(let x of d.splitJoin)S.structural=true,"split"in x?(S.paragraphIds.add(x.split.from),S.paragraphIds.add(x.split.tail)):(S.paragraphIds.add(x.join.kept),S.paragraphIds.add(x.join.removed));(d.impact==="flow-structural"||d.impact==="global")&&(S.structural=true),g();},invalidateAll(d,S){let x=p(d);x.impact="flow-structural",x.structural=true,S&&x.dependencyKeys.add(S),g();},flush:h,pending:()=>a?f(a):null,cancel(){i?.(),i=null,s?.cancel(),s=null,a=null;},get staleDiscards(){return c},get cancelledRuns(){return l}}}var Ir=new WeakMap;function X(e){let t=Ir.get(e);if(t)return t;let n=new Map,r=new Map,o=new Map,a=new Map,i=(c,l,u,y)=>{for(let f of c){if(f.kind==="paragraph")continue;let p=f.tableId;a.set(p,Math.max(a.get(p)??0,(f.columnEdges?.length??1)-1));let g=o.get(p);g||(g=new Map,o.set(p,g),n.set(p,[]),r.set(p,new Map));for(let h of f.rows){let d=g.get(h.id);d===void 0&&(d=g.size,g.set(h.id,d),r.get(p).set(d,h.cells));for(let S of h.cells)n.get(p).push({pageIndex:l,tableId:p,row:h,cell:S,rowIndex:d,isHeaderRepeat:h.isHeaderRepeat,offsetX:u,offsetY:y}),i(S.blocks,l,u,y);}}};for(let c of e.pages){i(c.fragments,c.index,0,0);for(let l of [c.header,c.footer])l&&i(l.fragments,c.index,l.box.x-c.contentBox.x,l.box.y-c.contentBox.y);for(let l of [c.footnotes,c.endnotes])if(l)for(let u of l.notes)i(u.fragments,c.index,u.box.x-c.contentBox.x,u.box.y-c.contentBox.y);}let s=new Map;for(let[c,l]of n)s.set(c,{placed:l,rows:r.get(c)??new Map,columnCount:a.get(c)??0});return Ir.set(e,s),s}function _r(e){let t=e.columnCount;for(let n of e.rows.values())for(let r of n)t=Math.max(t,ne(r).to+1);return t}var ne=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function oi(e,t,n){if(t.tableId!==n.tableId)return null;let r=X(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(ne(t).from,ne(n).from),s=Math.max(ne(t).to,ne(n).to),c=p=>{let{from:g,to:h}=ne(p);return h>=i&&g<=s},l=p=>(r.rows.get(p)??[]).some(g=>g.vMergeContinue&&c(g)),u=r.rows.size+_r(r)+2;for(let p=0;!(p>u);p+=1){let g=false;for(let[h,d]of r.rows)if(!(h<o||h>a))for(let S of d){if(!c(S))continue;let{from:x,to:R}=ne(S);x<i&&(i=x,g=true),R>s&&(s=R,g=true);}for(;o>0&&l(o);)o-=1,g=true;for(;l(a+1);)a+=1,g=true;if(!g)break}let y=[],f=new Set;for(let p of r.placed){if(p.isHeaderRepeat||p.rowIndex<o||p.rowIndex>a)continue;let{from:g,to:h}=ne(p.cell);h<i||g>s||f.has(p.cell.id)||(f.add(p.cell.id),y.push(p.cell.id));}return y.length===0?null:{kind:"cells",tableId:t.tableId,cellIds:y,rows:{from:o,to:a},columns:{from:i,to:s},text:kr(e,t.tableId,y)}}function ai(e,t){let n=X(e).get(t);if(!n)return null;let r=[],o=new Set,a=0;for(let i of n.placed)i.isHeaderRepeat||o.has(i.cell.id)||(o.add(i.cell.id),r.push(i.cell.id),a=Math.max(a,i.rowIndex));return r.length===0?null:{kind:"cells",tableId:t,cellIds:r,rows:{from:0,to:a},columns:{from:0,to:_r(n)-1},text:kr(e,t,r)}}function Lc(e,t){let n=ai(e,t.tableId);if(!n)return false;let r=new Set(t.cellIds);return n.cellIds.every(o=>r.has(o))}function Tc(e,t){return Pr(e,t,true)}function ge(e,t){return Pr(e,t,false)}function Pr(e,t,n){let r=new Set(t),o=[],a=new Set;for(let i of X(e).values())for(let s of i.placed)if(!(s.isHeaderRepeat||!r.has(s.cell.id)))for(let c of s.cell.blocks)n&&c.kind!=="paragraph"||Se(c,o,a);return o}function Se(e,t,n){if(e.kind==="paragraph"){for(let r of ab(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)Se(a,t,n);}function kr(e,t,n){let r=ge(e,n),o=r[0],a=r[r.length-1];return !o||!a?ii(e,t):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:Te(e,a).length}}}function ii(e,t){let n=X(e).get(t);for(let o of n?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let s of o.cell.blocks)Se(s,a,new Set);let i=a[0];if(i){let s={paragraphId:i,offset:0};return {anchor:s,head:s}}}for(let o of e.pages)for(let a of Ja$1(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function si(e){let t=[...Ja$1(e)];for(let n of [e.header,e.footer])n&&t.push(...Ka$1(n.fragments));for(let n of [e.footnotes,e.endnotes])if(n)for(let r of n.notes)t.push(...Ka$1(r.fragments));return t}function ci(e,t){let n=new Set(ge(e,t)),r=[],o=new Set;for(let a of e.pages)for(let i of si(a))if(n.has(i.paragraphId))for(let s of i.lines)for(let c of s.spans){let l=`${c.range.paragraphId}:${c.range.start}:${c.range.end}`;o.has(l)||(o.add(l),r.push(c));}return r}function li(e,t){let n=new Set(t),r=[];for(let o of X(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 ui(e,t,n=Te){let r=X(e).get(t.tableId);if(!r)return "";let o=new Set(t.cellIds),a=r.placed.some(c=>c.cell.logicalGridColumn!==void 0),i=new Map,s=new Set;for(let c of r.placed){if(c.isHeaderRepeat||!o.has(c.cell.id)||s.has(c.cell.id))continue;s.add(c.cell.id);let l=ge(e,[c.cell.id]).map(f=>n(e,f)).join(`
|
|
2
|
+
`),u=i.get(c.rowIndex),y=c.cell.gridColumn+(a?Math.max(1,c.cell.gridSpan)-1:0);u?u.set(y,l):i.set(c.rowIndex,new Map([[y,l]]));}return [...i.keys()].sort((c,l)=>c-l).map(c=>{let l=i.get(c),u=[];for(let y=0;y<=t.columns.to-t.columns.from;y+=1){let f=a?t.columns.to-y:t.columns.from+y;u.push(l.get(f)??"");}return u.join(" ")}).join(`
|
|
3
|
+
`)}function Ot(e,t){return cd(e,t)}function Bc(e,t,n){if(n){let a=Ot(e,t);if(!a||a.tableId!==n.tableId)return null;let i=n.cellIds[0];if(!i)return null;let s=X(e).get(n.tableId);if(!s)return null;for(let c of s.placed)if(c.cell.id===i)return {tableId:n.tableId,rowId:c.row.id,cellId:i,cellIds:n.cellIds,gridColumnIndex:c.cell.logicalGridColumn??c.cell.gridColumn,isHeaderRepeat:c.isHeaderRepeat};return null}let r=Ot(e,t);if(!r)return null;let o=X(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let s of a.cell.blocks)Se(s,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 Mr=new WeakMap;function di(e,t){let n=Mr.get(e);if(n)return n.get(t)??null;let r=new Map;for(let[o,a]of X(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let s=[];for(let l of i.cell.blocks)Se(l,s,new Set);let c={tableId:o,rowId:i.row.id,cellId:i.cell.id,rowIndex:i.rowIndex,gridColumn:i.cell.gridColumn,gridSpan:i.cell.gridSpan};for(let l of s){let u=r.get(l);u&&u.tableId.length>=o.length||r.set(l,c);}}return Mr.set(e,r),r.get(t)??null}function Oc(e,t,n){let r=di(e,t);if(!r)return null;let o=X(e).get(r.tableId);if(!o)return null;let a=new Set;for(let l of o.placed)!l.isHeaderRepeat&&!l.cell.vMergeContinue&&l.cell.blocks.length>0&&a.add(l.cell.id);let i=[...a],s=i.indexOf(r.cellId);if(s<0)return null;let c=n==="next"?1:-1;for(let l=s+c;l>=0&&l<i.length;l+=c){let u=ge(e,[i[l]]);if(u.length>0)return {cellId:i[l],paragraphIds:u}}return "end"}function pi(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{La as $,Gn as A,Un as B,Kn as C,Wn as D,Vn as E,jn as F,qo as G,Zo as H,le as I,ea as J,Rt as K,$n as L,ia as M,la as N,j as O,Ge as P,Ct as Q,ds as R,tr as S,ps as T,Et as U,Ra as V,bs as W,ar as X,ir as Y,Ea as Z,va as _,ct as a,As as aa,ie as b,wa as ba,ut as c,Lt as ca,Gr as d,Ke as da,A as e,Or as ea,dt as f,Qa as fa,mt as g,ei as ga,Oi as h,ri as ha,On as i,oi as ia,wn as j,ai as ja,Z as k,Lc as ka,zo as l,Tc as la,Do as m,ge as ma,Gi as n,ci as na,ht as o,li as oa,Ui as p,ui as pa,Ho as q,Ot as qa,Uo as r,Bc as ra,Ki as s,di as sa,Ko as t,Oc as ta,gt as u,pi as ua,ze as v,Wo as w,Vo as x,jo as y,xt as z};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import {a,c,d,f}from'./chunk-BL2E4QRA.js';import {d as d$1}from'./chunk-7FUORGCW.js';import {c as c$1,a as a$1,b as b$1}from'./chunk-KCUXXO3Q.js';import {g as g$1}from'./chunk-VLQDQNSS.js';import {sa as sa$1,S,za as za$1,ia as ia$1,ma as ma$1,la as la$1,da as da$1,ca as ca$1,ba as ba$1,$,aa as aa$1,ja as ja$1,xa as xa$1}from'./chunk-DB7X4Y6O.js';import {b,a as a$2}from'./chunk-DYLB5U42.js';import {Eb,Db,Pg,g,Hd,Yc,cb,pa as pa$1,Rl,gg,Ob,Hn,Lg,gj,Va,Mi,Li,ld,Il,Lk,Xi,zi,Yi,Sj,pf,Dm,ad,wb,Qg,N as N$1,nf,mf,Bb,md,hj,Fm,vb,je as je$1,me,Vj,Wj,bj,zj,Aa as Aa$1,Ca as Ca$1,za as za$2,Ba as Ba$1,qf,cd,ed,jg,db,gl,fl,nl,am,Gb,Fb,ke,jc,Jj,el,Xj,$c,Em,ui,Yg,jd,rh,yb,Oe,Zd,pb,_c,kf,Uc,Ic,Kc,yc,tl}from'./chunk-6MF5PN2E.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 K(t){return t.attributes?.val}function Y(t){let e=K(t);return e===void 0||!(e==="0"||e==="false"||e==="off")}var Tr=/^[0-9A-Fa-f]{6}$/,wr=/^\d{1,6}$/;function it(t){return t===void 0||t==="auto"?null:Tr.test(t)?`#${t}`:null}var Nr={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"},Er={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 Mr(t){return !t||!/^[\w \-.+]{1,64}$/.test(t)?null:`"${t}"`}function yo(t,e=false){let n=Hd(t);return n===null||Math.abs(n)>999999||!e&&n<0?null:n}function q(t,e=false){let n=yo(t,e);return n===null?null:`${n/20}pt`}function ho(t){let e=[],n=[],r=null,a=null;for(let o of t)switch(o.localName){case "b":e.push(`font-weight:${Y(o)?"bold":"normal"}`);break;case "i":e.push(`font-style:${Y(o)?"italic":"normal"}`);break;case "u":{let s=K(o)??"single";if(s==="none"||!Y(o))break;n.push("underline"),r=Nr[s]??"solid",a=it(o.attributes?.color);break}case "strike":Y(o)&&n.push("line-through");break;case "dstrike":Y(o)&&n.push("line-through");break;case "caps":Y(o)&&e.push("text-transform:uppercase");break;case "smallCaps":Y(o)&&e.push("font-variant:small-caps");break;case "vertAlign":{let s=K(o);s==="superscript"?e.push("vertical-align:super","font-size:0.75em"):s==="subscript"&&e.push("vertical-align:sub","font-size:0.75em");break}case "color":{let s=it(K(o));s&&e.push(`color:${s}`);break}case "highlight":{let s=Er[K(o)??""];s&&e.push(`background-color:${s}`);break}case "sz":{let s=K(o);s!==void 0&&wr.test(s)&&e.push(`font-size:${Number(s)/2}pt`);break}case "rFonts":{let s=Mr(o.attributes?.ascii??o.attributes?.hAnsi);s&&e.push(`font-family:${s}`);break}case "spacing":{let s=q(K(o),true);s&&e.push(`letter-spacing:${s}`);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 Cr={left:"left",start:"left",right:"right",end:"right",center:"center",both:"justify",distribute:"justify"};function xo(t){let e=[];for(let n of t)switch(n.localName){case "jc":{let r=Cr[K(n)??""];r&&e.push(`text-align:${r}`);break}case "ind":{let r=q(n.attributes?.left??n.attributes?.start,true),a=q(n.attributes?.right??n.attributes?.end,true),o=q(n.attributes?.firstLine),s=q(n.attributes?.hanging);r&&e.push(`margin-left:${r}`),a&&e.push(`margin-right:${a}`),o?e.push(`text-indent:${o}`):s&&e.push(`text-indent:-${s}`);break}case "spacing":{let r=q(n.attributes?.before),a=q(n.attributes?.after);r&&e.push(`margin-top:${r}`),a&&e.push(`margin-bottom:${a}`);let o=yo(n.attributes?.line),s=n.attributes?.lineRule;o!==null&&s!=="exact"&&s!=="atLeast"?e.push(`line-height:${(o/240).toFixed(3)}`):o!==null&&e.push(`line-height:${o/20}pt`);break}case "shd":{let r=it(n.attributes?.fill);r&&e.push(`background-color:${r}`);break}case "pageBreakBefore":Y(n)&&e.push("break-before:page");break;}return e.join(";")}var N=new Schema({nodes:{doc:{content:"paragraph+"},paragraph:{content:"inline*",group:"block",attrs:{nodeId:{default:null},props:{default:[]}},toDOM:t=>{let e=xo(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=ho(e);return ["span",{"data-run-props":Fr(e),...n?{style:n}:{}},0]},parseDOM:[{tag:"span[data-run-props]",getAttrs:t=>{if(typeof t=="string")return false;let e=Ar(t.getAttribute("data-run-props"));return e?{props:e}:false}}]}}});function Fr(t){return JSON.stringify(Array.isArray(t)?t:[])}function Ar(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 lt(t){for(let e of t.marks)if(e.type.name==="runProps")return e.attrs.props??[];return []}function De(t,e){return JSON.stringify(Fe(t))===JSON.stringify(Fe(e))}function Fe(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 dt(t){if(!t||t.kind==="textValue")return [];let e=[];for(let n of t.children){if(n.kind==="textValue"||n.namespaceUri!==pa$1||n.localName==="rPrChange"||n.localName==="pPrChange")continue;let r={};for(let a of n.attributes)a.namespaceUri===pa$1&&(r[a.localName]=a.value);e.push(Object.keys(r).length>0?{localName:n.localName,attributes:r}:{localName:n.localName});}return e}function Po(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 L(t){if(t.kind==="textValue")return [];let e=[],n=o=>{if(o.kind!=="run")return;let s=o.children.find(i=>i.kind==="runProperties"),l=dt(s);for(let i of o.children)if(i.kind!=="runProperties"){if(i.kind==="tab"){e.push({kind:"tab"});continue}if(i.kind==="hardBreak"){e.push(yb(i)?{kind:"pageBreak"}:{kind:"hardBreak"});continue}if(i.kind==="text"){let c="";for(let u of i.children)u.kind==="textValue"&&(c+=u.value);c.length>0&&e.push({kind:"text",text:c,props:l});continue}e.push({kind:"unknown",nodeId:i.id,label:Po(i),modelLength:i.kind==="drawing"||Oe(i)||Zd(i)||pb(i)!==null?1:0});}},r=o=>{if(o.kind==="run"){n(o);return}e.push({kind:"unknown",nodeId:o.id,label:Po(o),modelLength:0});},a=(o,s)=>{for(let l of o)if(!(l.kind==="textValue"||l.kind==="paragraphProperties")&&!(s>=Aa$1)){if(Ca$1(l)&&!za$2(l.kind)&&s<Aa$1){a(l.children.filter(i=>!qf(l,i)),Ba$1(l,s));continue}if(cd(l)){let i=ed(l);i&&a(i,Ba$1(l,s));continue}r(l);}};return a(t.children,0),e}function de(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 ko=Eb(16),Oo=Db();function Br(t,e){let n=Oo.get(t);if(!n){let r=[];ad([t],r,0),n=Object.freeze(r),Oo.set(t,n,n.length);}for(let r of n)e.push(r);}function _(t){let e=ko.get(t);if(e)return e;let n=[];for(let r of Yc(t))if(r.root.kind!=="textValue")for(let a of r.root.children)Br(a,n);return ko.set(t,n),n}function Z(t){let e=de(t).map(n=>{let r=n.kind==="textValue"?void 0:n.children.find(o=>o.kind==="paragraphProperties"),a=L(n).map(o=>{switch(o.kind){case "text":return N.text(o.text,o.props.length>0?[N.marks.runProps.create({props:o.props})]:[]);case "tab":return N.node("tab");case "hardBreak":return N.node("hardBreak");case "pageBreak":return N.node("pageBreak");default:return N.node("unknownInline",{nodeId:o.nodeId,label:o.label})}});return N.node("paragraph",{nodeId:n.id,props:dt(r)},a)});return N.node("doc",null,e.length>0?e:[N.node("paragraph")])}function Lr(t,e){let n=[];return t.forEach(r=>{if(r.isText&&r.text){n.push({kind:"text",text:r.text,props:lt(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+=wb:n.modelLength===1&&(e+=Qg);return e}function z(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 _r(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 Ro(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 jr(t,e,n,r,a){let o=[],s=D(e),l=D(n),i=_r(s,l),c=[],u=0,m=false;for(let g of e){if(g.kind!=="unknown"){u+=g.kind==="text"?g.text.length:1;continue}let p=u;g.modelLength===1&&i&&(i.start<u+1&&i.endBefore>u&&(m=true),i.endBefore<=u&&(p+=i.endAfter-i.endBefore)),c.push(`${g.nodeId}@${p}`),u+=g.modelLength;}if(m||JSON.stringify(c)!==JSON.stringify(z(n)))return {ok:false,reason:"unknown-content-moved",detail:t};if(De(r,a)||o.push({op:"setParagraphProperties",paragraphId:t,properties:Fe(a)}),i&&(i.endBefore>i.start&&o.push({op:"deleteText",paragraphId:t,start:i.start,end:i.endBefore}),i.endAfter>i.start)){let g=l.slice(i.start,i.endAfter),p=i.start,y="",P=()=>{y.length!==0&&(o.push({op:"insertText",paragraphId:t,offset:p,text:y}),p+=y.length,y="");};for(let O of g)O===" "?(P(),o.push({op:"insertTab",paragraphId:t,offset:p}),p+=1):O===`
|
|
3
|
+
`?(P(),o.push({op:"insertHardBreak",paragraphId:t,offset:p}),p+=1):O===wb?(P(),o.push({op:"insertPageBreak",paragraphId:t,offset:p}),p+=1):y+=O;P();}if(!i){let g=Ro(e),p=Ro(n),y=0;for(;y<p.length;){if(De(g[y]??[],p[y])){y+=1;continue}let P=y,O=p[y];for(;y<p.length&&De(p[y],O)&&!De(g[y]??[],p[y]);)y+=1;o.push({op:"setRunProperties",paragraphId:t,start:P,end:y,properties:Fe(O)});}}return {ok:true,ops:o}}function ct(t,e){let n=de(t),r=new Set;for(let l of n)for(let i of L(l))i.kind==="unknown"&&i.modelLength===1&&r.add(i.nodeId);let a=l=>Lr(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 s=o.length-n.length;if(s===0){let l=[];for(let[i,c]of o.entries()){let u=n[i];if(c.attrs.nodeId!==u.id)return {ok:false,reason:"paragraph-reordered",detail:String(c.attrs.nodeId)};let m=jr(u.id,L(u),a(c),dt(u.kind==="textValue"?void 0:u.children.find(g=>g.kind==="paragraphProperties")),c.attrs.props??[]);if(!m.ok)return m;l.push(...m.ops);}return {ok:true,ops:l}}return s===1?Hr(n,o,a):s===-1?zr(n,o,a):{ok:false,reason:"paragraph-count-unexplained",detail:String(s)}}function Hr(t,e,n){for(let r=0;r<t.length;r+=1){let a=t[r],o=e[r],s=e[r+1];if(!o||!s||o.attrs.nodeId!==a.id)continue;let l=s.attrs.nodeId;if(l!==null&&l!==a.id)continue;let i=n(o),c=n(s),u=L(a),m=D(i);if(m+D(c)===D(u)&&JSON.stringify(z([...i,...c]))===JSON.stringify(z(u))&&So(t,e,r,n)&&vo(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 zr(t,e,n){for(let r=0;r+1<t.length;r+=1){let a=t[r],o=t[r+1],s=e[r];if(!s||s.attrs.nodeId!==a.id)continue;let l=[...L(a),...L(o)],i=n(s);if(D(i)===D(l)&&JSON.stringify(z(i))===JSON.stringify(z(l))&&So(t,e,r,n)&&vo(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 So(t,e,n,r){for(let a=0;a<n;a+=1){let o=e[a],s=t[a];if(!o||o.attrs.nodeId!==s.id||D(r(o))!==D(L(s))||JSON.stringify(z(r(o)))!==JSON.stringify(z(L(s))))return false}return true}function vo(t,e,n,r,a){for(let o=0;n+o<t.length;o+=1){let s=t[n+o],l=e[r+o];if(!l||l.attrs.nodeId!==s.id||D(a(l))!==D(L(s))||JSON.stringify(z(a(l)))!==JSON.stringify(z(L(s))))return false}return true}function Wr(t,e){return cb(t,e)!==null}function ut(t,e,n){if(!n||n.created.length>0||n.deleted.length>0||n.splitJoin.length>0)return Z(e);let r=new Map;t.forEach(i=>{let c=i.attrs.nodeId;typeof c=="string"&&r.set(c,i);});let a=new Set(n.dirty),o=de(e);if(o.length!==t.childCount)return Z(e);let s=Z(e),l=[];for(let[i,c]of o.entries()){let u=r.get(c.id);l.push(u&&!a.has(c.id)?u:s.child(i));}return N.node("doc",null,l)}var $r=8*1024*1024;function bo(){let t=new WeakMap;function*e(r){let a=t.get(r);if(a)return a.slice();let o=yield*jg(r);return t=new WeakMap,o.byteLength<=$r&&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 To(t){return _(t).map(e=>Dm(t,e.id)??"").join(`
|
|
4
|
+
`)}var Ur=64,Io=new WeakMap;function pt(t,e=0){if(e>Ur)return false;let n=Io.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"||pt(a,e+1))){r=true;break}return Bb(t)&&Io.set(t,r),r}var Gr="/word/numbering.xml";function mt(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===Gr)&&t.parts.get(r)!==a)return false;return true}function Jr(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 Ae(t,e,n,r){for(let s of e)if(s.ranges.length===0)return false;let a=new Set;for(let s of t)s.kind!=="revision"||s.ranges.length>0||ft(s,n)||a.add(gl(s));for(let s of e)if(a.has(gl(s)))return false;let o=new Set(e.flatMap(s=>fl(s)));for(let s of t)if(s.kind==="revision"&&ft(s,n)&&fl(s).some(l=>!o.has(l)&&cb(r,l)))return false;return true}function Be(t,e,n,r,a=s=>s,o){let s=o?Yr(t,o,n):new Map;if(!s)return null;let l=e.get(n);if(l===void 0)return r.length===0?t:null;let i=[],c=null,{groups:u,absorbed:m}=Kr(t,e,n,r),g=a(m.size>0?r.filter(y=>!m.has(y)):r);for(let y of t){let P=y.kind==="revision"&&u.get(y)||y.kind==="comment"&&s.get(y)||y;if(P.kind==="revision"&&ft(P,n)){c===null&&(c=i.length);continue}if(c===null){let O=Jr(P,e);O!==null&&O>l&&(c=i.length);}i.push(P);}if(c===null&&(c=i.length),g.length>0){let y=g.length<2?[...g]:[...g].sort((P,O)=>nl(P,e)-nl(O,e));i.splice(c,0,...y);}if(u.size>0||s.size>0){let y=[];i.forEach((O,R)=>{(O.kind==="revision"?O.ranges[0]?.start:O.range?.start)?.paragraphId===n&&y.push(R);});let P=y.map(O=>i[O]).sort((O,R)=>nl(O,e)-nl(R,e));y.forEach((O,R)=>i[O]=P[R]);}let p=am(i);return p.length===t.length&&p.every((y,P)=>y===t[P])?t:p}function Yr(t,e,n){let r=new Map,a;for(let o of t){if(o.kind!=="comment"||!Le(o,n))continue;let s=o.range;if(!s||o.orphaned)return null;if(!a){let u=cb(e,n);if(!u||u.kind!=="paragraph")return null;a=Jj(u);}let l=u=>{let m=a.filter(g=>g.commentId===o.id&&g.kind===u);return m.length===1?m[0].offset:void 0},i=s.start.paragraphId===n?l("start"):s.start.offset,c=s.end.paragraphId===n?l("end"):s.end.offset;if(i===void 0||c===void 0)return null;i===s.start.offset&&c===s.end.offset||r.set(o,{...o,range:{...s,start:{...s.start,offset:i},end:{...s.end,offset:c}}});}return r}function ft(t,e){return t.ranges.length>0&&t.ranges.every(n=>n.start.paragraphId===e&&n.end.paragraphId===e)}function Eo(t){return t.revisionKind==="format"&&t.formattingKind==="pPrChange"}function Kr(t,e,n,r){let a=new Map,o=new Set,s=new Map;for(let l of t)if(l.kind==="revision"&&Eo(l)&&_e(l,n))for(let i of fl(l))s.set(i,l);if(s.size===0)return {groups:a,absorbed:o};for(let l of r){let i=fl(l),c=i.length>0?s.get(i[0]):void 0;if(!c||!i.every(g=>s.get(g)===c))continue;o.add(l);let u=a.get(c)??c,m=[...u.ranges.filter(g=>g.start.paragraphId!==n),...l.ranges].sort((g,p)=>(e.get(g.start.paragraphId)??0)-(e.get(p.start.paragraphId)??0)||g.start.offset-p.start.offset);a.set(c,el({...u,ranges:m},fl(c)));}return {groups:a,absorbed:o}}function Le(t,e){return t.range?t.range.start.paragraphId===e||t.range.end.paragraphId===e:false}function gt(t,e){return t.revisionKind==="structural"&&t.ranges.some(n=>n.start.paragraphId===e||n.end.paragraphId===e)}function _e(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 je(t,e,n){return t.fromRevision!==e.bodyRevision||n.currentPackageRevision!==e.packageRevision+1&&(n.changePackage!==n.currentPackage||!mt(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 Xr(t,e){let n=db(t,e);if(!n)return;let r=n.children.findIndex(u=>u.id===e);if(n.kind!=="tableCell"||n.children.slice(0,r).some(No)){let u=wo(n.children,r);return u?.kind==="paragraph"?u:void 0}let a=db(t,n.id);if(!a)return;let o=a.children.filter(u=>u.kind==="tableCell"),s=o.indexOf(n);if(s>0){let u=o[s-1],m=u.kind==="textValue"?void 0:u.children.filter(No).at(-1);return m?.kind==="paragraph"?m:void 0}let l=db(t,a.id);if(!l||l.children.find(u=>u.kind==="tableRow")!==a)return;let i=db(t,l.id);if(!i)return;let c=wo(i.children,i.children.findIndex(u=>u.id===l.id));return c?.kind==="paragraph"?c:void 0}function wo(t,e){for(let n=e-1;n>=0;n-=1){let r=t[n];if(r.kind!=="textValue"&&!tl(r))return r}}var No=t=>t.kind==="paragraph"||t.kind==="table"||t.kind==="generic"&&(t.localName==="sdt"||t.localName==="customXml");function He(t,e){let n=Xr(t,e);return n!==void 0&&n.kind!=="textValue"&&Il({...t,root:n}).some(r=>r.paragraphMark)}function Mo(t,e,n,r){if(!je(t,e,r)||t.splitJoin.length!==1)return false;let a=t.splitJoin[0],o,s;if("split"in a){if(t.deleted.length>0||t.created.length!==1||t.created[0]!==a.split.tail)return false;o=s=[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],s=[a.join.kept];}for(let i of s){let c=cb(r.part,i);if(!c||c.kind!=="paragraph"||Il({...r.part,root:c}).length>0)return false}if(He(r.part,s[0]))return false;let l=i=>i!==void 0&&o.includes(i);for(let i of n){let c=i.kind==="revision"?i.ranges:i.range?[i.range]:[];for(let u of c)if(l(u.start.paragraphId)||l(u.end.paragraphId))return false}return true}function yt(t,e,n){let r=jc(n);if(r.length===0)return false;let a=t.parts.get(e.name),o=a?cb(a,n.id):null;if(!o)return true;let s=new Set(jc(o).map(l=>l.node));return r.some(l=>!s.has(l.node))}function ht(t,e,n){let r=new Set(n.flatMap(a=>a.kind==="custom"?[a.id]:[]));if(r.size===0)return false;for(let a=db(t,e);a;a=db(t,a.id))if(a.kind==="contentControl"&&r.has(a.id))return true;return false}function Co(t,e,n,r){if(!je(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],s=cb(a,o);if(!s||s.kind!=="paragraph"||t.impact!=="text-local"&&(Il({...a,root:s}).length>0||t.impact==="flow-structural"&&db(a,o)?.localName!=="body")||yt(e.pkg,a,s)||ht(a,o,n)||He(a,o))return null;for(let l of n){if(l.kind==="comment"){if(Le(l,o)&&t.impact!=="text-local")return null;continue}if(l.kind==="custom"){if(l.range?.start.paragraphId===o)return null;continue}if(gt(l,o)||_e(l,o)&&!(t.impact==="text-local"&&Eo(l)))return null}return o}var Vr=4;function Do(t){let e=t.root.children.find(n=>n.kind==="body");return e&&e.kind!=="textValue"?e:void 0}function Fo(t){return t.children.find(e=>e.kind!=="textValue"&&e.namespaceUri===pa$1&&e.localName==="pPr")}function Qr(t,e,n,r){let a=new Map(Il({...t,root:e}).map(s=>[s.node.id,s.node])),o=Il({...n,root:r});return o.length>=a.size||!o.every(s=>a.get(s.node.id)===s.node)?false:o.length===0||Fo(e)===Fo(r)}function Ao(t,e){return Il({...t,root:e}).some(n=>n.paragraphMark)}function qr(t,e,n){if(!je(t,e,n)||!mt(e.pkg,n.currentPackage,n.part.name)||t.created.length>0||t.deleted.length>0||t.splitJoin.length>0)return null;let r=e.pkg.parts.get(n.part.name),a=r&&Do(r),o=Do(n.part);if(!r||!a||!o||a.children.length!==o.children.length)return null;let s=[];for(let[l,i]of o.children.entries()){let c=a.children[l];if(i!==c){if(s.length>=Vr||i.kind!=="paragraph"||c.kind!=="paragraph"||i.id!==c.id||!Qr(r,c,n.part,i)||Ao(r,c)||Ao(n.part,i)||He(n.part,i.id)||yt(e.pkg,n.part,i)||ht(n.part,i.id,e.items))return null;s.push(i.id);}}if(s.length===0)return null;for(let l of e.items)for(let i of s)if(l.kind==="comment"){if(Le(l,i))return null}else if(l.kind==="custom"){if(l.range?.start.paragraphId===i)return null}else if(gt(l,i)||_e(l,i))return null;return s}function Bo(t,e,n,r,a){if(!t||!e||!r.sameFilter)return null;let o=qr(t,e,n);if(!o)return null;let s=e.paragraphOrder??Lk(n.part),l=e.items;for(let i of o){if(!r.patchable(i))return null;let c=a.revisionItemsOfParagraph(n.part,i);if(!Ae(l,c,i,n.part))return null;let u=Be(l,s,i,c,r.filtered,n.part);if(!u)return null;l=u;}return {items:l,paragraphOrder:s}}function Zr(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 ea(t,e){return t.root===e.root&&t.commentsPart===e.commentsPart&&t.commentsExtendedPart===e.commentsExtendedPart&&t.stylesPart===e.stylesPart&&t.numberingRoot===e.numberingRoot&&t.furnitureParts.length===e.furnitureParts.length&&t.furnitureParts.every((n,r)=>n===e.furnitureParts[r])&&Zr(t.customNodePayloads,e.customNodePayloads)}function Lo(){let t=[];return {get(e){let n=t.findIndex(a=>ea(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 Ho=new WeakMap;function Fs(t,e){return Ho.set(t,e),t}function ta(t){return t?Ho.get(t):void 0}var ce=new WeakMap,zo={sites:new Set,paragraphs:new Map,key:"",spanning:new Set};function na(t){return ce.get(t)??zo}function oa(t){return t.kind==="revision"&&t.revisionKind==="format"&&(t.formattingKind==="pPrChange"||t.formattingKind==="rPrChange")}function _o(t,e){if(t.size!==e.size)return false;for(let n of e)if(!t.has(n))return false;return true}function ra(t,e){if(t.size!==e.size)return false;for(let[n,r]of e)if(t.get(n)!==r)return false;return true}function jo(t,e){return t.key===e.key&&_o(t.sites,e.sites)&&ra(t.paragraphs,e.paragraphs)&&_o(t.spanning,e.spanning)?t:e}function Wo(t,e,n,r){let a=ta(t),o={pkg:e,stylesRoot:n.stylesPart?.root??null,numberingRoot:n.numberingRoot},s=r?na(r.items):zo,l=c$1(o.stylesRoot,o.numberingRoot),i=[],c=r!==null&&r.stylesPart===n.stylesPart&&(r.numberingRoot===n.numberingRoot||s.sites.size===0&&!r.items.some(oa));return {filtered:u=>{if(!a)return u;let m=a(u,o),g=new Set(m.map(y=>y.id)),p=a$1(u.filter(y=>!g.has(y.id)));return i.push({result:m,removed:p.sites,paragraphs:p.paragraphs,spanning:p.spanning,touched:b$1(u),kept:a$1(m).sites}),m},sameFilter:c,patchable:u=>c&&!s.spanning.has(u),publish:u=>{if(!a||ce.has(u)&&(i.length===0||u!==r?.items))return u;let m=i.at(-1);if(m?.result===u){let P={sites:new Set(m.removed),paragraphs:m.paragraphs,key:l,spanning:new Set(m.spanning)};return ce.set(u,jo(s,P)),u}if(!m)return ce.set(u,s.key===l?s:{...s,key:l}),u;if(s.key===l&&i.every(P=>P.removed.length===0&&!P.kept.some(O=>s.sites.has(O))))return ce.set(u,s),u;let g=new Set(s.sites),p=new Map(s.paragraphs),y=new Set(s.spanning);for(let P of i){for(let O of P.kept)g.delete(O);for(let O of P.removed)g.add(O);for(let O of P.touched)p.delete(O);for(let[O,R]of P.paragraphs)p.set(O,R);for(let O of P.touched)y.delete(O);for(let O of P.spanning)y.add(O);}return ce.set(u,jo(s,{sites:g,paragraphs:p,key:l,spanning:y})),u}}}var Go=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u,aa=["ascii","hAnsi","cs","eastAsia"],sa=["asciiTheme","hAnsiTheme","cstheme","eastAsiaTheme"],ia=128,la=/[\u0000-\u001F\u007F-\u009F]/;function M(t){return t.kind!=="textValue"}function ee(t,e){return t.attributes.find(n=>n.localName===e)?.value}function Jo(t,e){let n=new Map;for(let a of t)for(let o of a.children)if(M(o))for(let[s,l]of Xo(o,e))n.has(s)||n.set(s,l);let r=[...n.values()];return r.sort((a,o)=>a<o?-1:a>o?1:0),ze.length===r.length&&ze.every((a,o)=>a===r[o])?ze:(ze=r,r)}var ze=[],xt=new WeakMap,Yo=16,Ko=32,ue=new Map,da=64;function ca(t,e){return t?.major===e?.major&&t?.minor===e?.minor&&t?.majorEastAsia===e?.majorEastAsia&&t?.minorEastAsia===e?.minorEastAsia&&t?.majorBidi===e?.majorBidi&&t?.minorBidi===e?.minorBidi}function ua(t,e){if(t===e)return true;if(!t||!e||t.size!==e.size)return false;for(let[n,r]of t)if(e.get(n)!==r)return false;return true}function pa(t,e,n){let r=t.children,a=ue.get(t.id),o=a?.children.deref(),s=a!==void 0&&o!==void 0&&o.length===r.length&&ca(a.themeFonts,e),l=s,i=r.map((u,m)=>{if(s&&u===o[m])return a.parts[m];let g=M(u)?Xo(u,e,n+1):null;return l&&!ua(g,a.parts[m])&&(l=false),g}),c;if(l)c=a.byFold;else {let u=new Map;for(let m of i)if(m)for(let[g,p]of m)u.has(g)||u.set(g,p);c=u;}return ue.delete(t.id),ue.set(t.id,{children:rh(r),parts:i,byFold:c,themeFonts:e}),ue.size>da&&ue.delete(ue.keys().next().value),c}function Xo(t,e,n=0){let r=e?.major??null,a=e?.minor??null,o=e?.majorEastAsia??null,s=e?.minorEastAsia??null,l=e?.majorBidi??null,i=e?.minorBidi??null,c=xt.get(t);if(c&&c.major===r&&c.minor===a&&c.majorEastAsia===o&&c.minorEastAsia===s&&c.majorBidi===l&&c.minorBidi===i)return c.byFold;if(t.children.length>=Yo&&n<Ko&&t.localName!=="rFonts"){let p=pa(t,e,n);return xt.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:s,majorBidi:l,minorBidi:i,byFold:p}),p}let u=new Map,m=p=>{if(!p||!Go.test(p))return;let y=p.toLowerCase();u.has(y)||u.set(y,p);},g=[t];for(;g.length>0;){let p=g.pop();if(M(p)){if(p.localName==="rFonts"){for(let y of aa)m(ee(p,y));if(e)for(let y of sa)m(ke(ee(p,y),e));}for(let y=p.children.length-1;y>=0;y-=1)g.push(p.children[y]);}}return xt.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:s,majorBidi:l,minorBidi:i,byFold:u}),u}function Vo(t){let e=new Map;for(let r of t)for(let a of r.children)if(M(a))for(let[o,s]of Rt(a).all)e.has(o)||e.set(o,s);let n=[...e.values()];return n.sort((r,a)=>r<a?-1:r>a?1:0),n}function Ws(t){let e=new Map;for(let n of t)for(let r of n.children)if(M(r))for(let[a,o]of Rt(r).unmapped)e.has(a)||e.set(a,o);return [...e.values()]}var $o=new WeakMap,Ot=new Map,fa={all:Ot,unmapped:Ot};function Rt(t,e=0){let n=$o.get(t);if(n)return n;let r=new Map,a$1=new Map,o=()=>{let i=r.size===0?fa:{all:r,unmapped:a$1.size===0?Ot:a$1};return $o.set(t,i),i};if(t.children.length>=Yo&&e<Ko&&t.localName!=="sym"&&t.localName!=="r"){for(let i of t.children){if(!M(i))continue;let c=Rt(i,e+1);for(let[u,m]of c.all)r.has(u)||r.set(u,m);for(let[u,m]of c.unmapped)a$1.has(u)||a$1.set(u,m);}return o()}let s=[t],l=new Set;for(;s.length>0;){let i=s.pop();if(!M(i))continue;let c$1=l.has(i)||i.localName==="r"&&i.namespaceUri===pa$1&&a(i);if(i.localName==="sym"&&i.namespaceUri===pa$1){let u=i.attributes.find(g=>g.localName==="font"&&(g.namespaceUri===pa$1||g.namespaceUri===""))?.value,m=c(u);if(m!==null){let g=m.toLowerCase();r.has(g)||r.set(g,m);let p=c$1?null:Rl(i);p&&ma(p.text)&&!a$1.has(g)&&a$1.set(g,m);}}for(let u=i.children.length-1;u>=0;u-=1){let m=i.children[u];c$1&&l.add(m),s.push(m);}}return o()}function ma(t){let e=t.codePointAt(0);return e!==void 0&&e>=57344&&e<=63743}function Qo(t){let e=[...t];for(;e.length>0;){let n=e.pop();if(M(n)){if(n.localName==="t"&&n.namespaceUri===pa$1){for(let r of n.children)if(!M(r)&&r.value.length>0)return true;continue}for(let r of n.children)e.push(r);}}return false}var ga=new Set(["paragraph","character","table","numbering"]),ya=/^[0-9A-Fa-f]{6}$/,ha=16,Uo=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 qo(t){return t.children}function Pt(t,e){for(let n of qo(t))if(M(n)&&n.localName===e)return n}function xa(t){return Uo.get(t.name.toLowerCase())??Uo.get(t.styleId.toLowerCase())??Number.MAX_SAFE_INTEGER}function kt(t){return t===void 0||t.length===0||t.length>ia||la.test(t)?null:t}function Zo(t,e){if(!t)return [];let n=new Map;for(let o of t.children){if(!M(o)||o.localName!=="style")continue;let s=kt(ee(o,"styleId"));s!==null&&!n.has(s)&&n.set(s,o);}let r=o=>{let s=false,l=false,i=null,c=false,u=false,m=new Set,g=o;for(let P=0;P<ha&&g!==null&&!m.has(g);P+=1){m.add(g);let O=n.get(g);if(!O)break;let R=Pt(O,"rPr");for(let I of R?qo(R):[]){if(!M(I))continue;let b=ee(I,"val"),w=b!=="0"&&b!=="false"&&b!=="off";I.localName==="b"&&!c?(s=w,c=true):I.localName==="i"&&!u?(l=w,u=true):I.localName==="color"&&i===null&&b&&ya.test(b)&&(i=b);}let v=Pt(O,"basedOn");g=v?kt(ee(v,"val")):null;}let p=e?.(o),y=p?.fontFamily??null;return {fontFamily:y!==null&&Go.test(y)?y:null,fontSizePt:p?.fontSizeHalfPoints!=null&&p.fontSizeHalfPoints>0?p.fontSizeHalfPoints/2:null,bold:s,italic:l,color:i}},a=[];for(let[o,s]of n){let l=ee(s,"type");if(l===void 0||!ga.has(l))continue;let i=Pt(s,"name"),c=kt(i?ee(i,"val"):void 0);a.push({styleId:o,name:c??o,type:l,preview:r(o)});}return a.map((o,s)=>({entry:o,index:s,rank:xa(o)})).sort((o,s)=>o.rank-s.rank||o.index-s.index).map(o=>o.entry)}var Pa=128,ka=/[\u0000-\u001F\u007F-\u009F]/,Oa=/[\u0000-\u001F\u007F-\u009F]/g,Ra=200;function vt(t){return t.kind!=="textValue"}function er(t,e){for(let n of t.children)if(vt(n)&&n.localName===e)return n}function St(t,e){return t.attributes.find(n=>n.localName===e)?.value}function Sa(t){let e=new Map;if(!t)return e;for(let n of t.children){if(!vt(n)||n.localName!=="style"||St(n,"type")!=="paragraph")continue;let r=St(n,"styleId");if(r===void 0||r.length===0||r.length>Pa||ka.test(r))continue;let a=g$1(n);a!==null&&e.set(r,a);}return e}function bt(t){let e=er(t,"pPr"),n=e?er(e,"pStyle"):void 0;return n?St(n,"val"):void 0}function tr(t,e){let n=Sa(e);if(n.size===0)return [];let r=[];for(let a of de(t)){if(!vt(a))continue;let o=bt(a);if(o===void 0)continue;let s=n.get(o);if(s===void 0)continue;let l=Dm(t,a.id)??"",i=a.kind==="paragraph"?Fm(a,l):l,c=vb(i).replace(Oa," ").trim().slice(0,Ra);c.length!==0&&r.push({text:c,level:s,blockId:a.id});}return r}var nr=new Map,We=new Map;function or(){nr=We,We=new Map;}function It(t){let e=We.get(t)??nr.get(t);return e||(e=$c(t)),We.set(t,e),e}function va(t,e,n){let r=new Map,a=n(t);for(let o of a){let s=r.get(o.hostParagraphId);s?s.push(o):r.set(o.hostParagraphId,[o]);}return r}function ba(t,e,n){let r=[];for(let a of It(t.root)){let o=e.get(a.id);if(o)for(let s of o)r.push(s);}return r}function rr(t,e,n=Xj){let r=[],a=new Map;for(let o of t){if(r.push(o),o.scope?.kind==="note")continue;let s=a.get(o.part);s||(s=va(o.part,e,n),a.set(o.part,s));for(let l of ba(o,s)){let i=o.scope;r.push({part:o.part,root:l.root,scope:{kind:"frame",id:l.root.id,drawingNodeId:l.drawingNodeId,hostParagraphId:l.hostParagraphId,...i?.kind==="headerFooter"?{owner:i}:{}}});}}return r}var $e=48,Ia=/[\u0000-\u001F\u007F-\u009F]/g;function Ta(t){let e=[],n=ui(t),r=new Map;for(let a of n.segments)Yg(a.node)&&r.set(a.node.id,a.formatRunIds??[]);return jd(t.children,0,a=>{if(a.kind==="run"){e.push({id:a.id,start:n.spanOf(a)?.start??0});return}if(Yg(a))for(let o of r.get(a.id)??[]){let s=n.spanOf(o);s&&e.push({id:o,start:s.start});}},{descendRevisions:true}),e}function wa(t){let e=_c(t);return e?[{part:t,root:e}]:[]}function Na(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[s,l]of o){if(!kf(a,s)||e.has(l.part))continue;e.add(l.part);let i=Yc(l.part).find(c=>c.kind===r);i&&n.push({part:l.part,root:i.root,scope:{kind:"headerFooter",rId:l.rId}});}}return n}function ar(t,e,n){if(!t)return [];let r=[];for(let a of Uc(t.root)){let o=Ic(a);!Kc(a)||o===null||!n.has(o)||r.push({part:t,root:a,scope:{kind:"note",id:yc(e,o)}});}return r}function Ea(t,e){let n=wa(t);if(e){let r=new Set;for(let a of Na(e.headerFooterBySection,r))n.push(a);for(let a of ar(e.footnotes,"footnote",e.referencedNoteIds.footnote))n.push(a);for(let a of ar(e.endnotes,"endnote",e.referencedNoteIds.endnote))n.push(a);}return rr(n)}function sr(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 Ma(t,e,n){let r=t.findIndex(a=>a.id===e);return r<0?null:{index:r,offset:n}}var ir=new Pg;function Ca(t){let e=ir.get(t);return e||(e=d$1(t,Em(t)),ir.set(t,e)),e}function Tt(t,e){return vb(t).replace(Ia," ").slice(0,e)}var Da=1e3;function lr(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}},s=e.slice(0,Da),l=s.map(()=>({matches:[],truncated:false})),i=s.map((u,m)=>xa$1(u)?m:-1);if(i=i.filter(u=>u>=0),i.length===0)return l;let c=n.stories==="body"?void 0:r;or();for(let u of Ea(t,c)){let m=0;for(let g of It(u.root)){if(g.kind!=="paragraph")continue;let p=m;m+=1;let y=Ca(g);if(y.text.length===0)continue;let P=null,O=false;for(let R of i){let v=l[R],I=a-v.matches.length,b=y.findOccurrences(s[R],Math.max(I,1),o);if(I===0&&b.matches.length>0){v.truncated=true,O=true;continue}for(let w of b.matches){let C=w.start+w.length;P??=Ta(g);let j=y.resultRunAddressAt(w.start),$=j?Ma(P,j.runId,j.offset)??sr(P,w.rawStart):sr(P,w.rawStart);v.matches.push({blockId:g.id,start:w.rawStart,length:w.rawEnd-w.rawStart,paragraphIndex:p,runIndex:$.index,runOffset:$.offset,...u.scope?{scope:u.scope}:{},text:Tt(y.displaySlice(w.start,C),256),contextBefore:Tt(y.displaySlice(Math.max(0,w.start-$e),w.start),$e),contextAfter:Tt(y.displaySlice(C,C+$e),$e)});}b.truncated&&(v.truncated=true,O=true);}if(O&&(i=i.filter(R=>!l[R].truncated)),i.length===0)return l}}return l}var Fa=32;function dr(t){let e=null;return((n,r)=>{let a=t.revision(),o=typeof n!="string",s=`${r?.matchCase===true?"c":""}${r?.wholeWord===true?"w":""}`,l=`${r?.limit??""}:${r?.stories??"all"}`,i=JSON.stringify([s,l,n]);e?.revision!==a&&(e={revision:a,results:new Map});let c=e.results.get(i);if(c)return c;let u=t.bodyPart(),m=t.currentPackage(),g={footnote:new Set,endnote:new Set};for(let P of hj(u))g[P.noteKind].add(P.noteId);let p=lr(u,o?n:[n],r,{headerFooterBySection:t.headerFooterBySection(),footnotes:gj(m,"footnote")??null,endnotes:gj(m,"endnote")??null,referencedNoteIds:g}),y=o?p:p[0];return e.results.size>=Fa&&e.results.delete(e.results.keys().next().value),e.results.set(i,y),y})}var Aa=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6"];function pe(t,e=null,n=null){return je$1(t,e,n)}function cr(t){let e=me(t),n=[];for(let r of Aa){let a=e.get(r);if(!a)return [];n.push({slot:r,hex:a});}return n}var ur=new WeakMap;function Nt(t){let e=ur.get(t);if(e!==void 0)return e;let n=Gb(t),r=n===null||!Fb(n)?null:n;return ur.set(t,r),r}var wt=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 pr(t,e){return Object.freeze({...t,partByNode:new wt(t.ordinalByNode,e)})}function fr(t){let e=new Map,n=new Map,r=new Map,a=new Set,o=new Map,s=new Map,l=0;for(let i of t)for(let c of _(i)){r.set(c.id,l),o.set(c.id,i),l+=1;let u=Nt(c);if(u===null)continue;e.set(c.id,u);let m=u.toUpperCase(),g=s.get(m);g?(g.push(c.id),a.add(m)):(s.set(m,[c.id]),n.set(m,c.id));}return Object.freeze({paraIdByNode:e,nodeByParaId:n,ordinalByNode:r,ambiguousParaIds:a,partByNode:o,claimantsByParaId:s})}function mr(t,e){let n=t.indexOf("#");if(n===0)return null;let r=n===-1?La(t,e):Ba(t,n,e);if(!r)return null;let a=cb(r,t);return a?.kind==="paragraph"?Nt(a):null}function Ba(t,e,n){let r=t.slice(0,e),a=n.body.name===r?n.body:void 0;a??=n.openStories.find(s=>s.name===r);let o=a?void 0:n.otherStories.find(s=>s.name===r);return a??(o?n.normalize(o):void 0)}function La(t,e){if(cb(e.body,t))return e.body;let n=e.openStories.find(r=>cb(r,t)!==null);if(n)return n;for(let r of e.otherStories){let a=e.normalize(r);if(cb(a,t))return a}}function Et(t){return t.historyToken??t.historyGroup}var gr={committed:false,rejected:false,opCount:0};function W(t,e){return e===void 0?{committed:false,rejected:true,opCount:t}:{committed:false,rejected:true,opCount:t,reason:e}}function yr(t,e,n={}){let r=e.filter(u=>u.ops.length>0),a=n.partOps??[],o=[...r,...a].reduce((u,m)=>u+m.ops.length,0);if(o===0)return n.packageEdits?.length?W(0,"invalidArgs"):gr;if([...r,...a].some(u=>u.ops.some(bj))||[...r,...a].some(u=>u.ops.some(zj)))return W(o,"invalidArgs");let[s,...l]=r,i=[];for(let u of l){let m=t.partFor(u.scope);if(!m)return W(o,"unknown-part");i.push({partName:m.name,ops:u.ops});}let c=t.transact(s?.scope??{kind:"body"},u=>{for(let m of n.packageEdits??[])u.applyPackage(m);for(let m of s?.ops??[])u.apply(m);for(let m of i)for(let g of m.ops)u.applyTo(m.partName,g);for(let m of a)for(let g of m.ops)u.applyTo(m.partName,g);},{...n,historyGroup:Et(n)});return c.ok?{committed:true,rejected:false,opCount:o}:W(o,c.reason)}function hr(t,e,n,r,a,o){let s=o.partOps??[],l=e.length+s.reduce((m,g)=>m+g.ops.length,0);if(l===0&&!o.packageEdits?.length)return gr;if(s.some(m=>m.ops.some(g=>bj(g)||zj(g))))return W(l,"invalidArgs");let i=e.filter(m=>bj(m)||zj(m)).length;if(i>0){if(s.length||o.packageEdits?.length||i!==e.length||e.length!==1)return W(e.length,"invalidArgs");let m=t.applyLifecycleOp(e[0],{actorId:o.actorId,historyGroup:Et(o)});return m.ok?{committed:true,rejected:false,opCount:1}:W(1,m.detail??m.reason)}let c=o.recordsHistory===false&&o.actorId&&o.operationId?t.partFor(a)?.name:void 0,u=t.transact(a,m=>{n!==void 0&&m.selectionBefore(n),r!==void 0&&m.selectionAfter(r);for(let g of o.packageEdits??[])m.applyPackage(g);for(let g of e)m.apply(g);for(let g of s)for(let p of g.ops)m.applyTo(g.partName,p);c&&m.applyPackage(g=>a$2(g,c,e));},{...o,historyGroup:Et(o)});return u.ok?{committed:true,rejected:false,opCount:l}:W(l,u.reason)}var _a=Object.freeze([]);function ja(t,e={}){return Ha(gg(t),e)}function Ha(t,e={}){if(!t.ok)return t;let n=sa$1(t.package),r=n.parts.get(n.mainDocumentPart);if(!r)return {ok:false,reason:"no-main-document-tree",detail:n.mainDocumentPart};let a=Ob(r),o=new S(n,za$1(n,a),e.contentLockPolicy?{contentLockPolicy:e.contentLockPolicy}:{}),s=null,l=null,i=null,c=null,u=null;o.subscribe(d=>{c=d,u=o.currentPackage();});let m=()=>o.bodyStore(),g=()=>o.currentPackage(),p=bo(),y=Object.freeze({kind:"body"}),P=(d,f)=>{let h=f?.find(k=>k.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");if(!h)return;let x=N$1(h);return x.mode==="Internal"&&x.target.ok?d.parts.get(x.target.partName):void 0},O=(d,f,h)=>{if(d.mainRelationships!==h||d.settingsPart!==P(f,h))return false;for(let x of d.resolution)for(let k of [x.headers,x.footers])for(let S of k.values())if(f.parts.get(S.partName)!==S.part)return false;return true},R=()=>{let d=g(),f=d.relationships.get(d.mainDocumentPart);if(s&&c&&u===d&&O(s,d,f)&&s.packageRevision===c.fromRevision&&o.packageRevision===c.toRevision&&c.story?.kind==="body"&&c.impact==="text-local"&&c.created.length===0&&c.deleted.length===0&&c.splitJoin.length===0&&(s={...s,packageRevision:o.packageRevision,pkg:d,mainRelationships:f,settingsPart:P(d,f)}),!s||s.packageRevision!==o.packageRevision||s.pkg!==d){let h=nf(d);s={packageRevision:o.packageRevision,pkg:d,mainRelationships:f,settingsPart:P(d,f),resolution:h,parts:mf(h)};}return s},v="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",I=null,b$1=()=>{let d=g(),f=(d.relationships.get(d.mainDocumentPart)??[]).find(k=>k.type===v),h;if(f){let k=N$1(f);k.mode==="Internal"&&k.target.ok&&(h=d.parts.get(k.target.partName));}h??=d.parts.get("/word/styles.xml");let x=h?.root??null;return x!==I&&(I=x,ye=null,V=null),I},w=null,C=null,j=()=>{let d=g();return w===d||(w=d,C=md(d)),C},$$1="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",Se=null,ve=null,X=()=>{let d=g();if(Se===d)return ve;Se=d;let f=(d.relationships.get(d.mainDocumentPart)??[]).find(k=>k.type===$$1),h;if(f){let k=N$1(f);k.mode==="Internal"&&k.target.ok&&(h=d.parts.get(k.target.partName));}h??=d.parts.get("/word/settings.xml");let x=h?.root??null;return x!==ve&&(ve=x,Ie=null,ye=null,V=null),ve},Pr="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",kr="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Mt=(d,f)=>{let h=g(),x=(h.relationships.get("/")??[]).find(S=>S.type===d),k;if(x){let S=N$1(x);S.mode==="Internal"&&S.target.ok&&(k=h.parts.get(S.target.partName));}return k??h.parts.get(f)},Ct=null,Ue=Vj,Or=()=>{let d=g();if(Ct===d)return Ue;Ct=d;let f=Mt(Pr,"/docProps/core.xml"),h=Mt(kr,"/docProps/app.xml");return Ue=Wj(f?.root??null,h?.root??null),Ue},Rr="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Dt=null,be=null,te=()=>{let d=g();if(Dt===d)return be;Dt=d;let f=(d.relationships.get(d.mainDocumentPart)??[]).find(k=>k.type===Rr),h;if(f){let k=N$1(f);k.mode==="Internal"&&k.target.ok&&(h=d.parts.get(k.target.partName));}h??=d.parts.get("/word/theme/theme1.xml");let x=h?.root??null;return x!==be&&(be=x,Ie=null,Ge=null,ye=null,V=null),be},Sr="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",Ft=null,At=()=>{let d=g(),f=(d.relationships.get(d.mainDocumentPart)??[]).find(k=>k.type===Sr),h=f?N$1(f):null;return (h?.mode==="Internal"&&h.target.ok?d.parts.get(h.target.partName):void 0)??d.parts.get("/word/fontTable.xml")},vr=()=>(Ft??=Object.freeze(Lg(g(),At())),Ft),fe=null,ne=null,me=null,ge=null,ye=null,Ge=null,Ie=null,Bt=()=>{let d=[m().part.root],f=new Set;for(let h of U())f.has(h)||(f.add(h),d.push(h.root));return d},Je=()=>{let d=Bt(),f=b$1();return f&&d.splice(1,0,f),d},V=null,Te=null,he=null,oe=null,Lt=new WeakMap,we=null,_t=d=>{let f=Lt.get(d);if(f)return f;let h=Ob(d);return Lt.set(d,h),h},jt=()=>{let d=o.packageRevision,f=o.openStoryToken();if(!oe||oe.revision!==d||oe.openStories!==f){let h=o.openStoryParts(),x=new Set(h.map(F=>F.name)),k=U().filter(F=>!x.has(F.name)).map(_t),S=[m().part,...h,...k],T=oe,H=T!==null&&c!==null&&T.openStories===f&&T.revision===c.fromRevision&&d===c.toRevision&&c.impact==="text-local"&&c.created.length===0&&c.deleted.length===0&&c.splitJoin.length===0&&T.parts.length===S.length&&T.parts.every((F,G)=>F.name===S[G]?.name);oe={revision:d,openStories:f,parts:S,index:H&&T?pr(T.index,S):fr(S)};}return oe.index},Ht=Lo(),br=()=>{let d=m().part.name,f=new Map;for(let h of [m().part,...U()])for(let[x,k]of ja$1(g(),h.name,d))f.set(x,k);return f},Ir=()=>[m().part,...U()],U=()=>{let d=[],f=new Set;for(let x of R().parts)for(let k of [x.headers,x.footers])for(let S of k.values())f.has(S)||(f.add(S),d.push(S));let h=g();for(let x of ["footnote","endnote"]){let k=gj(h,x);!k||f.has(k)||(f.add(k),d.push(k));}return d},zt={ok:true,session:{editable:_(m().part).length>0,paragraphIds:()=>_(m().part).map(d=>d.id),paragraphIdsIn(d=y){let f=o.partFor(d);return f?_(f).map(h=>h.id):[]},part:()=>m().part,partFor:d=>o.partFor(d),currentPackage:g,collaborationPort:d=>b(o,{documentId:d,interactive:true}),applyTreeOps(d,f,h,x=y,k={}){return hr(o,d,f,h,x,k)},applyTreeOpsAtomic(d,f={}){return yr(o,d,f)},projectDoc:()=>Z(m().part),reconcile:d=>ut(d,m().part,c),lastCommitWasStructural:()=>c!==null&&(c.created.length>0||c.deleted.length>0||c.splitJoin.length>0||c.impact==="global"),applyPmDoc(d){let f=m(),h=ct(f.part,d);if(!h.ok)return {committed:false,rejected:true,opCount:0,reason:h.reason};if(h.ops.length===0)return {committed:false,rejected:false,opCount:0};let x=o.transact(y,k=>{for(let S of h.ops)k.apply(S);});return x.ok?{committed:true,rejected:false,opCount:h.ops.length}:{committed:false,rejected:true,opCount:h.ops.length,reason:x.reason}},storyParts:Ir,bodyText:()=>To(m().part),storyText(d){let f=o.partFor(d);return f?_(f).map(h=>Dm(f,h.id)??"").join(`
|
|
5
|
+
`):null},revision:()=>m().revision,revisionFor:d=>o.revisionFor(d),packageRevision:()=>o.packageRevision,canUndo:()=>o.canUndo,canRedo:()=>o.canRedo,undo:()=>{let d=o.selectionForUndo();return o.undo()===null?null:d},redo:()=>{let d=o.selectionForRedo();return o.redo()===null?null:d},beginComposition:(d=y)=>{o.beginComposition(d);},endComposition:()=>o.endComposition(),subscribe(d){return o.subscribe(d)},save(){return p(g())},saveSteps(){return p.steps(g())},headerFooterParts:()=>{let d=R().parts;return d[d.length-1]??pf(g())},headerFooterPartsBySection:()=>R().parts,headerFooterResolutionBySection:()=>R().resolution,documentFonts(){return fe&&fe.revision===o.packageRevision||(fe={revision:o.packageRevision,fonts:Jo(Je(),pe(te(),X()))}),fe.fonts},symbolFontFamilies(){return me&&me.revision===o.packageRevision||(me={revision:o.packageRevision,fonts:Vo(Je())}),me.fonts},renderedFontFamilies(){let d=b$1();return ne&&ne.revision===o.packageRevision&&ne.styles===d||(ne={revision:o.packageRevision,styles:d,families:f(Bt(),d,pe(te(),X()))}),ne.families},rendersText(){return ge&&ge.revision===o.packageRevision||(ge={revision:o.packageRevision,rendersText:Qo(Je())}),ge.rendersText},documentStyles(){let d$1=b$1(),f=te(),h=X();V??=d(d$1,pe(f,h));let x=V;return ye??=Zo(d$1,k=>x(k)),ye},stylesRoot:()=>b$1(),documentThemeFonts(){let d=te(),f=X();return Ie??=pe(d,f,At()?.root??null),Ie},numberingRoot:()=>j(),settingsRoot:()=>X(),documentProperties:()=>Or(),trackingSettings:()=>Sj(X()),documentThemeColors(){let d=te();return Ge??=cr(d),Ge},effectiveRunDefaults(d$1,f){let h=b$1(),x=te(),k=X();V??=d(h,pe(x,k));let S=m();if(!Te||Te.revision!==S.revision){let T=new Map;for(let H of _(S.part))H.kind!=="textValue"&&T.set(H.id,bt(H)??null);Te={revision:S.revision,byId:T};}return V(Te.byId.get(d$1)??null,f)},documentOutline(){let d=m();return he&&he.revision===d.revision||(he={revision:d.revision,outline:tr(d.part,b$1())}),he.outline},findText:dr({revision:()=>o.packageRevision,bodyPart:()=>m().part,currentPackage:g,headerFooterBySection:()=>R().resolution}),embeddedFonts:vr,paragraphAnchors:jt,paraIdOf:d=>mr(d,{body:m().part,openStories:o.openStoryParts(),otherStories:U(),normalize:_t}),nodeIdOf:d=>jt().nodeByParaId.get(d.toUpperCase())??null,relationshipTarget:(d,f=y)=>{let h=g(),x=o.partFor(f);return x?Yi(h,x.name,d):null},bookmarks:()=>{let d=o.packageRevision;if(!we||we.revision!==d){let f=new Map(zi(m().part));for(let h of U())for(let[x,k]of zi(h))f.has(x)||f.set(x,k);we={revision:d,index:f};}return we.index},ensureHyperlinkRelationship(d,f=y){let h=o.partFor(f);return h?Va(o,()=>{let x=g(),k=Xi(x,d,h.name);return k?(k.pkg!==x&&o.replacePackageShell(k.pkg),k.relationshipId):null},x=>x!==null):null},reviewItems(){let d=e.reviewModel;if(!d)return _a;let f=m(),h=`${o.packageRevision}:${f.revision}`;if(l&&l.revisionKey===h)return l.items;let x=g(),k=x.parts.get($(x,f.part.name)),S=x.parts.get(aa$1(x,f.part.name)),T={root:f.part.root,commentsPart:k,commentsExtendedPart:S,stylesPart:ld(x),numberingRoot:j(),furnitureParts:U(),customNodePayloads:br()},{stylesPart:H,numberingRoot:F}=T,G=Wo(d,x,T,l),Wt=()=>Ht.get(T)??G.filtered(d.collectReviewItems({storyPart:f.part,furnitureParts:T.furnitureParts,stylesPart:T.stylesPart,commentsPart:k,commentsExtendedPart:S,customNodePayloads:T.customNodePayloads})),Ye={part:f.part,commentsPart:k,commentsExtendedPart:S,currentPackageRevision:o.packageRevision,currentPackage:x,changePackage:u},re,xe=null;if(l&&c&&G.sameFilter&&Mo(c,l,l.items,Ye))re=l.items;else {let ae=l&&c?Co(c,l,l.items,Ye):null,Ke=ae&&l&&G.patchable(ae)?d.revisionItemsOfParagraph(f.part,ae):null;if(ae&&l&&Ke&&Ae(l.items,Ke,ae,f.part)){xe=l.paragraphOrder??Lk(f.part);let Pe=Be(l.items,xe,ae,Ke,G.filtered,f.part);Pe||(xe=Lk(f.part)),re=Pe??Wt();}else {let Pe=Bo(c,l,Ye,G,d);xe=Pe?.paragraphOrder??Lk(f.part),re=Pe?.items??Wt();}}return Ht.set(T,re=G.publish(re)),l={revisionKey:h,bodyRevision:f.revision,packageRevision:o.packageRevision,items:re,paragraphOrder:xe,commentsPart:k,commentsExtendedPart:S,pkg:x,stylesPart:H,numberingRoot:F},l.items},hasReviewContent(){let d=o.packageRevision;if(!i||i.revision!==d){let f=ld(g()),h=[m().part,...U(),...f?[f]:[]];i={revision:d,present:h.some(x=>pt(x.root)||Il(x).length>0)};}return i.present},replyToComment(d,f,h,x,k,S=y,T,H={}){let F=ba$1(o,{anchor:{paragraphId:f.paragraphId,start:f.start,end:f.end,...f.endParagraphId===void 0?{}:{endParagraphId:f.endParagraphId}},author:x,text:h,...k===void 0?{}:{date:k},...d===null?{}:{replyToCommentId:d},...T===void 0?{}:{actorId:T}},S,H.historyToken);return F.ok?F.commentId:null},setCommentResolved(d,f,h={}){return ca$1(o,d,f,h.historyToken).ok},deleteComment(d,f=y,h,x){return this.deleteComments([{commentId:d}],f,h,x)},deleteComments(d,f=y,h,x={}){return da$1(o,d,f,h,x.historyToken)},insertCustomNode(d,f=y,h={}){return la$1(o,d,f,h.historyToken)},removeCustomNode(d,f=y){return ma$1(o,d,f)},sweepCustomNodePayloads(d){return Va(o,()=>{let f=m(),h=ia$1(o.currentPackage(),f.part.name,d);return h.ok?h.removed.length===0?{ok:true,removed:[]}:(o.replacePackageShell(h.pkg),{ok:true,removed:h.removed}):{ok:false,reason:h.reason}},f=>f.ok&&f.removed.length>0)},ensureListDefinition(d,f){return Va(o,()=>{let h=Li(g(),d,f);return h?(o.replacePackageShell(h.pkg),w=null,C=null,h.numId):null},h=>h!==null)},ensureNumberingLevel(d,f,h){return Va(o,()=>{let x=g(),k=Mi(x,d,f,h);return k?k!==x?(o.replacePackageShell(k),w=null,C=null,{ok:true,changed:true}):{ok:true,changed:false}:{ok:false,changed:false}},x=>x.changed).ok},insertImage(d,f){return o.insertImage(d,f)},replaceImage(d,f,h,x,k,S){return o.replaceImage(d,f,h,x,k,S)},deleteImage(d,f){return o.deleteImage(d,f)},deleteImageTracked(d,f,h){return o.deleteImageTracked(d,f,h)},applyImageProperties(d,f){return o.applyImageProperties(d,f)},applyFragmentPaste(d,f){return o.applyFragmentPaste(d,f)}}};return Hn(zt.session,o),zt}var za=g.projection;function qa(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 Za(t,e,n={}){let r=null,a=false,o=()=>n.onChange?.(s()),s=()=>({revision:e.revision(),canUndo:e.canUndo(),canRedo:e.canRedo(),lastRejection:r}),l=p=>{a=true;let y=c.state.tr.replaceWith(0,c.state.doc.content.size,p.content);y.setMeta("addToHistory",false),c.dispatch(y),a=false;},i=p=>()=>(p()&&(l(e.projectDoc()),o()),true),c=new EditorView(t,{state:EditorState.create({doc:e.projectDoc(),plugins:[keymap({...baseKeymap,Home:selectTextblockStart,End:selectTextblockEnd,"Mod-z":i(()=>e.undo()!==null),"Mod-y":i(()=>e.redo()!==null),"Shift-Mod-z":i(()=>e.redo()!==null),"Mod-b":(p,y)=>g(p,y,"b"),"Mod-i":(p,y)=>g(p,y,"i"),"Mod-u":(p,y)=>g(p,y,"u",{val:"single"})})]}),editable:()=>e.editable,handleDOMEvents:{keydown:p=>(u(p),false),beforeinput:(p,y)=>{let P=y;if(p.composing)return false;u(p);let O=P.inputType;if(O==="insertText"&&P.data!=null){P.preventDefault();let{from:R,to:v}=p.state.selection;return p.dispatch(p.state.tr.insertText(P.data,R,v)),true}if(O==="deleteContentBackward"){P.preventDefault();let{from:R,empty:v}=p.state.selection;return v?R>0?p.dispatch(p.state.tr.delete(R-1,R)):joinBackward(p.state,p.dispatch):deleteSelection(p.state,p.dispatch),true}if(O==="deleteContentForward"){P.preventDefault();let{from:R,to:v,empty:I}=p.state.selection;return I?v<p.state.doc.content.size?p.dispatch(p.state.tr.delete(R,R+1)):joinForward(p.state,p.dispatch):deleteSelection(p.state,p.dispatch),true}return O==="insertParagraph"?(P.preventDefault(),splitBlock(p.state,p.dispatch),true):false},compositionstart:()=>(e.beginComposition(),false),compositionend:()=>(e.endComposition(),o(),false)},dispatchTransaction(p){let y=c.state.apply(p);if(a||!p.docChanged){c.updateState(y);return}let P=e.applyPmDoc(y.doc);if(P.rejected){r=String(P.reason??"rejected"),c.updateState(y),l(e.projectDoc()),o();return}r=null,c.updateState(P.committed&&e.lastCommitWasStructural()?m(y):y),o();}});function u(p){if(p.composing||a)return;let y=p.dom.ownerDocument.getSelection(),P=y?.anchorNode,O=y?.focusNode;if(!(!y||!P||!O)&&!(!p.dom.contains(P)||!p.dom.contains(O)))try{let R=p.posAtDOM(P,y.anchorOffset),v=p.posAtDOM(O,y.focusOffset),I=p.state.selection;if(I.anchor===R&&I.head===v)return;let b=TextSelection.create(p.state.doc,R,v);p.dispatch(p.state.tr.setSelection(b).setMeta("addToHistory",!1));}catch{}}function m(p){let y=e.paragraphIds(),P=p.tr,O=false,R=0;return p.doc.forEach((v,I)=>{let b=y[R];R+=1,!(v.type.name!=="paragraph"||b===void 0)&&v.attrs.nodeId!==b&&(P=P.setNodeMarkup(I,void 0,{...v.attrs,nodeId:b}),O=true);}),O?p.apply(P.setMeta("addToHistory",false)):p}function g(p,y,P,O){let R=N.marks.runProps;if(!y)return true;let{from:v,to:I,empty:b}=p.selection;if(b)return true;let C=p.doc.resolve(v).marks().find(Se=>Se.type===R)?.attrs.props??[],j=qa(C,P,O),$=p.tr;return $.removeMark(v,I,R),j.length>0&&$.addMark(v,I,R.create({props:j})),y($),true}return {view:c,state:s,undo:()=>i(()=>e.undo()!==null)(),redo:()=>i(()=>e.redo()!==null)(),toggleRunProperty(p,y){g(c.state,c.dispatch.bind(c),p,y);},destroy:()=>c.destroy()}}export{N as a,lt as b,de as c,_ as d,Z as e,ct as f,Wr as g,ut as h,bt as i,Fs as j,na as k,Ws as l,ja as m,Ha as n,za as o,Za as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b,a}from'./chunk-VLQDQNSS.js';import {ke,pa,Ea,ce,de,rh,be}from'./chunk-6MF5PN2E.js';var Fn=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,bn=128,Rn=/[\u0000-\u001F\u007F-\u009F]/,Nn=16,Tn=2,Pn=3276;function rn(n){return n.kind!=="textValue"}function N(n,e){for(let t of n.children)if(rn(t)&&t.localName===e)return t}function g(n,e){return n.attributes.find(t=>t.localName===e)?.value}function T(n){return n===void 0||n.length===0||n.length>bn||Rn.test(n)?null:n}function U(n,e){let t=ke(g(n,"asciiTheme"),e)??b(g(n,"ascii"))??ke(g(n,"hAnsiTheme"),e)??b(g(n,"hAnsi"));return a(t??void 0)}function V(n,e){let t=ke(g(n,"eastAsiaTheme"),e);if(t!==null)return t;let l=g(n,"eastAsia");return l===void 0?null:a(b(l)??void 0)}function J(n,e){let t=ke(g(n,"hAnsiTheme"),e);if(t!==null)return t;let l=g(n,"hAnsi");return l===void 0?null:a(b(l)??void 0)}function Mn(n){return n!==void 0&&Fn.test(n)?n:null}function ae(n){return Mn(n)}function Cn(n){return n!==void 0&&["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(e=>!!g(n,e))}function on(n,e){if(!n)return {fontFamily:null,fontSizeHalfPoints:null,hasLatinFontReference:false};let t=N(n,"rFonts"),l=N(n,"sz"),a=l?g(l,"val"):void 0,i=a!==void 0&&/^\d{1,4}$/.test(a)?Number(a):null;return {fontFamily:t?U(t,e):null,hasLatinFontReference:Cn(t),fontSizeHalfPoints:i!==null&&i>=Tn&&i<=Pn?i:null}}function ie(n,e){let t=new Map,l={fontFamily:null,fontSizeHalfPoints:null,hasLatinFontReference:false};if(n){let o=N(n,"docDefaults"),r=o?N(o,"rPrDefault"):void 0;l=on(r?N(r,"rPr"):void 0,e);for(let s of n.children){if(!rn(s)||s.localName!=="style")continue;let f=T(g(s,"styleId"));if(f===null||t.has(f))continue;let u=N(s,"basedOn");t.set(f,{basedOn:T(u?g(u,"val"):void 0),own:on(N(s,"rPr"),e)});}}let a=new Map,i=o=>{let r=o??"",s=a.get(r);if(s)return s;let f=null,u=null,d=l.hasLatinFontReference,y=new Set,A=o;for(let k=0;A!==null&&k<Nn&&!y.has(A);k+=1){y.add(A);let D=t.get(A);if(!D)break;f??=D.own.fontFamily,d||=D.own.hasLatinFontReference,u??=D.own.fontSizeHalfPoints,A=D.basedOn;}let H={hasLatinFontReference:d,fontFamily:f??l.fontFamily,fontSizeHalfPoints:u??l.fontSizeHalfPoints};return a.set(r,H),H};return (o,r)=>{let s=i(o),f=r?.find(y=>y.localName==="rFonts"),u=f?ke(f.attributes?.asciiTheme,e)??(f.attributes?.ascii===void 0?ke(f.attributes?.hAnsiTheme,e):null):null,d=["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(y=>!!f?.attributes?.[y]);return {fontFamily:u??s.fontFamily??(!s.hasLatinFontReference&&!d?e.minor:null),fontSizeHalfPoints:s.fontSizeHalfPoints}}}function sn(n){for(let e of n.children)if(e.kind!=="textValue"&&e.localName==="rPr"&&e.namespaceUri===pa)return Ea(e,"vanish");return false}var Hn=16,Ln=16,In=32,jn=4096;function E(n){return n.kind!=="textValue"}function c(n,e){for(let t of n.children)if(E(t)&&t.localName===e)return t}function x(n,e){return n.attributes.find(t=>t.localName===e)?.value}function _n(n){return n==="1"||n==="true"||n==="on"}function Y(){return {profiles:new Map}}function cn(n){return JSON.stringify([n.latin,n.eastAsia,n.hasEastAsian,n.hAnsi,n.hasHAnsi,n.hint,n.runStyle,n.paragraphStyle===void 0?0:n.paragraphStyle,n.tableStyle===void 0?0:n.tableStyle])}function yn(n,e){let t=cn(e);n.profiles.has(t)||n.profiles.set(t,e);}function $(n,e){for(let[t,l]of e.profiles)n.profiles.has(t)||n.profiles.set(t,l);}function Bn(n,e){let t=e.localName==="tbl",l=c(e,t?"tblPr":"pPr"),a=l?c(l,t?"tblStyle":"pStyle"):void 0,i=T(a?x(a,"val"):void 0),o=new Map;for(let r of n.profiles.values()){let s=t&&r.tableStyle===void 0?{...r,tableStyle:i}:!t&&r.paragraphStyle===void 0?{...r,paragraphStyle:i}:r;o.set(cn(s),s);}n.profiles=o;}function h(n,e){if(e===null)return;let t=e.toLowerCase();n.has(t)||n.set(t,e);}var vn=new Set(["tab","noBreakHyphen","softHyphen","footnoteRef","endnoteRef","footnoteReference","endnoteReference"]),kn=128;function zn(n){for(let e of n.attributes)if(e.localName==="font"&&!(e.namespaceUri!==pa&&e.namespaceUri!==""))return e.value.length>0&&e.value.length<=kn;return false}function wn(n,e){if(sn(n))return false;if(e?.has(n.id))return true;for(let t of n.children)if(!(!E(t)||t.namespaceUri!==pa)){if(vn.has(t.localName))return true;if(t.localName==="sym"){if(!zn(t))return true;continue}if(!(t.localName!=="t"&&t.localName!=="delText")){for(let l of t.children)if(!E(l)&&l.value.length>0)return true}}return false}function Un(n){return n>=160&&n<=65535&&!(n>=1424&&n<=1983)&&!(n>=64285&&n<=65023)&&!(n>=65136&&n<=65278)&&!be(n)}function Yn(n){let e=false,t=false;for(let l of n.children)if(!(!E(l)||l.namespaceUri!==pa)&&!(l.localName!=="t"&&l.localName!=="delText")){for(let a of l.children)if(!E(a))for(let i of a.value){let o=i.codePointAt(0);if(!(o<128)&&(e||=be(o),t||=Un(o),e&&t))return {eastAsian:e,hAnsi:t}}}return {eastAsian:e,hAnsi:t}}function Xn(n,e,t,l){if(!wn(n,l))return;let a=c(n,"rPr"),i=a?c(a,"rFonts"):void 0,o=Yn(n),r=o.eastAsian,s=a?c(a,"rStyle"):void 0;yn(e,{latin:i?U(i,t):null,eastAsia:i&&(r||o.hAnsi)?V(i,t):null,hasEastAsian:r,hint:(i&&x(i,"hint"))??null,hAnsi:i&&o.hAnsi?J(i,t):null,hasHAnsi:o.hAnsi,runStyle:T(s?x(s,"val"):void 0)});}function hn(n){return (n.localName==="p"||n.localName==="tbl")&&n.namespaceUri===pa}var Wn={latin:null,eastAsia:null,hasEastAsian:false,hAnsi:null,hasHAnsi:false,hint:null,runStyle:null};function gn(n,e,t,l){n.namespaceUri===pa&&(l?.has(n.id)&&n.localName==="fldSimple"&&yn(e,Wn),n.localName==="r"?Xn(n,e,t,l):hn(n)&&Bn(e,n));}function An(n,e,t){let l=[{node:n,summary:Y(),next:0}];for(;;){let a=l[l.length-1],i=a.node.children;if(a.next<i.length){let r=i[a.next];a.next+=1,E(r)&&l.push({node:r,summary:Y(),next:0});continue}gn(a.node,a.summary,e,t),l.pop();let o=l[l.length-1];if(!o)return a.summary;$(o.summary,a.summary);}}var un=new WeakMap;function Sn(n,e,t){let l=un.get(n);if(l&&l.major===e.major&&l.minor===e.minor&&l.majorEastAsia===e.majorEastAsia&&l.minorEastAsia===e.minorEastAsia&&l.majorBidi===e.majorBidi&&l.minorBidi===e.minorBidi)return l.summary;let a;return n.children.length>=Ln&&t<In?a=Zn(n,e,t):a=An(n,e),un.set(n,{major:e.major,minor:e.minor,majorEastAsia:e.majorEastAsia,minorEastAsia:e.minorEastAsia,majorBidi:e.majorBidi,minorBidi:e.minorBidi,summary:a}),a}var C=new Map,Vn=64;function Jn(n,e){return n.major===e.major&&n.minor===e.minor&&n.majorEastAsia===e.majorEastAsia&&n.minorEastAsia===e.minorEastAsia&&n.majorBidi===e.majorBidi&&n.minorBidi===e.minorBidi}function Kn(n,e){if(n===e)return true;if(!n||!e||n.profiles.size!==e.profiles.size)return false;for(let t of n.profiles.keys())if(!e.profiles.has(t))return false;return true}function Zn(n,e,t){let l=n.children,a=n.namespaceUri!==pa||n.localName!=="r"&&!hn(n),i=a?C.get(n.id):void 0,o=i?.children.deref(),r=i!==void 0&&o!==void 0&&o.length===l.length&&Jn(i.themeFonts,e),s=r,f=l.map((d,y)=>{if(r&&d===o[y])return i.parts[y];let A=E(d)?Sn(d,e,t+1):null;return s&&!Kn(A,i.parts[y])&&(s=false),A}),u;if(s)u=i.summary;else {u=Y();for(let d of f)d&&$(u,d);gn(n,u,e);}return a&&(C.delete(n.id),C.set(n.id,{children:rh(l),parts:f,summary:u,themeFonts:e}),C.size>Vn&&C.delete(C.keys().next().value)),u}var v={latin:null,eastAsia:null,hAnsi:null,hint:null,conditional:[],conditionalEastAsia:[]},$n={docDefaultLatin:null,docDefaultEastAsia:null,docDefaultHAnsi:null,docDefaultHint:null,docDefaultsNameLatin:false,hAnsiSlotDefault:null,fallbackEastAsia:null,defaultParagraph:null,defaultCharacter:null,defaultTable:null,chain:()=>v,characterChain:()=>v},fn=new WeakMap;function K(n,e){let t=c(n,"rPr"),l=t?c(t,"rFonts"):void 0;return l?U(l,e):null}function Z(n,e){let t=c(n,"rPr"),l=t?c(t,"rFonts"):void 0;return l?V(l,e):null}function dn(n){let e=c(n,"rPr"),t=e?c(e,"rFonts"):void 0;return (t&&x(t,"hint"))??null}function mn(n,e){let t=c(n,"rPr"),l=t?c(t,"rFonts"):void 0;return l?J(l,e):null}function qn(n,e){let t=new Map,l=null,a=null,i=null,o=null,r=null,s=null,f=c(n,"docDefaults"),u=f?c(f,"rPrDefault"):void 0;u&&(l=K(u,e),a=Z(u,e),i=mn(u,e));let d=u?c(u,"rPr"):void 0,y=d?c(d,"rFonts"):void 0,A=y&&["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(m=>!!x(y,m)),H=u?ce:e.minor;A||(l??=H);let k=u?de:e.minorEastAsia,D=0;for(let m of n.children){if(!E(m)||m.localName!=="style")continue;if(D>=jn)break;D+=1;let S=T(x(m,"styleId"));if(S===null)continue;let z=c(m,"basedOn"),L=[],I=[];for(let F of m.children){if(!E(F)||F.localName!=="tblStylePr")continue;let j=K(F,e);j!==null&&L.push(j);let _=Z(F,e);_!==null&&I.push(_);}t.set(S,{basedOn:T(z?x(z,"val"):void 0),family:K(m,e),eastAsiaFamily:Z(m,e),hAnsiFamily:mn(m,e),hint:dn(m),conditionalFamilies:L,conditionalEastAsiaFamilies:I});let P=_n(x(m,"default")),M=x(m,"type");M==="paragraph"?P?o=S:o===S&&(o=null):M==="character"?P?r=S:r===S&&(r=null):M==="table"&&(P?s=S:s===S&&(s=null));}let pn=new Map,On=new Map,q=(m,S,z)=>{if(m===null)return v;let L=S.get(m);if(L)return L;let I=null,P=null,M=null,F=null,j=[],_=[],G=new Set,b=m;for(let nn=0;b!==null&&nn<Hn&&!G.has(b);nn+=1){G.add(b);let p=t.get(b);if(!p)break;if(b===z){b=p.basedOn;continue}I??=p.family,P??=p.eastAsiaFamily,M??=p.hAnsiFamily,F??=p.hint;for(let X of p.conditionalFamilies)j.push(X);for(let X of p.conditionalEastAsiaFamilies)_.push(X);b=p.basedOn;}let Q={latin:I,eastAsia:P,hAnsi:M,hint:F,conditional:j,conditionalEastAsia:_};return S.set(m,Q),Q},xn=m=>q(m,pn,null),Dn=m=>q(m,On,r);return {docDefaultLatin:l,docDefaultEastAsia:a,docDefaultHAnsi:i,docDefaultHint:u?dn(u):null,docDefaultsNameLatin:!!A,hAnsiSlotDefault:H,fallbackEastAsia:k,defaultParagraph:o,defaultCharacter:r,defaultTable:s,chain:xn,characterChain:Dn}}function Gn(n,e){if(!n)return {...$n,docDefaultLatin:e.minor,hAnsiSlotDefault:e.minor,fallbackEastAsia:e.minorEastAsia};let t=fn.get(n);if(t&&t.major===e.major&&t.minor===e.minor&&t.majorEastAsia===e.majorEastAsia&&t.minorEastAsia===e.minorEastAsia&&t.majorBidi===e.majorBidi&&t.minorBidi===e.minorBidi)return t.index;let l=qn(n,e);return fn.set(n,{major:e.major,minor:e.minor,majorEastAsia:e.majorEastAsia,minorEastAsia:e.minorEastAsia,majorBidi:e.majorBidi,minorBidi:e.minorBidi,index:l}),l}function Qn(n,e,t){let l=[e.characterChain(n.runStyle??null),e.chain(n.paragraphStyle??e.defaultParagraph),n.tableStyle===false||n.tableStyle===void 0?v:e.chain(n.tableStyle??e.defaultTable)];for(let a of l){h(t,a.eastAsia),h(t,a.latin),n.hasHAnsi&&h(t,a.hAnsi);for(let i of a.conditional)h(t,i);for(let i of a.conditionalEastAsia)h(t,i);}h(t,e.docDefaultLatin),h(t,e.docDefaultEastAsia),n.hasHAnsi&&h(t,e.docDefaultHAnsi);}function ne(n,e,t){return n.latin!==null||e.some(l=>l.latin!==null)||t.docDefaultsNameLatin}function ee(n,e,t,l){let a=e.characterChain(n.runStyle??null),i=e.chain(n.paragraphStyle??e.defaultParagraph),o=n.tableStyle===false||n.tableStyle===void 0?v:e.chain(n.tableStyle??e.defaultTable);n.latin!==null?h(t,n.latin):h(l,a.latin??i.latin??o.latin??e.docDefaultLatin);for(let s of o.conditional)h(l,s);n.hasHAnsi&&(n.hAnsi!==null?h(t,n.hAnsi):h(l,a.hAnsi??i.hAnsi??o.hAnsi??e.docDefaultHAnsi??(ne(n,[a,i,o],e)?e.hAnsiSlotDefault:null)));let r=n.hint??a.hint??i.hint??o.hint??e.docDefaultHint;if(!(!n.hasEastAsian&&!(n.hasHAnsi&&r==="eastAsia"))){n.eastAsia!==null?h(t,n.eastAsia):h(l,a.eastAsia??i.eastAsia??o.eastAsia??e.docDefaultEastAsia??e.fallbackEastAsia);for(let s of o.conditionalEastAsia)h(l,s);}}function he(n,e,t,l){return En(n,e,t,true,l)}function En(n,e,t,l,a){let i=Gn(e,t),o=new Map,r=new Map;for(let f of n){let u=Y();for(let d of f.children)E(d)&&$(u,a&&a.size>0?An(d,t,a):Sn(d,t,0));for(let d of u.profiles.values()){let y=d.tableStyle===void 0?{...d,tableStyle:false}:d;ee(y,i,o,r),l&&Qn(y,i,r);}}for(let f of o.keys())r.delete(f);let s=[...r.values()].sort((f,u)=>f<u?-1:f>u?1:0);return Object.freeze({direct:Object.freeze([...o.values()]),inherited:Object.freeze(s)})}function ge(n,e,t){let l=En(n,e,t,false),a=[...l.direct,...l.inherited];return a.sort((i,o)=>i<o?-1:i>o?1:0),a}export{sn as a,Mn as b,ae as c,ie as d,he as e,ge as f};
|