@reviseio/engine 0.0.0-stage → 3.0.1

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/FONT-LICENSE-HAN-EXT-B.txt +91 -0
  3. package/FONT-LICENSE-KATEX.txt +95 -0
  4. package/FONT-LICENSE-LIBERATION.txt +102 -0
  5. package/FONT-LICENSE-NOTO-MULTILINGUAL.txt +93 -0
  6. package/FONT-LICENSE-NOTO-SANS-SC.txt +93 -0
  7. package/FONT-LICENSE-NOTO.txt +94 -0
  8. package/FONT-LICENSE-SOURCE-CODE-PRO.txt +94 -0
  9. package/FONT-LICENSE-SOURCE-SERIF-4.txt +93 -0
  10. package/LICENSE +141 -0
  11. package/README.md +11 -2
  12. package/THIRD-PARTY-NOTICES.md +3376 -0
  13. package/assets/historyMaterializeWorker-Kl0syEbc.js +618 -0
  14. package/chunks/AgentHtmlConverter-CnnB8-WI.js +379 -0
  15. package/chunks/AgentPageRenderViews-BTLjPZJQ.js +2 -0
  16. package/chunks/AgentPageRenderer-DLgUGrGy.js +180 -0
  17. package/chunks/BidiText-Bkp4Y90s.js +160 -0
  18. package/chunks/BlockDiff-B6-aJxHo.js +42 -0
  19. package/chunks/CanvasRenderer-C1Vegx9Y.js +110 -0
  20. package/chunks/ColorParserFull-BKH72fK8.js +446 -0
  21. package/chunks/DocumentCompare-C8295s35.js +6 -0
  22. package/chunks/DocumentLayout-CsU5MR-3.js +12 -0
  23. package/chunks/DocumentLayoutEngine-C62pyGVf.js +218 -0
  24. package/chunks/DocumentMutator-Bat_oLBQ.js +13 -0
  25. package/chunks/DocumentScrubber-BZQn_z92.js +21 -0
  26. package/chunks/DocumentSession-BDcazSEv.js +1 -0
  27. package/chunks/DocumentStylesheet-CEEt18sr.js +7 -0
  28. package/chunks/DocxConverter-BC31uYIL.js +1236 -0
  29. package/chunks/DocxGraft-L10HXM3U.js +8 -0
  30. package/chunks/HorizontalRuleOrnaments-gmUZ3R7Q.js +3 -0
  31. package/chunks/HtmlConverter-C5ihhZ6G.js +267 -0
  32. package/chunks/ListNumbering-Qlu6AuRZ.js +23 -0
  33. package/chunks/MarkdownConverter-DofaSeC4.js +57 -0
  34. package/chunks/MathRenderer-Bz9WEVvF.js +68 -0
  35. package/chunks/OdtConverter-c1fTWoAt.js +125 -0
  36. package/chunks/OfficeImportShared-CrOpHpJ-.js +30 -0
  37. package/chunks/PageNumeralFonts-BWzI061X.js +5 -0
  38. package/chunks/ParagraphDiffAnalysis-DrmStvmz.js +36 -0
  39. package/chunks/PdfConverter-DX7fsRH5.js +457 -0
  40. package/chunks/RtfConverter-hbJ2529G.js +186 -0
  41. package/chunks/TableBorders-DVhdvo6f.js +32 -0
  42. package/chunks/TableGrid-DbroRucl.js +12 -0
  43. package/chunks/TextDecoding-IPbuUqcC.js +2 -0
  44. package/chunks/TextFileDecoder-BZBBejlR.js +10 -0
  45. package/chunks/TxtConverter-YHv5FXWb.js +14 -0
  46. package/chunks/Typography-B4gndEdB.js +28 -0
  47. package/chunks/UnicodeUtils-CXtusU4g.js +10 -0
  48. package/chunks/XmlConverter-BRRluy9k.js +55 -0
  49. package/chunks/_commonjsHelpers-DaMA6jEr.js +2 -0
  50. package/chunks/_revise-sdk-lazy-harfbuzz-CDWdjF9f.js +1 -0
  51. package/chunks/base64-Di1bxoXD.js +1 -0
  52. package/chunks/browser-module-CFmqfGkE.js +1791 -0
  53. package/chunks/bundle.min-DRpfgV69.js +782 -0
  54. package/chunks/capture-i_dPkQIS.js +11 -0
  55. package/chunks/carrier-pYM9xf6x.js +6 -0
  56. package/chunks/chromeImageLayout-BiQ3Iz1-.js +18 -0
  57. package/chunks/engine-LMUnxdm2.js +520 -0
  58. package/chunks/footnoteFlatten-EE85Hjre.js +6 -0
  59. package/chunks/graftExport-G-dG7Vcc.js +104 -0
  60. package/chunks/html2canvas.esm-CntiHiYW.js +997 -0
  61. package/chunks/index-BLb10wQt.js +1002 -0
  62. package/chunks/index-BWdRWxoH.js +1807 -0
  63. package/chunks/index.es-CI0QPo8w.js +780 -0
  64. package/chunks/jspdf.es.min-DU74zN8b.js +1792 -0
  65. package/chunks/jszip.min-CPW0h1Kx.js +476 -0
  66. package/chunks/katex-DWj8TvwO.js +1462 -0
  67. package/chunks/pdf-BLWDCiFF.js +1828 -0
  68. package/chunks/purify.es-BwLardii.js +107 -0
  69. package/chunks/serverDocumentSession-DGDU5Lh3.js +1011 -0
  70. package/chunks/signatures-DTNDS2PH.js +21 -0
  71. package/chunks/suggestionAuthorship-B-IuLQlE.js +1 -0
  72. package/chunks/web-tree-sitter-BXGZGnNj.js +2 -0
  73. package/chunks/xmlScan-DXjt2cTS.js +8 -0
  74. package/engine.d.ts +179 -0
  75. package/engine.js +3 -0
  76. package/package.json +64 -4
  77. package/serverToolContract.d.ts +420 -0
  78. package/serverToolInputs.generated.d.ts +264 -0
