@ones-editor/editor 1.1.16-beta.3 → 1.1.16-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -791,7 +791,7 @@ ${s}
|
|
|
791
791
|
`:o.src?`[${o.fileName}](${n.doc.buildResourceUrl(o.src,{withToken:!0})})`:`[${o.fileName}]`}async function VY(n,t,e,r){const{onGetFileDownloadUrl:i}=n.getComponentOptions("file")||{},o=t.embedData,s=i?await i(n,o):void 0;return{blocks:{root:[{type:"embed",id:et(),embedType:"webpage",embedData:{src:s||o.src,title:o.fileName}}]},meta:{},comments:{}}}function $Y(){return[]}const HY={embedType:"office",createEmbedContent:NY,getBlockProperties:FY,convertTo:KY,toStandardDoc:VY,getResources:$Y},jY={file:{abstract:"\u9644\u4EF6",commands:{download:"\u4E0B\u8F7D",toLink:"\u8F6C\u4E3A\u6807\u9898",toCard:"\u8F6C\u4E3A\u5361\u7247",comment:"\u6279\u6CE8"}}},zY={file:{abstract:"Attachment",commands:{download:"Download",toLink:"To Link",toCard:"To Card",comment:"Annotation"}}},GY={file:{abstract:"\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB",commands:{download:"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9",toLink:"\u30BF\u30A4\u30C8\u30EB\u306B\u5909\u63DB",toCard:"\u30AB\u30FC\u30C9\u306B\u5909\u63DB",comment:"\u6CE8\u91C8"}}};D.mergeLang({"zh-CN":jY,"en-US":zY,"ja-JP":GY});function WY(n){const t=/(\s|^)(http|https):\/\/[\w\-]+(\.[\w\-]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?$/;return t.test(n)?n.search(t):-1}function qY(n){const t=n.selection.range;if(!t.isCollapsed()||!t.isSimple())return;const{start:e}=t,r=n.getBlockById(e.blockId);if(!rt(n,r))return;const i=n.getBlockText(r),s=X1(i).slice(0,e.offset),l=WY(s);if(l===-1)return;const c=s.slice(l),d=s.length;let h=hu(l,d-l,i,"link",c);return h=Zi(h,d," ",null),n.setBlockText(r,h),n.selection.selectBlock(r,d+1),!0}const XY={Space:qY},sut="",YY={version:{latest:"\u6700\u65B0\u7248\u672C",insert:"{name} \u6DFB\u52A0",delete:"{name} \u5220\u9664",goBack:"\u8FD4\u56DE",revertVersion:"\u8FD8\u539F\u5185\u5BB9",play:"\u64AD\u653E\u5386\u53F2\u64CD\u4F5C",versionList:"\u5386\u53F2\u7248\u672C ({count})",versionListHeader:"\u5386\u53F2\u7248\u672C",unknown:"\u672A\u77E5\u7248\u672C",restoreFrom:"\u56DE\u6EDA\u81EA\u7248\u672C\u300C{from}\u300D",restoreInfo:"\u56DE\u6EDA\u7684\u7248\u672C\u6682\u4E0D\u652F\u6301\u4E0E\u4E0A\u4E00\u7248\u672C\u5BF9\u6BD4",versionInfoLeft:'<span class="text-1">\u5F53\u524D\u7248\u672C: </span><span class="name">{versionName}</span><span class="text-2"> \u4E0E</span>',versionInfoRight:'<span class="text-3">\u5BF9\u6BD4</span>',noSelectedVersion:"\u672A\u9009\u62E9\u7248\u672C",noMemoedVersion:"\u6682\u65E0\u5DF2\u5907\u6CE8\u7684\u5386\u53F2\u7248\u672C",noFilterVersion:"\u6682\u65E0\u5339\u914D\u7ED3\u679C",memo:"\u5907\u6CE8",revert:"\u56DE\u6EDA",filter:{all:"\u5168\u90E8",memoed:"\u5DF2\u5907\u6CE8",allVersions:"\u5168\u90E8\u5386\u53F2\u7248\u672C",memoVersions:"\u5DF2\u5907\u6CE8\u7684\u5386\u53F2\u7248\u672C"},textarea:{placeholder:"\u8BF7\u8F93\u5165\u7248\u672C\u5907\u6CE8"},tooltip:{help:`1. \u56DE\u6EDA\u7248\u672C\u4E0D\u652F\u6301\u4E0E\u56DE\u6EDA\u524D\u7248\u672C\u8FDB\u884C\u5BF9\u6BD4\uFF1B
|
|
792
792
|
2. \u82E5\u4E24\u4E2A\u7248\u672C\u4E4B\u95F4\u5B58\u5728\u56DE\u6EDA\u7248\u672C\uFF0C\u5219\u4E0D\u652F\u6301\u5BF9\u6BD4\u3002`,user:"\u7248\u672C\u53D1\u5E03\u8005\uFF1A{name}",auth:"\u6682\u65E0\u9875\u9762\u7F16\u8F91\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458"},dropdownHeader:"\u4EC5\u5C55\u793A\u53EF\u4E0E\u5F53\u524D\u7248\u672C\u8FDB\u884C\u5BF9\u6BD4\u7684\u5386\u53F2\u7248\u672C",dropdown:{header:"\u6240\u6709\u53EF\u5BF9\u6BD4\u7684\u7248\u672C"},noVersions:"\u6682\u65E0\u53EF\u5BF9\u6BD4\u7684\u7248\u672C",lastVersion:"\u4E0A\u4E00\u7248\u672C",filterMemoed:"\u7B5B\u9009\u5DF2\u5907\u6CE8\u7684\u7248\u672C"}},QY={version:{latest:"Latest",insert:"Added by {name}",delete:"Deleted by {name}",goBack:"Back",revertVersion:"Revert",play:"Play",versionList:"Historical versions ({count})",versionListHeader:"Historical versions",unknown:"Unknown version",restoreFrom:"Rolled back from version {from}",restoreInfo:"The rolled back version does not currently support comparison with the previous version.",versionInfoLeft:'<span class="text-1">Current version: </span><span class="name">{versionName}</span><span class="text-2"> Compare with</span>',versionInfoRight:'<span class="text-3"></span>',noSelectedVersion:"Not selected",noMemoedVersion:"No historical commented versions",noFilterVersion:"No result",memo:"Comment",revert:"Roll back",filter:{all:"All",memoed:"Commented",allVersions:"All historical versions",memoVersions:"Historical versions with comments"},textarea:{placeholder:"Enter comment"},tooltip:{help:`1. A rolled back version can't be compared with versions before it.
|
|
793
793
|
2. Versions can't be compared if there are rolled back versions between them.`,user:"Released by {name}",auth:"No edit permission for this page. Contact the admin."},dropdownHeader:"The list below only contains historical versions that can be compared with the current version",dropdown:{header:"All historical versions that can be compared"},noVersions:"No comparable versions available",lastVersion:"Previous version",filterMemoed:"Filter versions with comments"}},JY={version:{latest:"\u6700\u65B0",insert:"{name}\u304C\u8FFD\u52A0\u3057\u307E\u3057\u305F",delete:"{name}\u304C\u524A\u9664\u3057\u307E\u3057\u305F",goBack:"\u623B\u308B",revertVersion:"\u5185\u5BB9\u3092\u5FA9\u5143",play:"\u5C65\u6B74\u3092\u518D\u751F",versionList:"\u30D0\u30FC\u30B8\u30E7\u30F3\u5C65\u6B74 {count}",versionListHeader:"\u30D0\u30FC\u30B8\u30E7\u30F3\u5C65\u6B74",unknown:"\u672A\u77E5\u306E\u30D0\u30FC\u30B8\u30E7\u30F3",restoreFrom:"\u5FA9\u5143\u3055\u308C\u305F\u30D0\u30FC\u30B8\u30E7\u30F3\uFF1A{from}",restoreInfo:"\u5C65\u6B74\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u4EE5\u524D\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u6BD4\u8F03\u3067\u304D\u307E\u305B\u3093\u3002",versionInfoLeft:'<span class="text-1">\u73FE\u5728\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\uFF1A</span><span class="name">{versionName}</span><span class="text-2"> \u3068</span>',versionInfoRight:'<span class="text-3">\u3092\u6BD4\u8F03\u3059\u308B</span>',noSelectedVersion:"\u672A\u9078\u629E",noMemoedVersion:"\u5099\u8003\u306E\u3042\u308B\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u3042\u308A\u307E\u305B\u3093",noFilterVersion:"\u4E00\u81F4\u3057\u305F\u7D50\u679C\u306F\u3042\u308A\u307E\u305B\u3093",memo:"\u5099\u8003",revert:"\u5FA9\u5143",filter:{all:"\u3059\u3079\u3066",memoed:"\u5099\u8003\u3042\u308A",allVersions:"\u3059\u3079\u3066",memoVersions:"\u5099\u8003\u3042\u308A"},textarea:{placeholder:"\u8AAC\u660E\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"},tooltip:{help:`1. \u5FA9\u5143\u3055\u308C\u305F\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u305D\u308C\u4EE5\u524D\u306E\u53E4\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u6BD4\u8F03\u3067\u304D\u307E\u305B\u3093\u3002
|
|
794
|
-
2. \u4E8C\u3064\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u9593\u306B\u5FA9\u5143\u3055\u308C\u305F\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u3042\u308B\u5834\u5408\u3001\u3053\u306E\u4E8C\u3064\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u6BD4\u8F03\u3067\u304D\u306A\u3044\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002`,user:"\u30D0\u30FC\u30B8\u30E7\u30F3\u4F5C\u6210\u8005\uFF1A{name}",auth:"\u3053\u306E\u30B9\u30DA\u30FC\u30B9\u3092\u7DE8\u96C6\u3059\u308B\u6A29\u9650\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u7BA1\u7406\u8005\u306B\u3054\u9023\u7D61\u304F\u3060\u3055\u3044\u3002"},dropdownHeader:"\u73FE\u5728\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u6BD4\u8F03\u3067\u304D\u308B\u30D0\u30FC\u30B8\u30E7\u30F3\u3060\u3051\u8868\u793A\u3055\u308C\u307E\u3059",dropdown:{header:"\u6BD4\u8F03\u53EF\u80FD\u306A\u30D0\u30FC\u30B8\u30E7\u30F3"},noVersions:"\u6BD4\u8F03\u53EF\u80FD\u306A\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u3042\u308A\u307E\u305B\u3093",lastVersion:"\u524D\u306E\u30D0\u30FC\u30B8\u30E7\u30F3",filterMemoed:"\u5099\u8003\u3042\u308A"}};D.mergeLang({"zh-CN":YY,"en-US":QY,"ja-JP":JY});var H4=(n=>(n.NEW="history-new",n.NEW_CHILD="history-new-child",n.DELETED="history-deleted",n.UPDATED="history-updated",n.HISTORY="history",n))(H4||{});const vl="--op-color",Bl="--op-selected-color",lut="";class ZY{constructor(t){m(this,"root");this.content=t;const e=B("div",["editor-dialog-root"],null);e.append(t),this.root=e}show(t=document.body){t.append(this.root)}hide(){this.root.remove()}destroy(){}}function Tl(n){var e;let t;if(n.version!==-1){const r=new Date((e=n.created)!=null?e:n.version);t=Qg(r,"YYYY-MM-DD hh:mm")}else t=D.t("version.latest");return t}function f0(n){return n.source&&typeof n.source=="object"&&!!n.source.restore}const aut="";class tQ{constructor(t,e){m(this,"textArea");m(this,"warning");m(this,"end",!1);m(this,"root");m(this,"handleBlur",()=>{var t,e;this.end||(e=(t=this.options)==null?void 0:t.onend)==null||e.call(t,this.textArea.value,!1)});m(this,"handleKeyDown",t=>{var e,r,i,o;t.isComposing||(t.key==="Enter"||t.key==="Tab"?(t.preventDefault(),(r=(e=this.options)==null?void 0:e.onend)==null||r.call(e,this.textArea.value,!1),this.end=!0):t.key==="Escape"&&(t.preventDefault(),(o=(i=this.options)==null?void 0:i.onend)==null||o.call(i,this.textArea.value,!0),this.end=!0))});m(this,"handleInput",t=>{const e=t.target,{value:r}=e;r.length>this.maxLength-10?this.warning.innerText=`${r.length}/${this.maxLength}`:this.warning.innerText="",this.autoSize()});var r,i;this.maxLength=t,this.options=e,this.root=B("div",["size-limit-textarea",...(r=e==null?void 0:e.classes)!=null?r:[]],null),this.textArea=B("textarea",["size-limit-textarea-input"],this.root),this.warning=B("div",["size-limit-textarea-warning"],this.root),this.textArea.addEventListener("input",this.handleInput),this.textArea.addEventListener("blur",this.handleBlur),this.textArea.addEventListener("keydown",this.handleKeyDown),this.textArea.maxLength=t,this.textArea.placeholder=(i=e==null?void 0:e.placeholder)!=null?i:""}destroy(){this.textArea.removeEventListener("input",this.handleInput),this.textArea.removeEventListener("blur",this.handleBlur),this.textArea.removeEventListener("keydown",this.handleKeyDown)}setValue(t){this.textArea.value=t,this.autoSize()}autoSize(){const t=Math.max(this.textArea.scrollHeight+2,60);this.textArea.style.height="auto",this.textArea.style.height=`${t}px`}resetSize(){this.textArea.style.height="auto";const t=Math.max(this.textArea.scrollHeight+2,60);this.textArea.style.height=`${t}px`}focus(){this.textArea.focus(),this.end=!1}}const cut="",{t:nr}=D,j4=I("version-list");class cc{constructor(t){m(this,"versionsList");m(this,"versionsListHeader");m(this,"versionFilterToolbar");m(this,"memoInput",null);m(this,"selectedVersion",null);m(this,"handleClickVersionItem",t=>{const e=t.target,r=e.closest(".version-item");if(!this.isVersionElement(r))return;const i=St(r,"active");if(i&&e.closest(".version-item-memo")&&this.options.enableEdit){this.editItemMemo(r);return}const o=this.getVersionFromElement(r);if(this.setActiveItem(r),e.closest(".add-memo-button")&&this.options.enableEdit){this.handleAddMemo(o,r);return}if(e.closest(".revert-button")&&this.options.enableEdit){this.handleRevert(o,r);return}if(i)return;const{onSelectVersion:s}=this.options;s(o)});m(this,"handleEndEditItemMemo",(t,e)=>{var i,o,s;const r=(i=this.memoInput)==null?void 0:i.root.closest(".version-item");if(this.isVersionElement(r)&&(st(r,"editing"),!e)){const l=this.getVersionFromElement(r),c=t.replace(/[\n\r]+/g," ");if(((o=l.extra)==null?void 0:o.memo)!==c){l.extra={memo:c},this.options.versionHelper.updateVersionExtra(l.version,l.tagId,l.extra).then(()=>{var h,C;(C=(h=this.options).onMemoChanged)==null||C.call(h,l)});const d=r.querySelector(".version-item-memo");p(j4,d,"no memo element"),d.textContent=c}}(s=this.memoInput)==null||s.root.remove()});m(this,"handleRevert",(t,e)=>{const{onRevert:r}=this.options;r(t)});m(this,"handleFilterClick",(t,e)=>{let r=this.options.versions;e.id==="memoed"&&(r=r.filter(o=>{var s;return!!((s=o.extra)!=null&&s.memo)}));const i=this.createVersionItems(r,e.id);this.versionsList.innerHTML="",this.versionsList.append(i),this.versionFilterToolbar.updateItems(cc.getFilterItems(e.id)),this.updateHeaderCount(r.length)});var c;this.options=t;const{versions:e}=t,r=B("div",["version-list-header"],null),i=nr("version.versionList",{count:`${e.length}`});B("span",["version-count"],r,i),this.versionFilterToolbar=cc.createFilterToolbar(r),this.versionFilterToolbar.addListener("click",this.handleFilterClick),this.selectedVersion=t.selectedVersion||e[0];const o=B("div",["version-list-content"],null),s=this.createVersionItems(e,"all");o.append(s),this.versionsList=o,this.versionsListHeader=r,o.onclick=this.handleClickVersionItem;const l=this.activeVersion;l&&((c=this.options)==null||c.onSelectVersion(l))}static createFilterToolbar(t){const e=B("div",["version-list-filter"],t);return new UP(e,cc.getFilterItems("all"),{tooltipId:"version-viewer"})}static getFilterItems(t){return[{id:"filter",name:nr(t==="all"?"version.filter.all":"version.filter.memoed"),dropdown:!0,manualShowChildren:!0,childrenPlacement:"bottom-start",childrenOffset:[0,16],childArrow:!0,children:[{id:"all",states:t==="all"?["checked"]:[],name:nr("version.filter.allVersions")},{id:"memoed",states:t==="memoed"?["checked"]:[],name:nr("version.filter.memoVersions")}]}]}createVersionItems(t,e){const r=document.createDocumentFragment();if(t.length===0){const o=B("div",["version-list-empty"],r);return o.textContent=nr("version.noMemoedVersion"),r}const i=(o,s,l,c=!1)=>{var L,M,U,F,J,q,Y,ot,pt,At,xt;const d=B("div",["version-item"],r);d.versionData=o,s&&z(d,"child"),o.created===((L=this.selectedVersion)==null?void 0:L.created)&&z(d,"active");const h=B("div",["version-item-title"],d);B("div",["version-item-date"],h,Tl(o)),c&&B("div",["version-item-latest"],h,nr("version.latest")),B("div",["spacer"],h);const C=B("div",["version-actions"],h),E=B("button",["add-memo-button"],C);if(E.textContent=nr("version.memo"),!this.options.enableEdit){z(E,"disabled");const Bt=(F=(U=(M=this.options).getDisabledTip)==null?void 0:U.call(M))!=null?F:D.t("version.tooltip.auth");E.setAttribute("data-editor-tooltip-common",Bt)}if(!c){const Bt=B("button",["revert-button"],C);if(Bt.textContent=nr("version.revert"),!this.options.enableEdit){z(Bt,"disabled");const Ot=(Y=(q=(J=this.options).getDisabledTip)==null?void 0:q.call(J))!=null?Y:D.t("version.tooltip.auth");Bt.setAttribute("data-editor-tooltip-common",Ot)}}let A="";if(typeof o.source=="object"&&((ot=o.source)==null?void 0:ot.restore)){const Bt=o.source.restore,Ot=this.options.versions.find(he=>he.version==Bt),Ne=Ot?Tl(Ot):nr("version.unknown");A=nr("version.restoreFrom",{from:Ne})}B("div",["version-item-restore-from"],d,A),B("div",["version-item-memo"],d,((pt=o.extra)==null?void 0:pt.memo)||"");const v=B("ul",["version-item-authors"],d),k=Bt=>{const Ot=B("li",["version-item-author"],v),Ne=B("span",["version-item-author-mark"],Ot);Ne.style.background=this.options.getMarkColor(Bt),B("span",["version-item-author-name"],Ot,Bt.displayName).setAttribute("data-editor-tooltip-common",D.t("version.tooltip.user",{name:Bt.displayName}))};if(this.options.useCreatedBy)if(o.createdBy){const Bt=o.createdBy;k(Bt)}else o.authors&&o.authors.length>0&&o.authors.forEach(Bt=>{k(Bt)});else if(o.authors&&o.authors.length>0)o.authors.forEach(Bt=>{k(Bt)});else if(o.createdBy){const Bt=o.createdBy;k(Bt)}(xt=(At=this.options).decorateItem)==null||xt.call(At,d,o)};return t.forEach((o,s)=>{i(o,!1,t,o.created===this.options.versions[0].created),o.minorVersions&&o.minorVersions.length>0&&o.minorVersions.forEach(l=>{i(l,!0,t,!1)})}),r}isVersionElement(t){return t?St(t,"version-item"):!1}getVersionFromElement(t){return t.versionData}get activeVersion(){return this.options.versions.find(t=>{var e;return t.created===((e=this.selectedVersion)==null?void 0:e.created)})}setActiveItem(t){if(St(t,"active"))return;const e=this.versionsList.querySelector(".version-item.active");e&&st(e,"active"),z(t,"active"),this.selectedVersion=this.getVersionFromElement(t)}handleAddMemo(t,e){this.editItemMemo(e)}editItemMemo(t){var r;this.memoInput||(this.memoInput=new tQ(256,{onend:this.handleEndEditItemMemo,classes:["memo-input"],placeholder:nr("version.textarea.placeholder")}));const e=t.querySelector(".version-item-restore-from");p(j4,e,"no title element"),e.insertAdjacentElement("afterend",this.memoInput.root),z(t,"editing"),this.memoInput.setValue(((r=t.versionData.extra)==null?void 0:r.memo)||""),this.memoInput.resetSize(),this.memoInput.focus()}updateHeaderCount(t){const e=this.versionsListHeader.querySelector(".version-count");e&&(e.textContent=nr("version.versionList",{count:`${t.toString()}`}))}getVersionItemByVersionNum(t){const e=Array.from(this.versionsList.children).find(r=>r.versionData.version===t);return this.isVersionElement(e)?e:null}selectVersionByVersionNum(t){const e=this.getVersionItemByVersionNum(t);return e?(this.setActiveItem(e),this.getVersionFromElement(e)):null}render(t){t.innerHTML="",t.append(this.versionsListHeader,this.versionsList)}destroy(){this.versionsList.onclick=null,this.versionFilterToolbar.destroy()}}class eQ{constructor(t,e){this.doc=t,this.user=e}onDeleteBlock(t,e){this.doc.onDeleteBlock(t,e,this.user)}onInsertBlock(t,e,r){this.doc.onInsertBlock(t,e,r,this.user)}onUpdateBlockText(t,e,r){this.doc.onUpdateBlockText(t,e,r,this.user)}onUpdateBlockData(t,e,r){this.doc.onUpdateBlockData(t,e,r,this.user)}onCreateContainer(t,e){this.doc.onCreateContainer(t,e,this.user)}onCreateComment(){}onDeleteComment(){}onDeleteContainer(){}onUpdateComment(){}}async function nQ(n,t,e){for(const r of e){const i=new eQ(n,r.user);t.parseHistoryData(r,i)}}const En=I("split-text-actions");function z4(n){return n.length>2?!1:n.length===1?n[0].insert!==void 0:(p(En,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].insert!==void 0)}function G4(n){return n.length>2?!1:n.length===1?n[0].delete!==void 0:(p(En,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].delete!==void 0)}function W4(n){return n.length>2?!1:n.length===1?n[0].insert===void 0&&n[0].delete===void 0&&n[0].attributes!==void 0:(p(En,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].attributes!==void 0)}function rQ(n){const t=[],e=mt.default(n);if(e.length===0)return[];if(e.length===1)return[n];if(e.length===2&&(G4(n)||z4(n)||W4(n)))return[n];const r=(o,s)=>o>0?[{retain:o},s]:[s];let i=0;for(;e.length>0;){const o=e[0];if(o.retain!==void 0&&o.attributes===void 0){p(En,o.retain>0,`invalid text op: ${JSON.stringify(o)}`),p(En,e.length>1,`invalid text op: ${JSON.stringify(o)}`);const s=e[1];p(En,s.delete||s.insert!==void 0||s.attributes!==void 0,`invalid next text op: ${JSON.stringify(s)}`),i+=o.retain,t.push(r(i,s)),s.delete!==void 0?i-=s.delete:s.insert!==void 0?i+=s.insert.length:(p(En,s.attributes!==void 0,`invalid next text op: ${JSON.stringify(s)}`),p(En,s.retain!==void 0,`invalid next text op: ${JSON.stringify(s)}`),i+=s.retain),e.splice(0,2)}else p(En,o.delete||o.insert!==void 0||o.attributes!==void 0,`invalid next text op: ${JSON.stringify(o)}`),t.push(r(i,o)),e.shift(),o.retain!==void 0&&(p(En,o.attributes!==void 0,`invalid next text op: ${JSON.stringify(o)}`),i+=o.retain),o.insert&&(i+=o.insert.length)}return t}function q4(n){if(p(En,n.length===1||n.length===2,`not a single action op: ${JSON.stringify(n)}`),n.length===1)return 0;const t=n[0].retain;return p(En,typeof t=="number"&&t>0,`invalid retain: ${JSON.stringify(n)}`),t}let X4=0;function iQ(n,t,e){const r=X4;X4+=1;const i=de(n);return{insert:" ",attributes:{box:!0,id:et(),type:"history-deleted-box",user:e,created:Date.now(),text:i,deletedOffset:t,deletedOrder:r}}}function oQ(n,t,e){const r=q4(t),i=t.length===1?t[0].delete:t[1].delete;p(En,typeof i=="number",`not a delete op: ${JSON.stringify(t)}`);const{left:o,middle:s,right:l}=Ze(n,r,i);if(s.length===1&&zo(s[0])){const h=s[0];return p(En,h.attributes,"invalid box"),h.attributes.deletedBy=e,[...o,h,...l]}const c=iQ(s,r,e);return[...o,c,...l]}function sQ(n,t,e){const r=q4(t),i=t.length===1?t[0].insert:t[1].insert;p(En,typeof i=="string",`invalid insert op: ${JSON.stringify(t)}`);const o=t.length===1?t[0].attributes:t[1].attributes,l=uh([{insert:i,attributes:o}],"insertedBy",e);return Zi(n,r,l,null)}function lQ(n,t,e){const r=rQ(t);let i=n;for(const o of r)G4(o)?i=oQ(i,o,e):z4(o)?i=sQ(i,o,e):(p(En,W4(o),`unknown op: ${JSON.stringify(o)}`),i=gn.apply(i,o));return i}const aQ=I("history-update-block-text");function Y4(n){const t=[],e=[];let r=0;return n.forEach(i=>{var o;if((o=i.attributes)!=null&&o.box){const s=i.attributes;if(s.type==="history-deleted-box"){t.push({boxData:s,offset:r});return}}e.push(i),r+=ch(i)}),t.sort((i,o)=>o.offset-i.offset),{deletedBoxes:t,newText:e}}function cQ(n,t,e){let r=n;return t.forEach(i=>{const o=gn.transformCursor(i.offset,e,!1);r=Zi(r,o,[{insert:" ",attributes:i.boxData}],null)}),r}function uQ(n){n.sort((t,e)=>t.boxData.deletedOffset!==e.boxData.deletedOffset?t.boxData.deletedOffset-e.boxData.deletedOffset:t.boxData.deletedOrder-e.boxData.deletedOrder)}function fQ(n){if(n.length<=1)return n;const t=n[0].offset;n.forEach(e=>{p(aQ,e.offset===t,`invalid boxes group, ${JSON.stringify(n)}`)}),uQ(n);for(let e=n.length-1;e>=1;e--){const r=n[e],i=n[e-1];r.boxData.user.userId===i.boxData.user.userId&&(i.boxData.text+=r.boxData.text,n.splice(e,1))}return n}function dQ(n){let{newText:t,deletedBoxes:e}=Y4(n);const r=new Map;return e.forEach(o=>{let s=r.get(o.offset);s||(s=[],r.set(o.offset,s)),s.push(o),s.sort((l,c)=>l.boxData.deletedOffset-c.boxData.deletedOffset)}),Array.from(r.values()).sort((o,s)=>s[0].offset-o[0].offset).forEach(o=>{const s=o[0].offset;fQ(o).reverse().forEach(l=>{t=Zi(t,s,[{insert:" ",attributes:l.boxData}],null)})}),t}function hQ(n,t,e){let{newText:r,deletedBoxes:i}=Y4(n);return r=lQ(r,t,e),r=cQ(r,i,t),r=dQ(r),r}const Li=I("history-doc");function Ii(n){p(Li,!1,"no local actions for history doc")}class mQ extends ua{constructor(t,e){super(),this.server=t,this.docObject=e}beginBatchUpdate(){return 0}endBatchUpdate(){return 0}toJSON(){return mt.default(this.docObject)}getContainerBlocks(t){return this.docObject.blocks[t]}findContainerBlocks(t){const e=this.docObject.blocks[t];return e!=null?e:null}getBlockData(t,e){const r=this.getContainerBlocks(t);p(Li,r,`no container data: ${t}`);const i=r[e];return p(Li,i,`no block data: ${e}`),i}localUpdateBlockText(){Ii()}localUpdateBlockData(){Ii()}localInsertBlock(){Ii()}localDeleteBlock(){Ii()}localInsertChildContainers(){Ii()}localDeleteChildContainers(){Ii()}uploadResource(){Ii()}async addResources(t){Ii()}getServerMeta(){var t,e,r;return(r=(e=(t=this.server).getServerMeta)==null?void 0:e.call(t))!=null?r:{}}buildResourceUrl(t){return this.server.buildResourceUrl(t)}request(){Ii()}broadcastMessage(){Ii()}getUser(){return{permission:"w",userId:"-",displayName:"-",avatarUrl:"-",rainbowIndex:0}}getRemoteUsers(){const t=["#0064FF4D","#00A8654D","#F593004D","#EB37234D","#8851ED4D","#009CAD4D","#F25A0A4D","#70A3104D"];return new Lu(t)}destroy(){this.clearCallbacks()}transformBlockIndex(t,e,r){const i=this.docObject.blocks[t];p(Li,i,`no container blocks: ${t}`);let o=0;for(let s=0;s<i.length;s++)if(!i[s].deletedBy){if(o===e)return s;o++}return r&&p(Li,!1,`invalid block index: ${e}, blocks: ${JSON.stringify(i)}`),p(Li,o===e,`invalid block index: ${e}, blocks: ${JSON.stringify(i)}`),i.length}onDeleteBlock(t,e,r){const i=this.transformBlockIndex(t,e,!0),s=this.docObject.blocks[t][i];p(Li,!s.deleted,`block has already deleted: ${t}/${e}`),s.deletedBy=r,this.callbacks.forEach(l=>{var c;return(c=l.onUpdateBlockData)==null?void 0:c.call(l,t,i,{insert:{},delete:[]},!0)})}onInsertBlock(t,e,r,i){const o=this.transformBlockIndex(t,e,!1),s=this.docObject.blocks[t],l=mt.default(r);l.insertedBy=i,s.splice(o,0,l),this.callbacks.forEach(c=>{var d;return(d=c.onInsertBlock)==null?void 0:d.call(c,t,o,l,!0)})}onUpdateBlockText(t,e,r,i){const o=this.transformBlockIndex(t,e,!0),l=this.docObject.blocks[t][o];p(Li,!l.deleted,`block has already deleted: ${t}/${e}`);const c=l.text;p(Li,c,`no text for block: ${JSON.stringify(l)}`);const d=hQ(c,r,i);l.text=d,this.callbacks.forEach(h=>{var C;return(C=h.onUpdateBlockText)==null?void 0:C.call(h,t,o,r,!0)})}onUpdateBlockData(t,e,r,i){const o=this.transformBlockIndex(t,e,!0),s=this.docObject.blocks[t],l=s[o];p(Li,!l.deleted,`block has already deleted: ${t}/${e}`);const c=mt.default(l);c.updatedBy=i,r.delete.forEach(d=>delete c[d]),Object.entries(r.insert).forEach(([d,h])=>{c[d]=h}),s[o]=c,this.callbacks.forEach(d=>{var h;return(h=d.onUpdateBlockData)==null?void 0:h.call(d,t,o,r,!0)})}onCreateContainer(t,e,r){this.docObject.blocks[t]=mt.default(e),this.callbacks.forEach(i=>{var o;return(o=i.onInsertChildContainer)==null?void 0:o.call(i,t,e,!0)})}}const{t:Q4}=D;function uc(n,t){return t==="insert"?Q4("version.insert",{name:n.displayName}):Q4("version.delete",{name:n.displayName})}function ps(n,t){const{userId:e}=t;return["flag","selection"].reduce((i,o)=>{const s=n.getFixedUserColor(e,o);return i[o]=s,i},{})}class gQ{renderBox(t,e,r){if(r.deletedBy){const{flag:i,selection:o}=ps(t.doc.getRemoteUsers(),r.deletedBy);return{classes:["history-deleted-box"],styles:{[vl]:i,[Bl]:o}}}return{}}renderText(t,e,r){if(!r.box&&r.insertedBy){const i=r.insertedBy,{flag:o,selection:s}=ps(t.doc.getRemoteUsers(),r.insertedBy);return{classes:["history-inserted-text"],attributes:{"history-inserted-by":i.displayName,"data-op-description":uc(i,"insert")},styles:{[vl]:o,[Bl]:s}}}return{}}renderBlock(t,e,r){if(r.deletedBy){const i=r.deletedBy,{flag:o,selection:s}=ps(t.doc.getRemoteUsers(),i);return{classes:["history-deleted-block"],attributes:{"history-deleted-by":i.displayName,"data-op-description":uc(i,"delete")},styles:{[vl]:o,[Bl]:s}}}if(r.insertedBy){const i=r.insertedBy,{flag:o,selection:s}=ps(t.doc.getRemoteUsers(),i);return{classes:["history-inserted-block"],attributes:{"history-inserted-by":i.displayName,"data-op-description":uc(i,"insert")},styles:{[vl]:o,[Bl]:s}}}return{}}updateBlock(t,e,r,i){if(i.deletedBy){const o=i.deletedBy,{flag:s,selection:l}=ps(t.doc.getRemoteUsers(),o);z(r,"history-deleted-block"),$d(r,{"history-inserted-by":o.displayName,"data-op-description":uc(o,"delete")}),Ng(r,{[vl]:s,[Bl]:l});return}if(i.insertedBy){const o=i.insertedBy,{flag:s,selection:l}=ps(t.doc.getRemoteUsers(),o);z(r,"history-inserted-block"),$d(r,{"history-inserted-by":o.displayName,"data-op-description":uc(o,"insert")}),Ng(r,{[vl]:s,[Bl]:l})}}}const J4=I("history-deleted-box");function pQ(n,t,e,r){const i=r;p(J4,i.text,`no text for text box data: ${JSON.stringify(r)}`),p(J4,typeof i.text=="string",`invalid text type for text box data: ${JSON.stringify(r)}`);const o=B("span",["history-deleted-box"],e,i.text),s=i.user,{flag:l,selection:c}=ps(n.doc.getRemoteUsers(),s);o.setAttribute("history-deleted-by",s.displayName),o.setAttribute("data-op-description",uc(s,"delete")),o.style.setProperty(vl,l),o.style.setProperty(Bl,c)}function CQ(n,t,e,r){return t.text}const EQ={boxType:"history-deleted-box",updateBoxContent:pQ,convertTo:CQ},uut="",AQ=I("versions-dropdown"),Z4=(n,t)=>{if(!t)return n;let e="";const r=t.length,i=t.toLocaleLowerCase();let o=0;for(o=0;o<=n.length-r;o){let s=n.substring(o,o+r);if(s.toLocaleLowerCase()===i){o+=r;const l=n.charAt(o);let c=!1;s.endsWith(" ")&&(c=!0,s=s.trimEnd()),e+=`<span class="highlight">${s}${l===" "||c?" ":""}</span>`}else e+=n.charAt(o),o++}return o<n.length&&(e+=n.substring(o)),e};class xQ{constructor(t,e){m(this,"dropdown");m(this,"versions",[]);m(this,"currentVersion",null);m(this,"compareWithVersion",null);m(this,"filterMemoed",!1);m(this,"keywords","");m(this,"createFilterMemoedFilterItem",t=>{const e=B("div",["filter-memoed-version-item"],null);t&&B("div",["filter-item-info"],e,D.t("version.dropdown.header"));const r=B("div",["filter-item-input-container"],e),i=kP("filter-check",this.filterMemoed?["checked"]:void 0);r.appendChild(i);const o=B("label",["filter-item-label"],r,D.t("version.filterMemoed"));return o.htmlFor=i.id,r.onclick=this.handleInputChange,e});m(this,"filterItems",(t,e)=>{var o,s;if(this.keywords=e,!e)return!0;if(t.type==="section"||t.id==="last-version")return!1;const r=e.toLocaleLowerCase();if(t.name.toLocaleLowerCase().indexOf(r)!==-1)return!0;const i=t.data;return!!(i&&((o=i.extra)==null?void 0:o.memo)&&((s=i.extra)==null?void 0:s.memo.toLocaleLowerCase().indexOf(r))!==-1)});m(this,"handleClose",()=>{});m(this,"handleClear",()=>{this.options.onCompareWithVersion(null)});m(this,"handleClickItem",t=>{const e=t.data,r=Tl(e);this.dropdown.setText(r),this.options.onCompareWithVersion(e)});m(this,"handleInputChange",t=>{const i=t.target.closest('[data-id="filter-memoed"]').querySelector('[data-button-id="filter-check"]');i&&St(i,"checked")?this.filterMemoed=!1:this.filterMemoed=!0,this.resetItems()});this.options=e,this.dropdown=new EC(t,{placeholder:D.t("version.noSelectedVersion"),emptyPlaceholder:D.t("version.noFilterVersion"),popupId:"versions-dropdown-popup",header:this.createHeader(),filter:this.filterItems,onClose:this.handleClose,onClickItem:this.handleClickItem,onClear:this.handleClear,highlight:!0,disableSelectedScroll:!0})}createHeader(){const t=B("div",["versions-dropdown-header"],null),e=B("span",["versions-dropdown-header-info"],t);e.innerHTML=D.t("version.dropdownHeader");const r=B("span",["versions-dropdown-header-icon"],t);return r.setAttribute("data-editor-tooltip-common",D.t("version.tooltip.help")),r.setAttribute("data-editor-tooltip-placement","right"),r.innerHTML=cC,r.onclick=this.options.onHelp,t}setVersions(t){this.versions=t}setCurrentVersion(t,e){this.dropdown.setText(""),this.dropdown.setLabels([]),e&&(this.dropdown.setText(Tl(e)),(e.version===-1||e.created===this.versions[0].created)&&this.dropdown.setLabels([D.t("version.latest")])),this.currentVersion=t,this.compareWithVersion=e!=null?e:null,this.resetItems()}resetItems(){var E;if(this.versions.length===0)return;const t=this.currentVersion;if(!t)return;const e=t.version===-1?0:this.versions.findIndex(A=>A.version===t.version);p(AQ,e!==-1,"version not found");const r=this.versions[0],i=A=>{var F;const v=A.data,k=B("div",["version-item-container"],null),L=B("div",["version-item-line1"],k),M=A.id==="last-version"?D.t("version.lastVersion"):Tl(v),U=B("div",["version-item-name"],L);if(this.keywords?U.innerHTML=Z4(M,this.keywords):U.innerText=M,v.created===r.created&&B("div",["version-item-latest"],L,D.t("version.latest")),((F=v.extra)==null?void 0:F.memo)&&A.id!=="last-version"){const J=B("div",["version-item-line2"],k),q=B("div",["version-item-memo"],J,v.extra.memo);this.keywords?q.innerHTML=Z4(v.extra.memo,this.keywords):q.innerText=v.extra.memo,q.setAttribute("title",v.extra.memo)}return k.onclick=()=>{this.handleClickItem(A),this.dropdown.close()},k},o=[],s=this.versions[e+1],l=s&&!f0(t);if(l){const A={id:"last-version",name:"Last version",data:s,element:i};o.push(A)}let c=e;for(let A=e-1;A>=0;A-=1){const v=this.versions[A];if(f0(v))break;c=A}let d=e;if(!f0(t))for(let A=e+1;A<this.versions.length;A+=1){const v=this.versions[A];if(d=A,f0(v))break}let h=!1;const C=[];for(let A=c;A<=d;A+=1){const v=this.versions[A];if(v.version!==t.version&&v.version!==(s==null?void 0:s.version)&&(!this.filterMemoed||((E=v.extra)==null?void 0:E.memo))){h=!0;let k=Tl(v),L=`${v.version}`;A===e+1&&(k="Previous version",L="prev-version");const M={id:L,name:k,data:v,element:i};C.push(M)}}if((l||h||this.filterMemoed)&&o.push({id:"filter-memoed",type:"section",name:"",element:this.createFilterMemoedFilterItem(o.length>0&&l),states:["disabled"]}),o.push(...C),!h){const A={id:"no-versions",type:"section",name:"No versions",states:["disabled"],element:B("span",["version-item-empty"],null,D.t("version.noVersions"))};o.push(A)}this.dropdown.updateItems(o)}}class bQ{constructor(t,e){m(this,"left");m(this,"right");m(this,"dropdown");const r=B("div",["version-info-container"],t);this.left=B("div",["version-info-left"],r),this.dropdown=new xQ(r,e),this.right=B("div",["version-info-right"],r)}setVersion(t,e,r){const i=`<span class="version-item-latest">${D.t("version.latest")}</span>`,o=`${Tl(t)}${r?i:""}`;this.left.innerHTML=D.t("version.versionInfoLeft",{versionName:o}),this.right.innerHTML=D.t("version.versionInfoRight",{versionName:o}),this.dropdown.setCurrentVersion(t,e)}}const Cs=I("version-dialog");class tS{constructor(t,e){m(this,"dialog",null);m(this,"oldViewer",null);m(this,"versionOptions");m(this,"versionList",null);m(this,"provider");m(this,"versions",[]);m(this,"components");m(this,"handleRevert",async t=>{var r,i,o;p(Cs,this.versionList,"The versionList did not render");const e=t!=null?t:(r=this.versionList)==null?void 0:r.activeVersion;p(Cs,e,`The version: ${e} is invalid`),!(((i=this.versionOptions)==null?void 0:i.onBeforeRevert)&&await this.versionOptions.onBeforeRevert(e))&&(await this.versionHelper.revertVersion(e.version),(o=this.dialog)==null||o.hide())});m(this,"handleSelectVersion",t=>{p(Cs,t,`The version: ${t} is invalid`),this.viewVersion(t)});m(this,"handleCompareWithVersion",t=>{var r;const e=(r=this.versionList)==null?void 0:r.activeVersion;p(Cs,e,"no active version"),this.viewVersion(e,t!=null?t:void 0)});m(this,"handleHelp",()=>{var t,e;(e=(t=this.versionOptions)==null?void 0:t.onHelp)==null||e.call(t)});m(this,"viewVersion",async(t,e)=>{var h,C;const r=this.versions[0].created===t.created;if(this.components.infoHeader.setVersion(t,e,r),this.oldViewer&&(this.oldViewer.destroy(),this.oldViewer=null),!this.versionList)return;(h=this.versionOptions)!=null&&h.onWillChangeVersion&&this.versionOptions.onWillChangeVersion(this,t),this.renderEditorLoading();const i=e==null?void 0:e.version;let o,s;if(i){const E=Math.min(t.version,i),A=Math.max(t.version,i),v=await this.versionHelper.getHistoryData(A,E);o=v.doc,s=v.historyData}else o=await this.versionHelper.getVersion(t.version),s=[];const{editorContainer:l}=this.components;l.innerHTML="";const c=new mQ(this.server,o),d=this.provider.createHistoryEditor(l,c);d.editorBlockRenders.registerRender(new gQ),d.editorBoxes.registerBoxClass(EQ),z(d.rootElement,H4.HISTORY);try{await nQ(c,this.versionHelper,s)}finally{this.oldViewer=d}(C=this.versionOptions)!=null&&C.onVersionChanged&&this.versionOptions.onVersionChanged(this,d,t)});m(this,"onMemoChanged",t=>{var e,r;(r=(e=this.versionOptions)==null?void 0:e.onMemoChanged)==null||r.call(e,t),this.components.infoHeader.dropdown.resetItems(),this.components.infoHeader.dropdown.setVersions(this.versions)});this.server=t,this.provider=e;const r=B("div",["version-dialog"],null),i=B("div",["version-viewer"],r),o=new bQ(i,{onCompareWithVersion:this.handleCompareWithVersion,onHelp:this.handleHelp}),s=B("div",["version-dialog-editor"],i),l=B("div",["version-list-root"],r);this.components={root:r,editorContainer:s,listContainer:l,infoHeader:o}}get versionHelper(){p(Cs,this.server.getVersionHelper,"Can not get getVersionHelper from doc");const t=this.server.getVersionHelper();return p(Cs,t,"current doc does not support version"),t}get editor(){return this.oldViewer}renderContent(t){var i,o,s;const{listContainer:e}=this.components;e.innerHTML="";const r=new cc({enableEdit:((i=this.versionOptions)==null?void 0:i.enableEdit)||!1,getDisabledTip:(o=this.versionOptions)==null?void 0:o.getDisabledTip,versions:t,versionHelper:this.versionHelper,useCreatedBy:(s=this.versionOptions)==null?void 0:s.useCreatedBy,onSelectVersion:this.handleSelectVersion,onRevert:this.handleRevert,onMemoChanged:this.onMemoChanged,getMarkColor:l=>{const{flag:c}=ps(this.server.getRemoteUsers(),l);return c}});r.render(e),this.versionList=r}initViewVersion(){var t;if(p(Cs,this.versionList,"no versionList"),(t=this.versionOptions)!=null&&t.initSelectedVersion){const{initSelectedVersion:e}=this.versionOptions,r=this.versionList.selectVersionByVersionNum(e);p(Cs,r,`version ${e} not found`),this.viewVersion(r)}else{const e=this.versionList.activeVersion;e&&this.viewVersion(e)}}renderEditorLoading(){const{editorContainer:t}=this.components;if(t.querySelector(":scope > .version-loading"))return;t.innerHTML="";const e=B("div",["version-loading"],null);e.appendChild(w2()),t.appendChild(e)}renderListLoading(){const{listContainer:t}=this.components;t.innerHTML="";const e=B("div",["version-list-header"],null),r=D.t("version.versionListHeader");B("span",["version-count"],e,r),cc.createFilterToolbar(e);const i=B("div",["version-loading"],null);i.appendChild(w2()),t.append(e,i)}async show(t){this.versionOptions={...this.versionOptions,...t};const{root:e}=this.components;z(e,"loading"),this.renderListLoading(),this.renderEditorLoading(),this.dialog||(this.dialog=new ZY(e)),this.dialog.show(t.container),this.versions=await this.versionHelper.getVersions(),st(this.components.root,"loading"),this.versionOptions.onVersionsLoaded&&this.versionOptions.onVersionsLoaded(this,this.versions),this.components.infoHeader.dropdown.setVersions(this.versions),this.renderContent(this.versions),this.initViewVersion()}destroy(){var t,e,r;(t=this.dialog)==null||t.destroy(),(e=this.versionList)==null||e.destroy(),(r=this.editor)==null||r.destroy()}}const vQ={expandCollapseButton:{expand:"\u5C55\u5F00",collapse:"\u6536\u8D77"}},BQ={expandCollapseButton:{expand:"Expand",collapse:"Collapse"}},TQ={expandCollapseButton:{expand:"\u5C55\u958B",collapse:"\u7E2E\u5C0F"}};D.mergeLang({"zh-CN":vQ,"en-US":BQ,"ja-JP":TQ});const fut="",yQ=I("heading-collapse");class mA{constructor(t){m(this,"collapsedHeadingBlocks",new Map);this.editor=t}setCollapsed(t,e,r){if(!e){this.collapsedHeadingBlocks.delete(t);return}p(yQ,r,"heading should be provided when set heading collapsed"),this.collapsedHeadingBlocks.set(t,r)}isCollapsed(t){return this.collapsedHeadingBlocks.has(t)}getCollapsedHeading(t){return this.collapsedHeadingBlocks.get(t)}destroy(){this.collapsedHeadingBlocks.clear()}}function gA(n,t){return n.addCustom("heading-collapse-handler",()=>new mA(n)).isCollapsed(t)}function pA(n,t,e,r){n.addCustom("heading-collapse-handler",()=>new mA(n)).setCollapsed(t,e,r)}function kQ(n,t){return n.addCustom("heading-collapse-handler",()=>new mA(n)).getCollapsedHeading(t)}I("heading-collapse");function eS(n,t,e=!1){const i=ie(t).querySelector(".heading-collapse-button");i&&$d(i,{[`data-editor-tooltip-${n.clientId}-dynamic`]:e?D.t("expandCollapseButton.expand"):D.t("expandCollapseButton.collapse")})}function _f(n,t){if(!mr(t))return;n.selection.selectBlock(t,0);const e=pa(t);eS(n,t,!0),e.forEach(i=>{Nv(i)}),z(t,"heading-collapsed");const r=iu(t);pA(n,t.id,!0,r)}function CA(n,t){eS(n,t),st(t,"heading-collapsed");const e=lt(t);pA(n,e,!1)}function RQ(n,t){t.forEach(e=>{Ye(e)&&CA(n,e),n1(e)})}function fc(n,t,e){pa(t,e).forEach(i=>{Ye(i)&&CA(n,i),n1(i)}),CA(n,t)}function wQ(n,t){o3(t)?_f(n,t):fc(n,t)}function nS(n){if(Ue(n))return!1;const e=it(n);return qt(e)}const SQ=[Zh,tm,em,nm,rm,im,om,sm];function LQ(n){const t=B("button",["heading-collapse-button"],null);return t.setAttribute(`data-editor-tooltip-${n.clientId}-dynamic`,D.t("expandCollapseButton.collapse")),t.innerHTML=R2,t}function rS(n){return Wm(n).querySelector("button.heading-collapse-button")}function EA(n,t){rS(t)||nS(t)||!mr(t)||ME(t,LQ(n),-1)}function iS(n){var t;(t=rS(n))==null||t.remove()}function oS(n,t){Wm(t).querySelector("button.heading-collapse-button")||EA(n,t)}function IQ(n){const t=iu(n),e=B("button",["heading-marker"],null);return e.innerHTML=SQ[t-1],e}function sS(n){return Wm(n).querySelector("button.heading-marker")}function Mf(n){sS(n)||nS(n)||!mr(n)||ME(n,IQ(n),1)}function d0(n){const t=sS(n);t==null||t.remove()}function lS(n){d0(n),Ye(n)&&Mf(n)}class DQ{handleDrop(t,e,r,i){if(Wd(e)||!Ye(e)||!ui(e))return;const o=pa(e);o.unshift(e);const s=o.reverse();let l=null;return t.doc.beginBatchUpdate(),s.forEach((c,d,h)=>{const C=t.getBlockData(c),E=Xo(t.editorBlocks,t.doc.toJSON(),C),A=t.insertDocAt(r,i,E)[0];d===h.length-1&&(l=A)}),t.doc.endBatchUpdate(),t.doc.beginBatchUpdate(),s.forEach(c=>{t.deleteBlock(c,l?Te(t,l,0):void 0)}),t.doc.endBatchUpdate(),l&&_f(t,l),!0}}class _Q{constructor(){m(this,"startIndex",0);m(this,"containerId","root")}async handleBeforePaste(t){const e=t.selection.startBlock;return this.startIndex=t.getBlockIndex(e),this.containerId=at(it(e)),!1}async handleAfterPasteDoc(t,e){const i=e.blocks.root[0],o=t.findBlockByIndex(this.containerId,this.startIndex);return o&&Ye(o)&&gA(t,i.id)&&_f(t,o),!1}destroy(){}}const MQ=I("heading-collapse");class AA{constructor(t){m(this,"handleLoad",()=>{this.editor.readonly||this.showCollapseButtons()});m(this,"handleReadonlyChanged",()=>{if(ce.isMobile)return;ue(this.editor.rootContainer).filter(Ye).forEach(e=>{this.editor.readonly?d0(e):Mf(e)})});m(this,"handleHoverBlock",(t,e)=>{e&&(st(e,"hovering-heading"),Ye(e)&&qt(it(e))&&(ce.isMobile||(this.editor.readonly?ui(e)||d0(e):Mf(e),ui(e)||iS(e)))),t&&Ye(t)&&qt(it(t))&&(z(t,"hovering-heading"),this.editor.readonly?ce.isMobile||Mf(t):d0(t),EA(this.editor,t))});m(this,"handleClick",(t,e)=>{const r=da(e,"button.heading-collapse-button");if(!r)return;const i=Z(r);!i||(p(MQ,Ye(i),"not a heading block"),wQ(this.editor,i),oS(this.editor,i))});m(this,"handleBeforeExecCommand",(t,e,r)=>{if(r.source==="block-command"){const i=e.id;if(i==="unordered-list"||i==="ordered-list"||i==="check-list"){const o=this.editor.selection.focusedBlock,s=this.editor.getBlockIndex(o),l=at(it(o));Ye(o)&&gA(this.editor,o.id)&&setTimeout(()=>{const c=t.findBlockByIndex(l,s);c&&Ye(c)&&_f(t,c)})}}});this.editor=t,t.addListener("load",this.handleLoad),t.addListener("click",this.handleClick),t.addListener("readonlyChanged",this.handleReadonlyChanged),t.addListener("beforeExecCommand",this.handleBeforeExecCommand),Be.get(t).addListener("change",this.handleHoverBlock),t.readonly||this.showCollapseButtons(),setTimeout(()=>{var r;(r=Tf.find(t))==null||r.addHandler(new DQ),t.input.addHandler(new _Q)})}showCollapseButtons(){const t=ue(this.editor.rootContainer).filter(Ye);t.length!==0&&(t[0]===Re(this.editor.rootContainer)&&t.splice(0,1),t.forEach(e=>{ce.isMobile?EA(this.editor,e):Mf(e)}))}destroy(){this.editor.removeListener("load",this.handleLoad),this.editor.removeListener("click",this.handleClick)}}function h0(n){const t=n.selection.range;if(t.isCollapsed()||t.start.blockId===t.end.blockId)return;const e=n.getBlockById(t.start.blockId),r=n.getBlockById(t.end.blockId);ui(e)&&fc(n,e),ui(r)&&fc(n,r)}function UQ(n){h0(n);const t=n.getFocusedBlock();Ye(t)}function OQ(n){h0(n);const t=n.getFocusedBlock();if(!Ye(t))return;const e=n.selection.range.focus;!e.isSimple()||e.offset===dt(n,t)&&ui(t)&&fc(n,t)}function NQ(n){h0(n);const t=n.getFocusedBlock();if(!Ye(t))return;const e=n.selection.range.focus;!e.isSimple()||e.offset===0&&ui(t)&&fc(n,t)}class PQ{handleBeforeKeyDown(t,e){return Vg(e.key)&&h0(t),e.key==="Enter"?(UQ(t),!1):e.key==="Delete"?(OQ(t),!1):(e.key==="Backspace"&&NQ(t),!1)}}class FQ{constructor(t){this.editor=t}onInsertBlock(t,e,r,i){this.updateBlockIfNeeded(r.id)}onUpdateBlockData(t,e,r,i){const o=this.editor.doc.getBlockData(t,e);this.updateBlockIfNeeded(o.id,r)}updateBlockIfNeeded(t,e){setTimeout(()=>{const r=this.editor.findBlockById(t);if(!r)return;if(!Ye(r)){if(e&&e.delete.includes("heading")&&(lS(r),iS(r),gA(this.editor,t))){pA(this.editor,t,!1);const o=s3(r);RQ(this.editor,o)}return}St(r,"hovering-heading")&&oS(this.editor,r),lS(r);const i=kQ(this.editor,t);i&&(fc(this.editor,r,i),_f(this.editor,r))},100)}}function KQ(n){return!!n.heading}function aS(n){var e;const t=n.heading;return(e=Number.parseInt(`${t}`,10))!=null?e:1}function cS(n,t,e){var o;const r=js(n,t.type);let i="";if(r.convertTo){const s=to();i=r.convertTo(n,t,s,"text",[{containerId:"root",blockIndex:0}]),i=i.replace(/\n/g,"").trim()}else i=de((o=t.text)!=null?o:[]);return{parentNode:e,children:[],text:i,level:aS(t),block:t}}class Uf{constructor(t){m(this,"nodes",[]);this.editor=t}appendBlock(t){const e=this.findParent(aS(t),this.nodes);e?e.children.push(cS(this.editor,t,e)):this.nodes.push(cS(this.editor,t,null))}findParent(t,e){const r=e[e.length-1];if(!r||t<=1)return null;if(r.level===t-1)return r;const i=this.findParent(t,r.children);return i||(r.level<t?r:null)}static buildToc(t,e){const r=new Uf(t),i=e.blocks.root;for(let o=0;o<i.length;o++){const s=i[o];KQ(s)&&r.appendBlock(s)}return r}}class Es extends ve.TypedEmitter{constructor(e){super();m(this,"toc");m(this,"updateToc",_e.default(()=>{this.updateTocNow()},500));this.editor=e,e.doc.registerCallback(this),setTimeout(()=>{this.updateTocNow()},500),this.toc=new Uf(this.editor)}destroy(){this.editor.doc.unregisterCallback(this)}isHeadingBlock(e){return!!e.heading}onInsertBlock(e,r,i,o){e==="root"&&this.isHeadingBlock(i)&&this.updateToc()}onDeleteBlock(e,r,i){e==="root"&&this.updateToc()}onUpdateBlockText(e,r,i,o){if(e!=="root")return;const s=this.editor.doc.getBlockData(e,r);this.isHeadingBlock(s)&&this.updateToc()}onUpdateBlockData(e,r,i,o){e==="root"&&this.updateToc()}static register(e){return e.addCustom("editor-toc",()=>new Es(e))}static get(e){return e.getCustom("editor-toc")}updateTocNow(){this.toc=Uf.buildToc(this.editor,this.editor.doc.toJSON()),this.emit("change",this.editor,this.toc)}}const dut="";function VQ(n,t){if(t.nodes.length===0)return!0;if(t.nodes.length>1)return!1;const e=n.findBlockById(t.nodes[0].block.id);return e&&!zi(e)?!1:t.nodes[0].children.length===0}function xA(n,t){t.forEach(e=>{const r=B("div",["toc-node"],n),i=B("div",["toc-title"],r);if(B("span",["toc-text"],i,e.text).setAttribute("data-block-id",e.block.id),e.children.length>0){const s=B("div",["toc-children"],r);xA(s,e.children)}})}function $Q(n,t){const e=da(t,".toc-text");if(!e)return;const r=e.getAttribute("data-block-id");if(!r)return;const i=n.findBlockById(r);!i||(t.preventDefault(),t.stopPropagation(),Ks(i,{elementToScroll:qe(n.rootContainer),verticalOffset:-30}),n.selection.selectBlock(i,0,void 0,{noScroll:!0}))}function uS(n,t,e){if(st(t,"loading"),t.innerHTML="",VQ(n,e)){B("div",["toc-empty-message"],t,D.t("toc.empty"));return}const r=n.findBlockById(e.nodes[0].block.id);if(r&&!zi(r))xA(t,e.nodes);else if(e.nodes.length>=1){const[i,...o]=e.nodes,s=[...i.children,...o];xA(t,s)}Mp(n,"toc-click-handler",()=>{n.addListener("click",$Q)})}class HQ{constructor(t){m(this,"handleUpdateToc",(t,e)=>{Array.from(t.rootContainer.querySelectorAll('.embed-block[data-type="editor-block"][data-embed-type="toc"]')).forEach(i=>{const o=i.querySelector(".editor-toc-container");o&&uS(t,o,e)})});this.editor=t,Es.register(t).addListener("change",this.handleUpdateToc)}destroy(){Es.register(this.editor).removeListener("change",this.handleUpdateToc)}get toc(){return Es.register(this.editor).toc}}function jQ(n,t){const e=B("div",["editor-toc-container"],t),i=n.addCustom("init-editor-toc",()=>new HQ(n)).toc;i.nodes.length===0?z(e,"loading"):uS(n,e,i)}function zQ(n,t,e,r){return r==="markdown"?"[toc]":""}function GQ(n,t,e){const{data:r}=e;if(!r||r.embedType!=="toc"||!rt(n,t))return null;const i={};return{blockData:{id:et(),type:"embed",embedType:"toc",embedData:i}}}const fS={embedType:"toc",createEmbedContent:jQ,convertTo:zQ,convertFrom:GQ},WQ={toc:{empty:"No Toc"}},qQ={toc:{empty:"No Toc"}},XQ={toc:{empty:"No Toc"}};D.mergeLang({"zh-CN":WQ,"en-US":qQ,"ja-JP":XQ});function YQ(n){return!!n.getAttribute("data-style-heading")}function bA(n,t){return YQ(t)&&dt(n,t)>0}function QQ(n){const t=qe(n.rootElement);let e=0,r=0,i=0;if(t===document.documentElement){const o=n.rootContainer.getBoundingClientRect();e=o.left+o.width/2,r=10,i=t.offsetHeight}else{const o=t.getBoundingClientRect();e=o.left+o.width/2,r=o.top+10,i=o.bottom}for(;r<i;){const o=document.elementsFromPoint(e,r);for(let s=0;s<o.length;s++){const l=Z(o[s]);if(l&&n.rootContainer.contains(l))return l}r+=10}return null}function vA(n,t){let e=t;for(;e&&!bA(n,e);)e=Jt(e);return e}function dS(n){if(Ue(n))return!1;const e=it(n);return qt(e)}function m0(n,t){let e=t;for(;e&&!bA(n,e);)e=Ue(e),e&&dS(e)&&(e=null);return e}const JQ=.3;class ZQ extends ve.TypedEmitter{constructor(e){super();m(this,"scrollContainer");m(this,"scrollEventTarget");m(this,"scrollStatus",{curHeadingBlock:null,previousHeadingBlock:null,nextHeadingBlock:null});m(this,"handleScroll",_e.default(()=>{const e={curHeadingBlock:null,previousHeadingBlock:null,nextHeadingBlock:null};let r=QQ(this.editor);if(r&&(r=a1(r)),!r||!this.scrollContainer){this.setStatus(e);return}if(dS(r)&&(r=Jt(r)),!r){this.setStatus(e);return}if(bA(this.editor,r)){e.curHeadingBlock=r,e.previousHeadingBlock=m0(this.editor,r),e.nextHeadingBlock=vA(this.editor,r),this.setStatus(e);return}const i=this.scrollContainer.getBoundingClientRect(),o=vA(this.editor,r);if(o){const l=o.getBoundingClientRect();if(l.top>i.top&&l.top<i.top+i.height*JQ){e.curHeadingBlock=o,e.previousHeadingBlock=m0(this.editor,o),e.nextHeadingBlock=vA(this.editor,o),this.setStatus(e);return}e.nextHeadingBlock=o}const s=m0(this.editor,r);s&&(e.curHeadingBlock=s,e.previousHeadingBlock=m0(this.editor,s)),this.setStatus(e)},200));this.editor=e}setStatus(e){this.scrollStatus.previousHeadingBlock===e.previousHeadingBlock&&this.scrollStatus.nextHeadingBlock===e.nextHeadingBlock&&this.scrollStatus.previousHeadingBlock===e.previousHeadingBlock||(this.scrollStatus=e,this.emit("change",this.editor,e))}start(){this.stop(),this.scrollContainer=qe(this.editor.rootElement),this.scrollEventTarget=this.scrollContainer===document.documentElement?document:this.scrollContainer,this.scrollEventTarget.addEventListener("scroll",this.handleScroll),this.handleScroll()}stop(){this.scrollEventTarget&&(this.scrollEventTarget.removeEventListener("scroll",this.handleScroll),this.scrollStatus={curHeadingBlock:null,previousHeadingBlock:null,nextHeadingBlock:null})}destroy(){this.stop(),this.scrollEventTarget=void 0}}class hS{constructor(t,e){m(this,"suggest");m(this,"onClose",()=>{this.editor.focus()});m(this,"onShow",(t,e,r,i)=>{const o=this.editor.getBlockByIndex(e,r);if(!mr(o)){const s=Z(it(o));if(s&&_t(s)==="code")return!1}return!0});m(this,"onClickItem",(t,e,r)=>{const i=e.data,o={id:et(),type:"mention",box:!0,created:Date.now(),iconUrl:i.avatarUrl,text:i.displayName,mentionId:i.userId},s=this.editor.selection.range;if(!s.isCollapsed()||!s.isSimple())return;const l=s.focus,c=this.editor.getBlockById(l.blockId);this.editor.insertBoxToBlock(c,l.offset,o)});m(this,"queryItems",async(t,e)=>(await this.options.queryUsers(this.editor,e)).map(o=>{const s=Qd(o.displayName);return{id:o.userId,name:o.displayName,icon:o.avatarUrl?`<img src="${o.avatarUrl}" class="mention-user-avatar">`:`<span style="background: ${s}" class="mention-user-avatar-string">${Yd(o.displayName,1)}</span>`,element:o.element,data:o,subText:o.email}}));this.editor=t,this.options=e,this.suggest=new BC(t,{id:"editor-mention",trigger:["@","\uFF20"],autoDeleteTrigger:!0,showLoading:!0,onShow:this.onShow,onClickItem:this.onClickItem,queryItems:this.queryItems,onClose:this.onClose})}destroy(){}}I("mathjax-box");function tJ(n,t,e,r){const i=r,o=B("a",["mention-container"],e);B("span",["mention-name"],o,`@${i.text}`),o.setAttribute("data-mention-id",i.mentionId)}function eJ(n,t,e){}function nJ(n,t,e,r){return`@${t.text}`}function rJ(){return{abstract:D.t("mention.abstract")}}function iJ(n,t,e){return t.text.toLowerCase().indexOf(e)>=0}const mS={boxType:"mention",updateBoxContent:tJ,handleClickBox:eJ,convertTo:nJ,getBoxProperties:rJ,matchText:iJ};function oJ(n){const t=B("div",["mention-button-wrap"],null),e=Ar("mention-button",D.t("list.mention.tooltip"),d2,[],n.clientId);return t.appendChild(e),t}class sJ{constructor(t){m(this,"mentionButton");m(this,"handleHoveringBlock",t=>{var e;!t||!rt(this.editor,t)||!Kt(t)||!this.editor.isWritable()||(t&&this.shouldBlockShowMention(t)?ie(t).appendChild(this.mentionButton):(e=this.mentionButton)==null||e.remove())});m(this,"handleMouseDown",(t,e)=>{e.preventDefault(),e.stopPropagation();const r=Z(this.mentionButton);if(!r||!rt(t,r))return;const i=t.selection.range.focus;if(!i.isSimple())return;let o;t.selection.focusedBlock!==r?o=dt(t,r):o=i.offset,setTimeout(()=>{const s=t.insertTextToBlock(r,o,"@");o+=1;const l=de(_n(s,o).left);this.editor.selection.selectBlock(r,o),this.editor.focus(),t.getCustom("mention").suggest.popup(r,o,l,"@")})});m(this,"destroy",()=>{Be.get(this.editor).removeListener("change",this.handleHoveringBlock)});this.editor=t,this.mentionButton=oJ(t),Be.get(this.editor).addListener("change",this.handleHoveringBlock),t.domEvents.addEventListener(this.mentionButton,"mousedown",this.handleMouseDown)}shouldBlockShowMention(t){const e=tr(t);return!(e==="ordered"||e==="unordered"||e==="text-only")}}const hut="",lJ={mention:{abstract:"\u6210\u5458"}},aJ={mention:{abstract:"Member"}},cJ={mention:{abstract:"\u30E1\u30F3\u30D0\u30FC"}};D.mergeLang({"zh-CN":lJ,"en-US":aJ,"ja-JP":cJ});const uJ={templates:{title:"\u9009\u62E9\u6A21\u677F\uFF0C\u5FEB\u901F\u521B\u5EFA",create:"\u65B0\u5EFA\u6A21\u677F",choose:"\u5168\u90E8\u6A21\u677F",customizedMark:"\u81EA\u5B9A\u4E49"}},fJ={templates:{title:"Choose a template",create:"New template",choose:"All templates",customizedMark:"Custom"}},dJ={templates:{title:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u9078\u629E",create:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u65B0\u898F\u4F5C\u6210",cho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g5MC4wMzE5WiIgZmlsbD0iIzkxRDlCRSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzEyNTZfMzcxNjgiPgo8cmVjdCB3aWR0aD0iMzcyIiBoZWlnaHQ9IjI3OSIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",gS=I("templates");function BA(n){const t=n.rootElement.querySelector(":scope .editor-templates");if(!t)return null;const e=t.querySelector(":scope .editor-templates-cards");return p(gS,e,"no card container"),{root:t,cardContainer:e}}function gJ(n){const t=BA(n);if(t)return t.cardContainer.innerHTML="",t;const e=B("div",["editor-templates"],n.rootElement);B("div",["editor-templates-title"],e,D.t("templates.title"));const r=B("div",["editor-templates-cards"],e);return{root:e,cardContainer:r}}function pS(n,t,e,r,i){var C;const o=(C=n.options.componentsOptions)==null?void 0:C.templates,s=B("div",["editor-template-card",...r],null),l=B("div",["editor-template-thumb-container"],s),c=B("img",["editor-template-thumb"],l);c.src=t,c.style.display="none",c.onerror=()=>{var A;const E=(A=o==null?void 0:o.placeHolderImageSrc)!=null?A:mJ;c.src!==E&&(c.src=E)},c.onload=()=>{c.style.display=""};const d=B("div",["editor-template-name"],s),h=B("span",[],d,e);return o!=null&&o.showTemplateTitleAttr&&h.setAttribute("title",e),s.onclick=()=>i(s),s}function pJ(n,t){return t.thumbnailUrl?t.thumbnailUrl:n.doc.buildResourceUrl("thumbnail.png")}function CJ(n,t){const e=pJ(n,t);return pS(n,e,t.name,[],async()=>{var i,o;const r=(i=n.options.componentsOptions)==null?void 0:i.templates;await((o=r==null?void 0:r.onApplyTemplate)==null?void 0:o.call(r,n,t)),Es.register(n).updateToc()})}function EJ(n,t){return pS(n,t,D.t("templates.choose"),["more"],()=>{var r,i;const e=(r=n.options.componentsOptions)==null?void 0:r.templates;(i=e==null?void 0:e.onChooseTemplate)==null||i.call(e,n)})}function AJ(n,t){var C,E;const e=(C=n.options.componentsOptions)==null?void 0:C.templates;if(!e)return;const i=Me(n.rootContainer).getBoundingClientRect().width;let o=1;const s=hJ,l=BA(n);if(l){if(t!=null&&t.reset){const A=Array.from(l.cardContainer.children),v=l.cardContainer.firstElementChild;if(p(gS,v,"no first card"),St(v,"new")||St(v,"more"))return;const k=window.getComputedStyle(v),L=parseFloat(k.marginLeft),M=parseFloat(k.marginRight),U=v.getBoundingClientRect().width+L+M;o=Math.floor(i/U);const J=Math.max(1,o-1-1),q=A.length-1;A.forEach((Y,ot)=>{ot>J&&ot<q?Y.style.display="none":(ot>=q&&St(Y,"more"),Y.style.display="")})}return}const c=e.templates,{cardContainer:d}=gJ(n);c.forEach((A,v)=>{const k=CJ(n,A);if(v>0&&v>=o&&(k.style.display="none"),d.appendChild(k),v===0){const L=window.getComputedStyle(k),M=parseFloat(L.marginLeft),U=parseFloat(L.marginRight),F=k.getBoundingClientRect().width+M+U;o=Math.floor(i/F)-1}});const h=EJ(n,s);d.appendChild(h),(E=e==null?void 0:e.onTemplateChooserStatusChanged)==null||E.call(e,n,d,"visible")}const CS=_e.default(AJ,50);function xJ(n){var r,i;const t=BA(n);if(!t)return;t.root.remove();const e=(r=n.options.componentsOptions)==null?void 0:r.templates;(i=e==null?void 0:e.onTemplateChooserStatusChanged)==null||i.call(e,n,null,"hide")}function bJ(n,t){const e=t.blocks.root;if(e.length===0)return!0;if(e.length>5)return!1;const r=[...e],i=n.findBlockById(r[0].id);i&&zi(i)&&r.splice(0,1);const o=s=>{var l;return s.type!=="text"&&s.type!=="list"?!1:s.text?((l=s.text)==null?void 0:l.length)===0:!0};return r.every(s=>o(s))}function g0(n,t){bJ(n,n.doc.toJSON())?CS(n,t):(CS.cancel(),xJ(n))}function vJ(n){const r=new DOMParser().parseFromString(n,"text/html").querySelector("svg");if(!r)return null;const i=r.getAttribute("viewBox");if(!i)return null;const o=i.split(" ");if(o.length===4){const s=o[2],l=o[3];return r.setAttribute("width",s),r.setAttribute("height",l),r.outerHTML}return null}function TA(n,t,e=!0){const r=new Image,i=document.createElement("canvas"),o=i.getContext("2d");if(!o){t(new Error("failed to get context"),null);return}r.onload=()=>{if(i.width=r.naturalWidth,i.height=r.naturalHeight,e&&(i.width===0||i.height===0)){const s=n.substring(26);if(s){const l=atob(s),c=vJ(l);if(c){zg(c,"image/svg+xml").then(d=>{TA(d,t,!1)});return}}t(null,null);return}o.drawImage(r,0,0),i.toBlob(s=>{t(null,s)},"image/png")},r.src=n}function BJ(n){return new Promise((t,e)=>{TA(n,(r,i)=>{if(r){e(r);return}if(!i){e(new Error("Failed to get image blob"));return}t(i)})})}async function ES(n){const t=await ma(n);return new Promise((e,r)=>{TA(t,(i,o)=>{if(i){r(i);return}if(!o){r(new Error("Failed to get image blob"));return}e(o)})})}const AS="Untitled";function xS(n){const t=Re(n.rootContainer);return!t||!rt(n,t)?AS:n.getBlockString(t)||AS}function TJ(n){let t;return n.forEach((e,r)=>{r.toLocaleLowerCase()==="content-type"&&(t=e)}),t!=null?t:""}async function bS(n){try{const t=await fetch(n,{credentials:"same-origin"}),e=await t.blob(),r=TJ(t.headers).toLocaleLowerCase();let i="";if(r){const s=Lg.default[r].extensions;s&&s.length>0&&(i=s[0])}return new File([e],`${Date.now()}.${i}`,{type:r})}catch{return null}}const gut="";class vS{constructor(t){m(this,"isShown",!1);m(this,"currentBlock",null);this.editor=t}render(t,e){if(this.isShown)return;this.isShown=!0,this.currentBlock=t,Gg(t.id);const r=B("div",["iframe-embed-auth-error-tips"],document.body);r.innerHTML=D.t("authError.tips"),r.addEventListener("click",i=>{var s,l;const o=i.target;if(o instanceof HTMLSpanElement)switch(o.id){case"retry":(l=(s=this.editor.doc).triggerReAuth)==null||l.call(s);break;case"exit":e==null||e(),this.destroy();break}})}destroy(){this.currentBlock&&Wg(this.currentBlock.id);const t=document.body.querySelector("div.iframe-embed-auth-error-tips");t==null||t.remove(),this.isShown=!1}}const yJ={authError:{tips:'<div>\u670D\u52A1\u5DF2\u65AD\u5F00\uFF0C\u4E3A\u4E86\u907F\u514D\u5185\u5BB9\u4E22\u5931\uFF0C\u6211\u4EEC\u6682\u65F6\u7981\u7528\u7F16\u8F91\u529F\u80FD\uFF0C\u4F60\u53EF\u4EE5 <span id="retry">\u91CD\u8FDE\u670D\u52A1</span> \u6216 <span id="exit">\u9000\u51FA\u7F16\u8F91</span></div>'}},kJ={authError:{tips:`<div>You're offline. Editing is temporarily disabled to avoid the loss of content. Please <span id="retry">go online</span> or <span id="exit">exit editor</span></div>`}},RJ={authError:{tips:'<div>\u30B5\u30FC\u30D3\u30B9\u3078\u306E\u63A5\u7D9A\u304C\u9014\u5207\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u7DE8\u96C6\u6A5F\u80FD\u304C\u4E00\u6642\u7684\u306B\u4F7F\u7528\u3067\u304D\u306A\u3044\u72B6\u614B\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002<span id="retry">\u30B5\u30FC\u30D3\u30B9\u3078\u63A5\u7D9A</span> \u307E\u305F\u306F <span id="exit">\u7DE8\u96C6\u3092\u7D42\u4E86</span>\u3057\u3066\u304F\u3060\u3055\u3044</div>'}};D.mergeLang({"zh-CN":yJ,"en-US":kJ,"ja-JP":RJ});const p0="doc-re-auth-event";class yA extends ve.TypedEmitter{constructor(e){super();m(this,"authErrorCallback");m(this,"authRecoverCallback");m(this,"destroy",()=>{this.authErrorCallback=void 0,this.authRecoverCallback=void 0,this.editor.doc.externalDoc.unregisterCallback(this)});m(this,"onError",e=>{e.code===Vu.err&&this.authErrorCallback&&this.authErrorCallback()});m(this,"onAuthRecover",()=>{this.authRecoverCallback&&this.authRecoverCallback()});this.editor=e,this.editor.doc.externalDoc.registerCallback(this)}addAuthListen(e,r){e==="authError"?this.authErrorCallback=r:this.authRecoverCallback=r}removeListeners(){this.authErrorCallback=void 0,this.authRecoverCallback=void 0}}const wJ=800;class SJ{constructor(t){m(this,"longPressTimeout",0);m(this,"handleSelectionChange",()=>{});m(this,"handleLongPress",t=>{const e=t.touches[0],r=rh(this.editor,e.clientX,e.clientY);!r||console.log(r)});m(this,"handleTouchStart",t=>{t.touches.length===1&&(this.longPressTimeout=window.setTimeout(()=>{this.handleLongPress(t)},wJ))});m(this,"handleTouchEnd",t=>{this.longPressTimeout&&(window.clearTimeout(this.longPressTimeout),this.longPressTimeout=0)});this.editor=t,this.editor.addListener("selectionChanged",this.handleSelectionChange),document.addEventListener("touchstart",this.handleTouchStart),document.addEventListener("touchend",this.handleTouchEnd)}destroy(){this.editor.removeListener("selectionChanged",this.handleSelectionChange),document.removeEventListener("touchstart",this.handleTouchStart),document.removeEventListener("touchend",this.handleTouchEnd)}}const LJ=`<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
794
|
+
2. \u4E8C\u3064\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u9593\u306B\u5FA9\u5143\u3055\u308C\u305F\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u3042\u308B\u5834\u5408\u3001\u3053\u306E\u4E8C\u3064\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u6BD4\u8F03\u3067\u304D\u306A\u3044\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002`,user:"\u30D0\u30FC\u30B8\u30E7\u30F3\u4F5C\u6210\u8005\uFF1A{name}",auth:"\u3053\u306E\u30B9\u30DA\u30FC\u30B9\u3092\u7DE8\u96C6\u3059\u308B\u6A29\u9650\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u7BA1\u7406\u8005\u306B\u3054\u9023\u7D61\u304F\u3060\u3055\u3044\u3002"},dropdownHeader:"\u73FE\u5728\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u6BD4\u8F03\u3067\u304D\u308B\u30D0\u30FC\u30B8\u30E7\u30F3\u3060\u3051\u8868\u793A\u3055\u308C\u307E\u3059",dropdown:{header:"\u6BD4\u8F03\u53EF\u80FD\u306A\u30D0\u30FC\u30B8\u30E7\u30F3"},noVersions:"\u6BD4\u8F03\u53EF\u80FD\u306A\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u3042\u308A\u307E\u305B\u3093",lastVersion:"\u524D\u306E\u30D0\u30FC\u30B8\u30E7\u30F3",filterMemoed:"\u5099\u8003\u3042\u308A"}};D.mergeLang({"zh-CN":YY,"en-US":QY,"ja-JP":JY});var H4=(n=>(n.NEW="history-new",n.NEW_CHILD="history-new-child",n.DELETED="history-deleted",n.UPDATED="history-updated",n.HISTORY="history",n))(H4||{});const vl="--op-color",Bl="--op-selected-color",lut="";class ZY{constructor(t){m(this,"root");this.content=t;const e=B("div",["editor-dialog-root"],null);e.append(t),this.root=e}show(t=document.body){t.append(this.root)}hide(){this.root.remove()}destroy(){}}function Tl(n){var e;let t;if(n.version!==-1){const r=new Date((e=n.created)!=null?e:n.version);t=Qg(r,"YYYY-MM-DD hh:mm")}else t=D.t("version.latest");return t}function f0(n){return n.source&&typeof n.source=="object"&&!!n.source.restore}const aut="";class tQ{constructor(t,e){m(this,"textArea");m(this,"warning");m(this,"end",!1);m(this,"root");m(this,"handleBlur",()=>{var t,e;this.end||(e=(t=this.options)==null?void 0:t.onend)==null||e.call(t,this.textArea.value,!1)});m(this,"handleKeyDown",t=>{var e,r,i,o;t.isComposing||(t.key==="Enter"||t.key==="Tab"?(t.preventDefault(),(r=(e=this.options)==null?void 0:e.onend)==null||r.call(e,this.textArea.value,!1),this.end=!0):t.key==="Escape"&&(t.preventDefault(),(o=(i=this.options)==null?void 0:i.onend)==null||o.call(i,this.textArea.value,!0),this.end=!0))});m(this,"handleInput",t=>{const e=t.target,{value:r}=e;r.length>this.maxLength-10?this.warning.innerText=`${r.length}/${this.maxLength}`:this.warning.innerText="",this.autoSize()});var r,i;this.maxLength=t,this.options=e,this.root=B("div",["size-limit-textarea",...(r=e==null?void 0:e.classes)!=null?r:[]],null),this.textArea=B("textarea",["size-limit-textarea-input"],this.root),this.warning=B("div",["size-limit-textarea-warning"],this.root),this.textArea.addEventListener("input",this.handleInput),this.textArea.addEventListener("blur",this.handleBlur),this.textArea.addEventListener("keydown",this.handleKeyDown),this.textArea.maxLength=t,this.textArea.placeholder=(i=e==null?void 0:e.placeholder)!=null?i:""}destroy(){this.textArea.removeEventListener("input",this.handleInput),this.textArea.removeEventListener("blur",this.handleBlur),this.textArea.removeEventListener("keydown",this.handleKeyDown)}setValue(t){this.textArea.value=t,this.autoSize()}autoSize(){const t=Math.max(this.textArea.scrollHeight+2,60);this.textArea.style.height="auto",this.textArea.style.height=`${t}px`}resetSize(){this.textArea.style.height="auto";const t=Math.max(this.textArea.scrollHeight+2,60);this.textArea.style.height=`${t}px`}focus(){this.textArea.focus(),this.end=!1}}const cut="",{t:nr}=D,j4=I("version-list");class cc{constructor(t){m(this,"versionsList");m(this,"versionsListHeader");m(this,"versionFilterToolbar");m(this,"memoInput",null);m(this,"selectedVersion",null);m(this,"handleClickVersionItem",t=>{const e=t.target,r=e.closest(".version-item");if(!this.isVersionElement(r))return;const i=St(r,"active");if(i&&e.closest(".version-item-memo")&&this.options.enableEdit){this.editItemMemo(r);return}const o=this.getVersionFromElement(r);if(this.setActiveItem(r),e.closest(".add-memo-button")&&this.options.enableEdit){this.handleAddMemo(o,r);return}if(e.closest(".revert-button")&&this.options.enableEdit){this.handleRevert(o,r);return}if(i)return;const{onSelectVersion:s}=this.options;s(o)});m(this,"handleEndEditItemMemo",(t,e)=>{var i,o,s;const r=(i=this.memoInput)==null?void 0:i.root.closest(".version-item");if(this.isVersionElement(r)&&(st(r,"editing"),!e)){const l=this.getVersionFromElement(r),c=t.replace(/[\n\r]+/g," ");if(((o=l.extra)==null?void 0:o.memo)!==c){l.extra={memo:c},this.options.versionHelper.updateVersionExtra(l.version,l.tagId,l.extra).then(()=>{var h,C;(C=(h=this.options).onMemoChanged)==null||C.call(h,l)});const d=r.querySelector(".version-item-memo");p(j4,d,"no memo element"),d.textContent=c}}(s=this.memoInput)==null||s.root.remove()});m(this,"handleRevert",(t,e)=>{const{onRevert:r}=this.options;r(t)});m(this,"handleFilterClick",(t,e)=>{let r=this.options.versions;e.id==="memoed"&&(r=r.filter(o=>{var s;return!!((s=o.extra)!=null&&s.memo)}));const i=this.createVersionItems(r,e.id);this.versionsList.innerHTML="",this.versionsList.append(i),this.versionFilterToolbar.updateItems(cc.getFilterItems(e.id)),this.updateHeaderCount(r.length)});var c;this.options=t;const{versions:e}=t,r=B("div",["version-list-header"],null),i=nr("version.versionList",{count:`${e.length}`});B("span",["version-count"],r,i),this.versionFilterToolbar=cc.createFilterToolbar(r),this.versionFilterToolbar.addListener("click",this.handleFilterClick),this.selectedVersion=t.selectedVersion||e[0];const o=B("div",["version-list-content"],null),s=this.createVersionItems(e,"all");o.append(s),this.versionsList=o,this.versionsListHeader=r,o.onclick=this.handleClickVersionItem;const l=this.activeVersion;l&&((c=this.options)==null||c.onSelectVersion(l))}static createFilterToolbar(t){const e=B("div",["version-list-filter"],t);return new UP(e,cc.getFilterItems("all"),{tooltipId:"version-viewer"})}static getFilterItems(t){return[{id:"filter",name:nr(t==="all"?"version.filter.all":"version.filter.memoed"),dropdown:!0,manualShowChildren:!0,childrenPlacement:"bottom-start",childrenOffset:[0,16],childArrow:!0,children:[{id:"all",states:t==="all"?["checked"]:[],name:nr("version.filter.allVersions")},{id:"memoed",states:t==="memoed"?["checked"]:[],name:nr("version.filter.memoVersions")}]}]}createVersionItems(t,e){const r=document.createDocumentFragment();if(t.length===0){const o=B("div",["version-list-empty"],r);return o.textContent=nr("version.noMemoedVersion"),r}const i=(o,s,l,c=!1)=>{var L,M,U,F,J,q,Y,ot,pt,At,xt;const d=B("div",["version-item"],r);d.versionData=o,s&&z(d,"child"),o.created===((L=this.selectedVersion)==null?void 0:L.created)&&z(d,"active");const h=B("div",["version-item-title"],d);B("div",["version-item-date"],h,Tl(o)),c&&B("div",["version-item-latest"],h,nr("version.latest")),B("div",["spacer"],h);const C=B("div",["version-actions"],h),E=B("button",["add-memo-button"],C);if(E.textContent=nr("version.memo"),!this.options.enableEdit){z(E,"disabled");const Bt=(F=(U=(M=this.options).getDisabledTip)==null?void 0:U.call(M))!=null?F:D.t("version.tooltip.auth");E.setAttribute("data-editor-tooltip-common",Bt)}if(!c){const Bt=B("button",["revert-button"],C);if(Bt.textContent=nr("version.revert"),!this.options.enableEdit){z(Bt,"disabled");const Ot=(Y=(q=(J=this.options).getDisabledTip)==null?void 0:q.call(J))!=null?Y:D.t("version.tooltip.auth");Bt.setAttribute("data-editor-tooltip-common",Ot)}}let A="";if(typeof o.source=="object"&&((ot=o.source)==null?void 0:ot.restore)){const Bt=o.source.restore,Ot=this.options.versions.find(he=>he.version==Bt),Ne=Ot?Tl(Ot):nr("version.unknown");A=nr("version.restoreFrom",{from:Ne})}B("div",["version-item-restore-from"],d,A),B("div",["version-item-memo"],d,((pt=o.extra)==null?void 0:pt.memo)||"");const v=B("ul",["version-item-authors"],d),k=Bt=>{const Ot=B("li",["version-item-author"],v),Ne=B("span",["version-item-author-mark"],Ot);Ne.style.background=this.options.getMarkColor(Bt),B("span",["version-item-author-name"],Ot,Bt.displayName).setAttribute("data-editor-tooltip-common",D.t("version.tooltip.user",{name:Bt.displayName}))};if(this.options.useCreatedBy)if(o.createdBy){const Bt=o.createdBy;k(Bt)}else o.authors&&o.authors.length>0&&o.authors.forEach(Bt=>{k(Bt)});else if(o.authors&&o.authors.length>0)o.authors.forEach(Bt=>{k(Bt)});else if(o.createdBy){const Bt=o.createdBy;k(Bt)}(xt=(At=this.options).decorateItem)==null||xt.call(At,d,o)};return t.forEach((o,s)=>{i(o,!1,t,o.created===this.options.versions[0].created),o.minorVersions&&o.minorVersions.length>0&&o.minorVersions.forEach(l=>{i(l,!0,t,!1)})}),r}isVersionElement(t){return t?St(t,"version-item"):!1}getVersionFromElement(t){return t.versionData}get activeVersion(){return this.options.versions.find(t=>{var e;return t.created===((e=this.selectedVersion)==null?void 0:e.created)})}setActiveItem(t){if(St(t,"active"))return;const e=this.versionsList.querySelector(".version-item.active");e&&st(e,"active"),z(t,"active"),this.selectedVersion=this.getVersionFromElement(t)}handleAddMemo(t,e){this.editItemMemo(e)}editItemMemo(t){var r;this.memoInput||(this.memoInput=new tQ(256,{onend:this.handleEndEditItemMemo,classes:["memo-input"],placeholder:nr("version.textarea.placeholder")}));const e=t.querySelector(".version-item-restore-from");p(j4,e,"no title element"),e.insertAdjacentElement("afterend",this.memoInput.root),z(t,"editing"),this.memoInput.setValue(((r=t.versionData.extra)==null?void 0:r.memo)||""),this.memoInput.resetSize(),this.memoInput.focus()}updateHeaderCount(t){const e=this.versionsListHeader.querySelector(".version-count");e&&(e.textContent=nr("version.versionList",{count:`${t.toString()}`}))}getVersionItemByVersionNum(t){const e=Array.from(this.versionsList.children).find(r=>r.versionData.version===t);return this.isVersionElement(e)?e:null}selectVersionByVersionNum(t){const e=this.getVersionItemByVersionNum(t);return e?(this.setActiveItem(e),this.getVersionFromElement(e)):null}render(t){t.innerHTML="",t.append(this.versionsListHeader,this.versionsList)}destroy(){this.versionsList.onclick=null,this.versionFilterToolbar.destroy()}}class eQ{constructor(t,e){this.doc=t,this.user=e}onDeleteBlock(t,e){this.doc.onDeleteBlock(t,e,this.user)}onInsertBlock(t,e,r){this.doc.onInsertBlock(t,e,r,this.user)}onUpdateBlockText(t,e,r){this.doc.onUpdateBlockText(t,e,r,this.user)}onUpdateBlockData(t,e,r){this.doc.onUpdateBlockData(t,e,r,this.user)}onCreateContainer(t,e){this.doc.onCreateContainer(t,e,this.user)}onCreateComment(){}onDeleteComment(){}onDeleteContainer(){}onUpdateComment(){}}async function nQ(n,t,e){for(const r of e){const i=new eQ(n,r.user);t.parseHistoryData(r,i)}}const En=I("split-text-actions");function z4(n){return n.length>2?!1:n.length===1?n[0].insert!==void 0:(p(En,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].insert!==void 0)}function G4(n){return n.length>2?!1:n.length===1?n[0].delete!==void 0:(p(En,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].delete!==void 0)}function W4(n){return n.length>2?!1:n.length===1?n[0].insert===void 0&&n[0].delete===void 0&&n[0].attributes!==void 0:(p(En,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].attributes!==void 0)}function rQ(n){const t=[],e=mt.default(n);if(e.length===0)return[];if(e.length===1)return[n];if(e.length===2&&(G4(n)||z4(n)||W4(n)))return[n];const r=(o,s)=>o>0?[{retain:o},s]:[s];let i=0;for(;e.length>0;){const o=e[0];if(o.retain!==void 0&&o.attributes===void 0){p(En,o.retain>0,`invalid text op: ${JSON.stringify(o)}`),p(En,e.length>1,`invalid text op: ${JSON.stringify(o)}`);const s=e[1];p(En,s.delete||s.insert!==void 0||s.attributes!==void 0,`invalid next text op: ${JSON.stringify(s)}`),i+=o.retain,t.push(r(i,s)),s.delete!==void 0?i-=s.delete:s.insert!==void 0?i+=s.insert.length:(p(En,s.attributes!==void 0,`invalid next text op: ${JSON.stringify(s)}`),p(En,s.retain!==void 0,`invalid next text op: ${JSON.stringify(s)}`),i+=s.retain),e.splice(0,2)}else p(En,o.delete||o.insert!==void 0||o.attributes!==void 0,`invalid next text op: ${JSON.stringify(o)}`),t.push(r(i,o)),e.shift(),o.retain!==void 0&&(p(En,o.attributes!==void 0,`invalid next text op: ${JSON.stringify(o)}`),i+=o.retain),o.insert&&(i+=o.insert.length)}return t}function q4(n){if(p(En,n.length===1||n.length===2,`not a single action op: ${JSON.stringify(n)}`),n.length===1)return 0;const t=n[0].retain;return p(En,typeof t=="number"&&t>0,`invalid retain: ${JSON.stringify(n)}`),t}let X4=0;function iQ(n,t,e){const r=X4;X4+=1;const i=de(n);return{insert:" ",attributes:{box:!0,id:et(),type:"history-deleted-box",user:e,created:Date.now(),text:i,deletedOffset:t,deletedOrder:r}}}function oQ(n,t,e){const r=q4(t),i=t.length===1?t[0].delete:t[1].delete;p(En,typeof i=="number",`not a delete op: ${JSON.stringify(t)}`);const{left:o,middle:s,right:l}=Ze(n,r,i);if(s.length===1&&zo(s[0])){const h=s[0];return p(En,h.attributes,"invalid box"),h.attributes.deletedBy=e,[...o,h,...l]}const c=iQ(s,r,e);return[...o,c,...l]}function sQ(n,t,e){const r=q4(t),i=t.length===1?t[0].insert:t[1].insert;p(En,typeof i=="string",`invalid insert op: ${JSON.stringify(t)}`);const o=t.length===1?t[0].attributes:t[1].attributes,l=uh([{insert:i,attributes:o}],"insertedBy",e);return Zi(n,r,l,null)}function lQ(n,t,e){const r=rQ(t);let i=n;for(const o of r)G4(o)?i=oQ(i,o,e):z4(o)?i=sQ(i,o,e):(p(En,W4(o),`unknown op: ${JSON.stringify(o)}`),i=gn.apply(i,o));return i}const aQ=I("history-update-block-text");function Y4(n){const t=[],e=[];let r=0;return n.forEach(i=>{var o;if((o=i.attributes)!=null&&o.box){const s=i.attributes;if(s.type==="history-deleted-box"){t.push({boxData:s,offset:r});return}}e.push(i),r+=ch(i)}),t.sort((i,o)=>o.offset-i.offset),{deletedBoxes:t,newText:e}}function cQ(n,t,e){let r=n;return t.forEach(i=>{const o=gn.transformCursor(i.offset,e,!1);r=Zi(r,o,[{insert:" ",attributes:i.boxData}],null)}),r}function uQ(n){n.sort((t,e)=>t.boxData.deletedOffset!==e.boxData.deletedOffset?t.boxData.deletedOffset-e.boxData.deletedOffset:t.boxData.deletedOrder-e.boxData.deletedOrder)}function fQ(n){if(n.length<=1)return n;const t=n[0].offset;n.forEach(e=>{p(aQ,e.offset===t,`invalid boxes group, ${JSON.stringify(n)}`)}),uQ(n);for(let e=n.length-1;e>=1;e--){const r=n[e],i=n[e-1];r.boxData.user.userId===i.boxData.user.userId&&(i.boxData.text+=r.boxData.text,n.splice(e,1))}return n}function dQ(n){let{newText:t,deletedBoxes:e}=Y4(n);const r=new Map;return e.forEach(o=>{let s=r.get(o.offset);s||(s=[],r.set(o.offset,s)),s.push(o),s.sort((l,c)=>l.boxData.deletedOffset-c.boxData.deletedOffset)}),Array.from(r.values()).sort((o,s)=>s[0].offset-o[0].offset).forEach(o=>{const s=o[0].offset;fQ(o).reverse().forEach(l=>{t=Zi(t,s,[{insert:" ",attributes:l.boxData}],null)})}),t}function hQ(n,t,e){let{newText:r,deletedBoxes:i}=Y4(n);return r=lQ(r,t,e),r=cQ(r,i,t),r=dQ(r),r}const Li=I("history-doc");function Ii(n){p(Li,!1,"no local actions for history doc")}class mQ extends ua{constructor(t,e){super(),this.server=t,this.docObject=e}beginBatchUpdate(){return 0}endBatchUpdate(){return 0}toJSON(){return mt.default(this.docObject)}getContainerBlocks(t){return this.docObject.blocks[t]}findContainerBlocks(t){const e=this.docObject.blocks[t];return e!=null?e:null}getBlockData(t,e){const r=this.getContainerBlocks(t);p(Li,r,`no container data: ${t}`);const i=r[e];return p(Li,i,`no block data: ${e}`),i}localUpdateBlockText(){Ii()}localUpdateBlockData(){Ii()}localInsertBlock(){Ii()}localDeleteBlock(){Ii()}localInsertChildContainers(){Ii()}localDeleteChildContainers(){Ii()}uploadResource(){Ii()}async addResources(t){Ii()}getServerMeta(){var t,e,r;return(r=(e=(t=this.server).getServerMeta)==null?void 0:e.call(t))!=null?r:{}}buildResourceUrl(t){return this.server.buildResourceUrl(t)}request(){Ii()}broadcastMessage(){Ii()}getUser(){return{permission:"w",userId:"-",displayName:"-",avatarUrl:"-",rainbowIndex:0}}getRemoteUsers(){const t=["#0064FF4D","#00A8654D","#F593004D","#EB37234D","#8851ED4D","#009CAD4D","#F25A0A4D","#70A3104D"];return new Lu(t)}destroy(){this.clearCallbacks()}transformBlockIndex(t,e,r){const i=this.docObject.blocks[t];p(Li,i,`no container blocks: ${t}`);let o=0;for(let s=0;s<i.length;s++)if(!i[s].deletedBy){if(o===e)return s;o++}return r&&p(Li,!1,`invalid block index: ${e}, blocks: ${JSON.stringify(i)}`),p(Li,o===e,`invalid block index: ${e}, blocks: ${JSON.stringify(i)}`),i.length}onDeleteBlock(t,e,r){const i=this.transformBlockIndex(t,e,!0),s=this.docObject.blocks[t][i];p(Li,!s.deleted,`block has already deleted: ${t}/${e}`),s.deletedBy=r,this.callbacks.forEach(l=>{var c;return(c=l.onUpdateBlockData)==null?void 0:c.call(l,t,i,{insert:{},delete:[]},!0)})}onInsertBlock(t,e,r,i){const o=this.transformBlockIndex(t,e,!1),s=this.docObject.blocks[t],l=mt.default(r);l.insertedBy=i,s.splice(o,0,l),this.callbacks.forEach(c=>{var d;return(d=c.onInsertBlock)==null?void 0:d.call(c,t,o,l,!0)})}onUpdateBlockText(t,e,r,i){const o=this.transformBlockIndex(t,e,!0),l=this.docObject.blocks[t][o];p(Li,!l.deleted,`block has already deleted: ${t}/${e}`);const c=l.text;p(Li,c,`no text for block: ${JSON.stringify(l)}`);const d=hQ(c,r,i);l.text=d,this.callbacks.forEach(h=>{var C;return(C=h.onUpdateBlockText)==null?void 0:C.call(h,t,o,r,!0)})}onUpdateBlockData(t,e,r,i){const o=this.transformBlockIndex(t,e,!0),s=this.docObject.blocks[t],l=s[o];p(Li,!l.deleted,`block has already deleted: ${t}/${e}`);const c=mt.default(l);c.updatedBy=i,r.delete.forEach(d=>delete c[d]),Object.entries(r.insert).forEach(([d,h])=>{c[d]=h}),s[o]=c,this.callbacks.forEach(d=>{var h;return(h=d.onUpdateBlockData)==null?void 0:h.call(d,t,o,r,!0)})}onCreateContainer(t,e,r){this.docObject.blocks[t]=mt.default(e),this.callbacks.forEach(i=>{var o;return(o=i.onInsertChildContainer)==null?void 0:o.call(i,t,e,!0)})}}const{t:Q4}=D;function uc(n,t){return t==="insert"?Q4("version.insert",{name:n.displayName}):Q4("version.delete",{name:n.displayName})}function ps(n,t){const{userId:e}=t;return["flag","selection"].reduce((i,o)=>{const s=n.getFixedUserColor(e,o);return i[o]=s,i},{})}class gQ{renderBox(t,e,r){if(r.deletedBy){const{flag:i,selection:o}=ps(t.doc.getRemoteUsers(),r.deletedBy);return{classes:["history-deleted-box"],styles:{[vl]:i,[Bl]:o}}}return{}}renderText(t,e,r){if(!r.box&&r.insertedBy){const i=r.insertedBy,{flag:o,selection:s}=ps(t.doc.getRemoteUsers(),r.insertedBy);return{classes:["history-inserted-text"],attributes:{"history-inserted-by":i.displayName,"data-op-description":uc(i,"insert")},styles:{[vl]:o,[Bl]:s}}}return{}}renderBlock(t,e,r){if(r.deletedBy){const i=r.deletedBy,{flag:o,selection:s}=ps(t.doc.getRemoteUsers(),i);return{classes:["history-deleted-block"],attributes:{"history-deleted-by":i.displayName,"data-op-description":uc(i,"delete")},styles:{[vl]:o,[Bl]:s}}}if(r.insertedBy){const i=r.insertedBy,{flag:o,selection:s}=ps(t.doc.getRemoteUsers(),i);return{classes:["history-inserted-block"],attributes:{"history-inserted-by":i.displayName,"data-op-description":uc(i,"insert")},styles:{[vl]:o,[Bl]:s}}}return{}}updateBlock(t,e,r,i){if(i.deletedBy){const o=i.deletedBy,{flag:s,selection:l}=ps(t.doc.getRemoteUsers(),o);z(r,"history-deleted-block"),$d(r,{"history-inserted-by":o.displayName,"data-op-description":uc(o,"delete")}),Ng(r,{[vl]:s,[Bl]:l});return}if(i.insertedBy){const o=i.insertedBy,{flag:s,selection:l}=ps(t.doc.getRemoteUsers(),o);z(r,"history-inserted-block"),$d(r,{"history-inserted-by":o.displayName,"data-op-description":uc(o,"insert")}),Ng(r,{[vl]:s,[Bl]:l})}}}const J4=I("history-deleted-box");function pQ(n,t,e,r){const i=r;p(J4,i.text,`no text for text box data: ${JSON.stringify(r)}`),p(J4,typeof i.text=="string",`invalid text type for text box data: ${JSON.stringify(r)}`);const o=B("span",["history-deleted-box"],e,i.text),s=i.user,{flag:l,selection:c}=ps(n.doc.getRemoteUsers(),s);o.setAttribute("history-deleted-by",s.displayName),o.setAttribute("data-op-description",uc(s,"delete")),o.style.setProperty(vl,l),o.style.setProperty(Bl,c)}function CQ(n,t,e,r){return t.text}const EQ={boxType:"history-deleted-box",updateBoxContent:pQ,convertTo:CQ},uut="",AQ=I("versions-dropdown"),Z4=(n,t)=>{if(!t)return n;let e="";const r=t.length,i=t.toLocaleLowerCase();let o=0;for(o=0;o<=n.length-r;o){let s=n.substring(o,o+r);if(s.toLocaleLowerCase()===i){o+=r;const l=n.charAt(o);let c=!1;s.endsWith(" ")&&(c=!0,s=s.trimEnd()),e+=`<span class="highlight">${s}${l===" "||c?" ":""}</span>`}else e+=n.charAt(o),o++}return o<n.length&&(e+=n.substring(o)),e};class xQ{constructor(t,e){m(this,"dropdown");m(this,"versions",[]);m(this,"currentVersion",null);m(this,"compareWithVersion",null);m(this,"filterMemoed",!1);m(this,"keywords","");m(this,"createFilterMemoedFilterItem",t=>{const e=B("div",["filter-memoed-version-item"],null);t&&B("div",["filter-item-info"],e,D.t("version.dropdown.header"));const r=B("div",["filter-item-input-container"],e),i=kP("filter-check",this.filterMemoed?["checked"]:void 0);r.appendChild(i);const o=B("label",["filter-item-label"],r,D.t("version.filterMemoed"));return o.htmlFor=i.id,r.onclick=this.handleInputChange,e});m(this,"filterItems",(t,e)=>{var o,s;if(this.keywords=e,!e)return!0;if(t.type==="section"||t.id==="last-version")return!1;const r=e.toLocaleLowerCase();if(t.name.toLocaleLowerCase().indexOf(r)!==-1)return!0;const i=t.data;return!!(i&&((o=i.extra)==null?void 0:o.memo)&&((s=i.extra)==null?void 0:s.memo.toLocaleLowerCase().indexOf(r))!==-1)});m(this,"handleClose",()=>{});m(this,"handleClear",()=>{this.options.onCompareWithVersion(null)});m(this,"handleClickItem",t=>{const e=t.data,r=Tl(e);this.dropdown.setText(r),this.options.onCompareWithVersion(e)});m(this,"handleInputChange",t=>{const i=t.target.closest('[data-id="filter-memoed"]').querySelector('[data-button-id="filter-check"]');i&&St(i,"checked")?this.filterMemoed=!1:this.filterMemoed=!0,this.resetItems()});this.options=e,this.dropdown=new EC(t,{placeholder:D.t("version.noSelectedVersion"),emptyPlaceholder:D.t("version.noFilterVersion"),popupId:"versions-dropdown-popup",header:this.createHeader(),filter:this.filterItems,onClose:this.handleClose,onClickItem:this.handleClickItem,onClear:this.handleClear,highlight:!0,disableSelectedScroll:!0})}createHeader(){const t=B("div",["versions-dropdown-header"],null),e=B("span",["versions-dropdown-header-info"],t);e.innerHTML=D.t("version.dropdownHeader");const r=B("span",["versions-dropdown-header-icon"],t);return r.setAttribute("data-editor-tooltip-common",D.t("version.tooltip.help")),r.setAttribute("data-editor-tooltip-placement","right"),r.innerHTML=cC,r.onclick=this.options.onHelp,t}setVersions(t){this.versions=t}setCurrentVersion(t,e){this.dropdown.setText(""),this.dropdown.setLabels([]),e&&(this.dropdown.setText(Tl(e)),(e.version===-1||e.created===this.versions[0].created)&&this.dropdown.setLabels([D.t("version.latest")])),this.currentVersion=t,this.compareWithVersion=e!=null?e:null,this.resetItems()}resetItems(){var E;if(this.versions.length===0)return;const t=this.currentVersion;if(!t)return;const e=t.version===-1?0:this.versions.findIndex(A=>A.version===t.version);p(AQ,e!==-1,"version not found");const r=this.versions[0],i=A=>{var F;const v=A.data,k=B("div",["version-item-container"],null),L=B("div",["version-item-line1"],k),M=A.id==="last-version"?D.t("version.lastVersion"):Tl(v),U=B("div",["version-item-name"],L);if(this.keywords?U.innerHTML=Z4(M,this.keywords):U.innerText=M,v.created===r.created&&B("div",["version-item-latest"],L,D.t("version.latest")),((F=v.extra)==null?void 0:F.memo)&&A.id!=="last-version"){const J=B("div",["version-item-line2"],k),q=B("div",["version-item-memo"],J,v.extra.memo);this.keywords?q.innerHTML=Z4(v.extra.memo,this.keywords):q.innerText=v.extra.memo,q.setAttribute("title",v.extra.memo)}return k.onclick=()=>{this.handleClickItem(A),this.dropdown.close()},k},o=[],s=this.versions[e+1],l=s&&!f0(t);if(l){const A={id:"last-version",name:"Last version",data:s,element:i};o.push(A)}let c=e;for(let A=e-1;A>=0;A-=1){const v=this.versions[A];if(f0(v))break;c=A}let d=e;if(!f0(t))for(let A=e+1;A<this.versions.length;A+=1){const v=this.versions[A];if(d=A,f0(v))break}let h=!1;const C=[];for(let A=c;A<=d;A+=1){const v=this.versions[A];if(v.version!==t.version&&v.version!==(s==null?void 0:s.version)&&(!this.filterMemoed||((E=v.extra)==null?void 0:E.memo))){h=!0;let k=Tl(v),L=`${v.version}`;A===e+1&&(k="Previous version",L="prev-version");const M={id:L,name:k,data:v,element:i};C.push(M)}}if((l||h||this.filterMemoed)&&o.push({id:"filter-memoed",type:"section",name:"",element:this.createFilterMemoedFilterItem(o.length>0&&l),states:["disabled"]}),o.push(...C),!h){const A={id:"no-versions",type:"section",name:"No versions",states:["disabled"],element:B("span",["version-item-empty"],null,D.t("version.noVersions"))};o.push(A)}this.dropdown.updateItems(o)}}class bQ{constructor(t,e){m(this,"left");m(this,"right");m(this,"dropdown");const r=B("div",["version-info-container"],t);this.left=B("div",["version-info-left"],r),this.dropdown=new xQ(r,e),this.right=B("div",["version-info-right"],r)}setVersion(t,e,r){const i=`<span class="version-item-latest">${D.t("version.latest")}</span>`,o=`${Tl(t)}${r?i:""}`;this.left.innerHTML=D.t("version.versionInfoLeft",{versionName:o}),this.right.innerHTML=D.t("version.versionInfoRight",{versionName:o}),this.dropdown.setCurrentVersion(t,e)}}const Cs=I("version-dialog");class tS{constructor(t,e){m(this,"dialog",null);m(this,"oldViewer",null);m(this,"versionOptions");m(this,"versionList",null);m(this,"provider");m(this,"versions",[]);m(this,"components");m(this,"handleRevert",async t=>{var r,i,o;p(Cs,this.versionList,"The versionList did not render");const e=t!=null?t:(r=this.versionList)==null?void 0:r.activeVersion;p(Cs,e,`The version: ${e} is invalid`),!(((i=this.versionOptions)==null?void 0:i.onBeforeRevert)&&await this.versionOptions.onBeforeRevert(e))&&(await this.versionHelper.revertVersion(e.version),(o=this.dialog)==null||o.hide())});m(this,"handleSelectVersion",t=>{p(Cs,t,`The version: ${t} is invalid`),this.viewVersion(t)});m(this,"handleCompareWithVersion",t=>{var r;const e=(r=this.versionList)==null?void 0:r.activeVersion;p(Cs,e,"no active version"),this.viewVersion(e,t!=null?t:void 0)});m(this,"handleHelp",()=>{var t,e;(e=(t=this.versionOptions)==null?void 0:t.onHelp)==null||e.call(t)});m(this,"viewVersion",async(t,e)=>{var h,C;const r=this.versions[0].created===t.created;if(this.components.infoHeader.setVersion(t,e,r),this.oldViewer&&(this.oldViewer.destroy(),this.oldViewer=null),!this.versionList)return;(h=this.versionOptions)!=null&&h.onWillChangeVersion&&this.versionOptions.onWillChangeVersion(this,t),this.renderEditorLoading();const i=e==null?void 0:e.version;let o,s;if(i){const E=Math.min(t.version,i),A=Math.max(t.version,i),v=await this.versionHelper.getHistoryData(A,E);o=v.doc,s=v.historyData}else o=await this.versionHelper.getVersion(t.version),s=[];const{editorContainer:l}=this.components;l.innerHTML="";const c=new mQ(this.server,o),d=this.provider.createHistoryEditor(l,c);d.editorBlockRenders.registerRender(new gQ),d.editorBoxes.registerBoxClass(EQ),z(d.rootElement,H4.HISTORY);try{await nQ(c,this.versionHelper,s)}finally{this.oldViewer=d}(C=this.versionOptions)!=null&&C.onVersionChanged&&this.versionOptions.onVersionChanged(this,d,t)});m(this,"onMemoChanged",t=>{var e,r;(r=(e=this.versionOptions)==null?void 0:e.onMemoChanged)==null||r.call(e,t),this.components.infoHeader.dropdown.resetItems(),this.components.infoHeader.dropdown.setVersions(this.versions)});this.server=t,this.provider=e;const r=B("div",["version-dialog"],null),i=B("div",["version-viewer"],r),o=new bQ(i,{onCompareWithVersion:this.handleCompareWithVersion,onHelp:this.handleHelp}),s=B("div",["version-dialog-editor"],i),l=B("div",["version-list-root"],r);this.components={root:r,editorContainer:s,listContainer:l,infoHeader:o}}get versionHelper(){p(Cs,this.server.getVersionHelper,"Can not get getVersionHelper from doc");const t=this.server.getVersionHelper();return p(Cs,t,"current doc does not support version"),t}get editor(){return this.oldViewer}renderContent(t){var i,o,s,l;const{listContainer:e}=this.components;e.innerHTML="";const r=new cc({enableEdit:((i=this.versionOptions)==null?void 0:i.enableEdit)||!1,getDisabledTip:(o=this.versionOptions)==null?void 0:o.getDisabledTip,versions:t,versionHelper:this.versionHelper,useCreatedBy:(s=this.versionOptions)==null?void 0:s.useCreatedBy,onSelectVersion:this.handleSelectVersion,onRevert:this.handleRevert,onMemoChanged:this.onMemoChanged,decorateItem:(l=this.versionOptions)==null?void 0:l.decorateItem,getMarkColor:c=>{const{flag:d}=ps(this.server.getRemoteUsers(),c);return d}});r.render(e),this.versionList=r}initViewVersion(){var t;if(p(Cs,this.versionList,"no versionList"),(t=this.versionOptions)!=null&&t.initSelectedVersion){const{initSelectedVersion:e}=this.versionOptions,r=this.versionList.selectVersionByVersionNum(e);p(Cs,r,`version ${e} not found`),this.viewVersion(r)}else{const e=this.versionList.activeVersion;e&&this.viewVersion(e)}}renderEditorLoading(){const{editorContainer:t}=this.components;if(t.querySelector(":scope > .version-loading"))return;t.innerHTML="";const e=B("div",["version-loading"],null);e.appendChild(w2()),t.appendChild(e)}renderListLoading(){const{listContainer:t}=this.components;t.innerHTML="";const e=B("div",["version-list-header"],null),r=D.t("version.versionListHeader");B("span",["version-count"],e,r),cc.createFilterToolbar(e);const i=B("div",["version-loading"],null);i.appendChild(w2()),t.append(e,i)}async show(t){this.versionOptions={...this.versionOptions,...t};const{root:e}=this.components;z(e,"loading"),this.renderListLoading(),this.renderEditorLoading(),this.dialog||(this.dialog=new ZY(e)),this.dialog.show(t.container),this.versions=await this.versionHelper.getVersions(),st(this.components.root,"loading"),this.versionOptions.onVersionsLoaded&&this.versionOptions.onVersionsLoaded(this,this.versions),this.components.infoHeader.dropdown.setVersions(this.versions),this.renderContent(this.versions),this.initViewVersion()}destroy(){var t,e,r;(t=this.dialog)==null||t.destroy(),(e=this.versionList)==null||e.destroy(),(r=this.editor)==null||r.destroy()}}const vQ={expandCollapseButton:{expand:"\u5C55\u5F00",collapse:"\u6536\u8D77"}},BQ={expandCollapseButton:{expand:"Expand",collapse:"Collapse"}},TQ={expandCollapseButton:{expand:"\u5C55\u958B",collapse:"\u7E2E\u5C0F"}};D.mergeLang({"zh-CN":vQ,"en-US":BQ,"ja-JP":TQ});const fut="",yQ=I("heading-collapse");class mA{constructor(t){m(this,"collapsedHeadingBlocks",new Map);this.editor=t}setCollapsed(t,e,r){if(!e){this.collapsedHeadingBlocks.delete(t);return}p(yQ,r,"heading should be provided when set heading collapsed"),this.collapsedHeadingBlocks.set(t,r)}isCollapsed(t){return this.collapsedHeadingBlocks.has(t)}getCollapsedHeading(t){return this.collapsedHeadingBlocks.get(t)}destroy(){this.collapsedHeadingBlocks.clear()}}function gA(n,t){return n.addCustom("heading-collapse-handler",()=>new mA(n)).isCollapsed(t)}function pA(n,t,e,r){n.addCustom("heading-collapse-handler",()=>new mA(n)).setCollapsed(t,e,r)}function kQ(n,t){return n.addCustom("heading-collapse-handler",()=>new mA(n)).getCollapsedHeading(t)}I("heading-collapse");function eS(n,t,e=!1){const i=ie(t).querySelector(".heading-collapse-button");i&&$d(i,{[`data-editor-tooltip-${n.clientId}-dynamic`]:e?D.t("expandCollapseButton.expand"):D.t("expandCollapseButton.collapse")})}function _f(n,t){if(!mr(t))return;n.selection.selectBlock(t,0);const e=pa(t);eS(n,t,!0),e.forEach(i=>{Nv(i)}),z(t,"heading-collapsed");const r=iu(t);pA(n,t.id,!0,r)}function CA(n,t){eS(n,t),st(t,"heading-collapsed");const e=lt(t);pA(n,e,!1)}function RQ(n,t){t.forEach(e=>{Ye(e)&&CA(n,e),n1(e)})}function fc(n,t,e){pa(t,e).forEach(i=>{Ye(i)&&CA(n,i),n1(i)}),CA(n,t)}function wQ(n,t){o3(t)?_f(n,t):fc(n,t)}function nS(n){if(Ue(n))return!1;const e=it(n);return qt(e)}const SQ=[Zh,tm,em,nm,rm,im,om,sm];function LQ(n){const t=B("button",["heading-collapse-button"],null);return t.setAttribute(`data-editor-tooltip-${n.clientId}-dynamic`,D.t("expandCollapseButton.collapse")),t.innerHTML=R2,t}function rS(n){return Wm(n).querySelector("button.heading-collapse-button")}function EA(n,t){rS(t)||nS(t)||!mr(t)||ME(t,LQ(n),-1)}function iS(n){var t;(t=rS(n))==null||t.remove()}function oS(n,t){Wm(t).querySelector("button.heading-collapse-button")||EA(n,t)}function IQ(n){const t=iu(n),e=B("button",["heading-marker"],null);return e.innerHTML=SQ[t-1],e}function sS(n){return Wm(n).querySelector("button.heading-marker")}function Mf(n){sS(n)||nS(n)||!mr(n)||ME(n,IQ(n),1)}function d0(n){const t=sS(n);t==null||t.remove()}function lS(n){d0(n),Ye(n)&&Mf(n)}class DQ{handleDrop(t,e,r,i){if(Wd(e)||!Ye(e)||!ui(e))return;const o=pa(e);o.unshift(e);const s=o.reverse();let l=null;return t.doc.beginBatchUpdate(),s.forEach((c,d,h)=>{const C=t.getBlockData(c),E=Xo(t.editorBlocks,t.doc.toJSON(),C),A=t.insertDocAt(r,i,E)[0];d===h.length-1&&(l=A)}),t.doc.endBatchUpdate(),t.doc.beginBatchUpdate(),s.forEach(c=>{t.deleteBlock(c,l?Te(t,l,0):void 0)}),t.doc.endBatchUpdate(),l&&_f(t,l),!0}}class _Q{constructor(){m(this,"startIndex",0);m(this,"containerId","root")}async handleBeforePaste(t){const e=t.selection.startBlock;return this.startIndex=t.getBlockIndex(e),this.containerId=at(it(e)),!1}async handleAfterPasteDoc(t,e){const i=e.blocks.root[0],o=t.findBlockByIndex(this.containerId,this.startIndex);return o&&Ye(o)&&gA(t,i.id)&&_f(t,o),!1}destroy(){}}const MQ=I("heading-collapse");class AA{constructor(t){m(this,"handleLoad",()=>{this.editor.readonly||this.showCollapseButtons()});m(this,"handleReadonlyChanged",()=>{if(ce.isMobile)return;ue(this.editor.rootContainer).filter(Ye).forEach(e=>{this.editor.readonly?d0(e):Mf(e)})});m(this,"handleHoverBlock",(t,e)=>{e&&(st(e,"hovering-heading"),Ye(e)&&qt(it(e))&&(ce.isMobile||(this.editor.readonly?ui(e)||d0(e):Mf(e),ui(e)||iS(e)))),t&&Ye(t)&&qt(it(t))&&(z(t,"hovering-heading"),this.editor.readonly?ce.isMobile||Mf(t):d0(t),EA(this.editor,t))});m(this,"handleClick",(t,e)=>{const r=da(e,"button.heading-collapse-button");if(!r)return;const i=Z(r);!i||(p(MQ,Ye(i),"not a heading block"),wQ(this.editor,i),oS(this.editor,i))});m(this,"handleBeforeExecCommand",(t,e,r)=>{if(r.source==="block-command"){const i=e.id;if(i==="unordered-list"||i==="ordered-list"||i==="check-list"){const o=this.editor.selection.focusedBlock,s=this.editor.getBlockIndex(o),l=at(it(o));Ye(o)&&gA(this.editor,o.id)&&setTimeout(()=>{const c=t.findBlockByIndex(l,s);c&&Ye(c)&&_f(t,c)})}}});this.editor=t,t.addListener("load",this.handleLoad),t.addListener("click",this.handleClick),t.addListener("readonlyChanged",this.handleReadonlyChanged),t.addListener("beforeExecCommand",this.handleBeforeExecCommand),Be.get(t).addListener("change",this.handleHoverBlock),t.readonly||this.showCollapseButtons(),setTimeout(()=>{var r;(r=Tf.find(t))==null||r.addHandler(new DQ),t.input.addHandler(new _Q)})}showCollapseButtons(){const t=ue(this.editor.rootContainer).filter(Ye);t.length!==0&&(t[0]===Re(this.editor.rootContainer)&&t.splice(0,1),t.forEach(e=>{ce.isMobile?EA(this.editor,e):Mf(e)}))}destroy(){this.editor.removeListener("load",this.handleLoad),this.editor.removeListener("click",this.handleClick)}}function h0(n){const t=n.selection.range;if(t.isCollapsed()||t.start.blockId===t.end.blockId)return;const e=n.getBlockById(t.start.blockId),r=n.getBlockById(t.end.blockId);ui(e)&&fc(n,e),ui(r)&&fc(n,r)}function UQ(n){h0(n);const t=n.getFocusedBlock();Ye(t)}function OQ(n){h0(n);const t=n.getFocusedBlock();if(!Ye(t))return;const e=n.selection.range.focus;!e.isSimple()||e.offset===dt(n,t)&&ui(t)&&fc(n,t)}function NQ(n){h0(n);const t=n.getFocusedBlock();if(!Ye(t))return;const e=n.selection.range.focus;!e.isSimple()||e.offset===0&&ui(t)&&fc(n,t)}class PQ{handleBeforeKeyDown(t,e){return Vg(e.key)&&h0(t),e.key==="Enter"?(UQ(t),!1):e.key==="Delete"?(OQ(t),!1):(e.key==="Backspace"&&NQ(t),!1)}}class FQ{constructor(t){this.editor=t}onInsertBlock(t,e,r,i){this.updateBlockIfNeeded(r.id)}onUpdateBlockData(t,e,r,i){const o=this.editor.doc.getBlockData(t,e);this.updateBlockIfNeeded(o.id,r)}updateBlockIfNeeded(t,e){setTimeout(()=>{const r=this.editor.findBlockById(t);if(!r)return;if(!Ye(r)){if(e&&e.delete.includes("heading")&&(lS(r),iS(r),gA(this.editor,t))){pA(this.editor,t,!1);const o=s3(r);RQ(this.editor,o)}return}St(r,"hovering-heading")&&oS(this.editor,r),lS(r);const i=kQ(this.editor,t);i&&(fc(this.editor,r,i),_f(this.editor,r))},100)}}function KQ(n){return!!n.heading}function aS(n){var e;const t=n.heading;return(e=Number.parseInt(`${t}`,10))!=null?e:1}function cS(n,t,e){var o;const r=js(n,t.type);let i="";if(r.convertTo){const s=to();i=r.convertTo(n,t,s,"text",[{containerId:"root",blockIndex:0}]),i=i.replace(/\n/g,"").trim()}else i=de((o=t.text)!=null?o:[]);return{parentNode:e,children:[],text:i,level:aS(t),block:t}}class Uf{constructor(t){m(this,"nodes",[]);this.editor=t}appendBlock(t){const e=this.findParent(aS(t),this.nodes);e?e.children.push(cS(this.editor,t,e)):this.nodes.push(cS(this.editor,t,null))}findParent(t,e){const r=e[e.length-1];if(!r||t<=1)return null;if(r.level===t-1)return r;const i=this.findParent(t,r.children);return i||(r.level<t?r:null)}static buildToc(t,e){const r=new Uf(t),i=e.blocks.root;for(let o=0;o<i.length;o++){const s=i[o];KQ(s)&&r.appendBlock(s)}return r}}class Es extends ve.TypedEmitter{constructor(e){super();m(this,"toc");m(this,"updateToc",_e.default(()=>{this.updateTocNow()},500));this.editor=e,e.doc.registerCallback(this),setTimeout(()=>{this.updateTocNow()},500),this.toc=new Uf(this.editor)}destroy(){this.editor.doc.unregisterCallback(this)}isHeadingBlock(e){return!!e.heading}onInsertBlock(e,r,i,o){e==="root"&&this.isHeadingBlock(i)&&this.updateToc()}onDeleteBlock(e,r,i){e==="root"&&this.updateToc()}onUpdateBlockText(e,r,i,o){if(e!=="root")return;const s=this.editor.doc.getBlockData(e,r);this.isHeadingBlock(s)&&this.updateToc()}onUpdateBlockData(e,r,i,o){e==="root"&&this.updateToc()}static register(e){return e.addCustom("editor-toc",()=>new Es(e))}static get(e){return e.getCustom("editor-toc")}updateTocNow(){this.toc=Uf.buildToc(this.editor,this.editor.doc.toJSON()),this.emit("change",this.editor,this.toc)}}const dut="";function VQ(n,t){if(t.nodes.length===0)return!0;if(t.nodes.length>1)return!1;const e=n.findBlockById(t.nodes[0].block.id);return e&&!zi(e)?!1:t.nodes[0].children.length===0}function xA(n,t){t.forEach(e=>{const r=B("div",["toc-node"],n),i=B("div",["toc-title"],r);if(B("span",["toc-text"],i,e.text).setAttribute("data-block-id",e.block.id),e.children.length>0){const s=B("div",["toc-children"],r);xA(s,e.children)}})}function $Q(n,t){const e=da(t,".toc-text");if(!e)return;const r=e.getAttribute("data-block-id");if(!r)return;const i=n.findBlockById(r);!i||(t.preventDefault(),t.stopPropagation(),Ks(i,{elementToScroll:qe(n.rootContainer),verticalOffset:-30}),n.selection.selectBlock(i,0,void 0,{noScroll:!0}))}function uS(n,t,e){if(st(t,"loading"),t.innerHTML="",VQ(n,e)){B("div",["toc-empty-message"],t,D.t("toc.empty"));return}const r=n.findBlockById(e.nodes[0].block.id);if(r&&!zi(r))xA(t,e.nodes);else if(e.nodes.length>=1){const[i,...o]=e.nodes,s=[...i.children,...o];xA(t,s)}Mp(n,"toc-click-handler",()=>{n.addListener("click",$Q)})}class HQ{constructor(t){m(this,"handleUpdateToc",(t,e)=>{Array.from(t.rootContainer.querySelectorAll('.embed-block[data-type="editor-block"][data-embed-type="toc"]')).forEach(i=>{const o=i.querySelector(".editor-toc-container");o&&uS(t,o,e)})});this.editor=t,Es.register(t).addListener("change",this.handleUpdateToc)}destroy(){Es.register(this.editor).removeListener("change",this.handleUpdateToc)}get toc(){return Es.register(this.editor).toc}}function jQ(n,t){const e=B("div",["editor-toc-container"],t),i=n.addCustom("init-editor-toc",()=>new HQ(n)).toc;i.nodes.length===0?z(e,"loading"):uS(n,e,i)}function zQ(n,t,e,r){return r==="markdown"?"[toc]":""}function GQ(n,t,e){const{data:r}=e;if(!r||r.embedType!=="toc"||!rt(n,t))return null;const i={};return{blockData:{id:et(),type:"embed",embedType:"toc",embedData:i}}}const fS={embedType:"toc",createEmbedContent:jQ,convertTo:zQ,convertFrom:GQ},WQ={toc:{empty:"No Toc"}},qQ={toc:{empty:"No Toc"}},XQ={toc:{empty:"No Toc"}};D.mergeLang({"zh-CN":WQ,"en-US":qQ,"ja-JP":XQ});function YQ(n){return!!n.getAttribute("data-style-heading")}function bA(n,t){return YQ(t)&&dt(n,t)>0}function QQ(n){const t=qe(n.rootElement);let e=0,r=0,i=0;if(t===document.documentElement){const o=n.rootContainer.getBoundingClientRect();e=o.left+o.width/2,r=10,i=t.offsetHeight}else{const o=t.getBoundingClientRect();e=o.left+o.width/2,r=o.top+10,i=o.bottom}for(;r<i;){const o=document.elementsFromPoint(e,r);for(let s=0;s<o.length;s++){const l=Z(o[s]);if(l&&n.rootContainer.contains(l))return l}r+=10}return null}function vA(n,t){let e=t;for(;e&&!bA(n,e);)e=Jt(e);return e}function dS(n){if(Ue(n))return!1;const e=it(n);return qt(e)}function m0(n,t){let e=t;for(;e&&!bA(n,e);)e=Ue(e),e&&dS(e)&&(e=null);return e}const JQ=.3;class ZQ extends ve.TypedEmitter{constructor(e){super();m(this,"scrollContainer");m(this,"scrollEventTarget");m(this,"scrollStatus",{curHeadingBlock:null,previousHeadingBlock:null,nextHeadingBlock:null});m(this,"handleScroll",_e.default(()=>{const e={curHeadingBlock:null,previousHeadingBlock:null,nextHeadingBlock:null};let r=QQ(this.editor);if(r&&(r=a1(r)),!r||!this.scrollContainer){this.setStatus(e);return}if(dS(r)&&(r=Jt(r)),!r){this.setStatus(e);return}if(bA(this.editor,r)){e.curHeadingBlock=r,e.previousHeadingBlock=m0(this.editor,r),e.nextHeadingBlock=vA(this.editor,r),this.setStatus(e);return}const i=this.scrollContainer.getBoundingClientRect(),o=vA(this.editor,r);if(o){const l=o.getBoundingClientRect();if(l.top>i.top&&l.top<i.top+i.height*JQ){e.curHeadingBlock=o,e.previousHeadingBlock=m0(this.editor,o),e.nextHeadingBlock=vA(this.editor,o),this.setStatus(e);return}e.nextHeadingBlock=o}const s=m0(this.editor,r);s&&(e.curHeadingBlock=s,e.previousHeadingBlock=m0(this.editor,s)),this.setStatus(e)},200));this.editor=e}setStatus(e){this.scrollStatus.previousHeadingBlock===e.previousHeadingBlock&&this.scrollStatus.nextHeadingBlock===e.nextHeadingBlock&&this.scrollStatus.previousHeadingBlock===e.previousHeadingBlock||(this.scrollStatus=e,this.emit("change",this.editor,e))}start(){this.stop(),this.scrollContainer=qe(this.editor.rootElement),this.scrollEventTarget=this.scrollContainer===document.documentElement?document:this.scrollContainer,this.scrollEventTarget.addEventListener("scroll",this.handleScroll),this.handleScroll()}stop(){this.scrollEventTarget&&(this.scrollEventTarget.removeEventListener("scroll",this.handleScroll),this.scrollStatus={curHeadingBlock:null,previousHeadingBlock:null,nextHeadingBlock:null})}destroy(){this.stop(),this.scrollEventTarget=void 0}}class hS{constructor(t,e){m(this,"suggest");m(this,"onClose",()=>{this.editor.focus()});m(this,"onShow",(t,e,r,i)=>{const o=this.editor.getBlockByIndex(e,r);if(!mr(o)){const s=Z(it(o));if(s&&_t(s)==="code")return!1}return!0});m(this,"onClickItem",(t,e,r)=>{const i=e.data,o={id:et(),type:"mention",box:!0,created:Date.now(),iconUrl:i.avatarUrl,text:i.displayName,mentionId:i.userId},s=this.editor.selection.range;if(!s.isCollapsed()||!s.isSimple())return;const l=s.focus,c=this.editor.getBlockById(l.blockId);this.editor.insertBoxToBlock(c,l.offset,o)});m(this,"queryItems",async(t,e)=>(await this.options.queryUsers(this.editor,e)).map(o=>{const s=Qd(o.displayName);return{id:o.userId,name:o.displayName,icon:o.avatarUrl?`<img src="${o.avatarUrl}" class="mention-user-avatar">`:`<span style="background: ${s}" class="mention-user-avatar-string">${Yd(o.displayName,1)}</span>`,element:o.element,data:o,subText:o.email}}));this.editor=t,this.options=e,this.suggest=new BC(t,{id:"editor-mention",trigger:["@","\uFF20"],autoDeleteTrigger:!0,showLoading:!0,onShow:this.onShow,onClickItem:this.onClickItem,queryItems:this.queryItems,onClose:this.onClose})}destroy(){}}I("mathjax-box");function tJ(n,t,e,r){const i=r,o=B("a",["mention-container"],e);B("span",["mention-name"],o,`@${i.text}`),o.setAttribute("data-mention-id",i.mentionId)}function eJ(n,t,e){}function nJ(n,t,e,r){return`@${t.text}`}function rJ(){return{abstract:D.t("mention.abstract")}}function iJ(n,t,e){return t.text.toLowerCase().indexOf(e)>=0}const mS={boxType:"mention",updateBoxContent:tJ,handleClickBox:eJ,convertTo:nJ,getBoxProperties:rJ,matchText:iJ};function oJ(n){const t=B("div",["mention-button-wrap"],null),e=Ar("mention-button",D.t("list.mention.tooltip"),d2,[],n.clientId);return t.appendChild(e),t}class sJ{constructor(t){m(this,"mentionButton");m(this,"handleHoveringBlock",t=>{var e;!t||!rt(this.editor,t)||!Kt(t)||!this.editor.isWritable()||(t&&this.shouldBlockShowMention(t)?ie(t).appendChild(this.mentionButton):(e=this.mentionButton)==null||e.remove())});m(this,"handleMouseDown",(t,e)=>{e.preventDefault(),e.stopPropagation();const r=Z(this.mentionButton);if(!r||!rt(t,r))return;const i=t.selection.range.focus;if(!i.isSimple())return;let o;t.selection.focusedBlock!==r?o=dt(t,r):o=i.offset,setTimeout(()=>{const s=t.insertTextToBlock(r,o,"@");o+=1;const l=de(_n(s,o).left);this.editor.selection.selectBlock(r,o),this.editor.focus(),t.getCustom("mention").suggest.popup(r,o,l,"@")})});m(this,"destroy",()=>{Be.get(this.editor).removeListener("change",this.handleHoveringBlock)});this.editor=t,this.mentionButton=oJ(t),Be.get(this.editor).addListener("change",this.handleHoveringBlock),t.domEvents.addEventListener(this.mentionButton,"mousedown",this.handleMouseDown)}shouldBlockShowMention(t){const e=tr(t);return!(e==="ordered"||e==="unordered"||e==="text-only")}}const hut="",lJ={mention:{abstract:"\u6210\u5458"}},aJ={mention:{abstract:"Member"}},cJ={mention:{abstract:"\u30E1\u30F3\u30D0\u30FC"}};D.mergeLang({"zh-CN":lJ,"en-US":aJ,"ja-JP":cJ});const uJ={templates:{title:"\u9009\u62E9\u6A21\u677F\uFF0C\u5FEB\u901F\u521B\u5EFA",create:"\u65B0\u5EFA\u6A21\u677F",choose:"\u5168\u90E8\u6A21\u677F",customizedMark:"\u81EA\u5B9A\u4E49"}},fJ={templates:{title:"Choose a template",create:"New template",choose:"All templates",customizedMark:"Custom"}},dJ={templates:{title:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u9078\u629E",create:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u65B0\u898F\u4F5C\u6210",choose:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u4E00\u89A7",customizedMark:"\u30AB\u30B9\u30BF\u30E0"}};D.mergeLang({"zh-CN":uJ,"en-US":fJ,"ja-JP":dJ});const mut="",hJ="data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjEyMCIgaGVpZ2h0PSIxMjAiIHZpZXdCb3g9IjAgMCAxMjAgMTIwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTQ4IDU5QzQ4IDU0LjU4MTcgNTEuNTgxNyA1MSA1NiA1MUg5M0M5OC41MjI4IDUxIDEwMyA1NS40NzcyIDEwMyA2MVY4OEMxMDMgOTEuODY2IDk5Ljg2NiA5NSA5NiA5NUg1NkM1MS41ODE3IDk1IDQ4IDkxLjQxODMgNDggODdWNTlaIiBmaWxsPSIjRDZFOUZBIi8+CjxwYXRoIGQ9Ik0xOCA2NEMxOCA2Mi4zNDMxIDE5LjM0MzEgNjEgMjEgNjFINTZDNjAuNDE4MyA2MSA2NCA2NC41ODE3IDY0IDY5VjgzQzY0IDg1LjIwOTEgNjIuMjA5MSA4NyA2MCA4N0gyN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zYxIDE5MS4yODYgOTcuNjA3MiAxODkuOTU4IDk1Ljk2OCAxODkuOTU4SDkwLjAzMThaTTkwLjAzMTkgMjEzLjcwMkM4OC4zOTI3IDIxMy43MDIgODcuMDYzOCAyMTUuMDMxIDg3LjA2MzggMjE2LjY3Qzg3LjA2MzggMjE4LjMwOSA4OC4zOTI3IDIxOS42MzggOTAuMDMxOSAyMTkuNjM4SDk1Ljk2ODFDOTcuNjA3MyAyMTkuNjM4IDk4LjkzNjIgMjE4LjMwOSA5OC45MzYyIDIxNi42N0M5OC45MzYyIDIxNS4wMzEgOTcuNjA3MyAyMTMuNzAyIDk1Ljk2ODEgMjEzLjcwMkg5MC4wMzE5WiIgZmlsbD0iIzkxRDlCRSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzEyNTZfMzcxNjgiPgo8cmVjdCB3aWR0aD0iMzcyIiBoZWlnaHQ9IjI3OSIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",gS=I("templates");function BA(n){const t=n.rootElement.querySelector(":scope .editor-templates");if(!t)return null;const e=t.querySelector(":scope .editor-templates-cards");return p(gS,e,"no card container"),{root:t,cardContainer:e}}function gJ(n){const t=BA(n);if(t)return t.cardContainer.innerHTML="",t;const e=B("div",["editor-templates"],n.rootElement);B("div",["editor-templates-title"],e,D.t("templates.title"));const r=B("div",["editor-templates-cards"],e);return{root:e,cardContainer:r}}function pS(n,t,e,r,i){var C;const o=(C=n.options.componentsOptions)==null?void 0:C.templates,s=B("div",["editor-template-card",...r],null),l=B("div",["editor-template-thumb-container"],s),c=B("img",["editor-template-thumb"],l);c.src=t,c.style.display="none",c.onerror=()=>{var A;const E=(A=o==null?void 0:o.placeHolderImageSrc)!=null?A:mJ;c.src!==E&&(c.src=E)},c.onload=()=>{c.style.display=""};const d=B("div",["editor-template-name"],s),h=B("span",[],d,e);return o!=null&&o.showTemplateTitleAttr&&h.setAttribute("title",e),s.onclick=()=>i(s),s}function pJ(n,t){return t.thumbnailUrl?t.thumbnailUrl:n.doc.buildResourceUrl("thumbnail.png")}function CJ(n,t){const e=pJ(n,t);return pS(n,e,t.name,[],async()=>{var i,o;const r=(i=n.options.componentsOptions)==null?void 0:i.templates;await((o=r==null?void 0:r.onApplyTemplate)==null?void 0:o.call(r,n,t)),Es.register(n).updateToc()})}function EJ(n,t){return pS(n,t,D.t("templates.choose"),["more"],()=>{var r,i;const e=(r=n.options.componentsOptions)==null?void 0:r.templates;(i=e==null?void 0:e.onChooseTemplate)==null||i.call(e,n)})}function AJ(n,t){var C,E;const e=(C=n.options.componentsOptions)==null?void 0:C.templates;if(!e)return;const i=Me(n.rootContainer).getBoundingClientRect().width;let o=1;const s=hJ,l=BA(n);if(l){if(t!=null&&t.reset){const A=Array.from(l.cardContainer.children),v=l.cardContainer.firstElementChild;if(p(gS,v,"no first card"),St(v,"new")||St(v,"more"))return;const k=window.getComputedStyle(v),L=parseFloat(k.marginLeft),M=parseFloat(k.marginRight),U=v.getBoundingClientRect().width+L+M;o=Math.floor(i/U);const J=Math.max(1,o-1-1),q=A.length-1;A.forEach((Y,ot)=>{ot>J&&ot<q?Y.style.display="none":(ot>=q&&St(Y,"more"),Y.style.display="")})}return}const c=e.templates,{cardContainer:d}=gJ(n);c.forEach((A,v)=>{const k=CJ(n,A);if(v>0&&v>=o&&(k.style.display="none"),d.appendChild(k),v===0){const L=window.getComputedStyle(k),M=parseFloat(L.marginLeft),U=parseFloat(L.marginRight),F=k.getBoundingClientRect().width+M+U;o=Math.floor(i/F)-1}});const h=EJ(n,s);d.appendChild(h),(E=e==null?void 0:e.onTemplateChooserStatusChanged)==null||E.call(e,n,d,"visible")}const CS=_e.default(AJ,50);function xJ(n){var r,i;const t=BA(n);if(!t)return;t.root.remove();const e=(r=n.options.componentsOptions)==null?void 0:r.templates;(i=e==null?void 0:e.onTemplateChooserStatusChanged)==null||i.call(e,n,null,"hide")}function bJ(n,t){const e=t.blocks.root;if(e.length===0)return!0;if(e.length>5)return!1;const r=[...e],i=n.findBlockById(r[0].id);i&&zi(i)&&r.splice(0,1);const o=s=>{var l;return s.type!=="text"&&s.type!=="list"?!1:s.text?((l=s.text)==null?void 0:l.length)===0:!0};return r.every(s=>o(s))}function g0(n,t){bJ(n,n.doc.toJSON())?CS(n,t):(CS.cancel(),xJ(n))}function vJ(n){const r=new DOMParser().parseFromString(n,"text/html").querySelector("svg");if(!r)return null;const i=r.getAttribute("viewBox");if(!i)return null;const o=i.split(" ");if(o.length===4){const s=o[2],l=o[3];return r.setAttribute("width",s),r.setAttribute("height",l),r.outerHTML}return null}function TA(n,t,e=!0){const r=new Image,i=document.createElement("canvas"),o=i.getContext("2d");if(!o){t(new Error("failed to get context"),null);return}r.onload=()=>{if(i.width=r.naturalWidth,i.height=r.naturalHeight,e&&(i.width===0||i.height===0)){const s=n.substring(26);if(s){const l=atob(s),c=vJ(l);if(c){zg(c,"image/svg+xml").then(d=>{TA(d,t,!1)});return}}t(null,null);return}o.drawImage(r,0,0),i.toBlob(s=>{t(null,s)},"image/png")},r.src=n}function BJ(n){return new Promise((t,e)=>{TA(n,(r,i)=>{if(r){e(r);return}if(!i){e(new Error("Failed to get image blob"));return}t(i)})})}async function ES(n){const t=await ma(n);return new Promise((e,r)=>{TA(t,(i,o)=>{if(i){r(i);return}if(!o){r(new Error("Failed to get image blob"));return}e(o)})})}const AS="Untitled";function xS(n){const t=Re(n.rootContainer);return!t||!rt(n,t)?AS:n.getBlockString(t)||AS}function TJ(n){let t;return n.forEach((e,r)=>{r.toLocaleLowerCase()==="content-type"&&(t=e)}),t!=null?t:""}async function bS(n){try{const t=await fetch(n,{credentials:"same-origin"}),e=await t.blob(),r=TJ(t.headers).toLocaleLowerCase();let i="";if(r){const s=Lg.default[r].extensions;s&&s.length>0&&(i=s[0])}return new File([e],`${Date.now()}.${i}`,{type:r})}catch{return null}}const gut="";class vS{constructor(t){m(this,"isShown",!1);m(this,"currentBlock",null);this.editor=t}render(t,e){if(this.isShown)return;this.isShown=!0,this.currentBlock=t,Gg(t.id);const r=B("div",["iframe-embed-auth-error-tips"],document.body);r.innerHTML=D.t("authError.tips"),r.addEventListener("click",i=>{var s,l;const o=i.target;if(o instanceof HTMLSpanElement)switch(o.id){case"retry":(l=(s=this.editor.doc).triggerReAuth)==null||l.call(s);break;case"exit":e==null||e(),this.destroy();break}})}destroy(){this.currentBlock&&Wg(this.currentBlock.id);const t=document.body.querySelector("div.iframe-embed-auth-error-tips");t==null||t.remove(),this.isShown=!1}}const yJ={authError:{tips:'<div>\u670D\u52A1\u5DF2\u65AD\u5F00\uFF0C\u4E3A\u4E86\u907F\u514D\u5185\u5BB9\u4E22\u5931\uFF0C\u6211\u4EEC\u6682\u65F6\u7981\u7528\u7F16\u8F91\u529F\u80FD\uFF0C\u4F60\u53EF\u4EE5 <span id="retry">\u91CD\u8FDE\u670D\u52A1</span> \u6216 <span id="exit">\u9000\u51FA\u7F16\u8F91</span></div>'}},kJ={authError:{tips:`<div>You're offline. Editing is temporarily disabled to avoid the loss of content. Please <span id="retry">go online</span> or <span id="exit">exit editor</span></div>`}},RJ={authError:{tips:'<div>\u30B5\u30FC\u30D3\u30B9\u3078\u306E\u63A5\u7D9A\u304C\u9014\u5207\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u7DE8\u96C6\u6A5F\u80FD\u304C\u4E00\u6642\u7684\u306B\u4F7F\u7528\u3067\u304D\u306A\u3044\u72B6\u614B\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002<span id="retry">\u30B5\u30FC\u30D3\u30B9\u3078\u63A5\u7D9A</span> \u307E\u305F\u306F <span id="exit">\u7DE8\u96C6\u3092\u7D42\u4E86</span>\u3057\u3066\u304F\u3060\u3055\u3044</div>'}};D.mergeLang({"zh-CN":yJ,"en-US":kJ,"ja-JP":RJ});const p0="doc-re-auth-event";class yA extends ve.TypedEmitter{constructor(e){super();m(this,"authErrorCallback");m(this,"authRecoverCallback");m(this,"destroy",()=>{this.authErrorCallback=void 0,this.authRecoverCallback=void 0,this.editor.doc.externalDoc.unregisterCallback(this)});m(this,"onError",e=>{e.code===Vu.err&&this.authErrorCallback&&this.authErrorCallback()});m(this,"onAuthRecover",()=>{this.authRecoverCallback&&this.authRecoverCallback()});this.editor=e,this.editor.doc.externalDoc.registerCallback(this)}addAuthListen(e,r){e==="authError"?this.authErrorCallback=r:this.authRecoverCallback=r}removeListeners(){this.authErrorCallback=void 0,this.authRecoverCallback=void 0}}const wJ=800;class SJ{constructor(t){m(this,"longPressTimeout",0);m(this,"handleSelectionChange",()=>{});m(this,"handleLongPress",t=>{const e=t.touches[0],r=rh(this.editor,e.clientX,e.clientY);!r||console.log(r)});m(this,"handleTouchStart",t=>{t.touches.length===1&&(this.longPressTimeout=window.setTimeout(()=>{this.handleLongPress(t)},wJ))});m(this,"handleTouchEnd",t=>{this.longPressTimeout&&(window.clearTimeout(this.longPressTimeout),this.longPressTimeout=0)});this.editor=t,this.editor.addListener("selectionChanged",this.handleSelectionChange),document.addEventListener("touchstart",this.handleTouchStart),document.addEventListener("touchend",this.handleTouchEnd)}destroy(){this.editor.removeListener("selectionChanged",this.handleSelectionChange),document.removeEventListener("touchstart",this.handleTouchStart),document.removeEventListener("touchend",this.handleTouchEnd)}}const LJ=`<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
795
795
|
<g>
|
|
796
796
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 7.61719C11.4477 7.61719 11 7.16947 11 6.61719V3.61719C11 3.0649 11.4477 2.61719 12 2.61719C12.5523 2.61719 13 3.0649 13 3.61719V6.61719C13 7.16947 12.5523 7.61719 12 7.61719ZM4.92893 5.54612C5.31946 5.15559 5.95262 5.1556 6.34315 5.54612L8.46447 7.66744C8.85499 8.05796 8.85499 8.69113 8.46447 9.08165C8.07394 9.47218 7.44078 9.47218 7.05025 9.08165L4.92893 6.96033C4.53841 6.56981 4.53841 5.93664 4.92893 5.54612ZM15.5355 9.08165C15.145 8.69113 15.145 8.05796 15.5355 7.66744L17.6569 5.54612C18.0474 5.1556 18.6805 5.1556 19.0711 5.54612C19.4616 5.93664 19.4616 6.56981 19.0711 6.96033L16.9497 9.08165C16.5592 9.47218 15.9261 9.47218 15.5355 9.08165ZM2 12.6172C2 12.0649 2.44772 11.6172 3 11.6172L6 11.6172C6.55229 11.6172 7 12.0649 7 12.6172C7 13.1695 6.55228 13.6172 6 13.6172L3 13.6172C2.44772 13.6172 2 13.1695 2 12.6172ZM17 12.6172C17 12.0649 17.4477 11.6172 18 11.6172L21 11.6172C21.5523 11.6172 22 12.0649 22 12.6172C22 13.1695 21.5523 13.6172 21 13.6172L18 13.6172C17.4477 13.6172 17 13.1695 17 12.6172ZM15.5355 16.1527C15.9261 15.7622 16.5592 15.7622 16.9497 16.1527L19.0711 18.274C19.4616 18.6646 19.4616 19.2977 19.0711 19.6883C18.6805 20.0788 18.0474 20.0788 17.6569 19.6883L15.5355 17.5669C15.145 17.1764 15.145 16.5432 15.5355 16.1527ZM4.92893 19.6883C4.53841 19.2977 4.53841 18.6646 4.92893 18.274L7.05025 16.1527C7.44078 15.7622 8.07394 15.7622 8.46447 16.1527C8.85499 16.5432 8.85499 17.1764 8.46447 17.5669L6.34315 19.6883C5.95262 20.0788 5.31946 20.0788 4.92893 19.6883ZM12 22.6172C11.4477 22.6172 11 22.1695 11 21.6172V18.6172C11 18.0649 11.4477 17.6172 12 17.6172C12.5523 17.6172 13 18.0649 13 18.6172V21.6172C13 22.1695 12.5523 22.6172 12 22.6172Z" fill="#5587F0"/>
|
|
797
797
|
<animateTransform attributeType="xml" attributeName="transform" type="rotate" values="0 12 12.5;360 12 12.5" dur="2s" repeatCount="indefinite" />
|
|
@@ -948,4 +948,4 @@ ${o.mermaidText}
|
|
|
948
948
|
${o.flowchartText}
|
|
949
949
|
\`\`\`\`\`\``}return""}const mtt={embedType:"flowchart",convertFrom:ftt,handleUpdateBlock:utt,createEmbedContent:ctt,getBlockProperties:dtt,convertTo:htt},gtt=I("plantuml-helper");function PS(n,t){var l;let r=((l=(n.getComponentOptions("plantuml")||{}).cdn)==null?void 0:l.plantuml)||GZ;r.endsWith("/")||(r+="/");const i=C9.default.encode(t);p(gtt,i,i),r+=i;const s=new URLSearchParams(document.location.search).get("doc");return Hg(r,{id:`${s}-${et()}`})}async function ptt(n,t){try{const e=await wA(n,t);return(await n.doc.uploadResource(e)).resourceId}catch{return Promise.resolve(t)}}class gc extends _A{constructor(t){super(t,"plantuml","plantumlText")}static get(t,e){return t.addCustom(`plantuml-${e.id}`,()=>new gc(t))}code2ObjectUrl(t){return Promise.resolve(PS(this.editor,t))}code2ResourceId(t){const e=PS(this.editor,t);return ptt(this.editor,e)}destroy(){}}function Ctt(n,t,e){gc.get(n,e).createEmbedContent(t,e)}function Ett(n,t,e){const r=gc.get(n,e),i=Pt(t);return r.updateEmbedContent(i,e),!0}function Att(n,t,e){const{data:r}=e,i=n.getBlockString(t).trim();if(!r||r.embedType!=="plantuml"||i!=="```plantuml"||!rt(n,t))return null;const o={src:"",plantumlText:""};return{blockData:{id:et(),type:"embed",embedType:"plantuml",embedData:o},onConverted:(c,d)=>{gc.get(c,c.getBlockData(d)).editGraph(Pt(d))}}}function xtt(n,t){return gc.get(n,n.getBlockData(t)).getBlockProperties(t)}function btt(n,t,e,r){const{embedData:i}=t,o=i;if(r==="html")return o.src?`<img src="${n.doc.buildResourceUrl(o.src,{withToken:!0})}" />`:o.flowchartText?`<div>${o.flowchartText}</div>`:"<p>[plantuml]</p>";if(r==="markdown"){if(o.src)return`})`;if(o.flowchartText)return`\`\`\`plantuml\`\`\`
|
|
950
950
|
${o.flowchartText}
|
|
951
|
-
\`\`\`\`\`\``}return""}const vtt={embedType:"plantuml",convertFrom:Att,handleUpdateBlock:Ett,createEmbedContent:Ctt,getBlockProperties:xtt,convertTo:btt},But="",Btt="hr",Ttt={dividingLine:{type:"\u5206\u5272\u7EBF",abstract:"\u5206\u5272\u7EBF"}},ytt={dividingLine:{type:"Dividing-Line",abstract:"Dividing-Line"}},ktt={dividingLine:{type:"\u533A\u5207\u308A\u7DDA",abstract:"\u533A\u5207\u308A\u7DDA"}};D.mergeLang({"zh-CN":Ttt,"en-US":ytt,"ja-JP":ktt});function Rtt(n,t){const e=B("div",["editor-embed-container"],t);B("hr",["editor-embed-hr"],e)}function wtt(n,t,e,r){return r==="html"?"<hr />":r==="markdown"?"---":"------------"}function Stt(){return{name:"hr",insertEmbedCommandItems:[{id:"insert-hr",name:D.t("dividingLine.type"),icon:r2,order:500,group:"common",subText:yn("insert-hr")}],handleInsertEmptyEmbed:async(n,t)=>{const{containerId:e,blockIndex:r}=t;return n.insertEmbed(e,r,Btt,{})}}}function Ltt(n,t,e){const{data:r}=e;if(!r||r.embedType!=="dividing-line"||!rt(n,t))return null;const i={};return{blockData:{id:et(),type:"embed",embedType:"hr",embedData:i}}}function Itt(){return{abstract:D.t("dividingLine.abstract")}}const Dtt={embedType:"hr",createEmbedContent:Rtt,convertTo:wtt,getOptions:Stt,convertFrom:Ltt,getBlockProperties:Itt},Tut="",yut="",_tt={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>',maxSizeFailed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u9650\u5236\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6</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"}}},Mtt={media:{upload:{failed:'<div class="line-1">{name} upload failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>',maxSizeFailed:'<div class="line-1">{name} upload failed</div><div class="line-2">The file size exceeds limit. Please choose another file.</div>'},load:{failed:'<div class="line-1">{name} loading failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>'},audio:{menuItem:"Audio",abstract:"Audio"},video:{menuItem:"Video",abstract:"Video"}}},Utt={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>',maxSizeFailed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u30D5\u30A1\u30A4\u30EB\u306E\u30B5\u30A4\u30BA\u304C\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u308B\u305F\u3081\u3001\u4ED6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044</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"}}};D.mergeLang({"zh-CN":_tt,"en-US":Mtt,"ja-JP":Utt});var Yr=(n=>(n.AUDIO="audio",n.VIDEO="video",n))(Yr||{}),Of=(n=>(n.Empty="empty",n.Progress="progress",n.Error="error",n))(Of||{});const FS=10*1024*1024,Ott=["wav","mp3","aac","ogg","webm","flac"],Ntt=["ogg","mp4","webm"],Ptt=()=>{};function KS(n){var h,C,E,A,v,k;const t=(h=n.getComponentOptions("media"))!=null?h:{},{allowedMedias:e,maxSize:r,callbacks:i}=t,o=(C=e==null?void 0:e.audio)!=null?C:Ott,s=(E=e==null?void 0:e.video)!=null?E:Ntt,l=(A=r==null?void 0:r.audio)!=null?A:FS,c=(v=r==null?void 0:r.video)!=null?v:FS,d=(k=i==null?void 0:i.onError)!=null?k:Ptt;return{allowedMedias:{audio:o,video:s},maxSize:{audio:l,video:c},callbacks:{onError:d}}}function Ftt(n,t){const e=o=>o.map(s=>`.${s}`).join(","),{allowedMedias:r}=KS(n),i=r[t];return i?e(i):"*"}function Ktt(n,t,e){const{maxSize:r,callbacks:i,allowedMedias:o}=KS(t),{[e]:s}=r,{[e]:l}=o;if(s&&n.size>s){const d=new Error("media is too large");throw d.code=`MaxMediaSize-${e}`,i!=null&&i.onError&&(i==null||i.onError(t,d)),d}const c=Jc(n.name);if(l&&!l.includes(c.toLowerCase())){const d=new Error(`media file is not allowed: ${c}`);throw d.code="NotAllowedFile",i!=null&&i.onError&&(i==null||i.onError(t,d)),d}}function Vtt(n){return n===Of.Empty||n===Of.Error}const en=I("media");class $tt extends ve.TypedEmitter{constructor(e){super();m(this,"mediaContainer",null);m(this,"media",null);m(this,"abstract",null);m(this,"handleMediaLoadError",(e,r)=>{if(!r.target||!(r.target instanceof Node)||!(r.target instanceof Element?r.target:r.target.parentElement))return;const o=Z(r.target);if(!o||!o.contains(this.mediaContainer))return;const s=this.renderError();this.updateMediaContent(s),this.emit("mediaError",e,"load_error",lt(o))});m(this,"handleUploadFile",async e=>{p(en,this.abstract,"no abstract"),p(en,this.mediaContainer,"The media element not exist");const{editor:r}=this.options,i=Z(this.mediaContainer);p(en,i,"The block element not exist");const o=r.getBlockData(i);try{const{resourceId:s}=await r.doc.uploadResource(e,{onProgress:C=>{this.renderProgress(C,e)}}),{name:l,type:c,size:d}=e,h={...o,embedData:{...o.embedData,src:s,fileName:l,fileSize:d,fileType:c}};r.updateBlockData(i,h)}catch(s){en.error(s),this.emit("mediaError",r,"upload_error",o.id),this.renderRetry(e,s)}st(i,"media-block-uploading")});m(this,"destroy",()=>{this.mediaContainer=null});this.options=e}bindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.addEventListener(this.media,"error",this.handleMediaLoadError)}unbindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.removeEventListener(this.media,"error",this.handleMediaLoadError)}updateMediaContent(e){p(en,this.mediaContainer,"The media element not exist"),this.mediaContainer.innerHTML="",this.mediaContainer.append(e)}renderError(){p(en,this.abstract,"no abstract");const{editor:e,createMediaElement:r}=this.options,{mediaIcon:i,mediaName:o}=this.abstract;p(en,this.mediaContainer,"The media element not exist");const s=Z(this.mediaContainer);p(en,s,"The block element not exist");const l=e.getBlockData(s),c=B("div",["media-error","embed-selected-content","embed-hover-content"],null),d=B("span",["media-error-icon"],c);d.innerHTML=i;const h=B("div",[],c);h.innerHTML=D.t("media.load.failed",{name:o}),c.appendChild(h);const C=h.querySelector(".retry-upload");return p(en,C,"The element not exist"),e.domEvents.addEventListener(C,"click",(E,A)=>{const v=B("div",["media-element"],null),k=this.getResourceUrl(l),L=r(E,v,l,k);this.unbindMediaEvent(),this.media=L,this.bindMediaEvent(),this.updateMediaContent(v)}),this.setFullScreen(),c}renderRetry(e,r){var E,A;p(en,this.abstract,"no abstract");const{editor:i}=this.options,{mediaIcon:o,mediaName:s}=this.abstract,l=B("div",["media-error","embed-selected-content","embed-hover-content"],null),c=B("span",["media-error-icon"],l);c.innerHTML=o;const d=B("div",[],l);let h=D.t("media.upload.failed",{name:s});(((E=r.response)==null?void 0:E.status)===420||((A=r.response)==null?void 0:A.status)===413)&&(h=D.t("media.upload.maxSizeFailed",{name:s})),d.innerHTML=h,l.appendChild(d);const C=d.querySelector(".retry-upload");C&&i.domEvents.addEventListener(C,"click",()=>{i.readonly||(p(en,this.abstract,"no abstract"),this.handleUploadFile(e))}),this.updateMediaContent(l),this.setFullScreen()}renderProgress(e,r){p(en,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope .media-progress"),o=e===-1||e===100?100:e;if(i){const{updateProgressElement:s}=this.options;s(i,o)}else{const{createProgressElement:s}=this.options,l=Z(this.mediaContainer);p(en,l,"The element not exist"),z(l,"media-block-uploading");const c=B("div",["media-progress"],null);s(c,o,r),this.updateMediaContent(c)}this.setFullScreen()}renderMediaElement(e,r){p(en,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope > .media-element"),{createMediaElement:o,updateMediaElement:s,editor:l}=this.options,c=this.getResourceUrl(e,r);if(i){const d=s(l,i,e,c);this.unbindMediaEvent(),this.media=d,this.bindMediaEvent()}else{const d=B("div",["media-element"],null),h=o(l,d,e,c);this.unbindMediaEvent(),this.media=h,this.bindMediaEvent(),this.updateMediaContent(d)}}renderEmpty(e){p(en,this.abstract,"no abstract"),p(en,this.mediaContainer,"The media element not exist");const r=B("div",["media-empty","embed-selected-content","embed-hover-content"],this.mediaContainer);r.innerHTML=this.abstract.mediaIcon,this.updateMediaContent(r);const{editor:i}=this.options;i.findBlockById(e.id)&&this.emit("mediaError",i,"empty",e.id),this.setFullScreen()}getResourceUrl(e,r){const{src:i}=e.embedData,{editor:o}=this.options;return o.doc.buildResourceUrl(i,{syncNewResources:async(s,l)=>{var d,h;if(!r)return;await o.doc.addResources([s]);const c=(h=(d=o.doc).getServerMeta)==null?void 0:h.call(d).appId;if(l!==e.embedData.src&&c&&e.embedData.src.includes(c)){const C=Z(r);if(C&&!o.readonly&&o.isBlockWritable(C)){const E=mt.default(e);E.embedData.src=s,o.updateBlockData(C,E)}}}})}setFullScreen(){p(en,this.mediaContainer,"The media element not exist"),z(this.mediaContainer,"full-screen")}removeFullScreen(){p(en,this.mediaContainer,"The media element not exist"),st(this.mediaContainer,"full-screen")}updateBlockAlign(e,r){const i=Z(r);p(en,i,"The block element not exist");const{align:o}=e;e.embedType==="video"&&(i.hasAttribute("data-style-align")&&i.removeAttribute("data-style-align"),i.setAttribute("data-style-align",o))}render(e,r){const{src:i}=e.embedData;(!this.mediaContainer||!r.contains(this.mediaContainer))&&(this.mediaContainer=B("div",["media"],r)),this.updateBlockAlign(e,r),Vtt(i)?i===Of.Empty&&this.renderEmpty(e):this.renderMediaElement(e,r)}setAbstract(e){this.abstract=e}}I("media-embed");const Htt="left";class VS{constructor(){m(this,"handleInsertEmptyEmbed",async(t,e)=>{var C;const{containerId:r,blockIndex:i}=e;let o;(C=e.data)!=null&&C.file&&(o=e.data.file);const s=Ftt(t,this.embedType);if(o=o!=null?o:await ga(s,{}),!o)return null;const{mediaType:l}=this.getAbstract();try{Ktt(o,t,l)}catch{return null}const c={id:et(),type:"embed",embedType:this.embedType,embedData:{src:Of.Empty}};l==="video"&&(c.align=Htt);const d=t.insertBlock(r,i,c);return await this.getMedia(t,c.id).handleUploadFile(o),d})}getMedia(t,e){const r=t.addCustom(`media-${e}`,()=>new $tt({editor:t,createMediaElement:this.createMediaElement,updateMediaElement:this.updateMediaElement,createProgressElement:this.createProgressElement,updateProgressElement:this.updateProgressElement}));return r.setAbstract({...this.getAbstract()}),r}getOptions(){const{menuItem:t,mediaIcon:e,mediaName:r,order:i,group:o}=this.getAbstract();return{name:r,insertEmbedCommandItems:[{id:`insert-${this.embedType}`,name:t,icon:e,order:i,group:o,subText:yn(`insert-${this.embedType}`)}],handleInsertEmptyEmbed:this.handleInsertEmptyEmbed}}createEmbedContent(t,e,r){const{id:i}=r;this.getMedia(t,i).render(r,e)}handleUpdateBlock(t,e,r){const{id:i}=r,o=this.getMedia(t,i),s=Pt(e);return o.render(r,s),!0}handleDeleteBlock(t,e){const r=e.id,i=this.getMedia(t,r);i.removeAllListeners(),i.destroy()}convertTo(t,e,r,i){const o=e.embedData,s=t.doc.buildResourceUrl(o.src,{withToken:!0});return i==="html"?`<${o.type} src="${s}" />`:i==="markdown"?``:s}}function $S(n,t){const e=B("div",["uploading-progress-mask"],n),r=B("div",["uploading-progress-bar"],e),i=B("div",["uploading-progress-bar-value"],r);i.style.width=`${t}%`}function HS(n,t){const e=n.querySelector(".uploading-progress-bar-value");e&&(e.style.width=`${t}%`)}const jtt=I("media-audio");class ztt extends VS{constructor(){super(...arguments);m(this,"embedType",Yr.AUDIO);m(this,"updateProgressElement",HS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["audio-container","embed-hover-content","embed-selected-content"],r),l=B("audio",[],s);return l.innerHTML="Your browser does not support the <code>audio</code> element.",l.controls=!0,l.src=o,setTimeout(()=>{this.getMedia(e,i.id).setFullScreen()}),l})}getAbstract(){return{mediaIcon:t2,mediaName:D.t(`media.${Yr.AUDIO}.menuItem`),menuItem:D.t(`media.${Yr.AUDIO}.menuItem`),order:800,mediaType:Yr.AUDIO,group:"common"}}getBlockProperties(){return{abstract:`${D.t(`media.${Yr.AUDIO}.abstract`)}`}}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .audio-container > audio");return p(jtt,s,"The media element not exist"),s.src!==o&&(s.src=o),s}createProgressElement(e,r){const i=B("audio",[],e);i.innerHTML="Your browser does not support the <code>audio</code> element.",i.controls=!0,i.src="about:blank",$S(e,r)}}const Gtt=new ztt;I("video-resizer");function jS(n){return n&&pe(n)&&Xe(n)==="video"}const Wtt=50;class MA{constructor(t){m(this,"currentResizableElement",null);m(this,"resizing",!1);m(this,"handleHoveringBlockChange",(t,e)=>{if(!this.resizing&&!window.isDragging&&(e&&jS(e)&&this.disableBlockResize(e),t&&jS(t)&&this.editor.isBlockWritable(t))){const r=this.getVideoElement(t);if(!r)return;this.enableBlockResize(t,r)}});m(this,"handleResizing",(t,e)=>{if(this.resizing=!0,!this.currentResizableElement)return;const r=t.getBlock();if(!r)return;const i=r.getBoundingClientRect().width,o=Math.min(Math.max(e.width,Wtt),i);this.currentResizableElement.style.width=`${o}px`,this.currentResizableElement.style.pointerEvents="none"});m(this,"handleResized",t=>{this.resizing=!1;const e=t.getBlock();if(!this.currentResizableElement||!e)return;const r=this.editor.getBlockData(e),{width:i}=this.currentResizableElement.getBoundingClientRect();this.currentResizableElement.style.pointerEvents="auto",this.editor.updateBlockData(e,{...r,width:i})});this.editor=t,Be.get(t).addListener("change",this.handleHoveringBlockChange)}destroy(){this.currentResizableElement=null,Be.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}getVideoElement(t){return Pt(t).querySelector(":scope .video-container > video")}updateResizer(t){const e=this.editor.findCustom(`${lt(t)}-resizer`);e&&e.updateResizer()}disableBlockResize(t){const e=this.editor.findCustom(`${lt(t)}-resizer`);e&&e.disableResize()}enableBlockResize(t,e){const r=this.editor.addCustom(`${lt(t)}-resizer`,()=>new mf(this.editor,{resize:["top-left","top-right","bottom-left","bottom-right"]}));r.enableResize(t,e),r.removeListener("resizing",this.handleResizing),r.removeListener("resized",this.handleResized),r.addListener("resizing",this.handleResizing),r.addListener("resized",this.handleResized),this.currentResizableElement=e}}const qtt=I("video");class Xtt extends VS{constructor(){super(...arguments);m(this,"embedType",Yr.VIDEO);m(this,"updateProgressElement",HS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["video-container","embed-selected-content","drag-preview-element"],r),l=B("video",[],s);return l.innerHTML="Your browser does not support the <code>video</code> element.",l.controls=!0,l.src=o,l.addEventListener("canplay",()=>{e.addCustom("video-resizer",()=>new MA(e)),this.getMedia(e,i.id).removeListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).addListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).removeFullScreen()}),i.width&&(l.style.width=`${i.width}px`),l});m(this,"createProgressElement",(e,r,i)=>{const o=B("video",["progress-video"],e);o.innerHTML="Your browser does not support the <code>audio</code> element.",o.controls=!0,$S(e,r),ma(i).then(s=>{const l=e.querySelector(".progress-video");l&&s1(e)&&(l.src=s)})})}getAbstract(){return{mediaName:D.t(`media.${Yr.VIDEO}.menuItem`),mediaIcon:e2,menuItem:D.t(`media.${Yr.VIDEO}.menuItem`),order:700,mediaType:Yr.VIDEO,group:"common"}}getBlockProperties(){return{abstract:`${D.t(`media.${Yr.VIDEO}.abstract`)}`}}handleMediaError(e,r,i){const o=e.addCustom("video-resizer",()=>new MA(e)),s=e.getBlockById(i);o.disableBlockResize(s)}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .video-container > video");p(qtt,s,"The media element not exist"),s.src!==o&&(s.src=o),i.width?s.style.width=`${i.width}px`:s.style.width="";const l=e.getBlockById(i.id);return setTimeout(()=>{e.addCustom("video-resizer",()=>new MA(e)).updateResizer(l)}),s}}const Ytt=new Xtt,zS=[AE,kE,RE,Hk],UA=[MS,QJ,ott,mtt,vtt,C$,Dtt,Ytt,Gtt,aW,fS,HY],GS=[nR,mS,P4];function Qtt(n,t,e){var i,o,s,l;si.level=(i=e.logLevel)!=null?i:Us.DEBUG;const r=Su(n,t,{components:{blocks:[...zS,...((o=e==null?void 0:e.components)==null?void 0:o.blocks)||[]],embeds:[...UA,...((s=e.components)==null?void 0:s.embeds)||[]],boxes:[...GS,...((l=e.components)==null?void 0:l.boxes)||[]],textRenders:[new nE],options:{...e.componentsOptions}}});return r.readonly=!0,r.addCustom("heading-collapse",()=>new AA(r)),r.addCustom("editor-tooltip",()=>new Om(r)),r.addListener("clickLink",(c,d,h)=>{var E;if((E=e==null?void 0:e.events)!=null&&E.onClickLink){e.events.onClickLink(c,d,h);return}const C=h.getAttribute("link");C&&(c.readonly||d.ctrlKey||d.metaKey)&&window.open(C,"_blank")}),r}class WS{constructor(t){this.createOptions=t,t.lang&&D.setLang(t.lang)}createHistoryEditor(t,e){return Qtt(t,e,this.createOptions)}}I("create-editor");function qS(n,{root:t,childDoc:e,doc:r}){var h,C;e.uploadResource=r.uploadResource.bind(r),e.buildResourceUrl=r.buildResourceUrl.bind(r);const i=n.getComponentOptions("comment"),o={image:{defaultAlign:"left"},table:{locatingContainer:t,hideCellMenu:!0,hideToolbar:!0},...i==null?void 0:i.componentsOptions},s=[];n.editorBlocks.forEach(E=>{E.blockType==="text"||E.blockType==="embed"||s.push(E)});const l=[];n.editorEmbeds.forEach(E=>{l.push(E)});const c=[];n.editorBoxes.forEach(E=>{E.boxType==="text"||E.boxType==="br"||E.boxType==="image"||E.boxType==="anchor"||c.push(E)});const d=Su(t,e,{shortcuts:[Fh],components:{blocks:s,commandProviders:[new pm],decorators:[new Hm],embeds:l,boxes:c,options:o}});if(d.input.addHandler(new zm),d.input.addHandler(new GE(d)),d.input.addHandler(new JE(d)),d.input.addHandler(new ZX(d)),d.input.addHandler(new Xm),d.addCustom("image-paste-handler",()=>new zE(d)),(h=n.options.componentsOptions)!=null&&h.mention){const E=n.options.componentsOptions.mention;d.addCustom("mention",()=>new hS(d,{...E}))}if((C=n.options.componentsOptions)!=null&&C.comment){const E=n.options.componentsOptions.comment;E.onCommentEditorClick&&d.addListener("click",E.onCommentEditorClick)}return d}function Jtt(n,t){const e=Array.from(n.rootContainer.querySelectorAll(`[comment-${t.toLocaleLowerCase()}="${t}"]`)),r=new Set;e.forEach(i=>{const o=Z(i);o&&r.add(o)}),r.forEach(i=>{tY(n,i,t)})}class Ztt{constructor(t){m(this,"listeners",new Set);m(this,"doc");this.editor=t,this.doc=this.editor.doc.externalDoc,this.doc.registerCallback(this)}getComments(){return this.doc.getComments()}getComment(t){return this.doc.getComment(t)}getCommentDoc(t){return this.doc.getCommentDoc(t)}localCreateComment(t,e){this.doc.localCreateComment(t,e)}localDeleteComment(t){const e=this.getComment(t);this.doc.localDeleteComment(t);const r=e.groupId;this.getComments().filter(o=>o.groupId===r).length===0&&Jtt(this.editor,r)}localUpdateComment(t,e){this.doc.localUpdateComment(t,e)}onCreateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onCreateComment(t,e))}onDeleteComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onDeleteComment(t,e))}onUpdateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onUpdateComment(t,e))}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}createCommentEditor(t,e){return qS(this.editor,{root:t,childDoc:e,doc:this.doc})}allowEdit(t){return t.userId===this.doc.getUser().userId}}class tet{constructor(t,e){m(this,"listeners",new Set);this.editor=t,this.localDoc=e}get doc(){return this.localDoc.toJSON()}getComments(){return Object.values(this.doc.comments)}getComment(t){return this.doc.comments[t]}getCommentDoc(t){const e=this.doc.comments[t];return Zp(e)}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}localCreateComment(t,e){}localDeleteComment(t){}localUpdateComment(t,e){}createCommentEditor(t,e){return qS(this.editor,{root:t,childDoc:e,doc:this.localDoc})}allowEdit(t){return t.userId===this.localDoc.getUser().userId}}const eet={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}",limitedEnvTips:"\u7531\u4E8E\u6D4F\u89C8\u5668\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528 {shortCut} \u7C98\u8D34"}},net={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}",limitedEnvTips:"Press {shortCut} to paste due to browser restrictions"}},ret={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",limitedEnvTips:"\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u5236\u9650\u306B\u3088\u308A\u3001\u300C{shortCut}\u300D\u3092\u4F7F\u7528\u3057\u3066\u8CBC\u308A\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044"}};D.mergeLang({"zh-CN":eet,"en-US":net,"ja-JP":ret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AAAAAAAAAAAAABVOQAAY3VzdG9tWG1sL19yZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAOuAYExTAwAAjw4AABIAAAAAAAAAAAAAAAAAWzsAAHdvcmQvZm9udFRhYmxlLnhtbFBLBQYAAAAADwAPANQDAADePgAAAAA=",oet=()=>jg(iet),set=I("image-to-docx");async function aet(n){return new Promise((t,e)=>{const r=new Image;r.onload=()=>{t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=e,r.src=n})}async function XS(n,t){if(n.width&&n.height)return{width:n.width,height:n.height,buffer:t};try{const e=await ma(new File([t],"",{})),r=await aet(e);return r.width===void 0||r.height===void 0?{width:345,height:230,buffer:t}:n.width||n.height?{width:n.width||r.width*n.height/r.height,height:n.height||r.height*n.width/r.width,buffer:t}:{width:r.width,height:r.height,buffer:t}}catch(e){set.error(e);return}}function cet(n,t){let e=n.filter(s=>s!=null);const r=t-(e.length-1)*20,i=.87,o=e.reduce((s,l)=>s+l.width,0);return o>r&&(e=e.map(s=>({width:s.width*r/o,height:s.height*r/o,buffer:s.buffer}))),e.map(s=>({width:s.width*i,height:s.height*i,buffer:s.buffer}))}function uet(n,t,e){if(!e||typeof e!="object")return;const r=e,i=n.filter(s=>s!=null),o=t-(i.length-1)*20;i.forEach((s,l)=>{if(i.length===1&&r.widthPercent){const d=r.widthPercent,h=s.width;s.width=o*(d/100),s.height*=s.width/h;return}const c=`${l}_flex`;if(r[c]){const d=r[c],h=s.width;s.width=o*d,s.height*=s.width/h}})}function YS(n=[0,1,2,3,4,5,6,7],t=1){return n.map(e=>{let r;switch(e%3){case 0:r=Ct.LevelFormat.DECIMAL;break;case 1:r=Ct.LevelFormat.LOWER_LETTER;break;default:r=Ct.LevelFormat.LOWER_ROMAN;break}return{level:e,format:r,text:`%${e+1}. `,alignment:Ct.AlignmentType.START,start:t,style:{paragraph:{indent:{left:Ct.convertInchesToTwip(.3*(e+1)),hanging:Ct.convertInchesToTwip(.2)}}}}})}function fet(){return[0,1,2,3,4,5,6,7].map(n=>{let t;switch(n%3){case 0:t="\u2022";break;case 1:t="\u25E6";break;default:t="\u25AA";break}return{level:n,format:Ct.LevelFormat.BULLET,text:t,alignment:Ct.AlignmentType.START,style:{paragraph:{indent:{left:Ct.convertInchesToTwip(.3*(n+1)),hanging:Ct.convertInchesToTwip(.2)}}}}})}function det(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:Ct.LevelFormat.BULLET,text:"\u2611",alignment:Ct.AlignmentType.START,style:{paragraph:{indent:{left:Ct.convertInchesToTwip(.3*(n+1)),hanging:Ct.convertInchesToTwip(.2)}}}}))}function het(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:Ct.LevelFormat.BULLET,text:"\u2610",alignment:Ct.AlignmentType.START,style:{paragraph:{indent:{left:Ct.convertInchesToTwip(.3*(n+1)),hanging:Ct.convertInchesToTwip(.2)}}}}))}var Nf=(n=>(n.NUMBERING="number-numbering-reference",n.BULLET="number-bullet-reference",n.CHECKED="checked-bullet-reference",n.UNCHECKED="unchecked-bullet-reference",n))(Nf||{});const met=[{levels:YS(),reference:"number-numbering-reference"},{levels:fet(),reference:"number-bullet-reference"},{levels:det(),reference:"checked-bullet-reference"},{levels:het(),reference:"unchecked-bullet-reference"}];function get(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 pet(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 Cet(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 Eet=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/;function QS(n){if(typeof n=="string"&&n.length>0){if(n[0]==="#")return n.substring(1);const t=n.match(Eet);if(t){const e=s=>{let l=Number(s).toString(16);return l.length<2&&(l=`0${l}`),l},r=e(t[1]),i=e(t[2]),o=e(t[3]);return`${r}${i}${o}`}if(n==="red")return"FF0000";if(n==="green")return"00FF00";if(n==="blue")return"0000FF"}}function cn(n,t){if(n&&n.attributes&&n.attributes[t])return n.attributes[t];if(n&&n.attributes&&n.attributes.box&&n.attributes.inputType&&t==="style-underline")return!0}function JS(n,t,e){for(let r=0;r<=e;++r){const i=`${t}${r}`;if(cn(n,i))return i}}function E0(n,t,e){n.attributes=n.attributes||{},n.attributes[t]=e}function OA(n){return n==="image"||n==="drawio"||n==="plantuml"||n==="mermaid"||n==="flowchart"}function ZS(n){return n&&n.startsWith("//")?`https:${n}`:n&&!n.startsWith("http://")&&!n.startsWith("https://")?`https://${n}`:n}function Aet(n){const t=cn(n,"inlineStyle");if(t==null)return;const e=t.split(";");for(const r of e){const i=r.split(":");if(i.length!==2)continue;const o=i[0].trim().toLowerCase(),s=i[1].trim().toLowerCase();o==="font-size"&&E0(n,"inline-style-font-size",s),o==="color"&&E0(n,"inline-style-color",s),o==="background-color"&&E0(n,"inline-style-background-color",s),o==="font-family"&&E0(n,"inline-style-font-family",s)}}function xet(n,t){if(t==null)return n==null?void 0:n.normal;if(n)return n[`heading${t}`]}function bet(n){const t=`${cn(n,"inline-style-font-size")}`;if(t&&t.indexOf("px")>0)return+t.replace(/px/g,"")}function vet(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 Bet(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` @${n.attributes.text} `}function Tet(n){return cn(n,"inline-style-font-family")}function yet(n){const t=cn(n,"inline-style-background-color");return QS(t)}function ket(n){const t=cn(n,"inline-style-color");return QS(t)}function Ret(n){Aet(n);const t=cn(n,"type")==="mention";return{box:n.attributes&&n.attributes.box?n.attributes:void 0,inlineCode:!!cn(n,"style-code"),link:ZS(cn(n,"link")),size:bet(n),text:t?Bet(n):vet(n)||n.insert,bold:!!cn(n,"style-bold"),underline:!!cn(n,"style-underline"),italics:!!cn(n,"style-italic"),strike:!!cn(n,"style-strikethrough"),superScript:!!cn(n,"style-super"),subScript:!!cn(n,"style-sub"),math:cn(n,"type")==="math"?cn(n,"src"):void 0,mention:t,fontFamily:Tet(n),background:yet(n),color:t?"338fe5":get(JS(n,"style-color-",6))||ket(n),highlight:JS(n,"style-bg-color-",13)}}function wet(){return[new Ct.Paragraph({border:{top:{color:"auto",style:Ct.BorderStyle.DASHED,size:4,space:1}},spacing:{before:300}}),new Ct.Paragraph({spacing:{line:0}})]}function Let(){return new Ct.Paragraph({children:[new Ct.TextRun({text:"[\u89C6\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:Ct.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function Iet(){return new Ct.Paragraph({children:[new Ct.TextRun({text:"[\u97F3\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:Ct.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function Det(n,t){return new Ct.Paragraph({children:[new Ct.ExternalHyperlink({children:[new Ct.TextRun({style:"Hyperlink",text:t||n})],link:n})]})}function tL(n){if(n.heading!=null)return`Heading${n.heading}`}function eL(n){if(n.alignment!=null){if(n.alignment==="center")return Ct.AlignmentType.CENTER;if(n.alignment==="right")return Ct.AlignmentType.RIGHT;if(n.alignment==="left")return Ct.AlignmentType.LEFT}}function _et(n){if(n.indent)return{left:Ct.convertInchesToTwip(.3*n.indent-.2)};if(n.padding)return{left:Ct.convertInchesToTwip(.3*n.padding)}}function Met(n){return{type:Ct.ShadingType.CLEAR,color:"FFFFFF",fill:n}}function Uet(n){const t=n.split(",");if(t.length!==0)return t[0].trim()}function nL(n,t){let e;e=n.inlineCode?"InlineCode":void 0,e=n.link?"Hyperlink":e;const r=n.size||t,i=r!=null?Math.floor(r*1.5+.5):void 0;return new Ct.TextRun({text:n.text,bold:n.bold||void 0,underline:n.underline?{type:Ct.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:i,style:e,font:n.fontFamily?Uet(n.fontFamily):void 0,shading:n.background?Met(n.background):void 0,color:n.color,highlight:pet(n.highlight)})}function Oet(n,t){if(n.link)return new Ct.ExternalHyperlink({children:[nL(n,t)],link:n.link})}async function rL(n,t,e,r,i){const[o]=await i(n,t,e);if(o==null)return;const s=await XS({width:r||0,height:0,src:e},o);return new Ct.ImageRun({data:o,transformation:{width:(s==null?void 0:s.width)||100,height:(s==null?void 0:s.height)||20}})}function Net(n){if(n.heading||n.heading)return n.heading}function Pet(n){if(n.align&&(n.align==="center"||n.align==="right"||n.align==="left"))return n.align}function Fet(n){if(n.textOnly===!0&&n.level!=null)return n.level}async function Ket(n,t){var r;const e=[];if(n.text&&Array.isArray(n.text)){for(let i=0;i<n.text.length;i++){const o=n.text[i];if(((r=o.attributes)==null?void 0:r.box)===!0&&t){const s=await t(o);if(s){n.text.splice(i+1,0,...s);continue}}e.push(Ret(o))}return e}}function Vet(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 $et(n,t){if(n.type==="embed"&&n.embedType&&OA(n.embedType)&&n.embedData&&n.embedData.src)return n.embedData.src.split("|").map(r=>{const i=t(r),o=n.embedData[`${i}_width`],s=n.embedData[`${i}_height`];return{src:r,width:o,height:s}})}function Het(n){if(n.padding)return n.padding}function jet(n){return!!(n.type==="embed"&&n.embedType&&OA(n.embedType)&&n.embedData&&n.embedData.src)}async function A0(n,t,e){return{quoted:!!n.quoted,heading:Net(n),alignment:Pet(n),indent:Fet(n),padding:Het(n),texts:await Ket(n,e),list:Vet(n),images:$et(n,t),border:jet(n)}}async function zet(n,t,e,r){const i=[];if(!n.children)return[];for(const o of n.children){const s=[];for(const l of t.blocks[o])s.push(await A0(l,e,r));i.push(s)}return i}const Get=I("to-docx");function Wet(n,t){return Array(n).fill(0).map(()=>Array(t).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 qet(n,t,e,r){const i=!!n.hasColTitle,o=!!n.hasRowTitle,s=!!n.isStripeStyle,l="F5F8FB";for(let c=0;c<t;c++)for(let d=0;d<e;d++)(i&&d===0||o&&c===0||s&&c%2===1)&&(r[c][d].color=l)}function Xet(n){p(Get,n.children,"no table children");const t=n.rows,e=n.cols,r=n.colsWidth;if(r)for(let s=0;s<r.length;s++)r[s]===0&&(r[s]=100);const i=Wet(t,e);let o=0;for(let s=0;s<t;++s)for(let l=0;l<e;++l){if(i[s][l].originalWidth=r?r[l]:void 0,i[s][l].from!==void 0)continue;const c=n.children[o];o+=1,i[s][l].cellId=c,i[s][l].color=Cet(n[`${c}_background`]),i[s][l].width=r?r[l]:100,i[s][l].align=n[`${c}_align`];const d=n[`${c}_rowSpan`]||1,h=n[`${c}_colSpan`]||1;if(i[s][l].rowSpan=d,i[s][l].colSpan=h,d>1||h>1){let C=0;for(let E=0;E<d;E++)for(let A=0;A<h;A++)E===0&&(C+=r?r[l+A]:80),!(E===0&&A===0)&&(i[s+E][l+A].from=[s,l]);i[s][l].width=C}}return qet(n,t,e,i),i}async function Yet(n,t,e,r,i,o,s,l,c,d){async function h(A){if(l){const v=await l(i,o,A);if(v){await r.addDoc(n,v,d);return}}if(A.type==="text"||A.textOnly===!0){const v=await A0(A,s,c);await r.addTextBlock(v);return}if(A.type==="code"){const v=await zet(A,e,s,c);await r.addCodeBlockObject(v);return}if(A.type==="list"&&A.textOnly!==!0){const v=await A0(A,s,c);await r.addListBlockObject(n,v);return}if(A.type==="embed"&&A.embedType){const v=A,k=v.embedData,L=v.embedType;if(OA(L)){const M=await A0(A,s,c);await r.addImagesBlockObject(A,M,d)}else A.embedType==="hr"?r.addSeparatorBlock():A.embedType==="video"?r.addVideoPlaceholder():A.embedType==="audio"?r.addAudioPlaceholder():A.embedType==="webpage"?r.addHyperlinkParagraph(ZS(k.src),k.title):r.addOtherEmbedBlock(L,A.embedData);return}if(A.type==="table"){let v=[];if(A.colsWidth)v=A.colsWidth;else{const L=A.cols;v=new Array(L);for(let M=0;M<v.length;M++)v[M]=100;A.colsWidth=v}const k=Xet(A);await r.addTableMatrix(v,k,e),r.addEmptyParagraph()}}function C(A){const v=[];for(const{type:k,data:L}of A.embedData.exportSpec){if(k==="text"){const M={id:et(),text:[{insert:L}],type:"text"};v.push(M);continue}if(k==="image"){const M={id:et(),type:"embed",embedType:"image",align:"left",embedData:{src:L}};v.push(M);continue}if(k==="link"){const M={id:et(),type:"embed",embedType:"webpage",embedData:{src:L.url,title:L.title}};v.push(M);continue}}return v}function E(A){var v;return(v=A==null?void 0:A.embedData)!=null&&v.exportSpec?C(A):[A]}for(const A of t)for(const v of E(A))await h(v)}function Qet(){return{listMaxInst:1,listInstMap:{},listRefMap:{},levelConfigs:[]}}const Jet=I("to-docx");class Zet{constructor(t,e,r,i,o,s){m(this,"paragraphs");this.appId=t,this.docId=e,this.state=r,this.readImageFunc=i,this.convertBlocksFunc=o,this.defaultFontSize=s,this.paragraphs=[]}async addTextBlock(t){this.paragraphs.push(new Ct.Paragraph({heading:tL(t),alignment:eL(t),children:await this.paragraphsFromBlockTexts(t),indent:_et(t)}))}async addEmptyImagePlaceHolder(){this.paragraphs.push(new Ct.Paragraph({text:`[${D.t("docx.imageExportFailed")}]`,shading:{type:Ct.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}}))}async paragraphsFromBlockTexts(t){if(t.texts==null)return;const e=xet(this.defaultFontSize,t.heading),r=[];for(const i of t.texts){if(i.link){const o=Oet(i,e);o&&r.push(o);continue}if(i.box&&i.box.type&&i.box.type==="br"){r.push(new Ct.TextRun({text:"",break:1}));continue}if(i.box&&i.box.type&&i.box.type==="image"){const o=await rL(this.appId,this.docId,i.box.src,i.box.width,this.readImageFunc);o&&r.push(o);continue}if(i.math){const o=await rL(this.appId,this.docId,i.math,0,this.readImageFunc);o&&r.push(o);continue}r.push(nL(i,e))}return r}async addCodeBlockObject(t){for(const e of t)for(const r of e){const i={style:Ct.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new Ct.Paragraph({style:"Code",border:{left:{...i},right:{...i},top:{...i},bottom:{...i}},children:await this.paragraphsFromBlockTexts(r)}))}}async addListBlockObject(t,e){if(e.list==null)return;let r;const i=e.list.checkbox?`${t}-${e.list.groupId}-${e.list.checkbox}`:`${t}-${e.list.groupId}`;if(this.state.listInstMap[i])r=this.state.listInstMap[i];else if(r=this.state.listMaxInst,this.state.listMaxInst+=1,this.state.listInstMap[i]=r,e.list.start>0&&e.list.ordered){const s=`number-numbering-reference-${r}`,l=YS([e.list.level-1],e.list.start);this.state.levelConfigs.push({levels:l,reference:s,inst:r}),this.state.listRefMap[i]=s}else e.list.ordered?this.state.listRefMap[i]=Nf.NUMBERING:e.list.checkbox&&e.list.checkbox==="checked"?this.state.listRefMap[i]=Nf.CHECKED:e.list.checkbox&&e.list.checkbox==="unchecked"?this.state.listRefMap[i]=Nf.UNCHECKED:this.state.listRefMap[i]=Nf.BULLET;const o=tL(e);e.texts&&this.paragraphs.push(new Ct.Paragraph({heading:o,children:await this.paragraphsFromBlockTexts(e),numbering:{reference:this.state.listRefMap[i],level:e.list.level-1,instance:r}}))}imageDimWithBufferToImageRun(t){return new Ct.ImageRun({data:t.buffer,transformation:{width:t.width,height:t.height}})}async addImagesBlockObject(t,e,r){if(e.images==null){if(t.type==="embed"&&t.embedType==="image"){const{src:c}=t.embedData;c||this.addEmptyImagePlaceHolder()}return}const i=[],o=await Promise.all(e.images.map(async c=>{const[d,h]=await this.readImageFunc(this.appId,this.docId,c.src);if(d){const C=await XS(c,d);if(C)return C}i.push(h)}));uet(o,r,t.embedData);const s=cet(o,r),l={style:Ct.BorderStyle.SINGLE,color:"#DEDEDE"};s.length&&this.paragraphs.push(new Ct.Paragraph({border:e.border?{left:{...l},right:{...l},top:{...l},bottom:{...l}}:void 0,alignment:eL(e)||Ct.AlignmentType.CENTER,children:s.map(c=>this.imageDimWithBufferToImageRun(c)).flatMap((c,d,h)=>c==null?[]:h.length-1!==d?[c,new Ct.TextRun({text:" "})]:c)})),i.forEach(c=>{this.addHyperlinkParagraph(c)})}addSeparatorBlock(){wet().forEach(t=>this.paragraphs.push(t))}addEmptyParagraph(){this.paragraphs.push(new Ct.Paragraph(""))}addVideoPlaceholder(){this.paragraphs.push(Let())}addAudioPlaceholder(){this.paragraphs.push(Iet())}addHyperlinkParagraph(t,e){t!=null&&this.paragraphs.push(Det(t,e))}async addTableMatrix(t,e,r){const i=t.map(o=>o!==0?o*15:1500);this.paragraphs.push(new Ct.Table({rows:await this.generateTableRows(e,r),columnWidths:i}))}async generateRowCells(t,e){const r=[];for(const i of t){const o=i.cellId;if(o===void 0)continue;const s=i.width*.9;r.push(new Ct.TableCell({children:await this.convertBlocksFunc(o,e.blocks[o],e,this.appId,this.docId,this.state,s),columnSpan:i.colSpan,rowSpan:i.rowSpan,width:{type:Ct.WidthType.DXA,size:i.width*15},shading:i.color?{fill:i.color,type:Ct.ShadingType.CLEAR,color:"auto"}:void 0}))}return r}async generateTableRows(t,e){const r=[];for(const i of t)r.push(new Ct.TableRow({children:await this.generateRowCells(i,e)}));return r}async addDoc(t,e,r){const i=await this.convertBlocksFunc(t,e.blocks.root,e,this.appId,this.docId,this.state,r);i&&(this.paragraphs=this.paragraphs.concat(i))}async addOtherEmbedBlock(){}}class tnt{constructor(t,e,r,i,o,s,l,c){m(this,"convertBlocks",async(t,e,r,i,o,s,l=720)=>{const c=new Zet(i,o,s,this.readImage,this.convertBlocks,this.defaultFontSize);return await Yet(t,e,r,c,i,o,this.md5HexFunc,this.getDocByBlock,this.getTextsByBox,l||720),c.paragraphs});this.templateData=t,this.docData=e,this.md5HexFunc=r,this.readImage=i,this.defaultFontSize=o,this.getDocByBlock=s,this.getTextsByBox=l,this.backgroundImageOptions=c}async convert(t,e){return this.snapshot2docx(this.docData,t,e)}async snapshot2docx(t,e,r){const i=new Ct.ImportDotx,o=this.templateData?await i.extract(this.templateData):void 0,s=t.blocks.root;p(Jet,s,"data must have blocks");const l=Qet(),c=await this.convertBlocks("blocks",s,t,e,r,l),d=this.backgroundImageOptions?{default:new Ct.Header({children:[new Ct.Paragraph({children:[new Ct.ImageRun(this.backgroundImageOptions)]})]})}:{},h=new Ct.Document({numbering:{config:[...met,...l.levelConfigs]},sections:[{headers:d,children:c,properties:{page:{size:{width:12240,height:15840},margin:{top:1440,bottom:1440,left:1440,right:1440}}}}]},{template:o});return Ct.Packer.toBlob(h)}}async function ent(n,t,e,r){const i=n.doc.buildResourceUrl(r,{withToken:!0});let o=await bS(i);if(!o)return[void 0,i];if(o.type.indexOf("/svg")!==-1){const l=await ES(o);l&&(o=new File([l],o.name))}return[await o.arrayBuffer(),i]}async function nnt(n,t,e){const r=n.editorBlocks.getBlockClass(e.type);if(r.toStandardDoc)return r.toStandardDoc(n,e,t)}async function rnt(n,t){const e=t.attributes,r=n.editorBoxes.getBoxClass(e.type);if(r.toStandardText)return r.toStandardText(n,e)}async function int(n,t){let{template:e,download:r,backgroundImageOptions:i}=t!=null?t:{};e||(e=oet());const o=n.doc.toJSON(),s=(C,E,A)=>ent(n,C,E,A),l=async(C,E,A)=>nnt(n,o,A),c=async C=>rnt(n,C),h=await new tnt(e,o,Md.default,s,void 0,l,c,i).convert("_appId","_docId");if(r){const C=URL.createObjectURL(h),E=document.createElement("a");E.setAttribute("download",`${xS(n)}.docx`),E.setAttribute("href",`${C}`),E.click(),E.remove()}return h}const NA=I("create-editor");async function ont(n,t){var s,l,c,d,h,C,E,A,v,k,L,M,U,F,J,q;p(NA,n,"app does not exists"),t.lang&&D.setLang(t.lang),si.level=(s=t.logLevel)!=null?s:Us.DEBUG;const e=t.onReauth?async()=>{var At;const Y=t.user.userId,ot=t.docId,pt=await((At=t.onReauth)==null?void 0:At.call(t,Y,ot,t.permission));return{userId:Y,docId:ot,permission:t.permission,appId:t.appId,token:pt,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl}}:void 0,r={auth:{appId:t.appId,docId:t.docId,userId:t.user.userId,permission:t.permission,token:t.token,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl},serverUrl:t.serverUrl,reauthFunc:e,disableLogout:t.disableLogout},i=await Hu.load(r),o=Su(n,i,{id:t.id,scrollContainer:t==null?void 0:t.scrollContainer,enableComments:t==null?void 0:t.enableComments,components:{blocks:[...zS,...((l=t==null?void 0:t.components)==null?void 0:l.blocks)||[]],embeds:[...UA,...((c=t.components)==null?void 0:c.embeds)||[]],boxes:[...GS,...((d=t.components)==null?void 0:d.boxes)||[]],commandProviders:[new pm,...((h=t.components)==null?void 0:h.commandProviders)||[]],decorators:[new Hm,new eC],insertions:[tp],blockHooks:[new KE,new dw,...((C=t.components)==null?void 0:C.blockHooks)||[]],textRenders:[new L4,new nE,...((E=t.components)==null?void 0:E.textRenders)||[]],options:{...t.componentsOptions}},shortcuts:[fY,Kj,JG,xE,e4,rV,mE,XY,Fh,YK,...t.shortcuts||[]],colors:["#0064FF","#EB3723","#F59300","#00A865","#F25A0A","#70A310","#009CAD","#0990D9","#8851ED","#D62069"]});if(o.editorCommandProviders.registerCommandProvider(new Si(o)),o.input.addHandler(new PQ),o.input.addHandler(new zm),o.input.addHandler(new v$),o.input.addHandler(new jG),o.input.addHandler(new wE(o,{hideTitle:t.hideTitle,headingLevel:1,titlePlaceholder:D.t("placeholder.common.title"),contentPlaceholder:D.t("placeholder.common.content"),readonlyTitlePlaceholder:D.t("placeholder.common.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0,applyContentPlaceholder:(A=t.placeholder)==null?void 0:A.applyContentPlaceholder})),o.input.addHandler(new Um(o,(v=t.componentsOptions)==null?void 0:v.quickMenu)),o.input.addHandler(new GE(o)),o.input.addHandler(new JE(o)),o.input.addHandler(new Xm),o.doc.registerCallback(new FQ(o)),o.addCustom("remote-cursor",()=>new By(o)),o.addCustom("block-menu",Y=>new gw(Y)),ce.isMobile||o.addCustom("editor-tooltip",()=>new Om(o)),t!=null&&t.enableComments&&o.addCustom("editor-comments",Y=>new S4(Y,new Ztt(Y))),t.enableContextMenu!==!1&&o.addCustom("editor-context-menu",Y=>new o4(Y)),o.addCustom("create-options",()=>new Fb(o,t)),o.addCustom("drop-target",()=>new Tf(o)),o.addCustom("list-to-mindmap",()=>new Sm(o)),o.addCustom("list-to-mention",()=>new sJ(o)),o.addCustom("mobile-helper",()=>new SJ(o)),o.addCustom("code-caret",()=>new Oj(o)),o.addCustom("image-paste-handler",()=>new zE(o)),(k=t.componentsOptions)!=null&&k.mention){const Y=t.componentsOptions.mention;o.addCustom("mention",()=>new hS(o,Y))}if(o.addCustom("heading-collapse",()=>new AA(o)),o.addCustom(p0,Y=>new yA(Y)),Za.register(o),Tf.register(o),Es.register(o),ds.register(o),o.addListener("clickLink",(Y,ot,pt)=>{var xt;if((xt=t==null?void 0:t.events)!=null&&xt.onClickLink){t.events.onClickLink(Y,ot,pt);return}const At=pt.getAttribute("link");At&&(Y.readonly||ot.ctrlKey||ot.metaKey)&&window.open(At,"_blank")}),(M=(L=t.componentsOptions)==null?void 0:L.remoteCarets)!=null&&M.onUserChanged){const Y=(F=(U=t.componentsOptions)==null?void 0:U.remoteCarets)==null?void 0:F.onUserChanged;o.doc.getRemoteUsers().on("change",ot=>{Y(o,ot)})}return(q=(J=t.componentsOptions)==null?void 0:J.templates)!=null&&q.templates.length&&(o.addListener("docChanged",()=>{g0(o)}),o.addListener("resize",()=>{g0(o,{reset:!0})}),setTimeout(()=>{g0(o)},100)),o.doc.registerCallback({onError:async Y=>{if(Y.code==="ResetDoc"){NA.error(`reset doc: ${Y.message}`);const ot=await Hu.load(r);o.doc.reset(ot)}}}),o.version="1.1.16-beta.3",o}function snt(n){return n.toJSON!==void 0}async function lnt(n,t,e){var o,s,l,c,d,h;p(NA,n,"app does not exists");const r=snt(t)?t:new _p(t,{serverUrl:e.serverUrl||""});e.lang&&D.setLang(e.lang),si.level=(o=e.logLevel)!=null?o:Us.DEBUG;const i=Su(n,r,{id:e.id,scrollContainer:e==null?void 0:e.scrollContainer,components:{blocks:[AE,kE,RE,Hk],commandProviders:[new pm],decorators:[new Hm,new eC],embeds:[...UA,...((s=e.components)==null?void 0:s.embeds)||[]],boxes:[nR,mS,P4,...((l=e.components)==null?void 0:l.boxes)||[]],insertions:[tp],blockHooks:[new KE,...((c=e.components)==null?void 0:c.blockHooks)||[]],textRenders:[new L4,new nE,...((d=e.components)==null?void 0:d.textRenders)||[]],options:{...e.componentsOptions}},shortcuts:[xE,e4,mE,Fh]});return i.editorCommandProviders.registerCommandProvider(new Si(i)),i.input.addHandler(new zm),i.input.addHandler(new wE(i,{hideTitle:e.hideTitle,headingLevel:1,titlePlaceholder:D.t("placeholder.common.title"),contentPlaceholder:D.t("placeholder.common.content"),readonlyTitlePlaceholder:D.t("placeholder.local.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),i.input.addHandler(new Um(i,(h=e.componentsOptions)==null?void 0:h.quickMenu)),i.input.addHandler(new GE(i)),i.input.addHandler(new JE(i)),i.input.addHandler(new Xm),i.addCustom("block-menu",C=>new gw(C)),ce.isMobile||i.addCustom("editor-tooltip",()=>new Om(i)),i.addCustom("image-paste-handler",()=>new zE(i)),e!=null&&e.enableComments&&i.addCustom("editor-comments",C=>new S4(C,new tet(C,r))),e.enableContextMenu!==!1&&i.addCustom("editor-context-menu",C=>new o4(C)),i.addCustom("heading-collapse",()=>new AA(i)),i.addListener("clickLink",(C,E,A)=>{var k;if((k=e==null?void 0:e.events)!=null&&k.onClickLink){e.events.onClickLink(C,E,A);return}const v=A.getAttribute("link");v&&(C.readonly||E.ctrlKey||E.metaKey)&&window.open(v,"_blank")}),i.addCustom(p0,C=>new yA(C)),Za.register(i),i.version="1.1.16-beta.3",i}async function ant(n,t,e){var h;const r=n.doc.externalDoc.client.auth,i=await Yh.load({auth:r,serverUrl:e});if(!((h=i.getVersionHelper)==null?void 0:h.call(i)))throw new Error("the editor does not support to show versions");const s=n.getCustom("create-options");if(!s)throw new Error("the editor does not support to show versions");const l=s.getData(),c=new WS(l),d=n.addCustom("version-dialog",()=>new tS(i,c));return d.show(t),d}b.tippy=h9,b.AnchorBox=$B,b.AuthError=Vu,b.AuthHeader=ll,b.AutoScroll=Xd,b.BaseURLHeader=Oa,b.BasicCommands=jV,b.BlockExclusiveHook=dw,b.BlockLockerHook=KE,b.BlockLockerPasteHandler=Xm,b.BlockResizer=mf,b.BrBox=PB,b.CodeBlock=kE,b.CodeLineBlock=RE,b.CodeTextDecorator=Hm,b.DOC_RE_AUTH_KEYS=p0,b.DefaultShortcuts=Fh,b.DocIdError=FN,b.DocReAuthCallbacks=yA,b.DragDrop=rv,b.DrawioEmbed=MS,b.EditorBlocks=m3,b.EditorBoxes=KB,b.EditorCommandProviders=NT,b.EditorComplexBlockPosition=Or,b.EditorComplexSelectionRange=hi,b.EditorDecorators=GB,b.EditorEmbeds=p3,b.EditorInsertions=zB,b.EditorSimpleBlockPosition=Qe,b.EditorSimpleSelectionRange=rn,b.EmbedBlock=E3,b.EmbedBlockResizer=Df,b.EnforceWithDocumentTitleHandler=wE,b.EventCallbacks=ua,b.FILL_CHAR=uM,b.FileExtError=KN,b.GroupOrder=qk,b.HeadingBlockScrollListener=ZQ,b.ImageBox=VB,b.InlineBoxCommandProvider=rR,b.InputtingInsertion=HB,b.LocalDoc=_p,b.LogLevel=Us,b.Logger=si,b.MIN_DISTANCE_THRESHOLD=ev,b.ManualCloseDialog=Gu,b.ManualMenu=ns,b.ManualToolbar=zu,b.MarkdownInputHandler=zm,b.MaxUserError=Gp,b.Mindmap=wm,b.OnesEditorAutoSuggest=BC,b.OnesEditorCustomDataWrapper=Fb,b.OnesEditorExclusiveBlock=ds,b.OnesEditorHoveringBlock=Be,b.OnesEditorIcons=yP,b.OnesEditorQuickMenu=Um,b.OnesEditorToc=Uf,b.OnesEditorTocProvider=Es,b.OnesEditorToolbar=Za,b.OnesEditorTooltip=Om,b.OnesEditorVersionsDialog=tS,b.PermissionError=Xh,b.Popup=ju,b.ReAuthToolbar=vS,b.RemoteCarets=By,b.RemoteCaretsDecorator=eC,b.RemoteCaretsInsertion=tp,b.RemoteUsers=Lu,b.RequestReloadError=$u,b.RichText=gn,b.ShareDBDoc=Hu,b.ShareDBDocVersionsProvider=WS,b.ShareDBServer=Yh,b.SimpleCache=Wb,b.StandardEmbedBlockCommands=uA,b.TEXT_STYLE_BACKGROUND_COLOR_PREFIX=_1,b.TEXT_STYLE_COLOR_PREFIX=D1,b.TableBlock=AE,b.TableBlockCommandProvider=pm,b.TableShortcuts=xE,b.TextBlock=On,b.TextBox=NB,b.TextColorItem=K2,b.TextStyleShortcuts=mE,b.TocEmbed=fS,b.ZERO_WIDTH_SPACE_CHAR=Gc,b.abbreviation=Yd,b.addAttribute=uh,b.addClass=z,b.addCommentToBlock=If,b.addDays=vI,b.addMetaToDoc=Ru,b.addMonths=bI,b.animateScrollTo=Ks,b.applyPlaceholderToBlock=df,b.assert=p,b.autoShowHideTemplates=g0,b.blockToDoc=Rp,b.blockToHtml=rp,b.blockToMarkdown=kh,b.blockToText=yh,b.blocksToDoc=sT,b.clearAllSelection=qv,b.clientType=ce,b.cloneBlock=Xo,b.cloneChildContainer=hp,b.cloneDoc=mp,b.cloneText=wB,b.commentToShareDbComment=tC,b.compareElement=Vd,b.comparePosition=g1,b.complexBlockAdjustSelectionPos=nh,b.complexBlockFindNearestChildBlock=x7,b.complexBlockGeFirstSimpleChild=C1,b.complexBlockGetAllChildContainers=hn,b.complexBlockGetBottomChildContainers=b3,b.complexBlockGetLastSimpleChild=Aa,b.complexBlockGetSelectedContainers=Ea,b.complexBlockGetTopChildContainers=x3,b.containerToDoc=lT,b.continuousScroll=Av,b.convertBlockFrom=th,b.convertImageFileToPng=ES,b.convertImageSrcToPng=BJ,b.converterIntercept=jm,b.copyBlockAttributes=i5,b.copyResourcesFromDoc=Dp,b.createBlockAnchor=Yi,b.createBlockCaretAnchor=B3,b.createBlockContentElement=qs,b.createBlockElement=Fv,b.createBlockSimpleDocRange=xh,b.createBlockSimpleRange=Te,b.createBoxContentElement=$v,b.createBoxElement=Kv,b.createBoxOp=RB,b.createChildContainer=d3,b.createComplexBlockPosition=Ae,b.createComplexDocPos=_B,b.createComplexDocRange=hM,b.createContainer=LB,b.createContainerElement=t1,b.createDeleteOps=BB,b.createEditor=Su,b.createEditorSelectionRange=Je,b.createElement=B,b.createEmptyContainer=eo,b.createEmptyDoc=to,b.createEmptyTextBlockData=Eh,b.createExpandedRange=Fd,b.createIconButton=Ns,b.createImage=Dg,b.createInsertOps=ph,b.createInsertionContentElement=zv,b.createInsertionElement=Hv,b.createLocalEditor=lnt,b.createOnesEditor=ont,b.createRange=qb,b.createRichText=rl,b.createRootContainer=f3,b.createSimpleBlockPosition=ct,b.createSimpleDocPos=DB,b.createTextBlockData=Ci,b.createTextButton=pl,b.createTextOp=pr,b.createTextWithReplaceSoftReturn=z1,b.daysAfter=Xg,b.deleteText=W1,b.diffDays=BI,b.disablePageScroll=Gg,b.docToHtml=ZB,b.docToHtmlFragment=xu,b.docToMarkdown=t5,b.docToText=qo,b.downloadImageToFile=bS,b.downloadObjectToFile=wA,b.downloadSvgToString=yS,b.editLink=rf,b.editorAddComment=nY,b.editorAddTextAttribute=g5,b.editorAutoInsertBlock=o5,b.editorBreakTextBlock=wa,b.editorClearCompositionText=lp,b.editorClearSelectedContents=Ih,b.editorCopyBlock=Lp,b.editorCopyDoc=Ph,b.editorDeleteBlock=up,b.editorDeleteBlockText=ap,b.editorDeleteBlockWithoutChildren=Sh,b.editorDeleteChildContainer=uU,b.editorDeleteChildContainers=s5,b.editorFocusToBlock=dp,b.editorFocusToEnd=SU,b.editorGetBlockData=Wo,b.editorGetBlockText=Tn,b.editorGetBlockTextEx=vh,b.editorGetBoxData=UB,b.editorHandleKeyboardEvent=AT,b.editorInsertBlock=Ra,b.editorInsertBoxToBlock=n5,b.editorInsertDoc=h5,b.editorInsertDocAt=gp,b.editorInsertText=sp,b.editorInsertTextToBlock=e5,b.editorInsertTextToBlockEx=op,b.editorMergeTextBlock=l5,b.editorMoveDown=w5,b.editorMoveEnd=vp,b.editorMoveHome=P5,b.editorMoveLeft=y5,b.editorMoveLineEnd=G5,b.editorMoveLineHome=z5,b.editorMovePageDown=J5,b.editorMovePageUp=Q5,b.editorMoveRight=k5,b.editorMoveUp=R5,b.editorMoveWordEnd=U5,b.editorMoveWordLeft=M5,b.editorRangeClearColor=C5,b.editorRangeGetColor=E5,b.editorRangeSetColor=p5,b.editorRemoveTextAttribute=mU,b.editorReplaceBlockText=Dh,b.editorReplaceContainer=m5,b.editorRunOnce=Mp,b.editorSelectAll=Tp,b.editorSelectContainer=Uh,b.editorSelectDown=S5,b.editorSelectEnd=Bp,b.editorSelectHome=F5,b.editorSelectLeft=L5,b.editorSelectLineEnd=j5,b.editorSelectLineHome=H5,b.editorSelectPageDown=eT,b.editorSelectPageUp=tT,b.editorSelectRight=I5,b.editorSelectUp=D5,b.editorSelectWordEnd=N5,b.editorSelectWordLeft=O5,b.editorSetTextColor=Sa,b.editorShowFindDialog=qq,b.editorToDocx=int,b.editorUpdateBlockData=_h,b.editorUpdateCompositionText=r5,b.editorUpdateEmbedData=f5,b.enablePageScroll=Wg,b.escapeHtmlText=Hd,b.escapeRegExp=Zg,b.escapeSpace=iI,b.exclusiveBlock=NE,b.executeBlockCommand=r3,b.executeEmbedBlockCommand=n3,b.executeRangeCommand=OT,b.fileToDataUrl=ma,b.findAfterOffsetNotType=Q1,b.findAllText=yp,b.findBlockByIndex=Lv,b.findEventTargetBlock=Qb,b.findInsertionById=jv,b.findNextOffset=DM,b.findNextVisibleSimpleBlock=VT,b.findPrevOffset=IM,b.findPrevOffsetNotType=Y1,b.findPrevSimpleBlockBeforeChildContainer=A3,b.findPrevVisibleSimpleBlock=KT,b.findTarget=da,b.findWordEnd=Z1,b.findWordLeft=J1,b.format=Zc,b.formatBytes=xv,b.formatDate=Qg,b.fragmentToHtml=mv,b.fromBase64=Xc,b.fromBase64ToBlob=jg,b.fromBase64ToUint8Array=gI,b.fromDocRange=Ho,b.fromNowString=Jg,b.genId=et,b.getAllChildBlocks=b1,b.getAllQuickMenuItems=hE,b.getAllSelectedBlocks=mi,b.getAttributesAt=Ba,b.getBlockBackground=Pv,b.getBlockByIndex=Ko,b.getBlockCaretRect=Vo,b.getBlockClass=Qt,b.getBlockClassByType=js,b.getBlockClientRects=Wi,b.getBlockCommandsWithHook=c1,b.getBlockContent=Pt,b.getBlockHeading=iu,b.getBlockId=lt,b.getBlockIndex=vt,b.getBlockInfo=Af,b.getBlockKind=_r,b.getBlockMinWidth=Yv,b.getBlockNearestRangeFromPoint=A1,b.getBlockOptions=OI,b.getBlockPath=$o,b.getBlockProperties=Zv,b.getBlockRangeFromPoint=rh,b.getBlockStyles=UI,b.getBlockTextLength=dt,b.getBlockTools=ie,b.getBlockType=_t,b.getBoxContent=i1,b.getBoxId=Vv,b.getBoxTypeFromElement=ru,b.getChildBlockCount=Dr,b.getChildBlocks=ue,b.getChildOffset=tl,b.getColorFromAttributes=U1,b.getColorFromContent=Qd,b.getComplexBlockClass=fr,b.getContainerBlockPath=a3,b.getContainerBlocks=Wv,b.getContainerBlocksElement=eu,b.getContainerById=ci,b.getContainerId=at,b.getContainerMinWidth=h1,b.getContainerToolsElement=DI,b.getContainerWidth=h3,b.getDistanceSquare=Fo,b.getElementOffset=zc,b.getElementScale=ur,b.getEmbedType=Xe,b.getExistsBlockTools=Jd,b.getExistsContainerById=tu,b.getFileExt=Jc,b.getFirstChildBlock=Re,b.getFirstClientRect=Kd,b.getHeadingBlockChildren=pa,b.getHeadingMenuOptions=cE,b.getHorizontalPadding=Mg,b.getInsertionContent=o1,b.getLastChildBlock=Me,b.getLastClientRect=Ps,b.getListAllNextBrothers=qa,b.getLogger=I,b.getNextBlock=Jt,b.getNextHiddenBlocks=s3,b.getNextValidOffset=el,b.getNextVisibleBlock=hr,b.getOffsetFromPoint=_g,b.getOffsetInfoAfter=Cu,b.getOffsetInfoBefore=Bh,b.getOpAt=rB,b.getOpLength=ch,b.getParentBlock=Z,b.getParentBlockExcludeSelf=Ws,b.getParentBox=r1,b.getParentContainer=it,b.getPrevBlock=Ue,b.getPrevValidOffset=Go,b.getPrevVisibleBlock=dr,b.getRangeCommands=MT,b.getReferenceClientRect=Ak,b.getRootBlock=a1,b.getScrollContainer=qe,b.getSpecialBlockCommands=t3,b.getStandardEmbedBlockProperties=fA,b.getTextAfterOffset=SM,b.getTextAttributes=ip,b.getTextBeforeOffset=LM,b.getTextBlockChild=lu,b.getTextBlockClass=Dv,b.getTextBlockContentChildTextLength=gr,b.getTextBlockContentChildType=l3,b.getTextBlockContentChildren=fi,b.getTextLength=mn,b.getTextOpLength=I1,b.getTextWidth=Gd,b.getToolbar=vm,b.handleBlockElementUpdated=Qv,b.hasAltOnly=uI,b.hasClass=St,b.hasCtrlOrCmd=cv,b.hasCtrlOrCmdOnly=cI,b.hashCode=Rv,b.hideBlock=Nv,b.htmlToFragment=zd,b.i18n=D,b.includeBigTable=eF,b.injectDocToHtmlFragment=ku,b.injectStyle=tv,b.inputActions=XU,b.insertEmptyBlock=FI,b.insertEmptyEmbedBlock=u1,b.insertText=Zi,b.intersectionCommands=wO,b.isBackspace=fv,b.isBlock=zs,b.isBlockLocked=qm,b.isBlockLockedByOthers=FE,b.isBlockLockedBySelf=xf,b.isBlockTools=Ov,b.isBox=Zd,b.isBoxOp=zo,b.isCJK=lv,b.isChildContainer=Ur,b.isChildNode=re,b.isCodeBlock=Wr,b.isCollapsedHeadingBlock=ui,b.isCollapsedRange=dM,b.isComplexBlockPosition=Ca,b.isComplexKindBlock=Ut,b.isContainer=Gi,b.isContainerSelectedAllChildBlocks=nT,b.isControlEvent=$s,b.isDelete=dI,b.isDraggingFiles=Wd,b.isElementVisible=Pg,b.isEmbedBlock=pe,b.isEmptyContainer=au,b.isEmptyDoc=q1,b.isEmptyTextBlock=fe,b.isEmptyTextBlockWithoutCompositionText=ff,b.isEnterOnly=uv,b.isEscape=$g,b.isExclusiveBlock=Ef,b.isExpandedHeadingBlock=o3,b.isFirefox=qc,b.isFirstChildBlockInComplexBlock=A7,b.isHeadingBlock=Ye,b.isHighSurrogate=tI,b.isInBlock=s1,b.isInBlockTools=Xs,b.isLetter=sv,b.isLowSurrogate=eI,b.isMatchShortcut=li,b.isMoveForward=lI,b.isNavigationEvent=sI,b.isNavigationKey=av,b.isNodeRemoved=Ug,b.isNumber=ov,b.isPrintableKey=Vg,b.isRootBlock=mr,b.isRootContainer=qt,b.isSafari=ha,b.isSameDay=Yg,b.isSelectBoxOnly=jk,b.isShiftEnter=fI,b.isShiftTab=mI,b.isShortcutEvent=aI,b.isSimpleBlock=MI,b.isSimpleBlockPosition=di,b.isSimplePos=IB,b.isSimpleRange=Ah,b.isSpace=jd,b.isTab=hI,b.isTextBlockContentBoxChild=Yn,b.isTextBlockContentChild=ou,b.isTextBlockContentInsertionChild=Xi,b.isTextBlockContentTextChild=su,b.isTextKindBlock=rt,b.isTextKindBlockType=nu,b.isTitleBlock=zi,b.isToday=bv,b.isValidOffset=Un,b.isVisibleBlock=Gs,b.isYesterday=vv,b.loadJs=Yb,b.loadJsPromise=Fs,b.lockers=Ir,b.mergeCommands=bm,b.mergeDocs=il,b.mergeOps=G1,b.mergeText=aM,b.multiSplitText=oB,b.overflowText=Bv,b.parseShortcut=dv,b.patchNode=Yc,b.pointInRect=Vs,b.rangeAddAttribute=hu,b.rangeGetTextColor=dB,b.rangeRemoveAttribute=va,b.rangeSetTextColor=cB,b.rangeTransformText=lB,b.registerDragDrop=Fg,b.removeAttribute=M1,b.removeClass=st,b.removeLastBr=iM,b.removePlaceholderFromBlock=PR,b.removeStyle=Zb,b.replaceAll=TI,b.replaceAllCaseInsensitive=yI,b.replaceAllText=iT,b.replaceText=Ch,b.requestDownload=qd,b.resetListStart=Ya,b.scrollIntoView=Au,b.scrollable=Ev,b.selectFile=ga,b.selectedBlockToDoc=Oh,b.selectionToDoc=La,b.setAttributes=$d,b.setClipboardData=Qc,b.setClipboardDataByEvent=EI,b.setColorToAttributes=uB,b.setDataset=Og,b.setDefaultCursor=Wc,b.setStyles=Ng,b.shareDBCommentToDocObject=Zp,b.shareDBDocCommentToComment=by,b.shortcutToDisplayText=We,b.showBlock=n1,b.showDocVersions=ant,b.splitText=_n,b.splitToThree=Ze,b.stringToDataUrl=zg,b.stringToObjectUrl=qg,b.subText=sB,b.textNodeOffsetFromPoint=Xb,b.titleFromEditor=xS,b.toBase64URL=ai,b.toMindmap=Rm,b.toPlainText=de,b.toPlainTextKeepLength=X1,b.trimChar=Kg,b.unexclusiveBlock=PE,b.unicodeLength=nI,b.unicodeSubstr=rI,b.updateBlockSelection=Xv,b.updateOpAttributes=SB,b.updateTextBlockContent=wM,b.updateUrl=Hg;for(const n in ve)n!=="default"&&!b.hasOwnProperty(n)&&Object.defineProperty(b,n,{enumerable:!0,get:()=>ve[n]});Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
951
|
+
\`\`\`\`\`\``}return""}const vtt={embedType:"plantuml",convertFrom:Att,handleUpdateBlock:Ett,createEmbedContent:Ctt,getBlockProperties:xtt,convertTo:btt},But="",Btt="hr",Ttt={dividingLine:{type:"\u5206\u5272\u7EBF",abstract:"\u5206\u5272\u7EBF"}},ytt={dividingLine:{type:"Dividing-Line",abstract:"Dividing-Line"}},ktt={dividingLine:{type:"\u533A\u5207\u308A\u7DDA",abstract:"\u533A\u5207\u308A\u7DDA"}};D.mergeLang({"zh-CN":Ttt,"en-US":ytt,"ja-JP":ktt});function Rtt(n,t){const e=B("div",["editor-embed-container"],t);B("hr",["editor-embed-hr"],e)}function wtt(n,t,e,r){return r==="html"?"<hr />":r==="markdown"?"---":"------------"}function Stt(){return{name:"hr",insertEmbedCommandItems:[{id:"insert-hr",name:D.t("dividingLine.type"),icon:r2,order:500,group:"common",subText:yn("insert-hr")}],handleInsertEmptyEmbed:async(n,t)=>{const{containerId:e,blockIndex:r}=t;return n.insertEmbed(e,r,Btt,{})}}}function Ltt(n,t,e){const{data:r}=e;if(!r||r.embedType!=="dividing-line"||!rt(n,t))return null;const i={};return{blockData:{id:et(),type:"embed",embedType:"hr",embedData:i}}}function Itt(){return{abstract:D.t("dividingLine.abstract")}}const Dtt={embedType:"hr",createEmbedContent:Rtt,convertTo:wtt,getOptions:Stt,convertFrom:Ltt,getBlockProperties:Itt},Tut="",yut="",_tt={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>',maxSizeFailed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u9650\u5236\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6</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"}}},Mtt={media:{upload:{failed:'<div class="line-1">{name} upload failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>',maxSizeFailed:'<div class="line-1">{name} upload failed</div><div class="line-2">The file size exceeds limit. Please choose another file.</div>'},load:{failed:'<div class="line-1">{name} loading failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>'},audio:{menuItem:"Audio",abstract:"Audio"},video:{menuItem:"Video",abstract:"Video"}}},Utt={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>',maxSizeFailed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u30D5\u30A1\u30A4\u30EB\u306E\u30B5\u30A4\u30BA\u304C\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u308B\u305F\u3081\u3001\u4ED6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044</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"}}};D.mergeLang({"zh-CN":_tt,"en-US":Mtt,"ja-JP":Utt});var Yr=(n=>(n.AUDIO="audio",n.VIDEO="video",n))(Yr||{}),Of=(n=>(n.Empty="empty",n.Progress="progress",n.Error="error",n))(Of||{});const FS=10*1024*1024,Ott=["wav","mp3","aac","ogg","webm","flac"],Ntt=["ogg","mp4","webm"],Ptt=()=>{};function KS(n){var h,C,E,A,v,k;const t=(h=n.getComponentOptions("media"))!=null?h:{},{allowedMedias:e,maxSize:r,callbacks:i}=t,o=(C=e==null?void 0:e.audio)!=null?C:Ott,s=(E=e==null?void 0:e.video)!=null?E:Ntt,l=(A=r==null?void 0:r.audio)!=null?A:FS,c=(v=r==null?void 0:r.video)!=null?v:FS,d=(k=i==null?void 0:i.onError)!=null?k:Ptt;return{allowedMedias:{audio:o,video:s},maxSize:{audio:l,video:c},callbacks:{onError:d}}}function Ftt(n,t){const e=o=>o.map(s=>`.${s}`).join(","),{allowedMedias:r}=KS(n),i=r[t];return i?e(i):"*"}function Ktt(n,t,e){const{maxSize:r,callbacks:i,allowedMedias:o}=KS(t),{[e]:s}=r,{[e]:l}=o;if(s&&n.size>s){const d=new Error("media is too large");throw d.code=`MaxMediaSize-${e}`,i!=null&&i.onError&&(i==null||i.onError(t,d)),d}const c=Jc(n.name);if(l&&!l.includes(c.toLowerCase())){const d=new Error(`media file is not allowed: ${c}`);throw d.code="NotAllowedFile",i!=null&&i.onError&&(i==null||i.onError(t,d)),d}}function Vtt(n){return n===Of.Empty||n===Of.Error}const en=I("media");class $tt extends ve.TypedEmitter{constructor(e){super();m(this,"mediaContainer",null);m(this,"media",null);m(this,"abstract",null);m(this,"handleMediaLoadError",(e,r)=>{if(!r.target||!(r.target instanceof Node)||!(r.target instanceof Element?r.target:r.target.parentElement))return;const o=Z(r.target);if(!o||!o.contains(this.mediaContainer))return;const s=this.renderError();this.updateMediaContent(s),this.emit("mediaError",e,"load_error",lt(o))});m(this,"handleUploadFile",async e=>{p(en,this.abstract,"no abstract"),p(en,this.mediaContainer,"The media element not exist");const{editor:r}=this.options,i=Z(this.mediaContainer);p(en,i,"The block element not exist");const o=r.getBlockData(i);try{const{resourceId:s}=await r.doc.uploadResource(e,{onProgress:C=>{this.renderProgress(C,e)}}),{name:l,type:c,size:d}=e,h={...o,embedData:{...o.embedData,src:s,fileName:l,fileSize:d,fileType:c}};r.updateBlockData(i,h)}catch(s){en.error(s),this.emit("mediaError",r,"upload_error",o.id),this.renderRetry(e,s)}st(i,"media-block-uploading")});m(this,"destroy",()=>{this.mediaContainer=null});this.options=e}bindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.addEventListener(this.media,"error",this.handleMediaLoadError)}unbindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.removeEventListener(this.media,"error",this.handleMediaLoadError)}updateMediaContent(e){p(en,this.mediaContainer,"The media element not exist"),this.mediaContainer.innerHTML="",this.mediaContainer.append(e)}renderError(){p(en,this.abstract,"no abstract");const{editor:e,createMediaElement:r}=this.options,{mediaIcon:i,mediaName:o}=this.abstract;p(en,this.mediaContainer,"The media element not exist");const s=Z(this.mediaContainer);p(en,s,"The block element not exist");const l=e.getBlockData(s),c=B("div",["media-error","embed-selected-content","embed-hover-content"],null),d=B("span",["media-error-icon"],c);d.innerHTML=i;const h=B("div",[],c);h.innerHTML=D.t("media.load.failed",{name:o}),c.appendChild(h);const C=h.querySelector(".retry-upload");return p(en,C,"The element not exist"),e.domEvents.addEventListener(C,"click",(E,A)=>{const v=B("div",["media-element"],null),k=this.getResourceUrl(l),L=r(E,v,l,k);this.unbindMediaEvent(),this.media=L,this.bindMediaEvent(),this.updateMediaContent(v)}),this.setFullScreen(),c}renderRetry(e,r){var E,A;p(en,this.abstract,"no abstract");const{editor:i}=this.options,{mediaIcon:o,mediaName:s}=this.abstract,l=B("div",["media-error","embed-selected-content","embed-hover-content"],null),c=B("span",["media-error-icon"],l);c.innerHTML=o;const d=B("div",[],l);let h=D.t("media.upload.failed",{name:s});(((E=r.response)==null?void 0:E.status)===420||((A=r.response)==null?void 0:A.status)===413)&&(h=D.t("media.upload.maxSizeFailed",{name:s})),d.innerHTML=h,l.appendChild(d);const C=d.querySelector(".retry-upload");C&&i.domEvents.addEventListener(C,"click",()=>{i.readonly||(p(en,this.abstract,"no abstract"),this.handleUploadFile(e))}),this.updateMediaContent(l),this.setFullScreen()}renderProgress(e,r){p(en,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope .media-progress"),o=e===-1||e===100?100:e;if(i){const{updateProgressElement:s}=this.options;s(i,o)}else{const{createProgressElement:s}=this.options,l=Z(this.mediaContainer);p(en,l,"The element not exist"),z(l,"media-block-uploading");const c=B("div",["media-progress"],null);s(c,o,r),this.updateMediaContent(c)}this.setFullScreen()}renderMediaElement(e,r){p(en,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope > .media-element"),{createMediaElement:o,updateMediaElement:s,editor:l}=this.options,c=this.getResourceUrl(e,r);if(i){const d=s(l,i,e,c);this.unbindMediaEvent(),this.media=d,this.bindMediaEvent()}else{const d=B("div",["media-element"],null),h=o(l,d,e,c);this.unbindMediaEvent(),this.media=h,this.bindMediaEvent(),this.updateMediaContent(d)}}renderEmpty(e){p(en,this.abstract,"no abstract"),p(en,this.mediaContainer,"The media element not exist");const r=B("div",["media-empty","embed-selected-content","embed-hover-content"],this.mediaContainer);r.innerHTML=this.abstract.mediaIcon,this.updateMediaContent(r);const{editor:i}=this.options;i.findBlockById(e.id)&&this.emit("mediaError",i,"empty",e.id),this.setFullScreen()}getResourceUrl(e,r){const{src:i}=e.embedData,{editor:o}=this.options;return o.doc.buildResourceUrl(i,{syncNewResources:async(s,l)=>{var d,h;if(!r)return;await o.doc.addResources([s]);const c=(h=(d=o.doc).getServerMeta)==null?void 0:h.call(d).appId;if(l!==e.embedData.src&&c&&e.embedData.src.includes(c)){const C=Z(r);if(C&&!o.readonly&&o.isBlockWritable(C)){const E=mt.default(e);E.embedData.src=s,o.updateBlockData(C,E)}}}})}setFullScreen(){p(en,this.mediaContainer,"The media element not exist"),z(this.mediaContainer,"full-screen")}removeFullScreen(){p(en,this.mediaContainer,"The media element not exist"),st(this.mediaContainer,"full-screen")}updateBlockAlign(e,r){const i=Z(r);p(en,i,"The block element not exist");const{align:o}=e;e.embedType==="video"&&(i.hasAttribute("data-style-align")&&i.removeAttribute("data-style-align"),i.setAttribute("data-style-align",o))}render(e,r){const{src:i}=e.embedData;(!this.mediaContainer||!r.contains(this.mediaContainer))&&(this.mediaContainer=B("div",["media"],r)),this.updateBlockAlign(e,r),Vtt(i)?i===Of.Empty&&this.renderEmpty(e):this.renderMediaElement(e,r)}setAbstract(e){this.abstract=e}}I("media-embed");const Htt="left";class VS{constructor(){m(this,"handleInsertEmptyEmbed",async(t,e)=>{var C;const{containerId:r,blockIndex:i}=e;let o;(C=e.data)!=null&&C.file&&(o=e.data.file);const s=Ftt(t,this.embedType);if(o=o!=null?o:await ga(s,{}),!o)return null;const{mediaType:l}=this.getAbstract();try{Ktt(o,t,l)}catch{return null}const c={id:et(),type:"embed",embedType:this.embedType,embedData:{src:Of.Empty}};l==="video"&&(c.align=Htt);const d=t.insertBlock(r,i,c);return await this.getMedia(t,c.id).handleUploadFile(o),d})}getMedia(t,e){const r=t.addCustom(`media-${e}`,()=>new $tt({editor:t,createMediaElement:this.createMediaElement,updateMediaElement:this.updateMediaElement,createProgressElement:this.createProgressElement,updateProgressElement:this.updateProgressElement}));return r.setAbstract({...this.getAbstract()}),r}getOptions(){const{menuItem:t,mediaIcon:e,mediaName:r,order:i,group:o}=this.getAbstract();return{name:r,insertEmbedCommandItems:[{id:`insert-${this.embedType}`,name:t,icon:e,order:i,group:o,subText:yn(`insert-${this.embedType}`)}],handleInsertEmptyEmbed:this.handleInsertEmptyEmbed}}createEmbedContent(t,e,r){const{id:i}=r;this.getMedia(t,i).render(r,e)}handleUpdateBlock(t,e,r){const{id:i}=r,o=this.getMedia(t,i),s=Pt(e);return o.render(r,s),!0}handleDeleteBlock(t,e){const r=e.id,i=this.getMedia(t,r);i.removeAllListeners(),i.destroy()}convertTo(t,e,r,i){const o=e.embedData,s=t.doc.buildResourceUrl(o.src,{withToken:!0});return i==="html"?`<${o.type} src="${s}" />`:i==="markdown"?``:s}}function $S(n,t){const e=B("div",["uploading-progress-mask"],n),r=B("div",["uploading-progress-bar"],e),i=B("div",["uploading-progress-bar-value"],r);i.style.width=`${t}%`}function HS(n,t){const e=n.querySelector(".uploading-progress-bar-value");e&&(e.style.width=`${t}%`)}const jtt=I("media-audio");class ztt extends VS{constructor(){super(...arguments);m(this,"embedType",Yr.AUDIO);m(this,"updateProgressElement",HS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["audio-container","embed-hover-content","embed-selected-content"],r),l=B("audio",[],s);return l.innerHTML="Your browser does not support the <code>audio</code> element.",l.controls=!0,l.src=o,setTimeout(()=>{this.getMedia(e,i.id).setFullScreen()}),l})}getAbstract(){return{mediaIcon:t2,mediaName:D.t(`media.${Yr.AUDIO}.menuItem`),menuItem:D.t(`media.${Yr.AUDIO}.menuItem`),order:800,mediaType:Yr.AUDIO,group:"common"}}getBlockProperties(){return{abstract:`${D.t(`media.${Yr.AUDIO}.abstract`)}`}}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .audio-container > audio");return p(jtt,s,"The media element not exist"),s.src!==o&&(s.src=o),s}createProgressElement(e,r){const i=B("audio",[],e);i.innerHTML="Your browser does not support the <code>audio</code> element.",i.controls=!0,i.src="about:blank",$S(e,r)}}const Gtt=new ztt;I("video-resizer");function jS(n){return n&&pe(n)&&Xe(n)==="video"}const Wtt=50;class MA{constructor(t){m(this,"currentResizableElement",null);m(this,"resizing",!1);m(this,"handleHoveringBlockChange",(t,e)=>{if(!this.resizing&&!window.isDragging&&(e&&jS(e)&&this.disableBlockResize(e),t&&jS(t)&&this.editor.isBlockWritable(t))){const r=this.getVideoElement(t);if(!r)return;this.enableBlockResize(t,r)}});m(this,"handleResizing",(t,e)=>{if(this.resizing=!0,!this.currentResizableElement)return;const r=t.getBlock();if(!r)return;const i=r.getBoundingClientRect().width,o=Math.min(Math.max(e.width,Wtt),i);this.currentResizableElement.style.width=`${o}px`,this.currentResizableElement.style.pointerEvents="none"});m(this,"handleResized",t=>{this.resizing=!1;const e=t.getBlock();if(!this.currentResizableElement||!e)return;const r=this.editor.getBlockData(e),{width:i}=this.currentResizableElement.getBoundingClientRect();this.currentResizableElement.style.pointerEvents="auto",this.editor.updateBlockData(e,{...r,width:i})});this.editor=t,Be.get(t).addListener("change",this.handleHoveringBlockChange)}destroy(){this.currentResizableElement=null,Be.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}getVideoElement(t){return Pt(t).querySelector(":scope .video-container > video")}updateResizer(t){const e=this.editor.findCustom(`${lt(t)}-resizer`);e&&e.updateResizer()}disableBlockResize(t){const e=this.editor.findCustom(`${lt(t)}-resizer`);e&&e.disableResize()}enableBlockResize(t,e){const r=this.editor.addCustom(`${lt(t)}-resizer`,()=>new mf(this.editor,{resize:["top-left","top-right","bottom-left","bottom-right"]}));r.enableResize(t,e),r.removeListener("resizing",this.handleResizing),r.removeListener("resized",this.handleResized),r.addListener("resizing",this.handleResizing),r.addListener("resized",this.handleResized),this.currentResizableElement=e}}const qtt=I("video");class Xtt extends VS{constructor(){super(...arguments);m(this,"embedType",Yr.VIDEO);m(this,"updateProgressElement",HS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["video-container","embed-selected-content","drag-preview-element"],r),l=B("video",[],s);return l.innerHTML="Your browser does not support the <code>video</code> element.",l.controls=!0,l.src=o,l.addEventListener("canplay",()=>{e.addCustom("video-resizer",()=>new MA(e)),this.getMedia(e,i.id).removeListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).addListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).removeFullScreen()}),i.width&&(l.style.width=`${i.width}px`),l});m(this,"createProgressElement",(e,r,i)=>{const o=B("video",["progress-video"],e);o.innerHTML="Your browser does not support the <code>audio</code> element.",o.controls=!0,$S(e,r),ma(i).then(s=>{const l=e.querySelector(".progress-video");l&&s1(e)&&(l.src=s)})})}getAbstract(){return{mediaName:D.t(`media.${Yr.VIDEO}.menuItem`),mediaIcon:e2,menuItem:D.t(`media.${Yr.VIDEO}.menuItem`),order:700,mediaType:Yr.VIDEO,group:"common"}}getBlockProperties(){return{abstract:`${D.t(`media.${Yr.VIDEO}.abstract`)}`}}handleMediaError(e,r,i){const o=e.addCustom("video-resizer",()=>new MA(e)),s=e.getBlockById(i);o.disableBlockResize(s)}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .video-container > video");p(qtt,s,"The media element not exist"),s.src!==o&&(s.src=o),i.width?s.style.width=`${i.width}px`:s.style.width="";const l=e.getBlockById(i.id);return setTimeout(()=>{e.addCustom("video-resizer",()=>new MA(e)).updateResizer(l)}),s}}const Ytt=new Xtt,zS=[AE,kE,RE,Hk],UA=[MS,QJ,ott,mtt,vtt,C$,Dtt,Ytt,Gtt,aW,fS,HY],GS=[nR,mS,P4];function Qtt(n,t,e){var i,o,s,l;si.level=(i=e.logLevel)!=null?i:Us.DEBUG;const r=Su(n,t,{components:{blocks:[...zS,...((o=e==null?void 0:e.components)==null?void 0:o.blocks)||[]],embeds:[...UA,...((s=e.components)==null?void 0:s.embeds)||[]],boxes:[...GS,...((l=e.components)==null?void 0:l.boxes)||[]],textRenders:[new nE],options:{...e.componentsOptions}}});return r.readonly=!0,r.addCustom("heading-collapse",()=>new AA(r)),r.addCustom("editor-tooltip",()=>new Om(r)),r.addListener("clickLink",(c,d,h)=>{var E;if((E=e==null?void 0:e.events)!=null&&E.onClickLink){e.events.onClickLink(c,d,h);return}const C=h.getAttribute("link");C&&(c.readonly||d.ctrlKey||d.metaKey)&&window.open(C,"_blank")}),r}class WS{constructor(t){this.createOptions=t,t.lang&&D.setLang(t.lang)}createHistoryEditor(t,e){return Qtt(t,e,this.createOptions)}}I("create-editor");function qS(n,{root:t,childDoc:e,doc:r}){var h,C;e.uploadResource=r.uploadResource.bind(r),e.buildResourceUrl=r.buildResourceUrl.bind(r);const i=n.getComponentOptions("comment"),o={image:{defaultAlign:"left"},table:{locatingContainer:t,hideCellMenu:!0,hideToolbar:!0},...i==null?void 0:i.componentsOptions},s=[];n.editorBlocks.forEach(E=>{E.blockType==="text"||E.blockType==="embed"||s.push(E)});const l=[];n.editorEmbeds.forEach(E=>{l.push(E)});const c=[];n.editorBoxes.forEach(E=>{E.boxType==="text"||E.boxType==="br"||E.boxType==="image"||E.boxType==="anchor"||c.push(E)});const d=Su(t,e,{shortcuts:[Fh],components:{blocks:s,commandProviders:[new pm],decorators:[new Hm],embeds:l,boxes:c,options:o}});if(d.input.addHandler(new zm),d.input.addHandler(new GE(d)),d.input.addHandler(new JE(d)),d.input.addHandler(new ZX(d)),d.input.addHandler(new Xm),d.addCustom("image-paste-handler",()=>new zE(d)),(h=n.options.componentsOptions)!=null&&h.mention){const E=n.options.componentsOptions.mention;d.addCustom("mention",()=>new hS(d,{...E}))}if((C=n.options.componentsOptions)!=null&&C.comment){const E=n.options.componentsOptions.comment;E.onCommentEditorClick&&d.addListener("click",E.onCommentEditorClick)}return d}function Jtt(n,t){const e=Array.from(n.rootContainer.querySelectorAll(`[comment-${t.toLocaleLowerCase()}="${t}"]`)),r=new Set;e.forEach(i=>{const o=Z(i);o&&r.add(o)}),r.forEach(i=>{tY(n,i,t)})}class Ztt{constructor(t){m(this,"listeners",new Set);m(this,"doc");this.editor=t,this.doc=this.editor.doc.externalDoc,this.doc.registerCallback(this)}getComments(){return this.doc.getComments()}getComment(t){return this.doc.getComment(t)}getCommentDoc(t){return this.doc.getCommentDoc(t)}localCreateComment(t,e){this.doc.localCreateComment(t,e)}localDeleteComment(t){const e=this.getComment(t);this.doc.localDeleteComment(t);const r=e.groupId;this.getComments().filter(o=>o.groupId===r).length===0&&Jtt(this.editor,r)}localUpdateComment(t,e){this.doc.localUpdateComment(t,e)}onCreateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onCreateComment(t,e))}onDeleteComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onDeleteComment(t,e))}onUpdateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onUpdateComment(t,e))}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}createCommentEditor(t,e){return qS(this.editor,{root:t,childDoc:e,doc:this.doc})}allowEdit(t){return t.userId===this.doc.getUser().userId}}class tet{constructor(t,e){m(this,"listeners",new Set);this.editor=t,this.localDoc=e}get doc(){return this.localDoc.toJSON()}getComments(){return Object.values(this.doc.comments)}getComment(t){return this.doc.comments[t]}getCommentDoc(t){const e=this.doc.comments[t];return Zp(e)}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}localCreateComment(t,e){}localDeleteComment(t){}localUpdateComment(t,e){}createCommentEditor(t,e){return qS(this.editor,{root:t,childDoc:e,doc:this.localDoc})}allowEdit(t){return t.userId===this.localDoc.getUser().userId}}const eet={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}",limitedEnvTips:"\u7531\u4E8E\u6D4F\u89C8\u5668\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528 {shortCut} \u7C98\u8D34"}},net={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}",limitedEnvTips:"Press {shortCut} to paste due to browser restrictions"}},ret={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",limitedEnvTips:"\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u5236\u9650\u306B\u3088\u308A\u3001\u300C{shortCut}\u300D\u3092\u4F7F\u7528\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MAAAAAAAAAAAAAAAAARjgAAGN1c3RvbVhtbC9pdGVtMS54bWxQSwECLQAUAAYACAAAACEAdD85esIAAAAoAQAAHgAAAAAAAAAAAAAAAABVOQAAY3VzdG9tWG1sL19yZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAOuAYExTAwAAjw4AABIAAAAAAAAAAAAAAAAAWzsAAHdvcmQvZm9udFRhYmxlLnhtbFBLBQYAAAAADwAPANQDAADePgAAAAA=",oet=()=>jg(iet),set=I("image-to-docx");async function aet(n){return new Promise((t,e)=>{const r=new Image;r.onload=()=>{t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=e,r.src=n})}async function XS(n,t){if(n.width&&n.height)return{width:n.width,height:n.height,buffer:t};try{const e=await ma(new File([t],"",{})),r=await aet(e);return r.width===void 0||r.height===void 0?{width:345,height:230,buffer:t}:n.width||n.height?{width:n.width||r.width*n.height/r.height,height:n.height||r.height*n.width/r.width,buffer:t}:{width:r.width,height:r.height,buffer:t}}catch(e){set.error(e);return}}function cet(n,t){let e=n.filter(s=>s!=null);const r=t-(e.length-1)*20,i=.87,o=e.reduce((s,l)=>s+l.width,0);return o>r&&(e=e.map(s=>({width:s.width*r/o,height:s.height*r/o,buffer:s.buffer}))),e.map(s=>({width:s.width*i,height:s.height*i,buffer:s.buffer}))}function uet(n,t,e){if(!e||typeof e!="object")return;const r=e,i=n.filter(s=>s!=null),o=t-(i.length-1)*20;i.forEach((s,l)=>{if(i.length===1&&r.widthPercent){const d=r.widthPercent,h=s.width;s.width=o*(d/100),s.height*=s.width/h;return}const c=`${l}_flex`;if(r[c]){const d=r[c],h=s.width;s.width=o*d,s.height*=s.width/h}})}function YS(n=[0,1,2,3,4,5,6,7],t=1){return n.map(e=>{let r;switch(e%3){case 0:r=Ct.LevelFormat.DECIMAL;break;case 1:r=Ct.LevelFormat.LOWER_LETTER;break;default:r=Ct.LevelFormat.LOWER_ROMAN;break}return{level:e,format:r,text:`%${e+1}. `,alignment:Ct.AlignmentType.START,start:t,style:{paragraph:{indent:{left:Ct.convertInchesToTwip(.3*(e+1)),hanging:Ct.convertInchesToTwip(.2)}}}}})}function fet(){return[0,1,2,3,4,5,6,7].map(n=>{let t;switch(n%3){case 0:t="\u2022";break;case 1:t="\u25E6";break;default:t="\u25AA";break}return{level:n,format:Ct.LevelFormat.BULLET,text:t,alignment:Ct.AlignmentType.START,style:{paragraph:{indent:{left:Ct.convertInchesToTwip(.3*(n+1)),hanging:Ct.convertInchesToTwip(.2)}}}}})}function det(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:Ct.LevelFormat.BULLET,text:"\u2611",alignment:Ct.AlignmentType.START,style:{paragraph:{indent:{left:Ct.convertInchesToTwip(.3*(n+1)),hanging:Ct.convertInchesToTwip(.2)}}}}))}function het(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:Ct.LevelFormat.BULLET,text:"\u2610",alignment:Ct.AlignmentType.START,style:{paragraph:{indent:{left:Ct.convertInchesToTwip(.3*(n+1)),hanging:Ct.convertInchesToTwip(.2)}}}}))}var Nf=(n=>(n.NUMBERING="number-numbering-reference",n.BULLET="number-bullet-reference",n.CHECKED="checked-bullet-reference",n.UNCHECKED="unchecked-bullet-reference",n))(Nf||{});const met=[{levels:YS(),reference:"number-numbering-reference"},{levels:fet(),reference:"number-bullet-reference"},{levels:det(),reference:"checked-bullet-reference"},{levels:het(),reference:"unchecked-bullet-reference"}];function get(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 pet(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 Cet(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 Eet=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/;function QS(n){if(typeof n=="string"&&n.length>0){if(n[0]==="#")return n.substring(1);const t=n.match(Eet);if(t){const e=s=>{let l=Number(s).toString(16);return l.length<2&&(l=`0${l}`),l},r=e(t[1]),i=e(t[2]),o=e(t[3]);return`${r}${i}${o}`}if(n==="red")return"FF0000";if(n==="green")return"00FF00";if(n==="blue")return"0000FF"}}function cn(n,t){if(n&&n.attributes&&n.attributes[t])return n.attributes[t];if(n&&n.attributes&&n.attributes.box&&n.attributes.inputType&&t==="style-underline")return!0}function JS(n,t,e){for(let r=0;r<=e;++r){const i=`${t}${r}`;if(cn(n,i))return i}}function E0(n,t,e){n.attributes=n.attributes||{},n.attributes[t]=e}function OA(n){return n==="image"||n==="drawio"||n==="plantuml"||n==="mermaid"||n==="flowchart"}function ZS(n){return n&&n.startsWith("//")?`https:${n}`:n&&!n.startsWith("http://")&&!n.startsWith("https://")?`https://${n}`:n}function Aet(n){const t=cn(n,"inlineStyle");if(t==null)return;const e=t.split(";");for(const r of e){const i=r.split(":");if(i.length!==2)continue;const o=i[0].trim().toLowerCase(),s=i[1].trim().toLowerCase();o==="font-size"&&E0(n,"inline-style-font-size",s),o==="color"&&E0(n,"inline-style-color",s),o==="background-color"&&E0(n,"inline-style-background-color",s),o==="font-family"&&E0(n,"inline-style-font-family",s)}}function xet(n,t){if(t==null)return n==null?void 0:n.normal;if(n)return n[`heading${t}`]}function bet(n){const t=`${cn(n,"inline-style-font-size")}`;if(t&&t.indexOf("px")>0)return+t.replace(/px/g,"")}function vet(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 Bet(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` @${n.attributes.text} `}function Tet(n){return cn(n,"inline-style-font-family")}function yet(n){const t=cn(n,"inline-style-background-color");return QS(t)}function ket(n){const t=cn(n,"inline-style-color");return QS(t)}function Ret(n){Aet(n);const t=cn(n,"type")==="mention";return{box:n.attributes&&n.attributes.box?n.attributes:void 0,inlineCode:!!cn(n,"style-code"),link:ZS(cn(n,"link")),size:bet(n),text:t?Bet(n):vet(n)||n.insert,bold:!!cn(n,"style-bold"),underline:!!cn(n,"style-underline"),italics:!!cn(n,"style-italic"),strike:!!cn(n,"style-strikethrough"),superScript:!!cn(n,"style-super"),subScript:!!cn(n,"style-sub"),math:cn(n,"type")==="math"?cn(n,"src"):void 0,mention:t,fontFamily:Tet(n),background:yet(n),color:t?"338fe5":get(JS(n,"style-color-",6))||ket(n),highlight:JS(n,"style-bg-color-",13)}}function wet(){return[new Ct.Paragraph({border:{top:{color:"auto",style:Ct.BorderStyle.DASHED,size:4,space:1}},spacing:{before:300}}),new Ct.Paragraph({spacing:{line:0}})]}function Let(){return new Ct.Paragraph({children:[new Ct.TextRun({text:"[\u89C6\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:Ct.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function Iet(){return new Ct.Paragraph({children:[new Ct.TextRun({text:"[\u97F3\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:Ct.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function Det(n,t){return new Ct.Paragraph({children:[new Ct.ExternalHyperlink({children:[new Ct.TextRun({style:"Hyperlink",text:t||n})],link:n})]})}function tL(n){if(n.heading!=null)return`Heading${n.heading}`}function eL(n){if(n.alignment!=null){if(n.alignment==="center")return Ct.AlignmentType.CENTER;if(n.alignment==="right")return Ct.AlignmentType.RIGHT;if(n.alignment==="left")return Ct.AlignmentType.LEFT}}function _et(n){if(n.indent)return{left:Ct.convertInchesToTwip(.3*n.indent-.2)};if(n.padding)return{left:Ct.convertInchesToTwip(.3*n.padding)}}function Met(n){return{type:Ct.ShadingType.CLEAR,color:"FFFFFF",fill:n}}function Uet(n){const t=n.split(",");if(t.length!==0)return t[0].trim()}function nL(n,t){let e;e=n.inlineCode?"InlineCode":void 0,e=n.link?"Hyperlink":e;const r=n.size||t,i=r!=null?Math.floor(r*1.5+.5):void 0;return new Ct.TextRun({text:n.text,bold:n.bold||void 0,underline:n.underline?{type:Ct.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:i,style:e,font:n.fontFamily?Uet(n.fontFamily):void 0,shading:n.background?Met(n.background):void 0,color:n.color,highlight:pet(n.highlight)})}function Oet(n,t){if(n.link)return new Ct.ExternalHyperlink({children:[nL(n,t)],link:n.link})}async function rL(n,t,e,r,i){const[o]=await i(n,t,e);if(o==null)return;const s=await XS({width:r||0,height:0,src:e},o);return new Ct.ImageRun({data:o,transformation:{width:(s==null?void 0:s.width)||100,height:(s==null?void 0:s.height)||20}})}function Net(n){if(n.heading||n.heading)return n.heading}function Pet(n){if(n.align&&(n.align==="center"||n.align==="right"||n.align==="left"))return n.align}function Fet(n){if(n.textOnly===!0&&n.level!=null)return n.level}async function Ket(n,t){var r;const e=[];if(n.text&&Array.isArray(n.text)){for(let i=0;i<n.text.length;i++){const o=n.text[i];if(((r=o.attributes)==null?void 0:r.box)===!0&&t){const s=await t(o);if(s){n.text.splice(i+1,0,...s);continue}}e.push(Ret(o))}return e}}function Vet(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 $et(n,t){if(n.type==="embed"&&n.embedType&&OA(n.embedType)&&n.embedData&&n.embedData.src)return n.embedData.src.split("|").map(r=>{const i=t(r),o=n.embedData[`${i}_width`],s=n.embedData[`${i}_height`];return{src:r,width:o,height:s}})}function Het(n){if(n.padding)return n.padding}function jet(n){return!!(n.type==="embed"&&n.embedType&&OA(n.embedType)&&n.embedData&&n.embedData.src)}async function A0(n,t,e){return{quoted:!!n.quoted,heading:Net(n),alignment:Pet(n),indent:Fet(n),padding:Het(n),texts:await Ket(n,e),list:Vet(n),images:$et(n,t),border:jet(n)}}async function zet(n,t,e,r){const i=[];if(!n.children)return[];for(const o of n.children){const s=[];for(const l of t.blocks[o])s.push(await A0(l,e,r));i.push(s)}return i}const Get=I("to-docx");function Wet(n,t){return Array(n).fill(0).map(()=>Array(t).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 qet(n,t,e,r){const i=!!n.hasColTitle,o=!!n.hasRowTitle,s=!!n.isStripeStyle,l="F5F8FB";for(let c=0;c<t;c++)for(let d=0;d<e;d++)(i&&d===0||o&&c===0||s&&c%2===1)&&(r[c][d].color=l)}function Xet(n){p(Get,n.children,"no table children");const t=n.rows,e=n.cols,r=n.colsWidth;if(r)for(let s=0;s<r.length;s++)r[s]===0&&(r[s]=100);const i=Wet(t,e);let o=0;for(let s=0;s<t;++s)for(let l=0;l<e;++l){if(i[s][l].originalWidth=r?r[l]:void 0,i[s][l].from!==void 0)continue;const c=n.children[o];o+=1,i[s][l].cellId=c,i[s][l].color=Cet(n[`${c}_background`]),i[s][l].width=r?r[l]:100,i[s][l].align=n[`${c}_align`];const d=n[`${c}_rowSpan`]||1,h=n[`${c}_colSpan`]||1;if(i[s][l].rowSpan=d,i[s][l].colSpan=h,d>1||h>1){let C=0;for(let E=0;E<d;E++)for(let A=0;A<h;A++)E===0&&(C+=r?r[l+A]:80),!(E===0&&A===0)&&(i[s+E][l+A].from=[s,l]);i[s][l].width=C}}return qet(n,t,e,i),i}async function Yet(n,t,e,r,i,o,s,l,c,d){async function h(A){if(l){const v=await l(i,o,A);if(v){await r.addDoc(n,v,d);return}}if(A.type==="text"||A.textOnly===!0){const v=await A0(A,s,c);await r.addTextBlock(v);return}if(A.type==="code"){const v=await zet(A,e,s,c);await r.addCodeBlockObject(v);return}if(A.type==="list"&&A.textOnly!==!0){const v=await A0(A,s,c);await r.addListBlockObject(n,v);return}if(A.type==="embed"&&A.embedType){const v=A,k=v.embedData,L=v.embedType;if(OA(L)){const M=await A0(A,s,c);await r.addImagesBlockObject(A,M,d)}else A.embedType==="hr"?r.addSeparatorBlock():A.embedType==="video"?r.addVideoPlaceholder():A.embedType==="audio"?r.addAudioPlaceholder():A.embedType==="webpage"?r.addHyperlinkParagraph(ZS(k.src),k.title):r.addOtherEmbedBlock(L,A.embedData);return}if(A.type==="table"){let v=[];if(A.colsWidth)v=A.colsWidth;else{const L=A.cols;v=new Array(L);for(let M=0;M<v.length;M++)v[M]=100;A.colsWidth=v}const k=Xet(A);await r.addTableMatrix(v,k,e),r.addEmptyParagraph()}}function C(A){const v=[];for(const{type:k,data:L}of A.embedData.exportSpec){if(k==="text"){const M={id:et(),text:[{insert:L}],type:"text"};v.push(M);continue}if(k==="image"){const M={id:et(),type:"embed",embedType:"image",align:"left",embedData:{src:L}};v.push(M);continue}if(k==="link"){const M={id:et(),type:"embed",embedType:"webpage",embedData:{src:L.url,title:L.title}};v.push(M);continue}}return v}function E(A){var v;return(v=A==null?void 0:A.embedData)!=null&&v.exportSpec?C(A):[A]}for(const A of t)for(const v of E(A))await h(v)}function Qet(){return{listMaxInst:1,listInstMap:{},listRefMap:{},levelConfigs:[]}}const Jet=I("to-docx");class Zet{constructor(t,e,r,i,o,s){m(this,"paragraphs");this.appId=t,this.docId=e,this.state=r,this.readImageFunc=i,this.convertBlocksFunc=o,this.defaultFontSize=s,this.paragraphs=[]}async addTextBlock(t){this.paragraphs.push(new Ct.Paragraph({heading:tL(t),alignment:eL(t),children:await this.paragraphsFromBlockTexts(t),indent:_et(t)}))}async addEmptyImagePlaceHolder(){this.paragraphs.push(new Ct.Paragraph({text:`[${D.t("docx.imageExportFailed")}]`,shading:{type:Ct.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}}))}async paragraphsFromBlockTexts(t){if(t.texts==null)return;const e=xet(this.defaultFontSize,t.heading),r=[];for(const i of t.texts){if(i.link){const o=Oet(i,e);o&&r.push(o);continue}if(i.box&&i.box.type&&i.box.type==="br"){r.push(new Ct.TextRun({text:"",break:1}));continue}if(i.box&&i.box.type&&i.box.type==="image"){const o=await rL(this.appId,this.docId,i.box.src,i.box.width,this.readImageFunc);o&&r.push(o);continue}if(i.math){const o=await rL(this.appId,this.docId,i.math,0,this.readImageFunc);o&&r.push(o);continue}r.push(nL(i,e))}return r}async addCodeBlockObject(t){for(const e of t)for(const r of e){const i={style:Ct.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new Ct.Paragraph({style:"Code",border:{left:{...i},right:{...i},top:{...i},bottom:{...i}},children:await this.paragraphsFromBlockTexts(r)}))}}async addListBlockObject(t,e){if(e.list==null)return;let r;const i=e.list.checkbox?`${t}-${e.list.groupId}-${e.list.checkbox}`:`${t}-${e.list.groupId}`;if(this.state.listInstMap[i])r=this.state.listInstMap[i];else if(r=this.state.listMaxInst,this.state.listMaxInst+=1,this.state.listInstMap[i]=r,e.list.start>0&&e.list.ordered){const s=`number-numbering-reference-${r}`,l=YS([e.list.level-1],e.list.start);this.state.levelConfigs.push({levels:l,reference:s,inst:r}),this.state.listRefMap[i]=s}else e.list.ordered?this.state.listRefMap[i]=Nf.NUMBERING:e.list.checkbox&&e.list.checkbox==="checked"?this.state.listRefMap[i]=Nf.CHECKED:e.list.checkbox&&e.list.checkbox==="unchecked"?this.state.listRefMap[i]=Nf.UNCHECKED:this.state.listRefMap[i]=Nf.BULLET;const o=tL(e);e.texts&&this.paragraphs.push(new Ct.Paragraph({heading:o,children:await this.paragraphsFromBlockTexts(e),numbering:{reference:this.state.listRefMap[i],level:e.list.level-1,instance:r}}))}imageDimWithBufferToImageRun(t){return new Ct.ImageRun({data:t.buffer,transformation:{width:t.width,height:t.height}})}async addImagesBlockObject(t,e,r){if(e.images==null){if(t.type==="embed"&&t.embedType==="image"){const{src:c}=t.embedData;c||this.addEmptyImagePlaceHolder()}return}const i=[],o=await Promise.all(e.images.map(async c=>{const[d,h]=await this.readImageFunc(this.appId,this.docId,c.src);if(d){const C=await XS(c,d);if(C)return C}i.push(h)}));uet(o,r,t.embedData);const s=cet(o,r),l={style:Ct.BorderStyle.SINGLE,color:"#DEDEDE"};s.length&&this.paragraphs.push(new Ct.Paragraph({border:e.border?{left:{...l},right:{...l},top:{...l},bottom:{...l}}:void 0,alignment:eL(e)||Ct.AlignmentType.CENTER,children:s.map(c=>this.imageDimWithBufferToImageRun(c)).flatMap((c,d,h)=>c==null?[]:h.length-1!==d?[c,new Ct.TextRun({text:" "})]:c)})),i.forEach(c=>{this.addHyperlinkParagraph(c)})}addSeparatorBlock(){wet().forEach(t=>this.paragraphs.push(t))}addEmptyParagraph(){this.paragraphs.push(new Ct.Paragraph(""))}addVideoPlaceholder(){this.paragraphs.push(Let())}addAudioPlaceholder(){this.paragraphs.push(Iet())}addHyperlinkParagraph(t,e){t!=null&&this.paragraphs.push(Det(t,e))}async addTableMatrix(t,e,r){const i=t.map(o=>o!==0?o*15:1500);this.paragraphs.push(new Ct.Table({rows:await this.generateTableRows(e,r),columnWidths:i}))}async generateRowCells(t,e){const r=[];for(const i of t){const o=i.cellId;if(o===void 0)continue;const s=i.width*.9;r.push(new Ct.TableCell({children:await this.convertBlocksFunc(o,e.blocks[o],e,this.appId,this.docId,this.state,s),columnSpan:i.colSpan,rowSpan:i.rowSpan,width:{type:Ct.WidthType.DXA,size:i.width*15},shading:i.color?{fill:i.color,type:Ct.ShadingType.CLEAR,color:"auto"}:void 0}))}return r}async generateTableRows(t,e){const r=[];for(const i of t)r.push(new Ct.TableRow({children:await this.generateRowCells(i,e)}));return r}async addDoc(t,e,r){const i=await this.convertBlocksFunc(t,e.blocks.root,e,this.appId,this.docId,this.state,r);i&&(this.paragraphs=this.paragraphs.concat(i))}async addOtherEmbedBlock(){}}class tnt{constructor(t,e,r,i,o,s,l,c){m(this,"convertBlocks",async(t,e,r,i,o,s,l=720)=>{const c=new Zet(i,o,s,this.readImage,this.convertBlocks,this.defaultFontSize);return await Yet(t,e,r,c,i,o,this.md5HexFunc,this.getDocByBlock,this.getTextsByBox,l||720),c.paragraphs});this.templateData=t,this.docData=e,this.md5HexFunc=r,this.readImage=i,this.defaultFontSize=o,this.getDocByBlock=s,this.getTextsByBox=l,this.backgroundImageOptions=c}async convert(t,e){return this.snapshot2docx(this.docData,t,e)}async snapshot2docx(t,e,r){const i=new Ct.ImportDotx,o=this.templateData?await i.extract(this.templateData):void 0,s=t.blocks.root;p(Jet,s,"data must have blocks");const l=Qet(),c=await this.convertBlocks("blocks",s,t,e,r,l),d=this.backgroundImageOptions?{default:new Ct.Header({children:[new Ct.Paragraph({children:[new Ct.ImageRun(this.backgroundImageOptions)]})]})}:{},h=new Ct.Document({numbering:{config:[...met,...l.levelConfigs]},sections:[{headers:d,children:c,properties:{page:{size:{width:12240,height:15840},margin:{top:1440,bottom:1440,left:1440,right:1440}}}}]},{template:o});return Ct.Packer.toBlob(h)}}async function ent(n,t,e,r){const i=n.doc.buildResourceUrl(r,{withToken:!0});let o=await bS(i);if(!o)return[void 0,i];if(o.type.indexOf("/svg")!==-1){const l=await ES(o);l&&(o=new File([l],o.name))}return[await o.arrayBuffer(),i]}async function nnt(n,t,e){const r=n.editorBlocks.getBlockClass(e.type);if(r.toStandardDoc)return r.toStandardDoc(n,e,t)}async function rnt(n,t){const e=t.attributes,r=n.editorBoxes.getBoxClass(e.type);if(r.toStandardText)return r.toStandardText(n,e)}async function int(n,t){let{template:e,download:r,backgroundImageOptions:i}=t!=null?t:{};e||(e=oet());const o=n.doc.toJSON(),s=(C,E,A)=>ent(n,C,E,A),l=async(C,E,A)=>nnt(n,o,A),c=async C=>rnt(n,C),h=await new tnt(e,o,Md.default,s,void 0,l,c,i).convert("_appId","_docId");if(r){const C=URL.createObjectURL(h),E=document.createElement("a");E.setAttribute("download",`${xS(n)}.docx`),E.setAttribute("href",`${C}`),E.click(),E.remove()}return h}const NA=I("create-editor");async function ont(n,t){var s,l,c,d,h,C,E,A,v,k,L,M,U,F,J,q;p(NA,n,"app does not exists"),t.lang&&D.setLang(t.lang),si.level=(s=t.logLevel)!=null?s:Us.DEBUG;const e=t.onReauth?async()=>{var At;const Y=t.user.userId,ot=t.docId,pt=await((At=t.onReauth)==null?void 0:At.call(t,Y,ot,t.permission));return{userId:Y,docId:ot,permission:t.permission,appId:t.appId,token:pt,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl}}:void 0,r={auth:{appId:t.appId,docId:t.docId,userId:t.user.userId,permission:t.permission,token:t.token,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl},serverUrl:t.serverUrl,reauthFunc:e,disableLogout:t.disableLogout},i=await Hu.load(r),o=Su(n,i,{id:t.id,scrollContainer:t==null?void 0:t.scrollContainer,enableComments:t==null?void 0:t.enableComments,components:{blocks:[...zS,...((l=t==null?void 0:t.components)==null?void 0:l.blocks)||[]],embeds:[...UA,...((c=t.components)==null?void 0:c.embeds)||[]],boxes:[...GS,...((d=t.components)==null?void 0:d.boxes)||[]],commandProviders:[new pm,...((h=t.components)==null?void 0:h.commandProviders)||[]],decorators:[new Hm,new eC],insertions:[tp],blockHooks:[new KE,new dw,...((C=t.components)==null?void 0:C.blockHooks)||[]],textRenders:[new L4,new nE,...((E=t.components)==null?void 0:E.textRenders)||[]],options:{...t.componentsOptions}},shortcuts:[fY,Kj,JG,xE,e4,rV,mE,XY,Fh,YK,...t.shortcuts||[]],colors:["#0064FF","#EB3723","#F59300","#00A865","#F25A0A","#70A310","#009CAD","#0990D9","#8851ED","#D62069"]});if(o.editorCommandProviders.registerCommandProvider(new Si(o)),o.input.addHandler(new PQ),o.input.addHandler(new zm),o.input.addHandler(new v$),o.input.addHandler(new jG),o.input.addHandler(new wE(o,{hideTitle:t.hideTitle,headingLevel:1,titlePlaceholder:D.t("placeholder.common.title"),contentPlaceholder:D.t("placeholder.common.content"),readonlyTitlePlaceholder:D.t("placeholder.common.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0,applyContentPlaceholder:(A=t.placeholder)==null?void 0:A.applyContentPlaceholder})),o.input.addHandler(new Um(o,(v=t.componentsOptions)==null?void 0:v.quickMenu)),o.input.addHandler(new GE(o)),o.input.addHandler(new JE(o)),o.input.addHandler(new Xm),o.doc.registerCallback(new FQ(o)),o.addCustom("remote-cursor",()=>new By(o)),o.addCustom("block-menu",Y=>new gw(Y)),ce.isMobile||o.addCustom("editor-tooltip",()=>new Om(o)),t!=null&&t.enableComments&&o.addCustom("editor-comments",Y=>new S4(Y,new Ztt(Y))),t.enableContextMenu!==!1&&o.addCustom("editor-context-menu",Y=>new o4(Y)),o.addCustom("create-options",()=>new Fb(o,t)),o.addCustom("drop-target",()=>new Tf(o)),o.addCustom("list-to-mindmap",()=>new Sm(o)),o.addCustom("list-to-mention",()=>new sJ(o)),o.addCustom("mobile-helper",()=>new SJ(o)),o.addCustom("code-caret",()=>new Oj(o)),o.addCustom("image-paste-handler",()=>new zE(o)),(k=t.componentsOptions)!=null&&k.mention){const Y=t.componentsOptions.mention;o.addCustom("mention",()=>new hS(o,Y))}if(o.addCustom("heading-collapse",()=>new AA(o)),o.addCustom(p0,Y=>new yA(Y)),Za.register(o),Tf.register(o),Es.register(o),ds.register(o),o.addListener("clickLink",(Y,ot,pt)=>{var xt;if((xt=t==null?void 0:t.events)!=null&&xt.onClickLink){t.events.onClickLink(Y,ot,pt);return}const At=pt.getAttribute("link");At&&(Y.readonly||ot.ctrlKey||ot.metaKey)&&window.open(At,"_blank")}),(M=(L=t.componentsOptions)==null?void 0:L.remoteCarets)!=null&&M.onUserChanged){const Y=(F=(U=t.componentsOptions)==null?void 0:U.remoteCarets)==null?void 0:F.onUserChanged;o.doc.getRemoteUsers().on("change",ot=>{Y(o,ot)})}return(q=(J=t.componentsOptions)==null?void 0:J.templates)!=null&&q.templates.length&&(o.addListener("docChanged",()=>{g0(o)}),o.addListener("resize",()=>{g0(o,{reset:!0})}),setTimeout(()=>{g0(o)},100)),o.doc.registerCallback({onError:async Y=>{if(Y.code==="ResetDoc"){NA.error(`reset doc: ${Y.message}`);const ot=await Hu.load(r);o.doc.reset(ot)}}}),o.version="1.1.16-beta.4",o}function snt(n){return n.toJSON!==void 0}async function lnt(n,t,e){var o,s,l,c,d,h;p(NA,n,"app does not exists");const r=snt(t)?t:new _p(t,{serverUrl:e.serverUrl||""});e.lang&&D.setLang(e.lang),si.level=(o=e.logLevel)!=null?o:Us.DEBUG;const i=Su(n,r,{id:e.id,scrollContainer:e==null?void 0:e.scrollContainer,components:{blocks:[AE,kE,RE,Hk],commandProviders:[new pm],decorators:[new Hm,new eC],embeds:[...UA,...((s=e.components)==null?void 0:s.embeds)||[]],boxes:[nR,mS,P4,...((l=e.components)==null?void 0:l.boxes)||[]],insertions:[tp],blockHooks:[new KE,...((c=e.components)==null?void 0:c.blockHooks)||[]],textRenders:[new L4,new nE,...((d=e.components)==null?void 0:d.textRenders)||[]],options:{...e.componentsOptions}},shortcuts:[xE,e4,mE,Fh]});return i.editorCommandProviders.registerCommandProvider(new Si(i)),i.input.addHandler(new zm),i.input.addHandler(new wE(i,{hideTitle:e.hideTitle,headingLevel:1,titlePlaceholder:D.t("placeholder.common.title"),contentPlaceholder:D.t("placeholder.common.content"),readonlyTitlePlaceholder:D.t("placeholder.local.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),i.input.addHandler(new Um(i,(h=e.componentsOptions)==null?void 0:h.quickMenu)),i.input.addHandler(new GE(i)),i.input.addHandler(new JE(i)),i.input.addHandler(new Xm),i.addCustom("block-menu",C=>new gw(C)),ce.isMobile||i.addCustom("editor-tooltip",()=>new Om(i)),i.addCustom("image-paste-handler",()=>new zE(i)),e!=null&&e.enableComments&&i.addCustom("editor-comments",C=>new S4(C,new tet(C,r))),e.enableContextMenu!==!1&&i.addCustom("editor-context-menu",C=>new o4(C)),i.addCustom("heading-collapse",()=>new AA(i)),i.addListener("clickLink",(C,E,A)=>{var k;if((k=e==null?void 0:e.events)!=null&&k.onClickLink){e.events.onClickLink(C,E,A);return}const v=A.getAttribute("link");v&&(C.readonly||E.ctrlKey||E.metaKey)&&window.open(v,"_blank")}),i.addCustom(p0,C=>new yA(C)),Za.register(i),i.version="1.1.16-beta.4",i}async function ant(n,t,e){var h;const r=n.doc.externalDoc.client.auth,i=await Yh.load({auth:r,serverUrl:e});if(!((h=i.getVersionHelper)==null?void 0:h.call(i)))throw new Error("the editor does not support to show versions");const s=n.getCustom("create-options");if(!s)throw new Error("the editor does not support to show versions");const l=s.getData(),c=new WS(l),d=n.addCustom("version-dialog",()=>new tS(i,c));return d.show(t),d}b.tippy=h9,b.AnchorBox=$B,b.AuthError=Vu,b.AuthHeader=ll,b.AutoScroll=Xd,b.BaseURLHeader=Oa,b.BasicCommands=jV,b.BlockExclusiveHook=dw,b.BlockLockerHook=KE,b.BlockLockerPasteHandler=Xm,b.BlockResizer=mf,b.BrBox=PB,b.CodeBlock=kE,b.CodeLineBlock=RE,b.CodeTextDecorator=Hm,b.DOC_RE_AUTH_KEYS=p0,b.DefaultShortcuts=Fh,b.DocIdError=FN,b.DocReAuthCallbacks=yA,b.DragDrop=rv,b.DrawioEmbed=MS,b.EditorBlocks=m3,b.EditorBoxes=KB,b.EditorCommandProviders=NT,b.EditorComplexBlockPosition=Or,b.EditorComplexSelectionRange=hi,b.EditorDecorators=GB,b.EditorEmbeds=p3,b.EditorInsertions=zB,b.EditorSimpleBlockPosition=Qe,b.EditorSimpleSelectionRange=rn,b.EmbedBlock=E3,b.EmbedBlockResizer=Df,b.EnforceWithDocumentTitleHandler=wE,b.EventCallbacks=ua,b.FILL_CHAR=uM,b.FileExtError=KN,b.GroupOrder=qk,b.HeadingBlockScrollListener=ZQ,b.ImageBox=VB,b.InlineBoxCommandProvider=rR,b.InputtingInsertion=HB,b.LocalDoc=_p,b.LogLevel=Us,b.Logger=si,b.MIN_DISTANCE_THRESHOLD=ev,b.ManualCloseDialog=Gu,b.ManualMenu=ns,b.ManualToolbar=zu,b.MarkdownInputHandler=zm,b.MaxUserError=Gp,b.Mindmap=wm,b.OnesEditorAutoSuggest=BC,b.OnesEditorCustomDataWrapper=Fb,b.OnesEditorExclusiveBlock=ds,b.OnesEditorHoveringBlock=Be,b.OnesEditorIcons=yP,b.OnesEditorQuickMenu=Um,b.OnesEditorToc=Uf,b.OnesEditorTocProvider=Es,b.OnesEditorToolbar=Za,b.OnesEditorTooltip=Om,b.OnesEditorVersionsDialog=tS,b.PermissionError=Xh,b.Popup=ju,b.ReAuthToolbar=vS,b.RemoteCarets=By,b.RemoteCaretsDecorator=eC,b.RemoteCaretsInsertion=tp,b.RemoteUsers=Lu,b.RequestReloadError=$u,b.RichText=gn,b.ShareDBDoc=Hu,b.ShareDBDocVersionsProvider=WS,b.ShareDBServer=Yh,b.SimpleCache=Wb,b.StandardEmbedBlockCommands=uA,b.TEXT_STYLE_BACKGROUND_COLOR_PREFIX=_1,b.TEXT_STYLE_COLOR_PREFIX=D1,b.TableBlock=AE,b.TableBlockCommandProvider=pm,b.TableShortcuts=xE,b.TextBlock=On,b.TextBox=NB,b.TextColorItem=K2,b.TextStyleShortcuts=mE,b.TocEmbed=fS,b.ZERO_WIDTH_SPACE_CHAR=Gc,b.abbreviation=Yd,b.addAttribute=uh,b.addClass=z,b.addCommentToBlock=If,b.addDays=vI,b.addMetaToDoc=Ru,b.addMonths=bI,b.animateScrollTo=Ks,b.applyPlaceholderToBlock=df,b.assert=p,b.autoShowHideTemplates=g0,b.blockToDoc=Rp,b.blockToHtml=rp,b.blockToMarkdown=kh,b.blockToText=yh,b.blocksToDoc=sT,b.clearAllSelection=qv,b.clientType=ce,b.cloneBlock=Xo,b.cloneChildContainer=hp,b.cloneDoc=mp,b.cloneText=wB,b.commentToShareDbComment=tC,b.compareElement=Vd,b.comparePosition=g1,b.complexBlockAdjustSelectionPos=nh,b.complexBlockFindNearestChildBlock=x7,b.complexBlockGeFirstSimpleChild=C1,b.complexBlockGetAllChildContainers=hn,b.complexBlockGetBottomChildContainers=b3,b.complexBlockGetLastSimpleChild=Aa,b.complexBlockGetSelectedContainers=Ea,b.complexBlockGetTopChildContainers=x3,b.containerToDoc=lT,b.continuousScroll=Av,b.convertBlockFrom=th,b.convertImageFileToPng=ES,b.convertImageSrcToPng=BJ,b.converterIntercept=jm,b.copyBlockAttributes=i5,b.copyResourcesFromDoc=Dp,b.createBlockAnchor=Yi,b.createBlockCaretAnchor=B3,b.createBlockContentElement=qs,b.createBlockElement=Fv,b.createBlockSimpleDocRange=xh,b.createBlockSimpleRange=Te,b.createBoxContentElement=$v,b.createBoxElement=Kv,b.createBoxOp=RB,b.createChildContainer=d3,b.createComplexBlockPosition=Ae,b.createComplexDocPos=_B,b.createComplexDocRange=hM,b.createContainer=LB,b.createContainerElement=t1,b.createDeleteOps=BB,b.createEditor=Su,b.createEditorSelectionRange=Je,b.createElement=B,b.createEmptyContainer=eo,b.createEmptyDoc=to,b.createEmptyTextBlockData=Eh,b.createExpandedRange=Fd,b.createIconButton=Ns,b.createImage=Dg,b.createInsertOps=ph,b.createInsertionContentElement=zv,b.createInsertionElement=Hv,b.createLocalEditor=lnt,b.createOnesEditor=ont,b.createRange=qb,b.createRichText=rl,b.createRootContainer=f3,b.createSimpleBlockPosition=ct,b.createSimpleDocPos=DB,b.createTextBlockData=Ci,b.createTextButton=pl,b.createTextOp=pr,b.createTextWithReplaceSoftReturn=z1,b.daysAfter=Xg,b.deleteText=W1,b.diffDays=BI,b.disablePageScroll=Gg,b.docToHtml=ZB,b.docToHtmlFragment=xu,b.docToMarkdown=t5,b.docToText=qo,b.downloadImageToFile=bS,b.downloadObjectToFile=wA,b.downloadSvgToString=yS,b.editLink=rf,b.editorAddComment=nY,b.editorAddTextAttribute=g5,b.editorAutoInsertBlock=o5,b.editorBreakTextBlock=wa,b.editorClearCompositionText=lp,b.editorClearSelectedContents=Ih,b.editorCopyBlock=Lp,b.editorCopyDoc=Ph,b.editorDeleteBlock=up,b.editorDeleteBlockText=ap,b.editorDeleteBlockWithoutChildren=Sh,b.editorDeleteChildContainer=uU,b.editorDeleteChildContainers=s5,b.editorFocusToBlock=dp,b.editorFocusToEnd=SU,b.editorGetBlockData=Wo,b.editorGetBlockText=Tn,b.editorGetBlockTextEx=vh,b.editorGetBoxData=UB,b.editorHandleKeyboardEvent=AT,b.editorInsertBlock=Ra,b.editorInsertBoxToBlock=n5,b.editorInsertDoc=h5,b.editorInsertDocAt=gp,b.editorInsertText=sp,b.editorInsertTextToBlock=e5,b.editorInsertTextToBlockEx=op,b.editorMergeTextBlock=l5,b.editorMoveDown=w5,b.editorMoveEnd=vp,b.editorMoveHome=P5,b.editorMoveLeft=y5,b.editorMoveLineEnd=G5,b.editorMoveLineHome=z5,b.editorMovePageDown=J5,b.editorMovePageUp=Q5,b.editorMoveRight=k5,b.editorMoveUp=R5,b.editorMoveWordEnd=U5,b.editorMoveWordLeft=M5,b.editorRangeClearColor=C5,b.editorRangeGetColor=E5,b.editorRangeSetColor=p5,b.editorRemoveTextAttribute=mU,b.editorReplaceBlockText=Dh,b.editorReplaceContainer=m5,b.editorRunOnce=Mp,b.editorSelectAll=Tp,b.editorSelectContainer=Uh,b.editorSelectDown=S5,b.editorSelectEnd=Bp,b.editorSelectHome=F5,b.editorSelectLeft=L5,b.editorSelectLineEnd=j5,b.editorSelectLineHome=H5,b.editorSelectPageDown=eT,b.editorSelectPageUp=tT,b.editorSelectRight=I5,b.editorSelectUp=D5,b.editorSelectWordEnd=N5,b.editorSelectWordLeft=O5,b.editorSetTextColor=Sa,b.editorShowFindDialog=qq,b.editorToDocx=int,b.editorUpdateBlockData=_h,b.editorUpdateCompositionText=r5,b.editorUpdateEmbedData=f5,b.enablePageScroll=Wg,b.escapeHtmlText=Hd,b.escapeRegExp=Zg,b.escapeSpace=iI,b.exclusiveBlock=NE,b.executeBlockCommand=r3,b.executeEmbedBlockCommand=n3,b.executeRangeCommand=OT,b.fileToDataUrl=ma,b.findAfterOffsetNotType=Q1,b.findAllText=yp,b.findBlockByIndex=Lv,b.findEventTargetBlock=Qb,b.findInsertionById=jv,b.findNextOffset=DM,b.findNextVisibleSimpleBlock=VT,b.findPrevOffset=IM,b.findPrevOffsetNotType=Y1,b.findPrevSimpleBlockBeforeChildContainer=A3,b.findPrevVisibleSimpleBlock=KT,b.findTarget=da,b.findWordEnd=Z1,b.findWordLeft=J1,b.format=Zc,b.formatBytes=xv,b.formatDate=Qg,b.fragmentToHtml=mv,b.fromBase64=Xc,b.fromBase64ToBlob=jg,b.fromBase64ToUint8Array=gI,b.fromDocRange=Ho,b.fromNowString=Jg,b.genId=et,b.getAllChildBlocks=b1,b.getAllQuickMenuItems=hE,b.getAllSelectedBlocks=mi,b.getAttributesAt=Ba,b.getBlockBackground=Pv,b.getBlockByIndex=Ko,b.getBlockCaretRect=Vo,b.getBlockClass=Qt,b.getBlockClassByType=js,b.getBlockClientRects=Wi,b.getBlockCommandsWithHook=c1,b.getBlockContent=Pt,b.getBlockHeading=iu,b.getBlockId=lt,b.getBlockIndex=vt,b.getBlockInfo=Af,b.getBlockKind=_r,b.getBlockMinWidth=Yv,b.getBlockNearestRangeFromPoint=A1,b.getBlockOptions=OI,b.getBlockPath=$o,b.getBlockProperties=Zv,b.getBlockRangeFromPoint=rh,b.getBlockStyles=UI,b.getBlockTextLength=dt,b.getBlockTools=ie,b.getBlockType=_t,b.getBoxContent=i1,b.getBoxId=Vv,b.getBoxTypeFromElement=ru,b.getChildBlockCount=Dr,b.getChildBlocks=ue,b.getChildOffset=tl,b.getColorFromAttributes=U1,b.getColorFromContent=Qd,b.getComplexBlockClass=fr,b.getContainerBlockPath=a3,b.getContainerBlocks=Wv,b.getContainerBlocksElement=eu,b.getContainerById=ci,b.getContainerId=at,b.getContainerMinWidth=h1,b.getContainerToolsElement=DI,b.getContainerWidth=h3,b.getDistanceSquare=Fo,b.getElementOffset=zc,b.getElementScale=ur,b.getEmbedType=Xe,b.getExistsBlockTools=Jd,b.getExistsContainerById=tu,b.getFileExt=Jc,b.getFirstChildBlock=Re,b.getFirstClientRect=Kd,b.getHeadingBlockChildren=pa,b.getHeadingMenuOptions=cE,b.getHorizontalPadding=Mg,b.getInsertionContent=o1,b.getLastChildBlock=Me,b.getLastClientRect=Ps,b.getListAllNextBrothers=qa,b.getLogger=I,b.getNextBlock=Jt,b.getNextHiddenBlocks=s3,b.getNextValidOffset=el,b.getNextVisibleBlock=hr,b.getOffsetFromPoint=_g,b.getOffsetInfoAfter=Cu,b.getOffsetInfoBefore=Bh,b.getOpAt=rB,b.getOpLength=ch,b.getParentBlock=Z,b.getParentBlockExcludeSelf=Ws,b.getParentBox=r1,b.getParentContainer=it,b.getPrevBlock=Ue,b.getPrevValidOffset=Go,b.getPrevVisibleBlock=dr,b.getRangeCommands=MT,b.getReferenceClientRect=Ak,b.getRootBlock=a1,b.getScrollContainer=qe,b.getSpecialBlockCommands=t3,b.getStandardEmbedBlockProperties=fA,b.getTextAfterOffset=SM,b.getTextAttributes=ip,b.getTextBeforeOffset=LM,b.getTextBlockChild=lu,b.getTextBlockClass=Dv,b.getTextBlockContentChildTextLength=gr,b.getTextBlockContentChildType=l3,b.getTextBlockContentChildren=fi,b.getTextLength=mn,b.getTextOpLength=I1,b.getTextWidth=Gd,b.getToolbar=vm,b.handleBlockElementUpdated=Qv,b.hasAltOnly=uI,b.hasClass=St,b.hasCtrlOrCmd=cv,b.hasCtrlOrCmdOnly=cI,b.hashCode=Rv,b.hideBlock=Nv,b.htmlToFragment=zd,b.i18n=D,b.includeBigTable=eF,b.injectDocToHtmlFragment=ku,b.injectStyle=tv,b.inputActions=XU,b.insertEmptyBlock=FI,b.insertEmptyEmbedBlock=u1,b.insertText=Zi,b.intersectionCommands=wO,b.isBackspace=fv,b.isBlock=zs,b.isBlockLocked=qm,b.isBlockLockedByOthers=FE,b.isBlockLockedBySelf=xf,b.isBlockTools=Ov,b.isBox=Zd,b.isBoxOp=zo,b.isCJK=lv,b.isChildContainer=Ur,b.isChildNode=re,b.isCodeBlock=Wr,b.isCollapsedHeadingBlock=ui,b.isCollapsedRange=dM,b.isComplexBlockPosition=Ca,b.isComplexKindBlock=Ut,b.isContainer=Gi,b.isContainerSelectedAllChildBlocks=nT,b.isControlEvent=$s,b.isDelete=dI,b.isDraggingFiles=Wd,b.isElementVisible=Pg,b.isEmbedBlock=pe,b.isEmptyContainer=au,b.isEmptyDoc=q1,b.isEmptyTextBlock=fe,b.isEmptyTextBlockWithoutCompositionText=ff,b.isEnterOnly=uv,b.isEscape=$g,b.isExclusiveBlock=Ef,b.isExpandedHeadingBlock=o3,b.isFirefox=qc,b.isFirstChildBlockInComplexBlock=A7,b.isHeadingBlock=Ye,b.isHighSurrogate=tI,b.isInBlock=s1,b.isInBlockTools=Xs,b.isLetter=sv,b.isLowSurrogate=eI,b.isMatchShortcut=li,b.isMoveForward=lI,b.isNavigationEvent=sI,b.isNavigationKey=av,b.isNodeRemoved=Ug,b.isNumber=ov,b.isPrintableKey=Vg,b.isRootBlock=mr,b.isRootContainer=qt,b.isSafari=ha,b.isSameDay=Yg,b.isSelectBoxOnly=jk,b.isShiftEnter=fI,b.isShiftTab=mI,b.isShortcutEvent=aI,b.isSimpleBlock=MI,b.isSimpleBlockPosition=di,b.isSimplePos=IB,b.isSimpleRange=Ah,b.isSpace=jd,b.isTab=hI,b.isTextBlockContentBoxChild=Yn,b.isTextBlockContentChild=ou,b.isTextBlockContentInsertionChild=Xi,b.isTextBlockContentTextChild=su,b.isTextKindBlock=rt,b.isTextKindBlockType=nu,b.isTitleBlock=zi,b.isToday=bv,b.isValidOffset=Un,b.isVisibleBlock=Gs,b.isYesterday=vv,b.loadJs=Yb,b.loadJsPromise=Fs,b.lockers=Ir,b.mergeCommands=bm,b.mergeDocs=il,b.mergeOps=G1,b.mergeText=aM,b.multiSplitText=oB,b.overflowText=Bv,b.parseShortcut=dv,b.patchNode=Yc,b.pointInRect=Vs,b.rangeAddAttribute=hu,b.rangeGetTextColor=dB,b.rangeRemoveAttribute=va,b.rangeSetTextColor=cB,b.rangeTransformText=lB,b.registerDragDrop=Fg,b.removeAttribute=M1,b.removeClass=st,b.removeLastBr=iM,b.removePlaceholderFromBlock=PR,b.removeStyle=Zb,b.replaceAll=TI,b.replaceAllCaseInsensitive=yI,b.replaceAllText=iT,b.replaceText=Ch,b.requestDownload=qd,b.resetListStart=Ya,b.scrollIntoView=Au,b.scrollable=Ev,b.selectFile=ga,b.selectedBlockToDoc=Oh,b.selectionToDoc=La,b.setAttributes=$d,b.setClipboardData=Qc,b.setClipboardDataByEvent=EI,b.setColorToAttributes=uB,b.setDataset=Og,b.setDefaultCursor=Wc,b.setStyles=Ng,b.shareDBCommentToDocObject=Zp,b.shareDBDocCommentToComment=by,b.shortcutToDisplayText=We,b.showBlock=n1,b.showDocVersions=ant,b.splitText=_n,b.splitToThree=Ze,b.stringToDataUrl=zg,b.stringToObjectUrl=qg,b.subText=sB,b.textNodeOffsetFromPoint=Xb,b.titleFromEditor=xS,b.toBase64URL=ai,b.toMindmap=Rm,b.toPlainText=de,b.toPlainTextKeepLength=X1,b.trimChar=Kg,b.unexclusiveBlock=PE,b.unicodeLength=nI,b.unicodeSubstr=rI,b.updateBlockSelection=Xv,b.updateOpAttributes=SB,b.updateTextBlockContent=wM,b.updateUrl=Hg;for(const n in ve)n!=="default"&&!b.hasOwnProperty(n)&&Object.defineProperty(b,n,{enumerable:!0,get:()=>ve[n]});Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|