@ylzcc/editor 0.2.13 → 0.2.14
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/editor.es.js +0 -7
- package/dist/editor.umd.js +1 -1
- package/package.json +1 -1
package/dist/editor.es.js
CHANGED
|
@@ -84536,13 +84536,6 @@ const CodeBlockView = ({ editor: Ff, node: kh, updateAttributes: x_, extension:
|
|
|
84536
84536
|
kh && clearTimeout(kh);
|
|
84537
84537
|
const { editor: nme, tip: rme } = Ff;
|
|
84538
84538
|
nme.isEditable && (kh = setTimeout(() => {
|
|
84539
|
-
var ume, sme;
|
|
84540
|
-
const ime = document.querySelectorAll(".ant-modal-content");
|
|
84541
|
-
if (console.log("🚀 modalList.length:", ime.length), ime.length > 0)
|
|
84542
|
-
return !1;
|
|
84543
|
-
const ome = (sme = (ume = nme == null ? void 0 : nme.view) == null ? void 0 : ume.state) == null ? void 0 : sme.selection, { from: ame, to: cme } = ome;
|
|
84544
|
-
if (console.log("🚀 from:", ame, cme), ame != cme)
|
|
84545
|
-
return !1;
|
|
84546
84539
|
rme == null || rme.move(eme, tme);
|
|
84547
84540
|
}, 0));
|
|
84548
84541
|
},
|
package/dist/editor.umd.js
CHANGED
|
@@ -403,7 +403,7 @@ html body {
|
|
|
403
403
|
`,SIZING_STYLE=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],computedStyleCache={},hiddenTextarea;function calculateNodeStyling(Ff){var kh=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x_=Ff.getAttribute("id")||Ff.getAttribute("data-reactid")||Ff.getAttribute("name");if(kh&&computedStyleCache[x_])return computedStyleCache[x_];var B_=window.getComputedStyle(Ff),$_=B_.getPropertyValue("box-sizing")||B_.getPropertyValue("-moz-box-sizing")||B_.getPropertyValue("-webkit-box-sizing"),$P=parseFloat(B_.getPropertyValue("padding-bottom"))+parseFloat(B_.getPropertyValue("padding-top")),zP=parseFloat(B_.getPropertyValue("border-bottom-width"))+parseFloat(B_.getPropertyValue("border-top-width")),eme=SIZING_STYLE.map(function(nme){return"".concat(nme,":").concat(B_.getPropertyValue(nme))}).join(";"),tme={sizingStyle:eme,paddingSize:$P,borderSize:zP,boxSizing:$_};return kh&&x_&&(computedStyleCache[x_]=tme),tme}function calculateAutoSizeStyle(Ff){var kh=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,B_=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;hiddenTextarea||(hiddenTextarea=document.createElement("textarea"),hiddenTextarea.setAttribute("tab-index","-1"),hiddenTextarea.setAttribute("aria-hidden","true"),document.body.appendChild(hiddenTextarea)),Ff.getAttribute("wrap")?hiddenTextarea.setAttribute("wrap",Ff.getAttribute("wrap")):hiddenTextarea.removeAttribute("wrap");var $_=calculateNodeStyling(Ff,kh),$P=$_.paddingSize,zP=$_.borderSize,eme=$_.boxSizing,tme=$_.sizingStyle;hiddenTextarea.setAttribute("style","".concat(tme,";").concat(HIDDEN_TEXTAREA_STYLE)),hiddenTextarea.value=Ff.value||Ff.placeholder||"";var nme=void 0,rme=void 0,ime,ome=hiddenTextarea.scrollHeight;if(eme==="border-box"?ome+=zP:eme==="content-box"&&(ome-=$P),x_!==null||B_!==null){hiddenTextarea.value=" ";var ame=hiddenTextarea.scrollHeight-$P;x_!==null&&(nme=ame*x_,eme==="border-box"&&(nme=nme+$P+zP),ome=Math.max(nme,ome)),B_!==null&&(rme=ame*B_,eme==="border-box"&&(rme=rme+$P+zP),ime=ome>rme?"":"hidden",ome=Math.min(rme,ome))}var cme={height:ome,overflowY:ime,resize:"none"};return nme&&(cme.minHeight=nme),rme&&(cme.maxHeight=rme),cme}var _excluded$1=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],RESIZE_START=0,RESIZE_MEASURING=1,RESIZE_STABLE=2,ResizableTextArea=React__namespace.forwardRef(function(Ff,kh){var x_=Ff,B_=x_.prefixCls;x_.onPressEnter;var $_=x_.defaultValue,$P=x_.value,zP=x_.autoSize,eme=x_.onResize,tme=x_.className,nme=x_.style,rme=x_.disabled,ime=x_.onChange,ome=x_.onInternalAutoSize,ame=_objectWithoutProperties(x_,_excluded$1),cme=useMergedState($_,{value:$P,postState:function(xme){return xme??""}}),ume=_slicedToArray(cme,2),sme=ume[0],lme=ume[1],dme=function(xme){lme(xme.target.value),ime==null||ime(xme)},fme=React__namespace.useRef();React__namespace.useImperativeHandle(kh,function(){return{textArea:fme.current}});var pme=React__namespace.useMemo(function(){return zP&&_typeof(zP)==="object"?[zP.minRows,zP.maxRows]:[]},[zP]),hme=_slicedToArray(pme,2),mme=hme[0],_me=hme[1],gme=!!zP,vme=function(){try{if(document.activeElement===fme.current){var xme=fme.current,Nme=xme.selectionStart,Cme=xme.selectionEnd,Ime=xme.scrollTop;fme.current.setSelectionRange(Nme,Cme),fme.current.scrollTop=Ime}}catch{}},Sme=React__namespace.useState(RESIZE_STABLE),Eme=_slicedToArray(Sme,2),bme=Eme[0],Rme=Eme[1],Ome=React__namespace.useState(),Pme=_slicedToArray(Ome,2),Lme=Pme[0],Mme=Pme[1],yme=function(){Rme(RESIZE_START),process.env.NODE_ENV==="test"&&(ome==null||ome())};useLayoutEffect$1(function(){gme&&yme()},[$P,mme,_me,gme]),useLayoutEffect$1(function(){if(bme===RESIZE_START)Rme(RESIZE_MEASURING);else if(bme===RESIZE_MEASURING){var wme=calculateAutoSizeStyle(fme.current,!1,mme,_me);Rme(RESIZE_STABLE),Mme(wme)}else vme()},[bme]);var kme=React__namespace.useRef(),Tme=function(){wrapperRaf.cancel(kme.current)},Dme=function(xme){bme===RESIZE_STABLE&&(eme==null||eme(xme),zP&&(Tme(),kme.current=wrapperRaf(function(){yme()})))};React__namespace.useEffect(function(){return Tme},[]);var Fme=gme?Lme:null,Ame=_objectSpread2(_objectSpread2({},nme),Fme);return(bme===RESIZE_START||bme===RESIZE_MEASURING)&&(Ame.overflowY="hidden",Ame.overflowX="hidden"),React__namespace.createElement(RefResizeObserver,{onResize:Dme,disabled:!(zP||eme)},React__namespace.createElement("textarea",_extends$1({},ame,{ref:fme,style:Ame,className:classNames(B_,tme,_defineProperty({},"".concat(B_,"-disabled"),rme)),disabled:rme,value:sme,onChange:dme})))}),_excluded=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize"],TextArea$2=React.forwardRef(function(Ff,kh){var x_,B_,$_=Ff.defaultValue,$P=Ff.value,zP=Ff.onFocus,eme=Ff.onBlur,tme=Ff.onChange,nme=Ff.allowClear,rme=Ff.maxLength,ime=Ff.onCompositionStart,ome=Ff.onCompositionEnd,ame=Ff.suffix,cme=Ff.prefixCls,ume=cme===void 0?"rc-textarea":cme,sme=Ff.showCount,lme=Ff.count,dme=Ff.className,fme=Ff.style,pme=Ff.disabled,hme=Ff.hidden,mme=Ff.classNames,_me=Ff.styles,gme=Ff.onResize,vme=_objectWithoutProperties(Ff,_excluded),Sme=useMergedState($_,{value:$P,defaultValue:$_}),Eme=_slicedToArray(Sme,2),bme=Eme[0],Rme=Eme[1],Ome=bme==null?"":String(bme),Pme=React.useState(!1),Lme=_slicedToArray(Pme,2),Mme=Lme[0],yme=Lme[1],kme=React.useRef(!1),Tme=React.useState(null),Dme=_slicedToArray(Tme,2),Fme=Dme[0],Ame=Dme[1],wme=React.useRef(null),xme=function(){var y_e;return(y_e=wme.current)===null||y_e===void 0?void 0:y_e.textArea},Nme=function(){xme().focus()};React.useImperativeHandle(kh,function(){return{resizableTextArea:wme.current,focus:Nme,blur:function(){xme().blur()}}}),React.useEffect(function(){yme(function(o_e){return!pme&&o_e})},[pme]);var Cme=React.useState(null),Ime=_slicedToArray(Cme,2),Bme=Ime[0],$me=Ime[1];React.useEffect(function(){if(Bme){var o_e;(o_e=xme()).setSelectionRange.apply(o_e,_toConsumableArray(Bme))}},[Bme]);var Ume=useCount(lme,sme),Vme=(x_=Ume.max)!==null&&x_!==void 0?x_:rme,Wme=Number(Vme)>0,zme=Ume.strategy(Ome),Kme=!!Vme&&zme>Vme,u_e=function(y_e,A_e){var N_e=A_e;!kme.current&&Ume.exceedFormatter&&Ume.max&&Ume.strategy(A_e)>Ume.max&&(N_e=Ume.exceedFormatter(A_e,{max:Ume.max}),A_e!==N_e&&$me([xme().selectionStart||0,xme().selectionEnd||0])),Rme(N_e),resolveOnChange(y_e.currentTarget,y_e,tme,N_e)},Zme=function(y_e){kme.current=!0,ime==null||ime(y_e)},T_e=function(y_e){kme.current=!1,u_e(y_e,y_e.currentTarget.value),ome==null||ome(y_e)},l_e=function(y_e){u_e(y_e,y_e.target.value)},g_e=function(y_e){var A_e=vme.onPressEnter,N_e=vme.onKeyDown;y_e.key==="Enter"&&A_e&&A_e(y_e),N_e==null||N_e(y_e)},E_e=function(y_e){yme(!0),zP==null||zP(y_e)},p_e=function(y_e){yme(!1),eme==null||eme(y_e)},t_e=function(y_e){Rme(""),Nme(),resolveOnChange(xme(),y_e,tme)},i_e=ame,b_e;Ume.show&&(Ume.showFormatter?b_e=Ume.showFormatter({value:Ome,count:zme,maxLength:Vme}):b_e="".concat(zme).concat(Wme?" / ".concat(Vme):""),i_e=React.createElement(React.Fragment,null,i_e,React.createElement("span",{className:classNames("".concat(ume,"-data-count"),mme==null?void 0:mme.count),style:_me==null?void 0:_me.count},b_e)));var x_e=function(y_e){var A_e;gme==null||gme(y_e),(A_e=xme())!==null&&A_e!==void 0&&A_e.style.height&&Ame(!0)},qme=!vme.autoSize&&!sme&&!nme;return React.createElement(BaseInput,{value:Ome,allowClear:nme,handleReset:t_e,suffix:i_e,prefixCls:ume,classNames:_objectSpread2(_objectSpread2({},mme),{},{affixWrapper:classNames(mme==null?void 0:mme.affixWrapper,(B_={},_defineProperty(B_,"".concat(ume,"-show-count"),sme),_defineProperty(B_,"".concat(ume,"-textarea-allow-clear"),nme),B_))}),disabled:pme,focused:Mme,className:classNames(dme,Kme&&"".concat(ume,"-out-of-range")),style:_objectSpread2(_objectSpread2({},fme),Fme&&!qme?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof b_e=="string"?b_e:void 0}},hidden:hme},React.createElement(ResizableTextArea,_extends$1({},vme,{maxLength:rme,onKeyDown:g_e,onChange:l_e,onFocus:E_e,onBlur:p_e,onCompositionStart:Zme,onCompositionEnd:T_e,className:classNames(mme==null?void 0:mme.textarea),style:_objectSpread2(_objectSpread2({},_me==null?void 0:_me.textarea),{},{resize:fme==null?void 0:fme.resize}),disabled:pme,prefixCls:ume,onResize:x_e,ref:wme})))}),__rest$4=function(Ff,kh){var x_={};for(var B_ in Ff)Object.prototype.hasOwnProperty.call(Ff,B_)&&kh.indexOf(B_)<0&&(x_[B_]=Ff[B_]);if(Ff!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $_=0,B_=Object.getOwnPropertySymbols(Ff);$_<B_.length;$_++)kh.indexOf(B_[$_])<0&&Object.prototype.propertyIsEnumerable.call(Ff,B_[$_])&&(x_[B_[$_]]=Ff[B_[$_]]);return x_};const TextArea=React.forwardRef((Ff,kh)=>{var x_,B_;const{prefixCls:$_,bordered:$P=!0,size:zP,disabled:eme,status:tme,allowClear:nme,classNames:rme,rootClassName:ime,className:ome,style:ame,styles:cme,variant:ume}=Ff,sme=__rest$4(Ff,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:Tme}=devUseWarning("TextArea");Tme(!("bordered"in Ff),"bordered","variant")}const{getPrefixCls:lme,direction:dme,textArea:fme}=React__namespace.useContext(ConfigContext),pme=useSize(zP),hme=React__namespace.useContext(DisabledContext$1),mme=eme??hme,{status:_me,hasFeedback:gme,feedbackIcon:vme}=React__namespace.useContext(FormItemInputContext),Sme=getMergedStatus(_me,tme),Eme=React__namespace.useRef(null);React__namespace.useImperativeHandle(kh,()=>{var Tme;return{resizableTextArea:(Tme=Eme.current)===null||Tme===void 0?void 0:Tme.resizableTextArea,focus:Dme=>{var Fme,Ame;triggerFocus((Ame=(Fme=Eme.current)===null||Fme===void 0?void 0:Fme.resizableTextArea)===null||Ame===void 0?void 0:Ame.textArea,Dme)},blur:()=>{var Dme;return(Dme=Eme.current)===null||Dme===void 0?void 0:Dme.blur()}}});const bme=lme("input",$_),Rme=useCSSVarCls(bme),[Ome,Pme,Lme]=useStyle$1(bme,Rme),[Mme,yme]=useVariant(ume,$P),kme=getAllowClear$1(nme??(fme==null?void 0:fme.allowClear));return Ome(React__namespace.createElement(TextArea$2,Object.assign({autoComplete:fme==null?void 0:fme.autoComplete},sme,{style:Object.assign(Object.assign({},fme==null?void 0:fme.style),ame),styles:Object.assign(Object.assign({},fme==null?void 0:fme.styles),cme),disabled:mme,allowClear:kme,className:classNames(Lme,Rme,ome,ime,fme==null?void 0:fme.className),classNames:Object.assign(Object.assign(Object.assign({},rme),fme==null?void 0:fme.classNames),{textarea:classNames({[`${bme}-sm`]:pme==="small",[`${bme}-lg`]:pme==="large"},Pme,rme==null?void 0:rme.textarea,(x_=fme==null?void 0:fme.classNames)===null||x_===void 0?void 0:x_.textarea),variant:classNames({[`${bme}-${Mme}`]:yme},getStatusClassNames(bme,Sme)),affixWrapper:classNames(`${bme}-textarea-affix-wrapper`,{[`${bme}-affix-wrapper-rtl`]:dme==="rtl",[`${bme}-affix-wrapper-sm`]:pme==="small",[`${bme}-affix-wrapper-lg`]:pme==="large",[`${bme}-textarea-show-count`]:Ff.showCount||((B_=Ff.count)===null||B_===void 0?void 0:B_.show)},Pme)}),prefixCls:bme,suffix:gme&&React__namespace.createElement("span",{className:`${bme}-textarea-suffix`},vme),ref:Eme})))}),TextArea$1=TextArea,Input=InternalInput;process.env.NODE_ENV!=="production"&&(Input.displayName="Input"),Input.Group=Group$1,Input.Search=Search$1,Input.TextArea=TextArea$1,Input.Password=Password$1;const Input$1=Input;function isPresetSize(Ff){return["small","middle","large"].includes(Ff)}function isValidGapNumber(Ff){return Ff?typeof Ff=="number"&&!Number.isNaN(Ff):!1}const SpaceContext=React.createContext({latestIndex:0}),SpaceContextProvider=SpaceContext.Provider,Item=Ff=>{let{className:kh,index:x_,children:B_,split:$_,style:$P}=Ff;const{latestIndex:zP}=React__namespace.useContext(SpaceContext);return B_==null?null:React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{className:kh,style:$P},B_),x_<zP&&$_&&React__namespace.createElement("span",{className:`${kh}-split`},$_))},Item$1=Item;var __rest$3=function(Ff,kh){var x_={};for(var B_ in Ff)Object.prototype.hasOwnProperty.call(Ff,B_)&&kh.indexOf(B_)<0&&(x_[B_]=Ff[B_]);if(Ff!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $_=0,B_=Object.getOwnPropertySymbols(Ff);$_<B_.length;$_++)kh.indexOf(B_[$_])<0&&Object.prototype.propertyIsEnumerable.call(Ff,B_[$_])&&(x_[B_[$_]]=Ff[B_[$_]]);return x_};const Space=React__namespace.forwardRef((Ff,kh)=>{var x_,B_;const{getPrefixCls:$_,space:$P,direction:zP}=React__namespace.useContext(ConfigContext),{size:eme=($P==null?void 0:$P.size)||"small",align:tme,className:nme,rootClassName:rme,children:ime,direction:ome="horizontal",prefixCls:ame,split:cme,style:ume,wrap:sme=!1,classNames:lme,styles:dme}=Ff,fme=__rest$3(Ff,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[pme,hme]=Array.isArray(eme)?eme:[eme,eme],mme=isPresetSize(hme),_me=isPresetSize(pme),gme=isValidGapNumber(hme),vme=isValidGapNumber(pme),Sme=toArray$4(ime,{keepEmpty:!0}),Eme=tme===void 0&&ome==="horizontal"?"center":tme,bme=$_("space",ame),[Rme,Ome,Pme]=useStyle$7(bme),Lme=classNames(bme,$P==null?void 0:$P.className,Ome,`${bme}-${ome}`,{[`${bme}-rtl`]:zP==="rtl",[`${bme}-align-${Eme}`]:Eme,[`${bme}-gap-row-${hme}`]:mme,[`${bme}-gap-col-${pme}`]:_me},nme,rme,Pme),Mme=classNames(`${bme}-item`,(x_=lme==null?void 0:lme.item)!==null&&x_!==void 0?x_:(B_=$P==null?void 0:$P.classNames)===null||B_===void 0?void 0:B_.item);let yme=0;const kme=Sme.map((Fme,Ame)=>{var wme,xme;Fme!=null&&(yme=Ame);const Nme=Fme&&Fme.key||`${Mme}-${Ame}`;return React__namespace.createElement(Item$1,{className:Mme,key:Nme,index:Ame,split:cme,style:(wme=dme==null?void 0:dme.item)!==null&&wme!==void 0?wme:(xme=$P==null?void 0:$P.styles)===null||xme===void 0?void 0:xme.item},Fme)}),Tme=React__namespace.useMemo(()=>({latestIndex:yme}),[yme]);if(Sme.length===0)return null;const Dme={};return sme&&(Dme.flexWrap="wrap"),!_me&&vme&&(Dme.columnGap=pme),!mme&&gme&&(Dme.rowGap=hme),Rme(React__namespace.createElement("div",Object.assign({ref:kh,className:Lme,style:Object.assign(Object.assign(Object.assign({},Dme),$P==null?void 0:$P.style),ume)},fme),React__namespace.createElement(SpaceContextProvider,{value:Tme},kme)))});process.env.NODE_ENV!=="production"&&(Space.displayName="Space");const CompoundedSpace=Space;CompoundedSpace.Compact=Compact;const Space$1=CompoundedSpace;var __rest$2=function(Ff,kh){var x_={};for(var B_ in Ff)Object.prototype.hasOwnProperty.call(Ff,B_)&&kh.indexOf(B_)<0&&(x_[B_]=Ff[B_]);if(Ff!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $_=0,B_=Object.getOwnPropertySymbols(Ff);$_<B_.length;$_++)kh.indexOf(B_[$_])<0&&Object.prototype.propertyIsEnumerable.call(Ff,B_[$_])&&(x_[B_[$_]]=Ff[B_[$_]]);return x_};const DropdownButton=Ff=>{const{getPopupContainer:kh,getPrefixCls:x_,direction:B_}=React__namespace.useContext(ConfigContext),{prefixCls:$_,type:$P="default",danger:zP,disabled:eme,loading:tme,onClick:nme,htmlType:rme,children:ime,className:ome,menu:ame,arrow:cme,autoFocus:ume,overlay:sme,trigger:lme,align:dme,open:fme,onOpenChange:pme,placement:hme,getPopupContainer:mme,href:_me,icon:gme=React__namespace.createElement(EllipsisOutlined$1,null),title:vme,buttonsRender:Sme=Ime=>Ime,mouseEnterDelay:Eme,mouseLeaveDelay:bme,overlayClassName:Rme,overlayStyle:Ome,destroyPopupOnHide:Pme,dropdownRender:Lme}=Ff,Mme=__rest$2(Ff,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),yme=x_("dropdown",$_),kme=`${yme}-button`,Tme={menu:ame,arrow:cme,autoFocus:ume,align:dme,disabled:eme,trigger:eme?[]:lme,onOpenChange:pme,getPopupContainer:mme||kh,mouseEnterDelay:Eme,mouseLeaveDelay:bme,overlayClassName:Rme,overlayStyle:Ome,destroyPopupOnHide:Pme,dropdownRender:Lme},{compactSize:Dme,compactItemClassnames:Fme}=useCompactItemContext(yme,B_),Ame=classNames(kme,Fme,ome);"overlay"in Ff&&(Tme.overlay=sme),"open"in Ff&&(Tme.open=fme),"placement"in Ff?Tme.placement=hme:Tme.placement=B_==="rtl"?"bottomLeft":"bottomRight";const wme=React__namespace.createElement(Button$1,{type:$P,danger:zP,disabled:eme,loading:tme,onClick:nme,htmlType:rme,href:_me,title:vme},ime),xme=React__namespace.createElement(Button$1,{type:$P,danger:zP,icon:gme}),[Nme,Cme]=Sme([wme,xme]);return React__namespace.createElement(Space$1.Compact,Object.assign({className:Ame,size:Dme,block:!0},Mme),Nme,React__namespace.createElement(InternalDropdown,Object.assign({},Tme),Cme))};DropdownButton.__ANT_BUTTON=!0;const DropdownButton$1=DropdownButton,Dropdown=InternalDropdown;Dropdown.Button=DropdownButton$1;const Dropdown$1=Dropdown;let message=null,act=Ff=>Ff(),taskQueue=[],defaultGlobalConfig={};function getGlobalContext(){const{getContainer:Ff,duration:kh,rtl:x_,maxCount:B_,top:$_}=defaultGlobalConfig,$P=(Ff==null?void 0:Ff())||document.body;return{getContainer:()=>$P,duration:kh,rtl:x_,maxCount:B_,top:$_}}const GlobalHolder=React.forwardRef((Ff,kh)=>{const{messageConfig:x_,sync:B_}=Ff,{getPrefixCls:$_}=React.useContext(ConfigContext),$P=defaultGlobalConfig.prefixCls||$_("message"),zP=React.useContext(AppConfigContext),[eme,tme]=useInternalMessage(Object.assign(Object.assign(Object.assign({},x_),{prefixCls:$P}),zP.message));return React.useImperativeHandle(kh,()=>{const nme=Object.assign({},eme);return Object.keys(nme).forEach(rme=>{nme[rme]=function(){return B_(),eme[rme].apply(eme,arguments)}}),{instance:nme,sync:B_}}),tme}),GlobalHolderWrapper=React.forwardRef((Ff,kh)=>{const[x_,B_]=React.useState(getGlobalContext),$_=()=>{B_(getGlobalContext)};React.useEffect($_,[]);const $P=globalConfig(),zP=$P.getRootPrefixCls(),eme=$P.getIconPrefixCls(),tme=$P.getTheme(),nme=React.createElement(GlobalHolder,{ref:kh,sync:$_,messageConfig:x_});return React.createElement(ConfigProvider,{prefixCls:zP,iconPrefixCls:eme,theme:tme},$P.holderRender?$P.holderRender(nme):nme)});function flushNotice(){if(!message){const Ff=document.createDocumentFragment(),kh={fragment:Ff};message=kh,act(()=>{render(React.createElement(GlobalHolderWrapper,{ref:x_=>{const{instance:B_,sync:$_}=x_||{};Promise.resolve().then(()=>{!kh.instance&&B_&&(kh.instance=B_,kh.sync=$_,flushNotice())})}}),Ff)});return}message.instance&&(taskQueue.forEach(Ff=>{const{type:kh,skipped:x_}=Ff;if(!x_)switch(kh){case"open":{act(()=>{const B_=message.instance.open(Object.assign(Object.assign({},defaultGlobalConfig),Ff.config));B_==null||B_.then(Ff.resolve),Ff.setCloseFn(B_)});break}case"destroy":act(()=>{message==null||message.instance.destroy(Ff.key)});break;default:act(()=>{var B_;const $_=(B_=message.instance)[kh].apply(B_,_toConsumableArray(Ff.args));$_==null||$_.then(Ff.resolve),Ff.setCloseFn($_)})}}),taskQueue=[])}function setMessageGlobalConfig(Ff){defaultGlobalConfig=Object.assign(Object.assign({},defaultGlobalConfig),Ff),act(()=>{var kh;(kh=message==null?void 0:message.sync)===null||kh===void 0||kh.call(message)})}function open(Ff){const kh=wrapPromiseFn(x_=>{let B_;const $_={type:"open",config:Ff,resolve:x_,setCloseFn:$P=>{B_=$P}};return taskQueue.push($_),()=>{B_?act(()=>{B_()}):$_.skipped=!0}});return flushNotice(),kh}function typeOpen(Ff,kh){const x_=globalConfig();process.env.NODE_ENV!=="production"&&!x_.holderRender&&warnContext("message");const B_=wrapPromiseFn($_=>{let $P;const zP={type:Ff,args:kh,resolve:$_,setCloseFn:eme=>{$P=eme}};return taskQueue.push(zP),()=>{$P?act(()=>{$P()}):zP.skipped=!0}});return flushNotice(),B_}function destroy(Ff){taskQueue.push({type:"destroy",key:Ff}),flushNotice()}const methods=["success","info","warning","error","loading"],baseStaticMethods={open,destroy,config:setMessageGlobalConfig,useMessage,_InternalPanelDoNotUseOrYouWillBeFired:PurePanel$5},staticMethods=baseStaticMethods;methods.forEach(Ff=>{staticMethods[Ff]=function(){for(var kh=arguments.length,x_=new Array(kh),B_=0;B_<kh;B_++)x_[B_]=arguments[B_];return typeOpen(Ff,x_)}}),process.env.NODE_ENV,process.env.NODE_ENV;const setAlign=Ff=>{if(Ff!=null&&Ff.isActive({textAlign:"left"}))return"left";if(Ff!=null&&Ff.isActive({textAlign:"center"}))return"center";if(Ff!=null&&Ff.isActive({textAlign:"right"}))return"right"},textDropDown=Ff=>[{label:jsxRuntimeExports.jsxs("div",{className:"MenuProps-item",children:[jsxRuntimeExports.jsxs("div",{className:"MenuProps-item-left",children:[jsxRuntimeExports.jsx("div",{style:{width:"16px",height:"16px"},className:Ff!=null&&Ff.isActive("paragraph")?"":"MenuProps-item-left-svg",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:Ff!=null&&Ff.isActive("paragraph")?"#1677FF":"#999999",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 4.00033V14.0003H7.33398V4.00033H3.33398V2.66699H12.6673V4.00033H8.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:Ff!=null&&Ff.isActive("paragraph")?"":"MenuProps-item-left-text",style:{fontSize:"13px",marginLeft:"16px",color:Ff!=null&&Ff.isActive("paragraph")?"#1677FF":"#666666"},children:"文本"})]}),(Ff==null?void 0:Ff.isActive("paragraph"))&&jsxRuntimeExports.jsx("div",{style:{height:"16px",width:"16px"},children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.11535 11.422C6.97707 11.422 6.83801 11.3744 6.72488 11.2772L3.67347 8.65437C3.42254 8.43859 3.39394 8.06015 3.60957 7.80922C3.82535 7.55828 4.20379 7.52969 4.45472 7.74531L7.50613 10.3681C7.75707 10.5839 7.78566 10.9623 7.57004 11.2133C7.4516 11.3512 7.28394 11.422 7.11535 11.422Z",fill:"#1677FF"}),jsxRuntimeExports.jsx("path",{d:"M7.34114 11.4222C7.20817 11.4222 7.07442 11.3782 6.96332 11.2879C6.70661 11.079 6.6677 10.7015 6.87661 10.4447L11.4694 4.79834C11.6783 4.54146 12.0558 4.50271 12.3125 4.71162C12.5693 4.92052 12.6082 5.29802 12.3993 5.55474L7.80645 11.2011C7.68801 11.3466 7.5152 11.4222 7.34114 11.4222Z",fill:"#1677FF"})]})})]}),key:"paragraph",onClick:()=>{var x_,B_,$_,$P;const kh=setAlign(Ff)??"left";($P=($_=(B_=(x_=Ff==null?void 0:Ff.chain())==null?void 0:x_.focus())==null?void 0:B_.setParagraph())==null?void 0:$_.setTextAlign(kh))==null||$P.run()}},{label:jsxRuntimeExports.jsxs("div",{className:"MenuProps-item",children:[jsxRuntimeExports.jsxs("div",{className:"MenuProps-item-left",children:[jsxRuntimeExports.jsx("div",{style:{width:"16px",height:"16px"},className:Ff!=null&&Ff.isActive("heading",{level:1})?"":"MenuProps-item-left-svg",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:Ff!=null&&Ff.isActive("heading",{level:1})?"#1677FF":"#999999",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 13.3337H7.33398V8.66699H2.66732V13.3337H1.33398V2.66699H2.66732V7.33366H7.33398V2.66699H8.66732V13.3337ZM14.001 5.33366V13.3337H12.6677L12.6673 6.80299L11.334 7.16033V5.78033L13.001 5.33366H14.001Z"})})}),jsxRuntimeExports.jsx("div",{className:Ff!=null&&Ff.isActive("heading",{level:1})?"":"MenuProps-item-left-text",style:{fontSize:"13px",marginLeft:"16px",color:Ff!=null&&Ff.isActive("heading",{level:1})?"#1677FF":"#666666"},children:"一级标题"})]}),(Ff==null?void 0:Ff.isActive("heading",{level:1}))&&jsxRuntimeExports.jsx("div",{style:{height:"16px",width:"16px"},children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.11535 11.422C6.97707 11.422 6.83801 11.3744 6.72488 11.2772L3.67347 8.65437C3.42254 8.43859 3.39394 8.06015 3.60957 7.80922C3.82535 7.55828 4.20379 7.52969 4.45472 7.74531L7.50613 10.3681C7.75707 10.5839 7.78566 10.9623 7.57004 11.2133C7.4516 11.3512 7.28394 11.422 7.11535 11.422Z",fill:"#1677FF"}),jsxRuntimeExports.jsx("path",{d:"M7.34114 11.4222C7.20817 11.4222 7.07442 11.3782 6.96332 11.2879C6.70661 11.079 6.6677 10.7015 6.87661 10.4447L11.4694 4.79834C11.6783 4.54146 12.0558 4.50271 12.3125 4.71162C12.5693 4.92052 12.6082 5.29802 12.3993 5.55474L7.80645 11.2011C7.68801 11.3466 7.5152 11.4222 7.34114 11.4222Z",fill:"#1677FF"})]})})]}),key:"heading1",onClick:()=>{var x_,B_,$_,$P;const kh=setAlign(Ff)??"left";($P=($_=(B_=(x_=Ff==null?void 0:Ff.chain())==null?void 0:x_.focus())==null?void 0:B_.toggleHeading({level:1}))==null?void 0:$_.setTextAlign(kh))==null||$P.run()}},{label:jsxRuntimeExports.jsxs("div",{className:"MenuProps-item",children:[jsxRuntimeExports.jsxs("div",{className:"MenuProps-item-left",children:[jsxRuntimeExports.jsx("div",{style:{width:"16px",height:"16px"},className:Ff!=null&&Ff.isActive("heading",{level:2})?"":"MenuProps-item-left-svg",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:Ff!=null&&Ff.isActive("heading",{level:2})?"#1677FF":"#999999",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2.66732 2.66699V7.33366H7.33398V2.66699H8.66732V13.3337H7.33398V8.66699H2.66732V13.3337H1.33398V2.66699H2.66732ZM12.334 5.33366C13.7147 5.33366 14.834 6.45295 14.834 7.83366C14.834 8.40526 14.6422 8.93206 14.3194 9.35312L14.2208 9.47379L12.0235 12.0003H14.6673V13.3337H10.0007L10.0002 12.2963L13.2145 8.59906C13.3927 8.39419 13.5007 8.12653 13.5007 7.83366C13.5007 7.18933 12.9783 6.66699 12.334 6.66699C11.7219 6.66699 11.2199 7.13839 11.1712 7.73799L11.1673 7.83366H9.83398C9.83398 6.45295 10.9533 5.33366 12.334 5.33366Z"})})}),jsxRuntimeExports.jsx("div",{className:Ff!=null&&Ff.isActive("heading",{level:2})?"":"MenuProps-item-left-text",style:{fontSize:"13px",marginLeft:"16px",color:Ff!=null&&Ff.isActive("heading",{level:2})?"#1677FF":"#666666"},children:"二级标题"})]}),(Ff==null?void 0:Ff.isActive("heading",{level:2}))&&jsxRuntimeExports.jsx("div",{style:{height:"16px",width:"16px"},children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.11535 11.422C6.97707 11.422 6.83801 11.3744 6.72488 11.2772L3.67347 8.65437C3.42254 8.43859 3.39394 8.06015 3.60957 7.80922C3.82535 7.55828 4.20379 7.52969 4.45472 7.74531L7.50613 10.3681C7.75707 10.5839 7.78566 10.9623 7.57004 11.2133C7.4516 11.3512 7.28394 11.422 7.11535 11.422Z",fill:"#1677FF"}),jsxRuntimeExports.jsx("path",{d:"M7.34114 11.4222C7.20817 11.4222 7.07442 11.3782 6.96332 11.2879C6.70661 11.079 6.6677 10.7015 6.87661 10.4447L11.4694 4.79834C11.6783 4.54146 12.0558 4.50271 12.3125 4.71162C12.5693 4.92052 12.6082 5.29802 12.3993 5.55474L7.80645 11.2011C7.68801 11.3466 7.5152 11.4222 7.34114 11.4222Z",fill:"#1677FF"})]})})]}),key:"heading2",onClick:()=>{var x_,B_,$_,$P;const kh=setAlign(Ff)??"left";($P=($_=(B_=(x_=Ff==null?void 0:Ff.chain())==null?void 0:x_.focus())==null?void 0:B_.toggleHeading({level:2}))==null?void 0:$_.setTextAlign(kh))==null||$P.run()}},{label:jsxRuntimeExports.jsxs("div",{className:"MenuProps-item",children:[jsxRuntimeExports.jsxs("div",{className:"MenuProps-item-left",children:[jsxRuntimeExports.jsx("div",{style:{width:"16px",height:"16px"},className:Ff!=null&&Ff.isActive("heading",{level:3})?"":"MenuProps-item-left-svg",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:Ff!=null&&Ff.isActive("heading",{level:3})?"#1677FF":"#999999",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.6673 5.33366L14.6663 6.66699L12.9963 8.58899C14.0555 8.87926 14.834 9.84886 14.834 11.0003C14.834 12.3811 13.7147 13.5003 12.334 13.5003C11.1167 13.5003 10.1025 12.6303 9.87958 11.4781L11.1887 11.2238C11.2929 11.7612 11.7661 12.167 12.334 12.167C12.9783 12.167 13.5007 11.6447 13.5007 11.0003C13.5007 10.356 12.9783 9.83366 12.334 9.83366C12.1433 9.83366 11.9633 9.87939 11.8044 9.96053L10.9335 8.92913L12.8996 6.66699H10.0007V5.33366H14.6673ZM2.66732 2.66699V7.33366H7.33398V2.66699H8.66732V13.3337H7.33398V8.66699H2.66732V13.3337H1.33398V2.66699H2.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:Ff!=null&&Ff.isActive("heading",{level:3})?"":"MenuProps-item-left-text",style:{fontSize:"13px",marginLeft:"16px",color:Ff!=null&&Ff.isActive("heading",{level:3})?"#1677FF":"#666666"},children:"三级标题"})]}),(Ff==null?void 0:Ff.isActive("heading",{level:3}))&&jsxRuntimeExports.jsx("div",{style:{height:"16px",width:"16px"},children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.11535 11.422C6.97707 11.422 6.83801 11.3744 6.72488 11.2772L3.67347 8.65437C3.42254 8.43859 3.39394 8.06015 3.60957 7.80922C3.82535 7.55828 4.20379 7.52969 4.45472 7.74531L7.50613 10.3681C7.75707 10.5839 7.78566 10.9623 7.57004 11.2133C7.4516 11.3512 7.28394 11.422 7.11535 11.422Z",fill:"#1677FF"}),jsxRuntimeExports.jsx("path",{d:"M7.34114 11.4222C7.20817 11.4222 7.07442 11.3782 6.96332 11.2879C6.70661 11.079 6.6677 10.7015 6.87661 10.4447L11.4694 4.79834C11.6783 4.54146 12.0558 4.50271 12.3125 4.71162C12.5693 4.92052 12.6082 5.29802 12.3993 5.55474L7.80645 11.2011C7.68801 11.3466 7.5152 11.4222 7.34114 11.4222Z",fill:"#1677FF"})]})})]}),key:"heading3",onClick:()=>{var x_,B_,$_,$P;const kh=setAlign(Ff)??"left";($P=($_=(B_=(x_=Ff==null?void 0:Ff.chain())==null?void 0:x_.focus())==null?void 0:B_.toggleHeading({level:3}))==null?void 0:$_.setTextAlign(kh))==null||$P.run()}},{label:jsxRuntimeExports.jsxs("div",{className:"MenuProps-item",children:[jsxRuntimeExports.jsxs("div",{className:"MenuProps-item-left",children:[jsxRuntimeExports.jsx("div",{style:{width:"16px",height:"16px"},className:Ff!=null&&Ff.isActive("heading",{level:4})?"":"MenuProps-item-left-svg",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:Ff!=null&&Ff.isActive("heading",{level:4})?"#1677FF":"#999999",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 13.3337H7.33398V8.66699H2.66732V13.3337H1.33398V2.66699H2.66732V7.33366H7.33398V2.66699H8.66732V13.3337ZM14.6673 5.33366V10.667H15.6673V12.0003H14.6673V13.3337H13.334V12.0003H9.66732V11.107L13.0007 5.33366H14.6673ZM13.334 7.42233L11.4607 10.667H13.334V7.42233Z"})})}),jsxRuntimeExports.jsx("div",{className:Ff!=null&&Ff.isActive("heading",{level:4})?"":"MenuProps-item-left-text",style:{fontSize:"13px",marginLeft:"16px",color:Ff!=null&&Ff.isActive("heading",{level:4})?"#1677FF":"#666666"},children:"四级标题"})]}),(Ff==null?void 0:Ff.isActive("heading",{level:4}))&&jsxRuntimeExports.jsx("div",{style:{height:"16px",width:"16px"},children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.11535 11.422C6.97707 11.422 6.83801 11.3744 6.72488 11.2772L3.67347 8.65437C3.42254 8.43859 3.39394 8.06015 3.60957 7.80922C3.82535 7.55828 4.20379 7.52969 4.45472 7.74531L7.50613 10.3681C7.75707 10.5839 7.78566 10.9623 7.57004 11.2133C7.4516 11.3512 7.28394 11.422 7.11535 11.422Z",fill:"#1677FF"}),jsxRuntimeExports.jsx("path",{d:"M7.34114 11.4222C7.20817 11.4222 7.07442 11.3782 6.96332 11.2879C6.70661 11.079 6.6677 10.7015 6.87661 10.4447L11.4694 4.79834C11.6783 4.54146 12.0558 4.50271 12.3125 4.71162C12.5693 4.92052 12.6082 5.29802 12.3993 5.55474L7.80645 11.2011C7.68801 11.3466 7.5152 11.4222 7.34114 11.4222Z",fill:"#1677FF"})]})})]}),key:"heading4",onClick:()=>{var x_,B_,$_,$P;const kh=setAlign(Ff)??"left";($P=($_=(B_=(x_=Ff==null?void 0:Ff.chain())==null?void 0:x_.focus())==null?void 0:B_.toggleHeading({level:4}))==null?void 0:$_.setTextAlign(kh))==null||$P.run()}},{label:jsxRuntimeExports.jsxs("div",{className:"MenuProps-item",children:[jsxRuntimeExports.jsxs("div",{className:"MenuProps-item-left",children:[jsxRuntimeExports.jsx("div",{style:{width:"16px",height:"16px"},className:Ff!=null&&Ff.isActive("heading",{level:5})?"":"MenuProps-item-left-svg",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:Ff!=null&&Ff.isActive("heading",{level:5})?"#1677FF":"#999999",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.6673 5.33366V6.66699H11.7853L11.4757 8.42419C11.6963 8.36513 11.9281 8.33366 12.1673 8.33366C13.6401 8.33366 14.834 9.52759 14.834 11.0003C14.834 12.4731 13.6401 13.667 12.1673 13.667C10.9495 13.667 9.92245 12.8507 9.60325 11.7355L10.8854 11.3683C11.0451 11.9257 11.5586 12.3337 12.1673 12.3337C12.9037 12.3337 13.5007 11.7367 13.5007 11.0003C13.5007 10.2639 12.9037 9.66699 12.1673 9.66699C11.7469 9.66699 11.372 9.86153 11.1276 10.1655L9.92085 9.56293L10.6673 5.33366H14.6673ZM2.66732 2.66699V7.33366H7.33398V2.66699H8.66732V13.3337H7.33398V8.66699H2.66732V13.3337H1.33398V2.66699H2.66732Z"})})}),jsxRuntimeExports.jsx("div",{className:Ff!=null&&Ff.isActive("heading",{level:5})?"":"MenuProps-item-left-text",style:{fontSize:"13px",marginLeft:"16px",color:Ff!=null&&Ff.isActive("heading",{level:5})?"#1677FF":"#666666"},children:"五级标题"})]}),(Ff==null?void 0:Ff.isActive("heading",{level:5}))&&jsxRuntimeExports.jsx("div",{style:{height:"16px",width:"16px"},children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.11535 11.422C6.97707 11.422 6.83801 11.3744 6.72488 11.2772L3.67347 8.65437C3.42254 8.43859 3.39394 8.06015 3.60957 7.80922C3.82535 7.55828 4.20379 7.52969 4.45472 7.74531L7.50613 10.3681C7.75707 10.5839 7.78566 10.9623 7.57004 11.2133C7.4516 11.3512 7.28394 11.422 7.11535 11.422Z",fill:"#1677FF"}),jsxRuntimeExports.jsx("path",{d:"M7.34114 11.4222C7.20817 11.4222 7.07442 11.3782 6.96332 11.2879C6.70661 11.079 6.6677 10.7015 6.87661 10.4447L11.4694 4.79834C11.6783 4.54146 12.0558 4.50271 12.3125 4.71162C12.5693 4.92052 12.6082 5.29802 12.3993 5.55474L7.80645 11.2011C7.68801 11.3466 7.5152 11.4222 7.34114 11.4222Z",fill:"#1677FF"})]})})]}),key:"heading5",onClick:()=>{var x_,B_,$_,$P;const kh=setAlign(Ff)??"left";($P=($_=(B_=(x_=Ff==null?void 0:Ff.chain())==null?void 0:x_.focus())==null?void 0:B_.toggleHeading({level:5}))==null?void 0:$_.setTextAlign(kh))==null||$P.run()}},{label:jsxRuntimeExports.jsxs("div",{className:"MenuProps-item",children:[jsxRuntimeExports.jsxs("div",{className:"MenuProps-item-left",children:[jsxRuntimeExports.jsx("div",{style:{width:"16px",height:"16px"},className:Ff!=null&&Ff.isActive("heading",{level:6})?"":"MenuProps-item-left-svg",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:Ff!=null&&Ff.isActive("heading",{level:6})?"#1677FF":"#999999",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14.0653 5.33366L12.3333 8.33366C13.8067 8.33366 15.0007 9.52759 15.0007 11.0003C15.0007 12.4731 13.8067 13.667 12.334 13.667C10.8613 13.667 9.66732 12.4731 9.66732 11.0003C9.66732 10.5094 9.79998 10.0495 10.0314 9.65439L12.526 5.33366H14.0653ZM2.66732 2.66699V7.33366H7.33398V2.66699H8.66732V13.3337H7.33398V8.66699H2.66732V13.3337H1.33398V2.66699H2.66732ZM12.334 9.66699C11.5976 9.66699 11.0007 10.2639 11.0007 11.0003C11.0007 11.7367 11.5976 12.3337 12.334 12.3337C13.0704 12.3337 13.6673 11.7367 13.6673 11.0003C13.6673 10.2639 13.0704 9.66699 12.334 9.66699Z"})})}),jsxRuntimeExports.jsx("div",{className:Ff!=null&&Ff.isActive("heading",{level:6})?"":"MenuProps-item-left-text",style:{fontSize:"13px",marginLeft:"16px",color:Ff!=null&&Ff.isActive("heading",{level:6})?"#1677FF":"#666666"},children:"六级标题"})]}),(Ff==null?void 0:Ff.isActive("heading",{level:6}))&&jsxRuntimeExports.jsx("div",{style:{height:"16px",width:"16px"},children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.11535 11.422C6.97707 11.422 6.83801 11.3744 6.72488 11.2772L3.67347 8.65437C3.42254 8.43859 3.39394 8.06015 3.60957 7.80922C3.82535 7.55828 4.20379 7.52969 4.45472 7.74531L7.50613 10.3681C7.75707 10.5839 7.78566 10.9623 7.57004 11.2133C7.4516 11.3512 7.28394 11.422 7.11535 11.422Z",fill:"#1677FF"}),jsxRuntimeExports.jsx("path",{d:"M7.34114 11.4222C7.20817 11.4222 7.07442 11.3782 6.96332 11.2879C6.70661 11.079 6.6677 10.7015 6.87661 10.4447L11.4694 4.79834C11.6783 4.54146 12.0558 4.50271 12.3125 4.71162C12.5693 4.92052 12.6082 5.29802 12.3993 5.55474L7.80645 11.2011C7.68801 11.3466 7.5152 11.4222 7.34114 11.4222Z",fill:"#1677FF"})]})})]}),key:"heading6",onClick:()=>{var x_,B_,$_,$P;const kh=setAlign(Ff)??"left";($P=($_=(B_=(x_=Ff==null?void 0:Ff.chain())==null?void 0:x_.focus())==null?void 0:B_.toggleHeading({level:6}))==null?void 0:$_.setTextAlign(kh))==null||$P.run()}}],alignDropDown=Ff=>[{label:jsxRuntimeExports.jsxs("div",{className:"MenuProps-item",children:[jsxRuntimeExports.jsxs("div",{className:"MenuProps-item-left",children:[jsxRuntimeExports.jsx("div",{style:{width:"16px",height:"16px"},className:Ff!=null&&Ff.isActive({textAlign:"left"})?"":"MenuProps-item-left-svg",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:Ff!=null&&Ff.isActive({textAlign:"left"})?"#1677FF":"#999999",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2 2.66699H14V4.00033H2V2.66699ZM2 12.667H11.3333V14.0003H2V12.667ZM2 9.33366H14V10.667H2V9.33366ZM2 6.00033H11.3333V7.33366H2V6.00033Z"})})}),jsxRuntimeExports.jsx("div",{className:Ff!=null&&Ff.isActive({textAlign:"left"})?"":"MenuProps-item-left-text",style:{fontSize:"13px",marginLeft:"16px",color:Ff!=null&&Ff.isActive({textAlign:"left"})?"#1677FF":"#666666"},children:"左对齐"})]}),(Ff==null?void 0:Ff.isActive({textAlign:"left"}))&&jsxRuntimeExports.jsx("div",{style:{height:"16px",width:"16px"},children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.11535 11.422C6.97707 11.422 6.83801 11.3744 6.72488 11.2772L3.67347 8.65437C3.42254 8.43859 3.39394 8.06015 3.60957 7.80922C3.82535 7.55828 4.20379 7.52969 4.45472 7.74531L7.50613 10.3681C7.75707 10.5839 7.78566 10.9623 7.57004 11.2133C7.4516 11.3512 7.28394 11.422 7.11535 11.422Z",fill:"#1677FF"}),jsxRuntimeExports.jsx("path",{d:"M7.34114 11.4222C7.20817 11.4222 7.07442 11.3782 6.96332 11.2879C6.70661 11.079 6.6677 10.7015 6.87661 10.4447L11.4694 4.79834C11.6783 4.54146 12.0558 4.50271 12.3125 4.71162C12.5693 4.92052 12.6082 5.29802 12.3993 5.55474L7.80645 11.2011C7.68801 11.3466 7.5152 11.4222 7.34114 11.4222Z",fill:"#1677FF"})]})})]}),key:"left",onClick:()=>{var kh,x_,B_;(B_=(x_=(kh=Ff==null?void 0:Ff.chain())==null?void 0:kh.focus())==null?void 0:x_.setTextAlign("left"))==null||B_.run()}},{label:jsxRuntimeExports.jsxs("div",{className:"MenuProps-item",children:[jsxRuntimeExports.jsxs("div",{className:"MenuProps-item-left",children:[jsxRuntimeExports.jsx("div",{style:{width:"16px",height:"16px"},className:Ff!=null&&Ff.isActive({textAlign:"center"})?"":"MenuProps-item-left-svg",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:Ff!=null&&Ff.isActive({textAlign:"center"})?"#1677FF":"#999999",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2 2.66699H14V4.00033H2V2.66699ZM3.33333 12.667H12.6667V14.0003H3.33333V12.667ZM2 9.33366H14V10.667H2V9.33366ZM3.33333 6.00033H12.6667V7.33366H3.33333V6.00033Z"})})}),jsxRuntimeExports.jsx("div",{className:Ff!=null&&Ff.isActive({textAlign:"center"})?"":"MenuProps-item-left-text",style:{fontSize:"13px",marginLeft:"16px",color:Ff!=null&&Ff.isActive({textAlign:"center"})?"#1677FF":"#666666"},children:"居中对齐"})]}),(Ff==null?void 0:Ff.isActive({textAlign:"center"}))&&jsxRuntimeExports.jsx("div",{style:{height:"16px",width:"16px"},children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.11535 11.422C6.97707 11.422 6.83801 11.3744 6.72488 11.2772L3.67347 8.65437C3.42254 8.43859 3.39394 8.06015 3.60957 7.80922C3.82535 7.55828 4.20379 7.52969 4.45472 7.74531L7.50613 10.3681C7.75707 10.5839 7.78566 10.9623 7.57004 11.2133C7.4516 11.3512 7.28394 11.422 7.11535 11.422Z",fill:"#1677FF"}),jsxRuntimeExports.jsx("path",{d:"M7.34114 11.4222C7.20817 11.4222 7.07442 11.3782 6.96332 11.2879C6.70661 11.079 6.6677 10.7015 6.87661 10.4447L11.4694 4.79834C11.6783 4.54146 12.0558 4.50271 12.3125 4.71162C12.5693 4.92052 12.6082 5.29802 12.3993 5.55474L7.80645 11.2011C7.68801 11.3466 7.5152 11.4222 7.34114 11.4222Z",fill:"#1677FF"})]})})]}),key:"center",onClick:()=>{var kh,x_,B_;(B_=(x_=(kh=Ff==null?void 0:Ff.chain())==null?void 0:kh.focus())==null?void 0:x_.setTextAlign("center"))==null||B_.run()}},{label:jsxRuntimeExports.jsxs("div",{className:"MenuProps-item",children:[jsxRuntimeExports.jsxs("div",{className:"MenuProps-item-left",children:[jsxRuntimeExports.jsx("div",{style:{width:"16px",height:"16px"},className:Ff!=null&&Ff.isActive({textAlign:"right"})?"":"MenuProps-item-left-svg",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:Ff!=null&&Ff.isActive({textAlign:"right"})?"#1677FF":"#999999",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M2 2.66699H14V4.00033H2V2.66699ZM4.66667 12.667H14V14.0003H4.66667V12.667ZM2 9.33366H14V10.667H2V9.33366ZM4.66667 6.00033H14V7.33366H4.66667V6.00033Z"})})}),jsxRuntimeExports.jsx("div",{className:Ff!=null&&Ff.isActive({textAlign:"right"})?"":"MenuProps-item-left-text",style:{fontSize:"13px",marginLeft:"16px",color:Ff!=null&&Ff.isActive({textAlign:"right"})?"#1677FF":"#666666"},children:"右对齐"})]}),(Ff==null?void 0:Ff.isActive({textAlign:"right"}))&&jsxRuntimeExports.jsx("div",{style:{height:"16px",width:"16px"},children:jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.11535 11.422C6.97707 11.422 6.83801 11.3744 6.72488 11.2772L3.67347 8.65437C3.42254 8.43859 3.39394 8.06015 3.60957 7.80922C3.82535 7.55828 4.20379 7.52969 4.45472 7.74531L7.50613 10.3681C7.75707 10.5839 7.78566 10.9623 7.57004 11.2133C7.4516 11.3512 7.28394 11.422 7.11535 11.422Z",fill:"#1677FF"}),jsxRuntimeExports.jsx("path",{d:"M7.34114 11.4222C7.20817 11.4222 7.07442 11.3782 6.96332 11.2879C6.70661 11.079 6.6677 10.7015 6.87661 10.4447L11.4694 4.79834C11.6783 4.54146 12.0558 4.50271 12.3125 4.71162C12.5693 4.92052 12.6082 5.29802 12.3993 5.55474L7.80645 11.2011C7.68801 11.3466 7.5152 11.4222 7.34114 11.4222Z",fill:"#1677FF"})]})})]}),key:"right",onClick:()=>{var kh,x_,B_;(B_=(x_=(kh=Ff==null?void 0:Ff.chain())==null?void 0:kh.focus())==null?void 0:x_.setTextAlign("right"))==null||B_.run()}}],HyperlinkContent=Ff=>{const{editor:kh,from:x_,to:B_,changeLink:$_}=Ff,[$P,zP]=React.useState(),[eme,tme]=React.useState(),[nme,rme]=React.useState(!1),ime=()=>{$_&&$_()},ome=()=>{var cme,ume,sme,lme,dme,fme;if(eme&&ame(eme)){const pme=kh==null?void 0:kh.view,hme=pme==null?void 0:pme.state.tr;hme&&(hme==null||hme.deleteRange(x_,B_),$P?hme==null||hme.insertText($P,x_):hme==null||hme.insertText(eme,x_),pme==null||pme.dispatch(hme));const mme=(cme=pme==null?void 0:pme.state)==null?void 0:cme.selection.to;console.log(pme,mme),(ume=kh==null?void 0:kh.commands)==null||ume.setTextSelection({from:x_,to:mme??x_}),(sme=kh==null?void 0:kh.view)==null||sme.focus(),(fme=(dme=(lme=kh==null?void 0:kh.chain())==null?void 0:lme.focus())==null?void 0:dme.setLink({href:eme,target:"_blank"}))==null||fme.run(),$_&&$_()}},ame=cme=>/^https?:\/\//.test(cme);return React.useEffect(()=>{var fme,pme;if(!kh)return;const cme=kh.state.doc,ume=(pme=(fme=kh==null?void 0:kh.view)==null?void 0:fme.state)==null?void 0:pme.selection,{$from:sme,$to:lme}=ume,dme=cme.textBetween(sme.pos,lme.pos," ");if(zP(dme??""),kh!=null&&kh.isActive("link")){const hme=sme.node();hme==null||hme.forEach(mme=>{var _me;mme!=null&&mme.marks&&((_me=mme==null?void 0:mme.marks)==null||_me.forEach(gme=>{var vme,Sme;tme(((vme=gme==null?void 0:gme.attrs)==null?void 0:vme.href)??""),ame((Sme=gme==null?void 0:gme.attrs)==null?void 0:Sme.href)}))})}},[kh,x_,B_]),jsxRuntimeExports.jsxs("div",{className:"h-link",onClick:()=>{},children:[jsxRuntimeExports.jsxs("div",{className:"h-link-line",children:[jsxRuntimeExports.jsx("div",{className:"text",children:"文本"}),jsxRuntimeExports.jsx(Input$1,{placeholder:"请输入文本",value:$P,onChange:cme=>{zP(cme.target.value)}})]}),jsxRuntimeExports.jsxs("div",{className:"h-link-line",children:[jsxRuntimeExports.jsx("div",{className:"text",children:"链接"}),jsxRuntimeExports.jsx(Input$1,{placeholder:"请粘贴或输入链接",onBlur:()=>{ame(eme)||!eme?rme(!1):rme(!0)},onFocus:()=>{rme(!1)},value:eme,onChange:cme=>{ame(cme.target.value),tme(cme.target.value)}}),nme&&jsxRuntimeExports.jsx("div",{className:"h-link-line-tip",children:"请输入链接"})]}),jsxRuntimeExports.jsxs("div",{className:"h-link-bottoms",children:[jsxRuntimeExports.jsx("div",{className:"cancleBtn",onClick:ime,children:"取消"}),jsxRuntimeExports.jsx("div",{className:"conBtn",style:{background:eme&&ame(eme)?"#1677FF":"#cccccc",cursor:eme&&ame(eme)?"pointer":"not-allowed"},onClick:()=>{ome()},children:"确定"})]})]})},BubbleMenuView$1=Ff=>{var ome,ame,cme,ume,sme,lme,dme,fme,pme,hme,mme,_me,gme,vme,Sme,Eme,bme,Rme,Ome,Pme,Lme,Mme,yme,kme,Tme,Dme,Fme,Ame;const{editor:kh,from:x_,to:B_,tipShow:$_=!1}=Ff,[$P,zP]=React.useState(!1);React.useState(!1);const[eme,tme]=React.useState($_),nme=wme=>{let xme;return wme==="text"?xme=textDropDown(kh):wme==="align"&&(xme=alignDropDown(kh)),{items:xme}},rme=nme("text");nme("align");const ime=wme=>{zP(wme)};return jsxRuntimeExports.jsx("div",{className:"bubble-new",style:{display:kh!=null&&kh.isEditable?"flex":"none"},children:eme?jsxRuntimeExports.jsx(Space$1,{children:jsxRuntimeExports.jsx(HyperlinkContent,{editor:kh,from:x_,to:B_,changeLink:()=>{var wme;tme(!1),(wme=kh==null?void 0:kh.view)==null||wme.focus()}})}):jsxRuntimeExports.jsxs(Space$1,{className:"bubble-menu",children:[jsxRuntimeExports.jsx(Dropdown$1,{overlayClassName:"bubbleMenuDropdown",menu:rme,onOpenChange:ime,children:jsxRuntimeExports.jsxs("div",{className:"bubble-menu-other-item",children:[jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M8.66732 4.00033V14.0003H7.33398V4.00033H3.33398V2.66699H12.6673V4.00033H8.66732Z",fill:"#666666"})}),jsxRuntimeExports.jsx("div",{style:{width:"2px"}}),jsxRuntimeExports.jsx("div",{className:"bubble-menu-other-item-icon",style:{transform:$P?"rotate(180deg)":"rotate(0deg)"},children:jsxRuntimeExports.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("rect",{opacity:"0.01",width:"10",height:"10",fill:"#666666"}),jsxRuntimeExports.jsx("path",{d:"M7.36526 3.29136L4.88867 5.97454L2.41185 3.29136C2.28414 3.15298 2.06842 3.14433 1.93003 3.27204C1.79165 3.39976 1.783 3.61548 1.91072 3.75386L4.63799 6.70841C4.70253 6.77837 4.79338 6.81816 4.88856 6.81816C4.98374 6.81816 5.07459 6.77837 5.13913 6.70841L7.8664 3.75386C7.99411 3.61548 7.98547 3.39976 7.84708 3.27204C7.7087 3.14433 7.49298 3.15298 7.36526 3.29136",fill:"#999"})]})})]})}),jsxRuntimeExports.jsx("div",{className:"dropdownLine"}),jsxRuntimeExports.jsx("div",{className:"bubble-menu-item",style:{background:kh!=null&&kh.isActive("bold")?"rgba(22,119,255,0.10)":"",cursor:(ume=(cme=(ame=(ome=kh==null?void 0:kh.can())==null?void 0:ome.chain())==null?void 0:ame.focus())==null?void 0:cme.toggleBold())!=null&&ume.run()?"pointer":"not-allowed"},onClick:()=>{var wme,xme,Nme,Cme,Ime,Bme,$me;(Cme=(Nme=(xme=(wme=kh==null?void 0:kh.can())==null?void 0:wme.chain())==null?void 0:xme.focus())==null?void 0:Nme.toggleBold())!=null&&Cme.run()&&(($me=(Bme=(Ime=kh==null?void 0:kh.chain())==null?void 0:Ime.focus())==null?void 0:Bme.toggleBold())==null||$me.run())},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.33333 7.33366H8.33333C9.2538 7.33366 10 6.58747 10 5.66699C10 4.74652 9.2538 4.00033 8.33333 4.00033H5.33333V7.33366ZM12 10.3337C12 11.9905 10.6569 13.3337 9 13.3337H4V2.66699H8.33333C9.9902 2.66699 11.3333 4.01014 11.3333 5.66699C11.3333 6.46987 11.0179 7.19906 10.5043 7.73753C11.3986 8.25679 12 9.22499 12 10.3337ZM5.33333 8.66699V12.0003H9C9.92047 12.0003 10.6667 11.2541 10.6667 10.3337C10.6667 9.41319 9.92047 8.66699 9 8.66699H5.33333Z",fill:kh!=null&&kh.isActive("bold")?"#1677FF":"#666666"})})}),jsxRuntimeExports.jsx("div",{className:"bubble-menu-item",style:{background:kh!=null&&kh.isActive("strike")?"rgba(22,119,255,0.10)":"",cursor:(fme=(dme=(lme=(sme=kh==null?void 0:kh.can())==null?void 0:sme.chain())==null?void 0:lme.focus())==null?void 0:dme.toggleStrike())!=null&&fme.run()?"pointer":"not-allowed"},onClick:()=>{var wme,xme,Nme,Cme,Ime,Bme,$me;(Cme=(Nme=(xme=(wme=kh==null?void 0:kh.can())==null?void 0:wme.chain())==null?void 0:xme.focus())==null?void 0:Nme.toggleStrike())!=null&&Cme.run()&&(($me=(Bme=(Ime=kh==null?void 0:kh.chain())==null?void 0:Ime.focus())==null?void 0:Bme.toggleStrike())==null||$me.run())},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M11.4359 9.33366C11.5897 9.67773 11.6667 10.0599 11.6667 10.4801C11.6667 11.3753 11.3175 12.0747 10.6191 12.5783C9.9206 13.0819 8.95567 13.3337 7.72413 13.3337C6.63116 13.3337 5.5489 13.0793 4.47728 12.5707V11.0676C5.49025 11.6525 6.5272 11.945 7.58813 11.945C9.28887 11.945 10.1419 11.4567 10.1472 10.4801C10.1472 10.0629 10.0033 9.70686 9.7154 9.41186C9.68927 9.38513 9.6626 9.35906 9.6354 9.33366H2V8.00033H14V9.33366H11.4359ZM8.71733 7.33366H5.08605C4.97107 7.22919 4.86411 7.11313 4.76517 6.98553C4.47728 6.61422 4.33333 6.16405 4.33333 5.63504C4.33333 4.81101 4.64389 4.11033 5.26499 3.53299C5.88611 2.95565 6.84707 2.66699 8.14793 2.66699C9.12893 2.66699 10.0673 2.88571 10.9629 3.32317V4.7576C10.1632 4.2998 9.2862 4.07091 8.33187 4.07091C6.67913 4.07091 5.85278 4.59228 5.85278 5.63504C5.85278 5.91481 5.99806 6.15897 6.28862 6.36752C6.57919 6.57607 6.93773 6.74266 7.3642 6.86726C7.77767 6.98806 8.22873 7.14353 8.71733 7.33366Z",fill:kh!=null&&kh.isActive("strike")?"#1677FF":"#666666"})})}),jsxRuntimeExports.jsx("div",{className:"bubble-menu-item",style:{background:kh!=null&&kh.isActive("italic")?"rgba(22,119,255,0.10)":"",cursor:(_me=(mme=(hme=(pme=kh==null?void 0:kh.can())==null?void 0:pme.chain())==null?void 0:hme.focus())==null?void 0:mme.toggleItalic())!=null&&_me.run()?"pointer":"not-allowed"},onClick:()=>{var wme,xme,Nme,Cme,Ime,Bme,$me;(Cme=(Nme=(xme=(wme=kh==null?void 0:kh.can())==null?void 0:wme.chain())==null?void 0:xme.focus())==null?void 0:Nme.toggleItalic())!=null&&Cme.run()&&(($me=(Bme=(Ime=kh==null?void 0:kh.chain())==null?void 0:Ime.focus())==null?void 0:Bme.toggleItalic())==null||$me.run())},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.99935 13.3337H4.66602V12.0003H6.61709L8.02768 4.00033H5.99935V2.66699H11.3327V4.00033H9.38162L7.97102 12.0003H9.99935V13.3337Z",fill:kh!=null&&kh.isActive("italic")?"#1677FF":"#666666"})})}),jsxRuntimeExports.jsx("div",{className:"bubble-menu-item",style:{background:kh!=null&&kh.isActive("underline")?"rgba(22,119,255,0.10)":"",cursor:(Eme=(Sme=(vme=(gme=kh==null?void 0:kh.can())==null?void 0:gme.chain())==null?void 0:vme.focus())==null?void 0:Sme.toggleUnderline())!=null&&Eme.run()?"pointer":"not-allowed"},onClick:()=>{var wme,xme,Nme,Cme,Ime,Bme,$me;(Cme=(Nme=(xme=(wme=kh==null?void 0:kh.can())==null?void 0:wme.chain())==null?void 0:xme.focus())==null?void 0:Nme.toggleUnderline())!=null&&Cme.run()&&(($me=(Bme=(Ime=kh==null?void 0:kh.chain())==null?void 0:Ime.focus())==null?void 0:Bme.toggleUnderline())==null||$me.run())},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M5.33268 2V8C5.33268 9.47273 6.52659 10.6667 7.99935 10.6667C9.47208 10.6667 10.666 9.47273 10.666 8V2H11.9993V8C11.9993 10.2091 10.2085 12 7.99935 12C5.79021 12 3.99935 10.2091 3.99935 8V2H5.33268ZM2.66602 13.3333H13.3327V14.6667H2.66602V13.3333Z",fill:kh!=null&&kh.isActive("underline")?"#1677FF":"#666666"})})}),jsxRuntimeExports.jsx("div",{className:"bubble-menu-item",style:{background:kh!=null&&kh.isActive("link")?"rgba(22,119,255,0.10)":"",cursor:(Pme=(Ome=(Rme=(bme=kh==null?void 0:kh.can())==null?void 0:bme.chain())==null?void 0:Rme.focus())==null?void 0:Ome.toggleLink())!=null&&Pme.run()?"pointer":"not-allowed"},onClick:()=>{var wme,xme,Nme,Cme;(Cme=(Nme=(xme=(wme=kh==null?void 0:kh.can())==null?void 0:wme.chain())==null?void 0:xme.focus())==null?void 0:Nme.toggleLink())!=null&&Cme.run()&&(tme(!0),setTimeout(()=>{var Ime;(Ime=kh==null?void 0:kh.view)==null||Ime.focus()},100))},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12.2422 10.3565L11.2993 9.41374L12.2422 8.47094C13.5439 7.16921 13.5439 5.05865 12.2422 3.75691C10.9404 2.45516 8.82988 2.45516 7.52815 3.75691L6.58533 4.69972L5.64253 3.75691L6.58533 2.8141C8.40781 0.991654 11.3625 0.991654 13.185 2.8141C15.0074 4.63655 15.0074 7.59134 13.185 9.41374L12.2422 10.3565ZM10.3565 12.2422L9.41375 13.185C7.59135 15.0075 4.63655 15.0075 2.8141 13.185C0.991654 11.3625 0.991654 8.40781 2.8141 6.58533L3.75691 5.64253L4.69971 6.58533L3.75691 7.52814C2.45516 8.82987 2.45516 10.9405 3.75691 12.2422C5.05865 13.5439 7.16921 13.5439 8.47095 12.2422L9.41375 11.2994L10.3565 12.2422ZM9.88515 5.17112L10.8279 6.11393L6.11393 10.828L5.17112 9.88514L9.88515 5.17112Z",fill:kh!=null&&kh.isActive("link")?"#1677FF":"#666666"})})}),jsxRuntimeExports.jsx("div",{className:"bubble-menu-item",style:{background:kh!=null&&kh.isActive("superscript")?"rgba(22,119,255,0.10)":"",cursor:(kme=(yme=(Mme=(Lme=kh==null?void 0:kh.can())==null?void 0:Lme.chain())==null?void 0:Mme.focus())==null?void 0:yme.toggleSuperscript())!=null&&kme.run()?"pointer":"not-allowed"},onClick:()=>{var wme,xme,Nme,Cme,Ime,Bme,$me;(Cme=(Nme=(xme=(wme=kh==null?void 0:kh.can())==null?void 0:wme.chain())==null?void 0:xme.focus())==null?void 0:Nme.toggleSuperscript())!=null&&Cme.run()&&(($me=(Bme=(Ime=kh==null?void 0:kh.chain())==null?void 0:Ime.focus())==null?void 0:Bme.toggleSuperscript())==null||$me.run())},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3.73045 3.33366L7 7.28586L10.2695 3.33366H12L7.8652 8.33173L12 13.3299V13.3337H10.2727L7 9.37759L3.72728 13.3337H2V13.3299L6.13477 8.33173L2 3.33366H3.73045ZM14.3671 4.38719C14.4695 4.29001 14.5333 4.15263 14.5333 4.00033C14.5333 3.70577 14.2945 3.46699 14 3.46699C13.7055 3.46699 13.4667 3.70577 13.4667 4.00033C13.4667 4.05115 13.4738 4.10032 13.4871 4.14688L12.7177 4.36671C12.6845 4.25031 12.6667 4.12739 12.6667 4.00033C12.6667 3.26395 13.2636 2.66699 14 2.66699C14.7364 2.66699 15.3333 3.26395 15.3333 4.00033C15.3333 4.38215 15.1729 4.72648 14.9157 4.96955L13.8294 6.00033H15.3333V6.66699H12.6667V6.00033L14.3671 4.38719Z",fill:kh!=null&&kh.isActive("superscript")?"#1677FF":"#666666"})})}),jsxRuntimeExports.jsx("div",{className:"bubble-menu-item",style:{background:kh!=null&&kh.isActive("subscript")?"rgba(22,119,255,0.10)":"",cursor:(Ame=(Fme=(Dme=(Tme=kh==null?void 0:kh.can())==null?void 0:Tme.chain())==null?void 0:Dme.focus())==null?void 0:Fme.toggleSubscript())!=null&&Ame.run()?"pointer":"not-allowed"},onClick:()=>{var wme,xme,Nme,Cme,Ime,Bme,$me;(Cme=(Nme=(xme=(wme=kh==null?void 0:kh.can())==null?void 0:wme.chain())==null?void 0:xme.focus())==null?void 0:Nme.toggleSubscript())!=null&&Cme.run()&&(($me=(Bme=(Ime=kh==null?void 0:kh.chain())==null?void 0:Ime.focus())==null?void 0:Bme.toggleSubscript())==null||$me.run())},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3.73045 2.66699L7 6.6192L10.2695 2.66699H12L7.8652 7.66506L12 12.6632V12.667H10.2727L7 8.71093L3.72728 12.667H2V12.6632L6.13477 7.66506L2 2.66699H3.73045ZM14.5333 10.667C14.5333 10.3725 14.2945 10.1337 14 10.1337C13.7055 10.1337 13.4667 10.3725 13.4667 10.667C13.4667 10.7178 13.4738 10.767 13.4871 10.8135L12.7177 11.0334C12.6845 10.917 12.6667 10.7941 12.6667 10.667C12.6667 9.93059 13.2636 9.33366 14 9.33366C14.7364 9.33366 15.3333 9.93059 15.3333 10.667C15.3333 11.0488 15.1729 11.3931 14.9157 11.6362L13.8294 12.667H15.3333V13.3337H12.6667V12.667L14.3671 11.0539C14.4695 10.9567 14.5333 10.8193 14.5333 10.667Z",fill:kh!=null&&kh.isActive("subscript")?"#1677FF":"#666666"})})})]})})},bubbleModules={BubbleMenu:BubbleMenu$1,BubbleMenuView:BubbleMenuView$1},Catalogue=Ff=>{const{editor:kh,canOpenCatalogue:x_=!0,isUpdate:B_=!1,onChangeVisible:$_}=Ff,$P=React.useRef(!1),[zP,eme]=React.useState([]),[tme,nme]=React.useState([]),[rme,ime]=React.useState([]),[ome,ame]=React.useState(),[cme,ume]=React.useState(!0),[sme,lme]=React.useState(!1),dme=()=>{ume(!1),$_==null||$_(!1)},fme=()=>{lme(!1),ume(!0),$_==null||$_(!0)},pme=()=>{lme(!0),ume(!0)},hme=()=>{sme&&(lme(!1),ume(!1))},mme=(bme,Rme)=>{const Ome=bme==null?void 0:bme.target;(Ome==null?void 0:Ome.scrollWidth)>(Ome==null?void 0:Ome.clientWidth)&&(zP[Rme].showTooltip=!0,eme([...zP]))},_me=(bme,Rme)=>{zP[Rme].showTooltip=!1,eme([...zP])},gme=bme=>{rme.includes(bme)?rme.splice(rme.indexOf(bme),1):rme.push(bme),ime([...rme]),vme(zP,rme)},vme=(bme,Rme)=>{bme==null||bme.forEach(Ome=>Ome.hidden=!1),Rme!=null&&Rme.length&&(Rme==null||Rme.forEach(Ome=>{var Lme;const Pme=(Lme=bme[Ome])==null?void 0:Lme.level;for(let Mme=Ome+1;Mme<(bme==null?void 0:bme.length);Mme++){const yme=bme[Mme];if((yme==null?void 0:yme.level)>Pme)yme.hidden=!0;else break}})),eme([...bme])},Sme=bme=>{var Rme,Ome;$P.current=!0,ame(bme==null?void 0:bme.id),(Ome=kh==null?void 0:kh.chain())==null||Ome.focus((bme==null?void 0:bme.from)+((Rme=bme==null?void 0:bme.text)==null?void 0:Rme.length)).run()},Eme=()=>{var Pme,Lme,Mme,yme,kme;const bme=(Lme=(Pme=kh==null?void 0:kh.view)==null?void 0:Pme.docView)==null?void 0:Lme.children;if(!bme)return;const Rme=(Mme=bme==null?void 0:bme.filter(Tme=>{var Dme,Fme;return((Fme=(Dme=Tme==null?void 0:Tme.node)==null?void 0:Dme.type)==null?void 0:Fme.name)==="heading"}))==null?void 0:Mme.map(Tme=>{var Dme,Fme,Ame,wme;return{from:Tme==null?void 0:Tme.posAtStart,to:Tme==null?void 0:Tme.posAtEnd,text:(Dme=Tme==null?void 0:Tme.node)==null?void 0:Dme.textContent,level:(Ame=(Fme=Tme==null?void 0:Tme.node)==null?void 0:Fme.attrs)==null?void 0:Ame.level,id:(wme=Tme==null?void 0:Tme.nodeDOM)==null?void 0:wme.id}});vme(Rme,rme);const Ome=(kme=(yme=Rme==null?void 0:Rme.map(Tme=>Tme==null?void 0:Tme.level))==null?void 0:yme.filter((Tme,Dme,Fme)=>Fme.indexOf(Tme)===Dme))==null?void 0:kme.sort((Tme,Dme)=>Tme-Dme);nme(Ome)};return React.useEffect(()=>(kh&&(kh==null||kh.on("update",Eme)),()=>{kh&&(kh==null||kh.off("update",Eme))}),[kh,rme]),React.useEffect(()=>{const bme=()=>{if($P!=null&&$P.current){$P.current=!1;return}const Ome=document.getElementById("ylz-editor-container"),Pme=(Ome==null?void 0:Ome.querySelectorAll("h1, h2, h3, h4, h5, h6"))||[],Lme=(Ome==null?void 0:Ome.scrollTop)||0;let Mme=null;for(let yme=0;yme<(Pme==null?void 0:Pme.length);yme++){const kme=Pme[yme];if(((kme==null?void 0:kme.offsetTop)||0)>Lme){Mme=kme;break}}ame((Mme==null?void 0:Mme.id)||"")},Rme=document.getElementById("ylz-editor-container");return Rme==null||Rme.addEventListener("scroll",bme),()=>{Rme==null||Rme.removeEventListener("scroll",bme)}},[]),React.useEffect(()=>{x_===!1&&ume(!1)},[x_]),React.useEffect(()=>{B_&&Eme()},[B_]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:cme?jsxRuntimeExports.jsxs("div",{className:`catalogue${sme?" catalogue-hover":""}`,onMouseLeave:hme,children:[jsxRuntimeExports.jsxs("div",{className:"catalogue-header",children:[jsxRuntimeExports.jsx("span",{children:"目录"}),x_===!1?jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"not-allowed"},children:jsxRuntimeExports.jsx("path",{d:"M8.0015 2C11.5962 2 14.5869 4.58651 15.2139 8C14.5869 11.4135 11.5962 14 8.0015 14C4.40672 14 1.41607 11.4135 0.789062 8C1.41607 4.58651 4.40672 2 8.0015 2ZM8.0015 12.6667C10.8252 12.6667 13.2415 10.7013 13.8531 8C13.2415 5.29869 10.8252 3.33333 8.0015 3.33333C5.1777 3.33333 2.76145 5.29869 2.14982 8C2.76145 10.7013 5.1777 12.6667 8.0015 12.6667ZM8.0015 11C6.34462 11 5.00148 9.65687 5.00148 8C5.00148 6.34315 6.34462 5 8.0015 5C9.6583 5 11.0015 6.34315 11.0015 8C11.0015 9.65687 9.6583 11 8.0015 11ZM8.0015 9.66667C8.92197 9.66667 9.66817 8.92047 9.66817 8C9.66817 7.07953 8.92197 6.33333 8.0015 6.33333C7.08104 6.33333 6.33481 7.07953 6.33481 8C6.33481 8.92047 7.08104 9.66667 8.0015 9.66667Z",fill:"#CCCCCC"})}):jsxRuntimeExports.jsx(Tooltip$1,{placement:"bottomLeft",arrow:!1,title:sme?"显示目录":"隐藏目录",color:"white",overlayClassName:"ylz-editor-tooltip",children:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:sme?jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:fme,children:jsxRuntimeExports.jsx("path",{d:"M8.0015 2C11.5962 2 14.5869 4.58651 15.2139 8C14.5869 11.4135 11.5962 14 8.0015 14C4.40672 14 1.41607 11.4135 0.789062 8C1.41607 4.58651 4.40672 2 8.0015 2ZM8.0015 12.6667C10.8252 12.6667 13.2415 10.7013 13.8531 8C13.2415 5.29869 10.8252 3.33333 8.0015 3.33333C5.1777 3.33333 2.76145 5.29869 2.14982 8C2.76145 10.7013 5.1777 12.6667 8.0015 12.6667ZM8.0015 11C6.34462 11 5.00148 9.65687 5.00148 8C5.00148 6.34315 6.34462 5 8.0015 5C9.6583 5 11.0015 6.34315 11.0015 8C11.0015 9.65687 9.6583 11 8.0015 11ZM8.0015 9.66667C8.92197 9.66667 9.66817 8.92047 9.66817 8C9.66817 7.07953 8.92197 6.33333 8.0015 6.33333C7.08104 6.33333 6.33481 7.07953 6.33481 8C6.33481 8.92047 7.08104 9.66667 8.0015 9.66667Z",fill:"#666666"})}):jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:()=>dme(),children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_3702_1182)",children:jsxRuntimeExports.jsx("path",{d:"M11.9211 12.8647C10.7869 13.5838 9.44188 14.0003 7.99955 14.0003C4.40476 14.0003 1.41412 11.4138 0.787109 8.0003C1.07823 6.41538 1.8789 5.00877 3.013 3.95655L0.928456 1.87201L1.87127 0.929199L15.0706 14.1285L14.1278 15.0714L11.9211 12.8647ZM3.95642 4.89997C3.0705 5.70693 2.42455 6.7783 2.14787 8.0003C2.7595 10.7016 5.17575 12.667 7.99955 12.667C9.06582 12.667 10.074 12.3867 10.9489 11.8924L9.59668 10.5402C9.13422 10.8316 8.58655 11.0003 7.99955 11.0003C6.34267 11.0003 4.99952 9.6571 4.99952 8.0003C4.99952 7.41323 5.16813 6.86557 5.45956 6.40311L3.95642 4.89997ZM8.60862 9.55217L6.44766 7.39123C6.37355 7.5799 6.33286 7.7853 6.33286 8.0003C6.33286 8.92077 7.07908 9.66697 7.99955 9.66697C8.21448 9.66697 8.41995 9.62623 8.60862 9.55217ZM13.8705 11.0618L12.9167 10.108C13.3539 9.4847 13.6763 8.77257 13.8511 8.0003C13.2395 5.29895 10.8233 3.33361 7.99955 3.33361C7.43562 3.33361 6.88795 3.41199 6.36768 3.55895L5.31566 2.50693C6.14686 2.17989 7.05222 2.00027 7.99955 2.00027C11.5943 2.00027 14.5849 4.58678 15.2119 8.0003C15.0038 9.13337 14.5352 10.1754 13.8705 11.0618ZM7.81462 5.00588C7.87575 5.00216 7.93742 5.00027 7.99955 5.00027C9.65635 5.00027 10.9995 6.34342 10.9995 8.0003C10.9995 8.06237 10.9976 8.12403 10.9939 8.18517L7.81462 5.00588Z",fill:"#666666"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_3702_1182",children:jsxRuntimeExports.jsx("rect",{width:"16",height:"16",fill:"white"})})})]})})})]}),jsxRuntimeExports.jsx("div",{className:"catalogue-main",children:zP==null?void 0:zP.map((bme,Rme)=>{var Ome;return jsxRuntimeExports.jsx(React.Fragment,{children:bme!=null&&bme.hidden?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}):jsxRuntimeExports.jsxs("div",{className:`indent-level-${(tme==null?void 0:tme.indexOf(bme==null?void 0:bme.level))+1} ${ome===(bme==null?void 0:bme.id)?"active":""}`,children:[jsxRuntimeExports.jsx("span",{className:`catalogue-collapse ${rme!=null&&rme.includes(Rme)?"collapsed":""}`,children:(bme==null?void 0:bme.level)<((Ome=zP[Rme+1])==null?void 0:Ome.level)?jsxRuntimeExports.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",onClick:()=>gme(Rme),children:[jsxRuntimeExports.jsx("rect",{opacity:"0.01",width:"14",height:"14"}),jsxRuntimeExports.jsx("path",{d:"M10.3079 4.60869L6.84062 8.36514L3.37308 4.60869C3.19428 4.41495 2.89227 4.40284 2.69853 4.58164C2.50479 4.76045 2.49269 5.06245 2.67149 5.25619L6.48967 9.39255C6.58002 9.49049 6.70721 9.5462 6.84046 9.5462C6.97372 9.5462 7.10091 9.49049 7.19126 9.39255L11.0094 5.25619C11.1882 5.06245 11.1761 4.76045 10.9824 4.58164C10.7887 4.40284 10.4867 4.41495 10.3079 4.60869"}),jsxRuntimeExports.jsx("path",{d:"M7.38411 9.53907C7.18421 9.77894 6.81579 9.77894 6.61589 9.53907L2.68341 4.82009C2.41202 4.49443 2.6436 4 3.06752 4L10.9325 4C11.3564 4 11.588 4.49443 11.3166 4.82009L7.38411 9.53907Z"})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}),jsxRuntimeExports.jsx(Tooltip$1,{open:!!(bme!=null&&bme.showTooltip),placement:"bottomLeft",arrow:!1,title:bme==null?void 0:bme.text,color:"white",overlayClassName:"ylz-editor-tooltip",children:jsxRuntimeExports.jsx("span",{className:"catalogue-text",onMouseEnter:Pme=>mme(Pme,Rme),onMouseLeave:Pme=>_me(Pme,Rme),onClick:()=>Sme(bme),children:bme==null?void 0:bme.text})},bme==null?void 0:bme.form)]})},(bme==null?void 0:bme.id)||(bme==null?void 0:bme.form))})})]}):jsxRuntimeExports.jsx("div",{className:"catalogue-folded",children:jsxRuntimeExports.jsx("div",{onMouseEnter:pme,children:"目录"})})})},backtickInputRegex$1=/^```([a-z]+)?[\s\n]$/,tildeInputRegex=/^~~~([a-z]+)?[\s\n]$/,CodeBlock=Node$1.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:Ff=>{var $P;const{languageClassPrefix:kh}=this.options,$_=[...(($P=Ff.firstElementChild)==null?void 0:$P.classList)||[]].filter(zP=>zP.startsWith(kh)).map(zP=>zP.replace(kh,""))[0];return $_||null},rendered:!1},exec:{default:!1,rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:Ff,HTMLAttributes:kh}){return["pre",mergeAttributes(this.options.HTMLAttributes,kh),["code",{class:Ff.attrs.language?this.options.languageClassPrefix+Ff.attrs.language:null},0]]},addCommands(){return{setCodeBlock:Ff=>({commands:kh})=>kh.setNode(this.name,Ff),toggleCodeBlock:Ff=>({commands:kh})=>kh.toggleNode(this.name,"paragraph",Ff)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:Ff,$anchor:kh}=this.editor.state.selection,x_=kh.pos===1;return!Ff||kh.parent.type.name!==this.name?!1:x_||!kh.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:Ff})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:kh}=Ff,{selection:x_}=kh,{$from:B_,empty:$_}=x_;if(!$_||B_.parent.type!==this.type)return!1;const $P=B_.parentOffset===B_.parent.nodeSize-2,zP=B_.parent.textContent.endsWith(`
|
|
404
404
|
|
|
405
405
|
`);return!$P||!zP?!1:Ff.chain().command(({tr:eme})=>(eme.delete(B_.pos-2,B_.pos),!0)).exitCode().run()},ArrowDown:({editor:Ff})=>{if(!this.options.exitOnArrowDown)return!1;const{state:kh}=Ff,{selection:x_,doc:B_}=kh,{$from:$_,empty:$P}=x_;if(!$P||$_.parent.type!==this.type||!($_.parentOffset===$_.parent.nodeSize-2))return!1;const eme=$_.after();return eme===void 0||B_.nodeAt(eme)?!1:Ff.commands.exitCode()}}},addInputRules(){return[textblockTypeInputRule({find:backtickInputRegex$1,type:this.type,getAttributes:Ff=>({language:Ff[1]})}),textblockTypeInputRule({find:tildeInputRegex,type:this.type,getAttributes:Ff=>({language:Ff[1]})})]},addProseMirrorPlugins(){return[new Plugin({key:new PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:(Ff,kh)=>{if(!kh.clipboardData||this.editor.isActive(this.type.name))return!1;const x_=kh.clipboardData.getData("text/plain"),B_=kh.clipboardData.getData("vscode-editor-data"),$_=B_?JSON.parse(B_):void 0,$P=$_==null?void 0:$_.mode;if(!x_||!$P)return!1;const{tr:zP}=Ff.state;return zP.replaceSelectionWith(this.type.create({language:$P})),zP.setSelection(TextSelection.near(zP.doc.resolve(Math.max(0,zP.selection.from-1)))),zP.insertText(x_.replace(/\r\n?/g,`
|
|
406
|
-
`)),zP.setMeta("paste",!0),Ff.dispatch(zP),!0}}})]}});function parseNodes(Ff,kh=[]){return Ff.map(x_=>{const B_=[...kh,...x_.properties?x_.properties.className:[]];return x_.children?parseNodes(x_.children,B_):{text:x_.value,classes:B_}}).flat()}function getHighlightNodes(Ff){return Ff.value||Ff.children||[]}function registered(Ff){return!!HighlightJS.getLanguage(Ff)}function getDecorations({doc:Ff,name:kh,lowlight:x_,defaultLanguage:B_}){const $_=[];return findChildren(Ff,$P=>$P.type.name===kh).forEach($P=>{let zP=$P.pos+1;const eme=$P.node.attrs.language||B_,tme=x_.listLanguages(),nme=eme&&(tme.includes(eme)||registered(eme))?getHighlightNodes(x_.highlight(eme,$P.node.textContent)):getHighlightNodes(x_.highlightAuto($P.node.textContent));parseNodes(nme).forEach(rme=>{const ime=zP+rme.text.length;if(rme.classes.length){const ome=Decoration.inline(zP,ime,{class:rme.classes.join(" ")});$_.push(ome)}zP=ime})}),DecorationSet.create(Ff,$_)}function isFunction$1(Ff){return typeof Ff=="function"}function LowlightPlugin({name:Ff,lowlight:kh,defaultLanguage:x_}){if(!["highlight","highlightAuto","listLanguages"].every($_=>isFunction$1(kh[$_])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const B_=new Plugin({key:new PluginKey("lowlight"),state:{init:($_,{doc:$P})=>getDecorations({doc:$P,name:Ff,lowlight:kh,defaultLanguage:x_}),apply:($_,$P,zP,eme)=>{const tme=zP.selection.$head.parent.type.name,nme=eme.selection.$head.parent.type.name,rme=findChildren(zP.doc,ome=>ome.type.name===Ff),ime=findChildren(eme.doc,ome=>ome.type.name===Ff);return $_.docChanged&&([tme,nme].includes(Ff)||ime.length!==rme.length||$_.steps.some(ome=>ome.from!==void 0&&ome.to!==void 0&&rme.some(ame=>ame.pos>=ome.from&&ame.pos+ame.node.nodeSize<=ome.to)))?getDecorations({doc:$_.doc,name:Ff,lowlight:kh,defaultLanguage:x_}):$P.map($_.mapping,$_.doc)}},props:{decorations($_){return B_.getState($_)}}});return B_}const CodeBlockView=({editor:Ff,node:kh,updateAttributes:x_,extension:B_})=>{var lme,dme,fme,pme,hme,mme,_me;const $_=React.useContext(shareData),[$P,zP]=React.useState("light"),[eme,tme]=React.useState(((lme=kh==null?void 0:kh.attrs)==null?void 0:lme.exec)||!1),[nme,rme]=React.useState(!1),[ime,ome]=React.useState(!1),ame=gme=>{x_({language:gme})},cme=gme=>{var Sme;const vme=(Sme=gme==null?void 0:gme.target)==null?void 0:Sme.checked;tme(vme),x_({exec:vme})},ume=()=>{var gme;(gme=navigator==null?void 0:navigator.clipboard)==null||gme.writeText(kh==null?void 0:kh.textContent).then(()=>{rme(!0);const vme=setTimeout(()=>{rme(!1),clearTimeout(vme)},2e3)})},sme=()=>{var gme;(gme=B_==null?void 0:B_.options)==null||gme.onExec(kh==null?void 0:kh.textContent)};return React.useEffect(()=>{eme&&($_!=null&&$_.template)?zP("dark"):zP("light")},[eme,$_==null?void 0:$_.template]),jsxRuntimeExports.jsx(NodeViewWrapper,{children:jsxRuntimeExports.jsxs("div",{className:`code-block code-block-${$P}`,onMouseEnter:()=>ome(!0),onMouseLeave:()=>ome(!1),children:[jsxRuntimeExports.jsxs("div",{className:"code-block-header",contentEditable:!1,style:{display:ime?"flex":"none"},children:[jsxRuntimeExports.jsxs("div",{className:"code-block-header-left",children:[((Ff==null?void 0:Ff.isEditable)||!(Ff!=null&&Ff.isEditable)&&((dme=kh==null?void 0:kh.attrs)==null?void 0:dme.language))&&jsxRuntimeExports.jsx(Select$1,{disabled:!(Ff!=null&&Ff.isEditable),placeholder:"请选择语言",defaultValue:((fme=kh==null?void 0:kh.attrs)==null?void 0:fme.language)||void 0,style:{width:100},onChange:ame,options:[...(mme=(hme=(pme=B_==null?void 0:B_.options)==null?void 0:pme.lowlight)==null?void 0:hme.listLanguages())==null?void 0:mme.map(gme=>({value:gme,label:gme}))]}),($_==null?void 0:$_.template)&&jsxRuntimeExports.jsx(Select$1,{disabled:!0,defaultValue:(_me=$_==null?void 0:$_.template)==null?void 0:_me.name})]}),($_==null?void 0:$_.template)&&(Ff==null?void 0:Ff.isEditable)&&jsxRuntimeExports.jsx("div",{className:"code-block-header-right",children:jsxRuntimeExports.jsx(Checkbox$1,{checked:eme,onChange:cme,children:"执行"})})]}),jsxRuntimeExports.jsx("pre",{className:"code-block-body",children:jsxRuntimeExports.jsx(NodeViewContent,{as:"code"})}),jsxRuntimeExports.jsxs("div",{className:"code-block-action",contentEditable:!1,children:[eme&&($_==null?void 0:$_.template)&&jsxRuntimeExports.jsx(Button$1,{type:"primary",onClick:sme,children:"执行"}),jsxRuntimeExports.jsxs("div",{className:"code-block-action-copy",children:[nme&&jsxRuntimeExports.jsxs("div",{className:"copy-tip",children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("rect",{opacity:"0.01",width:"16",height:"16",fill:"black"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 1C4.13438 1 1 4.13438 1 8C1 11.8656 4.13438 15 8 15C11.8656 15 15 11.8656 15 8C15 4.13438 11.8656 1 8 1Z",fill:"#30C213"}),jsxRuntimeExports.jsx("path",{d:"M3.75391 8.76556C3.75391 8.76556 5.94801 10.5554 6.16596 12.0777C6.16596 12.0777 9.04299 7.38086 12.2397 6.96062C12.2397 6.96062 11.2662 6.25307 11.5858 5.13477C11.5858 5.13477 9.81311 5.31117 6.4711 10.4844L4.9048 7.8329L3.75391 8.76556Z",fill:"white"})]}),jsxRuntimeExports.jsx("span",{children:"复制成功"})]}),jsxRuntimeExports.jsx(Button$1,{type:"primary",onClick:ume,children:"复制"})]})]})]})})},CodeBlockLowlight=CodeBlock.extend({addOptions(){var Ff;return{...(Ff=this.parent)==null?void 0:Ff.call(this),lowlight:{},defaultLanguage:null}},addNodeView(){return ReactNodeViewRenderer(CodeBlockView)},addProseMirrorPlugins(){var Ff;return[...((Ff=this.parent)==null?void 0:Ff.call(this))||[],LowlightPlugin({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),FloatingMenuPlugin=Ff=>{var $P,zP;let kh,x_={},B_=!1;return($P=Ff.tip)==null||$P.emitter.on("hover",({node:eme,pos:tme,range:nme})=>{x_={node:eme,pos:tme,range:nme}}),(zP=Ff.tip)==null||zP.emitter.on("show",eme=>{B_=eme.show}),new Plugin({key:new PluginKey(Ff.pluginKey),view:eme=>({update(tme,nme){var cme,ume,sme;const{anchor:rme}=tme.state.selection,{anchor:ime}=nme.selection,{node:ome,pos:ame}=x_;(cme=Ff.tip)!=null&&cme.isShow&&rme>=ame&&rme<ame+ome.nodeSize&&(ime<ame||ime>=ame+ome.nodeSize)||rme!==ime&&((ume=Ff.tip)!=null&&ume.isShow)&&((sme=Ff.tip.tippy)==null||sme.hide())},destroy(){var tme;(tme=Ff.tip)==null||tme.destroy()}}),props:{handleDOMEvents:{mousemove:(eme,tme)=>{kh&&clearTimeout(kh);const{editor:nme,tip:rme}=Ff;nme.isEditable&&(kh=setTimeout(()=>{var ume,sme;const ime=document.querySelectorAll(".ant-modal-content");if(console.log("🚀 modalList.length:",ime.length),ime.length>0)return!1;const ome=(sme=(ume=nme==null?void 0:nme.view)==null?void 0:ume.state)==null?void 0:sme.selection,{from:ame,to:cme}=ome;if(console.log("🚀 from:",ame,cme),ame!=cme)return!1;rme==null||rme.move(eme,tme)},0))},wheel:()=>{var eme;(eme=Ff.tip)==null||eme.hide()}},decorations(eme){if(B_&&x_.node){const tme=Decoration.node(x_.range.from,x_.range.to,{style:"background: rgba(22,119,255,0.10); border-radius: 4px;"});return DecorationSet.create(eme.doc,[tme])}return null}}})},TableSelect=Ff=>{const{onClick:kh}=Ff,[x_,B_]=React.useState({row:0,col:0}),[$_,$P]=React.useState([]);React.useEffect(()=>{const rme=[];for(let ime=0;ime<9;ime++){rme[ime]=[];for(let ome=0;ome<9;ome++)ime<x_.row&&ome<x_.col?rme[ime][ome]=!0:rme[ime][ome]=!1}$P(rme)},[x_]);const zP=nme=>{const{dataset:rme}=nme.target;if(rme.row){const{row:ime,col:ome}=rme;B_({row:parseInt(ime),col:parseInt(ome)})}else{const ime=nme.target.getBoundingClientRect(),ome=nme.clientX-ime.left-nme.target.clientLeft-10,ame=nme.clientY-ime.top-nme.target.clientTop-10;let cme,ume;ome<0?ume=0:(ume=Math.ceil(ome/26),ume=Math.min(ume,9)),ame<0?cme=0:(cme=Math.ceil(ame/26),cme=Math.min(cme,9)),B_(cme===0||ume===0?{row:0,col:0}:{row:cme,col:ume})}},eme=nme=>{B_({row:0,col:0})},tme=()=>{x_.row&&(kh==null||kh(x_))};return jsxRuntimeExports.jsxs("div",{className:"tiptap-table-select",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-table-select-title",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-table-select-title-left",children:"表格行列"}),jsxRuntimeExports.jsx("div",{className:"tiptap-table-select-title-right",children:x_.row?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:x_.row}),jsxRuntimeExports.jsx("span",{children:"x"}),jsxRuntimeExports.jsx("span",{children:x_.col})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})})]}),jsxRuntimeExports.jsx("div",{className:"tiptap-table-select-content",onMouseMove:zP,onClick:tme,onMouseLeave:eme,children:$_.map((nme,rme)=>jsxRuntimeExports.jsx(React.Fragment,{children:nme.map((ime,ome)=>jsxRuntimeExports.jsx("div",{className:ime?"light":"","data-row":rme+1,"data-col":ome+1},`${rme}-${ome}`))},rme))})]})};function bind(Ff,kh){return function(){return Ff.apply(kh,arguments)}}const{toString:toString$1}=Object.prototype,{getPrototypeOf}=Object,kindOf=(Ff=>kh=>{const x_=toString$1.call(kh);return Ff[x_]||(Ff[x_]=x_.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=Ff=>(Ff=Ff.toLowerCase(),kh=>kindOf(kh)===Ff),typeOfTest=Ff=>kh=>typeof kh===Ff,{isArray:isArray$1}=Array,isUndefined=typeOfTest("undefined");function isBuffer$2(Ff){return Ff!==null&&!isUndefined(Ff)&&Ff.constructor!==null&&!isUndefined(Ff.constructor)&&isFunction(Ff.constructor.isBuffer)&&Ff.constructor.isBuffer(Ff)}const isArrayBuffer$1=kindOfTest("ArrayBuffer");function isArrayBufferView(Ff){let kh;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?kh=ArrayBuffer.isView(Ff):kh=Ff&&Ff.buffer&&isArrayBuffer$1(Ff.buffer),kh}const isString$1=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=Ff=>Ff!==null&&typeof Ff=="object",isBoolean=Ff=>Ff===!0||Ff===!1,isPlainObject$2=Ff=>{if(kindOf(Ff)!=="object")return!1;const kh=getPrototypeOf(Ff);return(kh===null||kh===Object.prototype||Object.getPrototypeOf(kh)===null)&&!(Symbol.toStringTag in Ff)&&!(Symbol.iterator in Ff)},isDate=kindOfTest("Date"),isFile$1=kindOfTest("File"),isBlob$1=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=Ff=>isObject(Ff)&&isFunction(Ff.pipe),isFormData=Ff=>{let kh;return Ff&&(typeof FormData=="function"&&Ff instanceof FormData||isFunction(Ff.append)&&((kh=kindOf(Ff))==="formdata"||kh==="object"&&isFunction(Ff.toString)&&Ff.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),trim=Ff=>Ff.trim?Ff.trim():Ff.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(Ff,kh,{allOwnKeys:x_=!1}={}){if(Ff===null||typeof Ff>"u")return;let B_,$_;if(typeof Ff!="object"&&(Ff=[Ff]),isArray$1(Ff))for(B_=0,$_=Ff.length;B_<$_;B_++)kh.call(null,Ff[B_],B_,Ff);else{const $P=x_?Object.getOwnPropertyNames(Ff):Object.keys(Ff),zP=$P.length;let eme;for(B_=0;B_<zP;B_++)eme=$P[B_],kh.call(null,Ff[eme],eme,Ff)}}function findKey(Ff,kh){kh=kh.toLowerCase();const x_=Object.keys(Ff);let B_=x_.length,$_;for(;B_-- >0;)if($_=x_[B_],kh===$_.toLowerCase())return $_;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=Ff=>!isUndefined(Ff)&&Ff!==_global;function merge(){const{caseless:Ff}=isContextDefined(this)&&this||{},kh={},x_=(B_,$_)=>{const $P=Ff&&findKey(kh,$_)||$_;isPlainObject$2(kh[$P])&&isPlainObject$2(B_)?kh[$P]=merge(kh[$P],B_):isPlainObject$2(B_)?kh[$P]=merge({},B_):isArray$1(B_)?kh[$P]=B_.slice():kh[$P]=B_};for(let B_=0,$_=arguments.length;B_<$_;B_++)arguments[B_]&&forEach(arguments[B_],x_);return kh}const extend$2=(Ff,kh,x_,{allOwnKeys:B_}={})=>(forEach(kh,($_,$P)=>{x_&&isFunction($_)?Ff[$P]=bind($_,x_):Ff[$P]=$_},{allOwnKeys:B_}),Ff),stripBOM=Ff=>(Ff.charCodeAt(0)===65279&&(Ff=Ff.slice(1)),Ff),inherits=(Ff,kh,x_,B_)=>{Ff.prototype=Object.create(kh.prototype,B_),Ff.prototype.constructor=Ff,Object.defineProperty(Ff,"super",{value:kh.prototype}),x_&&Object.assign(Ff.prototype,x_)},toFlatObject=(Ff,kh,x_,B_)=>{let $_,$P,zP;const eme={};if(kh=kh||{},Ff==null)return kh;do{for($_=Object.getOwnPropertyNames(Ff),$P=$_.length;$P-- >0;)zP=$_[$P],(!B_||B_(zP,Ff,kh))&&!eme[zP]&&(kh[zP]=Ff[zP],eme[zP]=!0);Ff=x_!==!1&&getPrototypeOf(Ff)}while(Ff&&(!x_||x_(Ff,kh))&&Ff!==Object.prototype);return kh},endsWith=(Ff,kh,x_)=>{Ff=String(Ff),(x_===void 0||x_>Ff.length)&&(x_=Ff.length),x_-=kh.length;const B_=Ff.indexOf(kh,x_);return B_!==-1&&B_===x_},toArray=Ff=>{if(!Ff)return null;if(isArray$1(Ff))return Ff;let kh=Ff.length;if(!isNumber(kh))return null;const x_=new Array(kh);for(;kh-- >0;)x_[kh]=Ff[kh];return x_},isTypedArray$1=(Ff=>kh=>Ff&&kh instanceof Ff)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(Ff,kh)=>{const B_=(Ff&&Ff[Symbol.iterator]).call(Ff);let $_;for(;($_=B_.next())&&!$_.done;){const $P=$_.value;kh.call(Ff,$P[0],$P[1])}},matchAll=(Ff,kh)=>{let x_;const B_=[];for(;(x_=Ff.exec(kh))!==null;)B_.push(x_);return B_},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=Ff=>Ff.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(x_,B_,$_){return B_.toUpperCase()+$_}),hasOwnProperty$2=(({hasOwnProperty:Ff})=>(kh,x_)=>Ff.call(kh,x_))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(Ff,kh)=>{const x_=Object.getOwnPropertyDescriptors(Ff),B_={};forEach(x_,($_,$P)=>{let zP;(zP=kh($_,$P,Ff))!==!1&&(B_[$P]=zP||$_)}),Object.defineProperties(Ff,B_)},freezeMethods=Ff=>{reduceDescriptors(Ff,(kh,x_)=>{if(isFunction(Ff)&&["arguments","caller","callee"].indexOf(x_)!==-1)return!1;const B_=Ff[x_];if(isFunction(B_)){if(kh.enumerable=!1,"writable"in kh){kh.writable=!1;return}kh.set||(kh.set=()=>{throw Error("Can not rewrite read-only method '"+x_+"'")})}})},toObjectSet=(Ff,kh)=>{const x_={},B_=$_=>{$_.forEach($P=>{x_[$P]=!0})};return isArray$1(Ff)?B_(Ff):B_(String(Ff).split(kh)),x_},noop$1=()=>{},toFiniteNumber=(Ff,kh)=>(Ff=+Ff,Number.isFinite(Ff)?Ff:kh),ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT$1="0123456789",ALPHABET={DIGIT:DIGIT$1,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT$1},generateString=(Ff=16,kh=ALPHABET.ALPHA_DIGIT)=>{let x_="";const{length:B_}=kh;for(;Ff--;)x_+=kh[Math.random()*B_|0];return x_};function isSpecCompliantForm(Ff){return!!(Ff&&isFunction(Ff.append)&&Ff[Symbol.toStringTag]==="FormData"&&Ff[Symbol.iterator])}const toJSONObject=Ff=>{const kh=new Array(10),x_=(B_,$_)=>{if(isObject(B_)){if(kh.indexOf(B_)>=0)return;if(!("toJSON"in B_)){kh[$_]=B_;const $P=isArray$1(B_)?[]:{};return forEach(B_,(zP,eme)=>{const tme=x_(zP,$_+1);!isUndefined(tme)&&($P[eme]=tme)}),kh[$_]=void 0,$P}}return B_};return x_(Ff,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=Ff=>Ff&&(isObject(Ff)||isFunction(Ff))&&isFunction(Ff.then)&&isFunction(Ff.catch),utils$1={isArray:isArray$1,isArrayBuffer:isArrayBuffer$1,isBuffer:isBuffer$2,isFormData,isArrayBufferView,isString:isString$1,isNumber,isBoolean,isObject,isPlainObject:isPlainObject$2,isUndefined,isDate,isFile:isFile$1,isBlob:isBlob$1,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray:isTypedArray$1,isFileList,forEach,merge,extend:extend$2,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$2,hasOwnProp:hasOwnProperty$2,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$1,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable};function AxiosError(Ff,kh,x_,B_,$_){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=Ff,this.name="AxiosError",kh&&(this.code=kh),x_&&(this.config=x_),B_&&(this.request=B_),$_&&(this.response=$_)}utils$1.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(Ff=>{descriptors[Ff]={value:Ff}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=(Ff,kh,x_,B_,$_,$P)=>{const zP=Object.create(prototype$1);return utils$1.toFlatObject(Ff,zP,function(tme){return tme!==Error.prototype},eme=>eme!=="isAxiosError"),AxiosError.call(zP,Ff.message,kh,x_,B_,$_),zP.cause=Ff,zP.name=Ff.name,$P&&Object.assign(zP,$P),zP};const httpAdapter=null;function isVisitable(Ff){return utils$1.isPlainObject(Ff)||utils$1.isArray(Ff)}function removeBrackets(Ff){return utils$1.endsWith(Ff,"[]")?Ff.slice(0,-2):Ff}function renderKey(Ff,kh,x_){return Ff?Ff.concat(kh).map(function($_,$P){return $_=removeBrackets($_),!x_&&$P?"["+$_+"]":$_}).join(x_?".":""):kh}function isFlatArray(Ff){return utils$1.isArray(Ff)&&!Ff.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(kh){return/^is[A-Z]/.test(kh)});function toFormData(Ff,kh,x_){if(!utils$1.isObject(Ff))throw new TypeError("target must be an object");kh=kh||new FormData,x_=utils$1.toFlatObject(x_,{metaTokens:!0,dots:!1,indexes:!1},!1,function(ume,sme){return!utils$1.isUndefined(sme[ume])});const B_=x_.metaTokens,$_=x_.visitor||rme,$P=x_.dots,zP=x_.indexes,tme=(x_.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(kh);if(!utils$1.isFunction($_))throw new TypeError("visitor must be a function");function nme(cme){if(cme===null)return"";if(utils$1.isDate(cme))return cme.toISOString();if(!tme&&utils$1.isBlob(cme))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(cme)||utils$1.isTypedArray(cme)?tme&&typeof Blob=="function"?new Blob([cme]):Buffer.from(cme):cme}function rme(cme,ume,sme){let lme=cme;if(cme&&!sme&&typeof cme=="object"){if(utils$1.endsWith(ume,"{}"))ume=B_?ume:ume.slice(0,-2),cme=JSON.stringify(cme);else if(utils$1.isArray(cme)&&isFlatArray(cme)||(utils$1.isFileList(cme)||utils$1.endsWith(ume,"[]"))&&(lme=utils$1.toArray(cme)))return ume=removeBrackets(ume),lme.forEach(function(fme,pme){!(utils$1.isUndefined(fme)||fme===null)&&kh.append(zP===!0?renderKey([ume],pme,$P):zP===null?ume:ume+"[]",nme(fme))}),!1}return isVisitable(cme)?!0:(kh.append(renderKey(sme,ume,$P),nme(cme)),!1)}const ime=[],ome=Object.assign(predicates,{defaultVisitor:rme,convertValue:nme,isVisitable});function ame(cme,ume){if(!utils$1.isUndefined(cme)){if(ime.indexOf(cme)!==-1)throw Error("Circular reference detected in "+ume.join("."));ime.push(cme),utils$1.forEach(cme,function(lme,dme){(!(utils$1.isUndefined(lme)||lme===null)&&$_.call(kh,lme,utils$1.isString(dme)?dme.trim():dme,ume,ome))===!0&&ame(lme,ume?ume.concat(dme):[dme])}),ime.pop()}}if(!utils$1.isObject(Ff))throw new TypeError("data must be an object");return ame(Ff),kh}function encode$1(Ff){const kh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(Ff).replace(/[!'()~]|%20|%00/g,function(B_){return kh[B_]})}function AxiosURLSearchParams(Ff,kh){this._pairs=[],Ff&&toFormData(Ff,this,kh)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(kh,x_){this._pairs.push([kh,x_])},prototype.toString=function(kh){const x_=kh?function(B_){return kh.call(this,B_,encode$1)}:encode$1;return this._pairs.map(function($_){return x_($_[0])+"="+x_($_[1])},"").join("&")};function encode(Ff){return encodeURIComponent(Ff).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(Ff,kh,x_){if(!kh)return Ff;const B_=x_&&x_.encode||encode,$_=x_&&x_.serialize;let $P;if($_?$P=$_(kh,x_):$P=utils$1.isURLSearchParams(kh)?kh.toString():new AxiosURLSearchParams(kh,x_).toString(B_),$P){const zP=Ff.indexOf("#");zP!==-1&&(Ff=Ff.slice(0,zP)),Ff+=(Ff.indexOf("?")===-1?"?":"&")+$P}return Ff}class InterceptorManager{constructor(){this.handlers=[]}use(kh,x_,B_){return this.handlers.push({fulfilled:kh,rejected:x_,synchronous:B_?B_.synchronous:!1,runWhen:B_?B_.runWhen:null}),this.handlers.length-1}eject(kh){this.handlers[kh]&&(this.handlers[kh]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(kh){utils$1.forEach(this.handlers,function(B_){B_!==null&&kh(B_)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",hasStandardBrowserEnv=(Ff=>hasBrowserEnv&&["ReactNative","NativeScript","NS"].indexOf(Ff)<0)(typeof navigator<"u"&&navigator.product),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(Ff,kh){return toFormData(Ff,new platform.classes.URLSearchParams,Object.assign({visitor:function(x_,B_,$_,$P){return platform.isNode&&utils$1.isBuffer(x_)?(this.append(B_,x_.toString("base64")),!1):$P.defaultVisitor.apply(this,arguments)}},kh))}function parsePropPath(Ff){return utils$1.matchAll(/\w+|\[(\w*)]/g,Ff).map(kh=>kh[0]==="[]"?"":kh[1]||kh[0])}function arrayToObject(Ff){const kh={},x_=Object.keys(Ff);let B_;const $_=x_.length;let $P;for(B_=0;B_<$_;B_++)$P=x_[B_],kh[$P]=Ff[$P];return kh}function formDataToJSON(Ff){function kh(x_,B_,$_,$P){let zP=x_[$P++];if(zP==="__proto__")return!0;const eme=Number.isFinite(+zP),tme=$P>=x_.length;return zP=!zP&&utils$1.isArray($_)?$_.length:zP,tme?(utils$1.hasOwnProp($_,zP)?$_[zP]=[$_[zP],B_]:$_[zP]=B_,!eme):((!$_[zP]||!utils$1.isObject($_[zP]))&&($_[zP]=[]),kh(x_,B_,$_[zP],$P)&&utils$1.isArray($_[zP])&&($_[zP]=arrayToObject($_[zP])),!eme)}if(utils$1.isFormData(Ff)&&utils$1.isFunction(Ff.entries)){const x_={};return utils$1.forEachEntry(Ff,(B_,$_)=>{kh(parsePropPath(B_),$_,x_,0)}),x_}return null}function stringifySafely(Ff,kh,x_){if(utils$1.isString(Ff))try{return(kh||JSON.parse)(Ff),utils$1.trim(Ff)}catch(B_){if(B_.name!=="SyntaxError")throw B_}return(x_||JSON.stringify)(Ff)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function(kh,x_){const B_=x_.getContentType()||"",$_=B_.indexOf("application/json")>-1,$P=utils$1.isObject(kh);if($P&&utils$1.isHTMLForm(kh)&&(kh=new FormData(kh)),utils$1.isFormData(kh))return $_?JSON.stringify(formDataToJSON(kh)):kh;if(utils$1.isArrayBuffer(kh)||utils$1.isBuffer(kh)||utils$1.isStream(kh)||utils$1.isFile(kh)||utils$1.isBlob(kh))return kh;if(utils$1.isArrayBufferView(kh))return kh.buffer;if(utils$1.isURLSearchParams(kh))return x_.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),kh.toString();let eme;if($P){if(B_.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(kh,this.formSerializer).toString();if((eme=utils$1.isFileList(kh))||B_.indexOf("multipart/form-data")>-1){const tme=this.env&&this.env.FormData;return toFormData(eme?{"files[]":kh}:kh,tme&&new tme,this.formSerializer)}}return $P||$_?(x_.setContentType("application/json",!1),stringifySafely(kh)):kh}],transformResponse:[function(kh){const x_=this.transitional||defaults$1.transitional,B_=x_&&x_.forcedJSONParsing,$_=this.responseType==="json";if(kh&&utils$1.isString(kh)&&(B_&&!this.responseType||$_)){const zP=!(x_&&x_.silentJSONParsing)&&$_;try{return JSON.parse(kh)}catch(eme){if(zP)throw eme.name==="SyntaxError"?AxiosError.from(eme,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):eme}}return kh}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(kh){return kh>=200&&kh<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],Ff=>{defaults$1.headers[Ff]={}});const defaults$2=defaults$1,ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=Ff=>{const kh={};let x_,B_,$_;return Ff&&Ff.split(`
|
|
406
|
+
`)),zP.setMeta("paste",!0),Ff.dispatch(zP),!0}}})]}});function parseNodes(Ff,kh=[]){return Ff.map(x_=>{const B_=[...kh,...x_.properties?x_.properties.className:[]];return x_.children?parseNodes(x_.children,B_):{text:x_.value,classes:B_}}).flat()}function getHighlightNodes(Ff){return Ff.value||Ff.children||[]}function registered(Ff){return!!HighlightJS.getLanguage(Ff)}function getDecorations({doc:Ff,name:kh,lowlight:x_,defaultLanguage:B_}){const $_=[];return findChildren(Ff,$P=>$P.type.name===kh).forEach($P=>{let zP=$P.pos+1;const eme=$P.node.attrs.language||B_,tme=x_.listLanguages(),nme=eme&&(tme.includes(eme)||registered(eme))?getHighlightNodes(x_.highlight(eme,$P.node.textContent)):getHighlightNodes(x_.highlightAuto($P.node.textContent));parseNodes(nme).forEach(rme=>{const ime=zP+rme.text.length;if(rme.classes.length){const ome=Decoration.inline(zP,ime,{class:rme.classes.join(" ")});$_.push(ome)}zP=ime})}),DecorationSet.create(Ff,$_)}function isFunction$1(Ff){return typeof Ff=="function"}function LowlightPlugin({name:Ff,lowlight:kh,defaultLanguage:x_}){if(!["highlight","highlightAuto","listLanguages"].every($_=>isFunction$1(kh[$_])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const B_=new Plugin({key:new PluginKey("lowlight"),state:{init:($_,{doc:$P})=>getDecorations({doc:$P,name:Ff,lowlight:kh,defaultLanguage:x_}),apply:($_,$P,zP,eme)=>{const tme=zP.selection.$head.parent.type.name,nme=eme.selection.$head.parent.type.name,rme=findChildren(zP.doc,ome=>ome.type.name===Ff),ime=findChildren(eme.doc,ome=>ome.type.name===Ff);return $_.docChanged&&([tme,nme].includes(Ff)||ime.length!==rme.length||$_.steps.some(ome=>ome.from!==void 0&&ome.to!==void 0&&rme.some(ame=>ame.pos>=ome.from&&ame.pos+ame.node.nodeSize<=ome.to)))?getDecorations({doc:$_.doc,name:Ff,lowlight:kh,defaultLanguage:x_}):$P.map($_.mapping,$_.doc)}},props:{decorations($_){return B_.getState($_)}}});return B_}const CodeBlockView=({editor:Ff,node:kh,updateAttributes:x_,extension:B_})=>{var lme,dme,fme,pme,hme,mme,_me;const $_=React.useContext(shareData),[$P,zP]=React.useState("light"),[eme,tme]=React.useState(((lme=kh==null?void 0:kh.attrs)==null?void 0:lme.exec)||!1),[nme,rme]=React.useState(!1),[ime,ome]=React.useState(!1),ame=gme=>{x_({language:gme})},cme=gme=>{var Sme;const vme=(Sme=gme==null?void 0:gme.target)==null?void 0:Sme.checked;tme(vme),x_({exec:vme})},ume=()=>{var gme;(gme=navigator==null?void 0:navigator.clipboard)==null||gme.writeText(kh==null?void 0:kh.textContent).then(()=>{rme(!0);const vme=setTimeout(()=>{rme(!1),clearTimeout(vme)},2e3)})},sme=()=>{var gme;(gme=B_==null?void 0:B_.options)==null||gme.onExec(kh==null?void 0:kh.textContent)};return React.useEffect(()=>{eme&&($_!=null&&$_.template)?zP("dark"):zP("light")},[eme,$_==null?void 0:$_.template]),jsxRuntimeExports.jsx(NodeViewWrapper,{children:jsxRuntimeExports.jsxs("div",{className:`code-block code-block-${$P}`,onMouseEnter:()=>ome(!0),onMouseLeave:()=>ome(!1),children:[jsxRuntimeExports.jsxs("div",{className:"code-block-header",contentEditable:!1,style:{display:ime?"flex":"none"},children:[jsxRuntimeExports.jsxs("div",{className:"code-block-header-left",children:[((Ff==null?void 0:Ff.isEditable)||!(Ff!=null&&Ff.isEditable)&&((dme=kh==null?void 0:kh.attrs)==null?void 0:dme.language))&&jsxRuntimeExports.jsx(Select$1,{disabled:!(Ff!=null&&Ff.isEditable),placeholder:"请选择语言",defaultValue:((fme=kh==null?void 0:kh.attrs)==null?void 0:fme.language)||void 0,style:{width:100},onChange:ame,options:[...(mme=(hme=(pme=B_==null?void 0:B_.options)==null?void 0:pme.lowlight)==null?void 0:hme.listLanguages())==null?void 0:mme.map(gme=>({value:gme,label:gme}))]}),($_==null?void 0:$_.template)&&jsxRuntimeExports.jsx(Select$1,{disabled:!0,defaultValue:(_me=$_==null?void 0:$_.template)==null?void 0:_me.name})]}),($_==null?void 0:$_.template)&&(Ff==null?void 0:Ff.isEditable)&&jsxRuntimeExports.jsx("div",{className:"code-block-header-right",children:jsxRuntimeExports.jsx(Checkbox$1,{checked:eme,onChange:cme,children:"执行"})})]}),jsxRuntimeExports.jsx("pre",{className:"code-block-body",children:jsxRuntimeExports.jsx(NodeViewContent,{as:"code"})}),jsxRuntimeExports.jsxs("div",{className:"code-block-action",contentEditable:!1,children:[eme&&($_==null?void 0:$_.template)&&jsxRuntimeExports.jsx(Button$1,{type:"primary",onClick:sme,children:"执行"}),jsxRuntimeExports.jsxs("div",{className:"code-block-action-copy",children:[nme&&jsxRuntimeExports.jsxs("div",{className:"copy-tip",children:[jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("rect",{opacity:"0.01",width:"16",height:"16",fill:"black"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 1C4.13438 1 1 4.13438 1 8C1 11.8656 4.13438 15 8 15C11.8656 15 15 11.8656 15 8C15 4.13438 11.8656 1 8 1Z",fill:"#30C213"}),jsxRuntimeExports.jsx("path",{d:"M3.75391 8.76556C3.75391 8.76556 5.94801 10.5554 6.16596 12.0777C6.16596 12.0777 9.04299 7.38086 12.2397 6.96062C12.2397 6.96062 11.2662 6.25307 11.5858 5.13477C11.5858 5.13477 9.81311 5.31117 6.4711 10.4844L4.9048 7.8329L3.75391 8.76556Z",fill:"white"})]}),jsxRuntimeExports.jsx("span",{children:"复制成功"})]}),jsxRuntimeExports.jsx(Button$1,{type:"primary",onClick:ume,children:"复制"})]})]})]})})},CodeBlockLowlight=CodeBlock.extend({addOptions(){var Ff;return{...(Ff=this.parent)==null?void 0:Ff.call(this),lowlight:{},defaultLanguage:null}},addNodeView(){return ReactNodeViewRenderer(CodeBlockView)},addProseMirrorPlugins(){var Ff;return[...((Ff=this.parent)==null?void 0:Ff.call(this))||[],LowlightPlugin({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),FloatingMenuPlugin=Ff=>{var $P,zP;let kh,x_={},B_=!1;return($P=Ff.tip)==null||$P.emitter.on("hover",({node:eme,pos:tme,range:nme})=>{x_={node:eme,pos:tme,range:nme}}),(zP=Ff.tip)==null||zP.emitter.on("show",eme=>{B_=eme.show}),new Plugin({key:new PluginKey(Ff.pluginKey),view:eme=>({update(tme,nme){var cme,ume,sme;const{anchor:rme}=tme.state.selection,{anchor:ime}=nme.selection,{node:ome,pos:ame}=x_;(cme=Ff.tip)!=null&&cme.isShow&&rme>=ame&&rme<ame+ome.nodeSize&&(ime<ame||ime>=ame+ome.nodeSize)||rme!==ime&&((ume=Ff.tip)!=null&&ume.isShow)&&((sme=Ff.tip.tippy)==null||sme.hide())},destroy(){var tme;(tme=Ff.tip)==null||tme.destroy()}}),props:{handleDOMEvents:{mousemove:(eme,tme)=>{kh&&clearTimeout(kh);const{editor:nme,tip:rme}=Ff;nme.isEditable&&(kh=setTimeout(()=>{rme==null||rme.move(eme,tme)},0))},wheel:()=>{var eme;(eme=Ff.tip)==null||eme.hide()}},decorations(eme){if(B_&&x_.node){const tme=Decoration.node(x_.range.from,x_.range.to,{style:"background: rgba(22,119,255,0.10); border-radius: 4px;"});return DecorationSet.create(eme.doc,[tme])}return null}}})},TableSelect=Ff=>{const{onClick:kh}=Ff,[x_,B_]=React.useState({row:0,col:0}),[$_,$P]=React.useState([]);React.useEffect(()=>{const rme=[];for(let ime=0;ime<9;ime++){rme[ime]=[];for(let ome=0;ome<9;ome++)ime<x_.row&&ome<x_.col?rme[ime][ome]=!0:rme[ime][ome]=!1}$P(rme)},[x_]);const zP=nme=>{const{dataset:rme}=nme.target;if(rme.row){const{row:ime,col:ome}=rme;B_({row:parseInt(ime),col:parseInt(ome)})}else{const ime=nme.target.getBoundingClientRect(),ome=nme.clientX-ime.left-nme.target.clientLeft-10,ame=nme.clientY-ime.top-nme.target.clientTop-10;let cme,ume;ome<0?ume=0:(ume=Math.ceil(ome/26),ume=Math.min(ume,9)),ame<0?cme=0:(cme=Math.ceil(ame/26),cme=Math.min(cme,9)),B_(cme===0||ume===0?{row:0,col:0}:{row:cme,col:ume})}},eme=nme=>{B_({row:0,col:0})},tme=()=>{x_.row&&(kh==null||kh(x_))};return jsxRuntimeExports.jsxs("div",{className:"tiptap-table-select",children:[jsxRuntimeExports.jsxs("div",{className:"tiptap-table-select-title",children:[jsxRuntimeExports.jsx("p",{className:"tiptap-table-select-title-left",children:"表格行列"}),jsxRuntimeExports.jsx("div",{className:"tiptap-table-select-title-right",children:x_.row?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:x_.row}),jsxRuntimeExports.jsx("span",{children:"x"}),jsxRuntimeExports.jsx("span",{children:x_.col})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})})]}),jsxRuntimeExports.jsx("div",{className:"tiptap-table-select-content",onMouseMove:zP,onClick:tme,onMouseLeave:eme,children:$_.map((nme,rme)=>jsxRuntimeExports.jsx(React.Fragment,{children:nme.map((ime,ome)=>jsxRuntimeExports.jsx("div",{className:ime?"light":"","data-row":rme+1,"data-col":ome+1},`${rme}-${ome}`))},rme))})]})};function bind(Ff,kh){return function(){return Ff.apply(kh,arguments)}}const{toString:toString$1}=Object.prototype,{getPrototypeOf}=Object,kindOf=(Ff=>kh=>{const x_=toString$1.call(kh);return Ff[x_]||(Ff[x_]=x_.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=Ff=>(Ff=Ff.toLowerCase(),kh=>kindOf(kh)===Ff),typeOfTest=Ff=>kh=>typeof kh===Ff,{isArray:isArray$1}=Array,isUndefined=typeOfTest("undefined");function isBuffer$2(Ff){return Ff!==null&&!isUndefined(Ff)&&Ff.constructor!==null&&!isUndefined(Ff.constructor)&&isFunction(Ff.constructor.isBuffer)&&Ff.constructor.isBuffer(Ff)}const isArrayBuffer$1=kindOfTest("ArrayBuffer");function isArrayBufferView(Ff){let kh;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?kh=ArrayBuffer.isView(Ff):kh=Ff&&Ff.buffer&&isArrayBuffer$1(Ff.buffer),kh}const isString$1=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=Ff=>Ff!==null&&typeof Ff=="object",isBoolean=Ff=>Ff===!0||Ff===!1,isPlainObject$2=Ff=>{if(kindOf(Ff)!=="object")return!1;const kh=getPrototypeOf(Ff);return(kh===null||kh===Object.prototype||Object.getPrototypeOf(kh)===null)&&!(Symbol.toStringTag in Ff)&&!(Symbol.iterator in Ff)},isDate=kindOfTest("Date"),isFile$1=kindOfTest("File"),isBlob$1=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=Ff=>isObject(Ff)&&isFunction(Ff.pipe),isFormData=Ff=>{let kh;return Ff&&(typeof FormData=="function"&&Ff instanceof FormData||isFunction(Ff.append)&&((kh=kindOf(Ff))==="formdata"||kh==="object"&&isFunction(Ff.toString)&&Ff.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),trim=Ff=>Ff.trim?Ff.trim():Ff.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(Ff,kh,{allOwnKeys:x_=!1}={}){if(Ff===null||typeof Ff>"u")return;let B_,$_;if(typeof Ff!="object"&&(Ff=[Ff]),isArray$1(Ff))for(B_=0,$_=Ff.length;B_<$_;B_++)kh.call(null,Ff[B_],B_,Ff);else{const $P=x_?Object.getOwnPropertyNames(Ff):Object.keys(Ff),zP=$P.length;let eme;for(B_=0;B_<zP;B_++)eme=$P[B_],kh.call(null,Ff[eme],eme,Ff)}}function findKey(Ff,kh){kh=kh.toLowerCase();const x_=Object.keys(Ff);let B_=x_.length,$_;for(;B_-- >0;)if($_=x_[B_],kh===$_.toLowerCase())return $_;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=Ff=>!isUndefined(Ff)&&Ff!==_global;function merge(){const{caseless:Ff}=isContextDefined(this)&&this||{},kh={},x_=(B_,$_)=>{const $P=Ff&&findKey(kh,$_)||$_;isPlainObject$2(kh[$P])&&isPlainObject$2(B_)?kh[$P]=merge(kh[$P],B_):isPlainObject$2(B_)?kh[$P]=merge({},B_):isArray$1(B_)?kh[$P]=B_.slice():kh[$P]=B_};for(let B_=0,$_=arguments.length;B_<$_;B_++)arguments[B_]&&forEach(arguments[B_],x_);return kh}const extend$2=(Ff,kh,x_,{allOwnKeys:B_}={})=>(forEach(kh,($_,$P)=>{x_&&isFunction($_)?Ff[$P]=bind($_,x_):Ff[$P]=$_},{allOwnKeys:B_}),Ff),stripBOM=Ff=>(Ff.charCodeAt(0)===65279&&(Ff=Ff.slice(1)),Ff),inherits=(Ff,kh,x_,B_)=>{Ff.prototype=Object.create(kh.prototype,B_),Ff.prototype.constructor=Ff,Object.defineProperty(Ff,"super",{value:kh.prototype}),x_&&Object.assign(Ff.prototype,x_)},toFlatObject=(Ff,kh,x_,B_)=>{let $_,$P,zP;const eme={};if(kh=kh||{},Ff==null)return kh;do{for($_=Object.getOwnPropertyNames(Ff),$P=$_.length;$P-- >0;)zP=$_[$P],(!B_||B_(zP,Ff,kh))&&!eme[zP]&&(kh[zP]=Ff[zP],eme[zP]=!0);Ff=x_!==!1&&getPrototypeOf(Ff)}while(Ff&&(!x_||x_(Ff,kh))&&Ff!==Object.prototype);return kh},endsWith=(Ff,kh,x_)=>{Ff=String(Ff),(x_===void 0||x_>Ff.length)&&(x_=Ff.length),x_-=kh.length;const B_=Ff.indexOf(kh,x_);return B_!==-1&&B_===x_},toArray=Ff=>{if(!Ff)return null;if(isArray$1(Ff))return Ff;let kh=Ff.length;if(!isNumber(kh))return null;const x_=new Array(kh);for(;kh-- >0;)x_[kh]=Ff[kh];return x_},isTypedArray$1=(Ff=>kh=>Ff&&kh instanceof Ff)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(Ff,kh)=>{const B_=(Ff&&Ff[Symbol.iterator]).call(Ff);let $_;for(;($_=B_.next())&&!$_.done;){const $P=$_.value;kh.call(Ff,$P[0],$P[1])}},matchAll=(Ff,kh)=>{let x_;const B_=[];for(;(x_=Ff.exec(kh))!==null;)B_.push(x_);return B_},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=Ff=>Ff.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(x_,B_,$_){return B_.toUpperCase()+$_}),hasOwnProperty$2=(({hasOwnProperty:Ff})=>(kh,x_)=>Ff.call(kh,x_))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(Ff,kh)=>{const x_=Object.getOwnPropertyDescriptors(Ff),B_={};forEach(x_,($_,$P)=>{let zP;(zP=kh($_,$P,Ff))!==!1&&(B_[$P]=zP||$_)}),Object.defineProperties(Ff,B_)},freezeMethods=Ff=>{reduceDescriptors(Ff,(kh,x_)=>{if(isFunction(Ff)&&["arguments","caller","callee"].indexOf(x_)!==-1)return!1;const B_=Ff[x_];if(isFunction(B_)){if(kh.enumerable=!1,"writable"in kh){kh.writable=!1;return}kh.set||(kh.set=()=>{throw Error("Can not rewrite read-only method '"+x_+"'")})}})},toObjectSet=(Ff,kh)=>{const x_={},B_=$_=>{$_.forEach($P=>{x_[$P]=!0})};return isArray$1(Ff)?B_(Ff):B_(String(Ff).split(kh)),x_},noop$1=()=>{},toFiniteNumber=(Ff,kh)=>(Ff=+Ff,Number.isFinite(Ff)?Ff:kh),ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT$1="0123456789",ALPHABET={DIGIT:DIGIT$1,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT$1},generateString=(Ff=16,kh=ALPHABET.ALPHA_DIGIT)=>{let x_="";const{length:B_}=kh;for(;Ff--;)x_+=kh[Math.random()*B_|0];return x_};function isSpecCompliantForm(Ff){return!!(Ff&&isFunction(Ff.append)&&Ff[Symbol.toStringTag]==="FormData"&&Ff[Symbol.iterator])}const toJSONObject=Ff=>{const kh=new Array(10),x_=(B_,$_)=>{if(isObject(B_)){if(kh.indexOf(B_)>=0)return;if(!("toJSON"in B_)){kh[$_]=B_;const $P=isArray$1(B_)?[]:{};return forEach(B_,(zP,eme)=>{const tme=x_(zP,$_+1);!isUndefined(tme)&&($P[eme]=tme)}),kh[$_]=void 0,$P}}return B_};return x_(Ff,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=Ff=>Ff&&(isObject(Ff)||isFunction(Ff))&&isFunction(Ff.then)&&isFunction(Ff.catch),utils$1={isArray:isArray$1,isArrayBuffer:isArrayBuffer$1,isBuffer:isBuffer$2,isFormData,isArrayBufferView,isString:isString$1,isNumber,isBoolean,isObject,isPlainObject:isPlainObject$2,isUndefined,isDate,isFile:isFile$1,isBlob:isBlob$1,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray:isTypedArray$1,isFileList,forEach,merge,extend:extend$2,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$2,hasOwnProp:hasOwnProperty$2,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop:noop$1,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable};function AxiosError(Ff,kh,x_,B_,$_){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=Ff,this.name="AxiosError",kh&&(this.code=kh),x_&&(this.config=x_),B_&&(this.request=B_),$_&&(this.response=$_)}utils$1.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(Ff=>{descriptors[Ff]={value:Ff}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=(Ff,kh,x_,B_,$_,$P)=>{const zP=Object.create(prototype$1);return utils$1.toFlatObject(Ff,zP,function(tme){return tme!==Error.prototype},eme=>eme!=="isAxiosError"),AxiosError.call(zP,Ff.message,kh,x_,B_,$_),zP.cause=Ff,zP.name=Ff.name,$P&&Object.assign(zP,$P),zP};const httpAdapter=null;function isVisitable(Ff){return utils$1.isPlainObject(Ff)||utils$1.isArray(Ff)}function removeBrackets(Ff){return utils$1.endsWith(Ff,"[]")?Ff.slice(0,-2):Ff}function renderKey(Ff,kh,x_){return Ff?Ff.concat(kh).map(function($_,$P){return $_=removeBrackets($_),!x_&&$P?"["+$_+"]":$_}).join(x_?".":""):kh}function isFlatArray(Ff){return utils$1.isArray(Ff)&&!Ff.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(kh){return/^is[A-Z]/.test(kh)});function toFormData(Ff,kh,x_){if(!utils$1.isObject(Ff))throw new TypeError("target must be an object");kh=kh||new FormData,x_=utils$1.toFlatObject(x_,{metaTokens:!0,dots:!1,indexes:!1},!1,function(ume,sme){return!utils$1.isUndefined(sme[ume])});const B_=x_.metaTokens,$_=x_.visitor||rme,$P=x_.dots,zP=x_.indexes,tme=(x_.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(kh);if(!utils$1.isFunction($_))throw new TypeError("visitor must be a function");function nme(cme){if(cme===null)return"";if(utils$1.isDate(cme))return cme.toISOString();if(!tme&&utils$1.isBlob(cme))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(cme)||utils$1.isTypedArray(cme)?tme&&typeof Blob=="function"?new Blob([cme]):Buffer.from(cme):cme}function rme(cme,ume,sme){let lme=cme;if(cme&&!sme&&typeof cme=="object"){if(utils$1.endsWith(ume,"{}"))ume=B_?ume:ume.slice(0,-2),cme=JSON.stringify(cme);else if(utils$1.isArray(cme)&&isFlatArray(cme)||(utils$1.isFileList(cme)||utils$1.endsWith(ume,"[]"))&&(lme=utils$1.toArray(cme)))return ume=removeBrackets(ume),lme.forEach(function(fme,pme){!(utils$1.isUndefined(fme)||fme===null)&&kh.append(zP===!0?renderKey([ume],pme,$P):zP===null?ume:ume+"[]",nme(fme))}),!1}return isVisitable(cme)?!0:(kh.append(renderKey(sme,ume,$P),nme(cme)),!1)}const ime=[],ome=Object.assign(predicates,{defaultVisitor:rme,convertValue:nme,isVisitable});function ame(cme,ume){if(!utils$1.isUndefined(cme)){if(ime.indexOf(cme)!==-1)throw Error("Circular reference detected in "+ume.join("."));ime.push(cme),utils$1.forEach(cme,function(lme,dme){(!(utils$1.isUndefined(lme)||lme===null)&&$_.call(kh,lme,utils$1.isString(dme)?dme.trim():dme,ume,ome))===!0&&ame(lme,ume?ume.concat(dme):[dme])}),ime.pop()}}if(!utils$1.isObject(Ff))throw new TypeError("data must be an object");return ame(Ff),kh}function encode$1(Ff){const kh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(Ff).replace(/[!'()~]|%20|%00/g,function(B_){return kh[B_]})}function AxiosURLSearchParams(Ff,kh){this._pairs=[],Ff&&toFormData(Ff,this,kh)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(kh,x_){this._pairs.push([kh,x_])},prototype.toString=function(kh){const x_=kh?function(B_){return kh.call(this,B_,encode$1)}:encode$1;return this._pairs.map(function($_){return x_($_[0])+"="+x_($_[1])},"").join("&")};function encode(Ff){return encodeURIComponent(Ff).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(Ff,kh,x_){if(!kh)return Ff;const B_=x_&&x_.encode||encode,$_=x_&&x_.serialize;let $P;if($_?$P=$_(kh,x_):$P=utils$1.isURLSearchParams(kh)?kh.toString():new AxiosURLSearchParams(kh,x_).toString(B_),$P){const zP=Ff.indexOf("#");zP!==-1&&(Ff=Ff.slice(0,zP)),Ff+=(Ff.indexOf("?")===-1?"?":"&")+$P}return Ff}class InterceptorManager{constructor(){this.handlers=[]}use(kh,x_,B_){return this.handlers.push({fulfilled:kh,rejected:x_,synchronous:B_?B_.synchronous:!1,runWhen:B_?B_.runWhen:null}),this.handlers.length-1}eject(kh){this.handlers[kh]&&(this.handlers[kh]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(kh){utils$1.forEach(this.handlers,function(B_){B_!==null&&kh(B_)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",hasStandardBrowserEnv=(Ff=>hasBrowserEnv&&["ReactNative","NativeScript","NS"].indexOf(Ff)<0)(typeof navigator<"u"&&navigator.product),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(Ff,kh){return toFormData(Ff,new platform.classes.URLSearchParams,Object.assign({visitor:function(x_,B_,$_,$P){return platform.isNode&&utils$1.isBuffer(x_)?(this.append(B_,x_.toString("base64")),!1):$P.defaultVisitor.apply(this,arguments)}},kh))}function parsePropPath(Ff){return utils$1.matchAll(/\w+|\[(\w*)]/g,Ff).map(kh=>kh[0]==="[]"?"":kh[1]||kh[0])}function arrayToObject(Ff){const kh={},x_=Object.keys(Ff);let B_;const $_=x_.length;let $P;for(B_=0;B_<$_;B_++)$P=x_[B_],kh[$P]=Ff[$P];return kh}function formDataToJSON(Ff){function kh(x_,B_,$_,$P){let zP=x_[$P++];if(zP==="__proto__")return!0;const eme=Number.isFinite(+zP),tme=$P>=x_.length;return zP=!zP&&utils$1.isArray($_)?$_.length:zP,tme?(utils$1.hasOwnProp($_,zP)?$_[zP]=[$_[zP],B_]:$_[zP]=B_,!eme):((!$_[zP]||!utils$1.isObject($_[zP]))&&($_[zP]=[]),kh(x_,B_,$_[zP],$P)&&utils$1.isArray($_[zP])&&($_[zP]=arrayToObject($_[zP])),!eme)}if(utils$1.isFormData(Ff)&&utils$1.isFunction(Ff.entries)){const x_={};return utils$1.forEachEntry(Ff,(B_,$_)=>{kh(parsePropPath(B_),$_,x_,0)}),x_}return null}function stringifySafely(Ff,kh,x_){if(utils$1.isString(Ff))try{return(kh||JSON.parse)(Ff),utils$1.trim(Ff)}catch(B_){if(B_.name!=="SyntaxError")throw B_}return(x_||JSON.stringify)(Ff)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function(kh,x_){const B_=x_.getContentType()||"",$_=B_.indexOf("application/json")>-1,$P=utils$1.isObject(kh);if($P&&utils$1.isHTMLForm(kh)&&(kh=new FormData(kh)),utils$1.isFormData(kh))return $_?JSON.stringify(formDataToJSON(kh)):kh;if(utils$1.isArrayBuffer(kh)||utils$1.isBuffer(kh)||utils$1.isStream(kh)||utils$1.isFile(kh)||utils$1.isBlob(kh))return kh;if(utils$1.isArrayBufferView(kh))return kh.buffer;if(utils$1.isURLSearchParams(kh))return x_.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),kh.toString();let eme;if($P){if(B_.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(kh,this.formSerializer).toString();if((eme=utils$1.isFileList(kh))||B_.indexOf("multipart/form-data")>-1){const tme=this.env&&this.env.FormData;return toFormData(eme?{"files[]":kh}:kh,tme&&new tme,this.formSerializer)}}return $P||$_?(x_.setContentType("application/json",!1),stringifySafely(kh)):kh}],transformResponse:[function(kh){const x_=this.transitional||defaults$1.transitional,B_=x_&&x_.forcedJSONParsing,$_=this.responseType==="json";if(kh&&utils$1.isString(kh)&&(B_&&!this.responseType||$_)){const zP=!(x_&&x_.silentJSONParsing)&&$_;try{return JSON.parse(kh)}catch(eme){if(zP)throw eme.name==="SyntaxError"?AxiosError.from(eme,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):eme}}return kh}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(kh){return kh>=200&&kh<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],Ff=>{defaults$1.headers[Ff]={}});const defaults$2=defaults$1,ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=Ff=>{const kh={};let x_,B_,$_;return Ff&&Ff.split(`
|
|
407
407
|
`).forEach(function(zP){$_=zP.indexOf(":"),x_=zP.substring(0,$_).trim().toLowerCase(),B_=zP.substring($_+1).trim(),!(!x_||kh[x_]&&ignoreDuplicateOf[x_])&&(x_==="set-cookie"?kh[x_]?kh[x_].push(B_):kh[x_]=[B_]:kh[x_]=kh[x_]?kh[x_]+", "+B_:B_)}),kh},$internals=Symbol("internals");function normalizeHeader(Ff){return Ff&&String(Ff).trim().toLowerCase()}function normalizeValue(Ff){return Ff===!1||Ff==null?Ff:utils$1.isArray(Ff)?Ff.map(normalizeValue):String(Ff)}function parseTokens(Ff){const kh=Object.create(null),x_=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let B_;for(;B_=x_.exec(Ff);)kh[B_[1]]=B_[2];return kh}const isValidHeaderName=Ff=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(Ff.trim());function matchHeaderValue(Ff,kh,x_,B_,$_){if(utils$1.isFunction(B_))return B_.call(this,kh,x_);if($_&&(kh=x_),!!utils$1.isString(kh)){if(utils$1.isString(B_))return kh.indexOf(B_)!==-1;if(utils$1.isRegExp(B_))return B_.test(kh)}}function formatHeader(Ff){return Ff.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(kh,x_,B_)=>x_.toUpperCase()+B_)}function buildAccessors(Ff,kh){const x_=utils$1.toCamelCase(" "+kh);["get","set","has"].forEach(B_=>{Object.defineProperty(Ff,B_+x_,{value:function($_,$P,zP){return this[B_].call(this,kh,$_,$P,zP)},configurable:!0})})}class AxiosHeaders{constructor(kh){kh&&this.set(kh)}set(kh,x_,B_){const $_=this;function $P(eme,tme,nme){const rme=normalizeHeader(tme);if(!rme)throw new Error("header name must be a non-empty string");const ime=utils$1.findKey($_,rme);(!ime||$_[ime]===void 0||nme===!0||nme===void 0&&$_[ime]!==!1)&&($_[ime||tme]=normalizeValue(eme))}const zP=(eme,tme)=>utils$1.forEach(eme,(nme,rme)=>$P(nme,rme,tme));return utils$1.isPlainObject(kh)||kh instanceof this.constructor?zP(kh,x_):utils$1.isString(kh)&&(kh=kh.trim())&&!isValidHeaderName(kh)?zP(parseHeaders(kh),x_):kh!=null&&$P(x_,kh,B_),this}get(kh,x_){if(kh=normalizeHeader(kh),kh){const B_=utils$1.findKey(this,kh);if(B_){const $_=this[B_];if(!x_)return $_;if(x_===!0)return parseTokens($_);if(utils$1.isFunction(x_))return x_.call(this,$_,B_);if(utils$1.isRegExp(x_))return x_.exec($_);throw new TypeError("parser must be boolean|regexp|function")}}}has(kh,x_){if(kh=normalizeHeader(kh),kh){const B_=utils$1.findKey(this,kh);return!!(B_&&this[B_]!==void 0&&(!x_||matchHeaderValue(this,this[B_],B_,x_)))}return!1}delete(kh,x_){const B_=this;let $_=!1;function $P(zP){if(zP=normalizeHeader(zP),zP){const eme=utils$1.findKey(B_,zP);eme&&(!x_||matchHeaderValue(B_,B_[eme],eme,x_))&&(delete B_[eme],$_=!0)}}return utils$1.isArray(kh)?kh.forEach($P):$P(kh),$_}clear(kh){const x_=Object.keys(this);let B_=x_.length,$_=!1;for(;B_--;){const $P=x_[B_];(!kh||matchHeaderValue(this,this[$P],$P,kh,!0))&&(delete this[$P],$_=!0)}return $_}normalize(kh){const x_=this,B_={};return utils$1.forEach(this,($_,$P)=>{const zP=utils$1.findKey(B_,$P);if(zP){x_[zP]=normalizeValue($_),delete x_[$P];return}const eme=kh?formatHeader($P):String($P).trim();eme!==$P&&delete x_[$P],x_[eme]=normalizeValue($_),B_[eme]=!0}),this}concat(...kh){return this.constructor.concat(this,...kh)}toJSON(kh){const x_=Object.create(null);return utils$1.forEach(this,(B_,$_)=>{B_!=null&&B_!==!1&&(x_[$_]=kh&&utils$1.isArray(B_)?B_.join(", "):B_)}),x_}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([kh,x_])=>kh+": "+x_).join(`
|
|
408
408
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(kh){return kh instanceof this?kh:new this(kh)}static concat(kh,...x_){const B_=new this(kh);return x_.forEach($_=>B_.set($_)),B_}static accessor(kh){const B_=(this[$internals]=this[$internals]={accessors:{}}).accessors,$_=this.prototype;function $P(zP){const eme=normalizeHeader(zP);B_[eme]||(buildAccessors($_,zP),B_[eme]=!0)}return utils$1.isArray(kh)?kh.forEach($P):$P(kh),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders.prototype,({value:Ff},kh)=>{let x_=kh[0].toUpperCase()+kh.slice(1);return{get:()=>Ff,set(B_){this[x_]=B_}}}),utils$1.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(Ff,kh){const x_=this||defaults$2,B_=kh||x_,$_=AxiosHeaders$1.from(B_.headers);let $P=B_.data;return utils$1.forEach(Ff,function(eme){$P=eme.call(x_,$P,$_.normalize(),kh?kh.status:void 0)}),$_.normalize(),$P}function isCancel(Ff){return!!(Ff&&Ff.__CANCEL__)}function CanceledError(Ff,kh,x_){AxiosError.call(this,Ff??"canceled",AxiosError.ERR_CANCELED,kh,x_),this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(Ff,kh,x_){const B_=x_.config.validateStatus;!x_.status||!B_||B_(x_.status)?Ff(x_):kh(new AxiosError("Request failed with status code "+x_.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(x_.status/100)-4],x_.config,x_.request,x_))}const cookies=platform.hasStandardBrowserEnv?{write(Ff,kh,x_,B_,$_,$P){const zP=[Ff+"="+encodeURIComponent(kh)];utils$1.isNumber(x_)&&zP.push("expires="+new Date(x_).toGMTString()),utils$1.isString(B_)&&zP.push("path="+B_),utils$1.isString($_)&&zP.push("domain="+$_),$P===!0&&zP.push("secure"),document.cookie=zP.join("; ")},read(Ff){const kh=document.cookie.match(new RegExp("(^|;\\s*)("+Ff+")=([^;]*)"));return kh?decodeURIComponent(kh[3]):null},remove(Ff){this.write(Ff,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(Ff){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(Ff)}function combineURLs(Ff,kh){return kh?Ff.replace(/\/?\/$/,"")+"/"+kh.replace(/^\/+/,""):Ff}function buildFullPath(Ff,kh){return Ff&&!isAbsoluteURL(kh)?combineURLs(Ff,kh):kh}const isURLSameOrigin=platform.hasStandardBrowserEnv?function(){const kh=/(msie|trident)/i.test(navigator.userAgent),x_=document.createElement("a");let B_;function $_($P){let zP=$P;return kh&&(x_.setAttribute("href",zP),zP=x_.href),x_.setAttribute("href",zP),{href:x_.href,protocol:x_.protocol?x_.protocol.replace(/:$/,""):"",host:x_.host,search:x_.search?x_.search.replace(/^\?/,""):"",hash:x_.hash?x_.hash.replace(/^#/,""):"",hostname:x_.hostname,port:x_.port,pathname:x_.pathname.charAt(0)==="/"?x_.pathname:"/"+x_.pathname}}return B_=$_(window.location.href),function(zP){const eme=utils$1.isString(zP)?$_(zP):zP;return eme.protocol===B_.protocol&&eme.host===B_.host}}():function(){return function(){return!0}}();function parseProtocol(Ff){const kh=/^([-+\w]{1,25})(:?\/\/|:)/.exec(Ff);return kh&&kh[1]||""}function speedometer(Ff,kh){Ff=Ff||10;const x_=new Array(Ff),B_=new Array(Ff);let $_=0,$P=0,zP;return kh=kh!==void 0?kh:1e3,function(tme){const nme=Date.now(),rme=B_[$P];zP||(zP=nme),x_[$_]=tme,B_[$_]=nme;let ime=$P,ome=0;for(;ime!==$_;)ome+=x_[ime++],ime=ime%Ff;if($_=($_+1)%Ff,$_===$P&&($P=($P+1)%Ff),nme-zP<kh)return;const ame=rme&&nme-rme;return ame?Math.round(ome*1e3/ame):void 0}}function progressEventReducer(Ff,kh){let x_=0;const B_=speedometer(50,250);return $_=>{const $P=$_.loaded,zP=$_.lengthComputable?$_.total:void 0,eme=$P-x_,tme=B_(eme),nme=$P<=zP;x_=$P;const rme={loaded:$P,total:zP,progress:zP?$P/zP:void 0,bytes:eme,rate:tme||void 0,estimated:tme&&zP&&nme?(zP-$P)/tme:void 0,event:$_};rme[kh?"download":"upload"]=!0,Ff(rme)}}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(Ff){return new Promise(function(x_,B_){let $_=Ff.data;const $P=AxiosHeaders$1.from(Ff.headers).normalize();let{responseType:zP,withXSRFToken:eme}=Ff,tme;function nme(){Ff.cancelToken&&Ff.cancelToken.unsubscribe(tme),Ff.signal&&Ff.signal.removeEventListener("abort",tme)}let rme;if(utils$1.isFormData($_)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)$P.setContentType(!1);else if((rme=$P.getContentType())!==!1){const[ume,...sme]=rme?rme.split(";").map(lme=>lme.trim()).filter(Boolean):[];$P.setContentType([ume||"multipart/form-data",...sme].join("; "))}}let ime=new XMLHttpRequest;if(Ff.auth){const ume=Ff.auth.username||"",sme=Ff.auth.password?unescape(encodeURIComponent(Ff.auth.password)):"";$P.set("Authorization","Basic "+btoa(ume+":"+sme))}const ome=buildFullPath(Ff.baseURL,Ff.url);ime.open(Ff.method.toUpperCase(),buildURL(ome,Ff.params,Ff.paramsSerializer),!0),ime.timeout=Ff.timeout;function ame(){if(!ime)return;const ume=AxiosHeaders$1.from("getAllResponseHeaders"in ime&&ime.getAllResponseHeaders()),lme={data:!zP||zP==="text"||zP==="json"?ime.responseText:ime.response,status:ime.status,statusText:ime.statusText,headers:ume,config:Ff,request:ime};settle(function(fme){x_(fme),nme()},function(fme){B_(fme),nme()},lme),ime=null}if("onloadend"in ime?ime.onloadend=ame:ime.onreadystatechange=function(){!ime||ime.readyState!==4||ime.status===0&&!(ime.responseURL&&ime.responseURL.indexOf("file:")===0)||setTimeout(ame)},ime.onabort=function(){ime&&(B_(new AxiosError("Request aborted",AxiosError.ECONNABORTED,Ff,ime)),ime=null)},ime.onerror=function(){B_(new AxiosError("Network Error",AxiosError.ERR_NETWORK,Ff,ime)),ime=null},ime.ontimeout=function(){let sme=Ff.timeout?"timeout of "+Ff.timeout+"ms exceeded":"timeout exceeded";const lme=Ff.transitional||transitionalDefaults;Ff.timeoutErrorMessage&&(sme=Ff.timeoutErrorMessage),B_(new AxiosError(sme,lme.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,Ff,ime)),ime=null},platform.hasStandardBrowserEnv&&(eme&&utils$1.isFunction(eme)&&(eme=eme(Ff)),eme||eme!==!1&&isURLSameOrigin(ome))){const ume=Ff.xsrfHeaderName&&Ff.xsrfCookieName&&cookies.read(Ff.xsrfCookieName);ume&&$P.set(Ff.xsrfHeaderName,ume)}$_===void 0&&$P.setContentType(null),"setRequestHeader"in ime&&utils$1.forEach($P.toJSON(),function(sme,lme){ime.setRequestHeader(lme,sme)}),utils$1.isUndefined(Ff.withCredentials)||(ime.withCredentials=!!Ff.withCredentials),zP&&zP!=="json"&&(ime.responseType=Ff.responseType),typeof Ff.onDownloadProgress=="function"&&ime.addEventListener("progress",progressEventReducer(Ff.onDownloadProgress,!0)),typeof Ff.onUploadProgress=="function"&&ime.upload&&ime.upload.addEventListener("progress",progressEventReducer(Ff.onUploadProgress)),(Ff.cancelToken||Ff.signal)&&(tme=ume=>{ime&&(B_(!ume||ume.type?new CanceledError(null,Ff,ime):ume),ime.abort(),ime=null)},Ff.cancelToken&&Ff.cancelToken.subscribe(tme),Ff.signal&&(Ff.signal.aborted?tme():Ff.signal.addEventListener("abort",tme)));const cme=parseProtocol(ome);if(cme&&platform.protocols.indexOf(cme)===-1){B_(new AxiosError("Unsupported protocol "+cme+":",AxiosError.ERR_BAD_REQUEST,Ff));return}ime.send($_||null)})},knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils$1.forEach(knownAdapters,(Ff,kh)=>{if(Ff){try{Object.defineProperty(Ff,"name",{value:kh})}catch{}Object.defineProperty(Ff,"adapterName",{value:kh})}});const renderReason=Ff=>`- ${Ff}`,isResolvedHandle=Ff=>utils$1.isFunction(Ff)||Ff===null||Ff===!1,adapters={getAdapter:Ff=>{Ff=utils$1.isArray(Ff)?Ff:[Ff];const{length:kh}=Ff;let x_,B_;const $_={};for(let $P=0;$P<kh;$P++){x_=Ff[$P];let zP;if(B_=x_,!isResolvedHandle(x_)&&(B_=knownAdapters[(zP=String(x_)).toLowerCase()],B_===void 0))throw new AxiosError(`Unknown adapter '${zP}'`);if(B_)break;$_[zP||"#"+$P]=B_}if(!B_){const $P=Object.entries($_).map(([eme,tme])=>`adapter ${eme} `+(tme===!1?"is not supported by the environment":"is not available in the build"));let zP=kh?$P.length>1?`since :
|
|
409
409
|
`+$P.map(renderReason).join(`
|