@@ -0,0 +1,186 @@
1
+ import{a_ as I,a as w,b0 as K,aR as U,aK as G}from"./engine-LMUnxdm2.js";import{d as j}from"./TextDecoding-IPbuUqcC.js";import{N as z,k as _,r as $,s as Y,a as T,t as k,i as X,m as Z,b as J,c as Q,d as tt,
2
+ l as et,f as st,e as rt,g as nt,p as it}from"./OfficeImportShared-CrOpHpJ-.js";import{f as at}from"./footnoteFlatten-EE85Hjre.js";import{a as ot,e as lt}from"./ListNumbering-Qlu6AuRZ.js";import{b as ct}from"./TableGrid-DbroRucl.js";
3
+ const ht={65001:"utf-8",932:"shift_jis",936:"gb18030",949:"euc-kr",950:"big5",874:"windows-874",1e4:"macintosh",437:"windows-1252",850:"windows-1252"};function dt(a){const t=/\\ansicpg(\d+)/i.exec(a)?.[1];
4
+ return t?C(t):/\\mac\b/.test(a)?"macintosh":"windows-1252"}function C(a){const t=String(a);return ht[t]??`windows-${t}`}const ut={77:1e4,128:932,129:949,134:936,136:950,161:1253,162:1254,163:1258,177:1255,
5
+ 178:1256,186:1257,204:1251,222:874,238:1250},W=new Map;function pt(a,t){let e=W.get(t);if(!e){try{j(new Uint8Array,t),e=t}catch{e="windows-1252"}W.set(t,e)}return j(a instanceof Uint8Array?a:new Uint8Array(
6
+ a),e)}class L{constructor(t){this.kind=t,this.items=[],this.runs=[],this.runText="",this.runMarks={},this.paraId=w(),this.suppressEmptyPar=!1}}const ft=new Map([["emdash","—"],["endash","–"],["lqu\
7
+ ote","‘"],["rquote","’"],["ldblquote","“"],["rdblquote","”"],["bullet","•"],["emspace"," "],["enspace"," "],["qmspace"," "],["zwj","‍"],["zwnj","‌"],["ltrmark","‎"],["rtlmark","‏"]]),
8
+ gt=new Set(["info","xmlnstbl","themedata","colorschememapping","latentstyles","datastore","generator","filetbl","rsidtbl","nonshppict","objdata","objclass","objname","shpinst","shptxt","userprops","do\
9
+ cvar","pgdsctbl","mmathPr","bkmkstart","bkmkend","xe","tc","txe","template","private","passwordhash","wgrffmtfilter","defchp","defpap","listpicture","pnseclvl","protusertbl","fchars","lchars","aftnsep",
10
+ "aftnsepc","aftncn","ftnsep","ftnsepc","ftncn","blipuid","picprop","atnicn","atntime","do","falt","panose","fname","oldcprops","oldpprops","oldtprops","oldsprops","annotation-ignore"]),mt=new Set(["ex\
11
+ pandedcolortbl","listtable","listoverridetable","shppict","fldinst","annotation","atnauthor","atnid","atnref","atndate","atrfstart","atrfend","pn","revtbl","footnote"]),bt=new Set(["pict","footnote","\
12
+ annotation","fldinst","fldrslt","header","headerl","headerr","headerf","footer","footerl","footerr","footerf"]),kt=new Set(["ul","uld","uldash","uldashd","uldashdd","uldb","ulhwave","ulldash","ulth","\
13
+ ulthd","ulthdash","ulthdashd","ulthdashdd","ulthldash","ululdbwave","ulw","ulwave"]),E=new Map([["header","default"],["headerr","default"],["headerl","even"],["headerf","first"],["footer","default"],[
14
+ "footerr","default"],["footerl","even"],["footerf","first"]]);function F(a,t={}){return new vt(a,t).read()}class vt{constructor(t,e){this.rtf=t,this.options=e,this.defaultFont=0,this.fonts=new Map,this.
15
+ colors=[],this.colorParts={r:0,g:0,b:0},this.colorHasValue=!1,this.expandedIndex=0,this.expandedParts=[],this.styles=new Map,this.currentStyle=null,this.lists=new Map,this.currentList=null,this.listOverrides=
16
+ new Map,this.currentOverride=null,this.revAuthors=[],this.currentFontEntry=null,this.rowDefs=[],this.pendingCellDef={},this.rowIsHeader=!1,this.body=new L("body"),this.notes=new z("rtffn"),this.headers=
17
+ {},this.footers={},this.comments=[],this.openCommentRanges=[],this.commentMeta={},this.annotationCounter=0,this.commentRangeIds=new Map,this.commentIds=new Set,this.page={margins:{}},this.sectionSeen=
18
+ !1,this.stack=[],this.marksVersion=0,this.cachedMarksVersion=-1,this.cachedMarks={},this.pendingBytes=[],this.pendingBytesEncoding="",this.chainsSeen=new Set,this.ansiEncoding=dt(t.slice(0,4096)),this.
19
+ cocoa=/\\cocoartf/.test(t.slice(0,512)),this.state={dest:"body",chars:{},para:{borders:{}},unicodeSkip:1,storyRef:{story:this.body}}}read(){this.tokenize(),this.flushBytes();const t=this.body;this.flushRun(
20
+ t),t.runs.some(i=>i.text.trim().length>0)&&this.flushParagraph(t);const e=this.buildBlocks(t.items,"body");V(e),e.length===0&&e.push(I());const s={type:"doc",children:e};this.notes.notes.length>0&&(s.
21
+ notes=this.notes.notes),Object.keys(this.headers).length>0&&(s.headers=this.headers),Object.keys(this.footers).length>0&&(s.footers=this.footers);const r=_(this.comments,[s.children,s.notes??[]]);r.length>
22
+ 0&&(s.comments=r);const n=this.pageLayout();return n&&(s.pageLayout=n),s}tokenize(){const t=this.rtf,e=t.length,s=/\\([a-zA-Z]{1,32})(-?\d{1,10})? ?/y;let r=0;for(;r<e;){const n=t.charCodeAt(r);if(n===
23
+ 123){this.flushBytes(),this.pushGroup(),r++;continue}if(n===125){this.flushBytes(),this.popGroup(),r++;continue}if(n===10||n===13){r++;continue}if(n!==92){let l=r+1;for(;l<e;){const f=t.charCodeAt(l);
24
+ if(f===92||f===123||f===125||f===10||f===13)break;l++}this.literal(t.slice(r,l)),r=l;continue}const i=t[r+1];if(i===void 0)break;if(i==="\\"||i==="{"||i==="}"){this.flushBytes(),this.text(i),r+=2;continue}
25
+ if(i==="'"){const l=parseInt(t.slice(r+2,r+4),16);r+=4,Number.isNaN(l)||this.byte(l);continue}if(this.flushBytes(),i==="*"){this.state.starred=!0,r+=2;continue}if(i==="~"){this.text(" "),r+=2;continue}
26
+ if(i==="_"){this.text("‑"),r+=2;continue}if(i==="-"){r+=2;continue}if(i===`
27
+ `||i==="\r"){this.controlWord("par",null),r+=2;continue}s.lastIndex=r;const o=s.exec(t);if(!o){r+=2;continue}r+=o[0].length;const c=o[1],d=o[2]!==void 0?parseInt(o[2],10):null;if(c==="bin"&&d!==null&&
28
+ d>0){this.binary(t.slice(r,r+d)),r+=d;continue}if(c==="u"&&d!==null){this.text(String.fromCharCode(d<0?d+65536:d));let l=this.state.unicodeSkip;for(;l>0&&r<e;){const f=t[r];if(f==="\\")if(t[r+1]==="'")
29
+ r+=4;else{s.lastIndex=r;const m=s.exec(t);r+=m?m[0].length:2}else{if(f==="{"||f==="}")break;if(f===`
30
+ `||f==="\r"){r+=1;continue}else r+=1}l--}continue}this.controlWord(c,d)}}pushGroup(){const t=this.state;this.stack.push(t),this.state={dest:t.dest,chars:{...t.chars},para:{...t.para,borders:{...t.para.
31
+ borders}},unicodeSkip:t.unicodeSkip,storyRef:t.storyRef,field:t.field,link:t.link,fieldKind:t.fieldKind,capture:void 0,metaKind:t.dest==="meta"?t.metaKind:void 0},(t.dest==="listtext"||t.dest==="fldin\
32
+ st"||t.dest==="meta")&&(this.state.capture=t.capture),this.marksVersion++}popGroup(){const t=this.state,e=this.stack.pop();e&&(this.endGroup(t,e),this.state=e,this.marksVersion++)}endGroup(t,e){switch(t.
33
+ dest){case"pict":t.pict&&t.pict!==e.pict&&this.finishPicture(t.pict,t);break;case"fonttbl":t.capture&&t.capture!==e.capture&&this.finishFontName(t.capture.text);break;case"stylesheet":t.capture&&t.capture!==
34
+ e.capture&&this.finishStyle(t.capture.text);break;case"listtext":e.dest!=="listtext"&&t.capture&&(t.storyRef.story.listText=t.capture.text);break;case"fldinst":e.dest!=="fldinst"&&t.capture&&t.field&&
35
+ (t.field.instr=t.capture.text);break;case"meta":e.dest!=="meta"&&t.capture&&t.metaKind&&this.finishMeta(t.metaKind,t.capture.text.trim());break;case"revtbl":if(t.capture&&t.capture!==e.capture)for(const s of t.
36
+ capture.text.split(";").slice(0,-1))this.revAuthors.push(s.trim());break}t.opensStory&&this.finishStory(t,e)}literal(t){const e=this.state;if(this.flushBytes(),e.dest==="pict"){e.pict?.hex.push(t);return}
37
+ if(this.options.binary){let s=0;for(let r=0;r<t.length;r++)t.charCodeAt(r)>=128&&(r>s&&(this.flushBytes(),this.text(t.slice(s,r))),this.byte(t.charCodeAt(r)&255),s=r+1);s<t.length&&(this.flushBytes(),
38
+ this.text(t.slice(s)));return}this.text(t)}byte(t){const e=this.currentEncoding();this.pendingBytes.length>0&&e!==this.pendingBytesEncoding&&this.flushBytes(),this.pendingBytesEncoding=e,this.pendingBytes.
39
+ push(t)}flushBytes(){if(this.pendingBytes.length===0)return;const t=this.pendingBytes;this.pendingBytes=[],this.text(pt(t,this.pendingBytesEncoding))}currentEncoding(){const t=this.state.chars;return this.
40
+ fonts.get(t.font??t.lochFont??this.defaultFont)?.encoding??this.ansiEncoding}binary(t){const e=this.state.pict;if(this.state.dest!=="pict"||!e)return;const s=new Uint8Array(t.length);for(let r=0;r<t.length;r++)
41
+ s[r]=t.charCodeAt(r)&255;(e.binary??(e.binary=[])).push(s)}text(t){if(!t)return;const e=this.state;switch(e.dest){case"body":{const s=e.storyRef.story,r=this.effectiveMarks();Y(r,s.runMarks)||(this.flushRun(
42
+ s),s.runMarks=r),s.runText+=t,s.suppressEmptyPar=!1;return}case"fonttbl":case"stylesheet":case"listtext":case"fldinst":case"meta":e.capture&&(e.capture.text+=t),e.dest==="fonttbl"&&t.includes(";")&&this.
43
+ fontTableSemicolons(t);return;case"colortbl":for(const s of t)s===";"&&(this.colors.push(this.colorHasValue?$(this.colorParts.r,this.colorParts.g,this.colorParts.b):void 0),this.colorParts={r:0,g:0,b:0},
44
+ this.colorHasValue=!1);return;case"expandedcolortbl":for(const s of t){if(s!==";")continue;const r=this.expandedParts,n=i=>i/1e5*255;if(r.length>=3)this.colors[this.expandedIndex]=$(n(r[0]),n(r[1]),n(
45
+ r[2]));else if(r.length===1){const i=n(r[0]);this.colors[this.expandedIndex]=$(i,i,i)}this.expandedParts=[],this.expandedIndex++}return;case"revtbl":e.capture?e.capture.text+=t:e.capture={text:t};return;default:
46
+ return}}fontTableSemicolons(t){const e=this.state.capture;if(!e)return;const s=e.text.split(";");for(let r=0;r<s.length-1;r++)this.finishFontName(s[r]);e.text=s[s.length-1]}effectiveMarks(){if(this.cachedMarksVersion===
47
+ this.marksVersion)return this.cachedMarks;const t=this.state,e=t.chars,s={};e.bold&&(s.bold=!0),e.italic&&(s.italic=!0),e.underline&&(s.underline=!0),e.strike&&(s.strikethrough=!0),e.dstrike&&(s.doubleStrikethrough=
48
+ !0),e.superscript?s.superscript=!0:e.subscript&&(s.subscript=!0),e.caps&&(s.allCaps=!0),e.scaps&&(s.smallCaps=!0),e.hidden&&(s.hidden=!0);const r=this.fonts.get(e.font??e.lochFont??this.defaultFont)?.
49
+ name;r&&(s.fontFamily=r),e.halfPoints&&e.halfPoints>0&&(s.fontSize=T(e.halfPoints/2*(96/72)));const n=e.color?this.colors[e.color]:void 0;n&&n!=="#000000"&&(s.color=n);const i=(e.highlight?this.colors[e.
50
+ highlight]:void 0)??(e.background?this.colors[e.background]:void 0);return i&&i!=="#ffffff"&&(s.backgroundColor=i),e.expandTwips&&(s.letterSpacing=T(k(e.expandTwips))),t.link&&(s.link=t.link),t.fieldKind&&
51
+ (s.field=t.fieldKind),this.openCommentRanges.length>0&&t.storyRef.story.kind!=="annotation"&&(s.comment=this.openCommentRanges.join(",")),e.deleted?Object.assign(s,this.revisionMarks("deletion",e.revAuthorDel??
52
+ e.revAuthor,e.revTimeDel??e.revTime)):e.revised&&Object.assign(s,this.revisionMarks("insertion",e.revAuthor,e.revTime)),this.cachedMarks=s,this.cachedMarksVersion=this.marksVersion,s}revisionMarks(t,e,s){
53
+ const r=e!==void 0?this.revAuthors[e]:void 0,n=s!==void 0?q(s):void 0;return X(t,`rtfrev-${t==="insertion"?"ins":"del"}-${e??0}-${s??0}`,r&&r!=="Unknown"?r:void 0,n)}flushRun(t){t.runText&&(t.runs.push(
54
+ {type:"text",text:t.runText,marks:{...t.runMarks}}),t.runText="")}flushParagraph(t,e=!1){this.flushRun(t);const s=t.runs.filter(r=>r.text.length>0);if(t.runs=[],s.length===0&&t.suppressEmptyPar&&!e){t.
55
+ suppressEmptyPar=!1,t.listText=void 0,t.paraId=w();return}t.items.push({kind:"para",id:t.paraId,runs:Z(s),para:{...this.state.para,borders:{...this.state.para.borders}},...t.listText!==void 0?{listText:t.
56
+ listText}:{},...e?{forcedInTable:!0}:{}}),t.listText=void 0,t.suppressEmptyPar=!1,t.paraId=w()}controlWord(t,e){const s=this.state,r=s.starred;if(s.starred=!1,s.dest!=="skip"&&!this.startDestination(t)){
57
+ if(r&&!mt.has(t)){s.dest="skip";return}if(gt.has(t)){s.dest="skip";return}switch(s.dest){case"fonttbl":this.fontTableWord(t,e);return;case"colortbl":this.colorTableWord(t,e);return;case"expandedcolort\
58
+ bl":t==="c"&&e!==null?this.expandedParts.push(e):(t==="cssrgb"||t==="csgray"||t==="csgenericrgb")&&(this.expandedParts=[]);return;case"stylesheet":this.styleSheetWord(t,e);return;case"listtable":this.
59
+ listTableWord(t,e);return;case"listoverridetable":this.listOverrideWord(t,e);return;case"pict":this.pictWord(t,e);return;case"pn":this.pnWord(t,e);return;case"listtext":case"fldinst":case"meta":t==="t\
60
+ ab"&&this.text(" ");return;case"revtbl":return}if(this.characterWord(t,e)){this.marksVersion++;return}this.paragraphWord(t,e)||this.structureWord(t,e)}}startDestination(t){const e=this.state;if(e.dest!==
61
+ "body"&&bt.has(t))return e.dest="skip",!0;switch(t){case"fonttbl":return e.dest="fonttbl",e.capture={text:""},!0;case"colortbl":return e.dest="colortbl",this.colors=[],!0;case"expandedcolortbl":return e.
62
+ dest="expandedcolortbl",this.expandedIndex=0,this.expandedParts=[],!0;case"stylesheet":return e.dest="stylesheet",!0;case"listtable":return e.dest="listtable",!0;case"listoverridetable":return e.dest=
63
+ "listoverridetable",!0;case"revtbl":return e.dest="revtbl",!0;case"pict":return e.dest="pict",e.pict={hex:[]},!0;case"shppict":case"shprslt":case"result":case"shp":case"object":case"field":return t===
64
+ "field"&&(e.field={instr:""}),!0;case"fldinst":return e.dest="fldinst",e.capture={text:""},!0;case"fldrslt":{const s=e.field?.instr??"",r=/^\s*HYPERLINK\s+(?:\\[a-z]\s+)*"([^"]+)"/i.exec(s);return r&&
65
+ !/^\s*HYPERLINK\s+\\l\b/i.test(s)&&(e.link=J(r[1])),/^\s*PAGE\b/i.test(s)&&(e.fieldKind="page"),/^\s*NUMPAGES\b/i.test(s)&&(e.fieldKind="numPages"),this.marksVersion++,!0}case"listtext":case"pntext":return e.
66
+ dest="listtext",e.capture={text:""},!0;case"pn":return e.dest="pn",e.para.pn={kind:"number",level:0},!0;case"footnote":return this.openStory("footnote");case"annotation":return this.openStory("annotat\
67
+ ion");case"atnauthor":case"atnid":case"atnref":case"atndate":case"atrfstart":case"atrfend":return e.dest="meta",e.metaKind=t,e.capture={text:""},!0;default:return E.has(t)?(e.dest="body",e.opensStory=
68
+ !0,e.storyRef={story:new L("header")},e.para={borders:{}},e.headerWord=t,!0):!1}}openStory(t){const e=this.state;return e.dest="body",e.opensStory=!0,e.storyRef={story:new L(t)},e.para={borders:{}},e.
69
+ link=void 0,t==="annotation"&&(this.annotationRef=void 0,this.annotationDate=void 0),this.marksVersion++,!0}finishStory(t,e){const s=t.storyRef.story;if(this.flushRun(s),s.runs.some(i=>i.text.length>0)){
70
+ const i=this.state;this.state=t,this.flushParagraph(s),this.state=i}const r=this.buildBlocks(s.items,s.kind);V(r);const n=e.storyRef.story;if(s.kind==="footnote"||s.kind==="endnote"){if(e.dest!=="body")
71
+ return;this.flushRun(n),this.state=e,this.marksVersion++;const i=this.effectiveMarks(),o=this.notes.add(s.kind,r,i);n.runs.push(o),n.runMarks={},this.marksVersion++;return}if(s.kind==="header"){const i=t.
72
+ headerWord??"header",o=E.get(i)??"default",c=r.filter(d=>d.type==="paragraph");if(c.some(d=>d.children.some(l=>l.text.trim()!==""||l.marks?.field))){const d=i.startsWith("footer")?this.footers:this.headers;
73
+ d[o]=c}return}if(s.kind==="annotation"){const i=r.map(l=>l.type==="paragraph"?l.children.map(f=>f.text).join("").trim():"").filter(l=>l.length>0).join(`
74
+
75
+ `);this.annotationCounter++;const o=this.annotationRef;let c=`rtfcmt-${o??`point-${this.annotationCounter}`}`,d=o!==void 0&&this.commentRangeIds.has(o);if(this.commentIds.has(c)){d=!1;let l=this.annotationCounter;
76
+ for(;this.commentIds.has(`${c}-${l}`);)l++;c=`${c}-${l}`}this.commentIds.add(c),this.comments.push({id:c,author:this.commentMeta.author||this.commentMeta.initials||"Unknown",...this.commentMeta.initials?
77
+ {initials:this.commentMeta.initials}:{},createdAt:new Date(this.annotationDate!==void 0?q(this.annotationDate)??0:0).toISOString(),bodyMd:i,...d?{}:{anchorBlockId:n.paraId}}),this.commentMeta={}}}finishMeta(t,e){
78
+ switch(t){case"atnauthor":this.commentMeta.author=e;break;case"atnid":this.commentMeta.initials=e;break;case"atnref":this.annotationRef=e;break;case"atndate":{const s=parseInt(e,10);Number.isFinite(s)&&
79
+ (this.annotationDate=s);break}case"atrfstart":e&&(this.commentRangeIds.set(e,`rtfcmt-${e}`),this.openCommentRanges=[...this.openCommentRanges,`rtfcmt-${e}`],this.marksVersion++);break;case"atrfend":e&&
80
+ (this.openCommentRanges=this.openCommentRanges.filter(s=>s!==`rtfcmt-${e}`),this.marksVersion++);break}}fontTableWord(t,e){if(t==="f"&&e!==null){const r=this.state.capture;r&&r.text.trim()&&this.currentFontEntry!==
81
+ null&&this.finishFontName(r.text),this.currentFontEntry=e,this.fonts.has(e)||this.fonts.set(e,{name:""}),this.state.capture={text:""};return}const s=this.currentFontEntry!==null?this.fonts.get(this.currentFontEntry):
82
+ void 0;if(s)if(t==="fcharset"&&e!==null){const r=ut[e];r&&(s.encoding=C(r)),e===2&&(s.encoding="windows-1252")}else t==="cpg"&&e!==null&&e>0&&(s.encoding=C(e))}finishFontName(t){if(this.currentFontEntry===
83
+ null)return;const e=this.fonts.get(this.currentFontEntry),s=t.replace(/;$/,"").trim();e&&s&&!e.name&&(e.name=this.cocoa?Rt(s):s)}colorTableWord(t,e){if(e!==null){if(t==="red")this.colorParts.r=e;else if(t===
84
+ "green")this.colorParts.g=e;else if(t==="blue")this.colorParts.b=e;else return;this.colorHasValue=!0}}styleSheetWord(t,e){const s=this.state;t==="s"&&e!==null?(this.currentStyle={index:e},s.capture={text:""}):
85
+ t==="outlinelevel"&&e!==null&&this.currentStyle&&(this.currentStyle.outlineLevel=e)}finishStyle(t){if(!this.currentStyle)return;const e=t.replace(/;[\s\S]*$/,"").trim();this.styles.set(this.currentStyle.
86
+ index,{name:e,outlineLevel:this.currentStyle.outlineLevel}),this.currentStyle=null}listTableWord(t,e){switch(t){case"list":this.currentList={def:{levels:[]}};break;case"listlevel":this.currentList?.def.
87
+ levels.push({nfc:0,startAt:1});break;case"levelnfc":case"levelnfcn":{const s=this.currentList?.def.levels.at(-1);s&&e!==null&&(s.nfc=e);break}case"levelstartat":{const s=this.currentList?.def.levels.at(
88
+ -1);s&&e!==null&&(s.startAt=e);break}case"listid":this.currentList&&e!==null&&(this.currentList.id=e,this.lists.set(e,this.currentList.def));break}}listOverrideWord(t,e){t==="listoverride"?this.currentOverride=
89
+ {}:t==="listid"&&this.currentOverride&&e!==null?this.currentOverride.listId=e:t==="ls"&&this.currentOverride&&e!==null&&(this.currentOverride.ls=e);const s=this.currentOverride;s?.listId!==void 0&&s.ls!==
90
+ void 0&&this.listOverrides.set(s.ls,s.listId)}pnWord(t,e){const s=this.state.para.pn;if(!s)return;t==="pnlvlblt"?s.kind="bullet":/^pn(dec|ucltr|lcltr|ucrm|lcrm|ord|ordt|cardt)$/.test(t)?s.kind="number":
91
+ t==="pnlvl"&&e!==null&&(s.level=Math.max(0,e-1));const r=this.stack[this.stack.length-1];r&&(r.para.pn={...s})}pictWord(t,e){const s=this.state.pict;if(s)switch(t){case"pngblip":s.format="png";break;case"\
92
+ jpegblip":s.format="jpeg";break;case"emfblip":s.format="emf";break;case"wmetafile":s.format="wmf";break;case"macpict":case"dibitmap":case"wbitmap":case"pmmetafile":s.format??(s.format="unsupported");break;case"\
93
+ picw":e!==null&&(s.picw=e);break;case"pich":e!==null&&(s.pich=e);break;case"picwgoal":e!==null&&(s.goalW=e);break;case"pichgoal":e!==null&&(s.goalH=e);break;case"picscalex":e!==null&&(s.scaleX=e);break;case"\
94
+ picscaley":e!==null&&(s.scaleY=e);break}}finishPicture(t,e){let s;if(t.binary&&t.binary.length>0){const b=t.binary.reduce((u,p)=>u+p.length,0);s=new Uint8Array(b);let h=0;for(const u of t.binary)s.set(
95
+ u,h),h+=u.length}else s=yt(t.hex.join(""));if(s.length===0)return;const r=t.format&&t.format!=="unsupported"?t.format:void 0,n=Q(s)??r;if(!n)return;const i=n==="emf"||n==="wmf",o=(t.scaleX??100)/100,c=(t.
96
+ scaleY??100)/100,d=(b,h)=>b?k(b):h?i?h/2540*96:h:void 0,l=d(t.goalW,t.picw),f=d(t.goalH,t.pich),m=e.storyRef.story,M=e.para;if(this.flushRun(m),m.runs.some(b=>b.text.length>0)){const b=this.state;this.
97
+ state=e,this.flushParagraph(m),this.state=b}else m.runs=[];const A=M.align==="justify"?void 0:M.align;m.items.push({kind:"image",image:tt(s,n,{width:l!==void 0?l*o:void 0,height:f!==void 0?f*c:void 0},
98
+ {align:A}),inTable:!!M.inTable}),m.suppressEmptyPar=!0}characterWord(t,e){const s=this.state.chars,r=e!==0;if(kt.has(t))return s.underline=r,!0;switch(t){case"plain":{const{revised:n,deleted:i,revAuthor:o,
99
+ revTime:c,revAuthorDel:d,revTimeDel:l}=s;return this.state.chars={revised:n,deleted:i,revAuthor:o,revTime:c,revAuthorDel:d,revTimeDel:l},!0}case"b":return s.bold=r,!0;case"i":return s.italic=r,!0;case"\
100
+ ulnone":return s.underline=!1,!0;case"strike":return s.strike=r,!0;case"striked":return s.dstrike=r,!0;case"super":return s.superscript=r,s.subscript=!1,!0;case"sub":return s.subscript=r,s.superscript=
101
+ !1,!0;case"nosupersub":return s.superscript=!1,s.subscript=!1,!0;case"caps":return s.caps=r,!0;case"scaps":return s.scaps=r,!0;case"v":return s.hidden=r,!0;case"f":return e!==null&&(s.font=e),!0;case"\
102
+ loch":case"hich":case"dbch":return s.script=t,!0;case"rtlch":case"ltrch":return s.script=void 0,!0;case"af":return e!==null&&(s.script==="loch"||s.script==="hich")&&(s.lochFont=e),!0;case"fs":return e!==
103
+ null&&(s.halfPoints=e),!0;case"fsmilli":return e!==null&&(s.halfPoints=e/1e3*2),!0;case"cf":return s.color=e??0,!0;case"highlight":return s.highlight=e??0,!0;case"cb":case"chcbpat":return s.background=
104
+ e??0,!0;case"expndtw":return s.expandTwips=e??0,!0;case"expnd":return s.expandTwips===void 0&&e!==null&&(s.expandTwips=e*5),!0;case"revised":return s.revised=r,!0;case"deleted":return s.deleted=r,!0;case"\
105
+ revauth":return e!==null&&(s.revAuthor=e),!0;case"revdttm":return e!==null&&(s.revTime=e),!0;case"revauthdel":return e!==null&&(s.revAuthorDel=e),!0;case"revdttmdel":return e!==null&&(s.revTimeDel=e),
106
+ !0;default:return!1}}paragraphWord(t,e){const s=this.state.para;switch(t){case"pard":return this.state.para={borders:{}},!0;case"qc":return s.align="center",!0;case"qr":return s.align="right",!0;case"\
107
+ qj":case"qd":return s.align="justify",!0;case"ql":return s.align=void 0,!0;case"li":case"lin":return e!==null&&(s.leftTwips=e),!0;case"fi":return e!==null&&(s.firstTwips=e),!0;case"sb":return e!==null&&
108
+ (s.spaceBeforeTwips=e),!0;case"sa":return e!==null&&(s.spaceAfterTwips=e),!0;case"sl":return s.lineTwips=e??0,!0;case"slmult":return s.lineMultiple=e===1,!0;case"keepn":return s.keepNext=e!==0,!0;case"\
109
+ keep":return s.keepLines=e!==0,!0;case"rtlpar":return s.rtl=!0,!0;case"ltrpar":return s.rtl=!1,!0;case"s":return e!==null&&(s.style=e),!0;case"outlinelevel":return e!==null&&(s.outlineLevel=e),!0;case"\
110
+ intbl":return s.inTable=e!==0,!0;case"itap":return e!==null&&(s.inTable=e>0),!0;case"ls":return e!==null&&(s.ls=e),!0;case"ilvl":return e!==null&&(s.ilvl=e),!0;case"cbpat":return e!==null&&(s.shading=
111
+ e),!0;case"pagebb":return s.pageBreakBefore=e!==0,!0;case"brdrt":case"brdrb":case"brdrl":case"brdrr":case"box":{const r=t==="box"?["top","bottom","left","right"]:[{brdrt:"top",brdrb:"bottom",brdrl:"le\
112
+ ft",brdrr:"right"}[t]];for(const n of r)s.borders[n]={style:"single",width:1,color:"#000000"};return s.borderTarget=t==="box"?"box":r[0],!0}case"brdrs":case"brdrth":case"brdrsh":case"brdrdb":case"brdr\
113
+ dash":case"brdrdashsm":case"brdrdot":case"brdrnone":case"brdrw":case"brdrcf":{const r=s.borderTarget;if(!r||r==="ignore")return!0;const n=r==="box"?["top","bottom","left","right"]:[r];for(const i of n){
114
+ const o=s.borders[i];o&&(t==="brdrnone"?delete s.borders[i]:t==="brdrdb"?o.style="double":t==="brdrdash"||t==="brdrdashsm"?o.style="dashed":t==="brdrdot"?o.style="dotted":t==="brdrth"?(o.style="single",
115
+ o.width=Math.max(o.width,2)):t==="brdrw"&&e!==null?o.width=Math.min(8,Math.max(1,Math.round(e/15))):t==="brdrcf"&&e!==null?o.color=this.colors[e]??o.color:(t==="brdrs"||t==="brdrsh")&&(o.style="single"))}
116
+ return!0}default:return/^(tr|cl|pg)brdr[tblrhv]$|^brdrbtw$|^brdrbar$/.test(t)?(s.borderTarget="ignore",!(t.startsWith("cl")||t.startsWith("tr"))):!1}}structureWord(t,e){const s=this.state.storyRef.story,
117
+ r=this.state.dest==="body";switch(t){case"par":r&&this.flushParagraph(s);return;case"sect":r&&(s.runs.length>0||s.runText)&&this.flushParagraph(s),this.sectionSeen=!0;return;case"line":this.text(`
118
+ `);return;case"tab":this.text(" ");return;case"page":if(!r||s.kind!=="body")return;this.flushRun(s),s.runs.some(n=>n.text.length>0)&&this.flushParagraph(s),s.runs=[],s.items.push({kind:"pagebreak",inTable:!!this.
119
+ state.para.inTable}),s.suppressEmptyPar=!0;return;case"cell":case"nestcell":if(!r)return;this.flushParagraph(s,!0),t==="cell"&&s.items.push({kind:"cell"});return;case"row":if(!r)return;this.flushRun(s),
120
+ s.runs.some(n=>n.text.length>0)&&(this.flushParagraph(s,!0),s.items.push({kind:"cell"})),s.runs=[],s.items.push({kind:"row",defs:this.rowDefs.slice(),header:this.rowIsHeader});return;case"trowd":this.
121
+ rowDefs=[],this.pendingCellDef={},this.rowIsHeader=!1;return;case"trhdr":this.rowIsHeader=!0;return;case"clmgf":this.pendingCellDef.hmergeFirst=!0;return;case"clmrg":this.pendingCellDef.hmergeCont=!0;
122
+ return;case"clvmgf":this.pendingCellDef.vmergeFirst=!0;return;case"clvmrg":this.pendingCellDef.vmergeCont=!0;return;case"clcbpat":e!==null&&(this.pendingCellDef.background=e);return;case"clvertalt":this.
123
+ pendingCellDef.valign="top";return;case"clvertalc":this.pendingCellDef.valign="middle";return;case"clvertalb":this.pendingCellDef.valign="bottom";return;case"cellx":e!==null&&(this.rowDefs.push({right:e,
124
+ ...this.pendingCellDef}),this.pendingCellDef={});return;case"chftn":case"chatn":case"chpgn":t==="chpgn"&&r&&s.kind==="header"&&(this.state.fieldKind="page",this.marksVersion++,this.text("1"),this.state.
125
+ fieldKind=void 0,this.marksVersion++);return;case"ftnalt":s.kind==="footnote"&&(s.kind="endnote");return;case"uc":this.state.unicodeSkip=e??1;return;case"deff":e!==null&&(this.defaultFont=e);return;case"\
126
+ paperw":case"pgwsxn":e!==null&&(!this.sectionSeen||this.page.widthTwips===void 0)&&(this.page.widthTwips=e);return;case"paperh":case"pghsxn":e!==null&&(!this.sectionSeen||this.page.heightTwips===void 0)&&
127
+ (this.page.heightTwips=e);return;case"landscape":case"lndscpsxn":this.page.landscape=!0;return;case"margl":case"margr":case"margt":case"margb":case"marglsxn":case"margrsxn":case"margtsxn":case"margbsx\
128
+ n":{if(e===null)return;const n=t.slice(4,5);if(t.endsWith("sxn")&&this.sectionSeen)return;this.page.margins[n]=e;return}default:{const n=ft.get(t);n!==void 0&&this.text(n)}}}buildBlocks(t,e){const s=[],
129
+ r=i=>i.kind==="cell"||i.kind==="row"||i.kind==="para"&&(!!i.para.inTable||!!i.forcedInTable)||(i.kind==="image"||i.kind==="pagebreak")&&i.inTable;let n=0;for(;n<t.length;){const i=t[n];if(e!=="header"&&
130
+ r(i)){const o=n;for(;n<t.length&&r(t[n]);)n++;const c=this.buildTable(t.slice(o,n),e);c&&s.push(...c);continue}if(i.kind==="para"){const o=this.listInfo(i);if(o&&e!=="header"){const c=[{item:i,info:o}];
131
+ for(n++;n<t.length;){const d=t[n];if(d.kind!=="para"||r(d))break;const l=this.listInfo(d);if(!l||l.key!==o.key)break;c.push({item:d,info:l}),n++}s.push(this.buildList(c));continue}i.para.pageBreakBefore&&
132
+ e==="body"&&s.length>0&&s.push({type:"page-break",id:w()}),s.push(this.buildParagraph(i,e)),n++;continue}i.kind==="image"?s.push(i.image):i.kind==="pagebreak"&&s.push({type:"page-break",id:w()}),n++}return s}buildParagraph(t,e){
133
+ const s=t.runs.length>0?t.runs:[{type:"text",text:"",marks:{}}],r=I(s);r.id=t.id;const n=t.para;if(n.align&&(r.align=n.align),n.rtl&&(r.direction="rtl"),e!=="header"){const i=this.headingLevel(n);if(i&&
134
+ (r.heading=i),n.leftTwips!==void 0){const c=et(k(n.leftTwips));c&&(r.leftIndent=c)}if(n.firstTwips!==void 0){const c=st(k(n.firstTwips));c&&(r.firstLineIndent=c)}n.spaceBeforeTwips!==void 0&&(r.spaceBefore=
135
+ T(k(Math.max(0,n.spaceBeforeTwips)))),n.spaceAfterTwips!==void 0&&(r.spaceAfter=T(k(Math.max(0,n.spaceAfterTwips)))),n.lineMultiple&&n.lineTwips&&n.lineTwips>0&&(r.lineSpacing=T(n.lineTwips/240)),n.keepNext&&
136
+ (r.keepNext=!0),n.keepLines&&(r.keepLines=!0);const o=n.shading?this.colors[n.shading]:void 0;o&&o!=="#ffffff"&&(r.shading=o),Object.keys(n.borders).length>0&&(r.borders=JSON.stringify(n.borders))}return r}headingLevel(t){
137
+ let e;if(t.outlineLevel!==void 0&&t.outlineLevel<9&&(e=t.outlineLevel+1),e===void 0&&t.style!==void 0){const s=this.styles.get(t.style),r=s?.name&&/^heading\s*(\d)$/i.exec(s.name);r?e=parseInt(r[1],10):
138
+ s?.outlineLevel!==void 0&&s.outlineLevel<9&&(e=s.outlineLevel+1)}if(!(!e||e<1))return Math.min(e,6)}listInfo(t){const e=t.para;if(!this.headingLevel(e)){if(e.ls!==void 0&&e.ls>0){const s=this.listOverrides.
139
+ get(e.ls),r=s!==void 0?this.lists.get(s):void 0,n=Math.max(0,Math.min(8,e.ilvl??0));if(r){const i=r.levels[n]??r.levels[0];if(i&&i.nfc===255&&t.listText===void 0)return;const o=i?i.nfc!==23&&i.nfc!==255:
140
+ !1;return{key:`ls${e.ls}`,ordered:o,level:n,startAt:r.levels[0]?.startAt??1,chain:`rtf-ls-${e.ls}`}}return{key:`ls${e.ls}`,ordered:t.listText!==void 0&&O(t.listText),level:n,startAt:1,chain:`rtf-ls-${e.
141
+ ls}`}}if(e.pn)return{key:`pn-${e.pn.kind}`,ordered:e.pn.kind==="number",level:e.pn.level,startAt:1};if(t.listText!==void 0&&t.listText.trim()!==""){const s=O(t.listText);return{key:`lt-${s}`,ordered:s,
142
+ level:0,startAt:1}}}}buildList(t){const e=t[0].info,s=t.map(({item:i,info:o})=>{const c=i.runs.length>0?i.runs:[{type:"text",text:"",marks:{}}];return{type:"list-item",id:i.id,children:c,...o.level>0?
143
+ {indentLevel:o.level}:{},...i.para.rtl?{direction:"rtl"}:{}}}),r={type:"list",id:w(),variant:e.ordered?"ordered":"unordered",children:s};e.ordered&&e.chain?(r.numberingChainId=e.chain,this.chainsSeen.
144
+ has(e.chain)||(this.chainsSeen.add(e.chain),e.startAt!==1&&(r.startNumber=e.startAt))):e.ordered&&e.startAt!==1&&(r.startNumber=e.startAt);const n=t[0].item.para;return n.spaceAfterTwips!==void 0&&(r.
145
+ spaceAfter=T(k(Math.max(0,n.spaceAfterTwips)))),n.spaceBeforeTwips!==void 0&&(r.spaceBefore=T(k(Math.max(0,n.spaceBeforeTwips)))),n.lineMultiple&&n.lineTwips&&n.lineTwips>0&&(r.lineSpacing=T(n.lineTwips/
146
+ 240)),r}buildTable(t,e){const s=[];let r=[],n=[],i=[];for(const h of t)h.kind==="cell"?(r.push({items:n}),n=[]):h.kind==="row"?(n.length>0&&(r.push({items:n}),n=[]),s.push({cells:r,defs:h.defs.length>
147
+ 0?h.defs:i,header:h.header}),h.defs.length>0&&(i=h.defs),r=[]):n.push(h);if(n.length>0&&r.push({items:n}),r.length>0&&s.push({cells:r,defs:i,header:!1}),s.length===0)return null;const o=new Set([0]),c=s.
148
+ map(h=>{const u=[];let p=0,g=0;const P=h.defs.length>0?h.defs[h.defs.length-1].right/Math.max(1,h.defs.length):1440;return h.cells.forEach((R,S)=>{const x=h.defs[S],v=x?x.right:g+Math.max(1,Math.round(
149
+ P));if(x?.hmergeCont&&u.length>0){const D=u[u.length-1];D.right=v,D.items.push(...R.items.filter(H=>!Tt(H)))}else u.push({left:p,right:Math.max(v,p+1),def:x,items:R.items});p=v,g=v}),u}),d=0;for(const h of c)
150
+ for(const u of h)o.add(Math.max(d,u.left)),o.add(u.right);const l=wt(xt([...o].sort((h,u)=>h-u),30),rt(c.length)),f=h=>{let u=0,p=l.length-1;for(;u<p;){const g=u+p>>1;l[g]<h?u=g+1:p=g}return u>0&&Math.
151
+ abs(l[u-1]-h)<=Math.abs(l[u]-h)?u-1:u},m=[],M=new Map;c.forEach(h=>{const u=[];for(const p of h){const g=f(p.left),P=Math.max(g+1,f(p.right));if(p.def?.vmergeCont){const v=M.get(g);if(v){v.rowSpan=(v.
152
+ rowSpan??1)+1;continue}}const R=this.buildBlocks(p.items.map(v=>Mt(v)),e);St(R);const S={type:"table-cell",id:w(),children:R.length>0?R:[I()]};P-g>1&&(S.colSpan=P-g);const x=p.def?.background?this.colors[p.
153
+ def.background]:void 0;x&&x!=="#ffffff"&&(S.backgroundColor=x),p.def?.valign&&p.def.valign!=="top"&&(S.verticalAlign=p.def.valign),p.def?.vmergeFirst?M.set(g,S):M.delete(g),u.push(S)}m.push({type:"tab\
154
+ le-row",id:w(),children:u})});const A=[];for(let h=1;h<l.length;h++)A.push(l[h]-l[h-1]);const b=nt(m,{columnWidths:A,hasHeader:s[0]?.header});return b?[b]:null}pageLayout(){const t=this.page,e=s=>t.margins[s]!==
155
+ void 0?k(t.margins[s]):void 0;return it({widthPx:t.widthTwips?k(t.widthTwips):void 0,heightPx:t.heightTwips?k(t.heightTwips):void 0,landscape:t.landscape,marginTopPx:e("t"),marginRightPx:e("r"),marginBottomPx:e(
156
+ "b"),marginLeftPx:e("l")})}}function O(a){const t=a.replace(/[\t\s]+/g,"");return/^(\d+|[a-zA-Z]|[ivxlcdm]+|[IVXLCDM]+)[.)]?$/.test(t)&&t.length>0}function yt(a){const t=a.replace(/[^0-9a-fA-F]/g,""),
157
+ e=new Uint8Array(t.length>>1);for(let s=0;s<e.length;s++)e[s]=parseInt(t.slice(s*2,s*2+2),16);return e}function xt(a,t){const e=[];for(const s of a)(e.length===0||s-e[e.length-1]>t)&&e.push(s);return e}
158
+ function wt(a,t){if(a.length-1<=t)return a;const e=a.length-1,s=[];for(let r=0;r<=t;r++)s.push(a[Math.round(r*e/t)]);return s}function Tt(a){return a.kind==="para"&&a.runs.every(t=>t.text.trim()==="")}
159
+ function Mt(a){return a.kind==="para"?{...a,forcedInTable:!1,para:{...a.para,inTable:!1}}:a.kind==="image"||a.kind==="pagebreak"?{...a,inTable:!1}:a}function B(a){return a.type==="paragraph"&&!a.borders&&
160
+ a.children.every(t=>t.text.trim()===""&&!t.marks?.footnoteRef)}function V(a){for(;a.length>0&&B(a[0]);)a.shift();for(;a.length>0&&B(a[a.length-1]);)a.pop()}function St(a){for(;a.length>1&&B(a[a.length-
161
+ 1]);)a.pop()}function q(a){const t=a>>>0;if(t===0)return;const e=t&63,s=t>>>6&31,r=t>>>11&31,n=t>>>16&15,i=(t>>>20&511)+1900;if(!(n<1||n>12||r<1))return Date.UTC(i,n-1,r,s,e)}function Rt(a){if(a.startsWith(
162
+ "."))return"";if(/\s/.test(a))return a;let t=a.replace(/-(Regular|Roman|Book|Bold|Italic|Oblique|BoldItalic|BoldOblique|Light|LightItalic|Medium|MediumItalic|Semibold|SemiBold|SemiboldItalic|Heavy|Black|Condensed|Thin|UltraLight)$/,
163
+ "");return t=t.replace(/(PSMT|PS|MT)$/,""),t=t.replace(/([a-z])([A-Z])/g,"$1 $2"),t}const N=class{static async parseFile(t){const e=new Uint8Array(await t.arrayBuffer());let s="";const r=32768;for(let n=0;n<
164
+ e.length;n+=r)s+=String.fromCharCode.apply(null,Array.from(e.subarray(n,n+r)));return F(s,{binary:!0})}static fromRtf(t){return F(t)}static toRtf(t){t=at(t),this.exportListNumbering=ot(t);const e=[];for(const s of t.
165
+ children){const r=this.blockToRtf(s,t);r!==null&&e.push(r)}return this.exportListNumbering=null,`{\\rtf1\\ansi\\ansicpg1252\\deff0\\uc1{\\fonttbl{\\f0\\froman Times New Roman;}{\\f1\\fmodern Courier New;}}
166
+ \\f0\\fs24
167
+ `+e.join(`
168
+ `)+`
169
+ }`}static blockToRtf(t,e){switch(t.type){case"paragraph":return G(t)?"\\pard\\brdrb\\brdrs\\brdrw15 \\par":this.paragraphToRtf(t);case"list":return this.listToRtf(t);case"table":return this.tableToRtf(
170
+ t);case"code":return"\\pard{\\f1\\fs20 "+y(t.content).replace(/\n/g,"\\line ")+"}\\par";case"math":return"\\pard "+y(t.content)+"\\par";case"toc":{const s=K(e,U(t));return s.length===0?null:s.map(r=>`\
171
+ \\pard${t.direction==="rtl"?"\\rtlpar":"\\ltrpar"}${t.align==="justify"?"\\qj":t.align==="center"?"\\qc":(t.align??(t.direction==="rtl"?"right":"left"))==="right"?"\\qr":"\\ql"}\\${t.direction==="rtl"?
172
+ "ri":"li"}${(r.level-1)*360} `+y(r.text)+"\\par").join(`
173
+ `)}case"image":return"\\pard{\\i [Image"+(t.alt?`: ${y(t.alt)}`:"")+"]}\\par";case"page-break":return"\\page";case"container":return t.children.map(s=>this.blockToRtf(s,e)).filter(s=>s!==null).join(`
174
+ `);default:return null}}static paragraphToRtf(t){let e="\\pard";t.align==="center"?e+="\\qc":t.align==="right"?e+="\\qr":t.align==="justify"&&(e+="\\qj");let s=this.inlineNodesToRtf(t.children);return t.
175
+ heading&&(s=`{\\b\\fs${this.HEADING_HALF_POINTS[t.heading-1]} ${s}}`),`${e} ${s}\\par`}static listToRtf(t){const e=this.exportListNumbering?.get(t.id);let s=e?lt(e):t.startNumber??1;const r=[];for(const n of t.
176
+ children){if(n.type!=="list-item")continue;const i=((n.indentLevel??0)+1)*360;let o;t.variant==="ordered"?(o=`${s}. `,s++):t.variant==="todo"?o=n.checked?"[x] ":"[ ] ":o="\\bullet ",r.push(`\\pard\\li${i}\
177
+ ${o}`+this.inlineNodesToRtf(n.children)+"\\par")}return r.join(`
178
+ `)}static tableToRtf(t){if(!t.children||t.children.length===0)return"";const e=ct(t),s=9360,r=[];for(let n=0;n<e.rows;n++){const i=["\\trowd\\trgaph108"];for(let o=0;o<e.cols;o++)i.push(`\\cellx${Math.
179
+ round(s*(o+1)/e.cols)}`);for(let o=0;o<e.cols;o++){const c=e.occupancy[n][o];let d="";c&&c.row===n&&c.col===o&&(d=c.cell.children.map(l=>l.type==="paragraph"?this.inlineNodesToRtf(l.children):l.type===
180
+ "code"?y(l.content):"").filter(l=>l.length>0).join("\\line ")),i.push(`\\pard\\intbl ${d}\\cell`)}i.push("\\row"),r.push(i.join(""))}return r.join(`
181
+ `)+`
182
+ \\pard`}static inlineNodesToRtf(t){return t.map(e=>this.textNodeToRtf(e)).join("")}static textNodeToRtf(t){if(t.marks?.footnoteRef)return`{\\super ${y(t.text)}}`;const e=y(t.text).replace(/\n/g,"\\line\
183
+ ");if(!t.marks)return e;const s=[];t.marks.bold&&s.push("\\b"),t.marks.italic&&s.push("\\i"),t.marks.underline&&s.push("\\ul"),t.marks.strikethrough&&s.push("\\strike"),t.marks.superscript&&s.push("\\\
184
+ super"),t.marks.subscript&&s.push("\\sub"),t.marks.code&&s.push("\\f1");const r=s.length>0?`{${s.join("")} ${e}}`:e;return t.marks.link?`{\\field{\\*\\fldinst HYPERLINK "${y(t.marks.link)}"}{\\fldrslt ${r}\
185
+ }}`:r}};N.exportListNumbering=null,N.HEADING_HALF_POINTS=[32,28,26,24,22,22];let At=N;function y(a){let t="";for(let e=0;e<a.length;e++){const s=a[e];if(s==="\\"||s==="{"||s==="}"){t+="\\"+s;continue}
186
+ const r=a.charCodeAt(e);if(r<128){t+=s;continue}t+=`\\u${r>32767?r-65536:r}?`}return t}export{At as RtfConverter,y as escapeRtfText};
@@ -0,0 +1,32 @@
1
+ import{W as $}from"./engine-LMUnxdm2.js";const b="#C0C0C0",p=.3,z=.5,P=.7;function y(t){if(typeof t!="string"||t.trim()==="")return null;let o;try{const i=JSON.parse(t);if(typeof i=="string")o={text:i};else if(i&&
2
+ typeof i=="object"&&typeof i.text=="string")o=i;else return null}catch{o={text:t}}const e=o.text.trim();if(!e)return null;const n=typeof o.opacity=="number"&&o.opacity>=0&&o.opacity<=1?o.opacity:p,r=typeof o.
3
+ fontSizePx=="number"&&o.fontSizePx>0?o.fontSizePx:void 0;return{text:e,color:typeof o.color=="string"&&o.color.trim()!==""?o.color:b,opacity:n,diagonal:o.diagonal!==!1,...r!==void 0?{fontSizePx:r}:{}}}
4
+ function x(t){const o={text:t.text};return typeof t.color=="string"&&t.color.trim()!==""&&t.color.toUpperCase()!==b&&(o.color=t.color),typeof t.opacity=="number"&&t.opacity>=0&&t.opacity<=1&&t.opacity!==
5
+ p&&(o.opacity=t.opacity),t.diagonal===!1&&(o.diagonal=!1),typeof t.fontSizePx=="number"&&t.fontSizePx>0&&(o.fontSizePx=t.fontSizePx),JSON.stringify(o)}function C(t){if(t==null)return null;const o=y(t);
6
+ return o?x(o):null}function v(t,o,e,n){if(t.fontSizePx)return t.fontSizePx;const r=Math.hypot(o,e)*P,i=100;let s=0;try{s=n(t.text,i)}catch{s=0}(!Number.isFinite(s)||s<=0)&&(s=t.text.length*i*.6);const l=i*
7
+ r/s;return Math.max(12,Math.min(400,l))}const T="Arial, sans-serif";function L(t,o,e,n,r=0){const i=l=>`normal ${l}px ${T}`,s=v(o,e,n,(l,c)=>{t.save(),t.font=i(c);const a=t.measureText(l).width;return t.
8
+ restore(),a});t.save(),t.globalAlpha=o.opacity,t.fillStyle=o.color,t.font=i(s),t.textAlign="center",t.textBaseline="middle",t.translate(e/2,r+n/2),o.diagonal&&t.rotate(-Math.atan2(n,e)),t.fillText(o.text,
9
+ 0,0),t.restore()}function O(t,o){return Math.max(1,t-o.left-o.right)}const k=new Set(["single","dashed","dotted","double","none"]),F=24,m=200;function J(t){if(typeof t!="object"||t===null)return;const o=t,
10
+ e=typeof o.style=="string"&&k.has(o.style)?o.style:"single",n=Number(o.width),r=Number.isFinite(n)?Math.min(Math.max(0,n),F):1,i=typeof o.color=="string"&&o.color.trim().length>0?o.color.trim():"#cccc\
11
+ cc";return{style:e,width:r,color:i}}const f=new Map,h=new Map;function w(t,o){let e;try{e=JSON.parse(t)}catch{return null}if(typeof e!="object"||e===null)return null;const n=e,r={},i=o?["top","bottom",
12
+ "left","right","insideH","insideV"]:["top","bottom","left","right"];let s=!1;for(const l of i){const c=J(n[l]);c&&(r[l]=c,s=!0)}return s?r:null}function j(t){if(!t)return;let o=f.get(t);return o===void 0&&
13
+ (o=w(t,!0),f.size>500&&f.clear(),f.set(t,o)),o??void 0}function B(t){if(!t)return;const o=`cell:${t}`;let e=f.get(o);return e===void 0&&(e=w(t,!1),f.size>500&&f.clear(),f.set(o,e)),e??void 0}function M(t){
14
+ if(!t)return;let o=h.get(t);return o===void 0&&(o=(()=>{let e;try{e=JSON.parse(t)}catch{return null}if(typeof e!="object"||e===null)return null;const n=e,r=a=>{const u=Number(n[a]);return Number.isFinite(
15
+ u)?Math.min(Math.max(0,u),m):void 0},i=r("top"),s=r("right"),l=r("bottom"),c=r("left");return i===void 0&&s===void 0&&l===void 0&&c===void 0?null:{top:i??0,right:s??0,bottom:l??0,left:c??0}})(),h.size>
16
+ 500&&h.clear(),h.set(t,o)),o??void 0}function S(t){const o={};for(const e of["top","bottom","left","right","insideH","insideV"]){const n=t[e];n&&(o[e]={style:n.style,width:n.width,color:n.color})}return Object.
17
+ keys(o).length>0?JSON.stringify(o):void 0}function H(t){const o=e=>Number.isFinite(e)?Math.min(Math.max(0,e),m):0;if(!(t.top===void 0&&t.right===void 0&&t.bottom===void 0&&t.left===void 0))return JSON.
18
+ stringify({top:o(t.top),right:o(t.right),bottom:o(t.bottom),left:o(t.left)})}function R(t,o){const e=M(o);if(e)return e;const n=Number.isFinite(t)?Math.max(0,Math.round(t)):8;return{top:n,right:n,bottom:n,
19
+ left:n}}function V(t){const{tableBorders:o,cellBorders:e,flags:n,fallback:r}=t,i=(s,l,c)=>(s?o?.[l]:o?.[c])??r;return{top:e?.top??i(n.isTopRow,"top","insideH"),bottom:e?.bottom??i(n.isBottomRow,"botto\
20
+ m","insideH"),left:e?.left??i(n.isLeftCol,"left","insideV"),right:e?.right??i(n.isRightCol,"right","insideV")}}function N(t){const o=Math.max(1,t.width);return t.style==="dashed"?[o*3,o*2]:t.style==="\
21
+ dotted"?[o,o*1.5]:[]}function W(t,o,e,n,r,i){if(o.style==="none"||o.width<=0)return;t.save(),t.strokeStyle=o.color;const s=N(o);if(s.length>0&&t.setLineDash(s),o.style==="double"){const l=Math.max(o.width/
22
+ 3,.5),c=o.width-l;t.lineWidth=l;const a=n===i,u=a?0:c/2,d=a?c/2:0;t.beginPath(),t.moveTo(e-u,n-d),t.lineTo(r-u,i-d),t.moveTo(e+u,n+d),t.lineTo(r+u,i+d),t.stroke()}else t.lineWidth=o.width,t.beginPath(),
23
+ t.moveTo(e,n),t.lineTo(r,i),t.stroke();t.restore()}const A={single:"solid",dashed:"dashed",dotted:"dotted",double:"double",none:"none"};function D(t){return t.style==="none"||t.width<=0?"none":`${t.width}\
24
+ px ${A[t.style]} ${t.color}`}function g(t){if(!t)return;const o=t.trim();if(!o)return;if(/(?:^|\s)(none|hidden)(?=\s|$)/i.test(o)||/^0(?:\.0+)?(?:px|pt)?$/i.test(o))return{style:"none",width:0,color:"\
25
+ #000000"};const e=o.match(/\b(solid|dashed|dotted|double)\b/i);if(!e)return;const n=e[1].toLowerCase()==="solid"?"single":e[1].toLowerCase(),r=o.match(/\b([\d.]+)\s*(px|pt)\b/i);let i=1;if(r){const c=Number(
26
+ r[1]);if(Number.isFinite(c)){const a=r[2].toLowerCase()==="pt"?c*4/3:c;i=Math.min(Math.max(0,a),24)}}const s=o.replace(e[0]," ").replace(r?.[0]??""," ").trim(),l=s?$(s):"#cccccc";if(l)return{style:n,width:i,
27
+ color:l}}function E(t){return t.top===t.right&&t.top===t.bottom&&t.top===t.left?`${t.top}px`:`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`}function q(t){if(!t)return;const o=t.trim().split(/\s+/);
28
+ if(o.length===0||o.length>4)return;const e=[];for(const l of o){const c=l.match(/^([\d.]+)(px)?$/i);if(!c)return;const a=Number(c[1]);if(!Number.isFinite(a))return;e.push(Math.min(Math.max(0,a),m))}const[
29
+ n,r=n,i=n,s=r]=e;return{top:n,right:r,bottom:i,left:s}}function G(t){return t.style==="single"&&t.width===1&&(t.color.toLowerCase()==="#ccc"||t.color.toLowerCase()==="#cccccc")}function I(t){if(!t)return;
30
+ const o=i=>{const s=t.match(new RegExp(`(?:^|;)\\s*${i}\\s*:\\s*([^;]+)`,"i"));return s?s[1].trim():void 0},e=g(o("border")),n={};let r=!1;for(const i of["top","right","bottom","left"]){const s=g(o(`b\
31
+ order-${i}`))??e;s&&(n[i]=s,G(s)||(r=!0))}if(r)return n}function K(t){return t?S(t):void 0}export{z as W,g as a,B as b,j as c,D as d,M as e,E as f,K as g,I as h,q as i,H as j,x as k,p as l,v as m,C as n,
32
+ N as o,y as p,V as q,R as r,S as s,O as t,W as u,L as v};
@@ -0,0 +1,12 @@
1
+ const M=r=>Math.max(1,Math.floor(r.colSpan??1)),S=r=>Math.max(1,Math.floor(r.rowSpan??1));function x(r){return r.children.reduce((h,t)=>h+M(t),0)}function y(r){const h=r.children.length;let t=r.columnWidths?.
2
+ length??0;for(const c of r.children)t=Math.max(t,x(c));t=Math.max(t,1);const i=Array.from({length:h},()=>new Array(t).fill(void 0)),n=[],f=new Map;for(let c=0;c<h;c++){const p=r.children[c];let e=0;for(let l=0;l<
3
+ p.children.length;l++){const w=p.children[l];for(;e<t&&i[c][e]!==void 0;)e++;if(e>=t)break;const u=Math.min(M(w),t-e),m=Math.min(S(w),h-c),o={cell:w,row:c,col:e,rowSpan:m,colSpan:u,physicalIndex:l};n.
4
+ push(o),f.set(w.id,o);for(let a=c;a<c+m;a++)for(let s=e;s<e+u;s++)i[a][s]===void 0&&(i[a][s]=o);e+=u}}return{rows:h,cols:t,cells:n,byId:f,occupancy:i}}function b(r,h){let{top:t,left:i,bottom:n,right:f}=h;
5
+ t=Math.max(0,Math.min(t,r.rows-1)),n=Math.max(t,Math.min(n,r.rows-1)),i=Math.max(0,Math.min(i,r.cols-1)),f=Math.max(i,Math.min(f,r.cols-1));let c=!0;for(;c;){c=!1;for(let p=t;p<=n;p++)for(let e=i;e<=f;e++){
6
+ const l=r.occupancy[p][e];l&&(l.row<t&&(t=l.row,c=!0),l.col<i&&(i=l.col,c=!0),l.row+l.rowSpan-1>n&&(n=l.row+l.rowSpan-1,c=!0),l.col+l.colSpan-1>f&&(f=l.col+l.colSpan-1,c=!0))}}return{top:t,left:i,bottom:n,
7
+ right:f}}function g(r,h){let t=r.filter(n=>Number.isFinite(n)&&n>0);if(t.length>h&&(t=t.slice(0,h)),t.length<h){const n=t.reduce((p,e)=>p+e,0),f=h-t.length,c=n>0?n/Math.max(t.length,1):100/h;t=t.concat(
8
+ Array(f).fill(c))}const i=t.reduce((n,f)=>n+f,0);return i<=0?Array(h).fill(100/h):Math.abs(i-100)<.01?t:t.map(n=>n/i*100)}function A(r,h,t,i){const n=g(t,r.cols).map(o=>h*o/100),f=[];let c=0;for(const o of n)
9
+ f.push(c),c+=o;const p=o=>{let a=0;for(let s=o.col;s<o.col+o.colSpan;s++)a+=n[s]??0;return a},e=new Map;for(const o of r.cells)e.set(o.cell.id,i(o.cell,p(o)));const l=[];for(let o=0;o<r.rows;o++){let a=0;
10
+ for(const s of r.cells)s.row===o&&s.rowSpan===1&&(a=Math.max(a,e.get(s.cell.id)??0));l.push(a)}const w=r.cells.filter(o=>o.rowSpan>1).sort((o,a)=>o.rowSpan-a.rowSpan);for(const o of w){let a=0;for(let d=o.
11
+ row;d<o.row+o.rowSpan;d++)a+=l[d]??0;const s=(e.get(o.cell.id)??0)-a;s>0&&(l[o.row+o.rowSpan-1]+=s)}const u=[];let m=0;for(const o of l)u.push(m),m+=o;return{colLefts:f,colWidths:n,rowTops:u,rowHeights:l,
12
+ totalHeight:m,cellWidth:p,measuredCellHeight:o=>e.get(o.cell.id)??0,cellHeight:o=>{let a=0;for(let s=o.row;s<o.row+o.rowSpan;s++)a+=l[s]??0;return a}}}export{y as b,A as c,b as e,g as n};
@@ -0,0 +1,2 @@
1
+ const r="€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ";function d(e){return e.replace(/[\u0080-\u009f]/g,n=>r[n.charCodeAt(0)-128])}function u(e,n,c){const o=new TextDecoder(
2
+ n,c),t=o.decode(e);return o.encoding==="windows-1252"?d(t):t}export{u as d};
@@ -0,0 +1,10 @@
1
+ import{d as u}from"./TextDecoding-IPbuUqcC.js";const p=["shift_jis","gb18030","big5","euc-kr","windows-1251","windows-1256","windows-1252"];function w(t){return/charset\s*=\s*["']?([^;"'\s]+)/i.exec(t)?.[1]??
2
+ null}function y(t){const n=u(t.subarray(0,2048),"windows-1252");return/<meta[^>]+charset\s*=\s*["']?([^\s"'/>;]+)/i.exec(n)?.[1]??/<meta[^>]+content\s*=\s*["'][^"']*charset\s*=\s*([^\s"';]+)/i.exec(n)?.[1]??
3
+ null}function a(t,n,e=!0){try{return u(t,n,{fatal:e})}catch{return null}}function f(t){let n=0;const e=new Map;for(const c of t){c==="�"?n-=100:/\p{L}|\p{N}/u.test(c)&&(n+=1);for(const[s,r]of[["cjk",
4
+ /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/u],["hangul",/\p{Script=Hangul}/u],["cyrillic",/\p{Script=Cyrillic}/u],["arabic",/\p{Script=Arabic}/u]])r.test(c)&&e.set(s,(e.get(s)??0)+1);const o=c.
5
+ codePointAt(0)??0;(o<32&&!`
6
+ \r `.includes(c)||o>=127&&o<160)&&(n-=20)}for(const c of e.values())c>=2&&(n+=c*2);return n-=(t.match(/[ÃÂ]|â[\u0080-\u00bf]/g)??[]).length*8,n}function d(t,n={}){if(t[0]===239&&t[1]===187&&t[2]===
7
+ 191)return new TextDecoder("utf-8").decode(t.subarray(3));if(t[0]===255&&t[1]===254)return new TextDecoder("utf-16le").decode(t.subarray(2));if(t[0]===254&&t[1]===255){const r=t.subarray(2).slice();for(let i=0;i+
8
+ 1<r.length;i+=2)[r[i],r[i+1]]=[r[i+1],r[i]];return new TextDecoder("utf-16le").decode(r)}const e=w(n.mimeType??"")??(n.kind==="html"?y(t):null);if(e){const r=a(t,e,!1);if(r!==null)return r}const c=a(t,
9
+ "utf-8",!0);if(c!==null)return c;let o=u(t,"windows-1252"),s=f(o);for(const r of p){const i=a(t,r,!0);if(i===null)continue;const l=f(i);l>s&&(o=i,s=l)}return o}async function m(t,n="plain"){const e=new Uint8Array(
10
+ await t.arrayBuffer());return d(e,{kind:n,mimeType:t.type})}export{d as decodeTextBytes,m as decodeTextFile};
@@ -0,0 +1,14 @@
1
+ import{f as r}from"./footnoteFlatten-EE85Hjre.js";import{a_ as p,b0 as c,aR as s,aK as l}from"./engine-LMUnxdm2.js";import{decodeTextFile as m}from"./TextFileDecoder-BZBBejlR.js";class h{static async parseFile(n){
2
+ const o=await m(n);return this.fromText(o)}static fromText(n){const o=n.replace(/\r\n?/g,`
3
+ `).split(/\n\s*\n+/),a=[];for(const t of o){const e=t.trim();e&&a.push(p([{type:"text",text:e}]))}return a.length===0&&a.push(p()),{type:"doc",children:a}}static toText(n,o){n=r(n);const a=t=>t.type===
4
+ "placeholder"?"[Placeholder]":t.type==="image"?"[Image]":t.type==="code"?o?.codeText?.(t)??t.content:t.type==="math"?t.content:t.type==="toc"?c(n,s(t)).map(e=>`${" ".repeat(e.level-1)}${e.text}`).join(
5
+ `
6
+ `):t.type==="paragraph"&&l(t)?"---":t.type==="list"?t.children.map(e=>e.children.map(i=>i.text).join("")).join(`
7
+ `):t.type==="table"?t.children.map(e=>e.children.map(i=>i.children.map(a).join(`
8
+
9
+ `)).join(" ")).join(`
10
+ `):t.type==="container"?t.children.map(a).join(`
11
+
12
+ `):"children"in t?t.children.map(e=>e.type==="text"?e.text:"").join(""):"";return n.children.map(a).join(`
13
+
14
+ `)}}export{h as TxtConverter};
@@ -0,0 +1,28 @@
1
+ import{bR as h}from"./engine-LMUnxdm2.js";const p={isDark:!1,background:"#f5f5f5",text:"#000000",linkText:"#007bff",selection:"#3390ff",selectionOpacity:.4,inactiveSelection:"#9ac0e8",inactiveSelectionOpacity:.35,
2
+ agentReadHighlight:"#7aaee6",searchHighlight:"#cc8f00",cursor:"#000000",pageBorder:"#dee2e6",pageBackground:"#ffffff",pageShadow:"rgba(0, 0, 0, 0.1)",diffInsert:"#22c55e",diffDelete:"#CF2A2A",diffEqual:"\
3
+ #000000",diffFormatChange:"#f59e0b",diffInsertText:"#0B8237",diffDeleteText:"#CF2A2A",diffFormatChangeText:"#78350f",debugText:"#ff0000",todoCheckboxBorder:"#c8ccd5",todoCheckboxBackground:"#ffffff",todoCheckboxChecked:"\
4
+ #46b35e",todoCheckboxCheckmark:"#46b35e",todoCheckedText:"#6c757d",codeBackground:"#f5f5f5",codeBorder:"#e0e0e0",codeText:"#333333"},A={isDark:!0,background:"#080a0e",text:"#c9c9c9",linkText:"#4099ff",
5
+ selection:"#4099ff",selectionOpacity:.4,inactiveSelection:"#5a7a9e",inactiveSelectionOpacity:.35,agentReadHighlight:"#24568f",searchHighlight:"#fbbf24",cursor:"#ffffff",pageBorder:"#1e2430",pageBackground:"\
6
+ #05060a",pageShadow:"rgba(0, 0, 0, 0.5)",diffInsert:"#50B173",diffDelete:"#f87171",diffEqual:"#c9c9c9",diffFormatChange:"#fbbf24",diffInsertText:"#50B173",diffDeleteText:"#f87171",diffFormatChangeText:"\
7
+ #f5a91d",debugText:"#ff6b6b",todoCheckboxBorder:"#2f3747",todoCheckboxBackground:"#05060a",todoCheckboxChecked:"#0e6b30",todoCheckboxCheckmark:"#f3f7ff",todoCheckedText:"#6f7689",codeBackground:"#0c0f\
8
+ 15",codeBorder:"#2a2f3a",codeText:"#c9c9c9"};function D(e){if(typeof window>"u")return!1;const r=e?.closest?.("[data-theme]")?.getAttribute("data-theme");return r==="dark"?!0:r==="light"?!1:document.documentElement.
9
+ classList.contains("dark")||document.documentElement.classList.contains("dark-theme")}function k(e){const r=D(e)?A:p,n=e?.closest?.("[data-page-background]")?.getAttribute("data-page-background");return n?
10
+ {...r,pageBackground:n}:r}function S(e,r){const n=parseInt(e.slice(1,3),16),t=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16);return`rgba(${n}, ${t}, ${a}, ${r})`}const b=["bold","italic","under\
11
+ line","strikethrough","doubleStrikethrough","smallCaps","allCaps","letterSpacing","code","latex","superscript","subscript","backgroundColor","link"],v=b.reduce((e,r)=>(e[r]=null,e),{}),I=[],d={yellow:"\
12
+ #FDE68A",orange:"#FED7AA",green:"#BBF7D0",blue:"#BFDBFE",purple:"#E9D5FF",pink:"#FBCFE8",gray:"#E5E7EB"},O={yellow:"#7C5E10",orange:"#7C3F16",green:"#1F5F3A",blue:"#1E4E8C",purple:"#5B3A7A",pink:"#7A3\
13
+ F66",gray:"#4B5563"},y=d,m=["yellow","orange","green","blue","purple","pink","gray"],H={yellow:"yellow",gold:"yellow",orange:"orange",darkorange:"orange",darkyellow:"orange",green:"green",darkgreen:"g\
14
+ reen",blue:"blue",cyan:"blue",darkblue:"blue",darkcyan:"blue",purple:"purple",violet:"purple",darkviolet:"purple",darkmagenta:"purple",pink:"pink",magenta:"pink",red:"pink",darkred:"pink",gray:"gray",
15
+ grey:"gray",lightgray:"gray",lightgrey:"gray",darkgray:"gray",darkgrey:"gray",black:"gray",white:"gray"},L={yellow:"yellow",gold:"yellow",orange:"orange",green:"green",blue:"blue",cyan:"blue",purple:"\
16
+ purple",violet:"purple",pink:"pink",magenta:"pink",red:"pink",gray:"gray",grey:"gray",lightgray:"gray",lightgrey:"gray"},M="yellow";function $(e){if(!e)return;const r=e.trim().toLowerCase().replace(/[\s_-]+/g,
17
+ "");return H[r]}function N(e){return f(e)}function R(e){const r=f(e);return r?y[r]:void 0}function _(e,r=k().isDark){const n=f(e);return n?(r?O:d)[n]:void 0}function C(e){const r=h(e);return r?[r.r,r.
18
+ g,r.b]:null}function P(e){const r=h(e);return r?{rgb:[r.r,r.g,r.b],alpha:r.a}:null}function x(e,r=!1,n=m){let t=null,a=Number.POSITIVE_INFINITY;for(const i of n){const c=[y[i],...r?[d[i]]:[]];for(const g of c){
19
+ const o=C(g);if(!o)continue;const l=(e[0]-o[0])**2+(e[1]-o[1])**2+(e[2]-o[2])**2;l<a&&(a=l,t=i)}}return t?{name:t,distance:a}:null}function B(e){const[r,n,t]=e.map(T=>T/255),a=Math.max(r,n,t),i=Math.min(
20
+ r,n,t),c=a-i,g=(a+i)/2,o=c===0?0:c/(1-Math.abs(2*g-1));let l=null;return c!==0&&(a===r?l=60*((n-t)/c%6):a===n?l=60*((t-r)/c+2):l=60*((r-n)/c+4),l<0&&(l+=360)),{hue:l,lightness:g,saturation:o,maxChannel:Math.
21
+ max(...e)}}function w(e){return e>=20&&e<42?"orange":e>=42&&e<85?"yellow":e>=85&&e<170?"green":e>=170&&e<255?"blue":e>=255&&e<320?"purple":"pink"}function q(e){if(!e)return;const r=e.trim().toLowerCase().
22
+ replace(/[\s_-]+/g,"");return L[r]}function f(e){if(!e)return;const r=$(e);if(r)return r;if(/^[a-z]+$/i.test(e.trim()))return;const n=C(e);if(!n)return;const t=x(n);if(t?.distance===0)return t.name;const{
23
+ hue:a,saturation:i}=B(n),c=Math.max(...n)-Math.min(...n);return a===null||i<=.18||c<10?"gray":w(a)}function z(e){if(!e)return;const r=q(e);if(r)return r;const n=P(e);if(!n||n.alpha<.35)return;const{hue:t,
24
+ lightness:a,saturation:i,maxChannel:c}=B(n.rgb),g=i>.18&&t!==null?[w(t)]:["gray"],o=x(n.rgb,!0,g);if(!o)return;if(o.distance===0)return o.name;if(o.name==="gray")return o.distance>70**2||i>.12||a<.68||
25
+ a>.92?void 0:o.name;const l=i>=.8&&c>=220&&a>=.45;if(!(o.distance>95**2&&!l)&&!(a>.92)&&!(c<150)&&!(i<.22)&&!(a<.55&&c<220))return o.name}const u={paragraph:16,h1:32,h2:24,h3:20,h4:18,h5:16,h6:14,code:14},
26
+ s={paragraph:1.4,heading:1.2,code:1.5};function F(e){if(!e.hasOwnProperty("heading"))return u.paragraph;switch(e.heading){case 1:return u.h1;case 2:return u.h2;case 3:return u.h3;case 4:return u.h4;case 5:
27
+ return u.h5;case 6:return u.h6;default:return u.paragraph}}function E(e){return e.lineSpacing!==void 0?e.lineSpacing:e.heading?s.heading:s.paragraph}function V(e){const r=F(e),n=E(e);return r*n}function j(e){
28
+ return e.lineSpacing!==void 0?e.lineSpacing:s.paragraph}export{I as C,M as D,u as F,m as H,s as L,v as a,b,z as c,R as d,E as e,F as f,k as g,f as h,V as i,j,S as k,p as l,_ as m,N as n};
@@ -0,0 +1,10 @@
1
+ function m(n,t){if(t<0||t>=n.length)return 0;const e=n.codePointAt(t);return e===void 0?0:e>65535?2:1}function f(n,t){if(t>=n.length)return t;const e=m(n,t);return t+e}function y(n,t){if(t<=0)return 0;
2
+ const e=n.charCodeAt(t-1);if(e>=56320&&e<=57343&&t>=2){const r=n.charCodeAt(t-2);if(r>=55296&&r<=56319)return t-2}return t-1}let c,u;function l(){if(c===void 0)try{const n=typeof Intl<"u"?Intl.Segmenter:
3
+ void 0;c=typeof n=="function"?new n(void 0,{granularity:"grapheme"}):null}catch{c=null}return c}function S(){if(u===void 0)try{const n=typeof Intl<"u"?Intl.Segmenter:void 0;u=typeof n=="function"?new n(
4
+ void 0,{granularity:"word"}):null}catch{u=null}return u}const p=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Thai}\p{Script=Lao}\p{Script=Khmer}\p{Script=Myanmar}]/u,v=/[\p{L}\p{N}\p{M}_]/u;
5
+ function L(n){const t=S();if(t)return Array.from(t.segment(n),o=>({segment:o.segment,index:o.index,isWordLike:o.isWordLike===!0}));const e=[];let r=null;for(let o=0;o<n.length;){const i=d(n,o),s=n.slice(
6
+ o,i),h=p.test(s),a=v.test(s);a&&!h&&r?.isWordLike===!0&&!p.test(r.segment)?r.segment+=s:(r={segment:s,index:o,isWordLike:a},e.push(r)),o=i}return e}function x(n){let t=0;for(const e of L(n))e.isWordLike&&
7
+ (t+=1);return t}function k(n,t){if(!t)return n.toUpperCase();try{return n.toLocaleUpperCase(t)}catch{return n.toUpperCase()}}const g=64;function C(n){const t=[0],e=l();if(e)for(const{index:r,segment:o}of e.
8
+ segment(n))t.push(r+o.length);else for(let r=0;r<n.length;)r=f(n,r),t.push(r);return t}function d(n,t){if(t>=n.length)return t;const e=l();if(!e)return f(n,t);const r=Math.min(n.length,t+g),o=n.slice(
9
+ t,r),i=e.segment(o)[Symbol.iterator]().next();return i.done||!i.value.segment.length?f(n,t):t+i.value.segment.length}function W(n,t){if(t<=0)return 0;const e=l();if(!e)return y(n,t);const r=Math.max(0,
10
+ t-g),o=n.slice(r,t);let i=0;for(const{index:s}of e.segment(o))i=s;return r+i}export{d as a,W as b,x as c,C as g,k as l};
@@ -0,0 +1,55 @@
1
+ import{d as A}from"./TextDecoding-IPbuUqcC.js";import{a as k}from"./engine-LMUnxdm2.js";import{b as S}from"./TableGrid-DbroRucl.js";import{d as T}from"./BlockDiff-B6-aJxHo.js";function M(d,e,n){const t=(i,c)=>i.
2
+ length>0&&i.every(l=>l.type==="paragraph"&&l.children.length>0&&l.children.every(r=>r.marks?.[c]&&!r.marks.layeredInsertion));if(!t(d,"deletion")||!t(e,"insertion"))return null;const s=T(d,e,{nextId:n,
3
+ nextBlockId:k,label:"Revise bill",authorOf:i=>i?.suggestionAuthorName});return s?s.blocks:null}const E={division:0,title:0,subtitle:0,chapter:0,subchapter:0,part:0,subpart:0,section:0,subsection:1,paragraph:2,
4
+ subparagraph:3,clause:4,subclause:5,item:6,subitem:7},C={division:"Division",title:"Title",subtitle:"Subtitle",chapter:"Chapter",subchapter:"Subchapter",part:"Part",subpart:"Subpart",section:"Sec."},y=new Set(
5
+ ["added-phrase","deleted-phrase","bold","italic","underline","strike","superscript","subscript","quote","term","short-title","act-name","external-xref","internal-xref","enum-in-header","header-in-text",
6
+ "definition","linebreak","nobreak","sponsor","cosponsor","committee-name","text-to-insert","text-to-strike-out","omitted-text","inline-comment"]),I=new Set(["graphic","formula","footnote","footnote-re\
7
+ f","spanspec","entrytbl"]),m=d=>Array.from(d.children),g=(d,e)=>m(d).find(n=>n.localName===e),b=d=>d.replace(/[\t\r\n ]+/g," "),q={id:"us-congress-bill",label:"U.S. Congressional bills (bill.dtd)",matches(d){
8
+ const e=d.documentElement;if(e.localName!=="bill"||e.namespaceURI||!g(e,"legis-body"))return!1;const n=d.doctype;if(n)return n.name==="bill"&&(n.publicId==="-//US Congress//DTDs/bill.dtd//EN"||!n.publicId&&
9
+ /(?:^|\/)bill\.dtd$/i.test(n.systemId));const t=g(e,"form");return!!t&&!!g(t,"congress")&&!!g(t,"legis-num")},parse(d){return new L().parse(d)}};class L{constructor(){this.revisionCount=0,this.revisions=
10
+ new WeakMap,this.committees=new Map,this.usedIds=new Set}id(){let e;do e=k();while(this.usedIds.has(e));return this.usedIds.add(e),e}parse(e){const n=e.documentElement;for(const o of Array.from(n.getElementsByTagName(
11
+ "committee-name"))){const h=o.getAttribute("committee-id");h&&this.committees.set(h,b(o.textContent??"").trim())}for(const o of Array.from(n.getElementsByTagName("*")))if(I.has(o.localName))throw new Error(
12
+ `Unsupported Congressional XML element: <${o.localName}>. This bill requires content the XML importer does not yet support.`);const t=this.context(n,{marks:{},indent:0,quoted:0}),s=[],i=m(n),c=i.map(o=>this.
13
+ blocks(o,t));for(let o=0;o<i.length;o++){const h=i[o],p=c[o],f=i[o+1];if(h.localName==="legis-body"&&f?.localName==="legis-body"&&f.getAttribute("display-enacting-clause")==="no-display-enacting-claus\
14
+ e"){const v=c[o+1],N=h.getAttribute("display-enacting-clause")!=="no-display-enacting-clause"?1:0,w=M(p.slice(N),v,()=>`congressdiff-${++this.revisionCount}`);if(w){s.push(...p.slice(0,N),...w),o++;continue}}
15
+ s.push(...p)}if(!s.length)throw new Error("The Congressional XML bill contains no readable content.");const l=g(n,"form"),r=l&&g(l,"legis-num")?.textContent?.trim(),a=n.getElementsByTagName("short-tit\
16
+ le")[0]?.textContent?.trim(),u=r?[r,a].filter(Boolean).join(" — "):e.getElementsByTagNameNS("http://purl.org/dc/elements/1.1/","title")[0]?.textContent?.trim();return{type:"doc",children:s,...u?{title:u}:
17
+ {}}}context(e,n){const t={...n.marks},s=e.localName,i=e.getAttribute("changed")??(s==="added-phrase"?"added":s==="deleted-phrase"?"deleted":null);if(i==="added"||i==="deleted"){const l=i==="added"?"in\
18
+ sertion":"deletion",r=e.getAttribute("reporting-committee")||e.getAttribute("committee-id"),a=r?this.committees.get(r)??r:void 0;if(!t[l]||a&&a!==t.suggestionAuthorName){if(t.deletion&&l==="insertion")
19
+ throw new Error("Unsupported Congressional XML revision: insertion nested inside a deletion.");let u=this.revisions.get(e);u||(u={[l]:!0,suggestionId:`congressrev-${++this.revisionCount}`,suggestionSource:"\
20
+ manual",suggestionAuthorType:"human",suggestionLabel:l==="insertion"?"Insert":"Delete",...a?{suggestionAuthorName:a}:{}},this.revisions.set(e,u)),t.insertion&&l==="deletion"&&(t.layeredInsertion=JSON.
21
+ stringify({id:t.suggestionId,source:t.suggestionSource,authorType:t.suggestionAuthorType,authorName:t.suggestionAuthorName,label:t.suggestionLabel})),delete t.insertion,delete t.deletion,delete t.suggestionAuthorName,
22
+ Object.assign(t,u)}}s==="bold"&&(t.bold=!0),s==="italic"&&(t.italic=!0),s==="underline"&&(t.underline=!0),s==="superscript"&&(t.superscript=!0),s==="subscript"&&(t.subscript=!0);const c=e.getAttribute(
23
+ "href");return c&&/^(https?:\/\/|#)/i.test(c.trim())&&(t.link=c.trim()),s==="internal-xref"&&e.getAttribute("idref")&&(t.link=`#${e.getAttribute("idref")}`),{...n,marks:t,style:e.getAttribute("style")??
24
+ n.style}}text(e,n){return{type:"text",text:e,marks:{...n.marks}}}inline(e,n){const t=this.context(e,n);if(e.localName==="linebreak")return[this.text(`
25
+ `,t)];const s=[],i=e.localName==="quote"||e.localName==="term";i&&s.push(this.text(t.quoted?"‘":"“",t));for(const c of Array.from(e.childNodes))c.nodeType===3||c.nodeType===4?s.push(this.text(b(c.
26
+ textContent??""),t)):c.nodeType===1&&s.push(...this.inline(c,i?{...t,quoted:t.quoted+1}:t));return i&&s.push(this.text(t.quoted?"’":"”",t)),s}paragraph(e,n,t,s){for(;e.length&&!e[0].text.trim();)e.
27
+ shift();for(;e.length&&!e[e.length-1].text.trim();)e.pop();if(!e.length)return null;e[0].text=e[0].text.replace(/^ +/,""),e[e.length-1].text=e[e.length-1].text.replace(/ +$/,""),n.quoted&&e.unshift(this.
28
+ text(n.quoted>1?"‘":"“",n));const i=t?.getAttribute("id");return i&&(e[0].marks={...e[0].marks,bookmark:i}),{type:"paragraph",id:this.id(),children:e,...s?{heading:s,keepNext:!0}:{},...n.indent?{leftIndent:Math.
29
+ min(n.indent,6)}:{}}}blocks(e,n){const t=e.localName;if(t==="metadata")return[];const s=this.context(e,n);if(Object.prototype.hasOwnProperty.call(E,t))return this.structure(e,{...s,indent:E[t]+(s.quoted?
30
+ 1:0)});if(t==="table")return m(e).filter(r=>r.localName==="tgroup").length?m(e).flatMap(r=>r.localName==="tgroup"?[this.table(r,this.context(r,s))]:this.blocks(r,s)):[this.table(e,s)];if(t==="quoted-b\
31
+ lock"){const r=m(e).filter(o=>o.localName!=="after-quoted-block").flatMap(o=>this.blocks(o,{...s,quoted:s.quoted+1,indent:s.indent+1})),a=r[r.length-1],u=g(e,"after-quoted-block");if(a?.type==="paragr\
32
+ aph")a.children.push(this.text(s.quoted?"’":"”",s)),u&&a.children.push(...this.inline(u,s));else if(u){const o=this.paragraph([this.text(s.quoted?"’":"”",s),...this.inline(u,s)],s);o&&r.push(o)}
33
+ return r}if(!m(e).some(r=>!y.has(r.localName))){const r=this.paragraph(this.inline(e,n),s,e);if(r&&(t==="legis-num"||t==="legis-type")){r.align="center";for(const a of r.children)a.marks={...a.marks,bold:!0}}
34
+ return r?[r]:[]}const i=[];if(t==="legis-body"&&e.getAttribute("display-enacting-clause")!=="no-display-enacting-clause"){const r=this.paragraph([this.text("Be it enacted by the Senate and House of Re\
35
+ presentatives of the United States of America in Congress assembled,",s)],s);r&&i.push(r)}let c=[];const l=()=>{const r=this.paragraph(c,s);r&&i.push(r),c=[]};for(const r of Array.from(e.childNodes))if(r.
36
+ nodeType===3||r.nodeType===4)c.push(this.text(b(r.textContent??""),s));else if(r.nodeType===1){const a=r;y.has(a.localName)?c.push(...this.inline(a,s)):(l(),i.push(...this.blocks(a,s)))}return l(),i}structure(e,n){
37
+ const t=[],s=Object.prototype.hasOwnProperty.call(C,e.localName),i=g(e,"enum"),c=g(e,"header");let l=[];if(i&&(s&&l.push(this.text(e.localName==="section"&&n.style==="USC"?"§ ":`${C[e.localName]} `,n)),
38
+ l.push(...this.inline(i,n),this.text(" ",n))),c){const u=this.inline(c,n);for(const o of u)o.marks={...o.marks,bold:!0};l.push(...u)}const r=(u=!1)=>{const o=this.paragraph(l,n,t.length?void 0:e,u?e.localName===
39
+ "section"?2:1:void 0);o&&t.push(o),l=[]};s&&r(!0);let a=!0;for(const u of Array.from(e.childNodes))if(!(u===i||u===c)){if(u.nodeType===3||u.nodeType===4)u.textContent?.trim()&&l.push(this.text(b(u.textContent),
40
+ n));else if(u.nodeType===1){const o=u;if(o.localName==="text")a||r(),a&&!s&&c&&l.push(this.text(".—",n)),l.push(...this.inline(o,n)),a=!1;else if(y.has(o.localName))l.push(...this.inline(o,n));else{
41
+ r();const h=this.blocks(o,n),p=t[t.length-1];o.getAttribute("display-inline")==="yes-display-inline"&&p?.type==="paragraph"&&!p.heading&&h[0]?.type==="paragraph"&&(p.children.push(this.text(" ",n),...h[0].
42
+ children),h.shift()),t.push(...h)}}}return r(),t}table(e,n){const t=g(e,"tgroup")??e,s=new Map(m(t).filter(r=>r.localName==="colspec").map((r,a)=>[r.getAttribute("colname"),Number(r.getAttribute("coln\
43
+ um"))||a+1])),i=m(t).flatMap(r=>r.localName==="row"?[r]:["thead","tbody","tfoot"].includes(r.localName)?m(r).filter(a=>a.localName==="row"):[]);if(!i.length)throw new Error("Unsupported Congressional \
44
+ XML table: no rows.");const c={type:"table",id:this.id(),columnWidths:[],children:i.map(r=>({type:"table-row",id:this.id(),children:m(r).filter(a=>a.localName==="entry").map(a=>{const u=s.get(a.getAttribute(
45
+ "namest")),o=s.get(a.getAttribute("nameend")),h=u&&o?o-u+1:1,p=Number(a.getAttribute("morerows")??0)+1;if(a.hasAttribute("namest")&&(!u||!o)||!Number.isInteger(h)||h<1||h>100||!Number.isInteger(p)||p<
46
+ 1||p>i.length)throw new Error("Unsupported Congressional XML table: invalid cell span.");const f=this.blocks(a,{...this.context(r,r.parentElement&&r.parentElement!==t?this.context(r.parentElement,n):n),
47
+ indent:0});return{type:"table-cell",id:this.id(),children:f.length?f:[{type:"paragraph",id:this.id(),children:[{type:"text",text:""}]}],...h>1?{colSpan:h}:{},...p>1?{rowSpan:p}:{}}})}))},l=S(c).cols;if(!l||
48
+ l>100)throw new Error("Unsupported Congressional XML table: invalid column count.");return c.columnWidths=Array(l).fill(100/l),c}}const x=[q];class X{static async parseFile(e){return this.fromBytes(new Uint8Array(
49
+ await e.arrayBuffer()))}static fromBytes(e){let n="utf-8";if(e[0]===255&&e[1]===254||e[0]===60&&e[1]===0&&e[2]===63&&e[3]===0)n="utf-16le";else if(e[0]===254&&e[1]===255||e[0]===0&&e[1]===60&&e[2]===0&&
50
+ e[3]===63)n="utf-16be";else if(!(e[0]===239&&e[1]===187&&e[2]===191)){const s=A(e.subarray(0,512),"windows-1252");n=/^<\?xml\s[^?]*\bencoding\s*=\s*["']([^"']+)["']/i.exec(s)?.[1]??n}let t;try{t=A(e,n,
51
+ {fatal:!0})}catch{throw new Error(`Invalid or unsupported XML encoding: ${n}.`)}return this.fromXml(t)}static fromXml(e){if(/<!ENTITY\s/i.test(e))throw new Error("XML entity declarations are not suppo\
52
+ rted.");const n=new DOMParser().parseFromString(e.replace(/^\uFEFF/,""),"application/xml");if(!n.documentElement||n.getElementsByTagName("parsererror").length)throw new Error("Invalid XML: the documen\
53
+ t is not well-formed.");const t=[[n.documentElement,0]];for(;t.length;){const[i,c]=t.pop();if(c>128)throw new Error("XML nesting exceeds the supported depth (128).");for(const l of Array.from(i.children))
54
+ t.push([l,c+1])}const s=x.find(i=>i.matches(n));if(!s)throw new Error(`Unsupported XML schema: <${n.documentElement.tagName}>. Supported: ${x.map(i=>i.label).join(", ")}.`);return s.parse(n)}}export{x as XML_SCHEMA_PARSERS,
55
+ X as XmlConverter};
@@ -0,0 +1,2 @@
1
+ var l=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?
2
+ o.default:o}export{l as c,t as g};