@ones-editor/editor 0.0.3-beta.163 → 0.0.3-beta.164
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/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -737,4 +737,4 @@ ${i.mermaidText}
|
|
|
737
737
|
${i.flowchartText}
|
|
738
738
|
\`\`\`\`\`\``}return"[flowchart]"}const lk={embedType:"flowchart",convertFrom:lG,handleUpdateBlock:sG,createEmbedContent:iG,getBlockProperties:cG,convertTo:aG},uG=S("plantuml-helper");function ck(n,e){var l;let o=((l=(n.getComponentOptions("plantuml")||{}).cdn)==null?void 0:l.plantuml)||zq;o.endsWith("/")||(o+="/");const r=GB.default.encode(e);g(uG,r,r),o+=r;const s=new URLSearchParams(document.location.search).get("doc");return Tm(o,{id:`${s}-${K()}`})}async function dG(n,e){try{const t=await H2(n,e);return(await n.doc.uploadResource(t)).resourceId}catch{return Promise.resolve(e)}}class _c extends q2{constructor(e){super(e,"plantuml","plantumlText")}static get(e,t){return e.addCustom(`plantuml-${t.id}`,()=>new _c(e))}code2ObjectUrl(e){return Promise.resolve(ck(this.editor,e))}code2ResourceId(e){const t=ck(this.editor,e);return dG(this.editor,t)}destroy(){}}function hG(n,e,t){_c.get(n,t).createEmbedContent(e,t)}function fG(n,e,t){const o=_c.get(n,t),r=Re(e);return o.updateEmbedContent(r,t),!0}function mG(n,e,t){const{data:o}=t,r=n.getBlockString(e).trim();if(!o||o.embedType!=="plantuml"||r!=="```plantuml"||!ee(n,e))return null;const i={src:"",plantumlText:""};return{blockData:{id:K(),type:"embed",embedType:"plantuml",embedData:i},onConverted:(a,d)=>{_c.get(a,a.getBlockData(d)).editGraph(Re(d))}}}function gG(n,e){return _c.get(n,n.getBlockData(e)).getBlockProperties(e)}function pG(n,e,t,o){const{embedData:r}=e,i=r;if(o==="html")return i.src?`<img src="${n.doc.buildResourceUrl(i.src,{withToken:!0})}" />`:i.flowchartText?`<div>${i.flowchartText}</div>`:"<p>[plantuml]</p>";if(o==="markdown"){if(i.src)return`})`;if(i.flowchartText)return`\`\`\`plantuml\`\`\`
|
|
739
739
|
${i.flowchartText}
|
|
740
|
-
\`\`\`\`\`\``}return"[plantuml]"}const ak={embedType:"plantuml",convertFrom:mG,handleUpdateBlock:fG,createEmbedContent:hG,getBlockProperties:gG,convertTo:pG},roe="",CG="hr",AG={dividingLine:{type:"\u5206\u5272\u7EBF",abstract:"\u5206\u5272\u7EBF"}},bG={dividingLine:{type:"Separation line",abstract:"Line"}},vG={dividingLine:{type:"\u533A\u5207\u308A\u7DDA",abstract:"\u533A\u5207\u308A\u7DDA"}};R.mergeLang({"zh-CN":AG,"en-US":bG,"ja-JP":vG});function yG(n,e){const t=w("div",["editor-embed-container"],e);w("hr",["editor-embed-hr"],t)}function kG(n,e,t,o){return o==="html"?"<hr />":o==="markdown"?"---":"------------"}function wG(){return{name:"hr",insertEmbedCommandItems:[{id:"insert-hr",name:R.t("dividingLine.type"),icon:zL,order:500,group:"common",subText:pn("insert-hr")}],handleInsertEmptyEmbed:async(n,e)=>{const{containerId:t,blockIndex:o}=e;return n.insertEmbed(t,o,CG,{})}}}function BG(n,e,t){const{data:o}=t;if(!o||o.embedType!=="dividing-line"||!ee(n,e))return null;const r={};return{blockData:{id:K(),type:"embed",embedType:"hr",embedData:r}}}function EG(){return{abstract:R.t("dividingLine.abstract")}}const uk={embedType:"hr",createEmbedContent:yG,convertTo:kG,getOptions:wG,convertFrom:BG,getBlockProperties:EG},ioe="",soe="",xG={media:{upload:{failed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>'},load:{failed:'<div class="line-1">{name}\u52A0\u8F7D\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>'},audio:{menuItem:"\u97F3\u9891",abstract:"\u97F3\u9891"},video:{menuItem:"\u89C6\u9891",abstract:"\u89C6\u9891"}}},IG={media:{upload:{failed:'<div class="line-1">{name} upload failed</div><div class="line-2">The network service is abnormal, you can <span class="retry-upload">Try again</span></div>'},load:{failed:'<div class="line-1">{name} loading failed</div><div class="line-2">The network service is abnormal, you can <span class="retry-upload">Try again</span></div>'},audio:{menuItem:"Audio",abstract:"Audio"},video:{menuItem:"Video",abstract:"Video"}}},TG={media:{upload:{failed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>'},load:{failed:'<div class="line-1">{name}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>'},audio:{menuItem:"\u97F3\u58F0",abstract:"\u97F3\u58F0"},video:{menuItem:"\u52D5\u753B",abstract:"\u52D5\u753B"}}};R.mergeLang({"zh-CN":xG,"en-US":IG,"ja-JP":TG});var Vo=(n=>(n.AUDIO="audio",n.VIDEO="video",n))(Vo||{}),$u=(n=>(n.Empty="empty",n.Progress="progress",n.Error="error",n))($u||{});const dk=10*1024*1024,DG=["wav","mp3","aac","ogg","webm","flac"],SG=["ogg","mp4","webm"],LG=()=>{};function hk(n){var h,p,A,v,B,D;const e=(h=n.getComponentOptions("media"))!=null?h:{},{allowedMedias:t,maxSize:o,callbacks:r}=e,i=(p=t==null?void 0:t.audio)!=null?p:DG,s=(A=t==null?void 0:t.video)!=null?A:SG,l=(v=o==null?void 0:o.audio)!=null?v:dk,a=(B=o==null?void 0:o.video)!=null?B:dk,d=(D=r==null?void 0:r.onError)!=null?D:LG;return{allowedMedias:{audio:i,video:s},maxSize:{audio:l,video:a},callbacks:{onError:d}}}function MG(n,e){const t=i=>i.map(s=>`.${s}`).join(","),{allowedMedias:o}=hk(n),r=o[e];return r?t(r):"*"}function RG(n,e,t){const{maxSize:o,callbacks:r,allowedMedias:i}=hk(e),{[t]:s}=o,{[t]:l}=i;if(s&&n.size>s){const d=new Error("media is too large");throw d.code=`MaxMediaSize-${t}`,r!=null&&r.onError&&(r==null||r.onError(e,d)),d}const a=Aa(n.name);if(l&&!l.includes(a)){const d=new Error(`media file is not allowed: ${a}`);throw d.code="NotAllowedFile",r!=null&&r.onError&&(r==null||r.onError(e,d)),d}}function OG(n){return n===$u.Empty||n===$u.Error}const Pt=S("media");class _G extends bt.TypedEmitter{constructor(t){super();m(this,"mediaContainer",null);m(this,"media",null);m(this,"abstract",null);m(this,"handleMediaLoadError",(t,o)=>{if(!o.target||!(o.target instanceof Node)||!(o.target instanceof Element?o.target:o.target.parentElement))return;const i=oe(o.target);if(!i||!i.contains(this.mediaContainer))return;const s=this.renderError();this.updateMediaContent(s),this.emit("mediaError",t,"load_error",ie(i))});m(this,"handleUploadFile",async t=>{g(Pt,this.abstract,"no abstract"),g(Pt,this.mediaContainer,"The media element not exist");const{editor:o}=this.options,r=oe(this.mediaContainer);g(Pt,r,"The block element not exist");const i=o.getBlockData(r);try{const{resourceId:s}=await o.doc.uploadResource(t,{onProgress:p=>{this.renderProgress(p,t)}}),{name:l,type:a,size:d}=t,h={...i,embedData:{...i.embedData,src:s,fileName:l,fileSize:d,fileType:a}};o.updateBlockData(r,h)}catch(s){Pt.error(s),this.emit("mediaError",o,"upload_error",i.id),this.renderRetry(t)}te(r,"media-block-uploading")});m(this,"destroy",()=>{this.mediaContainer=null});this.options=t}bindMediaEvent(){const{editor:t}=this.options;this.media&&t.domEvents.addEventListener(this.media,"error",this.handleMediaLoadError)}unbindMediaEvent(){const{editor:t}=this.options;this.media&&t.domEvents.removeEventListener(this.media,"error",this.handleMediaLoadError)}updateMediaContent(t){g(Pt,this.mediaContainer,"The media element not exist"),this.mediaContainer.innerHTML="",this.mediaContainer.append(t)}renderError(){g(Pt,this.abstract,"no abstract");const{editor:t,createMediaElement:o}=this.options,{mediaIcon:r,mediaName:i}=this.abstract;g(Pt,this.mediaContainer,"The media element not exist");const s=oe(this.mediaContainer);g(Pt,s,"The block element not exist");const l=t.getBlockData(s),a=l.embedData.src,d=w("div",["media-error","embed-selected-content","embed-hover-content"],null),h=w("span",["media-error-icon"],d);h.innerHTML=r;const p=w("div",[],d);p.innerHTML=R.t("media.load.failed",{name:i}),d.appendChild(p);const A=p.querySelector(".retry-upload");return g(Pt,A,"The element not exist"),t.domEvents.addEventListener(A,"click",(v,B)=>{const D=w("div",["media-element"],null),I=this.getResourceUrl(a),_=o(v,D,l,I);this.unbindMediaEvent(),this.media=_,this.bindMediaEvent(),this.updateMediaContent(D)}),this.setFullScreen(),d}renderRetry(t){g(Pt,this.abstract,"no abstract");const{editor:o}=this.options,{mediaIcon:r,mediaName:i}=this.abstract,s=w("div",["media-error","embed-selected-content","embed-hover-content"],null),l=w("span",["media-error-icon"],s);l.innerHTML=r;const a=w("div",[],s);a.innerHTML=R.t("media.upload.failed",{name:i}),s.appendChild(a);const d=a.querySelector(".retry-upload");g(Pt,d,"The element not exist"),o.domEvents.addEventListener(d,"click",()=>{o.readonly||(g(Pt,this.abstract,"no abstract"),this.handleUploadFile(t))}),this.updateMediaContent(s),this.setFullScreen()}renderProgress(t,o){g(Pt,this.mediaContainer,"The media element not exist");const r=this.mediaContainer.querySelector(":scope .media-progress"),i=t===-1||t===100?100:t;if(r){const{updateProgressElement:s}=this.options;s(r,i)}else{const{createProgressElement:s}=this.options,l=oe(this.mediaContainer);g(Pt,l,"The element not exist"),W(l,"media-block-uploading");const a=w("div",["media-progress"],null);s(a,i,o),this.updateMediaContent(a)}this.setFullScreen()}renderMediaElement(t){g(Pt,this.mediaContainer,"The media element not exist");const o=this.mediaContainer.querySelector(":scope > .media-element"),{createMediaElement:r,updateMediaElement:i,editor:s}=this.options,l=this.getResourceUrl(t.embedData.src);if(o){const a=i(s,o,t,l);this.unbindMediaEvent(),this.media=a,this.bindMediaEvent()}else{const a=w("div",["media-element"],null),d=r(s,a,t,l);this.unbindMediaEvent(),this.media=d,this.bindMediaEvent(),this.updateMediaContent(a)}}renderEmpty(t){g(Pt,this.abstract,"no abstract"),g(Pt,this.mediaContainer,"The media element not exist");const o=w("div",["media-empty","embed-selected-content","embed-hover-content"],this.mediaContainer);o.innerHTML=this.abstract.mediaIcon,this.updateMediaContent(o);const{editor:r}=this.options;r.findBlockById(t.id)&&this.emit("mediaError",r,"empty",t.id),this.setFullScreen()}getResourceUrl(t){const{editor:o}=this.options;return o.doc.buildResourceUrl(t)}setFullScreen(){g(Pt,this.mediaContainer,"The media element not exist"),W(this.mediaContainer,"full-screen")}removeFullScreen(){g(Pt,this.mediaContainer,"The media element not exist"),te(this.mediaContainer,"full-screen")}updateBlockAlign(t,o){const r=oe(o);g(Pt,r,"The block element not exist");const{align:i}=t;t.embedType==="video"&&(r.hasAttribute("data-style-align")&&r.removeAttribute("data-style-align"),r.setAttribute("data-style-align",i))}render(t,o){const{src:r}=t.embedData;(!this.mediaContainer||!o.contains(this.mediaContainer))&&(this.mediaContainer=w("div",["media"],o)),this.updateBlockAlign(t,o),OG(r)?r===$u.Empty&&this.renderEmpty(t):this.renderMediaElement(t)}setAbstract(t){this.abstract=t}}S("media-embed");const FG="left";class fk{constructor(){m(this,"handleInsertEmptyEmbed",async(e,t)=>{var p;const{containerId:o,blockIndex:r}=t;let i;(p=t.data)!=null&&p.file&&(i=t.data.file);const s=MG(e,this.embedType);if(i=i!=null?i:await zl(s,{}),!i)return null;const{mediaType:l}=this.getAbstract();try{RG(i,e,l)}catch{return null}const a={id:K(),type:"embed",embedType:this.embedType,embedData:{src:$u.Empty}};l==="video"&&(a.align=FG);const d=e.insertBlock(o,r,a);return await this.getMedia(e,a.id).handleUploadFile(i),d})}getMedia(e,t){const o=e.addCustom(`media-${t}`,()=>new _G({editor:e,createMediaElement:this.createMediaElement,updateMediaElement:this.updateMediaElement,createProgressElement:this.createProgressElement,updateProgressElement:this.updateProgressElement}));return o.setAbstract({...this.getAbstract()}),o}getOptions(){const{menuItem:e,mediaIcon:t,mediaName:o,order:r,group:i}=this.getAbstract();return{name:o,insertEmbedCommandItems:[{id:`insert-${this.embedType}`,name:e,icon:t,order:r,group:i,subText:pn(`insert-${this.embedType}`)}],handleInsertEmptyEmbed:this.handleInsertEmptyEmbed}}createEmbedContent(e,t,o){const{id:r}=o;this.getMedia(e,r).render(o,t)}handleUpdateBlock(e,t,o){const{id:r}=o,i=this.getMedia(e,r),s=Re(t);return i.render(o,s),!0}handleDeleteBlock(e,t){const o=t.id,r=this.getMedia(e,o);r.removeAllListeners(),r.destroy()}convertTo(e,t,o,r){const i=t.embedData,s=e.doc.buildResourceUrl(i.src,{withToken:!0});return r==="html"?`<${i.type} src="${s}" />`:r==="markdown"?``:s}}function mk(n,e){const t=w("div",["uploading-progress-mask"],n),o=w("div",["uploading-progress-bar"],t),r=w("div",["uploading-progress-bar-value"],o);r.style.width=`${e}%`}function gk(n,e){const t=n.querySelector(".uploading-progress-bar-value");t&&(t.style.width=`${e}%`)}const PG=S("media-audio");class NG extends fk{constructor(){super(...arguments);m(this,"embedType",Vo.AUDIO);m(this,"updateProgressElement",gk);m(this,"createMediaElement",(t,o,r,i)=>{const s=w("div",["audio-container","embed-hover-content","embed-selected-content"],o),l=w("audio",[],s);return l.innerHTML="Your browser does not support the <code>audio</code> element.",l.controls=!0,l.src=i,setTimeout(()=>{this.getMedia(t,r.id).setFullScreen()}),l})}getAbstract(){return{mediaIcon:HL,mediaName:R.t(`media.${Vo.AUDIO}.menuItem`),menuItem:R.t(`media.${Vo.AUDIO}.menuItem`),order:800,mediaType:Vo.AUDIO,group:"common"}}getBlockProperties(){return{abstract:`${R.t(`media.${Vo.AUDIO}.abstract`)}`}}updateMediaElement(t,o,r,i){const s=o.querySelector(":scope .audio-container > audio");return g(PG,s,"The media element not exist"),s.src!==i&&(s.src=i),s}createProgressElement(t,o){const r=w("audio",[],t);r.innerHTML="Your browser does not support the <code>audio</code> element.",r.controls=!0,r.src="about:blank",mk(t,o)}}const pk=new NG;S("video-resizer");function Ck(n){return n&&Lt(n)&&Un(n)==="video"}const $G=50;class G2{constructor(e){m(this,"currentResizableElement",null);m(this,"resizing",!1);m(this,"handleHoveringBlockChange",(e,t)=>{if(!this.resizing&&(t&&Ck(t)&&this.disableBlockResize(t),e&&Ck(e))){const o=this.getVideoElement(e);if(!o)return;this.enableBlockResize(e,o)}});m(this,"handleResizing",(e,t)=>{if(this.resizing=!0,!this.currentResizableElement)return;const o=e.getBlock();if(!o)return;const r=o.getBoundingClientRect().width,i=Math.min(Math.max(t.width,$G),r);this.currentResizableElement.style.width=`${i}px`});m(this,"handleResized",e=>{this.resizing=!1;const t=e.getBlock();if(!this.currentResizableElement||!t)return;const o=this.editor.getBlockData(t),{width:r}=this.currentResizableElement.getBoundingClientRect();this.editor.updateBlockData(t,{...o,width:r})});this.editor=e,pt.get(e).addListener("change",this.handleHoveringBlockChange)}destroy(){this.currentResizableElement=null,pt.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}getVideoElement(e){return Re(e).querySelector(":scope .video-container > video")}updateResizer(e){const t=this.editor.findCustom(`${ie(e)}-resizer`);t&&t.updateResizer()}disableBlockResize(e){const t=this.editor.findCustom(`${ie(e)}-resizer`);t&&t.disableResize()}enableBlockResize(e,t){const o=this.editor.addCustom(`${ie(e)}-resizer`,()=>new wu(this.editor,{resize:["top-left","top-right","bottom-left","bottom-right"]}));o.enableResize(e,t),o.removeListener("resizing",this.handleResizing),o.removeListener("resized",this.handleResized),o.addListener("resizing",this.handleResizing),o.addListener("resized",this.handleResized),this.currentResizableElement=t}}const HG=S("video");class jG extends fk{constructor(){super(...arguments);m(this,"embedType",Vo.VIDEO);m(this,"updateProgressElement",gk);m(this,"createMediaElement",(t,o,r,i)=>{const s=w("div",["video-container","embed-selected-content","drag-preview-element"],o),l=w("video",[],s);return l.innerHTML="Your browser does not support the <code>video</code> element.",l.controls=!0,l.src=i,l.addEventListener("canplay",()=>{t.addCustom("video-resizer",()=>new G2(t)),this.getMedia(t,r.id).removeListener("mediaError",this.handleMediaError),this.getMedia(t,r.id).addListener("mediaError",this.handleMediaError),this.getMedia(t,r.id).removeFullScreen()}),r.width&&(l.style.width=`${r.width}px`),l});m(this,"createProgressElement",(t,o,r)=>{const i=w("video",["progress-video"],t);i.innerHTML="Your browser does not support the <code>audio</code> element.",i.controls=!0,mk(t,o),Ul(r).then(s=>{const l=t.querySelector(".progress-video");l&&Um(t)&&(l.src=s)})})}getAbstract(){return{mediaName:R.t(`media.${Vo.VIDEO}.menuItem`),mediaIcon:jL,menuItem:R.t(`media.${Vo.VIDEO}.menuItem`),order:700,mediaType:Vo.VIDEO,group:"common"}}getBlockProperties(){return{abstract:`[${R.t(`media.${Vo.VIDEO}.abstract`)}]`}}handleMediaError(t,o,r){const i=t.addCustom("video-resizer",()=>new G2(t)),s=t.getBlockById(r);i.disableBlockResize(s)}updateMediaElement(t,o,r,i){const s=o.querySelector(":scope .video-container > video");g(HG,s,"The media element not exist"),s.src!==i&&(s.src=i),r.width?s.style.width=`${r.width}px`:s.style.width="";const l=t.getBlockById(r.id);return setTimeout(()=>{t.addCustom("video-resizer",()=>new G2(t)).updateResizer(l)}),s}}const Ak=new jG,bk=[xf,Sf,U0,E9],Z2=[z2,Z8,rk,lk,ak,F9,uk,Ak,pk,X7,j8,Yz],vk=[T0,F2,u8];function UG(n,e,t){var r,i,s;const o=Ha(n,e,{components:{blocks:[...bk,...((r=t==null?void 0:t.components)==null?void 0:r.blocks)||[]],embeds:[...Z2,...((i=t.components)==null?void 0:i.embeds)||[]],boxes:[...vk,...((s=t.components)==null?void 0:s.boxes)||[]],textRenders:[new C0],options:{...t.componentsOptions}}});return o.readonly=!0,o.addCustom("heading-collapse",()=>new F8(o)),o.addCustom("editor-tooltip",()=>new bf(o)),o.addListener("clickLink",(l,a,d)=>{var p;if((p=t==null?void 0:t.events)!=null&&p.onClickLink){t.events.onClickLink(l,a,d);return}const h=d.getAttribute("link");h&&(l.readonly||a.ctrlKey||a.metaKey)&&window.open(h,"_blank")}),o}class yk{constructor(e){this.createOptions=e,e.lang&&R.setLang(e.lang)}createHistoryEditor(e,t){return UG(e,t,this.createOptions)}}S("create-editor");function kk({root:n,childDoc:e,doc:t}){e.uploadResource=t.uploadResource.bind(t),e.buildResourceUrl=t.buildResourceUrl.bind(t);const o=Ha(n,e,{shortcuts:[Lh],components:{blocks:[xf,Sf],decorators:[new Lf],embeds:[X7,z2,Z8,rk,lk,ak,F9,uk,Ak,pk],boxes:[T0,F2],options:{image:{defaultAlign:"left"}}}});return o.input.addHandler(new If),o.input.addHandler(new c2(o)),o.input.addHandler(new f2(o)),o.input.addHandler(new tz(o)),o.input.addHandler(new Ff),o.addCustom("image-paste-handler",()=>new l2(o)),o}function zG(n,e){const t=Array.from(n.rootContainer.querySelectorAll(`[comment-${e.toLocaleLowerCase()}="${e}"]`)),o=new Set;t.forEach(r=>{const i=oe(r);i&&o.add(i)}),o.forEach(r=>{nz(n,r,e)})}class VG{constructor(e){m(this,"listeners",new Set);m(this,"doc");this.editor=e,this.doc=this.editor.doc.externalDoc,this.doc.registerCallback(this)}getComments(){return this.doc.getComments()}getComment(e){return this.doc.getComment(e)}getCommentDoc(e){return this.doc.getCommentDoc(e)}localCreateComment(e,t){this.doc.localCreateComment(e,t)}localDeleteComment(e){const t=this.getComment(e);this.doc.localDeleteComment(e);const o=t.groupId;this.getComments().filter(i=>i.groupId===o).length===0&&zG(this.editor,o)}localUpdateComment(e,t){this.doc.localUpdateComment(e,t)}onCreateComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onCreateComment(e,t))}onDeleteComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onDeleteComment(e,t))}onUpdateComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onUpdateComment(e,t))}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}createCommentEditor(e,t){var r,i;const o=kk({root:e,childDoc:t,doc:this.doc});if((r=this.editor.options.componentsOptions)!=null&&r.mention){const s=this.editor.options.componentsOptions.mention;o.addCustom("mention",()=>new _2(o,{...s,enableFirstBlock:!0}))}if((i=this.editor.options.componentsOptions)!=null&&i.comment){const s=this.editor.options.componentsOptions.comment;s.onCommentEditorClick&&o.addListener("click",s.onCommentEditorClick)}return o}allowEdit(e){return e.userId===this.doc.getUser().userId}}class WG{constructor(e,t){m(this,"listeners",new Set);this.editor=e,this.localDoc=t}get doc(){return this.localDoc.toJSON()}getComments(){return Object.values(this.doc.comments)}getComment(e){return this.doc.comments[e]}getCommentDoc(e){const t=this.doc.comments[e];return bp(t)}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}localCreateComment(e,t){}localDeleteComment(e){}localUpdateComment(e,t){}createCommentEditor(e,t){var r,i;const o=kk({root:e,childDoc:t,doc:this.localDoc});if((r=this.editor.options.componentsOptions)!=null&&r.mention){const s=this.editor.options.componentsOptions.mention;o.addCustom("mention",()=>new _2(o,{...s,enableFirstBlock:!0}))}if((i=this.editor.options.componentsOptions)!=null&&i.comment){const s=this.editor.options.componentsOptions.comment;s.onCommentEditorClick&&o.addListener("click",s.onCommentEditorClick)}return o}allowEdit(e){return e.userId===this.localDoc.getUser().userId}}const qG={placeholder:{common:{title:"\u8BF7\u8F93\u5165\u6807\u9898",readonlyTitle:"\u8BF7\u8F93\u5165\u6807\u9898",content:"\u70B9\u51FB + \uFF0C\u6216\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6",contentInTable:"\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6"},local:{readonlyTitle:"\u672A\u547D\u540D"}},copyCutProperty:{copy:"\u590D\u5236",cut:"\u526A\u5207",unsafeEnvTips:"\u7531\u4E8E\u5F53\u524D http \u8BBF\u95EE\u73AF\u5883\u4E0B\u7684\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528\u5FEB\u6377\u952E({shortCut}) {operation}"}},GG={placeholder:{common:{title:"Enter a title",readonlyTitle:"Enter a title",content:'Click "+", or enter "/" to insert components quickly',contentInTable:'Enter "/" to insert components quickly'},local:{readonlyTitle:"Untitled"}},copyCutProperty:{copy:"copy",cut:"cut",unsafeEnvTips:"Due to the limitations of the current http access environment, please use the shortcut ({shortCut}) {operation}"}},ZG={placeholder:{common:{title:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",readonlyTitle:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",content:"\u300C+\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u304B\u3001\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059",contentInTable:"\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059"},local:{readonlyTitle:"\u7121\u984C"}},copyCutProperty:{copy:"\u8907\u88FD",cut:"\u5207\u308B",unsafeEnvTips:"HTTP\u74B0\u5883\u306E\u5236\u7D04\u306B\u3088\u308A\u3001{operation}\u3059\u308B\u306B\u306F\u3001\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8({shortCut}) \u3092\u3054\u4F7F\u7528\u304F\u3060\u3055\u3044"}};R.mergeLang({"zh-CN":qG,"en-US":GG,"ja-JP":ZG});const QG="UEsDBBQABgAIAAAAIQBk9WPugQEAACkGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0lMtqwzAQRfeF/oPRtsRKuiilxMmij2UbaAr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MAAGRvY1Byb3BzL2FwcC54bWxQSwECLQAUAAYACAAAACEAiD+lv+EAAABVAQAAGAAAAAAAAAAAAAAAAAAHNwAAY3VzdG9tWG1sL2l0ZW1Qcm9wczEueG1sUEsBAi0AFAAGAAgAAAAhAMEnywi2AAAAIQEAABMAAAAAAAAAAAAAAAAARjgAAGN1c3RvbVhtbC9pdGVtMS54bWxQSwECLQAUAAYACAAAACEAdD85esIAAAAoAQAAHgAAAAAAAAAAAAAAAABVOQAAY3VzdG9tWG1sL19yZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAOuAYExTAwAAjw4AABIAAAAAAAAAAAAAAAAAWzsAAHdvcmQvZm9udFRhYmxlLnhtbFBLBQYAAAAADwAPANQDAADePgAAAAA=",YG=()=>Dm(QG);async function JG(n){return new Promise((e,t)=>{const o=new Image;o.onload=()=>{e({width:o.naturalWidth,height:o.naturalHeight})},o.onerror=t,o.src=n})}async function wk(n,e){if(n.width&&n.height)return{width:n.width,height:n.height,buffer:e};const t=await Ul(new File([e],"",{})),o=await JG(t);return o.width===void 0||o.height===void 0?{width:345,height:230,buffer:e}:n.width||n.height?{width:n.width||o.width*n.height/o.height,height:n.height||o.height*n.width/o.width,buffer:e}:{width:o.width,height:o.height,buffer:e}}function KG(n,e){let t=n.filter(s=>s!=null);const o=e-(t.length-1)*20,r=.87,i=t.reduce((s,l)=>s+l.width,0);return i>o&&(t=t.map(s=>({width:s.width*o/i,height:s.height*o/i,buffer:s.buffer}))),t.map(s=>({width:s.width*r,height:s.height*r,buffer:s.buffer}))}function Bk(n=[0,1,2,3,4,5,6,7],e=1){return n.map(t=>{let o;switch(t%3){case 0:o=ge.LevelFormat.DECIMAL;break;case 1:o=ge.LevelFormat.LOWER_LETTER;break;default:o=ge.LevelFormat.LOWER_ROMAN;break}return{level:t,format:o,text:`%${t+1}. `,alignment:ge.AlignmentType.START,start:e,style:{paragraph:{indent:{left:ge.convertInchesToTwip(.3*(t+1)),hanging:ge.convertInchesToTwip(.2)}}}}})}function XG(){return[0,1,2,3,4,5,6,7].map(n=>{let e;switch(n%3){case 0:e="\u2022";break;case 1:e="\u25E6";break;default:e="\u25AA";break}return{level:n,format:ge.LevelFormat.BULLET,text:e,alignment:ge.AlignmentType.START,style:{paragraph:{indent:{left:ge.convertInchesToTwip(.3*(n+1)),hanging:ge.convertInchesToTwip(.2)}}}}})}function eZ(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:ge.LevelFormat.BULLET,text:"\u2611",alignment:ge.AlignmentType.START,style:{paragraph:{indent:{left:ge.convertInchesToTwip(.3*(n+1)),hanging:ge.convertInchesToTwip(.2)}}}}))}function tZ(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:ge.LevelFormat.BULLET,text:"\u2610",alignment:ge.AlignmentType.START,style:{paragraph:{indent:{left:ge.convertInchesToTwip(.3*(n+1)),hanging:ge.convertInchesToTwip(.2)}}}}))}var Hu=(n=>(n.NUMBERING="number-numbering-reference",n.BULLET="number-bullet-reference",n.CHECKED="checked-bullet-reference",n.UNCHECKED="unchecked-bullet-reference",n))(Hu||{});const nZ=[{levels:Bk(),reference:"number-numbering-reference"},{levels:XG(),reference:"number-bullet-reference"},{levels:eZ(),reference:"checked-bullet-reference"},{levels:tZ(),reference:"unchecked-bullet-reference"}];function oZ(n){switch(n){case"style-color-0":return"d83931";case"style-color-1":return"de7802";case"style-color-2":return"dc9b04";case"style-color-3":return"2ea121";case"style-color-4":return"245bdb";case"style-color-5":return"6425d0";case"style-color-6":return"8f959e";default:return}}function rZ(n){switch(n){case"style-bg-color-1":case"style-bg-color-2":case"style-bg-color-8":case"style-bg-color-9":return"yellow";case"style-bg-color-0":case"style-bg-color-5":return"magenta";case"style-bg-color-3":return"green";case"style-bg-color-4":case"style-bg-color-11":return"blue";case"style-bg-color-6":return"lightGray";case"style-bg-color-7":return"red";case"style-bg-color-10":return"darkGreen";case"style-bg-color-12":return"darkMagenta";case"style-bg-color-13":return"darkGray";default:return}}function iZ(n){switch(n){case"style-bg-color-0":return"fbbab6";case"style-bg-color-1":return"ffdcb0";case"style-bg-color-2":return"fff7a0";case"style-bg-color-3":return"ceefc5";case"style-bg-color-4":return"d1ddfb";case"style-bg-color-5":return"d9cbf8";case"style-bg-color-6":return"eaeaea";case"style-bg-color-7":return"fe837c";case"style-bg-color-8":return"ffbd6a";case"style-bg-color-9":return"ffe662";case"style-bg-color-10":return"a8f393";case"style-bg-color-11":return"98b5ff";case"style-bg-color-12":return"b394f8";case"style-bg-color-13":return"b1b1b1";default:return}}const sZ=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/;function Ek(n){if(typeof n=="string"&&n.length>0){if(n[0]==="#")return n.substring(1);const e=n.match(sZ);if(e){const t=s=>{let l=Number(s).toString(16);return l.length<2&&(l=`0${l}`),l},o=t(e[1]),r=t(e[2]),i=t(e[3]);return`${o}${r}${i}`}if(n==="red")return"FF0000";if(n==="green")return"00FF00";if(n==="blue")return"0000FF"}}function en(n,e){if(n&&n.attributes&&n.attributes[e])return n.attributes[e];if(n&&n.attributes&&n.attributes.box&&n.attributes.inputType&&e==="style-underline")return!0}function xk(n,e,t){for(let o=0;o<=t;++o){const r=`${e}${o}`;if(en(n,r))return r}}function r1(n,e,t){n.attributes=n.attributes||{},n.attributes[e]=t}function Q2(n){return n==="image"||n==="drawio"||n==="plantuml"||n==="mermaid"||n==="flowchart"}function Ik(n){return n&&n.startsWith("//")?`https:${n}`:n&&!n.startsWith("http://")&&!n.startsWith("https://")?`https://${n}`:n}function lZ(n){const e=en(n,"inlineStyle");if(e==null)return;const t=e.split(";");for(const o of t){const r=o.split(":");if(r.length!==2)continue;const i=r[0].trim().toLowerCase(),s=r[1].trim().toLowerCase();i==="font-size"&&r1(n,"inline-style-font-size",s),i==="color"&&r1(n,"inline-style-color",s),i==="background-color"&&r1(n,"inline-style-background-color",s),i==="font-family"&&r1(n,"inline-style-font-family",s)}}function cZ(n,e){if(e==null)return n==null?void 0:n.normal;if(n)return n[`heading${e}`]}function aZ(n){const e=`${en(n,"inline-style-font-size")}`;if(e&&e.indexOf("px")>0)return+e.replace(/px/g,"")}function uZ(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` ${n.attributes.text} `;if(n.attributes&&n.attributes.box&&n.attributes.inputType)return n.attributes.value?`${n.attributes.value}`:" "}function dZ(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` @${n.attributes.text} `}function hZ(n){return en(n,"inline-style-font-family")}function fZ(n){const e=en(n,"inline-style-background-color");return Ek(e)}function mZ(n){const e=en(n,"inline-style-color");return Ek(e)}function gZ(n){lZ(n);const e=en(n,"type")==="mention";return{box:n.attributes&&n.attributes.box?n.attributes:void 0,inlineCode:!!en(n,"style-code"),link:Ik(en(n,"link")),size:aZ(n),text:e?dZ(n):uZ(n)||n.insert,bold:!!en(n,"style-bold"),underline:!!en(n,"style-underline"),italics:!!en(n,"style-italic"),strike:!!en(n,"style-strikethrough"),superScript:!!en(n,"style-super"),subScript:!!en(n,"style-sub"),math:en(n,"type")==="math"?en(n,"src"):void 0,mention:e,fontFamily:hZ(n),background:fZ(n),color:e?"338fe5":oZ(xk(n,"style-color-",6))||mZ(n),highlight:xk(n,"style-bg-color-",13)}}function pZ(){return[new ge.Paragraph({border:{top:{color:"auto",style:ge.BorderStyle.DASHED,size:4,space:1}},spacing:{before:300}}),new ge.Paragraph({spacing:{line:0}})]}function CZ(){return new ge.Paragraph({children:[new ge.TextRun({text:"[\u89C6\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:ge.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function AZ(){return new ge.Paragraph({children:[new ge.TextRun({text:"[\u97F3\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:ge.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function bZ(n,e){return new ge.Paragraph({children:[new ge.ExternalHyperlink({children:[new ge.TextRun({style:"Hyperlink",text:e||n})],link:n})]})}function Tk(n){if(n.heading!=null)return`Heading${n.heading}`}function Dk(n){if(n.alignment!=null){if(n.alignment==="center")return ge.AlignmentType.CENTER;if(n.alignment==="right")return ge.AlignmentType.RIGHT;if(n.alignment==="left")return ge.AlignmentType.LEFT}}function vZ(n){if(n.indent)return{left:ge.convertInchesToTwip(.3*n.indent-.2)};if(n.padding)return{left:ge.convertInchesToTwip(.3*n.padding)}}function yZ(n){return{type:ge.ShadingType.CLEAR,color:"FFFFFF",fill:n}}function kZ(n){const e=n.split(",");if(e.length!==0)return e[0].trim()}function Sk(n,e){let t;t=n.inlineCode?"InlineCode":void 0,t=n.link?"Hyperlink":t;const o=n.size||e,r=o!=null?Math.floor(o*1.5+.5):void 0;return new ge.TextRun({text:n.text,bold:n.bold||void 0,underline:n.underline?{type:ge.UnderlineType.SINGLE}:void 0,italics:n.italics||void 0,strike:n.strike||void 0,superScript:n.superScript||void 0,subScript:n.subScript||void 0,size:r,style:t,font:n.fontFamily?kZ(n.fontFamily):void 0,shading:n.background?yZ(n.background):void 0,color:n.color,highlight:rZ(n.highlight)})}function wZ(n,e){if(n.link)return new ge.ExternalHyperlink({children:[Sk(n,e)],link:n.link})}async function Lk(n,e,t,o,r){const i=await r(n,e,t);if(i==null)return;const s=await wk({width:o||0,height:0,src:t},i);return new ge.ImageRun({data:i,transformation:{width:s.width||100,height:s.height||20}})}function BZ(n){if(n.heading||n.heading)return n.heading}function EZ(n){if(n.align&&(n.align==="center"||n.align==="right"||n.align==="left"))return n.align}function xZ(n){if(n.textOnly===!0&&n.level!=null)return n.level}async function IZ(n,e){var o;const t=[];if(n.text&&Array.isArray(n.text)){for(let r=0;r<n.text.length;r++){const i=n.text[r];if(((o=i.attributes)==null?void 0:o.box)===!0&&e){const s=await e(i);if(s){n.text.splice(r+1,0,...s);continue}}t.push(gZ(i))}return t}}function TZ(n){if(n.type==="list"&&n.textOnly!==!0)return{checkbox:n.checkbox,groupId:n.groupId,ordered:!!n.ordered,level:n.level||1,start:n.start||0}}function DZ(n,e){if(n.type==="embed"&&n.embedType&&Q2(n.embedType)&&n.embedData&&n.embedData.src)return n.embedData.src.split("|").map(o=>{const r=e(o),i=n.embedData[`${r}_width`],s=n.embedData[`${r}_height`];return{src:o,width:i,height:s}})}function SZ(n){if(n.padding)return n.padding}function LZ(n){return!!(n.type==="embed"&&n.embedType&&Q2(n.embedType)&&n.embedData&&n.embedData.src)}async function i1(n,e,t){return{quoted:!!n.quoted,heading:BZ(n),alignment:EZ(n),indent:xZ(n),padding:SZ(n),texts:await IZ(n,t),list:TZ(n),images:DZ(n,e),border:LZ(n)}}async function MZ(n,e,t,o){const r=[];if(!n.children)return[];for(const i of n.children){const s=[];for(const l of e.blocks[i])s.push(await i1(l,t,o));r.push(s)}return r}const RZ=S("to-docx");function OZ(n,e){return Array(n).fill(0).map(()=>Array(e).fill(0).map(()=>({cellId:void 0,color:void 0,from:void 0,rowSpan:1,colSpan:1,width:0,originalWidth:void 0,align:void 0})))}function _Z(n,e,t,o){const r=!!n.hasColTitle,i=!!n.hasRowTitle,s=!!n.isStripeStyle,l="F5F8FB";for(let a=0;a<e;a++)for(let d=0;d<t;d++)(r&&d===0||i&&a===0||s&&a%2===1)&&(o[a][d].color=l)}function FZ(n){g(RZ,n.children,"no table children");const e=n.rows,t=n.cols,o=n.colsWidth;if(o)for(let s=0;s<o.length;s++)o[s]===0&&(o[s]=100);const r=OZ(e,t);let i=0;for(let s=0;s<e;++s)for(let l=0;l<t;++l){if(r[s][l].originalWidth=o?o[l]:void 0,r[s][l].from!==void 0)continue;const a=n.children[i];i+=1,r[s][l].cellId=a,r[s][l].color=iZ(n[`${a}_background`]),r[s][l].width=o?o[l]:100,r[s][l].align=n[`${a}_align`];const d=n[`${a}_rowSpan`]||1,h=n[`${a}_colSpan`]||1;if(r[s][l].rowSpan=d,r[s][l].colSpan=h,d>1||h>1){let p=0;for(let A=0;A<d;A++)for(let v=0;v<h;v++)A===0&&(p+=o?o[l+v]:80),!(A===0&&v===0)&&(r[s+A][l+v].from=[s,l]);r[s][l].width=p}}return _Z(n,e,t,r),r}async function PZ(n,e,t,o,r,i,s,l,a,d){async function h(v){if(l){const B=await l(r,i,v);if(B){await o.addDoc(n,B,d);return}}if(v.type==="text"||v.textOnly===!0){const B=await i1(v,s,a);await o.addTextBlock(B);return}if(v.type==="code"){const B=await MZ(v,t,s,a);await o.addCodeBlockObject(B);return}if(v.type==="list"&&v.textOnly!==!0){const B=await i1(v,s,a);await o.addListBlockObject(n,B);return}if(v.type==="embed"&&v.embedType){const B=v,D=B.embedData,I=B.embedType;if(Q2(I)){const _=await i1(v,s,a);await o.addImagesBlockObject(v,_,d)}else v.embedType==="hr"?o.addSeparatorBlock():v.embedType==="video"?o.addVideoPlaceholder():v.embedType==="audio"?o.addAudioPlaceholder():v.embedType==="webpage"?o.addHyperlinkParagraph(Ik(D.src),D.title):o.addOtherEmbedBlock(I,v.embedData);return}if(v.type==="table"){let B=[];if(v.colsWidth)B=v.colsWidth;else{const I=v.cols;B=new Array(I);for(let _=0;_<B.length;_++)B[_]=100;v.colsWidth=B}const D=FZ(v);await o.addTableMatrix(B,D,t),o.addEmptyParagraph()}}function p(v){const B=[];for(const{type:D,data:I}of v.embedData.exportSpec){if(D==="text"){const _={id:K(),text:[{insert:I}],type:"text"};B.push(_);continue}if(D==="image"){const _={id:K(),type:"embed",embedType:"image",align:"left",embedData:{src:I}};B.push(_);continue}if(D==="link"){const _={id:K(),type:"embed",embedType:"webpage",embedData:{src:I.url,title:I.title}};B.push(_);continue}}return B}function A(v){var B;return(B=v==null?void 0:v.embedData)!=null&&B.exportSpec?p(v):[v]}for(const v of e)for(const B of A(v))await h(B)}function NZ(){return{listMaxInst:1,listInstMap:{},listRefMap:{},levelConfigs:[]}}const $Z=S("to-docx");class HZ{constructor(e,t,o,r,i,s){m(this,"paragraphs");this.appId=e,this.docId=t,this.state=o,this.readImageFunc=r,this.convertBlocksFunc=i,this.defaultFontSize=s,this.paragraphs=[]}async addTextBlock(e){this.paragraphs.push(new ge.Paragraph({heading:Tk(e),alignment:Dk(e),children:await this.paragraphsFromBlockTexts(e),indent:vZ(e)}))}async addEmptyImagePlaceHolder(){this.paragraphs.push(new ge.Paragraph({text:`[${R.t("docx.imageExportFailed")}]`,shading:{type:ge.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}}))}async paragraphsFromBlockTexts(e){if(e.texts==null)return;const t=cZ(this.defaultFontSize,e.heading),o=[];for(const r of e.texts){if(r.link){const i=wZ(r,t);i&&o.push(i);continue}if(r.box&&r.box.type&&r.box.type==="br"){o.push(new ge.TextRun({text:"",break:1}));continue}if(r.box&&r.box.type&&r.box.type==="image"){const i=await Lk(this.appId,this.docId,r.box.src,r.box.width,this.readImageFunc);i&&o.push(i);continue}if(r.math){const i=await Lk(this.appId,this.docId,r.math,0,this.readImageFunc);i&&o.push(i);continue}o.push(Sk(r,t))}return o}async addCodeBlockObject(e){for(const t of e)for(const o of t){const r={style:ge.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new ge.Paragraph({style:"Code",border:{left:{...r},right:{...r},top:{...r},bottom:{...r}},children:await this.paragraphsFromBlockTexts(o)}))}}async addListBlockObject(e,t){if(t.list==null)return;let o;const r=t.list.checkbox?`${e}-${t.list.groupId}-${t.list.checkbox}`:`${e}-${t.list.groupId}`;if(this.state.listInstMap[r])o=this.state.listInstMap[r];else if(o=this.state.listMaxInst,this.state.listMaxInst+=1,this.state.listInstMap[r]=o,t.list.start>0&&t.list.ordered){const s=`number-numbering-reference-${o}`,l=Bk([t.list.level-1],t.list.start);this.state.levelConfigs.push({levels:l,reference:s,inst:o}),this.state.listRefMap[r]=s}else t.list.ordered?this.state.listRefMap[r]=Hu.NUMBERING:t.list.checkbox&&t.list.checkbox==="checked"?this.state.listRefMap[r]=Hu.CHECKED:t.list.checkbox&&t.list.checkbox==="unchecked"?this.state.listRefMap[r]=Hu.UNCHECKED:this.state.listRefMap[r]=Hu.BULLET;const i=Tk(t);t.texts&&this.paragraphs.push(new ge.Paragraph({heading:i,children:await this.paragraphsFromBlockTexts(t),numbering:{reference:this.state.listRefMap[r],level:t.list.level-1,instance:o}}))}imageDimWithBufferToImageRun(e){return new ge.ImageRun({data:e.buffer,transformation:{width:e.width,height:e.height}})}async addImagesBlockObject(e,t,o){if(t.images==null){if(e.type==="embed"&&e.embedType==="image"){const{src:a}=e.embedData;a||this.addEmptyImagePlaceHolder()}return}const r=[],i=await Promise.all(t.images.map(async a=>{const d=await this.readImageFunc(this.appId,this.docId,a.src);if(d)return wk(a,d);r.push(a.src)})),s=KG(i,o),l={style:ge.BorderStyle.SINGLE,color:"#DEDEDE"};s.length&&this.paragraphs.push(new ge.Paragraph({border:t.border?{left:{...l},right:{...l},top:{...l},bottom:{...l}}:void 0,alignment:Dk(t)||ge.AlignmentType.CENTER,children:s.map(a=>this.imageDimWithBufferToImageRun(a)).flatMap((a,d,h)=>a==null?[]:h.length-1!==d?[a,new ge.TextRun({text:" "})]:a)})),r.forEach(a=>{this.addHyperlinkParagraph(a)})}addSeparatorBlock(){pZ().forEach(e=>this.paragraphs.push(e))}addEmptyParagraph(){this.paragraphs.push(new ge.Paragraph(""))}addVideoPlaceholder(){this.paragraphs.push(CZ())}addAudioPlaceholder(){this.paragraphs.push(AZ())}addHyperlinkParagraph(e,t){e!=null&&this.paragraphs.push(bZ(e,t))}async addTableMatrix(e,t,o){const r=e.map(i=>i!==0?i*15:1500);this.paragraphs.push(new ge.Table({rows:await this.generateTableRows(t,o),columnWidths:r}))}async generateRowCells(e,t){const o=[];for(const r of e){const i=r.cellId;if(i===void 0)continue;const s=r.width*.9;o.push(new ge.TableCell({children:await this.convertBlocksFunc(i,t.blocks[i],t,this.appId,this.docId,this.state,s),columnSpan:r.colSpan,rowSpan:r.rowSpan,width:{type:ge.WidthType.DXA,size:r.width*15},shading:r.color?{fill:r.color,type:ge.ShadingType.CLEAR,color:"auto"}:void 0}))}return o}async generateTableRows(e,t){const o=[];for(const r of e)o.push(new ge.TableRow({children:await this.generateRowCells(r,t)}));return o}async addDoc(e,t,o){const r=await this.convertBlocksFunc(e,t.blocks.root,t,this.appId,this.docId,this.state,o);r&&(this.paragraphs=this.paragraphs.concat(r))}async addOtherEmbedBlock(){}}class jZ{constructor(e,t,o,r,i,s,l,a){m(this,"convertBlocks",async(e,t,o,r,i,s,l=720)=>{const a=new HZ(r,i,s,this.readImage,this.convertBlocks,this.defaultFontSize);return await PZ(e,t,o,a,r,i,this.md5HexFunc,this.getDocByBlock,this.getTextsByBox,l||720),a.paragraphs});this.templateData=e,this.docData=t,this.md5HexFunc=o,this.readImage=r,this.defaultFontSize=i,this.getDocByBlock=s,this.getTextsByBox=l,this.backgroundImageOptions=a}async convert(e,t){return this.snapshot2docx(this.docData,e,t)}async snapshot2docx(e,t,o){const r=new ge.ImportDotx,i=this.templateData?await r.extract(this.templateData):void 0,s=e.blocks.root;g($Z,s,"data must have blocks");const l=NZ(),a=await this.convertBlocks("blocks",s,e,t,o,l),d=this.backgroundImageOptions?{default:new ge.Header({children:[new ge.Paragraph({children:[new ge.ImageRun(this.backgroundImageOptions)]})]})}:{},h=new ge.Document({numbering:{config:[...nZ,...l.levelConfigs]},sections:[{headers:d,children:a,properties:{page:{size:{width:12240,height:15840},margin:{top:1440,bottom:1440,left:1440,right:1440}}}}]},{template:i});return ge.Packer.toBlob(h)}}async function UZ(n,e,t,o){const r=n.doc.buildResourceUrl(o,{withToken:!0});let i=await p7(r);if(!i)return;if(i.type.indexOf("/svg")!==-1){const l=await f7(i);l&&(i=new File([l],i.name))}return await i.arrayBuffer()}async function zZ(n,e,t){const o=n.editorBlocks.getBlockClass(t.type);if(o.toStandardDoc)return o.toStandardDoc(n,t,e)}async function VZ(n,e){const t=e.attributes,o=n.editorBoxes.getBoxClass(t.type);if(o.toStandardText)return o.toStandardText(n,t)}async function WZ(n,e){let{template:t,download:o,backgroundImageOptions:r}=e!=null?e:{};t||(t=YG());const i=n.doc.toJSON(),s=(p,A,v)=>UZ(n,p,A,v),l=async(p,A,v)=>zZ(n,i,v),a=async p=>VZ(n,p),h=await new jZ(t,i,Pd.default,s,void 0,l,a,r).convert("_appId","_docId");if(o){const p=URL.createObjectURL(h),A=document.createElement("a");A.setAttribute("download",`${g7(n)}.docx`),A.setAttribute("href",`${p}`),A.click(),A.remove()}return h}const Y2=S("create-editor");async function qZ(n,e){var s,l,a,d,h,p,A,v,B,D,I,_,M,H;g(Y2,n,"app does not exists"),e.lang&&R.setLang(e.lang),Ii.level=(s=e.logLevel)!=null?s:ha.DEBUG;const t=e.onReauth?async()=>{var fe;const z=e.user.userId,q=e.docId,re=await((fe=e.onReauth)==null?void 0:fe.call(e,z,q,e.permission));return{userId:z,docId:q,permission:e.permission,appId:e.appId,token:re,displayName:e.user.displayName,avatarUrl:e.user.avatarUrl}}:void 0,o={auth:{appId:e.appId,docId:e.docId,userId:e.user.userId,permission:e.permission,token:e.token,displayName:e.user.displayName,avatarUrl:e.user.avatarUrl},serverUrl:e.serverUrl,reauthFunc:t,disableLogout:e.disableLogout},r=await Ka.load(o),i=Ha(n,r,{id:e.id,scrollContainer:e==null?void 0:e.scrollContainer,enableComments:e==null?void 0:e.enableComments,components:{blocks:[...bk,...((l=e==null?void 0:e.components)==null?void 0:l.blocks)||[]],embeds:[...Z2,...((a=e.components)==null?void 0:a.embeds)||[]],boxes:[...vk,...((d=e.components)==null?void 0:d.boxes)||[]],commandProviders:[new Gp,...((h=e.components)==null?void 0:h.commandProviders)||[]],decorators:[new Lf,new yp],insertions:[wg],blockHooks:[new t2,new W7,...((p=e.components)==null?void 0:p.blockHooks)||[]],textRenders:[new o8,new C0],options:{...e.componentsOptions}},shortcuts:[vz,DN,CH,O0,Ry,LO,S0,nV,Lh,...e.shortcuts||[]],colors:["#338FE5","#24B47E","#F0A100","#E52727","#9678D3","#2CB2AE","#EB6414","#8AAB3F"]});if(i.editorCommandProviders.registerCommandProvider(new Ar(i)),i.input.addHandler(new qV),i.input.addHandler(new If),i.input.addHandler(new Q_),i.input.addHandler(new hH),i.input.addHandler(new bu(i,{headingLevel:1,titlePlaceholder:R.t("placeholder.common.title"),contentPlaceholder:R.t("placeholder.common.content"),readonlyTitlePlaceholder:R.t("placeholder.common.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),i.input.addHandler(new Af(i,(A=e.componentsOptions)==null?void 0:A.quickMenu)),i.input.addHandler(new c2(i)),i.input.addHandler(new f2(i)),i.input.addHandler(new EN),i.input.addHandler(new Ff),i.doc.registerCallback(new GV(i)),i.addCustom("remote-cursor",()=>new Qb(i)),i.addCustom("block-menu",z=>new Z7(z)),i.addCustom("editor-tooltip",()=>new bf(i)),e!=null&&e.enableComments&&i.addCustom("editor-comments",z=>new n8(z,new VG(z))),i.addCustom("create-options",()=>new J5(i,e)),i.addCustom("drop-target",()=>new Su(i)),i.addCustom("list-to-mindmap",()=>new hf(i)),i.addCustom("list-to-mention",()=>new fW(i)),i.addCustom("mobile-helper",()=>new SW(i)),i.addCustom("code-caret",()=>new BN(i)),i.addCustom("image-paste-handler",()=>new l2(i)),(v=e.componentsOptions)!=null&&v.mention){const z=e.componentsOptions.mention;i.addCustom("mention",()=>new _2(i,z))}if(i.addCustom("heading-collapse",()=>new F8(i)),pc.register(i),Su.register(i),nl.register(i),Xi.register(i),i.addListener("clickLink",(z,q,re)=>{var Be;if((Be=e==null?void 0:e.events)!=null&&Be.onClickLink){e.events.onClickLink(z,q,re);return}const fe=re.getAttribute("link");fe&&(z.readonly||q.ctrlKey||q.metaKey)&&window.open(fe,"_blank")}),(D=(B=e.componentsOptions)==null?void 0:B.remoteCarets)!=null&&D.onUserChanged){const z=(_=(I=e.componentsOptions)==null?void 0:I.remoteCarets)==null?void 0:_.onUserChanged;i.doc.getRemoteUsers().on("change",q=>{z(i,q)})}return(H=(M=e.componentsOptions)==null?void 0:M.templates)!=null&&H.templates.length&&(i.addListener("docChanged",()=>{o1(i)}),i.addListener("resize",()=>{o1(i,{reset:!0})}),setTimeout(()=>{o1(i)},100)),i.doc.registerCallback({onError:async z=>{if(z.code==="ResetDoc"){Y2.error(`reset doc: ${z.message}`);const q=await Ka.load(o);i.doc.reset(q)}}}),i}function GZ(n){return n.toJSON!==void 0}async function ZZ(n,e,t){var i,s,l,a;g(Y2,n,"app does not exists");const o=GZ(e)?e:new np(e,{serverUrl:t.serverUrl||""});t.lang&&R.setLang(t.lang);const r=Ha(n,o,{id:t.id,scrollContainer:t==null?void 0:t.scrollContainer,components:{blocks:[xf,Sf,U0,E9],commandProviders:[new Gp],decorators:[new Lf,new yp],embeds:[...Z2,...((i=t.components)==null?void 0:i.embeds)||[]],boxes:[T0,F2,u8,...((s=t.components)==null?void 0:s.boxes)||[]],insertions:[wg],blockHooks:[new t2,...((l=t.components)==null?void 0:l.blockHooks)||[]],textRenders:[new o8,new C0],options:{...t.componentsOptions}},shortcuts:[O0,Ry,S0,Lh]});return r.editorCommandProviders.registerCommandProvider(new Ar(r)),r.input.addHandler(new If),r.input.addHandler(new bu(r,{headingLevel:1,titlePlaceholder:R.t("placeholder.common.title"),contentPlaceholder:R.t("placeholder.common.content"),readonlyTitlePlaceholder:R.t("placeholder.local.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),r.input.addHandler(new Af(r,(a=t.componentsOptions)==null?void 0:a.quickMenu)),r.input.addHandler(new c2(r)),r.input.addHandler(new f2(r)),r.input.addHandler(new Ff),r.addCustom("block-menu",d=>new Z7(d)),r.addCustom("editor-tooltip",()=>new bf(r)),r.addCustom("image-paste-handler",()=>new l2(r)),t!=null&&t.enableComments&&r.addCustom("editor-comments",d=>new n8(d,new WG(d,o))),r.addListener("clickLink",(d,h,p)=>{var v;if((v=t==null?void 0:t.events)!=null&&v.onClickLink){t.events.onClickLink(d,h,p);return}const A=p.getAttribute("link");A&&(d.readonly||h.ctrlKey||h.metaKey)&&window.open(A,"_blank")}),pc.register(r),r}function QZ(n,e){var a;const t=n.doc;if(!((a=t.getVersionHelper)==null?void 0:a.call(t)))throw new Error("the editor does not support to show versions");const r=n.getCustom("create-options");if(!r)throw new Error("the editor does not support to show versions");const i=r.getData(),s=new yk(i),l=n.addCustom("version-dialog",()=>new I8(n.doc,s));return l.show(e),l}b.tippy=zB,b.AnchorBox=A6,b.AuthError=Vh,b.AuthHeader=Ja,b.AutoScroll=Zd,b.BaseURLHeader=Wh,b.BasicCommands=y_,b.BlockExclusiveHook=W7,b.BlockLockerHook=t2,b.BlockLockerPasteHandler=Ff,b.BlockResizer=wu,b.BrBox=m6,b.CodeBlock=Sf,b.CodeLineBlock=U0,b.CodeTextDecorator=Lf,b.DefaultShortcuts=Lh,b.DocIdError=zS,b.DragDrop=dC,b.DrawioEmbed=z2,b.EditorBlocks=v4,b.EditorBoxes=p6,b.EditorCommandProviders=lb,b.EditorComplexBlockPosition=So,b.EditorComplexSelectionRange=or,b.EditorDecorators=k6,b.EditorEmbeds=k4,b.EditorInsertions=y6,b.EditorSimpleBlockPosition=jt,b.EditorSimpleSelectionRange=Zt,b.EmbedBlock=B4,b.EmbedBlockResizer=Fu,b.EnforceWithDocumentTitleHandler=bu,b.EventCallbacks=fa,b.FILL_CHAR=hI,b.FileExtError=VS,b.GroupOrder=D9,b.HeadingBlockScrollListener=lW,b.ImageBox=C6,b.InlineBoxCommandProvider=P9,b.InputtingInsertion=b6,b.LocalDoc=np,b.LogLevel=ha,b.Logger=Ii,b.MIN_DISTANCE_THRESHOLD=aC,b.ManualCloseDialog=ru,b.ManualMenu=zs,b.ManualToolbar=ou,b.MarkdownInputHandler=If,b.MaxUserError=mp,b.Mindmap=f0,b.OnesEditorAutoSuggest=Np,b.OnesEditorCustomDataWrapper=J5,b.OnesEditorExclusiveBlock=Xi,b.OnesEditorHoveringBlock=pt,b.OnesEditorQuickMenu=Af,b.OnesEditorToc=Pu,b.OnesEditorTocProvider=nl,b.OnesEditorToolbar=pc,b.OnesEditorTooltip=bf,b.OnesEditorVersionsDialog=I8,b.PermissionError=US,b.Popup=Xa,b.RemoteCarets=Qb,b.RemoteCaretsDecorator=yp,b.RemoteCaretsInsertion=wg,b.RemoteUsers=Fh,b.RequestReloadError=Ya,b.RichText=ln,b.ShareDBDoc=Ka,b.ShareDBDocVersionsProvider=yk,b.SimpleCache=X5,b.StandardEmbedBlockCommands=I2,b.TEXT_STYLE_BACKGROUND_COLOR_PREFIX=fg,b.TEXT_STYLE_COLOR_PREFIX=hg,b.TableBlock=xf,b.TableBlockCommandProvider=Gp,b.TableShortcuts=O0,b.TextBlock=In,b.TextBox=f6,b.TextStyleShortcuts=S0,b.TocEmbed=j8,b.ZERO_WIDTH_SPACE_CHAR=ma,b.abbreviation=Qd,b.addAttribute=dh,b.addClass=W,b.addCommentToBlock=Xf,b.addDays=ME,b.addMetaToDoc=Rh,b.addMonths=LE,b.animateScrollTo=km,b.applyPlaceholderToBlock=Tf,b.assert=g,b.autoShowHideTemplates=o1,b.blockToDoc=Kg,b.blockToHtml=Ig,b.blockToMarkdown=Tg,b.blockToText=bh,b.blocksToDoc=ST,b.clearAllSelection=t4,b.clientType=Kt,b.cloneBlock=Fi,b.cloneChildContainer=Ng,b.cloneDoc=$g,b.cloneText=o6,b.commentToShareDbComment=vp,b.compareElement=jd,b.comparePosition=Xm,b.complexBlockAdjustSelectionPos=oh,b.complexBlockFindNearestChildBlock=T4,b.complexBlockGeFirstSimpleChild=tg,b.complexBlockGetAllChildContainers=En,b.complexBlockGetBottomChildContainers=I4,b.complexBlockGetLastSimpleChild=Vl,b.complexBlockGetSelectedContainers=Os,b.complexBlockGetTopChildContainers=x4,b.containerToDoc=PA,b.continuousScroll=DC,b.convertBlockFrom=Xd,b.convertImageFileToPng=f7,b.convertImageSrcToPng=GP,b.copyBlockAttributes=_6,b.createBlockAnchor=Li,b.createBlockCaretAnchor=M4,b.createBlockContentElement=Ts,b.createBlockElement=VC,b.createBlockSimpleDocRange=gh,b.createBlockSimpleRange=yt,b.createBoxContentElement=GC,b.createBoxElement=WC,b.createBoxOp=Z4,b.createChildContainer=A4,b.createComplexBlockPosition=ft,b.createComplexDocPos=a6,b.createComplexDocRange=gI,b.createContainer=s6,b.createContainerElement=Gm,b.createDeleteOps=V4,b.createEditor=Ha,b.createEditorSelectionRange=Ut,b.createElement=w,b.createEmptyContainer=zr,b.createEmptyDoc=Ur,b.createEmptyTextBlockData=fh,b.createExpandedRange=$d,b.createIconButton=Hl,b.createImage=pm,b.createInsertOps=ah,b.createInsertionContentElement=YC,b.createInsertionElement=ZC,b.createLocalEditor=ZZ,b.createOnesEditor=qZ,b.createRange=eC,b.createRichText=Oi,b.createRootContainer=C4,b.createSimpleBlockPosition=se,b.createSimpleDocPos=c6,b.createTextBlockData=sr,b.createTextButton=Qs,b.createTextOp=lo,b.createTextWithReplaceSoftReturn=ag,b.daysAfter=Rm,b.deleteText=dg,b.diffDays=RE,b.disablePageScroll=wC,b.docToHtml=S6,b.docToHtmlFragment=vh,b.docToMarkdown=Ma,b.docToText=La,b.downloadImageToFile=p7,b.downloadObjectToFile=H2,b.downloadSvgToString=Q8,b.editLink=fu,b.editorAddComment=rz,b.editorAddTextAttribute=q6,b.editorAutoInsertBlock=F6,b.editorBreakTextBlock=Yl,b.editorClearCompositionText=O6,b.editorClearSelectedContents=Fg,b.editorCopyBlock=Oh,b.editorDeleteBlock=Og,b.editorDeleteBlockText=Mg,b.editorDeleteBlockWithoutChildren=wh,b.editorDeleteChildContainer=aT,b.editorDeleteChildContainers=P6,b.editorFocusToBlock=Pg,b.editorFocusToEnd=_A,b.editorGetBlockData=_i,b.editorGetBlockText=mn,b.editorGetBlockTextEx=Ch,b.editorGetBoxData=d6,b.editorHandleKeyboardEvent=jA,b.editorInsertBlock=Ql,b.editorInsertBoxToBlock=M6,b.editorInsertDoc=V6,b.editorInsertDocAt=Hg,b.editorInsertText=Lg,b.editorInsertTextToBlock=L6,b.editorInsertTextToBlockEx=Sg,b.editorMergeTextBlock=N6,b.editorMoveDown=rA,b.editorMoveEnd=mA,b.editorMoveHome=gA,b.editorMoveLeft=tA,b.editorMoveLineEnd=wA,b.editorMoveLineHome=kA,b.editorMovePageDown=DA,b.editorMovePageUp=TA,b.editorMoveRight=nA,b.editorMoveUp=oA,b.editorMoveWordEnd=dA,b.editorMoveWordLeft=uA,b.editorRangeClearColor=Z6,b.editorRangeGetColor=jg,b.editorRangeSetColor=G6,b.editorRemoveTextAttribute=fT,b.editorReplaceBlockText=Eh,b.editorReplaceContainer=W6,b.editorRunOnce=op,b.editorSelectAll=OA,b.editorSelectContainer=Yg,b.editorSelectDown=iA,b.editorSelectEnd=Zg,b.editorSelectHome=pA,b.editorSelectLeft=sA,b.editorSelectLineEnd=yA,b.editorSelectLineHome=vA,b.editorSelectPageDown=LA,b.editorSelectPageUp=SA,b.editorSelectRight=lA,b.editorSelectUp=cA,b.editorSelectWordEnd=fA,b.editorSelectWordLeft=hA,b.editorSetTextColor=Jl,b.editorShowFindDialog=dU,b.editorToDocx=WZ,b.editorUpdateBlockData=xh,b.editorUpdateCompositionText=R6,b.editorUpdateEmbedData=U6,b.enablePageScroll=BC,b.escapeHtmlText=sC,b.escapeRegExp=Pm,b.escapeSpace=gE,b.exclusiveBlock=K0,b.executeBlockCommand=u4,b.executeEmbedBlockCommand=a4,b.executeRangeCommand=sb,b.fileToDataUrl=Ul,b.findAfterOffsetNotType=vg,b.findAllText=Cg,b.findEventTargetBlock=rC,b.findInsertionById=QC,b.findNextOffset=MI,b.findNextVisibleSimpleBlock=hb,b.findPrevOffset=LI,b.findPrevOffsetNotType=bg,b.findPrevSimpleBlockBeforeChildContainer=E4,b.findPrevVisibleSimpleBlock=db,b.findTarget=jl,b.findWordEnd=kg,b.findWordLeft=yg,b.format=ba,b.formatBytes=SC,b.formatDate=_m,b.fragmentToHtml=EC,b.fromBase64=zd,b.fromBase64ToBlob=Dm,b.fromBase64ToUint8Array=xE,b.fromDocRange=Si,b.fromNowString=Fm,b.genId=K,b.getAllChildBlocks=og,b.getAllQuickMenuItems=D0,b.getAllSelectedBlocks=Lo,b.getAttributesAt=Ta,b.getBlockBackground=zC,b.getBlockByIndex=_r,b.getBlockCaretRect=To,b.getBlockClass=Qe,b.getBlockClassByType=Ms,b.getBlockClientRects=Ti,b.getBlockCommandsWithHook=Wm,b.getBlockContent=Re,b.getBlockId=ie,b.getBlockIndex=be,b.getBlockInfo=Iu,b.getBlockKind=Io,b.getBlockMinWidth=o4,b.getBlockNearestRangeFromPoint=L4,b.getBlockOptions=VE,b.getBlockPath=Di,b.getBlockProperties=s4,b.getBlockRangeFromPoint=rh,b.getBlockStyles=zE,b.getBlockTextLength=ue,b.getBlockTools=lt,b.getBlockType=De,b.getBoxContent=Hm,b.getBoxId=qC,b.getBoxTypeFromElement=va,b.getChildBlockCount=Eo,b.getChildBlocks=vt,b.getChildOffset=Mi,b.getColorFromAttributes=gg,b.getColorFromContent=Yd,b.getComplexBlockClass=jn,b.getContainerBlockPath=m4,b.getContainerBlocks=e4,b.getContainerBlocksElement=th,b.getContainerById=$r,b.getContainerId=ae,b.getContainerMinWidth=Qm,b.getContainerToolsElement=QE,b.getContainerWidth=b4,b.getDistanceSquare=tr,b.getElementOffset=ga,b.getElementScale=ys,b.getEmbedType=Un,b.getExistsBlockTools=Kd,b.getExistsContainerById=f4,b.getFileExt=Aa,b.getFirstChildBlock=St,b.getFirstClientRect=Hd,b.getHeadingMenuOptions=B0,b.getHorizontalPadding=Cm,b.getInsertionContent=jm,b.getLastChildBlock=Gt,b.getLastClientRect=bs,b.getListAllNextBrothers=dc,b.getLogger=S,b.getNextBlock=Ze,b.getNextValidOffset=Fs,b.getNextVisibleBlock=Ss,b.getOffsetInfoAfter=Sa,b.getOffsetInfoBefore=Ah,b.getOpAt=Y4,b.getOpLength=uh,b.getParentBlock=oe,b.getParentBlockExcludeSelf=Is,b.getParentBox=$m,b.getParentContainer=ne,b.getPrevBlock=ct,b.getPrevValidOffset=Ri,b.getPrevVisibleBlock=Ds,b.getRangeCommands=rb,b.getRootBlock=Vm,b.getScrollContainer=oo,b.getSpecialBlockCommands=l4,b.getStandardEmbedBlockProperties=T2,b.getTextAfterOffset=DI,b.getTextAttributes=Dg,b.getTextBeforeOffset=SI,b.getTextBlockChild=eh,b.getTextBlockClass=KC,b.getTextBlockContentChildTextLength=so,b.getTextBlockContentChildType=d4,b.getTextBlockContentChildren=nr,b.getTextLength=rn,b.getTextOpLength=rg,b.getTextWidth=Wd,b.getToolbar=lf,b.handleBlockElementUpdated=r4,b.hasAltOnly=yE,b.hasClass=xe,b.hasCtrlOrCmd=AC,b.hasCtrlOrCmdOnly=vE,b.hashCode=PC,b.hideBlock=jC,b.htmlToFragment=Vd,b.i18n=R,b.injectDocToHtmlFragment=Mh,b.injectStyle=cC,b.insertEmptyBlock=GE,b.insertEmptyEmbedBlock=qm,b.insertText=jr,b.intersectionCommands=_D,b.isBackspace=vC,b.isBlock=xs,b.isBlockLocked=_f,b.isBlockLockedByOthers=e2,b.isBlockLockedBySelf=Tu,b.isBlockTools=HC,b.isBox=Nm,b.isCJK=gC,b.isChildContainer=Do,b.isChildNode=Ke,b.isCollapsedRange=mI,b.isComplexBlockPosition=Km,b.isComplexKindBlock=Le,b.isContainer=Fr,b.isContainerSelectedAllChildBlocks=MA,b.isControlEvent=ws,b.isDelete=wE,b.isDraggingFiles=qd,b.isElementVisible=ym,b.isEmbedBlock=Lt,b.isEmptyContainer=Ym,b.isEmptyDoc=Ag,b.isEmptyTextBlock=ht,b.isEmptyTextBlockWithoutCompositionText=Au,b.isEnterOnly=bC,b.isEscape=Im,b.isExclusiveBlock=Of,b.isFirefox=Em,b.isFirstChildBlockInComplexBlock=Ix,b.isHighSurrogate=aE,b.isInBlock=Um,b.isInBlockTools=Ls,b.isLetter=mC,b.isLowSurrogate=gm,b.isMatchShortcut=Or,b.isMoveForward=AE,b.isNavigationEvent=CE,b.isNavigationKey=CC,b.isNodeRemoved=nC,b.isNumber=fC,b.isPrintableKey=xm,b.isRootBlock=ro,b.isRootContainer=Xe,b.isSafari=pC,b.isSameDay=Om,b.isSecureEnv=j0,b.isShiftEnter=kE,b.isShiftTab=EE,b.isShortcutEvent=bE,b.isSimpleBlock=UE,b.isSimpleBlockPosition=Hr,b.isSimplePos=l6,b.isSimpleRange=mh,b.isSpace=Ud,b.isTab=BE,b.isTextBlockContentBoxChild=io,b.isTextBlockContentChild=ka,b.isTextBlockContentInsertionChild=Nr,b.isTextBlockContentTextChild=wa,b.isTextKindBlock=ee,b.isTextKindBlockType=ya,b.isToday=LC,b.isValidOffset=sn,b.isVisibleBlock=Jd,b.isYesterday=MC,b.loadJs=oC,b.loadJsPromise=vs,b.lockers=wo,b.mergeCommands=sf,b.mergeDocs=$s,b.mergeOps=ug,b.mergeText=cI,b.multiSplitText=_4,b.overflowText=RC,b.parseShortcut=yC,b.patchNode=Ca,b.pointInRect=ks,b.rangeAddAttribute=Ia,b.rangeGetTextColor=n6,b.rangeRemoveAttribute=ql,b.rangeSetTextColor=X4,b.rangeTransformText=J4,b.registerDragDrop=wm,b.removeAttribute=mg,b.removeClass=te,b.removeLastBr=rI,b.removePlaceholderFromBlock=i7,b.removeStyle=lC,b.replaceAll=OE,b.replaceAllCaseInsensitive=_E,b.replaceAllText=i6,b.replaceText=hh,b.requestDownload=Gd,b.resetListStart=fc,b.scrollable=TC,b.selectFile=zl,b.selectedBlockToDoc=Th,b.selectionToDoc=Dh,b.setAttributes=bm,b.setClipboardData=Mm,b.setClipboardDataByEvent=SE,b.setColorToAttributes=e6,b.setDataset=Am,b.setDefaultCursor=pa,b.setStyles=vm,b.shareDBCommentToDocObject=bp,b.shareDBDocCommentToComment=Gb,b.shortcutToDisplayText=Bo,b.showBlock=UC,b.showDocVersions=QZ,b.splitText=xn,b.splitToThree=zt,b.stringToDataUrl=Sm,b.stringToObjectUrl=Lm,b.subText=F4,b.textNodeOffsetFromPoint=tC,b.titleFromEditor=g7,b.toBase64URL=Bs,b.toMindmap=df,b.toPlainText=rt,b.toPlainTextKeepLength=pg,b.trimChar=Bm,b.unexclusiveBlock=X0,b.unicodeLength=uE,b.unicodeSubstr=dE,b.updateBlockSelection=n4,b.updateOpAttributes=r6,b.updateTextBlockContent=TI,b.updateUrl=Tm;for(const n in bt)n!=="default"&&!b.hasOwnProperty(n)&&Object.defineProperty(b,n,{enumerable:!0,get:()=>bt[n]});Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
740
|
+
\`\`\`\`\`\``}return"[plantuml]"}const ak={embedType:"plantuml",convertFrom:mG,handleUpdateBlock:fG,createEmbedContent:hG,getBlockProperties:gG,convertTo:pG},roe="",CG="hr",AG={dividingLine:{type:"\u5206\u5272\u7EBF",abstract:"\u5206\u5272\u7EBF"}},bG={dividingLine:{type:"Separation line",abstract:"Line"}},vG={dividingLine:{type:"\u533A\u5207\u308A\u7DDA",abstract:"\u533A\u5207\u308A\u7DDA"}};R.mergeLang({"zh-CN":AG,"en-US":bG,"ja-JP":vG});function yG(n,e){const t=w("div",["editor-embed-container"],e);w("hr",["editor-embed-hr"],t)}function kG(n,e,t,o){return o==="html"?"<hr />":o==="markdown"?"---":"------------"}function wG(){return{name:"hr",insertEmbedCommandItems:[{id:"insert-hr",name:R.t("dividingLine.type"),icon:zL,order:500,group:"common",subText:pn("insert-hr")}],handleInsertEmptyEmbed:async(n,e)=>{const{containerId:t,blockIndex:o}=e;return n.insertEmbed(t,o,CG,{})}}}function BG(n,e,t){const{data:o}=t;if(!o||o.embedType!=="dividing-line"||!ee(n,e))return null;const r={};return{blockData:{id:K(),type:"embed",embedType:"hr",embedData:r}}}function EG(){return{abstract:R.t("dividingLine.abstract")}}const uk={embedType:"hr",createEmbedContent:yG,convertTo:kG,getOptions:wG,convertFrom:BG,getBlockProperties:EG},ioe="",soe="",xG={media:{upload:{failed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>'},load:{failed:'<div class="line-1">{name}\u52A0\u8F7D\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>'},audio:{menuItem:"\u97F3\u9891",abstract:"\u97F3\u9891"},video:{menuItem:"\u89C6\u9891",abstract:"\u89C6\u9891"}}},IG={media:{upload:{failed:'<div class="line-1">{name} upload failed</div><div class="line-2">The network service is abnormal, you can <span class="retry-upload">Try again</span></div>'},load:{failed:'<div class="line-1">{name} loading failed</div><div class="line-2">The network service is abnormal, you can <span class="retry-upload">Try again</span></div>'},audio:{menuItem:"Audio",abstract:"Audio"},video:{menuItem:"Video",abstract:"Video"}}},TG={media:{upload:{failed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>'},load:{failed:'<div class="line-1">{name}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>'},audio:{menuItem:"\u97F3\u58F0",abstract:"\u97F3\u58F0"},video:{menuItem:"\u52D5\u753B",abstract:"\u52D5\u753B"}}};R.mergeLang({"zh-CN":xG,"en-US":IG,"ja-JP":TG});var Vo=(n=>(n.AUDIO="audio",n.VIDEO="video",n))(Vo||{}),$u=(n=>(n.Empty="empty",n.Progress="progress",n.Error="error",n))($u||{});const dk=10*1024*1024,DG=["wav","mp3","aac","ogg","webm","flac"],SG=["ogg","mp4","webm"],LG=()=>{};function hk(n){var h,p,A,v,B,D;const e=(h=n.getComponentOptions("media"))!=null?h:{},{allowedMedias:t,maxSize:o,callbacks:r}=e,i=(p=t==null?void 0:t.audio)!=null?p:DG,s=(A=t==null?void 0:t.video)!=null?A:SG,l=(v=o==null?void 0:o.audio)!=null?v:dk,a=(B=o==null?void 0:o.video)!=null?B:dk,d=(D=r==null?void 0:r.onError)!=null?D:LG;return{allowedMedias:{audio:i,video:s},maxSize:{audio:l,video:a},callbacks:{onError:d}}}function MG(n,e){const t=i=>i.map(s=>`.${s}`).join(","),{allowedMedias:o}=hk(n),r=o[e];return r?t(r):"*"}function RG(n,e,t){const{maxSize:o,callbacks:r,allowedMedias:i}=hk(e),{[t]:s}=o,{[t]:l}=i;if(s&&n.size>s){const d=new Error("media is too large");throw d.code=`MaxMediaSize-${t}`,r!=null&&r.onError&&(r==null||r.onError(e,d)),d}const a=Aa(n.name);if(l&&!l.includes(a)){const d=new Error(`media file is not allowed: ${a}`);throw d.code="NotAllowedFile",r!=null&&r.onError&&(r==null||r.onError(e,d)),d}}function OG(n){return n===$u.Empty||n===$u.Error}const Pt=S("media");class _G extends bt.TypedEmitter{constructor(t){super();m(this,"mediaContainer",null);m(this,"media",null);m(this,"abstract",null);m(this,"handleMediaLoadError",(t,o)=>{if(!o.target||!(o.target instanceof Node)||!(o.target instanceof Element?o.target:o.target.parentElement))return;const i=oe(o.target);if(!i||!i.contains(this.mediaContainer))return;const s=this.renderError();this.updateMediaContent(s),this.emit("mediaError",t,"load_error",ie(i))});m(this,"handleUploadFile",async t=>{g(Pt,this.abstract,"no abstract"),g(Pt,this.mediaContainer,"The media element not exist");const{editor:o}=this.options,r=oe(this.mediaContainer);g(Pt,r,"The block element not exist");const i=o.getBlockData(r);try{const{resourceId:s}=await o.doc.uploadResource(t,{onProgress:p=>{this.renderProgress(p,t)}}),{name:l,type:a,size:d}=t,h={...i,embedData:{...i.embedData,src:s,fileName:l,fileSize:d,fileType:a}};o.updateBlockData(r,h)}catch(s){Pt.error(s),this.emit("mediaError",o,"upload_error",i.id),this.renderRetry(t)}te(r,"media-block-uploading")});m(this,"destroy",()=>{this.mediaContainer=null});this.options=t}bindMediaEvent(){const{editor:t}=this.options;this.media&&t.domEvents.addEventListener(this.media,"error",this.handleMediaLoadError)}unbindMediaEvent(){const{editor:t}=this.options;this.media&&t.domEvents.removeEventListener(this.media,"error",this.handleMediaLoadError)}updateMediaContent(t){g(Pt,this.mediaContainer,"The media element not exist"),this.mediaContainer.innerHTML="",this.mediaContainer.append(t)}renderError(){g(Pt,this.abstract,"no abstract");const{editor:t,createMediaElement:o}=this.options,{mediaIcon:r,mediaName:i}=this.abstract;g(Pt,this.mediaContainer,"The media element not exist");const s=oe(this.mediaContainer);g(Pt,s,"The block element not exist");const l=t.getBlockData(s),a=l.embedData.src,d=w("div",["media-error","embed-selected-content","embed-hover-content"],null),h=w("span",["media-error-icon"],d);h.innerHTML=r;const p=w("div",[],d);p.innerHTML=R.t("media.load.failed",{name:i}),d.appendChild(p);const A=p.querySelector(".retry-upload");return g(Pt,A,"The element not exist"),t.domEvents.addEventListener(A,"click",(v,B)=>{const D=w("div",["media-element"],null),I=this.getResourceUrl(a),_=o(v,D,l,I);this.unbindMediaEvent(),this.media=_,this.bindMediaEvent(),this.updateMediaContent(D)}),this.setFullScreen(),d}renderRetry(t){g(Pt,this.abstract,"no abstract");const{editor:o}=this.options,{mediaIcon:r,mediaName:i}=this.abstract,s=w("div",["media-error","embed-selected-content","embed-hover-content"],null),l=w("span",["media-error-icon"],s);l.innerHTML=r;const a=w("div",[],s);a.innerHTML=R.t("media.upload.failed",{name:i}),s.appendChild(a);const d=a.querySelector(".retry-upload");g(Pt,d,"The element not exist"),o.domEvents.addEventListener(d,"click",()=>{o.readonly||(g(Pt,this.abstract,"no abstract"),this.handleUploadFile(t))}),this.updateMediaContent(s),this.setFullScreen()}renderProgress(t,o){g(Pt,this.mediaContainer,"The media element not exist");const r=this.mediaContainer.querySelector(":scope .media-progress"),i=t===-1||t===100?100:t;if(r){const{updateProgressElement:s}=this.options;s(r,i)}else{const{createProgressElement:s}=this.options,l=oe(this.mediaContainer);g(Pt,l,"The element not exist"),W(l,"media-block-uploading");const a=w("div",["media-progress"],null);s(a,i,o),this.updateMediaContent(a)}this.setFullScreen()}renderMediaElement(t){g(Pt,this.mediaContainer,"The media element not exist");const o=this.mediaContainer.querySelector(":scope > .media-element"),{createMediaElement:r,updateMediaElement:i,editor:s}=this.options,l=this.getResourceUrl(t.embedData.src);if(o){const a=i(s,o,t,l);this.unbindMediaEvent(),this.media=a,this.bindMediaEvent()}else{const a=w("div",["media-element"],null),d=r(s,a,t,l);this.unbindMediaEvent(),this.media=d,this.bindMediaEvent(),this.updateMediaContent(a)}}renderEmpty(t){g(Pt,this.abstract,"no abstract"),g(Pt,this.mediaContainer,"The media element not exist");const o=w("div",["media-empty","embed-selected-content","embed-hover-content"],this.mediaContainer);o.innerHTML=this.abstract.mediaIcon,this.updateMediaContent(o);const{editor:r}=this.options;r.findBlockById(t.id)&&this.emit("mediaError",r,"empty",t.id),this.setFullScreen()}getResourceUrl(t){const{editor:o}=this.options;return o.doc.buildResourceUrl(t)}setFullScreen(){g(Pt,this.mediaContainer,"The media element not exist"),W(this.mediaContainer,"full-screen")}removeFullScreen(){g(Pt,this.mediaContainer,"The media element not exist"),te(this.mediaContainer,"full-screen")}updateBlockAlign(t,o){const r=oe(o);g(Pt,r,"The block element not exist");const{align:i}=t;t.embedType==="video"&&(r.hasAttribute("data-style-align")&&r.removeAttribute("data-style-align"),r.setAttribute("data-style-align",i))}render(t,o){const{src:r}=t.embedData;(!this.mediaContainer||!o.contains(this.mediaContainer))&&(this.mediaContainer=w("div",["media"],o)),this.updateBlockAlign(t,o),OG(r)?r===$u.Empty&&this.renderEmpty(t):this.renderMediaElement(t)}setAbstract(t){this.abstract=t}}S("media-embed");const FG="left";class fk{constructor(){m(this,"handleInsertEmptyEmbed",async(e,t)=>{var p;const{containerId:o,blockIndex:r}=t;let i;(p=t.data)!=null&&p.file&&(i=t.data.file);const s=MG(e,this.embedType);if(i=i!=null?i:await zl(s,{}),!i)return null;const{mediaType:l}=this.getAbstract();try{RG(i,e,l)}catch{return null}const a={id:K(),type:"embed",embedType:this.embedType,embedData:{src:$u.Empty}};l==="video"&&(a.align=FG);const d=e.insertBlock(o,r,a);return await this.getMedia(e,a.id).handleUploadFile(i),d})}getMedia(e,t){const o=e.addCustom(`media-${t}`,()=>new _G({editor:e,createMediaElement:this.createMediaElement,updateMediaElement:this.updateMediaElement,createProgressElement:this.createProgressElement,updateProgressElement:this.updateProgressElement}));return o.setAbstract({...this.getAbstract()}),o}getOptions(){const{menuItem:e,mediaIcon:t,mediaName:o,order:r,group:i}=this.getAbstract();return{name:o,insertEmbedCommandItems:[{id:`insert-${this.embedType}`,name:e,icon:t,order:r,group:i,subText:pn(`insert-${this.embedType}`)}],handleInsertEmptyEmbed:this.handleInsertEmptyEmbed}}createEmbedContent(e,t,o){const{id:r}=o;this.getMedia(e,r).render(o,t)}handleUpdateBlock(e,t,o){const{id:r}=o,i=this.getMedia(e,r),s=Re(t);return i.render(o,s),!0}handleDeleteBlock(e,t){const o=t.id,r=this.getMedia(e,o);r.removeAllListeners(),r.destroy()}convertTo(e,t,o,r){const i=t.embedData,s=e.doc.buildResourceUrl(i.src,{withToken:!0});return r==="html"?`<${i.type} src="${s}" />`:r==="markdown"?``:s}}function mk(n,e){const t=w("div",["uploading-progress-mask"],n),o=w("div",["uploading-progress-bar"],t),r=w("div",["uploading-progress-bar-value"],o);r.style.width=`${e}%`}function gk(n,e){const t=n.querySelector(".uploading-progress-bar-value");t&&(t.style.width=`${e}%`)}const PG=S("media-audio");class NG extends fk{constructor(){super(...arguments);m(this,"embedType",Vo.AUDIO);m(this,"updateProgressElement",gk);m(this,"createMediaElement",(t,o,r,i)=>{const s=w("div",["audio-container","embed-hover-content","embed-selected-content"],o),l=w("audio",[],s);return l.innerHTML="Your browser does not support the <code>audio</code> element.",l.controls=!0,l.src=i,setTimeout(()=>{this.getMedia(t,r.id).setFullScreen()}),l})}getAbstract(){return{mediaIcon:HL,mediaName:R.t(`media.${Vo.AUDIO}.menuItem`),menuItem:R.t(`media.${Vo.AUDIO}.menuItem`),order:800,mediaType:Vo.AUDIO,group:"common"}}getBlockProperties(){return{abstract:`${R.t(`media.${Vo.AUDIO}.abstract`)}`}}updateMediaElement(t,o,r,i){const s=o.querySelector(":scope .audio-container > audio");return g(PG,s,"The media element not exist"),s.src!==i&&(s.src=i),s}createProgressElement(t,o){const r=w("audio",[],t);r.innerHTML="Your browser does not support the <code>audio</code> element.",r.controls=!0,r.src="about:blank",mk(t,o)}}const pk=new NG;S("video-resizer");function Ck(n){return n&&Lt(n)&&Un(n)==="video"}const $G=50;class G2{constructor(e){m(this,"currentResizableElement",null);m(this,"resizing",!1);m(this,"handleHoveringBlockChange",(e,t)=>{if(!this.resizing&&(t&&Ck(t)&&this.disableBlockResize(t),e&&Ck(e))){const o=this.getVideoElement(e);if(!o)return;this.enableBlockResize(e,o)}});m(this,"handleResizing",(e,t)=>{if(this.resizing=!0,!this.currentResizableElement)return;const o=e.getBlock();if(!o)return;const r=o.getBoundingClientRect().width,i=Math.min(Math.max(t.width,$G),r);this.currentResizableElement.style.width=`${i}px`});m(this,"handleResized",e=>{this.resizing=!1;const t=e.getBlock();if(!this.currentResizableElement||!t)return;const o=this.editor.getBlockData(t),{width:r}=this.currentResizableElement.getBoundingClientRect();this.editor.updateBlockData(t,{...o,width:r})});this.editor=e,pt.get(e).addListener("change",this.handleHoveringBlockChange)}destroy(){this.currentResizableElement=null,pt.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}getVideoElement(e){return Re(e).querySelector(":scope .video-container > video")}updateResizer(e){const t=this.editor.findCustom(`${ie(e)}-resizer`);t&&t.updateResizer()}disableBlockResize(e){const t=this.editor.findCustom(`${ie(e)}-resizer`);t&&t.disableResize()}enableBlockResize(e,t){const o=this.editor.addCustom(`${ie(e)}-resizer`,()=>new wu(this.editor,{resize:["top-left","top-right","bottom-left","bottom-right"]}));o.enableResize(e,t),o.removeListener("resizing",this.handleResizing),o.removeListener("resized",this.handleResized),o.addListener("resizing",this.handleResizing),o.addListener("resized",this.handleResized),this.currentResizableElement=t}}const HG=S("video");class jG extends fk{constructor(){super(...arguments);m(this,"embedType",Vo.VIDEO);m(this,"updateProgressElement",gk);m(this,"createMediaElement",(t,o,r,i)=>{const s=w("div",["video-container","embed-selected-content","drag-preview-element"],o),l=w("video",[],s);return l.innerHTML="Your browser does not support the <code>video</code> element.",l.controls=!0,l.src=i,l.addEventListener("canplay",()=>{t.addCustom("video-resizer",()=>new G2(t)),this.getMedia(t,r.id).removeListener("mediaError",this.handleMediaError),this.getMedia(t,r.id).addListener("mediaError",this.handleMediaError),this.getMedia(t,r.id).removeFullScreen()}),r.width&&(l.style.width=`${r.width}px`),l});m(this,"createProgressElement",(t,o,r)=>{const i=w("video",["progress-video"],t);i.innerHTML="Your browser does not support the <code>audio</code> element.",i.controls=!0,mk(t,o),Ul(r).then(s=>{const l=t.querySelector(".progress-video");l&&Um(t)&&(l.src=s)})})}getAbstract(){return{mediaName:R.t(`media.${Vo.VIDEO}.menuItem`),mediaIcon:jL,menuItem:R.t(`media.${Vo.VIDEO}.menuItem`),order:700,mediaType:Vo.VIDEO,group:"common"}}getBlockProperties(){return{abstract:`[${R.t(`media.${Vo.VIDEO}.abstract`)}]`}}handleMediaError(t,o,r){const i=t.addCustom("video-resizer",()=>new G2(t)),s=t.getBlockById(r);i.disableBlockResize(s)}updateMediaElement(t,o,r,i){const s=o.querySelector(":scope .video-container > video");g(HG,s,"The media element not exist"),s.src!==i&&(s.src=i),r.width?s.style.width=`${r.width}px`:s.style.width="";const l=t.getBlockById(r.id);return setTimeout(()=>{t.addCustom("video-resizer",()=>new G2(t)).updateResizer(l)}),s}}const Ak=new jG,bk=[xf,Sf,U0,E9],Z2=[z2,Z8,rk,lk,ak,F9,uk,Ak,pk,X7,j8,Yz],vk=[T0,F2,u8];function UG(n,e,t){var r,i,s;const o=Ha(n,e,{components:{blocks:[...bk,...((r=t==null?void 0:t.components)==null?void 0:r.blocks)||[]],embeds:[...Z2,...((i=t.components)==null?void 0:i.embeds)||[]],boxes:[...vk,...((s=t.components)==null?void 0:s.boxes)||[]],textRenders:[new C0],options:{...t.componentsOptions}}});return o.readonly=!0,o.addCustom("heading-collapse",()=>new F8(o)),o.addCustom("editor-tooltip",()=>new bf(o)),o.addListener("clickLink",(l,a,d)=>{var p;if((p=t==null?void 0:t.events)!=null&&p.onClickLink){t.events.onClickLink(l,a,d);return}const h=d.getAttribute("link");h&&(l.readonly||a.ctrlKey||a.metaKey)&&window.open(h,"_blank")}),o}class yk{constructor(e){this.createOptions=e,e.lang&&R.setLang(e.lang)}createHistoryEditor(e,t){return UG(e,t,this.createOptions)}}S("create-editor");function kk({root:n,childDoc:e,doc:t}){e.uploadResource=t.uploadResource.bind(t),e.buildResourceUrl=t.buildResourceUrl.bind(t);const o=Ha(n,e,{shortcuts:[Lh],components:{blocks:[xf,Sf],decorators:[new Lf],embeds:[X7,z2,Z8,rk,lk,ak,F9,uk,Ak,pk],boxes:[T0,F2],options:{image:{defaultAlign:"left"}}}});return o.input.addHandler(new If),o.input.addHandler(new c2(o)),o.input.addHandler(new f2(o)),o.input.addHandler(new tz(o)),o.input.addHandler(new Ff),o.addCustom("image-paste-handler",()=>new l2(o)),o}function zG(n,e){const t=Array.from(n.rootContainer.querySelectorAll(`[comment-${e.toLocaleLowerCase()}="${e}"]`)),o=new Set;t.forEach(r=>{const i=oe(r);i&&o.add(i)}),o.forEach(r=>{nz(n,r,e)})}class VG{constructor(e){m(this,"listeners",new Set);m(this,"doc");this.editor=e,this.doc=this.editor.doc.externalDoc,this.doc.registerCallback(this)}getComments(){return this.doc.getComments()}getComment(e){return this.doc.getComment(e)}getCommentDoc(e){return this.doc.getCommentDoc(e)}localCreateComment(e,t){this.doc.localCreateComment(e,t)}localDeleteComment(e){const t=this.getComment(e);this.doc.localDeleteComment(e);const o=t.groupId;this.getComments().filter(i=>i.groupId===o).length===0&&zG(this.editor,o)}localUpdateComment(e,t){this.doc.localUpdateComment(e,t)}onCreateComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onCreateComment(e,t))}onDeleteComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onDeleteComment(e,t))}onUpdateComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onUpdateComment(e,t))}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}createCommentEditor(e,t){var r,i;const o=kk({root:e,childDoc:t,doc:this.doc});if((r=this.editor.options.componentsOptions)!=null&&r.mention){const s=this.editor.options.componentsOptions.mention;o.addCustom("mention",()=>new _2(o,{...s,enableFirstBlock:!0}))}if((i=this.editor.options.componentsOptions)!=null&&i.comment){const s=this.editor.options.componentsOptions.comment;s.onCommentEditorClick&&o.addListener("click",s.onCommentEditorClick)}return o}allowEdit(e){return e.userId===this.doc.getUser().userId}}class WG{constructor(e,t){m(this,"listeners",new Set);this.editor=e,this.localDoc=t}get doc(){return this.localDoc.toJSON()}getComments(){return Object.values(this.doc.comments)}getComment(e){return this.doc.comments[e]}getCommentDoc(e){const t=this.doc.comments[e];return bp(t)}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}localCreateComment(e,t){}localDeleteComment(e){}localUpdateComment(e,t){}createCommentEditor(e,t){var r,i;const o=kk({root:e,childDoc:t,doc:this.localDoc});if((r=this.editor.options.componentsOptions)!=null&&r.mention){const s=this.editor.options.componentsOptions.mention;o.addCustom("mention",()=>new _2(o,{...s,enableFirstBlock:!0}))}if((i=this.editor.options.componentsOptions)!=null&&i.comment){const s=this.editor.options.componentsOptions.comment;s.onCommentEditorClick&&o.addListener("click",s.onCommentEditorClick)}return o}allowEdit(e){return e.userId===this.localDoc.getUser().userId}}const qG={placeholder:{common:{title:"\u8BF7\u8F93\u5165\u6807\u9898",readonlyTitle:"\u8BF7\u8F93\u5165\u6807\u9898",content:"\u70B9\u51FB + \uFF0C\u6216\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6",contentInTable:"\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6"},local:{readonlyTitle:"\u672A\u547D\u540D"}},copyCutProperty:{copy:"\u590D\u5236",cut:"\u526A\u5207",unsafeEnvTips:"\u7531\u4E8E\u5F53\u524D http \u8BBF\u95EE\u73AF\u5883\u4E0B\u7684\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528\u5FEB\u6377\u952E({shortCut}) {operation}"}},GG={placeholder:{common:{title:"Enter a title",readonlyTitle:"Enter a title",content:'Click "+", or enter "/" to insert components quickly',contentInTable:'Enter "/" to insert components quickly'},local:{readonlyTitle:"Untitled"}},copyCutProperty:{copy:"copy",cut:"cut",unsafeEnvTips:"Due to the limitations of the current http access environment, please use the shortcut ({shortCut}) {operation}"}},ZG={placeholder:{common:{title:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",readonlyTitle:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",content:"\u300C+\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u304B\u3001\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059",contentInTable:"\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059"},local:{readonlyTitle:"\u7121\u984C"}},copyCutProperty:{copy:"\u8907\u88FD",cut:"\u5207\u308B",unsafeEnvTips:"HTTP\u74B0\u5883\u306E\u5236\u7D04\u306B\u3088\u308A\u3001{operation}\u3059\u308B\u306B\u306F\u3001\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8({shortCut}) \u3092\u3054\u4F7F\u7528\u304F\u3060\u3055\u3044"}};R.mergeLang({"zh-CN":qG,"en-US":GG,"ja-JP":ZG});const QG="UEsDBBQABgAIAAAAIQBk9WPugQEAACkGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0lMtqwzAQRfeF/oPRtsRKuiilxMmij2UbaArdKvI4E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Y1Byb3BzL2FwcC54bWxQSwECLQAUAAYACAAAACEAiD+lv+EAAABVAQAAGAAAAAAAAAAAAAAAAAAHNwAAY3VzdG9tWG1sL2l0ZW1Qcm9wczEueG1sUEsBAi0AFAAGAAgAAAAhAMEnywi2AAAAIQEAABMAAAAAAAAAAAAAAAAARjgAAGN1c3RvbVhtbC9pdGVtMS54bWxQSwECLQAUAAYACAAAACEAdD85esIAAAAoAQAAHgAAAAAAAAAAAAAAAABVOQAAY3VzdG9tWG1sL19yZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAOuAYExTAwAAjw4AABIAAAAAAAAAAAAAAAAAWzsAAHdvcmQvZm9udFRhYmxlLnhtbFBLBQYAAAAADwAPANQDAADePgAAAAA=",YG=()=>Dm(QG);async function JG(n){return new Promise((e,t)=>{const o=new Image;o.onload=()=>{e({width:o.naturalWidth,height:o.naturalHeight})},o.onerror=t,o.src=n})}async function wk(n,e){if(n.width&&n.height)return{width:n.width,height:n.height,buffer:e};const t=await Ul(new File([e],"",{})),o=await JG(t);return o.width===void 0||o.height===void 0?{width:345,height:230,buffer:e}:n.width||n.height?{width:n.width||o.width*n.height/o.height,height:n.height||o.height*n.width/o.width,buffer:e}:{width:o.width,height:o.height,buffer:e}}function KG(n,e){let t=n.filter(s=>s!=null);const o=e-(t.length-1)*20,r=.87,i=t.reduce((s,l)=>s+l.width,0);return i>o&&(t=t.map(s=>({width:s.width*o/i,height:s.height*o/i,buffer:s.buffer}))),t.map(s=>({width:s.width*r,height:s.height*r,buffer:s.buffer}))}function Bk(n=[0,1,2,3,4,5,6,7],e=1){return n.map(t=>{let o;switch(t%3){case 0:o=ge.LevelFormat.DECIMAL;break;case 1:o=ge.LevelFormat.LOWER_LETTER;break;default:o=ge.LevelFormat.LOWER_ROMAN;break}return{level:t,format:o,text:`%${t+1}. `,alignment:ge.AlignmentType.START,start:e,style:{paragraph:{indent:{left:ge.convertInchesToTwip(.3*(t+1)),hanging:ge.convertInchesToTwip(.2)}}}}})}function XG(){return[0,1,2,3,4,5,6,7].map(n=>{let e;switch(n%3){case 0:e="\u2022";break;case 1:e="\u25E6";break;default:e="\u25AA";break}return{level:n,format:ge.LevelFormat.BULLET,text:e,alignment:ge.AlignmentType.START,style:{paragraph:{indent:{left:ge.convertInchesToTwip(.3*(n+1)),hanging:ge.convertInchesToTwip(.2)}}}}})}function eZ(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:ge.LevelFormat.BULLET,text:"\u2611",alignment:ge.AlignmentType.START,style:{paragraph:{indent:{left:ge.convertInchesToTwip(.3*(n+1)),hanging:ge.convertInchesToTwip(.2)}}}}))}function tZ(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:ge.LevelFormat.BULLET,text:"\u2610",alignment:ge.AlignmentType.START,style:{paragraph:{indent:{left:ge.convertInchesToTwip(.3*(n+1)),hanging:ge.convertInchesToTwip(.2)}}}}))}var Hu=(n=>(n.NUMBERING="number-numbering-reference",n.BULLET="number-bullet-reference",n.CHECKED="checked-bullet-reference",n.UNCHECKED="unchecked-bullet-reference",n))(Hu||{});const nZ=[{levels:Bk(),reference:"number-numbering-reference"},{levels:XG(),reference:"number-bullet-reference"},{levels:eZ(),reference:"checked-bullet-reference"},{levels:tZ(),reference:"unchecked-bullet-reference"}];function oZ(n){switch(n){case"style-color-0":return"d83931";case"style-color-1":return"de7802";case"style-color-2":return"dc9b04";case"style-color-3":return"2ea121";case"style-color-4":return"245bdb";case"style-color-5":return"6425d0";case"style-color-6":return"8f959e";default:return}}function rZ(n){switch(n){case"style-bg-color-1":case"style-bg-color-2":case"style-bg-color-8":case"style-bg-color-9":return"yellow";case"style-bg-color-0":case"style-bg-color-5":return"magenta";case"style-bg-color-3":return"green";case"style-bg-color-4":case"style-bg-color-11":return"blue";case"style-bg-color-6":return"lightGray";case"style-bg-color-7":return"red";case"style-bg-color-10":return"darkGreen";case"style-bg-color-12":return"darkMagenta";case"style-bg-color-13":return"darkGray";default:return}}function iZ(n){switch(n){case"style-bg-color-0":return"fbbab6";case"style-bg-color-1":return"ffdcb0";case"style-bg-color-2":return"fff7a0";case"style-bg-color-3":return"ceefc5";case"style-bg-color-4":return"d1ddfb";case"style-bg-color-5":return"d9cbf8";case"style-bg-color-6":return"eaeaea";case"style-bg-color-7":return"fe837c";case"style-bg-color-8":return"ffbd6a";case"style-bg-color-9":return"ffe662";case"style-bg-color-10":return"a8f393";case"style-bg-color-11":return"98b5ff";case"style-bg-color-12":return"b394f8";case"style-bg-color-13":return"b1b1b1";default:return}}const sZ=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/;function Ek(n){if(typeof n=="string"&&n.length>0){if(n[0]==="#")return n.substring(1);const e=n.match(sZ);if(e){const t=s=>{let l=Number(s).toString(16);return l.length<2&&(l=`0${l}`),l},o=t(e[1]),r=t(e[2]),i=t(e[3]);return`${o}${r}${i}`}if(n==="red")return"FF0000";if(n==="green")return"00FF00";if(n==="blue")return"0000FF"}}function en(n,e){if(n&&n.attributes&&n.attributes[e])return n.attributes[e];if(n&&n.attributes&&n.attributes.box&&n.attributes.inputType&&e==="style-underline")return!0}function xk(n,e,t){for(let o=0;o<=t;++o){const r=`${e}${o}`;if(en(n,r))return r}}function r1(n,e,t){n.attributes=n.attributes||{},n.attributes[e]=t}function Q2(n){return n==="image"||n==="drawio"||n==="plantuml"||n==="mermaid"||n==="flowchart"}function Ik(n){return n&&n.startsWith("//")?`https:${n}`:n&&!n.startsWith("http://")&&!n.startsWith("https://")?`https://${n}`:n}function lZ(n){const e=en(n,"inlineStyle");if(e==null)return;const t=e.split(";");for(const o of t){const r=o.split(":");if(r.length!==2)continue;const i=r[0].trim().toLowerCase(),s=r[1].trim().toLowerCase();i==="font-size"&&r1(n,"inline-style-font-size",s),i==="color"&&r1(n,"inline-style-color",s),i==="background-color"&&r1(n,"inline-style-background-color",s),i==="font-family"&&r1(n,"inline-style-font-family",s)}}function cZ(n,e){if(e==null)return n==null?void 0:n.normal;if(n)return n[`heading${e}`]}function aZ(n){const e=`${en(n,"inline-style-font-size")}`;if(e&&e.indexOf("px")>0)return+e.replace(/px/g,"")}function uZ(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` ${n.attributes.text} `;if(n.attributes&&n.attributes.box&&n.attributes.inputType)return n.attributes.value?`${n.attributes.value}`:" "}function dZ(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` @${n.attributes.text} `}function hZ(n){return en(n,"inline-style-font-family")}function fZ(n){const e=en(n,"inline-style-background-color");return Ek(e)}function mZ(n){const e=en(n,"inline-style-color");return Ek(e)}function gZ(n){lZ(n);const e=en(n,"type")==="mention";return{box:n.attributes&&n.attributes.box?n.attributes:void 0,inlineCode:!!en(n,"style-code"),link:Ik(en(n,"link")),size:aZ(n),text:e?dZ(n):uZ(n)||n.insert,bold:!!en(n,"style-bold"),underline:!!en(n,"style-underline"),italics:!!en(n,"style-italic"),strike:!!en(n,"style-strikethrough"),superScript:!!en(n,"style-super"),subScript:!!en(n,"style-sub"),math:en(n,"type")==="math"?en(n,"src"):void 0,mention:e,fontFamily:hZ(n),background:fZ(n),color:e?"338fe5":oZ(xk(n,"style-color-",6))||mZ(n),highlight:xk(n,"style-bg-color-",13)}}function pZ(){return[new ge.Paragraph({border:{top:{color:"auto",style:ge.BorderStyle.DASHED,size:4,space:1}},spacing:{before:300}}),new ge.Paragraph({spacing:{line:0}})]}function CZ(){return new ge.Paragraph({children:[new ge.TextRun({text:"[\u89C6\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:ge.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function AZ(){return new ge.Paragraph({children:[new ge.TextRun({text:"[\u97F3\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:ge.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function bZ(n,e){return new ge.Paragraph({children:[new ge.ExternalHyperlink({children:[new ge.TextRun({style:"Hyperlink",text:e||n})],link:n})]})}function Tk(n){if(n.heading!=null)return`Heading${n.heading}`}function Dk(n){if(n.alignment!=null){if(n.alignment==="center")return ge.AlignmentType.CENTER;if(n.alignment==="right")return ge.AlignmentType.RIGHT;if(n.alignment==="left")return ge.AlignmentType.LEFT}}function vZ(n){if(n.indent)return{left:ge.convertInchesToTwip(.3*n.indent-.2)};if(n.padding)return{left:ge.convertInchesToTwip(.3*n.padding)}}function yZ(n){return{type:ge.ShadingType.CLEAR,color:"FFFFFF",fill:n}}function kZ(n){const e=n.split(",");if(e.length!==0)return e[0].trim()}function Sk(n,e){let t;t=n.inlineCode?"InlineCode":void 0,t=n.link?"Hyperlink":t;const o=n.size||e,r=o!=null?Math.floor(o*1.5+.5):void 0;return new ge.TextRun({text:n.text,bold:n.bold||void 0,underline:n.underline?{type:ge.UnderlineType.SINGLE}:void 0,italics:n.italics||void 0,strike:n.strike||void 0,superScript:n.superScript||void 0,subScript:n.subScript||void 0,size:r,style:t,font:n.fontFamily?kZ(n.fontFamily):void 0,shading:n.background?yZ(n.background):void 0,color:n.color,highlight:rZ(n.highlight)})}function wZ(n,e){if(n.link)return new ge.ExternalHyperlink({children:[Sk(n,e)],link:n.link})}async function Lk(n,e,t,o,r){const i=await r(n,e,t);if(i==null)return;const s=await wk({width:o||0,height:0,src:t},i);return new ge.ImageRun({data:i,transformation:{width:s.width||100,height:s.height||20}})}function BZ(n){if(n.heading||n.heading)return n.heading}function EZ(n){if(n.align&&(n.align==="center"||n.align==="right"||n.align==="left"))return n.align}function xZ(n){if(n.textOnly===!0&&n.level!=null)return n.level}async function IZ(n,e){var o;const t=[];if(n.text&&Array.isArray(n.text)){for(let r=0;r<n.text.length;r++){const i=n.text[r];if(((o=i.attributes)==null?void 0:o.box)===!0&&e){const s=await e(i);if(s){n.text.splice(r+1,0,...s);continue}}t.push(gZ(i))}return t}}function TZ(n){if(n.type==="list"&&n.textOnly!==!0)return{checkbox:n.checkbox,groupId:n.groupId,ordered:!!n.ordered,level:n.level||1,start:n.start||0}}function DZ(n,e){if(n.type==="embed"&&n.embedType&&Q2(n.embedType)&&n.embedData&&n.embedData.src)return n.embedData.src.split("|").map(o=>{const r=e(o),i=n.embedData[`${r}_width`],s=n.embedData[`${r}_height`];return{src:o,width:i,height:s}})}function SZ(n){if(n.padding)return n.padding}function LZ(n){return!!(n.type==="embed"&&n.embedType&&Q2(n.embedType)&&n.embedData&&n.embedData.src)}async function i1(n,e,t){return{quoted:!!n.quoted,heading:BZ(n),alignment:EZ(n),indent:xZ(n),padding:SZ(n),texts:await IZ(n,t),list:TZ(n),images:DZ(n,e),border:LZ(n)}}async function MZ(n,e,t,o){const r=[];if(!n.children)return[];for(const i of n.children){const s=[];for(const l of e.blocks[i])s.push(await i1(l,t,o));r.push(s)}return r}const RZ=S("to-docx");function OZ(n,e){return Array(n).fill(0).map(()=>Array(e).fill(0).map(()=>({cellId:void 0,color:void 0,from:void 0,rowSpan:1,colSpan:1,width:0,originalWidth:void 0,align:void 0})))}function _Z(n,e,t,o){const r=!!n.hasColTitle,i=!!n.hasRowTitle,s=!!n.isStripeStyle,l="F5F8FB";for(let a=0;a<e;a++)for(let d=0;d<t;d++)(r&&d===0||i&&a===0||s&&a%2===1)&&(o[a][d].color=l)}function FZ(n){g(RZ,n.children,"no table children");const e=n.rows,t=n.cols,o=n.colsWidth;if(o)for(let s=0;s<o.length;s++)o[s]===0&&(o[s]=100);const r=OZ(e,t);let i=0;for(let s=0;s<e;++s)for(let l=0;l<t;++l){if(r[s][l].originalWidth=o?o[l]:void 0,r[s][l].from!==void 0)continue;const a=n.children[i];i+=1,r[s][l].cellId=a,r[s][l].color=iZ(n[`${a}_background`]),r[s][l].width=o?o[l]:100,r[s][l].align=n[`${a}_align`];const d=n[`${a}_rowSpan`]||1,h=n[`${a}_colSpan`]||1;if(r[s][l].rowSpan=d,r[s][l].colSpan=h,d>1||h>1){let p=0;for(let A=0;A<d;A++)for(let v=0;v<h;v++)A===0&&(p+=o?o[l+v]:80),!(A===0&&v===0)&&(r[s+A][l+v].from=[s,l]);r[s][l].width=p}}return _Z(n,e,t,r),r}async function PZ(n,e,t,o,r,i,s,l,a,d){async function h(v){if(l){const B=await l(r,i,v);if(B){await o.addDoc(n,B,d);return}}if(v.type==="text"||v.textOnly===!0){const B=await i1(v,s,a);await o.addTextBlock(B);return}if(v.type==="code"){const B=await MZ(v,t,s,a);await o.addCodeBlockObject(B);return}if(v.type==="list"&&v.textOnly!==!0){const B=await i1(v,s,a);await o.addListBlockObject(n,B);return}if(v.type==="embed"&&v.embedType){const B=v,D=B.embedData,I=B.embedType;if(Q2(I)){const _=await i1(v,s,a);await o.addImagesBlockObject(v,_,d)}else v.embedType==="hr"?o.addSeparatorBlock():v.embedType==="video"?o.addVideoPlaceholder():v.embedType==="audio"?o.addAudioPlaceholder():v.embedType==="webpage"?o.addHyperlinkParagraph(Ik(D.src),D.title):o.addOtherEmbedBlock(I,v.embedData);return}if(v.type==="table"){let B=[];if(v.colsWidth)B=v.colsWidth;else{const I=v.cols;B=new Array(I);for(let _=0;_<B.length;_++)B[_]=100;v.colsWidth=B}const D=FZ(v);await o.addTableMatrix(B,D,t),o.addEmptyParagraph()}}function p(v){const B=[];for(const{type:D,data:I}of v.embedData.exportSpec){if(D==="text"){const _={id:K(),text:[{insert:I}],type:"text"};B.push(_);continue}if(D==="image"){const _={id:K(),type:"embed",embedType:"image",align:"left",embedData:{src:I}};B.push(_);continue}if(D==="link"){const _={id:K(),type:"embed",embedType:"webpage",embedData:{src:I.url,title:I.title}};B.push(_);continue}}return B}function A(v){var B;return(B=v==null?void 0:v.embedData)!=null&&B.exportSpec?p(v):[v]}for(const v of e)for(const B of A(v))await h(B)}function NZ(){return{listMaxInst:1,listInstMap:{},listRefMap:{},levelConfigs:[]}}const $Z=S("to-docx");class HZ{constructor(e,t,o,r,i,s){m(this,"paragraphs");this.appId=e,this.docId=t,this.state=o,this.readImageFunc=r,this.convertBlocksFunc=i,this.defaultFontSize=s,this.paragraphs=[]}async addTextBlock(e){this.paragraphs.push(new ge.Paragraph({heading:Tk(e),alignment:Dk(e),children:await this.paragraphsFromBlockTexts(e),indent:vZ(e)}))}async addEmptyImagePlaceHolder(){this.paragraphs.push(new ge.Paragraph({text:`[${R.t("docx.imageExportFailed")}]`,shading:{type:ge.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}}))}async paragraphsFromBlockTexts(e){if(e.texts==null)return;const t=cZ(this.defaultFontSize,e.heading),o=[];for(const r of e.texts){if(r.link){const i=wZ(r,t);i&&o.push(i);continue}if(r.box&&r.box.type&&r.box.type==="br"){o.push(new ge.TextRun({text:"",break:1}));continue}if(r.box&&r.box.type&&r.box.type==="image"){const i=await Lk(this.appId,this.docId,r.box.src,r.box.width,this.readImageFunc);i&&o.push(i);continue}if(r.math){const i=await Lk(this.appId,this.docId,r.math,0,this.readImageFunc);i&&o.push(i);continue}o.push(Sk(r,t))}return o}async addCodeBlockObject(e){for(const t of e)for(const o of t){const r={style:ge.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new ge.Paragraph({style:"Code",border:{left:{...r},right:{...r},top:{...r},bottom:{...r}},children:await this.paragraphsFromBlockTexts(o)}))}}async addListBlockObject(e,t){if(t.list==null)return;let o;const r=t.list.checkbox?`${e}-${t.list.groupId}-${t.list.checkbox}`:`${e}-${t.list.groupId}`;if(this.state.listInstMap[r])o=this.state.listInstMap[r];else if(o=this.state.listMaxInst,this.state.listMaxInst+=1,this.state.listInstMap[r]=o,t.list.start>0&&t.list.ordered){const s=`number-numbering-reference-${o}`,l=Bk([t.list.level-1],t.list.start);this.state.levelConfigs.push({levels:l,reference:s,inst:o}),this.state.listRefMap[r]=s}else t.list.ordered?this.state.listRefMap[r]=Hu.NUMBERING:t.list.checkbox&&t.list.checkbox==="checked"?this.state.listRefMap[r]=Hu.CHECKED:t.list.checkbox&&t.list.checkbox==="unchecked"?this.state.listRefMap[r]=Hu.UNCHECKED:this.state.listRefMap[r]=Hu.BULLET;const i=Tk(t);t.texts&&this.paragraphs.push(new ge.Paragraph({heading:i,children:await this.paragraphsFromBlockTexts(t),numbering:{reference:this.state.listRefMap[r],level:t.list.level-1,instance:o}}))}imageDimWithBufferToImageRun(e){return new ge.ImageRun({data:e.buffer,transformation:{width:e.width,height:e.height}})}async addImagesBlockObject(e,t,o){if(t.images==null){if(e.type==="embed"&&e.embedType==="image"){const{src:a}=e.embedData;a||this.addEmptyImagePlaceHolder()}return}const r=[],i=await Promise.all(t.images.map(async a=>{const d=await this.readImageFunc(this.appId,this.docId,a.src);if(d)return wk(a,d);r.push(a.src)})),s=KG(i,o),l={style:ge.BorderStyle.SINGLE,color:"#DEDEDE"};s.length&&this.paragraphs.push(new ge.Paragraph({border:t.border?{left:{...l},right:{...l},top:{...l},bottom:{...l}}:void 0,alignment:Dk(t)||ge.AlignmentType.CENTER,children:s.map(a=>this.imageDimWithBufferToImageRun(a)).flatMap((a,d,h)=>a==null?[]:h.length-1!==d?[a,new ge.TextRun({text:" "})]:a)})),r.forEach(a=>{this.addHyperlinkParagraph(a)})}addSeparatorBlock(){pZ().forEach(e=>this.paragraphs.push(e))}addEmptyParagraph(){this.paragraphs.push(new ge.Paragraph(""))}addVideoPlaceholder(){this.paragraphs.push(CZ())}addAudioPlaceholder(){this.paragraphs.push(AZ())}addHyperlinkParagraph(e,t){e!=null&&this.paragraphs.push(bZ(e,t))}async addTableMatrix(e,t,o){const r=e.map(i=>i!==0?i*15:1500);this.paragraphs.push(new ge.Table({rows:await this.generateTableRows(t,o),columnWidths:r}))}async generateRowCells(e,t){const o=[];for(const r of e){const i=r.cellId;if(i===void 0)continue;const s=r.width*.9;o.push(new ge.TableCell({children:await this.convertBlocksFunc(i,t.blocks[i],t,this.appId,this.docId,this.state,s),columnSpan:r.colSpan,rowSpan:r.rowSpan,width:{type:ge.WidthType.DXA,size:r.width*15},shading:r.color?{fill:r.color,type:ge.ShadingType.CLEAR,color:"auto"}:void 0}))}return o}async generateTableRows(e,t){const o=[];for(const r of e)o.push(new ge.TableRow({children:await this.generateRowCells(r,t)}));return o}async addDoc(e,t,o){const r=await this.convertBlocksFunc(e,t.blocks.root,t,this.appId,this.docId,this.state,o);r&&(this.paragraphs=this.paragraphs.concat(r))}async addOtherEmbedBlock(){}}class jZ{constructor(e,t,o,r,i,s,l,a){m(this,"convertBlocks",async(e,t,o,r,i,s,l=720)=>{const a=new HZ(r,i,s,this.readImage,this.convertBlocks,this.defaultFontSize);return await PZ(e,t,o,a,r,i,this.md5HexFunc,this.getDocByBlock,this.getTextsByBox,l||720),a.paragraphs});this.templateData=e,this.docData=t,this.md5HexFunc=o,this.readImage=r,this.defaultFontSize=i,this.getDocByBlock=s,this.getTextsByBox=l,this.backgroundImageOptions=a}async convert(e,t){return this.snapshot2docx(this.docData,e,t)}async snapshot2docx(e,t,o){const r=new ge.ImportDotx,i=this.templateData?await r.extract(this.templateData):void 0,s=e.blocks.root;g($Z,s,"data must have blocks");const l=NZ(),a=await this.convertBlocks("blocks",s,e,t,o,l),d=this.backgroundImageOptions?{default:new ge.Header({children:[new ge.Paragraph({children:[new ge.ImageRun(this.backgroundImageOptions)]})]})}:{},h=new ge.Document({numbering:{config:[...nZ,...l.levelConfigs]},sections:[{headers:d,children:a,properties:{page:{size:{width:12240,height:15840},margin:{top:1440,bottom:1440,left:1440,right:1440}}}}]},{template:i});return ge.Packer.toBlob(h)}}async function UZ(n,e,t,o){const r=n.doc.buildResourceUrl(o,{withToken:!0});let i=await p7(r);if(!i)return;if(i.type.indexOf("/svg")!==-1){const l=await f7(i);l&&(i=new File([l],i.name))}return await i.arrayBuffer()}async function zZ(n,e,t){const o=n.editorBlocks.getBlockClass(t.type);if(o.toStandardDoc)return o.toStandardDoc(n,t,e)}async function VZ(n,e){const t=e.attributes,o=n.editorBoxes.getBoxClass(t.type);if(o.toStandardText)return o.toStandardText(n,t)}async function WZ(n,e){let{template:t,download:o,backgroundImageOptions:r}=e!=null?e:{};t||(t=YG());const i=n.doc.toJSON(),s=(p,A,v)=>UZ(n,p,A,v),l=async(p,A,v)=>zZ(n,i,v),a=async p=>VZ(n,p),h=await new jZ(t,i,Pd.default,s,void 0,l,a,r).convert("_appId","_docId");if(o){const p=URL.createObjectURL(h),A=document.createElement("a");A.setAttribute("download",`${g7(n)}.docx`),A.setAttribute("href",`${p}`),A.click(),A.remove()}return h}const Y2=S("create-editor");async function qZ(n,e){var s,l,a,d,h,p,A,v,B,D,I,_,M,H;g(Y2,n,"app does not exists"),e.lang&&R.setLang(e.lang),Ii.level=(s=e.logLevel)!=null?s:ha.DEBUG;const t=e.onReauth?async()=>{var fe;const z=e.user.userId,q=e.docId,re=await((fe=e.onReauth)==null?void 0:fe.call(e,z,q,e.permission));return{userId:z,docId:q,permission:e.permission,appId:e.appId,token:re,displayName:e.user.displayName,avatarUrl:e.user.avatarUrl}}:void 0,o={auth:{appId:e.appId,docId:e.docId,userId:e.user.userId,permission:e.permission,token:e.token,displayName:e.user.displayName,avatarUrl:e.user.avatarUrl},serverUrl:e.serverUrl,reauthFunc:t,disableLogout:e.disableLogout},r=await Ka.load(o),i=Ha(n,r,{id:e.id,scrollContainer:e==null?void 0:e.scrollContainer,enableComments:e==null?void 0:e.enableComments,components:{blocks:[...bk,...((l=e==null?void 0:e.components)==null?void 0:l.blocks)||[]],embeds:[...Z2,...((a=e.components)==null?void 0:a.embeds)||[]],boxes:[...vk,...((d=e.components)==null?void 0:d.boxes)||[]],commandProviders:[new Gp,...((h=e.components)==null?void 0:h.commandProviders)||[]],decorators:[new Lf,new yp],insertions:[wg],blockHooks:[new t2,new W7,...((p=e.components)==null?void 0:p.blockHooks)||[]],textRenders:[new o8,new C0],options:{...e.componentsOptions}},shortcuts:[vz,DN,CH,O0,Ry,LO,S0,nV,Lh,...e.shortcuts||[]],colors:["#338FE5","#24B47E","#F0A100","#E52727","#9678D3","#2CB2AE","#EB6414","#8AAB3F"]});if(i.editorCommandProviders.registerCommandProvider(new Ar(i)),i.input.addHandler(new qV),i.input.addHandler(new If),i.input.addHandler(new Q_),i.input.addHandler(new hH),i.input.addHandler(new bu(i,{headingLevel:1,titlePlaceholder:R.t("placeholder.common.title"),contentPlaceholder:R.t("placeholder.common.content"),readonlyTitlePlaceholder:R.t("placeholder.common.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),i.input.addHandler(new Af(i,(A=e.componentsOptions)==null?void 0:A.quickMenu)),i.input.addHandler(new c2(i)),i.input.addHandler(new f2(i)),i.input.addHandler(new EN),i.input.addHandler(new Ff),i.doc.registerCallback(new GV(i)),i.addCustom("remote-cursor",()=>new Qb(i)),i.addCustom("block-menu",z=>new Z7(z)),i.addCustom("editor-tooltip",()=>new bf(i)),e!=null&&e.enableComments&&i.addCustom("editor-comments",z=>new n8(z,new VG(z))),i.addCustom("create-options",()=>new J5(i,e)),i.addCustom("drop-target",()=>new Su(i)),i.addCustom("list-to-mindmap",()=>new hf(i)),i.addCustom("list-to-mention",()=>new fW(i)),i.addCustom("mobile-helper",()=>new SW(i)),i.addCustom("code-caret",()=>new BN(i)),i.addCustom("image-paste-handler",()=>new l2(i)),(v=e.componentsOptions)!=null&&v.mention){const z=e.componentsOptions.mention;i.addCustom("mention",()=>new _2(i,z))}if(i.addCustom("heading-collapse",()=>new F8(i)),pc.register(i),Su.register(i),nl.register(i),Xi.register(i),i.addListener("clickLink",(z,q,re)=>{var Be;if((Be=e==null?void 0:e.events)!=null&&Be.onClickLink){e.events.onClickLink(z,q,re);return}const fe=re.getAttribute("link");fe&&(z.readonly||q.ctrlKey||q.metaKey)&&window.open(fe,"_blank")}),(D=(B=e.componentsOptions)==null?void 0:B.remoteCarets)!=null&&D.onUserChanged){const z=(_=(I=e.componentsOptions)==null?void 0:I.remoteCarets)==null?void 0:_.onUserChanged;i.doc.getRemoteUsers().on("change",q=>{z(i,q)})}return(H=(M=e.componentsOptions)==null?void 0:M.templates)!=null&&H.templates.length&&(i.addListener("docChanged",()=>{o1(i)}),i.addListener("resize",()=>{o1(i,{reset:!0})}),setTimeout(()=>{o1(i)},100)),i.doc.registerCallback({onError:async z=>{if(z.code==="ResetDoc"){Y2.error(`reset doc: ${z.message}`);const q=await Ka.load(o);i.doc.reset(q)}}}),i}function GZ(n){return n.toJSON!==void 0}async function ZZ(n,e,t){var i,s,l,a,d;g(Y2,n,"app does not exists");const o=GZ(e)?e:new np(e,{serverUrl:t.serverUrl||""});t.lang&&R.setLang(t.lang);const r=Ha(n,o,{id:t.id,scrollContainer:t==null?void 0:t.scrollContainer,components:{blocks:[xf,Sf,U0,E9],commandProviders:[new Gp],decorators:[new Lf,new yp],embeds:[...Z2,...((i=t.components)==null?void 0:i.embeds)||[]],boxes:[T0,F2,u8,...((s=t.components)==null?void 0:s.boxes)||[]],insertions:[wg],blockHooks:[new t2,...((l=t.components)==null?void 0:l.blockHooks)||[]],textRenders:[new o8,new C0,...((a=t.components)==null?void 0:a.textRenders)||[]],options:{...t.componentsOptions}},shortcuts:[O0,Ry,S0,Lh]});return r.editorCommandProviders.registerCommandProvider(new Ar(r)),r.input.addHandler(new If),r.input.addHandler(new bu(r,{headingLevel:1,titlePlaceholder:R.t("placeholder.common.title"),contentPlaceholder:R.t("placeholder.common.content"),readonlyTitlePlaceholder:R.t("placeholder.local.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),r.input.addHandler(new Af(r,(d=t.componentsOptions)==null?void 0:d.quickMenu)),r.input.addHandler(new c2(r)),r.input.addHandler(new f2(r)),r.input.addHandler(new Ff),r.addCustom("block-menu",h=>new Z7(h)),r.addCustom("editor-tooltip",()=>new bf(r)),r.addCustom("image-paste-handler",()=>new l2(r)),t!=null&&t.enableComments&&r.addCustom("editor-comments",h=>new n8(h,new WG(h,o))),r.addListener("clickLink",(h,p,A)=>{var B;if((B=t==null?void 0:t.events)!=null&&B.onClickLink){t.events.onClickLink(h,p,A);return}const v=A.getAttribute("link");v&&(h.readonly||p.ctrlKey||p.metaKey)&&window.open(v,"_blank")}),pc.register(r),r}function QZ(n,e){var a;const t=n.doc;if(!((a=t.getVersionHelper)==null?void 0:a.call(t)))throw new Error("the editor does not support to show versions");const r=n.getCustom("create-options");if(!r)throw new Error("the editor does not support to show versions");const i=r.getData(),s=new yk(i),l=n.addCustom("version-dialog",()=>new I8(n.doc,s));return l.show(e),l}b.tippy=zB,b.AnchorBox=A6,b.AuthError=Vh,b.AuthHeader=Ja,b.AutoScroll=Zd,b.BaseURLHeader=Wh,b.BasicCommands=y_,b.BlockExclusiveHook=W7,b.BlockLockerHook=t2,b.BlockLockerPasteHandler=Ff,b.BlockResizer=wu,b.BrBox=m6,b.CodeBlock=Sf,b.CodeLineBlock=U0,b.CodeTextDecorator=Lf,b.DefaultShortcuts=Lh,b.DocIdError=zS,b.DragDrop=dC,b.DrawioEmbed=z2,b.EditorBlocks=v4,b.EditorBoxes=p6,b.EditorCommandProviders=lb,b.EditorComplexBlockPosition=So,b.EditorComplexSelectionRange=or,b.EditorDecorators=k6,b.EditorEmbeds=k4,b.EditorInsertions=y6,b.EditorSimpleBlockPosition=jt,b.EditorSimpleSelectionRange=Zt,b.EmbedBlock=B4,b.EmbedBlockResizer=Fu,b.EnforceWithDocumentTitleHandler=bu,b.EventCallbacks=fa,b.FILL_CHAR=hI,b.FileExtError=VS,b.GroupOrder=D9,b.HeadingBlockScrollListener=lW,b.ImageBox=C6,b.InlineBoxCommandProvider=P9,b.InputtingInsertion=b6,b.LocalDoc=np,b.LogLevel=ha,b.Logger=Ii,b.MIN_DISTANCE_THRESHOLD=aC,b.ManualCloseDialog=ru,b.ManualMenu=zs,b.ManualToolbar=ou,b.MarkdownInputHandler=If,b.MaxUserError=mp,b.Mindmap=f0,b.OnesEditorAutoSuggest=Np,b.OnesEditorCustomDataWrapper=J5,b.OnesEditorExclusiveBlock=Xi,b.OnesEditorHoveringBlock=pt,b.OnesEditorQuickMenu=Af,b.OnesEditorToc=Pu,b.OnesEditorTocProvider=nl,b.OnesEditorToolbar=pc,b.OnesEditorTooltip=bf,b.OnesEditorVersionsDialog=I8,b.PermissionError=US,b.Popup=Xa,b.RemoteCarets=Qb,b.RemoteCaretsDecorator=yp,b.RemoteCaretsInsertion=wg,b.RemoteUsers=Fh,b.RequestReloadError=Ya,b.RichText=ln,b.ShareDBDoc=Ka,b.ShareDBDocVersionsProvider=yk,b.SimpleCache=X5,b.StandardEmbedBlockCommands=I2,b.TEXT_STYLE_BACKGROUND_COLOR_PREFIX=fg,b.TEXT_STYLE_COLOR_PREFIX=hg,b.TableBlock=xf,b.TableBlockCommandProvider=Gp,b.TableShortcuts=O0,b.TextBlock=In,b.TextBox=f6,b.TextStyleShortcuts=S0,b.TocEmbed=j8,b.ZERO_WIDTH_SPACE_CHAR=ma,b.abbreviation=Qd,b.addAttribute=dh,b.addClass=W,b.addCommentToBlock=Xf,b.addDays=ME,b.addMetaToDoc=Rh,b.addMonths=LE,b.animateScrollTo=km,b.applyPlaceholderToBlock=Tf,b.assert=g,b.autoShowHideTemplates=o1,b.blockToDoc=Kg,b.blockToHtml=Ig,b.blockToMarkdown=Tg,b.blockToText=bh,b.blocksToDoc=ST,b.clearAllSelection=t4,b.clientType=Kt,b.cloneBlock=Fi,b.cloneChildContainer=Ng,b.cloneDoc=$g,b.cloneText=o6,b.commentToShareDbComment=vp,b.compareElement=jd,b.comparePosition=Xm,b.complexBlockAdjustSelectionPos=oh,b.complexBlockFindNearestChildBlock=T4,b.complexBlockGeFirstSimpleChild=tg,b.complexBlockGetAllChildContainers=En,b.complexBlockGetBottomChildContainers=I4,b.complexBlockGetLastSimpleChild=Vl,b.complexBlockGetSelectedContainers=Os,b.complexBlockGetTopChildContainers=x4,b.containerToDoc=PA,b.continuousScroll=DC,b.convertBlockFrom=Xd,b.convertImageFileToPng=f7,b.convertImageSrcToPng=GP,b.copyBlockAttributes=_6,b.createBlockAnchor=Li,b.createBlockCaretAnchor=M4,b.createBlockContentElement=Ts,b.createBlockElement=VC,b.createBlockSimpleDocRange=gh,b.createBlockSimpleRange=yt,b.createBoxContentElement=GC,b.createBoxElement=WC,b.createBoxOp=Z4,b.createChildContainer=A4,b.createComplexBlockPosition=ft,b.createComplexDocPos=a6,b.createComplexDocRange=gI,b.createContainer=s6,b.createContainerElement=Gm,b.createDeleteOps=V4,b.createEditor=Ha,b.createEditorSelectionRange=Ut,b.createElement=w,b.createEmptyContainer=zr,b.createEmptyDoc=Ur,b.createEmptyTextBlockData=fh,b.createExpandedRange=$d,b.createIconButton=Hl,b.createImage=pm,b.createInsertOps=ah,b.createInsertionContentElement=YC,b.createInsertionElement=ZC,b.createLocalEditor=ZZ,b.createOnesEditor=qZ,b.createRange=eC,b.createRichText=Oi,b.createRootContainer=C4,b.createSimpleBlockPosition=se,b.createSimpleDocPos=c6,b.createTextBlockData=sr,b.createTextButton=Qs,b.createTextOp=lo,b.createTextWithReplaceSoftReturn=ag,b.daysAfter=Rm,b.deleteText=dg,b.diffDays=RE,b.disablePageScroll=wC,b.docToHtml=S6,b.docToHtmlFragment=vh,b.docToMarkdown=Ma,b.docToText=La,b.downloadImageToFile=p7,b.downloadObjectToFile=H2,b.downloadSvgToString=Q8,b.editLink=fu,b.editorAddComment=rz,b.editorAddTextAttribute=q6,b.editorAutoInsertBlock=F6,b.editorBreakTextBlock=Yl,b.editorClearCompositionText=O6,b.editorClearSelectedContents=Fg,b.editorCopyBlock=Oh,b.editorDeleteBlock=Og,b.editorDeleteBlockText=Mg,b.editorDeleteBlockWithoutChildren=wh,b.editorDeleteChildContainer=aT,b.editorDeleteChildContainers=P6,b.editorFocusToBlock=Pg,b.editorFocusToEnd=_A,b.editorGetBlockData=_i,b.editorGetBlockText=mn,b.editorGetBlockTextEx=Ch,b.editorGetBoxData=d6,b.editorHandleKeyboardEvent=jA,b.editorInsertBlock=Ql,b.editorInsertBoxToBlock=M6,b.editorInsertDoc=V6,b.editorInsertDocAt=Hg,b.editorInsertText=Lg,b.editorInsertTextToBlock=L6,b.editorInsertTextToBlockEx=Sg,b.editorMergeTextBlock=N6,b.editorMoveDown=rA,b.editorMoveEnd=mA,b.editorMoveHome=gA,b.editorMoveLeft=tA,b.editorMoveLineEnd=wA,b.editorMoveLineHome=kA,b.editorMovePageDown=DA,b.editorMovePageUp=TA,b.editorMoveRight=nA,b.editorMoveUp=oA,b.editorMoveWordEnd=dA,b.editorMoveWordLeft=uA,b.editorRangeClearColor=Z6,b.editorRangeGetColor=jg,b.editorRangeSetColor=G6,b.editorRemoveTextAttribute=fT,b.editorReplaceBlockText=Eh,b.editorReplaceContainer=W6,b.editorRunOnce=op,b.editorSelectAll=OA,b.editorSelectContainer=Yg,b.editorSelectDown=iA,b.editorSelectEnd=Zg,b.editorSelectHome=pA,b.editorSelectLeft=sA,b.editorSelectLineEnd=yA,b.editorSelectLineHome=vA,b.editorSelectPageDown=LA,b.editorSelectPageUp=SA,b.editorSelectRight=lA,b.editorSelectUp=cA,b.editorSelectWordEnd=fA,b.editorSelectWordLeft=hA,b.editorSetTextColor=Jl,b.editorShowFindDialog=dU,b.editorToDocx=WZ,b.editorUpdateBlockData=xh,b.editorUpdateCompositionText=R6,b.editorUpdateEmbedData=U6,b.enablePageScroll=BC,b.escapeHtmlText=sC,b.escapeRegExp=Pm,b.escapeSpace=gE,b.exclusiveBlock=K0,b.executeBlockCommand=u4,b.executeEmbedBlockCommand=a4,b.executeRangeCommand=sb,b.fileToDataUrl=Ul,b.findAfterOffsetNotType=vg,b.findAllText=Cg,b.findEventTargetBlock=rC,b.findInsertionById=QC,b.findNextOffset=MI,b.findNextVisibleSimpleBlock=hb,b.findPrevOffset=LI,b.findPrevOffsetNotType=bg,b.findPrevSimpleBlockBeforeChildContainer=E4,b.findPrevVisibleSimpleBlock=db,b.findTarget=jl,b.findWordEnd=kg,b.findWordLeft=yg,b.format=ba,b.formatBytes=SC,b.formatDate=_m,b.fragmentToHtml=EC,b.fromBase64=zd,b.fromBase64ToBlob=Dm,b.fromBase64ToUint8Array=xE,b.fromDocRange=Si,b.fromNowString=Fm,b.genId=K,b.getAllChildBlocks=og,b.getAllQuickMenuItems=D0,b.getAllSelectedBlocks=Lo,b.getAttributesAt=Ta,b.getBlockBackground=zC,b.getBlockByIndex=_r,b.getBlockCaretRect=To,b.getBlockClass=Qe,b.getBlockClassByType=Ms,b.getBlockClientRects=Ti,b.getBlockCommandsWithHook=Wm,b.getBlockContent=Re,b.getBlockId=ie,b.getBlockIndex=be,b.getBlockInfo=Iu,b.getBlockKind=Io,b.getBlockMinWidth=o4,b.getBlockNearestRangeFromPoint=L4,b.getBlockOptions=VE,b.getBlockPath=Di,b.getBlockProperties=s4,b.getBlockRangeFromPoint=rh,b.getBlockStyles=zE,b.getBlockTextLength=ue,b.getBlockTools=lt,b.getBlockType=De,b.getBoxContent=Hm,b.getBoxId=qC,b.getBoxTypeFromElement=va,b.getChildBlockCount=Eo,b.getChildBlocks=vt,b.getChildOffset=Mi,b.getColorFromAttributes=gg,b.getColorFromContent=Yd,b.getComplexBlockClass=jn,b.getContainerBlockPath=m4,b.getContainerBlocks=e4,b.getContainerBlocksElement=th,b.getContainerById=$r,b.getContainerId=ae,b.getContainerMinWidth=Qm,b.getContainerToolsElement=QE,b.getContainerWidth=b4,b.getDistanceSquare=tr,b.getElementOffset=ga,b.getElementScale=ys,b.getEmbedType=Un,b.getExistsBlockTools=Kd,b.getExistsContainerById=f4,b.getFileExt=Aa,b.getFirstChildBlock=St,b.getFirstClientRect=Hd,b.getHeadingMenuOptions=B0,b.getHorizontalPadding=Cm,b.getInsertionContent=jm,b.getLastChildBlock=Gt,b.getLastClientRect=bs,b.getListAllNextBrothers=dc,b.getLogger=S,b.getNextBlock=Ze,b.getNextValidOffset=Fs,b.getNextVisibleBlock=Ss,b.getOffsetInfoAfter=Sa,b.getOffsetInfoBefore=Ah,b.getOpAt=Y4,b.getOpLength=uh,b.getParentBlock=oe,b.getParentBlockExcludeSelf=Is,b.getParentBox=$m,b.getParentContainer=ne,b.getPrevBlock=ct,b.getPrevValidOffset=Ri,b.getPrevVisibleBlock=Ds,b.getRangeCommands=rb,b.getRootBlock=Vm,b.getScrollContainer=oo,b.getSpecialBlockCommands=l4,b.getStandardEmbedBlockProperties=T2,b.getTextAfterOffset=DI,b.getTextAttributes=Dg,b.getTextBeforeOffset=SI,b.getTextBlockChild=eh,b.getTextBlockClass=KC,b.getTextBlockContentChildTextLength=so,b.getTextBlockContentChildType=d4,b.getTextBlockContentChildren=nr,b.getTextLength=rn,b.getTextOpLength=rg,b.getTextWidth=Wd,b.getToolbar=lf,b.handleBlockElementUpdated=r4,b.hasAltOnly=yE,b.hasClass=xe,b.hasCtrlOrCmd=AC,b.hasCtrlOrCmdOnly=vE,b.hashCode=PC,b.hideBlock=jC,b.htmlToFragment=Vd,b.i18n=R,b.injectDocToHtmlFragment=Mh,b.injectStyle=cC,b.insertEmptyBlock=GE,b.insertEmptyEmbedBlock=qm,b.insertText=jr,b.intersectionCommands=_D,b.isBackspace=vC,b.isBlock=xs,b.isBlockLocked=_f,b.isBlockLockedByOthers=e2,b.isBlockLockedBySelf=Tu,b.isBlockTools=HC,b.isBox=Nm,b.isCJK=gC,b.isChildContainer=Do,b.isChildNode=Ke,b.isCollapsedRange=mI,b.isComplexBlockPosition=Km,b.isComplexKindBlock=Le,b.isContainer=Fr,b.isContainerSelectedAllChildBlocks=MA,b.isControlEvent=ws,b.isDelete=wE,b.isDraggingFiles=qd,b.isElementVisible=ym,b.isEmbedBlock=Lt,b.isEmptyContainer=Ym,b.isEmptyDoc=Ag,b.isEmptyTextBlock=ht,b.isEmptyTextBlockWithoutCompositionText=Au,b.isEnterOnly=bC,b.isEscape=Im,b.isExclusiveBlock=Of,b.isFirefox=Em,b.isFirstChildBlockInComplexBlock=Ix,b.isHighSurrogate=aE,b.isInBlock=Um,b.isInBlockTools=Ls,b.isLetter=mC,b.isLowSurrogate=gm,b.isMatchShortcut=Or,b.isMoveForward=AE,b.isNavigationEvent=CE,b.isNavigationKey=CC,b.isNodeRemoved=nC,b.isNumber=fC,b.isPrintableKey=xm,b.isRootBlock=ro,b.isRootContainer=Xe,b.isSafari=pC,b.isSameDay=Om,b.isSecureEnv=j0,b.isShiftEnter=kE,b.isShiftTab=EE,b.isShortcutEvent=bE,b.isSimpleBlock=UE,b.isSimpleBlockPosition=Hr,b.isSimplePos=l6,b.isSimpleRange=mh,b.isSpace=Ud,b.isTab=BE,b.isTextBlockContentBoxChild=io,b.isTextBlockContentChild=ka,b.isTextBlockContentInsertionChild=Nr,b.isTextBlockContentTextChild=wa,b.isTextKindBlock=ee,b.isTextKindBlockType=ya,b.isToday=LC,b.isValidOffset=sn,b.isVisibleBlock=Jd,b.isYesterday=MC,b.loadJs=oC,b.loadJsPromise=vs,b.lockers=wo,b.mergeCommands=sf,b.mergeDocs=$s,b.mergeOps=ug,b.mergeText=cI,b.multiSplitText=_4,b.overflowText=RC,b.parseShortcut=yC,b.patchNode=Ca,b.pointInRect=ks,b.rangeAddAttribute=Ia,b.rangeGetTextColor=n6,b.rangeRemoveAttribute=ql,b.rangeSetTextColor=X4,b.rangeTransformText=J4,b.registerDragDrop=wm,b.removeAttribute=mg,b.removeClass=te,b.removeLastBr=rI,b.removePlaceholderFromBlock=i7,b.removeStyle=lC,b.replaceAll=OE,b.replaceAllCaseInsensitive=_E,b.replaceAllText=i6,b.replaceText=hh,b.requestDownload=Gd,b.resetListStart=fc,b.scrollable=TC,b.selectFile=zl,b.selectedBlockToDoc=Th,b.selectionToDoc=Dh,b.setAttributes=bm,b.setClipboardData=Mm,b.setClipboardDataByEvent=SE,b.setColorToAttributes=e6,b.setDataset=Am,b.setDefaultCursor=pa,b.setStyles=vm,b.shareDBCommentToDocObject=bp,b.shareDBDocCommentToComment=Gb,b.shortcutToDisplayText=Bo,b.showBlock=UC,b.showDocVersions=QZ,b.splitText=xn,b.splitToThree=zt,b.stringToDataUrl=Sm,b.stringToObjectUrl=Lm,b.subText=F4,b.textNodeOffsetFromPoint=tC,b.titleFromEditor=g7,b.toBase64URL=Bs,b.toMindmap=df,b.toPlainText=rt,b.toPlainTextKeepLength=pg,b.trimChar=Bm,b.unexclusiveBlock=X0,b.unicodeLength=uE,b.unicodeSubstr=dE,b.updateBlockSelection=n4,b.updateOpAttributes=r6,b.updateTextBlockContent=TI,b.updateUrl=Tm;for(const n in bt)n!=="default"&&!b.hasOwnProperty(n)&&Object.defineProperty(b,n,{enumerable:!0,get:()=>bt[n]});Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Embed, Box, i18n, OnesEditor, OnesEditorUser, OnesEditorUserPermission, OnesEditorBlockHook, OnesEditorCommandProvider, LogLevel, Block, ShortcutRecords } from '../@ones-editor/core';
|
|
1
|
+
import { Embed, Box, i18n, OnesEditor, OnesEditorUser, OnesEditorUserPermission, OnesEditorBlockHook, OnesEditorCommandProvider, LogLevel, Block, ShortcutRecords, OnesEditorBlockRenderer } from '../@ones-editor/core';
|
|
2
2
|
import { DrawIoOptions } from '../@ones-editor/drawio-embed';
|
|
3
3
|
import { MermaidEmbedOptions } from '../@ones-editor/graph-embed';
|
|
4
4
|
import { ImageOptions } from '../@ones-editor/image-embed';
|
|
@@ -76,6 +76,7 @@ export interface CreateLocalEditorOptions {
|
|
|
76
76
|
embeds?: Embed[];
|
|
77
77
|
boxes?: Box[];
|
|
78
78
|
blockHooks?: OnesEditorBlockHook[];
|
|
79
|
+
textRenders?: OnesEditorBlockRenderer[];
|
|
79
80
|
};
|
|
80
81
|
serverUrl?: string;
|
|
81
82
|
enableComments?: boolean;
|