WokerTask/public/admin/assets/@wangeditor.fcd049a6.js

181 lines
746 KiB
JavaScript
Raw Normal View History

2023-12-29 18:51:22 +08:00
import{d as g9,r as v2,s as HP,i as UP,w as VP,k as WP,t as qP,o as v9,c as m9}from"./@vue.f8dfc830.js";var Pv;if(typeof global>"u"){if("ActiveXObject"in window){var d5="\u62B1\u6B49\uFF0CwangEditor V5+ \u7248\u672C\u5F00\u59CB\uFF0C\u4E0D\u5728\u652F\u6301 IE \u6D4F\u89C8\u5668";d5+=`
Sorry, wangEditor V5+ versions do not support IE browser.`,console.error(d5)}p5(),h5()}else global&&((Pv=global.navigator)===null||Pv===void 0?void 0:Pv.userAgent.match("QQBrowser"))&&(p5(),h5());function p5(){typeof globalThis>"u"&&(window.globalThis=window)}function h5(){typeof AggregateError>"u"&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}if(typeof global=="object"){var GP=Object.getOwnPropertyDescriptor(global,"window");(!global.window||GP.set)&&(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),global.document!=null&&global.document.getElementsByTagName==null&&(global.document.getElementsByTagName=function(){return[]})}/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function g5(e){return Object.prototype.toString.call(e)==="[object Object]"}function Zt(e){var t,n;return g5(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(g5(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function Ht(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];{var i=tN[e],o=i?typeof i=="function"?i.apply(null,n):i:"unknown error nr: "+e;throw Error("[Immer] "+o)}}function Oa(e){return!!e&&!!e[xn]}function Ba(e){return!!e&&(function(t){if(!t||typeof t!="object")return!1;var n=Object.getPrototypeOf(t);if(n===null)return!0;var r=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return r===Object||typeof r=="function"&&Function.toString.call(r)===nN}(e)||Array.isArray(e)||!!e[C5]||!!e.constructor[C5]||E$(e)||C$(e))}function qc(e,t,n){n===void 0&&(n=!1),Ts(e)===0?(n?Object.keys:O$)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function Ts(e){var t=e[xn];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:E$(e)?2:C$(e)?3:0}function m2(e,t){return Ts(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function KP(e,t){return Ts(e)===2?e.get(t):e[t]}function y9(e,t,n){var r=Ts(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function YP(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function E$(e){return QP&&e instanceof Map}function C$(e){return eN&&e instanceof Set}function Xo(e){return e.o||e.t}function D$(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=rN(e);delete t[xn];for(var n=O$(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function S$(e,t){return t===void 0&&(t=!1),x$(e)||Oa(e)||!Ba(e)||(Ts(e)>1&&(e.set=e.add=e.clear=e.delete=XP),Object.freeze(e),t&&qc(e,function(n,r){return S$(r,!0)},!0)),e}function XP(){Ht(2)}function x$(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function si(e){var t=iN[e];return t||Ht(18,e),t}function v5(){return os||Ht(0),os}function Nv(e,t){t&&(si("Patches"),e.u=[],e.s=[],e.v=t)}function nh(e){y2(e),e.p.forEach(JP),e.p=null}function y2(e){e===os&&(os=e.l)}function m5(e){return os={p:[],l:os,h:e,m:!0,_:0}}function JP(e){var t=e[xn];t.i===0||t.i===1?t.j():t.O=!0}function Iv(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||si("ES5").S(t,e,r),r?(n[xn].P&&(nh(t),Ht(4)),Ba(e)&&(e=rh(t,e),t.l||ih(t,e)),t.u&&si("Patches").M(n[xn],e,t.u,t.s)):e=rh(t,n,[]),nh(t),t.u&&t.v(t.u,t.s),e!==b9?e:void 0}function rh(e,t,n){if(x$(t))return t;var r=t[xn];if(!r)return qc(t,function(o,a){return y5(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ih(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=D$(r.k):r.o;qc(r.i===3?new Set(i):i,function(o,a){return y5(e,r,i,o,a,n)}),ih(e,i,!1),n&&e.u&&si("Patches").R(r,n,e.u,e.s)}return r.o}function y5(e,t,n,r,i,o){if(i===n&&Ht(5),Oa(i)){var a=rh(e,i,o&&t&&t.i!==3&&!m2(t.D,r)?o.concat(r):void 0);if(y9(n,r,a),!Oa(a))return;e.m=!1}if(Ba(i)&&!x$(i)){if(!e.h.F&&e._<1)return;rh(e,i),t&&t.A.l||ih(e,i)}}function ih(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&S$(t,n)}function Rv(e,t){var n=e[xn];return(n?Xo(n):e)[t]}function b5(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function b2(e){e.P||(e.P=!0,e.l&&b2(e.l))}function jv(e){e.o||(e.o=D$(e.t))}function $2(e,t,n){var r=E$(t)?si("MapSet").N(t,n):C$(t)?si("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),u={i:a?1:0,A:o?o.A:v5(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=u,l=Bp;a&&(s=[u],l=Fp);var c=Proxy.revocable(s,l),f=c.revoke,d=c.proxy;return u.k=d,u.j=f,d}(t,n):si("ES5").J(t,n);return(n?n.A:v5()).p.push(r),r}function ZP(e){return Oa(e)||Ht(22,e),function t(n){if(!Ba(n))return n;var r,i=n[xn],o=Ts(n);if(i){if(!i.P&&(i.i<4||!si("ES5").K(i)))return i.t;i.I=!0,r=$5(n,o),i.I=!1}else r=$5(n,o);return qc(r,function(a,u){i&&KP(i.t,a)===u||y9(r,a,t(u))}),o===3?new S
Could not completely normalize the editor after `.concat(l,` iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.
`));var f=r(e).pop();if(W.has(e,f)){var d=E.node(e,f);e.normalizeNode(d)}c++}})}},parent(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=_.parent(r),o=E.node(e,i);return o},path(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:r,edge:i}=n;if(_.isPath(t)){if(i==="start"){var[,o]=W.first(e,t);t=o}else if(i==="end"){var[,a]=W.last(e,t);t=a}}return R.isRange(t)&&(i==="start"?t=R.start(t):i==="end"?t=R.end(t):t=_.common(t.anchor.path,t.focus.path)),$e.isPoint(t)&&(t=t.path),r!=null&&(t=t.slice(0,r)),t},hasPath(e,t){return W.has(e,t)},pathRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.pathRefs(e);return u.delete(i),i.current=null,a}},o=E.pathRefs(e);return o.add(i),i},pathRefs(e){var t=A5.get(e);return t||(t=new Set,A5.set(e,t)),t},point(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:r="start"}=n;if(_.isPath(t)){var i;if(r==="end"){var[,o]=W.last(e,t);i=o}else{var[,a]=W.first(e,t);i=a}var u=W.get(e,i);if(!X.isText(u))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:i,offset:r==="end"?u.text.length:0}}if(R.isRange(t)){var[s,l]=R.edges(t);return r==="start"?s:l}return t},pointRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.pointRefs(e);return u.delete(i),i.current=null,a}},o=E.pointRefs(e);return o.add(i),i},pointRefs(e){var t=O5.get(e);return t||(t=new Set,O5.set(e,t)),t},*positions(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,unit:r="offset",reverse:i=!1,voids:o=!1}=t;if(!n)return;var a=E.range(e,n),[u,s]=R.edges(a),l=i?s:u,c=!1,f="",d=0,p=0,g=0;for(var[v,m]of E.nodes(e,{at:n,reverse:i,voids:o})){if(te.isElement(v)){if(!o&&e.isVoid(v)){yield E.start(e,m);continue}if(e.isInline(v))continue;if(E.hasInlines(e,v)){var y=_.isAncestor(m,s.path)?s:E.end(e,m),h=_.isAncestor(m,u.path)?u:E.start(e,m);f=E.string(e,{anchor:h,focus:y},{voids:o}),c=!0}}if(X.isText(v)){var $=_.equals(m,l.path);for($?(p=i?l.offset:v.text.length-l.offset,g=l.offset):(p=v.text.length,g=i?p:0),($||c||r==="offset")&&(yield{path:m,offset:g},c=!1);;){if(d===0){if(f==="")break;d=w(f,r,i),f=F$(f,d,i)[1]}if(g=i?g-d:g+d,p=p-d,p<0){d=-p;break}d=0,yield{path:m,offset:g}}}}function w(C,D,A){return D==="character"?B$(C,A):D==="word"?dN(C,A):D==="line"||D==="block"?C.length:1}},previous(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(!!o){var a=E.before(e,o,{voids:r});if(!!a){var[,u]=E.first(e,[]),s=[a.path,u];if(_.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(_.isPath(o)){var[l]=E.parent(e,o);i=f=>l.children.includes(f)}else i=()=>!0;var[c]=E.nodes(e,{reverse:!0,at:s,match:i,mode:n,voids:r});return c}}},range(e,t,n){if(R.isRange(t)&&!n)return t;var r=E.start(e,t),i=E.end(e,n||t);return{anchor:r,focus:i}},rangeRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.rangeRefs(e);return u.delete(i),i.current=null,a}},o=E.rangeRefs(e);return o.add(i),i},rangeRefs(e){var t=B5.get(e);return t||(t=new Set,B5.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){x5.set(e,t)},start(e,t){return E.point(e,t,{edge:"start"})},string(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,i=E.range(e,t),[o,a]=R.edges(i),u="";for(var[s,l]of E.nodes(e,{at:i,match:X.isText,voids:r})){var c=s.text;_.equals(l,a.path)&&(c=c.slice(0,a.offset)),_.equals(l,o.path)&&(c=c.slice(o.offset)),u+=c}return u},unhangRange(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,[i,o]=R.edges(t);if(i.offset!==0||o.offset!==0||R.isCollapsed(t))return t;var a=E.above(e,
* Takes a string with placeholder variables like `%{smart_count} file selected`
* and replaces it with values from options `{smart_count: 5}`
*
* @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
* taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
*
* @param {string} phrase that needs interpolation, with placeholders
* @param {object} options with values that will be used to replace placeholders
* @returns {any[]} interpolated
*/function S6(e,t){const n=/\$/g,r="$$$$";let i=[e];if(t==null)return i;for(const o of Object.keys(t))if(o!=="_"){let a=t[o];typeof a=="string"&&(a=n[Symbol.replace](a,r)),i=JL(i,new RegExp(`%\\{${o}\\}`,"g"),a)}return i}var gO=(uu=XL("apply"),class{constructor(t){Object.defineProperty(this,uu,{value:ZL}),this.locale={strings:{},pluralize(n){return n===1?0:1}},Array.isArray(t)?t.forEach(D6(this,uu)[uu],this):D6(this,uu)[uu](t)}translate(t,n){return this.translateArray(t,n).join("")}translateArray(t,n){if(!KL(this.locale.strings,t))throw new Error(`missing string: ${t}`);const r=this.locale.strings[t];if(typeof r=="object"){if(n&&typeof n.smart_count<"u"){const o=this.locale.pluralize(n.smart_count);return S6(r[o],n)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return S6(r,n)}});function ZL(e){if(!(e!=null&&e.strings))return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}var vO=function(){var t={},n=t._fns={};t.emit=function(a,u,s,l,c,f,d){var p=r(a);p.length&&i(a,p,[u,s,l,c,f,d])},t.on=function(a,u){n[a]||(n[a]=[]),n[a].push(u)},t.once=function(a,u){function s(){u.apply(this,arguments),t.off(a,s)}this.on(a,s)},t.off=function(a,u){var s=[];if(a&&u){var l=this._fns[a],c=0,f=l?l.length:0;for(c;c<f;c++)l[c]!==u&&s.push(l[c])}s.length?this._fns[a]=s:delete this._fns[a]};function r(o){var a=n[o]?n[o]:[],u=o.indexOf(":"),s=u===-1?[o]:[o.substring(0,u),o.substring(u+1)],l=Object.keys(n),c=0,f=l.length;for(c;c<f;c++){var d=l[c];if(d==="*"&&(a=a.concat(n[d])),s.length===2&&s[0]===d){a=a.concat(n[d]);break}}return a}function i(o,a,u){var s=0,l=a.length;for(s;s<l&&a[s];s++)a[s].event=o,a[s].apply(a[s],u)}return t};let QL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var eM={urlAlphabet:QL};let{urlAlphabet:tM}=eM;{if(typeof navigator<"u"&&navigator.product==="ReactNative"&&typeof crypto>"u")throw new Error("React Native does not have a built-in secure random generator. If you don\u2019t need unpredictable IDs use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID.");if(typeof msCrypto<"u"&&typeof crypto>"u")throw new Error("Import file with `if (!window.crypto) window.crypto = window.msCrypto` before importing Nano ID to fix IE 11 support");if(typeof crypto>"u")throw new Error("Your browser does not have secure random generator. If you don\u2019t need unpredictable IDs, you can use nanoid/non-secure.")}let mO=e=>crypto.getRandomValues(new Uint8Array(e)),yO=(e,t,n)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*r*t/e.length);return()=>{let o="";for(;;){let a=n(i),u=i;for(;u--;)if(o+=e[a[u]&r]||"",o.length===t)return o}}},nM=(e,t)=>yO(e,t,mO),rM=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=n[e]&63;r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r<63?t+="_":t+="-"}return t};var iM={nanoid:rM,customAlphabet:nM,customRandom:yO,urlAlphabet:tM,random:mO},Gv=function(t){if(typeof t!="number"||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var n=t<0,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(n&&(t=-t),t<1)return(n?"-":"")+t+" B";var i=Math.min(Math.floor(Math.log(t)/Math.log(1024)),r.length-1);t=Number(t/Math.pow(1024,i));var o=r[i];return t>=10||t%1===0?(n?"-":"")+t.toFixed(0)+" "+o:(n?"-":"")+t.toFixed(1)+" "+o};function bO(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}bO.prototype.match=function(e){var t=!0,n=this.parts,r,i=n.length,o;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(o=(e||"").split(this.separator),r=0;t&&r<i;r++)n[r]!=="*"&&(r<o.length?t=n[r]===o[r]:t=!1);t=t&&o}else if(typeof e.splice=="function")for(t=[],r=e.length;r--;)this.match(e[r])&&(t[t.length]=e[r]);else if(typeof e=="object"){t={};for(var a in e)this.match(a)&&(t[a]=e[a])}return t};var oM=function(e,t,n){var r=new bO(e,n||/[\/\.]/);return typeof t<"u"?r.match(t):r},aM=/[\/\+\.]/,uM=function(e,t){functi
id: ${r[o].id}
type: ${r[o].type}`)}),r.length>0&&ne(this,fl)[fl](),i.length>0){let o=`Multiple errors occurred while adding files:
`;if(i.forEach(a=>{o+=`
* ${a.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:i.length}),details:o},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(i,o);{const a=new Error(o);throw a.errors=i,a}}}removeFiles(t,n){const{files:r,currentUploads:i}=this.getState(),o={...r},a={...i},u=Object.create(null);t.forEach(f=>{r[f]&&(u[f]=r[f],delete o[f])});function s(f){return u[f]===void 0}Object.keys(a).forEach(f=>{const d=i[f].fileIDs.filter(s);if(d.length===0){delete a[f];return}a[f]={...i[f],fileIDs:d}});const l={currentUploads:a,files:o};Object.keys(o).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(u);c.forEach(f=>{this.emit("file-removed",u[f],n)}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(t,n){n===void 0&&(n=null),this.removeFiles([t],n)}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).uploadComplete)return;const r=!(this.getFile(t).isPaused||!1);return this.setFileState(t,{isPaused:r}),this.emit("upload-pause",t,r),r}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!0};t[r]=i}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!1,error:null};t[r]=i}),this.setState({files:t}),this.emit("resume-all")}retryAll(){const t={...this.getState().files},n=Object.keys(t).filter(i=>t[i].error);if(n.forEach(i=>{const o={...t[i],isPaused:!1,error:null};t[i]=o}),this.setState({files:t,error:null}),this.emit("retry-all",n),n.length===0)return Promise.resolve({successful:[],failed:[]});const r=ne(this,ni)[ni](n,{forceAllowNewUpload:!0});return ne(this,ri)[ri](r)}cancelAll(){this.emit("cancel-all");const{files:t}=this.getState(),n=Object.keys(t);n.length&&this.removeFiles(n,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",t);const n=ne(this,ni)[ni]([t],{forceAllowNewUpload:!0});return ne(this,ri)[ri](n)}reset(){this.cancelAll()}logout(){this.iteratePlugins(t=>{t.provider&&t.provider.logout&&t.provider.logout()})}calculateProgress(t,n){if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const r=Number.isFinite(n.bytesTotal)&&n.bytesTotal>0;this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,bytesUploaded:n.bytesUploaded,bytesTotal:n.bytesTotal,percentage:r?Math.round(n.bytesUploaded/n.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const n=this.getFiles().filter(l=>l.progress.uploadStarted||l.progress.preprocess||l.progress.postprocess);if(n.length===0){this.emit("progress",0),this.setState({totalProgress:0});return}const r=n.filter(l=>l.progress.bytesTotal!=null),i=n.filter(l=>l.progress.bytesTotal==null);if(r.length===0){const l=n.length*100,c=i.reduce((d,p)=>d+p.progress.percentage,0),f=Math.round(c/l*100);this.setState({totalProgress:f});return}let o=r.reduce((l,c)=>l+c.progress.bytesTotal,0);const a=o/r.length;o+=a*i.length;let u=0;r.forEach(l=>{u+=l.progress.bytesUploaded}),i.forEach(l=>{u+=a*(l.progress.percentage||0)/100});let s=o===0?0:Math.round(u/o*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){(typeof window.navigator.onLine<"u"?window.navigator.onLine:!0)?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(t,n){if(typeof t!="function"){const a=`Expected a plugin class, but got ${t===null?"null":typeof t}. Please verify that the plugin was impor
Uppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(a)}return t.VERSION&&this.log(`Using ${i} v${t.VERSION}`),r.type in ne(this,zt)[zt]?ne(this,zt)[zt][r.type].push(r):ne(this,zt)[zt][r.type]=[r],r.install(),this}getPlugin(t){for(const n of Object.values(ne(this,zt)[zt])){const r=n.find(i=>i.id===t);if(r!=null)return r}}[DO](t){return ne(this,zt)[zt][t]}iteratePlugins(t){Object.values(ne(this,zt)[zt]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const n=ne(this,zt)[zt][t.type],r=n.findIndex(a=>a.id===t.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),ne(this,sl)[sl](),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",ne(this,rr)[rr]),window.removeEventListener("offline",ne(this,rr)[rr]))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,n,r){n===void 0&&(n="info"),r===void 0&&(r=3e3);const i=typeof t=="object";this.setState({info:[...this.getState().info,{type:n,message:i?t.message:t,details:i?t.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(t,n){const{logger:r}=this.opts;switch(n){case"error":r.error(t);break;case"warning":r.warn(t);break;default:r.debug(t);break}}restore(t){return this.log(`Core: attempting to restore upload "${t}"`),this.getState().currentUploads[t]?ne(this,ri)[ri](t):(ne(this,aa)[aa](t),Promise.reject(new Error("Nonexistent upload")))}[SO](){return ne(this,ni)[ni](...arguments)}addResultData(t,n){if(!ne(this,Qv)[Qv](t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:r}=this.getState(),i={...r[t],result:{...r[t].result,...n}};this.setState({currentUploads:{...r,[t]:i}})}upload(){var t;(t=ne(this,zt)[zt].uploader)!=null&&t.length||this.log("No uploader type plugins are used","warning");let{files:n}=this.getState();const r=this.opts.onBeforeUpload(n);return r===!1?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&typeof r=="object"&&(n=r,this.setState({files:n})),Promise.resolve().then(()=>{ne(this,Xv)[Xv](n),ne(this,Jv)[Jv](n)}).catch(i=>{ne(this,Tt)[Tt](i)}).then(()=>{const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(s=>s.fileIDs),a=[];Object.keys(n).forEach(s=>{const l=this.getFile(s);!l.progress.uploadStarted&&o.indexOf(s)===-1&&a.push(l.id)});const u=ne(this,ni)[ni](a);return ne(this,ri)[ri](u)}).catch(i=>{ne(this,Tt)[Tt](i,{showInformer:!1})}))}}function xM(e,t){t===void 0&&(t=this.getFiles());const{maxFileSize:n,minFileSize:r,maxTotalFileSize:i,maxNumberOfFiles:o,allowedFileTypes:a}=this.opts.restrictions;if(o&&t.length+1>o)throw new Tr(`${this.i18n("youCanOnlyUploadX",{smart_count:o})}`);if(a&&!a.some(s=>s.indexOf("/")>-1?e.type?uM(e.type.replace(/;.*?$/,""),s):!1:s[0]==="."&&e.extension?e.extension.toLowerCase()===s.substr(1).toLowerCase():!1)){const s=a.join(", ");throw new Tr(this.i18n("youCanOnlyUploadFileTypes",{types:s}))}if(i&&e.size!=null){let u=0;if(u+=e.size,t.forEach(s=>{u+=s.size}),u>i)throw new Tr(this.i18n("exceedsSize",{size:Gv(i),file:e.name}))}if(n&&e.size!=null&&e.size>n)throw new Tr(this.i18n("exceedsSize",{size:Gv(n),file:e.name}));if(r&&e.size!=null&&e.size<r)throw new Tr(this.i18n("inferiorSize",{size:Gv(r)}))}function AM(e){const{minNumberOfFiles:t}=this.opts.restrictions;if(Object.keys(e).length<t)throw new Tr(`${this.i18n("youHaveToAtLeastSelectX",{smart_count:t})}`)}function OM(e){const{requiredMetaFields:t}=this.opts.restrictions,{hasOwnProperty:n}=Object.prototype,r=[],i=[];for(let o=0;o<t.length;o++)if(!n.call(e.meta,t[o])||e.meta[t[o]]===""){const a=new Tr(`${this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})}`);r.push(a),i.push(t[o]),ne(this,Tt)[Tt](a,{file:e,showInformer:!1,
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function o8(e){return Object.prototype.toString.call(e)==="[object Object]"}at({target:"Object",stat:!0,forced:MH},{keys:function(e){return Ku(Ao(e))}});var zH={isHistory(e){return o8(t=e)!==!1&&((n=t.constructor)===void 0||o8(r=n.prototype)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Gi.isOperationList(e.redos[0]))&&(e.undos.length===0||Gi.isOperationList(e.undos[0]));var t,n,r}},c1=new WeakMap,f1=new WeakMap,Hu={isHistoryEditor:e=>zH.isHistory(e.history)&&E.isEditor(e),isMerging:e=>f1.get(e),isSaving:e=>c1.get(e),redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=Hu.isMerging(e);f1.set(e,!1),t(),f1.set(e,n)},withoutSaving(e,t){var n=Hu.isSaving(e);c1.set(e,!1),t(),c1.set(e,n)}},HH=(e,t)=>e.type==="set_selection"||!(!t||e.type!=="insert_text"||t.type!=="insert_text"||e.offset!==t.offset+t.text.length||!_.equals(e.path,t.path))||!(!t||e.type!=="remove_text"||t.type!=="remove_text"||e.offset+e.text.length!==t.offset||!_.equals(e.path,t.path)),UH=(e,t)=>e.type!=="set_selection"||e.properties!=null&&e.newProperties!=null,VH=(e,t)=>!(!t||e.type!=="set_selection"||t.type!=="set_selection"),WH=e=>e.type!=="set_selection",qH=U.String,Ge=function(e){if(r0(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return qH(e)},ew=function(){var e=mt(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},GH=ks.PROPER,V2=RegExp.prototype,WO=V2.toString,KH=re(ew),YH=je(function(){return WO.call({source:"a",flags:"b"})!="/a/b"}),XH=GH&&WO.name!="toString";(YH||XH)&&pn(RegExp.prototype,"toString",function(){var e=mt(this),t=Ge(e.source),n=e.flags;return"/"+t+"/"+Ge(n===void 0&&Ta(V2,e)&&!("flags"in V2)?KH(e):n)},{unsafe:!0});var jd,JH=Nt?Object.defineProperties:function(e,t){mt(e);for(var n,r=Oo(t),i=Ku(t),o=i.length,a=0;o>a;)gr.f(e,n=i[a++],r[n]);return e},W2=qa("document","documentElement"),qO=Z$("IE_PROTO"),d1=function(){},GO=function(e){return"<script>"+e+"<\/script>"},a8=function(e){e.write(GO("")),e.close();var t=e.parentWindow.Object;return e=null,t},Np=function(){try{jd=new ActiveXObject("htmlfile")}catch{}var e,t;Np=typeof document<"u"?document.domain&&jd?a8(jd):((t=Xc("iframe")).style.display="none",W2.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(GO("document.F=Object")),e.close(),e.F):a8(jd);for(var n=Eh.length;n--;)delete Np.prototype[Eh[n]];return Np()};n0[qO]=!0;var a0=Object.create||function(e,t){var n;return e!==null?(d1.prototype=mt(e),n=new d1,d1.prototype=null,n[qO]=e):n=Np(),t===void 0?n:JH(n,t)},q2=st("unscopables"),G2=Array.prototype;G2[q2]==null&&gr.f(G2,q2,{configurable:!0,value:a0(null)});var xc=function(e){G2[q2][e]=!0},ZH=HO.includes;at({target:"Array",proto:!0},{includes:function(e){return ZH(this,e,arguments.length>1?arguments[1]:void 0)}}),xc("includes");var QH=st("match"),tw=function(e){var t;return Ye(e)&&((t=e[QH])!==void 0?!!t:lr(e)=="RegExp")},eU=U.TypeError,nw=function(e){if(tw(e))throw eU("The method doesn't accept regular expressions");return e},tU=st("match"),rw=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[tU]=!1,"/./"[e](t)}catch{}}return!1},nU=re("".indexOf);at({target:"String",proto:!0,forced:!rw("includes")},{includes:function(e){return!!~nU(Ge(Xn(this)),Ge(nw(e)),arguments.length>1?arguments[1]:void 0)}});var u8,rU=/"/g,iU=re("".replace);at({target:"String",proto:!0,forced:(u8="anchor",je(function(){var e=""[u8]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},{anchor:function(e){return t="a",n="name",r=e,i=Ge(Xn(this)),o="<"+t,n!==""&&(o+=" "+n+'="'+iU(Ge(r),rU,"&quot;")+'"'),o+">"+i+"</"+t+">";var t,n,r,i,o}});var K2=function(e,t,n){var r,i;mt(e);try{if(!(r=ka(e,"return"))){if(t==="throw")throw n;return n}r=Be(r,e)}catch(o){i=!0,r=o}if(t==="throw")throw n;if(i)throw r;return mt(r),n},oU=function(e,t,n,r){try{return r?t(mt(n)[0],n[1]):t(n)}catch(i){K2(e,"throw",i)}},ms={},aU=st("iterator"),uU=Array.prototype,KO=function(e){return e!==void
`)&&e.flags==="s")}),MU=U.RegExp,cw=je(function(){var e=MU("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),zU=tn.get,HU=G$("native-string-replace",String.prototype.replace),Sh=RegExp.prototype.exec,Z2=Sh,UU=re("".charAt),VU=re("".indexOf),WU=re("".replace),h1=re("".slice),g1=function(){var e=/a/,t=/b*/g;return Be(Sh,e,"a"),Be(Sh,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),y8=s0.BROKEN_CARET,v1=/()??/.exec("")[1]!==void 0;(g1||v1||y8||lw||cw)&&(Z2=function(e){var t,n,r,i,o,a,u,s=this,l=zU(s),c=Ge(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=Be(Z2,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=y8&&s.sticky,g=Be(ew,s),v=s.source,m=0,y=c;if(p&&(g=WU(g,"y",""),VU(g,"g")===-1&&(g+="g"),y=h1(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&UU(c,s.lastIndex-1)!==`
`)&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),v1&&(n=new RegExp("^"+v+"$(?!\\s)",g)),g1&&(r=s.lastIndex),i=Be(Sh,p?n:s,y),p?i?(i.input=h1(i.input,m),i[0]=h1(i[0],m),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:g1&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),v1&&i&&i.length>1&&Be(HU,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=a0(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var ef=Z2;at({target:"RegExp",proto:!0,forced:/./.exec!==ef},{exec:ef});var fw=Function.prototype,b8=fw.apply,qU=fw.bind,$8=fw.call,dw=typeof Reflect=="object"&&Reflect.apply||(qU?$8.bind(b8):function(){return $8.apply(b8,arguments)}),GU=st("species"),m1=RegExp.prototype,pw=function(e,t,n,r){var i=st(e),o=!je(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!je(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[GU]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=re(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var g=re(l),v=c.exec;return v===ef||v===m1.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:g(f,c,d)}:{done:!1}});pn(String.prototype,e,s[0]),pn(m1,i,s[1])}r&&sr(m1[i],"sham",!0)},KU=ZO.charAt,hw=function(e,t,n){return t+(n?KU(e,t).length:1)},YU=Math.floor,y1=re("".charAt),XU=re("".replace),b1=re("".slice),JU=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ZU=/\$([$&'`]|\d{1,2})/g,QU=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=ZU;return i!==void 0&&(i=Ao(i),s=JU),XU(o,s,function(l,c){var f;switch(y1(c,0)){case"$":return"$";case"&":return e;case"`":return b1(t,0,n);case"'":return b1(t,a);case"<":f=i[b1(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=YU(d/10);return p===0?l:p<=u?r[p-1]===void 0?y1(c,1):r[p-1]+y1(c,1):l}f=r[d-1]}return f===void 0?"":f})},eV=U.TypeError,tf=function(e,t){var n=e.exec;if(Ue(n)){var r=Be(n,e,t);return r!==null&&mt(r),r}if(lr(e)==="RegExp")return Be(ef,e,t);throw eV("RegExp#exec called on incompatible receiver")},Q2=st("replace"),tV=Math.max,nV=Math.min,rV=re([].concat),$1=re([].push),w8=re("".indexOf),E8=re("".slice),iV="a".replace(/./,"$0")==="$0",C8=!!/./[Q2]&&/./[Q2]("a","$0")==="";pw("replace",function(e,t,n){var r=C8?"$":"$0";return[function(i,o){var a=Xn(this),u=i==null?void 0:ka(i,Q2);return u?Be(u,i,a,o):Be(t,Ge(a),i,o)},function(i,o){var a=mt(this),u=Ge(i);if(typeof o=="string"&&w8(o,r)===-1&&w8(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=Ue(o);l||(o=Ge(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=tf(a,u);if(p===null||($1(d,p),!c))break;Ge(p[0])===""&&(a.lastIndex=hw(u,_s(a.lastIndex),f))}for(var g,v="",m=0,y=0;y<d.length;y++){for(var h=Ge((p=d[y])[0]),$=tV(nV(Uf(p.index),u.length),0),w=[],C=1;C<p.length;C++)$1(w,(g=p[C])===void 0?g:String(g));var D=p.groups;if(l){var A=rV([h],w,$,u);D!==void 0&&$1(A,D);var I=Ge(dw(o,void 0,A))}else I=QU(h,u,$,w,D,o);$>=m&&(v+=E8(u,m,$)+I,m=$+h.length)}return v+E8(u,m)}]},!!je(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!iV||C8);/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var eb=function(e,t){return eb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},eb(e,t)};function Ns(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}eb(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Wn=function(){return Wn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Wn.apply(this,arguments)};function zn(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Oe(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function tb(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}var oV=0,D8=function(){this.id=""+oV++},aV=tn.set,uV=tn.getterFor("Array Iterator"),mc=uw(Array,"Array",function(e,t){aV(this,{type:"Array Iterator",target:Oo(e),index:0,kind:t})},function(){var e=uV(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");ms.Arguments=ms.Array,xc("keys"),xc("values"),xc("entries");var bs=function(e,t,n){for(var r in t)pn(e,r,t[r],n);return e},sV=U.Array,lV=Math.max,nb=function(e,t,n){for(var r=Ga(e),i=vs(t,r),o=vs(n===void 0?r:n,r),a=sV(lV(o-i,0)),u=0;i<o;i++,u++)Qc(a,u,e[i]);return a.length=u,a},S8=Jc.f,x8=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],cV={f:function(e){return x8&&lr(e)=="Window"?function(t){try{return S8(t)}catch{return nb(x8)}}(e):S8(Oo(e))}},A8=je(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Md=Object.isExtensible,ua=je(function(){Md(1)})||A8?function(e){return!!Ye(e)&&(!A8||lr(e)!="ArrayBuffer")&&(!Md||Md(e))}:Md,fV=!je(function(){return Object.isExtensible(Object.preventExtensions({}))}),l0=Hf(function(e){var t=gr.f,n=!1,r=K$("meta"),i=0,o=function(u){t(u,r,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var u=Jc.f,s=re([].splice),l={};l[r]=1,u(l).length&&(Jc.f=function(c){for(var f=u(c),d=0,p=f.length;d<p;d++)if(f[d]===r){s(f,d,1);break}return f},at({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:cV.f}))},fastKey:function(u,s){if(!Ye(u))return typeof u=="symbol"?u:(typeof u=="string"?"S":"P")+u;if(!vt(u,r)){if(!ua(u))return"F";if(!s)return"E";o(u)}return u[r].objectID},getWeakData:function(u,s){if(!vt(u,r)){if(!ua(u))return!0;if(!s)return!1;o(u)}return u[r].weakData},onFreeze:function(u){return fV&&n&&ua(u)&&!vt(u,r)&&o(u),u}};n0[r]=!0}),dV=U.TypeError,Ip=function(e,t){this.stopped=e,this.result=t},O8=Ip.prototype,nf=function(e,t,n){var r,i,o,a,u,s,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),g=_a(t,c),v=function(y){return r&&K2(r,"normal",y),new Ip(!0,y)},m=function(y){return f?(mt(y),p?g(y[0],y[1],v):g(y[0],y[1])):p?g(y,v):g(y)};if(d)r=e;else{if(!(i=iw(e)))throw dV(Qg(e)+" is not iterable");if(KO(i)){for(o=0,a=Ga(e);a>o;o++)if((u=m(e[o]))&&Ta(O8,u))return u;return new Ip(!1)}r=YO(e,i)}for(s=r.next;!(l=Be(s,r)).done;){try{u=m(l.value)}catch(y){K2(r,"throw",y)}if(typeof u=="object"&&u&&Ta(O8,u))return u}return new Ip(!1)},pV=U.TypeError,c0=function(e,t){if(Ta(t,e))return e;throw pV("Incorrect invo
`)}return i};function cB(e,t){if(!(e instanceof HTMLElement&&e.dataset.slateVoid==="true"))for(var n=e.childNodes,r=n.length;r--;){var i=n[r],o=i.nodeType;o==3?t(i,e):o!=1&&o!=9&&o!=11||cB(i,t)}}function M8(e){if(e.length===0)return"";var t=e[0];return t.nodeType!==Zi.ELEMENT_NODE?"":t.tagName.toLowerCase()}(function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(Zi||(Zi={})),globalThis.navigator!==void 0&&globalThis.window!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&globalThis.window.MSStream;var sb=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Ac=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent);var El=typeof navigator<"u"&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),xV=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),AV=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),lb=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent);typeof navigator<"u"&&/.*QQBrowser/.test(navigator.userAgent);var Cl=!AV&&!xV&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",x={getWindow:function(e){var t=uB.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=jp.get(t);return n||(n=new D8,jp.set(t,n)),n},setNewKey:function(e){var t=new D8;jp.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var i=$s.get(r);if(i==null){if(E.isEditor(r))return n;break}var o=rf.get(r);if(o==null)break;n.unshift(o),r=i}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(t))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=x.toDOMNode(e,e),n=t.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&n.getSelection!=null?n:t.ownerDocument},getParentNode:function(e,t){return $s.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&r!=null;){var i=x.getParentNode(e,r);if(i==null)break;n.push(i),r=i}return n},getTopNode:function(e,t){var n=[x.findPath(e,t)[0]];return W.get(e,n)},toDOMNode:function(e,t){var n;if(E.isEditor(t))n=mw.get(e);else{var r=x.findKey(e,t);n=yw.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: "+JSON.stringify(t));return n},hasDOMNode:function(e,t,n){n===void 0&&(n={});var r,i=n.editable,o=i!==void 0&&i,a=x.toDOMNode(e,e);try{r=nr(t)?t:t.parentElement}catch(u){if(!u.message.includes('Permission denied to access property "nodeType"'))throw u}return!!r&&r.closest("[data-slate-editor]")===a&&(!o||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,i=R.isBackward(t),o=x.toDOMPoint(e,n),a=R.isCollapsed(t)?o:x.toDOMPoint(e,r),u=x.getWindow(e).document.createRange(),s=Oe(i?a:o,2),l=s[0],c=s[1],f=Oe(i?o:a,2),d=f[0],p=f[1],g=!!(nr(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),v=!!(nr(d)?d:d.parentElement).getAttribute("data-slate-zero-width");return u.setStart(l,g?1:c),u.setEnd(d,v?1:p),u},toDOMPoint:function(e,t){var n,r,i,o=Oe(E.node(e,t.path),1)[0],a=x.toDOMNode(e,o);E.void(e,{at:t})&&(t={path:t.path,offset:0});var u=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),s=0;try{for(var l=zn(u),c=l.next();!c.done;c=l.next()){var f=c.value,d=f.childNodes[0];if(d!=null&&d.textContent!=null){var p=d.textContent.length,g=f.getAttribute("data-slate-length"),v=s+(g==null?p:parseInt(g,10));if(t.offset<=v){i=[d,Math.min(p,Math.max(0,t.offset-s))];break}s=v}}}catch(m){n={error:m}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.err
`)))&&f--}if(!c){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: "+t)}var y=x.toSlateNode(e,c);return{path:x.findPath(e,y),offset:f}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return E.hasPath(e,n.path)&&E.hasPath(e,r.path)},getNodeType:function(e){return te.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(t){return W.string(t)}).join("")},getSelectedElems:function(e){var t,n,r=[],i=E.nodes(e,{universal:!0});try{for(var o=zn(i),a=o.next();!a.done;a=o.next()){var u=Oe(a.value,1)[0];te.isElement(u)&&r.push(u)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=Oe(E.nodes(e,{match:function(o){return n.checkNodeType(o,t)},universal:!0}),1),i=r[0];return i==null?null:i[0]},getSelectedTextNode:function(e){var t=Oe(E.nodes(e,{match:function(r){return X.isText(r)},universal:!0}),1),n=t[0];return n==null?null:n[0]},isNodeSelected:function(e,t){var n=Oe(E.nodes(e,{match:function(i){return i===t},universal:!0}),1),r=n[0];return r!=null&&Oe(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(E.isEnd(e,n.anchor,t)||E.isEnd(e,n.focus,t))},getTextarea:function(e){var t=rb.get(e);if(t==null)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return f0.get(e)||null},getHoverbar:function(e){return xh.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,n){e.normalizeNode([t,[n]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if(typeof n!="number"||n<=0)return 1/0;var i=n-e.getText().replace(/\r|\n|(\r\n)/g,"").length;return i<=0&&r&&r(e),i},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,i,o=x.getTextarea(e).$textArea,a=o==null?void 0:o[0].childNodes;if(a)try{for(var u=zn(Array.from(a)),s=u.next();!s.done;s=u.next()){var l=s.value;if(l.nodeType!==3)break;l.remove()}}catch(v){t={error:v}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}var c=E.nodes(e,{match:function(v){return!(!te.isElement(v)||e.isInline(v))},universal:!0});try{for(var f=zn(c),d=f.next();!d.done;d=f.next()){var p=d.value;if(p!=null){var g=p[0];cB(x.toDOMNode(e,g),function(v,m){var y=O(m);y.attr("data-slate-string")||y.attr("data-slate-zero-width")||m.removeChild(v)})}}}catch(v){r={error:v}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,n,r=E.nodes(e,{match:function(u){return e.isVoid(u)}}),i=0;try{for(var o=zn(r),a=o.next();!a.done;a=o.next())a.value,i++}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(t==null||R.isExpanded(t))return!1;var n=x.getSelectedNodeByType(e,"paragraph");if(n===null)return!1;var r=n.children;return r.length===1&&(r[0].text===""||void 0)},isEmptyPath:function(e,t){var n=E.node(e,t);if(n==null)return!1;var r=Oe(n,1)[0].children;return r.length===1&&r[0].text===""}},OV=1,fB={},of={};function BV(e,t){var n=e.key,r=e.factory,i=e.config,o=Wn(Wn({},i),t||{});if(of[n]!=null)throw new Error("Duplicated key '"+n+"' in menu items");of[n]=r,function(a,u){u!=null&&(fB[a]=u)}(n,o)}var z8=st("species"),ww=function(e){var t=qa(e),n=gr.f;Nt&&t&&!t[z8]&&n(t,z8,{configurable:!0,get:function(){return this}})},FV=gr.f,H8=l0.fastKey,U8=tn.set,x1=tn.getterFor,TV={getConstructor:function(e,t,n,r){var i=e(function(l,c){c0(l,o),U8(l,{type:t,index:a0(null),first:void 0,last:void 0,size:0}),Nt||(l.size=0),c!=null&&nf(c,l[r],{that:l,AS_ENTRIES:n})}),o=i.prototype,a=x1(t),u=function(l,c,f){var d,p,g=a(l),v=s(l,c);return v?v.value=f:(g.last=v={index:p=H8(c,!0),key:c,value:f,previous:d=g.last,next:void 0,removed:!1},g.first||(g.first=v),d&&(d.next=v),Nt?g.size++:l.s
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,V8=re("".replace),Ah="["+cb+"]",PV=RegExp("^"+Ah+Ah+"*"),NV=RegExp(Ah+Ah+"*$"),A1=function(e){return function(t){var n=Ge(Xn(t));return 1&e&&(n=V8(n,PV,"")),2&e&&(n=V8(n,NV,"")),n}},IV={start:A1(1),end:A1(2),trim:A1(3)},RV=ks.PROPER,jV=IV.trim;at({target:"String",proto:!0,forced:function(e){return je(function(){return!!cb[e]()||"\u200B\x85\u180E"[e]()!=="\u200B\x85\u180E"||RV&&cb[e].name!==e})}("trim")},{trim:function(){return jV(this)}});var Ew=[];function LV(e){Ew.push(e)}var dB={};function MV(e){var t=e.type,n=e.elemToHtml;dB[t||""]=n}function zV(e,t,n){var r=n.isInline(e)?"span":"div";return"<"+r+">"+t+"</"+r+">"}function HV(e,t){var n=e.type,r=n===void 0?"":n,i=e.children,o=i===void 0?[]:i,a=E.isVoid(t,e),u="";a||(u=o.map(function(c){return AB(c,t)}).join(""));var s=function(c){return dB[c]||zV}(r),l=s(e,u,t);return a||Ew.forEach(function(c){return l=c(e,l)}),l}var af,cu,W8,O1,Oh=U.Promise,UV=U.TypeError,VV=st("species"),pB=function(e,t){var n,r=mt(e).constructor;return r===void 0||(n=mt(r)[VV])==null?t:function(i){if(o0(i))return i;throw UV(Qg(i)+" is not a constructor")}(n)},hB=re([].slice),gB=/(?:ipad|iphone|ipod).*applewebkit/i.test(Gu),Qi=lr(U.process)=="process",fb=U.setImmediate,db=U.clearImmediate,WV=U.process,B1=U.Dispatch,qV=U.Function,q8=U.MessageChannel,GV=U.String,F1=0,Oc={};try{af=U.location}catch{}var Cw=function(e){if(vt(Oc,e)){var t=Oc[e];delete Oc[e],t()}},T1=function(e){return function(){Cw(e)}},G8=function(e){Cw(e.data)},K8=function(e){U.postMessage(GV(e),af.protocol+"//"+af.host)};fb&&db||(fb=function(e){var t=hB(arguments,1);return Oc[++F1]=function(){dw(Ue(e)?e:qV(e),void 0,t)},cu(F1),F1},db=function(e){delete Oc[e]},Qi?cu=function(e){WV.nextTick(T1(e))}:B1&&B1.now?cu=function(e){B1.now(T1(e))}:q8&&!gB?(O1=(W8=new q8).port2,W8.port1.onmessage=G8,cu=_a(O1.postMessage,O1)):U.addEventListener&&Ue(U.postMessage)&&!U.importScripts&&af&&af.protocol!=="file:"&&!je(K8)?(cu=K8,U.addEventListener("message",G8,!1)):cu="onreadystatechange"in Xc("script")?function(e){W2.appendChild(Xc("script")).onreadystatechange=function(){W2.removeChild(this),Cw(e)}}:function(e){setTimeout(T1(e),0)});var Dl,ra,Bc,Iu,k1,_1,P1,Y8,vB={set:fb,clear:db},KV=/ipad|iphone|ipod/i.test(Gu)&&U.Pebble!==void 0,YV=/web0s(?!.*chrome)/i.test(Gu),XV=Vf.f,N1=vB.set,X8=U.MutationObserver||U.WebKitMutationObserver,J8=U.document,Z8=U.process,Wd=U.Promise,Q8=XV(U,"queueMicrotask"),mB=Q8&&Q8.value;mB||(Dl=function(){var e,t;for(Qi&&(e=Z8.domain)&&e.exit();ra;){t=ra.fn,ra=ra.next;try{t()}catch(n){throw ra?Iu():Bc=void 0,n}}Bc=void 0,e&&e.enter()},gB||Qi||YV||!X8||!J8?!KV&&Wd&&Wd.resolve?((P1=Wd.resolve(void 0)).constructor=Wd,Y8=_a(P1.then,P1),Iu=function(){Y8(Dl)}):Qi?Iu=function(){Z8.nextTick(Dl)}:(N1=_a(N1,U),Iu=function(){N1(Dl)}):(k1=!0,_1=J8.createTextNode(""),new X8(Dl).observe(_1,{characterData:!0}),Iu=function(){_1.data=k1=!k1}));var I1,eC,yB,tC,bB=mB||function(e){var t={fn:e,next:void 0};Bc&&(Bc.next=t),ra||(ra=t,Iu()),Bc=t},JV=function(e){var t,n;this.promise=new e(function(r,i){if(t!==void 0||n!==void 0)throw TypeError("Bad Promise constructor");t=r,n=i}),this.resolve=mo(t),this.reject=mo(n)},Dw={f:function(e){return new JV(e)}},pb=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},ZV=typeof window=="object",$B=vB.set,QV=st("species"),xr="Promise",nC=tn.getterFor(xr),eW=tn.set,tW=tn.getterFor(xr),Zo=Oh&&Oh.prototype,kr=Oh,Sl=Zo,wB=U.TypeError,hb=U.document,Sw=U.process,Yu=Dw.f,nW=Yu,rW=!!(hb&&hb.createEvent&&U.dispatchEvent),EB=Ue(U.PromiseRejectionEvent),CB=!1,Fc=Zc(xr,function(){var e=t0(kr),t=e!==String(kr);if(!t&&Yc===66)return!0;if(Yc>=51&&/native code/.test(e))return!1;var n=new kr(function(i){i(1)}),r=function(i){i(function(){},function(){})};return(n.constructor={})[QV]=r,!(CB=n.then(function(){})instanceof r)||!t&&ZV&&!EB}),iW=Fc||!ow(function(e){kr.all(e).catch(function(){})}),DB=function(e){var t;return!(!Ye(e)||!Ue(t=e.then))&&t},xw=function(e,t){if(!e.notified){e.notifie
`)>=0)return;c&&(c=kB(c),cC(u,c)||u.push({text:c}))}}else{if(l.nodeName==="BR")return void(cC(u,`
`)||u.push({text:`
`}));var f=O(l);u.push(Ow(f,a))}}),u)}(e,t),r=function(o){for(var a in Bh)if(o[0].matches(a))return Bh[a];return xW}(e),i=r(e[0],n,t);return E.isVoid(t,i)||(n.length===0&&(i.children=[{text:e.text().replace(/\s+/gm," ")}]),Aw.forEach(function(o){i=o(e[0],i,t)})),i}function L1(e,t){e.parents("pre").length===0&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,`
`));var n=e[0].textContent||"";n=function(i){return i.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"\xAE").replace(/&copy;/g,"\xA9").replace(/&trade;/g,"\u2122")}(n);var r={text:n=kB(n)};return Aw.forEach(function(i){r=i(e[0],r,t)}),r}function Ow(e,t){FB.forEach(function(r){var i=r.selector,o=r.preParseHtml;e[0].matches(i)&&(e=O(o(e[0])))});var n=M8(e);return n==="span"?e.attr("data-w-e-type")?j1(e,t):L1(e,t):n==="code"?M8(e.parent())==="pre"?j1(e,t):L1(e,t):BB.includes(n)?L1(e,t):j1(e,t)}function _B(e,t,n){var r=O(n);return!!r.attr(t)||(r.attr(t,"true"),e.on("destroyed",function(){r.removeAttr(t)}),!1)}function PB(e,t){t===void 0&&(t=""),t===""&&(t="<p><br></p>"),t.indexOf("<")!==0&&(t=t.split(/\n/).map(function(r){return"<p>"+r+"</p>"}).join(""));var n=O("<div>"+t+"</div>");return Array.from(n.children()).map(function(r){return Ow(O(r),e)})}var AW=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),OW=function(e){var t=e,n=t.onChange,r=t.insertText,i=t.apply,o=t.deleteBackward;return t.insertText=function(a){t.getConfig().readOnly||r(a)},t.apply=function(a){var u,s,l,c,f,d,p,g,v=[];switch(a.type){case"insert_text":case"remove_text":case"set_node":try{for(var m=zn(E.levels(t,{at:a.path})),y=m.next();!y.done;y=m.next()){var h=Oe(y.value,2),$=h[0],w=h[1],C=x.findKey(t,$);v.push([w,C])}}catch(ee){u={error:ee}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(u)throw u.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var D=zn(E.levels(t,{at:_.parent(a.path)})),A=D.next();!A.done;A=D.next()){var I=Oe(A.value,2);$=I[0],w=I[1],C=x.findKey(t,$),v.push([w,C])}}catch(ee){l={error:ee}}finally{try{A&&!A.done&&(c=D.return)&&c.call(D)}finally{if(l)throw l.error}}break;case"move_node":try{for(var M=zn(E.levels(t,{at:_.common(_.parent(a.path),_.parent(a.newPath))})),V=M.next();!V.done;V=M.next()){var Y=Oe(V.value,2);$=Y[0],w=Y[1],C=x.findKey(t,$),v.push([w,C])}}catch(ee){f={error:ee}}finally{try{V&&!V.done&&(d=M.return)&&d.call(M)}finally{if(f)throw f.error}}}i(a);try{for(var J=zn(v),Z=J.next();!Z.done;Z=J.next()){var se=Oe(Z.value,2);w=se[0],C=se[1],$=Oe(E.node(t,w),1)[0],jp.set($,C)}}catch(ee){p={error:ee}}finally{try{Z&&!Z.done&&(g=J.return)&&g.call(J)}finally{if(p)throw p.error}}},t.deleteBackward=function(a){if(a!=="line")return o(a);if(e.selection&&R.isCollapsed(e.selection)){var u=E.above(e,{match:function(f){return E.isBlock(e,f)},at:e.selection});if(u){var s=Oe(u,2)[1],l=E.range(e,s,e.selection.anchor),c=function(f,d){var p=E.range(f,R.end(d)),g=Array.from(E.positions(f,{at:d})),v=0,m=g.length,y=Math.floor(m/2);if(oC(f,E.range(f,g[v]),p))return E.range(f,g[v],p);if(g.length<2)return E.range(f,g[g.length-1],p);for(;y!==g.length&&y!==v;)oC(f,E.range(f,g[y]),p)?m=y:v=y,y=Math.floor((v+m)/2);return E.range(f,g[m],p)}(t,l);R.isCollapsed(c)||P.delete(e,{at:c})}}},t.onChange=function(){var a=t.selection;a!=null&&ub.set(t,a),t.emit("change"),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var a=t.children;return(a===void 0?[]:a).map(function(u){return AB(u,t)}).join("")},t.getText=function(){var a=t.children;return(a===void 0?[]:a).map(function(u){return W.string(u)}).join(`
`)},t.getSelectionText=function(){var a=t.selection;return a==null?"":E.string(e,a)},t.getElemsByType=function(a,u){var s,l;u===void 0&&(u=!1);var c=[],f=E.nodes(t,{at:[],universal:!0});try{for(var d=zn(f),p=d.next();!p.done;p=d.next()){var g=Oe(p.value,1)[0];if(te.isElement(g)&&(u?g.type.indexOf(a)>=0:g.type===a)){var v=OB(x.findKey(t,g).id);c.push(Wn(Wn({},g),{id:v}))}}}catch(m){s={error:m}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(s)throw s.error}}return c},t.getElemsByTypePrefix=function(a){return t.getElemsByType(a,!0)},t.isEmpty=function(){var a=t.children,u=a===void 0?[]:a;if(u.length>1)return!1;var s=u[0];if(s==null)return!0;if(te.isElement(s)&&s.type==="paragraph"){var l=s.children,c=l===void 0?[]:l;if(c.length>1)return!1;var f=c[0];if(f==null||X.isText(f)&&f.text==="")return!0}return!1},t.clear=function(){P.removeNodes(t,{at:{anchor:E.start(t,[]),focus:E.end(t,[])},mode:"highest"}),t.children.length===0&&P.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(a){return x.getParentNode(t,a)},t.dangerouslyInsertHtml=function(a,u){if(a===void 0&&(a=""),u===void 0&&(u=!1),a){var s=document.createElement("div");s.innerHTML=a;var l=Array.from(s.childNodes);if(l=l.filter(function(p){var g=p.nodeType,v=p.nodeName;return g===Zi.TEXT_NODE||g===Zi.ELEMENT_NODE&&!AW.has(v.toLowerCase())}),l.length!==0){var c=t.selection;if(c!=null){var f=null;x.isSelectedEmptyParagraph(t)&&!u&&(f=[c.focus.path[0]]),s.setAttribute("hidden","true"),document.body.appendChild(s);var d=0;l.forEach(function(p){var g=p.nodeType,v=p.nodeName,m=p.textContent,y=m===void 0?"":m;if(g!==Zi.TEXT_NODE)if(v!=="BR"){var h=p,$=!1;if(BB.includes(v.toLowerCase()))$=!0;else for(var w in Bh)if(h.matches(w)){$=!0;break}if($){var C=Ow(O(h),t);return t.isInline(C)?(t.insertNode(C),C.type==="link"&&t.insertFragment([{text:""}])):P.insertNodes(t,C,{mode:"highest"}),d++,void(x.isSelectedVoidNode(t)&&t.move(1))}var D=window.getComputedStyle(h).display;x.isSelectedEmptyParagraph(t)||D.indexOf("inline")<0&&t.insertBreak(),t.dangerouslyInsertHtml(h.innerHTML,!0)}else t.insertText(`
`);else{if(!y||!y.trim())return;t.insertNode({text:y})}}),d&&f&&x.isEmptyPath(t,f)&&P.removeNodes(t,{at:f}),s.remove()}}}},t.setHtml=function(a){a===void 0&&(a="");var u=t.isDisabled(),s=t.isFocused(),l=JSON.stringify(t.selection);t.enable(),t.focus(),t.select([]),t.deleteFragment(),P.setNodes(t,{type:"paragraph"},{mode:"highest"});var c=PB(t,a);if(P.insertFragment(t,c),s||(t.deselect(),t.blur()),u&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(l))}catch{t.select(E.start(t,[]))}},t},BW=function(e){var t=e,n=t.insertText;return t.insertFragment,t.setFragmentData=function(r){var i=t.selection;if(i){var o=Oe(R.edges(i),2),a=o[0],u=o[1],s=E.void(t,{at:a.path}),l=E.void(t,{at:u.path});if(!R.isCollapsed(i)||s){var c=x.toDOMRange(t,i),f=c.cloneContents(),d=f.childNodes[0];if(f.childNodes.forEach(function(C){C.textContent&&C.textContent.trim()!==""&&(d=C)}),l){var p=Oe(l,1)[0],g=c.cloneRange(),v=x.toDOMNode(t,p);g.setEndAfter(v),f=g.cloneContents()}if(s&&(d=f.querySelector("[data-slate-spacer]")),Array.from(f.querySelectorAll("[data-slate-zero-width]")).forEach(function(C){var D=C.getAttribute("data-slate-zero-width")==="n";C.textContent=D?`
`:""}),sB(d)){var m=d.ownerDocument.createElement("span");m.style.whiteSpace="pre",m.appendChild(d),f.appendChild(m),d=m}var y=t.getFragment(),h=JSON.stringify(y),$=window.btoa(encodeURIComponent(h));d.setAttribute("data-slate-fragment",$),r.setData("application/x-slate-fragment",$);var w=f.ownerDocument.createElement("div");return w.appendChild(f),w.setAttribute("hidden","true"),f.ownerDocument.body.appendChild(w),r.setData("text/html",w.innerHTML),r.setData("text/plain",SV(w)),f.ownerDocument.body.removeChild(w),r}}},t.insertData=function(r){var i,o,a=r.getData("application/x-slate-fragment");if(a){var u=decodeURIComponent(window.atob(a)),s=JSON.parse(u);t.insertFragment(s)}else{var l=r.getData("text/plain"),c=r.getData("text/html");if(c)t.dangerouslyInsertHtml(c);else if(l){var f=l.split(/\r\n|\r|\n/),d=!1;try{for(var p=zn(f),g=p.next();!g.done;g=p.next()){var v=g.value;d&&P.splitNodes(t,{always:!0}),n(v),d=!0}}catch(m){i={error:m}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}}},t},yc=function(e){return e!=null},FW={object:!0,function:!0,undefined:!0},TW=function(e){if(!function(t){return!!yc(t)&&hasOwnProperty.call(FW,typeof t)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch{return!1}},kW=/^\s*class[\s{/}]/,_W=Function.prototype.toString,fC=function(e){return!!function(t){if(typeof t!="function"||!hasOwnProperty.call(t,"length"))return!1;try{if(typeof t.length!="number"||typeof t.call!="function"||typeof t.apply!="function")return!1}catch{return!1}return!TW(t)}(e)&&!kW.test(_W.call(e))},Bw=function(e){return e!=null},PW=Object.keys,NW=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(e){return PW(Bw(e)?Object(e):e)},IW=function(e){if(!Bw(e))throw new TypeError("Cannot use null or undefined");return e},RW=Math.max,dC=function(){var e,t=Object.assign;return typeof t=="function"&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}()?Object.assign:function(e,t){var n,r,i,o=RW(arguments.length,2);for(e=Object(IW(e)),i=function(a){try{e[a]=t[a]}catch(u){n||(n=u)}},r=1;r<o;++r)NW(t=arguments[r]).forEach(i);if(n!==void 0)throw n;return e},jW=Array.prototype.forEach,LW=Object.create,MW=function(e,t){var n;for(n in e)t[n]=e[n]},pC=function(e){var t=LW(null);return jW.call(arguments,function(n){Bw(n)&&MW(Object(n),t)}),t},M1="razdwatrzy",zW=String.prototype.indexOf,Al=typeof M1.contains=="function"&&M1.contains("dwa")===!0&&M1.contains("foo")===!1?String.prototype.contains:function(e){return zW.call(this,e,arguments[1])>-1},Gd=Hf(function(e){var t=e.exports=function(n,r){var i,o,a,u,s;return arguments.length<2||typeof n!="string"?(u=r,r=n,n=null):u=arguments[2],yc(n)?(i=Al.call(n,"c"),o=Al.call(n,"e"),a=Al.call(n,"w")):(i=a=!0,o=!1),s={value:r,configurable:i,enumerable:o,writable:a},u?dC(pC(u),s):s};t.gs=function(n,r,i){var o,a,u,s;return typeof n!="string"?(u=i,i=r,r=n,n=null):u=arguments[3],yc(r)?fC(r)?yc(i)?fC(i)||(u=i,i=void 0):i=void 0:(u=r,r=i=void 0):r=void 0,yc(n)?(o=Al.call(n,"c"),a=Al.call(n,"e")):(o=!0,a=!1),s={get:r,set:i,configurable:o,enumerable:a},u?dC(pC(u),s):s}}),z1=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},HW=Hf(function(e,t){var n,r,i,o,a,u,s,l=Function.prototype.apply,c=Function.prototype.call,f=Object.create,d=Object.defineProperty,p=Object.defineProperties,g=Object.prototype.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0};n=function(m,y){var h;return z1(y),g.call(this,"__ee__")?h=this.__ee__:(h=v.value=f(null),d(this,"__ee__",v),v.value=null),h[m]?typeof h[m]=="object"?h[m].push(y):h[m]=[h[m],y]:h[m]=y,this},r=function(m,y){var h,$;return z1(y),$=this,n.call(this,m,h=function(){i.call($,m,h),l.call(y,this,arguments)}),h.__eeOnceListener__=y,this},i=function(m,y){var h,$,w,C;if(z1(y),!g.call(this,"__ee__"))return this;if(!(h=this.__ee__)[m])return this;if(typeof($=h[m])=="object")for(C=0;w=$[C];++C)w!==y&&w.__eeOnceListener__!==y||($.length===2?h[m]=$[C?0:1]:$.splice(C,1));else $!==y&&$.__eeOnceListener__!==y||delete h[m]
`:e)}function U1(e,t){return e===void 0&&(e=0),t===void 0&&(t=!1),de("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\uFEFF",t?de("br",null):null)}function iq(e,t,n){if(e.text==null)throw new Error("Current node is not slate Text "+JSON.stringify(e));var r=x.findKey(n,e),i=n.getConfig().decorate;if(i==null)throw new Error("Can not get config.decorate");var o=x.findPath(n,e),a=i([e,o]),u=X.decorations(e,a),s=u.map(function(f,d){var p=function(g,v,m,y,h){v===void 0&&(v=!1);var $=g.text,w=x.findPath(h,m),C=_.parent(w);if(E.isEditor(y))throw new Error("Text node "+JSON.stringify(m)+" parent is Editor");return h.isVoid(y)?U1(W.string(y).length):$!==""||y.children[y.children.length-1]!==m||h.isInline(y)||E.string(h,C)!==""?$===""?U1():v&&$.slice(-1)===`
`?yC($,!0):yC($):U1(0,!0)}(f,d===u.length-1,e,t,n);return p=function(g,v){var m=v;return _w.forEach(function(y){m=y(g,m)}),m}(f,p),de("span",{"data-slate-leaf":!0},p)}),l=function(f){return"w-e-text-"+f}(r.id),c=de("span",{"data-slate-node":"text",id:l,key:r.id},s);return Jn(function(){var f=$w(l);f!=null&&(yw.set(r,f),p0.set(e,f),d0.set(f,e))}),c}function mb(e,t,n,r){return rf.set(e,t),$s.set(e,n),te.isElement(e)?rq(e,r):iq(e,n,r)}function oq(e,t){var n,r=e.$scroll,i=function(v){return"w-e-textarea-"+v}(e.id),o=t.getConfig(),a=o.readOnly,u=o.autoFocus,s=function(v,m){return m===void 0&&(m=!1),gs("div#"+v,{props:{contentEditable:!m}})}(i,a),l=t.children||[];s.children=l.map(function(v,m){var y=mb(v,m,t,t);return IB(y),y});var c=P8.get(e);if(c==null&&(c=!0),c){var f=function(v,m){return O(`<div
id="`+v+`"
data-slate-editor
data-slate-node="value"
suppressContentEditableWarning
role="textarea"
spellCheck="true"
autoCorrect="true"
autoCapitalize="true"
></div>`)}(i);r.append(f),e.$textArea=f,n=f[0],(p=mj([yj,Cj,Bj,bj,Ej]))(n,s),P8.set(e,!1),N8.set(e,p)}else{var d=I8.get(e),p=N8.get(e);if(d==null||p==null)return;n=d.elm,p(d,s)}if(n!=null||(n=$w(i))!=null){if((c?u:t.isFocused())&&n.focus({preventScroll:!0}),c){var g=bw(n);g&&uB.set(t,g)}mw.set(t,n),p0.set(t,n),d0.set(n,t),I8.set(e,s)}}function bC(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function $C(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function V1(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return $C(n.overflowY,t)||$C(n.overflowX,t)||function(r){var i=function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)}(e)}return!1}function Yd(e,t,n,r,i,o,a,u){return o<e&&a>t||o>e&&a<t?0:o<=e&&u<=n||a>=t&&u>=n?o-e-r:a>t&&u<n||o<e&&u>n?a-t+i:0}function wC(e,t){var n=window,r=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,u=t.skipOverflowHiddenElements,s=typeof a=="function"?a:function(we){return we!==a};if(!bC(e))throw new TypeError("Invalid target");for(var l=document.scrollingElement||document.documentElement,c=[],f=e;bC(f)&&s(f);){if((f=f.parentElement)===l){c.push(f);break}f!=null&&f===document.body&&V1(f)&&!V1(document.documentElement)||f!=null&&V1(f,u)&&c.push(f)}for(var d=n.visualViewport?n.visualViewport.width:innerWidth,p=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,m=e.getBoundingClientRect(),y=m.height,h=m.width,$=m.top,w=m.right,C=m.bottom,D=m.left,A=i==="start"||i==="nearest"?$:i==="end"?C:$+y/2,I=o==="center"?D+h/2:o==="end"?w:D,M=[],V=0;V<c.length;V++){var Y=c[V],J=Y.getBoundingClientRect(),Z=J.height,se=J.width,ee=J.top,ae=J.right,fe=J.bottom,_e=J.left;if(r==="if-needed"&&$>=0&&D>=0&&C<=p&&w<=d&&$>=ee&&C<=fe&&D>=_e&&w<=ae)return M;var ve=getComputedStyle(Y),ie=parseInt(ve.borderLeftWidth,10),Ie=parseInt(ve.borderTopWidth,10),T=parseInt(ve.borderRightWidth,10),F=parseInt(ve.borderBottomWidth,10),k=0,N=0,H="offsetWidth"in Y?Y.offsetWidth-Y.clientWidth-ie-T:0,j="offsetHeight"in Y?Y.offsetHeight-Y.clientHeight-Ie-F:0;if(l===Y)k=i==="start"?A:i==="end"?A-p:i==="nearest"?Yd(v,v+p,p,Ie,F,v+A,v+A+y,y):A-p/2,N=o==="start"?I:o==="center"?I-d/2:o==="end"?I-d:Yd(g,g+d,d,ie,T,g+I,g+I+h,h),k=Math.max(0,k+v),N=Math.max(0,N+g);else{k=i==="start"?A-ee-Ie:i==="end"?A-fe+F+j:i==="nearest"?Yd(ee,fe,Z,Ie,F+j,A,A+y,y):A-(ee+Z/2)+j/2,N=o==="start"?I-_e-ie:o==="center"?I-(_e+se/2)+H/2:o==="end"?I-ae+T+H:Yd(_e,ae,se,ie,T+H,I,I+h,h);var Q=Y.scrollLeft,ce=Y.scrollTop;A+=ce-(k=Math.max(0,Math.min(ce+k,Y.scrollHeight-Z+j))),I+=Q-(N=Math.max(0,Math.min(Q+N,Y.scrollWidth-se+H)))}M.push({el:Y,top:k,left:N})}return M}function EC(e){return e===Object(e)&&Object.keys(e).length!==0}function aq(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(EC(t)&&typeof t.behavior=="function")return t.behavior(n?[]:wC(e,t));if(!n){var r=function(i){return i===!1?{block:"end",inline:"nearest"}:EC(i)?i:{block:"start",inline:"nearest"}}(t);return function(i,o){o===void 0&&(o="auto");var a="scrollBehavior"in document.body.style;i.forEach(function(u){var s=u.el,l=u.top,c=u.left;s.scroll&&a?s.scroll({top:l,left:c,behavior:o}):(s.scrollTop=l,s.scrollLeft=c)})}(wC(e,r),r.behavior)}}function jn(e,t){return Pa(t)&&x.hasDOMNode(e,t,{editable:!0})}function CC(e,t){if(e.getConfig().readOnly)return!1;var n=ju(e,t)&&x.toSlateNode(e,t);return E.isVoid(e,n)}function ju(e,t){return Pa(t)&&x.hasDOMNode(e,t)}function jB(e,t,n){n===void 0&&(n=!1);var r=t.selection,i=t.getConfig(),o=x.findDocumentOrShadowRoot(t).getSelection();if(o&&(!e.isComposing||n)&&t.isFocused()){var a=o.type!=="None";if(r||a){var u=mw.get(t),s=!1;if(u.contains(o.anchorNode)&&u.contains(o.focusNode)&&(s=!0),a&&s&&r){var l=x.toSlateRange(t,o,{exactMatch:!0,suppressThrow:!0});if(l&&R.equals(l,r)){var c=!0;if(R.isCollapsed(r)){var f=o.anchorNode,d=o.anchorOffset;if(f===u){var p=u.childNodes,g
`+r:n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var Iw=function(){function e(t,n){var r=this;n===void 0&&(n=!1),this.$elem=O('<div class="w-e-bar-item"></div>'),this.$button=O('<button type="button"></button>'),this.disabled=!1,this.menu=t;var i=t.tag,o=t.width;if(i!=="button")throw new Error("Invalid tag '"+i+"', expected 'button'");var a=t.title,u=t.hotkey,s=u===void 0?"":u,l=t.iconSvg,c=l===void 0?"":l,f=this.$button;if(c){var d=O(c);Pw(d),f.append(d)}else f.text(a);MB(f,c,a,s,n),n&&c&&f.append(O('<span class="title">'+a+"</span>")),o&&f.css("width",o+"px"),this.$elem.append(f),Jn(function(){return r.init()})}return e.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(n){n.preventDefault(),En(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},e.prototype.exec=function(){var t=En(this),n=this.menu,r=n.getValue(t);n.exec(t,r)},e.prototype.setActive=function(){var t=En(this),n=this.$button,r="active";this.menu.isActive(t)?n.addClass(r):n.removeClass(r)},e.prototype.setDisabled=function(){var t=En(this),n=this.$button,r=this.menu.isDisabled(t);(t.selection==null||t.isDisabled())&&(r=!0),this.menu.alwaysEnable&&(r=!1);var i="disabled";r?n.addClass(i):n.removeClass(i),this.disabled=r},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),pq=function(e){function t(n,r){return r===void 0&&(r=!1),e.call(this,n,r)||this}return Ns(t,e),t.prototype.onButtonClick=function(){},t}(Iw),Rw=function(){function e(t){this.isShow=!1,this.showTime=0,this.record(t)}return e.prototype.record=function(t){var n=ab.get(t);n==null&&(n=new Set,ab.set(t,n)),n.add(this),Rp.set(this,t)},e.prototype.renderContent=function(t){var n=this.$elem;n.empty(),n.append(t);var r=this.genSelfElem();r&&n.append(r)},e.prototype.appendTo=function(t){var n=this.$elem;t.append(n)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=Rp.get(this);t&&t.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=Rp.get(this);t&&t.emit("modalOrPanelHide")}},e}(),hq=function(e){function t(n){var r=e.call(this,n)||this;return r.type="dropPanel",r.$elem=O('<div class="w-e-drop-panel"></div>'),r}return Ns(t,e),t.prototype.genSelfElem=function(){return null},t}(Rw),gq=function(e){function t(n,r){r===void 0&&(r=!1);var i=e.call(this,n,r)||this;if(i.dropPanel=null,i.menu=n,n.showDropPanel){var o=Nw();i.$button.append(o)}return i}return Ns(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var n=this.menu;if(n.getPanelContentElem!=null){var r=En(this);if(this.dropPanel==null){var i=new hq(r),o=n.getPanelContentElem(r);i.renderContent(o),i.appendTo(this.$elem),i.show(),this.dropPanel=i}else{var a=this.dropPanel;a.isShow?a.hide():(o=n.getPanelContentElem(r),a.renderContent(o),a.show())}var u=this.dropPanel;if(u.isShow){var s=this.$elem,l=s.offset().left,c=s.parents(".w-e-bar");l-c.offset().left>=c.width()/2?u.$elem.css({left:"none",right:"0"}):u.$elem.css({left:"0",right:"none"})}}},t}(Iw),vq=function(e){function t(n,r){r===void 0&&(r=0);var i=e.call(this,n)||this;i.type="modal",i.$elem=O('<div class="w-e-modal"></div>'),i.width=0,r&&(i.width=r);var o=i.$elem;return o.on("click",function(a){return a.stopPropagation()}),o.on("keyup",function(a){a.code==="Escape"&&(i.hide(),n.restoreSelection())}),i}return Ns(t,e),t.prototype.genSelfElem=function(){var n=this,r=O('<span class="btn-close"><svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg></span>'),i=Rp.get(this);return r.on("click",function(){n.hide(),i==null||i.restoreSelection()}),r},t.prototype.setStyle=function(n){var r=this.width,i=this.$elem;i.attr("style",""),r&&i.css("width",r+"px"),i.css(n)},t}(Rw);function Cn(e,t,n){var r=O('<label class="babel-container"></label>');r.append("<span>"+e+
You has disabled editor scroll, please do this yourself`,void console.warn(w)}var C=O("#"+$);if(C.length!==0){var D=C[0];if(!x.hasDOMNode(h,D))return w="Element (found by id is '"+$+"') is not in editor DOM",w+=`
\u901A\u8FC7 id '`+$+"' \u627E\u5230\u7684 element \u4E0D\u5728 editor DOM \u4E4B\u5185",void console.error(w,D);var A=x.getTextarea(h),I=A.$textAreaContainer,M=A.$scroll,V=C.offset().top,Y=I.offset().top;M[0].scrollBy({top:V-Y,behavior:"smooth"})}},h.showProgressBar=function($){$<1||x.getTextarea(h).changeProgress($)},h.hidePanelOrModal=function(){var $=ab.get(h);$!=null&&$.forEach(function(w){return w.hide()})},h.enable=function(){h.getConfig().readOnly=!1,h.updateView()},h.disable=function(){h.getConfig().readOnly=!0,h.updateView()},h.isDisabled=function(){return h.getConfig().readOnly},h.toDOMNode=function($){return x.toDOMNode(h,$)},h.fullScreen=function(){if(!h.isFullScreen){var $=null,w=x.getToolbar(h);w&&($=w.$box);var C=x.getTextarea(h).$box.parent();if($&&$.parent()[0]!==C[0])throw new Error(`Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent
\u4E0D\u80FD\u8BBE\u7F6E\u5168\u5C4F\uFF0C\u56E0\u4E3A toolbar DOM \u7236\u8282\u70B9\u548C textarea DOM \u7236\u8282\u70B9\u4E0D\u4E00\u81F4`);C.addClass("w-e-full-screen-container");var D=C.css("z-index");C.attr("data-z-index",D.toString()),h.isFullScreen=!0,h.emit("fullScreen")}},h.unFullScreen=function(){if(h.isFullScreen){var $=x.getTextarea(h).$box.parent();setTimeout(function(){$.removeClass("w-e-full-screen-container"),h.isFullScreen=!1,h.emit("unFullScreen")},200)}},h.getEditableContainer=function(){return x.getTextarea(h).$textAreaContainer[0]},h}(BW(aN()))))))));if(n&&function(y,h){return _B(y,"data-w-e-textarea",h)}(l,n))throw new Error("Repeated create editor by selector '"+n+"'");var c=function(y){y===void 0&&(y={});var h=hO(fB),$={},w=y.MENU_CONF,C=w===void 0?{}:w;return R$(h,function(D,A){$[A]=Wn(Wn({},D),C[A]||{})}),delete y.MENU_CONF,Wn({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:$,hoverbarKeys:{},customAlert:function(D,A){window.alert(A+`:
`+D)}},y)}(i);_8.set(l,c);var f=c.hoverbarKeys,d=f===void 0?{}:f;if(s.forEach(function(y){l=y(l)}),a!=null&&(l.children=PB(l,a)),o&&o.length&&(l.children=o),l.children.length===0&&(l.children=[{type:"paragraph",children:[{text:""}]}]),x.normalizeContent(l),n){var p=new dq(n);rb.set(l,p),ib.set(p,l),p.changeViewState(),Jn(function(){var y=p.$scroll;y!=null&&y.height()<300&&console.warn(`\u7F16\u8F91\u533A\u57DF\u9AD8\u5EA6 < 300px \u8FD9\u53EF\u80FD\u4F1A\u5BFC\u81F4 modal hoverbar \u5B9A\u4F4D\u5F02\u5E38
Textarea height < 300px . This may be cause modal and hoverbar position error`,y)});var g=void 0;Object.keys(d).length>0&&(g=new wq,ob.set(g,l),xh.set(l,g)),l.on("change",function(){l.hidePanelOrModal()}),l.on("scroll",function(){l.hidePanelOrModal()})}else l.children.forEach(function(y,h){return HB(y,h,l,l)});var v=c.onCreated,m=c.onDestroyed;return v&&l.on("created",function(){return v(l)}),m&&l.on("destroyed",function(){return m(l)}),Jn(function(){return l.emit("created")}),l}var Cq=u0("splice"),Dq=U.TypeError,Sq=Math.max,xq=Math.min;at({target:"Array",proto:!0,forced:!Cq},{splice:function(e,t){var n,r,i,o,a,u,s=Ao(this),l=Ga(s),c=vs(e,l),f=arguments.length;if(f===0?n=r=0:f===1?(n=0,r=l-c):(n=f-2,r=xq(Sq(Uf(t),0),l-c)),l+n-r>9007199254740991)throw Dq("Maximum allowed length exceeded");for(i=jO(s,r),o=0;o<r;o++)(a=c+o)in s&&Qc(i,o,s[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)u=o+n,(a=o+r)in s?s[u]=s[a]:delete s[u];for(o=l;o>l-r+n;o--)delete s[o-1]}else if(n>r)for(o=l-r;o>c;o--)u=o+n-1,(a=o+r-1)in s?s[u]=s[a]:delete s[u];for(o=0;o<n;o++)s[o+c]=arguments[o+2];return s.length=l-r+n,i}});var Aq=function(){function e(t,n){var r=this;this.$toolbar=O('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.changeToolbarState=pO(function(){r.toolbarItems.forEach(function(a){a.changeMenuState()})},200),this.config=n;var i=O(t);if(i.length===0)throw new Error("Cannot find toolbar DOM by selector '"+t+"'");this.$box=i;var o=this.$toolbar;o.on("mousedown",function(a){return a.preventDefault()}),i.append(o),Jn(function(){r.registerItems(),r.changeToolbarState(),r.getEditorInstance().on("change",r.changeToolbarState)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.registerItems=function(){var t=this,n="",r=this.$toolbar,i=this.config,o=i.toolbarKeys,a=o===void 0?[]:o,u=i.insertKeys,s=u===void 0?{index:0,keys:[]}:u,l=i.excludeKeys,c=l===void 0?[]:l,f=hO(a);s.keys.length>0&&(typeof s.keys=="string"&&(s.keys=[s.keys]),s.keys.forEach(function(g,v){f.splice(s.index+v,0,g)}));var d=f.filter(function(g){if(typeof g=="string"){if(c.includes(g))return!1}else if(c.includes(g.key))return!1;return!0}),p=d.length;d.forEach(function(g,v){if(g==="|"){if(v===0||v+1===p||n==="|")return;var m=LB();return r.append(m),void(n=g)}if(typeof g=="string")return t.registerSingleItem(g,t),void(n=g);t.registerGroup(g),n="group"})},e.prototype.registerGroup=function(t){var n=this,r=this.$toolbar,i=function(l){return new SC(l)}(t),o=t.menuKeys,a=o===void 0?[]:o,u=this.config.excludeKeys,s=u===void 0?[]:u;a.forEach(function(l){s.includes(l)||n.registerSingleItem(l,i)}),r.append(i.$elem)},e.prototype.registerSingleItem=function(t,n){var r=this.getEditorInstance(),i=n instanceof SC,o=this.menus,a=o[t];if(a==null){var u=of[t];if(u==null)throw new Error("Not found menu item factory by key '"+t+"'");if(typeof u!="function")throw new Error("Menu item factory (key='"+t+"') is not a function");a=u(),o[t]=a}else console.warn("Duplicated toolbar menu key '"+t+`'
\u91CD\u590D\u6CE8\u518C\u4E86\u83DC\u5355\u680F menu '`+t+"'");var s=zB(a,i);this.toolbarItems.push(s),vw.set(s,r),i?n.appendBarItem(s):n.$toolbar.append(s.$elem)},e.prototype.getEditorInstance=function(){var t=gw.get(this);if(t==null)throw new Error("Can not get editor instance");return t},e.prototype.destroy=function(){this.$toolbar.remove(),this.menus={},this.toolbarItems=[]},e}();function Oq(e,t){if(e==null)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,i=r===void 0?{}:r;if(function(u,s){return _B(u,"data-w-e-toolbar",s)}(e,n))throw new Error("Repeated create toolbar by selector '"+n+"'");var o=Wn({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},i||{}),a=new Aq(n,o);return gw.set(a,e),f0.set(e,a),a}var Bq=ks.EXISTS,Fq=gr.f,UB=Function.prototype,Tq=re(UB.toString),VB=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,kq=re(VB.exec);function WB(e){var t=e.server,n=t===void 0?"":t,r=e.fieldName,i=r===void 0?"":r,o=e.maxFileSize,a=o===void 0?10485760:o,u=e.maxNumberOfFiles,s=u===void 0?100:u,l=e.meta,c=l===void 0?{}:l,f=e.metaWithUrl,d=f!==void 0&&f,p=e.headers,g=p===void 0?{}:p,v=e.withCredentials,m=v!==void 0&&v,y=e.timeout,h=y===void 0?1e4:y,$=e.onBeforeUpload,w=$===void 0?function(Z){return Z}:$,C=e.onSuccess,D=C===void 0?function(Z,se){}:C,A=e.onError,I=A===void 0?function(Z,se,ee){console.error(Z.name+" upload error",se,ee)}:A,M=e.onProgress,V=M===void 0?function(Z){}:M;if(!n)throw new Error(`Cannot get upload server address
\u6CA1\u6709\u914D\u7F6E\u4E0A\u4F20\u5730\u5740`);if(!i)throw new Error(`Cannot get fieldName
\u6CA1\u6709\u914D\u7F6E fieldName`);var Y=n;d&&(Y=function(Z,se){var ee=Oe(Z.split("#"),2),ae=ee[0],fe=ee[1],_e=[];R$(se,function(ie,Ie){_e.push(Ie+"="+ie)});var ve=_e.join("&");return ae=ae.indexOf("?")>0?ae+"&"+ve:ae+"?"+ve,fe?ae+"#"+fe:ae}(Y,c));var J=new zf({onBeforeUpload:w,restrictions:{maxFileSize:a,maxNumberOfFiles:s},meta:c}).use(jz,{endpoint:Y,headers:g,formData:!0,fieldName:i,bundle:!0,withCredentials:m,timeout:h});return J.on("upload-success",function(Z,se){var ee=se.body,ae=ee===void 0?{}:ee;try{D(Z,ae)}catch(fe){console.error("wangEditor upload file - onSuccess error",fe)}J.removeFile(Z.id)}),J.on("progress",function(Z){Z<1||V(Z)}),J.on("error",function(Z){console.error("wangEditor file upload error",Z.stack)}),J.on("upload-error",function(Z,se,ee){try{I(Z,se,ee)}catch(ae){console.error("wangEditor upload file - onError error",ae)}J.removeFile(Z.id)}),J.on("restriction-failed",function(Z,se){try{I(Z,se)}catch(ee){console.error("wangEditor upload file - onError error",ee)}J.removeFile(Z.id)}),J}function eo(e){return eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eo(e)}function _q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ct(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),r.forEach(function(i){_q(e,i,n[i])})}return e}function pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hi(e,t,n){return t&&AC(e.prototype,t),n&&AC(e,n),e}function Na(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uf(e,t){if(t&&(eo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Na(e)}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ws(e)}function yb(e,t){return yb=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},yb(e,t)}function h0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yb(e,t)}Nt&&!Bq&&Fq(UB,"name",{configurable:!0,get:function(){try{return kq(VB,Tq(this))[1]}catch{return""}}});var Pq={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},ui=new(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pi(this,e),this.init(t,n)}return hi(e,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Pq,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,n,r,
`)&&e.flags==="s")}),dK=ge.RegExp,pK=ut(function(){var e=dK("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),hK=xb.get,gK=Hw("native-string-replace",String.prototype.replace),jh=RegExp.prototype.exec,Ob=jh,vK=le("".charAt),mK=le("".indexOf),yK=le("".replace),Z1=le("".slice),Q1=(J1=/b*/g,pt(jh,ZC=/a/,"a"),pt(jh,J1,"a"),ZC.lastIndex!==0||J1.lastIndex!==0),QC=fF.BROKEN_CARET,em=/()??/.exec("")[1]!==void 0;(Q1||em||QC||fK||pK)&&(Ob=function(e){var t,n,r,i,o,a,u,s=this,l=hK(s),c=it(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=pt(Ob,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=QC&&s.sticky,g=pt(cF,s),v=s.source,m=0,y=c;if(p&&(g=yK(g,"y",""),mK(g,"g")===-1&&(g+="g"),y=Z1(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&vK(c,s.lastIndex-1)!==`
`)&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),em&&(n=new RegExp("^"+v+"$(?!\\s)",g)),Q1&&(r=s.lastIndex),i=pt(jh,p?n:s,y),p?i?(i.input=Z1(i.input,m),i[0]=Z1(i[0],m),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:Q1&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),em&&i&&i.length>1&&pt(gK,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=hF(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var cf=Ob;_t({target:"RegExp",proto:!0,forced:/./.exec!==cf},{exec:cf});var e3=Function.prototype,eD=e3.apply,bK=e3.bind,tD=e3.call,gF=typeof Reflect=="object"&&Reflect.apply||(bK?tD.bind(eD):function(){return tD.apply(eD,arguments)}),$K=kn("species"),tm=RegExp.prototype,t3=function(e,t,n,r){var i=kn(e),o=!ut(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!ut(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[$K]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=le(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var g=le(l),v=c.exec;return v===cf||v===tm.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:g(f,c,d)}:{done:!1}});sf(String.prototype,e,s[0]),sf(tm,i,s[1])}r&&Es(tm[i],"sham",!0)},wK=le("".charAt),nD=le("".charCodeAt),EK=le("".slice),rD=function(e){return function(t,n){var r,i,o=it(Zn(t)),a=Ls(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=nD(o,a))<55296||r>56319||a+1===u||(i=nD(o,a+1))<56320||i>57343?e?wK(o,a):r:e?EK(o,a,a+2):i-56320+(r-55296<<10)+65536}},CK={codeAt:rD(!1),charAt:rD(!0)}.charAt,n3=function(e,t,n){return t+(n?CK(e,t).length:1)},DK=Math.floor,nm=le("".charAt),SK=le("".replace),rm=le("".slice),xK=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,AK=/\$([$&'`]|\d{1,2})/g,OK=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=AK;return i!==void 0&&(i=Gf(i),s=xK),SK(o,s,function(l,c){var f;switch(nm(c,0)){case"$":return"$";case"&":return e;case"`":return rm(t,0,n);case"'":return rm(t,a);case"<":f=i[rm(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=DK(d/10);return p===0?l:p<=u?r[p-1]===void 0?nm(c,1):r[p-1]+nm(c,1):l}f=r[d-1]}return f===void 0?"":f})},BK=ge.TypeError,ff=function(e,t){var n=e.exec;if(Ut(n)){var r=pt(n,e,t);return r!==null&&On(r),r}if(to(e)==="RegExp")return pt(cf,e,t);throw BK("RegExp#exec called on incompatible receiver")},Bb=kn("replace"),FK=Math.max,TK=Math.min,kK=le([].concat),im=le([].push),iD=le("".indexOf),oD=le("".slice),_K="a".replace(/./,"$0")==="$0",aD=!!/./[Bb]&&/./[Bb]("a","$0")==="";t3("replace",function(e,t,n){var r=aD?"$":"$0";return[function(i,o){var a=Zn(this),u=i==null?void 0:y0(i,Bb);return u?pt(u,i,a,o):pt(t,it(a),i,o)},function(i,o){var a=On(this),u=it(i);if(typeof o=="string"&&iD(o,r)===-1&&iD(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=Ut(o);l||(o=it(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=ff(a,u);if(p===null||(im(d,p),!c))break;it(p[0])===""&&(a.lastIndex=n3(u,Kf(a.lastIndex),f))}for(var g,v="",m=0,y=0;y<d.length;y++){for(var h=it((p=d[y])[0]),$=FK(TK(Ls(p.index),u.length),0),w=[],C=1;C<p.length;C++)im(w,(g=p[C])===void 0?g:String(g));var D=p.groups;if(l){var A=kK([h],w,$,u);D!==void 0&&im(A,D);var I=it(gF(o,void 0,A))}else I=OK(h,u,$,w,D,o);$>=m&&(v+=oD(u,m,$)+I,m=$+h.length)}return v+oD(u,m)}]},!!ut(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!_K||aD);var Fb=kn("unscopables"),Tb=Array.prototype;Tb[Fb]==null&&js.f(Tb,Fb,{configurable:!0,value:hF(null)});var vF=function(e){Tb[Fb][e]=!0},PK=w0.find,uD=!0;"find"in[]&&Array(1).find(function(){uD=!1}),_t({target:"Array",proto:!0,forced:uD},{find:function(e){return PK(this,e,arguments.length>1?arguments[1]:void 0)}}),vF("find");var NK=kn("match"),mF=function(e){var t;return Hn(e)&&((t=e[NK])!==void 0?!!t:to(e)=="RegExp")},IK=ge.TypeError,RK=kn("species"),jK=function(e,t){var n,r=On(e).constructor;return r===void 0||(n=On(r)[RK])==null?t:function(i){if(Jw(i))return i;throw IK(ZB(i)+" is not a constructor"
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,lD=le("".replace),Lh="["+kb+"]",UK=RegExp("^"+Lh+Lh+"*"),VK=RegExp(Lh+Lh+"*$"),om=function(e){return function(t){var n=it(Zn(t));return 1&e&&(n=lD(n,UK,"")),2&e&&(n=lD(n,VK,"")),n}},WK={start:om(1),end:om(2),trim:om(3)},qK=b0.PROPER,GK=WK.trim;function r3(e){return O("<div>"+e+"</div>").children().filter(function(t){return t.tagName!=="BR"}).length===0}function Ms(e){return e.length===0?"":e[0].outerHTML}function zs(e){return e.length?e[0].tagName.toLowerCase():""}function cr(e,t){for(var n="",r=(e.attr("style")||"").split(";"),i=r.length,o=0;o<i;o++){var a=r[o];if(a){var u=a.split(":");u[0].trim()===t&&(n=u[1].trim())}}return n}_t({target:"String",proto:!0,forced:(_l="trim",ut(function(){return!!kb[_l]()||"\u200B\x85\u180E"[_l]()!=="\u200B\x85\u180E"||qK&&kb[_l].name!==_l}))},{trim:function(){return GK(this)}}),_t({global:!0},{globalThis:ge}),fh&&(O.fn.css=fh),zr&&(O.fn.append=zr),i6&&(O.fn.prepend=i6),as&&(O.fn.addClass=as),us&&(O.fn.removeClass=us),ss&&(O.fn.hasClass=ss),Mr&&(O.fn.on=Mr),e6&&(O.fn.off=e6),vo&&(O.fn.focus=vo),jr&&(O.fn.attr=jr),uh&&(O.fn.removeAttr=uh),cs&&(O.fn.hide=cs),ch&&(O.fn.show=ch),gh&&(O.fn.parents=gh),ls&&(O.fn.dataset=ls),Lr&&(O.fn.val=Lr),ph&&(O.fn.text=ph),go&&(O.fn.html=go),ds&&(O.fn.children=ds),ps&&(O.fn.remove=ps),fs&&(O.fn.find=fs),sh&&(O.fn.width=sh),lh&&(O.fn.height=lh),n6&&(O.fn.filter=n6),hs&&(O.fn.empty=hs);var KK={selector:"p",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return!!X.isText(i)||!!n.isInline(i)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}},_b=function(e,t){return _b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},_b(e,t)};/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function tt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}_b(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var bo=function(){return bo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bo.apply(this,arguments)};function Bo(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(l){try{s(r.next(l))}catch(c){o(c)}}function u(l){try{s(r.throw(l))}catch(c){o(c)}}function s(l){var c;l.done?i(l.value):(c=l.value,c instanceof n?c:new n(function(f){f(c)})).then(a,u)}s((r=r.apply(e,t||[])).next())})}function Fo(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(c[0]===6&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(f){c=[6,f],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,l])}}}function $F(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ke(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function cD(e){var t=ke(E.nodes(e,{match:function(a){return e.children[0]===a},mode:"highest"}),1),n=t[0];if(n==null)return!1;var r=n[0];if(!te.isElement(r)||r.type==="paragraph"||W.string(r)!=="")return!1;var i=r.children,o=i===void 0?[]:i;return!!X.isText(o[0])&&(P.setNodes(e,{type:"paragraph"}),!0)}var YK={renderElems:[Jq],elemsToHtml:[Zq],parseElemsHtml:[KK],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward;e.insertText,e.insertBreak;var r=e;return r.deleteBackward=function(i){cD(r)||t(i)},r.deleteForward=function(i){cD(r)||n(i)},r}},XK=/"/g,JK=le("".replace),bc=function(e,t,n,r){var i=it(Zn(e)),o="<"+t;return n!==""&&(o+=" "+n+'="'+JK(it(r),XK,"&quot;")+'"'),o+">"+i+"</"+t+">"},$c=function(e){return ut(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})};function am(e,t){var n=t,r=e,i=r.bold,o=r.italic,a=r.underline;return i&&(n="<strong>"+n+"</strong>"),r.code&&(n="<code>"+n+"</code>"),o&&(n="<em>"+n+"</em>"),a&&(n="<u>"+n+"</u>"),r.through&&(n="<s>"+n+"</s>"),r.sub&&(n="<sub>"+n+"</sub>"),r.sup&&(n="<sup>"+n+"</sup>"),n}function Uo(e,t){return e.length!==0&&(!!e[0].matches(t)||e.find(t).length>0)}_t({target:"String",proto:!0,forced:$c("bold")},{bold:function(){return bc(this,"b","","")}}),_t({target:"String",proto:!0,forced:$c("italics")},{italics:function(){return bc(this,"i","","")}}),_t({target:"String",proto:!0,forced:$c("sub")},{sub:function(){return bc(this,"sub","","")}}),_t({target:"String",proto:!0,forced:$c("sup")},{sup:function(){return bc(this,"sup","","")}});var fD={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectLi
<li data-value="0" class="clear">
<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>
`+u+`
</li>
`);return i.prepend(s),i[0]},e}(),nX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("color.color"),n.iconSvg=aY,n.mark="color",n}return tt(t,e),t}(kF),rX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("color.bgColor"),n.iconSvg=uY,n.mark="bgColor",n}return tt(t,e),t}(kF),mD=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"],iX={renderStyle:function(e,t){var n=e,r=n.color,i=n.bgColor,o=t;return r&&Ia(o,{color:r}),i&&Ia(o,{backgroundColor:i}),o},styleToHtml:function(e,t){if(!X.isText(e))return t;var n,r=e,i=r.color,o=r.bgColor;return i||o?((r3(t)||zs(n=O(t))!=="span")&&(n=O("<span>"+t+"</span>")),i&&n.css("color",i),o&&n.css("background-color",o),Ms(n)):t},preParseHtml:[tX],parseStyleHtml:function(e,t,n){var r=O(e);if(!X.isText(t))return t;var i=t,o=cr(r,"color");o&&(i.color=o);var a=cr(r,"background-color");return a||(a=cr(r,"background")),a&&(i.bgColor=a),i},menus:[{key:"color",factory:function(){return new nX},config:{colors:mD}},{key:"bgColor",factory:function(){return new rX},config:{colors:mD}}]},oX=function(e){if(typeof e!="string")return!1;var t=e.match(aX);if(!t)return!1;var n=t[1];return n?!!(uX.test(n)||sX.test(n)):!1},aX=/^(?:\w+:)?\/\/(\S+)$/,uX=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,sX=/^[^\s\.]+\.\S{2,}$/,lX=iF.includes;function E0(e){return e===void 0&&(e="r"),e+"-"+U9()}function i3(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function _F(e,t,n,r){return Bo(this,void 0,void 0,function(){var i,o;return Fo(this,function(a){switch(a.label){case 0:return(i=t.getMenuConfig(e).checkLink)?[4,i(n,r)]:[3,2];case 1:if(typeof(o=a.sent())=="string")return t.alert(o,"error"),[2,!1];if(o==null)return[2,!1];a.label=2;case 2:return[2,!0]}})})}function PF(e,t,n){return Bo(this,void 0,void 0,function(){var r;return Fo(this,function(i){switch(i.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,n]}})})}function o3(e){return e.selection==null||!!x.getSelectedElems(e).some(function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)||void 0})}function fm(e,t){return{type:"link",url:i3(e),children:t?[{text:t}]:[]}}function NF(e,t,n){return Bo(this,void 0,void 0,function(){var r,i,o;return Fo(this,function(a){switch(a.label){case 0:return n?(t||(t=n),e.restoreSelection(),o3(e)?[2]:[4,_F("insertLink",e,t,n)]):[2];case 1:return a.sent()?[4,PF("insertLink",e,n)]:[2];case 2:return r=a.sent(),(i=e.selection)==null?[2]:(R.isCollapsed(i)?(e.insertText(" "),o=fm(r,t),P.insertNodes(e,o),e.insertFragment([{text:" "}])):E.string(e,i)!==t?(e.deleteFragment(),o=fm(r,t),P.insertNodes(e,o)):(o=fm(r),P.wrapNodes(e,o,{split:!0}),P.collapse(e,{edge:"end"})),[2])}})})
`)return e.deleteBackward("character"),void P.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}n(`
`)},r}},KX=function(){function e(){this.title=q("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(t,n){},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||!!ke(E.nodes(t,{match:function(n){return x.getNodeType(n)==="pre"||!!E.isVoid(t,n)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(t){if(this.$content==null){var n=O('<ul class="w-e-panel-content-emotion"></ul>');n.on("click","li",function(o){var a=o.target;if(a!=null){o.preventDefault();var u=O(a).text();t.insertText(u)}}),this.$content=n}var r=this.$content;if(r==null)return document.createElement("ul");r.empty();var i=t.getMenuConfig("emotion").emotions;return(i===void 0?[]:i).forEach(function(o){var a=O("<li>"+o+"</li>");r.append(a)}),r[0]},e}(),YX={menus:[{key:"emotion",factory:function(){return new KX},config:{emotions:"\u{1F600} \u{1F603} \u{1F604} \u{1F601} \u{1F606} \u{1F605} \u{1F602} \u{1F923} \u{1F60A} \u{1F607} \u{1F642} \u{1F643} \u{1F609} \u{1F60C} \u{1F60D} \u{1F618} \u{1F617} \u{1F619} \u{1F61A} \u{1F60B} \u{1F61B} \u{1F61D} \u{1F61C} \u{1F913} \u{1F60E} \u{1F60F} \u{1F612} \u{1F61E} \u{1F614} \u{1F61F} \u{1F615} \u{1F641} \u{1F623} \u{1F616} \u{1F62B} \u{1F629} \u{1F622} \u{1F62D} \u{1F624} \u{1F620} \u{1F621} \u{1F633} \u{1F631} \u{1F628} \u{1F917} \u{1F914} \u{1F636} \u{1F611} \u{1F62C} \u{1F644} \u{1F62F} \u{1F634} \u{1F637} \u{1F911} \u{1F608} \u{1F921} \u{1F4A9} \u{1F47B} \u{1F480} \u{1F440} \u{1F463} \u{1F450} \u{1F64C} \u{1F44F} \u{1F91D} \u{1F44D} \u{1F44E} \u{1F44A} \u270A \u{1F91B} \u{1F91C} \u{1F91E} \u270C\uFE0F \u{1F918} \u{1F44C} \u{1F448} \u{1F449} \u{1F446} \u{1F447} \u261D\uFE0F \u270B \u{1F91A} \u{1F590} \u{1F596} \u{1F44B} \u{1F919} \u{1F4AA} \u{1F595} \u270D\uFE0F \u{1F64F}".split(" ")}}]},XX={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"},JX={selector:"font",preParseHtml:function(e){var t=O(e);if(zs(t)!=="font")return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",XX[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}},ZX=le("".indexOf);_t({target:"String",proto:!0,forced:!OF("includes")},{includes:function(e){return!!~ZX(it(Zn(this)),it(AF(e)),arguments.length>1?arguments[1]:void 0)}});var Ti,zp,zF=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(t){return!1},e.prototype.getValue=function(t){var n=this.mark,r=E.marks(t);return r&&r[n]?r[n]:""},e.prototype.isDisabled=function(t){return t.selection==null||(this.mark,!!ke(E.nodes(t,{match:function(n){return x.getNodeType(n)==="pre"||!!E.isVoid(t,n)},universal:!0}),1)[0])},e.prototype.exec=function(t,n){var r=this.mark;n?t.addMark(r,n):t.removeMark(r)},e}(),QX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("fontSize.title"),n.iconSvg=sY,n.mark="fontSize",n}return tt(t,e),t.prototype.getOptions=function(n){var r=[],i=n.getMenuConfig(this.mark).fontSizeList,o=i===void 0?[]:i;r.push({text:q("fontSize.default"),value:""}),o.forEach(function(u){r.push({text:u,value:u})});var a=this.getValue(n);return r.forEach(function(u){u.value===a?u.selected=!0:delete u.selected}),r},t}(zF),tp=function(e){return e&&e.Math==Math&&e},Ee=tp(typeof globalThis=="object"&&globalThis)||tp(typeof window=="object"&&window)||tp(typeof self=="object"&&sel
`).map(function(o){return{type:"paragraph",children:[{text:o}]}});P.insertNodes(t,i,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(t,n){var r,i,o=[],a=E.nodes(t,{match:function(f){return t.children.includes(f)},universal:!0});try{for(var u=$F(a),s=u.next();!s.done;s=u.next()){var l=ke(s.value,1)[0];l&&o.push(W.string(l))}}catch(f){r={error:f}}finally{try{s&&!s.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}P.removeNodes(t,{mode:"highest"});var c={type:"pre",children:[{type:"code",language:n,children:[{text:o.join(`
`)}]}]};P.insertNodes(t,c,{mode:"highest"})},e}(),vQ={key:"codeBlock",factory:function(){return new gQ}};_t({target:"String",proto:!0,forced:$c("anchor")},{anchor:function(e){return bc(this,"a","name",e)}}),t3("match",function(e,t,n){return[function(r){var i=Zn(this),o=r==null?void 0:y0(r,e);return o?pt(o,r,i):new RegExp(r)[e](it(i))},function(r){var i=On(this),o=it(r),a=n(t,i,o);if(a.done)return a.value;if(!i.global)return ff(i,o);var u=i.unicode;i.lastIndex=0;for(var s,l=[],c=0;(s=ff(i,o))!==null;){var f=it(s[0]);l[c]=f,f===""&&(i.lastIndex=n3(o,Kf(i.lastIndex),u)),c++}return c===0?null:l}]});var mQ={type:"pre",renderElem:function(e,t,n){return de("pre",null,t)}},yQ={type:"code",renderElem:function(e,t,n){return de("code",null,t)}},bQ={selector:"pre",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return x.getNodeType(i)==="code"})).length===0&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter(function(i){return x.getNodeType(i)==="code"})}}},$Q={menus:[vQ],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData;e.insertNode;var i=e;return i.insertBreak=function(){var o=x.getSelectedNodeByType(i,"code");if(o!=null){var a=function(l,c){var f=c.selection;if(f==null)return"";var d=W.string(l),p=f.anchor.offset,g=d.slice(0,p).split(`
`),v=g.length;return v===0?"":g[v-1]}(o,i);if(a){var u=a.match(/^\s+/);if(u!=null&&u[0]!=null){var s=u[0];return void i.insertText(`
`+s)}}i.insertText(`
`)}else t()},i.normalizeNode=function(o){var a=ke(o,2),u=a[0],s=a[1],l=x.getNodeType(u);return l==="code"&&s.length<=1&&P.setNodes(i,{type:"paragraph"},{at:s}),l==="pre"&&(x.isLastNode(i,u)&&P.insertNodes(i,x.genEmptyParagraph(),{at:[s[0]+1]}),x.getNodeType(u.children[0])!=="code"&&(P.unwrapNodes(i),P.setNodes(i,{type:"paragraph"},{mode:"highest"}))),n([u,s])},i.insertData=function(o){if(x.getSelectedNodeByType(i,"code")!=null){var a=o.getData("text/plain");E.insertText(i,a)}else r(o)},i},renderElems:[mQ,yQ],elemsToHtml:[{type:"code",elemToHtml:function(e,t){return"<code>"+t+"</code>"}},{type:"pre",elemToHtml:function(e,t){return"<pre>"+t+"</pre>"}}],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=O(e);if(zs(t)!=="code")return e;var n=t.find("xmp");if(n.length===0)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:O(e)[0].textContent||""}]}}},bQ]},wQ=function(){function e(){this.title=q("fullScreen.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return t.isFullScreen},e.prototype.isDisabled=function(t){return!1},e.prototype.exec=function(t,n){t.isFullScreen?t.unFullScreen():t.fullScreen()},e}(),EQ={menus:[{key:"fullScreen",factory:function(){return new wQ}}]},CQ=function(){function e(){this.title=q("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!!R.isExpanded(n)},e.prototype.exec=function(t,n){var r=t.selection;if(r!=null){var i=[r.anchor.path[0]];P.insertNodes(t,{type:"paragraph",children:[{text:""}]},{at:i}),t.select(E.start(t,i))}},e}(),DQ=[xY,iX,WZ,YZ,eQ,nQ,_X,cQ,YX,mX,$Q,GX,QY,YK,RX,oQ,EQ,{menus:[{key:"enter",factory:function(){return new CQ}}]}];gn("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),gn("zh-CN",{listModule:{unOrderedList:"\u65E0\u5E8F\u5217\u8868",orderedList:"\u6709\u5E8F\u5217\u8868"}});var oS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $T(e){var t={exports:{}};return e(t,t.exports),t.exports}var _i,Up,op=function(e){return e&&e.Math==Math&&e},Ae=op(typeof globalThis=="object"&&globalThis)||op(typeof window=="object"&&window)||op(typeof self=="object"&&self)||op(typeof oS=="object"&&oS)||function(){return this}()||Function("return th
`)&&e.flags==="s")}),Jee=Ae.RegExp,Zee=Wt(function(){var e=Jee("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Qee=Qb.get,ete=$3("native-string-replace",String.prototype.replace),tg=RegExp.prototype.exec,i4=tg,tte=Ne("".charAt),nte=Ne("".indexOf),rte=Ne("".replace),_m=Ne("".slice),Pm=(km=/b*/g,an(tg,SS=/a/,"a"),an(tg,km,"a"),SS.lastIndex!==0||km.lastIndex!==0),xS=Kee.BROKEN_CARET,Nm=/()??/.exec("")[1]!==void 0;(Pm||Nm||xS||Xee||Zee)&&(i4=function(e){var t,n,r,i,o,a,u,s=this,l=Qee(s),c=Or(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=an(i4,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=xS&&s.sticky,g=an(qee,s),v=s.source,m=0,y=c;if(p&&(g=rte(g,"y",""),nte(g,"g")===-1&&(g+="g"),y=_m(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&tte(c,s.lastIndex-1)!==`
`)&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),Nm&&(n=new RegExp("^"+v+"$(?!\\s)",g)),Pm&&(r=s.lastIndex),i=an(tg,p?n:s,y),p?i?(i.input=_m(i.input,m),i[0]=_m(i[0],m),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:Pm&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),Nm&&i&&i.length>1&&an(ete,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=IT(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var ng=i4;Vs({target:"RegExp",proto:!0,forced:/./.exec!==ng},{exec:ng});var T3=Function.prototype,AS=T3.apply,ite=T3.bind,OS=T3.call,ote=typeof Reflect=="object"&&Reflect.apply||(ite?OS.bind(AS):function(){return OS.apply(AS,arguments)}),ate=Gr("species"),Im=RegExp.prototype,ute=Ne("".charAt),BS=Ne("".charCodeAt),ste=Ne("".slice),FS=function(e){return function(t,n){var r,i,o=Or(rd(t)),a=T0(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=BS(o,a))<55296||r>56319||a+1===u||(i=BS(o,a+1))<56320||i>57343?e?ute(o,a):r:e?ste(o,a,a+2):i-56320+(r-55296<<10)+65536}},lte={codeAt:FS(!1),charAt:FS(!0)}.charAt,cte=function(e,t,n){return t+(n?lte(e,t).length:1)},fte=Math.floor,Rm=Ne("".charAt),dte=Ne("".replace),jm=Ne("".slice),pte=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,hte=/\$([$&'`]|\d{1,2})/g,gte=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=hte;return i!==void 0&&(i=F0(i),s=pte),dte(o,s,function(l,c){var f;switch(Rm(c,0)){case"$":return"$";case"&":return e;case"`":return jm(t,0,n);case"'":return jm(t,a);case"<":f=i[jm(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=fte(d/10);return p===0?l:p<=u?r[p-1]===void 0?Rm(c,1):r[p-1]+Rm(c,1):l}f=r[d-1]}return f===void 0?"":f})},vte=Ae.TypeError,mte=function(e,t){var n=e.exec;if(qt(n)){var r=an(n,e,t);return r!==null&&wo(r),r}if(ba(e)==="RegExp")return an(ng,e,t);throw vte("RegExp#exec called on incompatible receiver")},o4=Gr("replace"),yte=Math.max,bte=Math.min,$te=Ne([].concat),Lm=Ne([].push),TS=Ne("".indexOf),kS=Ne("".slice),wte="a".replace(/./,"$0")==="$0",_S=!!/./[o4]&&/./[o4]("a","$0")==="";(function(e,t,n,r){var i=Gr(e),o=!Wt(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!Wt(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[ate]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=Ne(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var g=Ne(l),v=c.exec;return v===ng||v===Im.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:g(f,c,d)}:{done:!1}});Zh(String.prototype,e,s[0]),Zh(Im,i,s[1])}r&&df(Im[i],"sham",!0)})("replace",function(e,t,n){var r=_S?"$":"$0";return[function(i,o){var a=rd(this),u=i==null?void 0:DT(i,o4);return u?an(u,i,a,o):an(t,Or(a),i,o)},function(i,o){var a=wo(this),u=Or(i);if(typeof o=="string"&&TS(o,r)===-1&&TS(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=qt(o);l||(o=Or(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=mte(a,u);if(p===null||(Lm(d,p),!c))break;Or(p[0])===""&&(a.lastIndex=cte(u,TT(a.lastIndex),f))}for(var g,v="",m=0,y=0;y<d.length;y++){for(var h=Or((p=d[y])[0]),$=yte(bte(T0(p.index),u.length),0),w=[],C=1;C<p.length;C++)Lm(w,(g=p[C])===void 0?g:String(g));var D=p.groups;if(l){var A=$te([h],w,$,u);D!==void 0&&Lm(A,D);var I=Or(ote(o,void 0,A))}else I=gte(h,u,$,w,D,o);$>=m&&(v+=kS(u,m,$)+I,m=$+h.length)}return v+kS(u,m)}]},!!Wt(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!wte||_S),Vs({global:!0},{globalThis:Ae});var Ete={selector:"li",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return!!X.isText(i)||!!n.isInline(i)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"list-item",children:t}}},Cte={selector:"ul",parseElemHtml:function(e,t,n){return{type:"bulleted-list",children:t.filter(function(r){return x.getNodeType(r)==="list-item"})}}},Dte={selector:"ol",parseElemHtml:function(e,t,n){return{type:"numbered-list",children:t.filter(function(r){return x.getNodeType(r)==="list-item"})}}},a4=function(e,t){retu
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function UT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}a4(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function u4(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}var PS,VT=function(){function e(){this.tag="button"}return e.prototype.getListNode=function(t){var n=this.type;return x.getSelectedNodeByType(t,n)},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!!this.getListNode(t)},e.prototype.isDisabled=function(t){return t.selection==null||!!x.getSelectedElems(t).some(function(n){if(E.isVoid(t,n)&&E.isBlock(t,n))return!0;var r=n.type;return!!["pre","code","table"].includes(r)||void 0})},e.prototype.getMatchListType=function(t){var n=u4(E.nodes(t,{match:function(o){return eg(o)},universal:!0}),1),r=n[0];if(r==null)return"";var i=u4(r,1)[0];return x.getNodeType(i)},e.prototype.exec=function(t,n){var r=this.type,i=this.isActive(t);P.unwrapNodes(t,{match:function(u){return eg(u)},split:!0}),P.setNodes(t,{type:i?"paragraph":"list-item"});var o={type:r,children:[]};i||P.wrapNodes(t,o);var a=this.getMatchListType(t);a!=""&&a!==r&&P.wrapNodes(t,o)},e}(),Ste='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',xte='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',Ate=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="bulleted-list",n.title=q("listModule.unOrderedList"),n.iconSvg=Ste,n}return UT(t,e),t}(VT),Ote=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="numbered-list",n.title=q("listModule.orderedList"),n.iconSvg=xte,n}return UT(t,e),t}(VT),Bte={key:"bulletedList",factory:function(){return new Ate}},Fte={key:"numberedList",factory:function(){return new Ote}},Tte=/"/g,kte=Ne("".replace);Vs({target:"String",proto:!0,forced:(PS="anchor",Wt(function(){var e=""[PS]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},{anchor:function(e){return t="a",n="name",r=e,i=Or(rd(this)),o="<"+t,n!==""&&(o+=" "+n+'="'+kte(Or(r),Tte,"&quot;")+'"'),o+">"+i+"</"+t+">";var t,n,r,i,o}});var NS=function(e,t,n){var r=w3(t);r in e?od.f(e,r,m3(0,n)):e[r]=n},WT=Gr("isConcatSpreadable"),IS=Ae.TypeError,_te=Yh>=51||!Wt(function(){var e=[];return e[WT]=!1,e.concat()[0]!==e}),Pte=HT("concat"),Nte=function(e){if(!ir(e))return!1;var t=e[WT];return t!==void 0?!!t:n4(e)};Vs({target:"Array",proto:!0,forced:!_te||!Pte},{concat:function(e){var t,n,r,i,o,a=F0(this),u=zT(a,0),s=0;for(t=-1,r=arguments.length;t<r;t++)if(Nte(o=t===-1?a:arguments[t])){if(s+(i=D3(o))>9007199254740991)throw IS("Maximum allowed index exceeded");for(n=0;n<i;n++,s++)n in o&&NS(u,s,o[n])}else{if(s>=9007199254740991)throw IS("Maximum allowed index exceeded");NS(u,s++,o)}return u.length=s,u}});var Ite={renderElems:[Aee,Oee,Bee],elemsToHtml:[Fee,Tee,kee],parseElemsHtml:[Ete,Dte,Cte],menus:[Bte,Fte],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward;e.insertNode;var r=e;return r.insertBreak=function(){var i=r.selection;if(i!=null){var o=x.getSelectedNodeByType(r,"list-item");if(o!=null){var a=x.getParentNode(r,o),u=(a==null?void 0:a.children)||[];if(o===u[u.length-1]&&W.string(o)===""){P.removeNodes(r,{match:function(l){return x.checkNodeType(l,"list-item")}});var s=[i.anchor.path[0]+1];return P.insertNodes(r,x.ge
`)&&e.flags==="s")}),Wne=De.RegExp,qne=Ot(function(){var e=Wne("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Gne=g4.get,Kne=I3("native-string-replace",String.prototype.replace),ag=RegExp.prototype.exec,m4=ag,Yne=xe("".charAt),Xne=xe("".indexOf),Jne=xe("".replace),Wm=xe("".slice),qm=(Vm=/b*/g,St(ag,ex=/a/,"a"),St(ag,Vm,"a"),ex.lastIndex!==0||Vm.lastIndex!==0),tx=uk.BROKEN_CARET,Gm=/()??/.exec("")[1]!==void 0;(qm||Gm||tx||Vne||qne)&&(m4=function(e){var t,n,r,i,o,a,u,s=this,l=Gne(s),c=Qt(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=St(m4,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=tx&&s.sticky,g=St(ak,s),v=s.source,m=0,y=c;if(p&&(g=Jne(g,"y",""),Xne(g,"g")===-1&&(g+="g"),y=Wm(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Yne(c,s.lastIndex-1)!==`
`)&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),Gm&&(n=new RegExp("^"+v+"$(?!\\s)",g)),qm&&(r=s.lastIndex),i=St(ag,p?n:s,y),p?i?(i.input=Wm(i.input,m),i[0]=Wm(i[0],m),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:qm&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),Gm&&i&&i.length>1&&St(Kne,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=ck(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var gf=m4;Do({target:"RegExp",proto:!0,forced:/./.exec!==gf},{exec:gf});var ug=Array.isArray||function(e){return oo(e)=="Array"},fk=function(){},Zne=[],dk=sd("Reflect","construct"),G3=/^\s*(?:class|function)\b/,Qne=xe(G3.exec),ere=!G3.exec(fk),ql=function(e){if(!Gt(e))return!1;try{return dk(fk,Zne,e),!0}catch{return!1}},K3=!dk||Ot(function(){var e;return ql(ql.call)||!ql(Object)||!ql(function(){e=!0})||e})?function(e){if(!Gt(e))return!1;switch(W3(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return ere||!!Qne(G3,M3(e))}:ql,pk=function(e,t,n){var r=j3(t);r in e?ld.f(e,r,k3(0,n)):e[r]=n},tre=er("species"),Y3=function(e){return c4>=51||!Ot(function(){var t=[];return(t.constructor={})[tre]=function(){return{foo:1}},t[e](Boolean).foo!==1})},nre=xe([].slice),rre=Y3("slice"),ire=er("species"),Km=De.Array,ore=Math.max;function pr(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function nx(e){var t=e.selection;if(t==null)return!1;var n=pr(E.nodes(e,{match:function(o){return x.checkNodeType(o,"table-cell")}}),1)[0];if(n){var r=pr(n,2)[1],i=E.start(e,r);if($e.equals(t.anchor,i))return!0}return!1}function rx(e,t){var n,r,i=E.nodes(e,{at:t,match:function(s){return x.getNodeType(s)==="table"}}),o=!1;try{for(var a=function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],f=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&f>=s.length&&(s=void 0),{value:s&&s[f++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")}(i),u=a.next();!u.done;u=a.next())u.value,o=!0}catch(s){n={error:s}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o}Do({target:"Array",proto:!0,forced:!rre},{slice:function(e,t){var n,r,i,o=ud(this),a=_0(o),u=hf(e,a),s=hf(t===void 0?a:t,a);if(ug(o)&&(n=o.constructor,(K3(n)&&(n===Km||ug(n.prototype))||Vn(n)&&(n=n[ire])===null)&&(n=void 0),n===Km||n===void 0))return nre(o,u,s);for(r=new(n===void 0?Km:n)(ore(s-u,0)),i=0;u<s;u++,i++)u in o&&pk(r,i,o[u]);return r.length=i,r}});var ix=xe(xe.bind),are=er("species"),ox=De.Array,ure=function(e,t){return new(function(n){var r;return ug(n)&&(r=n.constructor,(K3(r)&&(r===ox||ug(r.prototype))||Vn(r)&&(r=r[are])===null)&&(r=void 0)),r===void 0?ox:r}(e))(t===0?0:t)},ax=xe([].push),Ii=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,o=e==6,a=e==7,u=e==5||o;return function(s,l,c,f){for(var d,p,g=R3(s),v=YT(g),m=function(C,D){return ZT(C),D===void 0?C:ix?ix(C,D):function(){return C.apply(D,arguments)}}(l,c),y=_0(v),h=0,$=f||ure,w=t?$(s,y):n||a?$(s,0):void 0;y>h;h++)if((u||h in v)&&(p=m(d=v[h],h,g),e))if(t)w[h]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return h;case 2:ax(w,d)}else switch(e){case 4:return!1;case 7:ax(w,d)}return o?-1:r||i?i:w}},P0={forEach:Ii(0),map:Ii(1),filter:Ii(2),some:Ii(3),every:Ii(4),find:Ii(5),findIndex:Ii(6),filterReject:Ii(7)},sre=P0.map;Do({target:"Array",proto:!0,forced:!Y3("map")},{map:function(e){return sre(this,e,arguments.length>1?arguments[1]:void 0)}});var lre=V3?{}.toString:function(){return"[object "+W3(this)+"]"};function N0(e){var t=e.children||[];return t.length===0?[]:(t[0]||{}).children||[]}function hk(e){return N0(e).every(function(t){return!!t.isHeader})}V3||pf(Object.prototype,"toString",lre,{unsafe:!0});var cre=H3.PROPER,y4=RegExp.prototype,gk=y4.toString,fre=xe(ak),dr
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,hx=xe("".replace),sg="["+E4+"]",Bre=RegExp("^"+sg+sg+"*"),Fre=RegExp(sg+sg+"*$"),Xm=function(e){return function(t){var n=Qt(Co(t));return 1&e&&(n=hx(n,Bre,"")),2&e&&(n=hx(n,Fre,"")),n}},Tre={start:Xm(1),end:Xm(2),trim:Xm(3)},kre=H3.PROPER,_re=Tre.trim;function $k(e){return e.length?e[0].tagName.toLowerCase():""}Do({target:"String",proto:!0,forced:function(e){return Ot(function(){return!!E4[e]()||"\u200B\x85\u180E"[e]()!=="\u200B\x85\u180E"||kre&&E4[e].name!==e})}("trim")},{trim:function(){return _re(this)}}),Do({global:!0},{globalThis:De}),zr&&(O.fn.append=zr),Mr&&(O.fn.on=Mr),vo&&(O.fn.focus=vo),jr&&(O.fn.attr=jr),Lr&&(O.fn.val=Lr),go&&(O.fn.html=go),ls&&(O.fn.dataset=ls),as&&(O.fn.addClass=as),us&&(O.fn.removeClass=us),ds&&(O.fn.children=ds),dh&&(O.fn.each=dh),fs&&(O.fn.find=fs);var vf=!1,wk=0,Ek=0,mf=null,yf=null,Nc=O("body");function Ck(e){vf=!1,yf=null,mf=null,Nc.off("mousemove",Dk),Nc.off("mouseup",Ck)}Nc.on("mousedown",function(e){var t=e.target;if((t.tagName==="TH"||t.tagName==="TD")&&t.style.cursor==="col-resize"){t.style.cursor="auto",e.preventDefault(),vf=!0;var n=e.clientX;wk=n;var r=t.getBoundingClientRect().width;Ek=r,Nc.on("mousemove",Dk),Nc.on("mouseup",Ck)}});var Dk=Fa(function(e){if(vf&&yf!=null&&mf!=null){e.preventDefault();var t=e.clientX,n=Ek+(t-wk);(n=Math.floor(100*n)/100)<30&&(n=30),P.setNodes(yf,{width:n.toString()},{at:mf})}},100),Pre={type:"table",renderElem:function(e,t,n){var r=function(l,c){if(l.isDisabled())return!1;var f=l.selection;if(f==null||R.isCollapsed(f))return!0;var d=f.anchor,p=f.focus,g=x.findPath(l,c),v=E.start(l,g),m=E.end(l,g),y=$e.compare(d,m)<=0&&$e.compare(d,v)>=0,h=$e.compare(p,m)<=0&&$e.compare(p,v)>=0;return!!(y&&h&&_.equals(d.path.slice(0,3),p.path.slice(0,3)))}(n,e),i=e.width,o=i===void 0?"auto":i,a=x.isNodeSelected(n,e),u=N0(e),s=de("div",{className:"table-container","data-selected":a,on:{mousedown:function(l){if(l.target.tagName==="DIV"&&l.preventDefault(),!n.isDisabled()){var c=x.findPath(n,e),f=E.start(n,c),d=n.selection;d!=null?d.anchor.path[0]!==c[0]&&n.select(f):n.select(f)}}}},de("table",{width:o,contentEditable:r},de("colgroup",null,u.map(function(l){var c=l.width;return de("col",{width:c===void 0?"auto":c})})),de("tbody",null,t)));return s}},Nre={type:"table-row",renderElem:function(e,t,n){return de("tr",null,t)}},Ire={type:"table-cell",renderElem:function(e,t,n){var r=function(d,p){var g=x.getParentNode(d,p);if(g==null)return!1;var v=x.getParentNode(d,g);return v!=null&&N0(v).some(function(m){return m===p})}(n,e),i=e,o=i.colSpan,a=o===void 0?1:o,u=i.rowSpan,s=u===void 0?1:u,l=i.isHeader,c=l!==void 0&&l;if(!r)return de("td",{colSpan:a,rowSpan:s},t);var f=de(c?"th":"td",{colSpan:a,rowSpan:s,style:{borderRightWidth:"3px"},on:{mousemove:Fa(function(d){var p=this.elm;if(p!=null){var g=p.getBoundingClientRect(),v=g.left,m=g.width,y=g.top,h=g.height,$=d.clientX,w=d.clientY;vf||($>v+m-5&&$<v+m&&w>y&&w<y+h?(p.style.cursor="col-resize",yf=n,mf=x.findPath(n,e)):vf||(p.style.cursor="auto",yf=null,mf=null))}},100)}},t);return f}},Rre={type:"table",elemToHtml:function(e,t){var n=e.width;return'<table style="width: '+(n===void 0?"auto":n)+';"><tbody>'+t+"</tbody></table>"}},jre={type:"table-row",elemToHtml:function(e,t){return"<tr>"+t+"</tr>"}},Lre={type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,i=r===void 0?1:r,o=n.rowSpan,a=o===void 0?1:o,u=n.isHeader,s=u!==void 0&&u,l=n.width,c=s?"th":"td";return"<"+c+' colSpan="'+i+'" rowSpan="'+a+'" width="'+(l===void 0?"auto":l)+'">'+t+"</"+c+">"}},Mre={selector:"table",preParseHtml:function(e){var t=O(e);if($k(t)!=="table")return e;var n=t.find("tbody");if(n.length===0)return e;var r=t.find("tr");return t.append(r),n.remove(),t[0]}},zre=P0.filter;Do({target:"Array",proto:!0,forced:!Y3("filter")},{filter:function(e){return zre(this,e,arguments.length>1?arguments[1]:void 0)}});var Hre=Math.floor,Jm=xe("".charAt),Ure=xe("".replace),Zm=xe("".slice),Vre=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Wre=/\$([$&'`]|\d{1
`)},s.deleteBackward=function(l){if(!nx(s)){var c=s.selection;if(c){var f=E.before(s,c);if(f){var d=rx(s,f),p=rx(s,c);if(d&&!p)return}}n(l)}},s.handleTab=function(){var l;if(x.getSelectedNodeByType(s,"table")){var c=E.above(e);x.checkNodeType(c[0],"table-cell")&&P.select(e,c[1]);var f=E.next(e);if(f)f[0]&&f[0].text&&(f=(l=E.above(e,{at:f[1]}))!==null&&l!==void 0?l:f),P.select(e,f[1]);else{var d=s.children||[],p=d.length;if(x.checkNodeType(d[p-1],"table")){var g=x.genEmptyParagraph();P.insertNodes(s,g,{at:[p]}),s.handleTab()}}}else a()},s.deleteForward=function(l){nx(s)||r(l)},s.normalizeNode=function(l){var c=pr(l,2),f=c[0],d=c[1];if(x.getNodeType(f)!=="table")return i([f,d]);if(x.isLastNode(s,f)){var p=x.genEmptyParagraph();P.insertNodes(s,p,{at:[d[0]+1]})}},s.insertData=function(l){if(x.getSelectedNodeByType(s,"table")!=null){var c=l.getData("text/plain");c===`
`||/<img[^>]+>/.test(l.getData("text/html"))?o(l):E.insertText(s,c)}else o(l)},s.selectAll=function(){var l=s.selection;if(l!=null){var c=x.getSelectedNodeByType(s,"table-cell");if(c!=null){var f=l.anchor,d=l.focus;if(_.equals(f.path.slice(0,3),d.path.slice(0,3)))if(W.string(c).length!==0){var p=x.findPath(s,c),g={anchor:E.start(s,p),focus:E.end(s,p)};s.select(g)}else u();else u()}else u()}else u()},s}};gn("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",width:"Width",height:"Height"}}),gn("zh-CN",{videoModule:{delete:"\u5220\u9664\u89C6\u9891",uploadVideo:"\u4E0A\u4F20\u89C6\u9891",insertVideo:"\u63D2\u5165\u89C6\u9891",videoSrc:"\u89C6\u9891\u5730\u5740",videoSrcPlaceHolder:"\u89C6\u9891\u6587\u4EF6 url \u6216\u7B2C\u4E09\u65B9 <iframe>",videoPoster:"\u89C6\u9891\u5C01\u9762",videoPosterPlaceHolder:"\u5C01\u9762\u56FE\u7247 url",ok:"\u786E\u5B9A",editSize:"\u4FEE\u6539\u5C3A\u5BF8",width:"\u5BBD\u5EA6",height:"\u9AD8\u5EA6"}});/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var lg=function(){return lg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},lg.apply(this,arguments)};function I0(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(l){try{s(r.next(l))}catch(c){o(c)}}function u(l){try{s(r.throw(l))}catch(c){o(c)}}function s(l){var c;l.done?i(l.value):(c=l.value,c instanceof n?c:new n(function(f){f(c)})).then(a,u)}s((r=r.apply(e,t||[])).next())})}function R0(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(c[0]===6&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(f){c=[6,f],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,l])}}}function die(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ea(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function pie(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=die(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(i){t[i]=e[i]&&function(o){return new Promise(function(a,u){(function(s,l,c,f){Promise.resolve(f).then(function(d){s({value:d,done:c})},l)})(a,u,(o=e[i](o)).done,o.value)})}}}var $x=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J3(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ri,Gp,lp=function(e){return e&&e.Math==Math&&e},K=lp(typeof globalThis=="object"&&globalThis)||lp(typeof window=="object"&&window)||lp(typeof self=="object"&&self)||lp(typeof $x=="object"&&$x)||function(){return this}()||Function("return this")(),Je=function(e){try{return!!e()}catch{return!0}},Hr=!Je(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Kl=Function.prototype.call,Ke=Kl.bind?Kl.bind(Kl):function(){return Kl.apply(Kl,arguments)},wx={}.propertyIsEnumerable,Ex=Object.getOwnPropertyDescriptor,hie={f:Ex&&!wx.call({1:2},1)?function(e){var t=Ex(this,e);return!!t&&t.enumerable}:wx},j0=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},xk=Function.prototype,D4=xk.bind,S4=xk.call,gie=D4&&D4.bind(S4),pe=D4?function(e){return e&&gie(S4,e)}:function(e){return e&&function(){return S4.apply(e,arguments)}},vie=pe({}.toString),mie=pe("".slice),Ir=function(e){return mie(vie(e),8,-1)},ry=K.Object,yie=pe("".split),Z3=Je(function(){return!ry("z").propertyIsEnumerable(0)})?function(e){return Ir(e)=="String"?yie(e,""):ry(e)}:ry,bie=K.TypeError,fd=function(e){if(e==null)throw bie("Can't call method on "+e);return e},To=function(e){return Z3(fd(e))},Ve=function(e){return ty
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,Nx=pe("".replace),vg="["+F4+"]",foe=RegExp("^"+vg+vg+"*"),doe=RegExp(vg+vg+"*$"),oy=function(e){return function(t){var n=Mn(fd(t));return 1&e&&(n=Nx(n,foe,"")),2&e&&(n=Nx(n,doe,"")),n}},poe={start:oy(1),end:oy(2),trim:oy(3)},hoe=Ws.PROPER,goe=poe.trim;function Ix(e){return e.length?e[0].tagName.toLowerCase():""}function Pk(e,t,n){t===void 0&&(t="auto"),n===void 0&&(n="auto");var r=O(e);return r.attr("width",t),r.attr("height",n),r[0].outerHTML}dn({target:"String",proto:!0,forced:(Xl="trim",Je(function(){return!!F4[Xl]()||"\u200B\x85\u180E"[Xl]()!=="\u200B\x85\u180E"||hoe&&F4[Xl].name!==Xl}))},{trim:function(){return goe(this)}}),dn({global:!0},{globalThis:K}),zr&&(O.fn.append=zr),Mr&&(O.fn.on=Mr),vo&&(O.fn.focus=vo),jr&&(O.fn.attr=jr),Lr&&(O.fn.val=Lr),go&&(O.fn.html=go),hh&&(O.fn.parent=hh),ss&&(O.fn.hasClass=ss),hs&&(O.fn.empty=hs);var voe={type:"video",renderElem:function(e,t,n){var r,i=e,o=i.src,a=o===void 0?"":o,u=i.poster,s=u===void 0?"":u,l=i.width,c=l===void 0?"auto":l,f=i.height,d=f===void 0?"auto":f,p=x.isNodeSelected(n,e);if(a.trim().indexOf("<iframe ")===0){var g=Pk(a,c,d);r=de("div",{className:"w-e-textarea-video-container","data-selected":p?"true":"",innerHTML:g})}else{var v=de("video",{poster:s,controls:!0},de("source",{src:a,type:"video/mp4"}),`Sorry, your browser doesn't support embedded videos.
\u62B1\u6B49\uFF0C\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 video \u89C6\u9891`);c!=="auto"&&(v.data.width=c),d!=="auto"&&(v.data.height=d),r=de("div",{className:"w-e-textarea-video-container","data-selected":p?"true":""},v)}return gs("div",{props:{contentEditable:!1},on:{mousedown:function(m){return m.preventDefault()}}},r)}},cp,moe={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,i=r===void 0?"":r,o=n.poster,a=o===void 0?"":o,u=n.width,s=u===void 0?"auto":u,l=n.height,c=l===void 0?"auto":l,f=`<div data-w-e-type="video" data-w-e-is-void>
`;return i.trim().indexOf("<iframe ")===0?f+=Pk(i,s,c):f+='<video poster="'+a+'" controls="true" width="'+s+'" height="'+c+'"><source src="'+i+'" type="video/mp4"/></video>',f+=`
</div>`}},yoe=Object.keys||function(e){return kk(e,pg)},boe=Hr?Object.defineProperties:function(e,t){Rt(e);for(var n,r=To(t),i=yoe(t),o=i.length,a=0;o>a;)gi.f(e,n=i[a++],r[n]);return e},T4=Ma("document","documentElement"),Nk=oE("IE_PROTO"),ay=function(){},Ik=function(e){return"<script>"+e+"<\/script>"},Rx=function(e){e.write(Ik("")),e.close();var t=e.parentWindow.Object;return e=null,t},Kp=function(){try{cp=new ActiveXObject("htmlfile")}catch{}var e,t;Kp=typeof document<"u"?document.domain&&cp?Rx(cp):((t=Ef("iframe")).style.display="none",T4.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Ik("document.F=Object")),e.close(),e.F):Rx(cp);for(var n=pg.length;n--;)delete Kp.prototype[pg[n]];return Kp()};z0[Nk]=!0;var uE=Object.create||function(e,t){var n;return e!==null?(ay.prototype=Rt(e),n=new ay,ay.prototype=null,n[Nk]=e):n=Kp(),t===void 0?n:boe(n,t)},k4=yt("unscopables"),_4=Array.prototype;_4[k4]==null&&gi.f(_4,k4,{configurable:!0,value:uE(null)});var Rc=function(e){_4[k4][e]=!0},$oe=Tk.includes;dn({target:"Array",proto:!0},{includes:function(e){return $oe(this,e,arguments.length>1?arguments[1]:void 0)}}),Rc("includes");var woe={selector:"iframe,video,p",preParseHtml:function(e){var t=O(e),n=t;if(Ix(t)==="p"){var r=t.children();if(r.length===1){var i=r[0],o=i.tagName.toLowerCase();["iframe","video"].includes(o)&&(n=O(i))}}var a=Ix(n);if(a!=="iframe"&&a!=="video"||n.parent().attr("data-w-e-type")==="video")return n[0];var u=O('<div data-w-e-type="video" data-w-e-is-void></div>');return u.append(n),u[0]}},jx=pe(pe.bind),Df=function(e,t){return So(e),t===void 0?e:jx?jx(e,t):function(){return e.apply(t,arguments)}},mg=Array.isArray||function(e){return Ir(e)=="Array"},Rk=function(){},Eoe=[],jk=Ma("Reflect","construct"),sE=/^\s*(?:class|function)\b/,Coe=pe(sE.exec),Doe=!sE.exec(Rk),Jl=function(e){if(!Ve(e))return!1;try{return jk(Rk,Eoe,e),!0}catch{return!1}},lE=!jk||Je(function(){var e;return Jl(Jl.call)||!Jl(Object)||!Jl(function(){e=!0})||e})?function(e){if(!Ve(e))return!1;switch(U0(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Doe||!!Coe(sE,M0(e))}:Jl,Soe=yt("species"),Lx=K.Array,xoe=function(e,t){return new(function(n){var r;return mg(n)&&(r=n.constructor,(lE(r)&&(r===Lx||mg(r.prototype))||Ze(r)&&(r=r[Soe])===null)&&(r=void 0)),r===void 0?Lx:r}(e))(t===0?0:t)},Mx=pe([].push),ji=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,o=e==6,a=e==7,u=e==5||o;return function(s,l,c,f){for(var d,p,g=L0(s),v=Z3(g),m=Df(l,c),y=dd(v),h=0,$=f||xoe,w=t?$(s,y):n||a?$(s,0):void 0;y>h;h++)if((u||h in v)&&(p=m(d=v[h],h,g),e))if(t)w[h]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return h;case 2:Mx(w,d)}else switch(e){case 4:return!1;case 7:Mx(w,d)}return o?-1:r||i?i:w}},cE={forEach:ji(0),map:ji(1),filter:ji(2),some:ji(3),every:ji(4),find:ji(5),findIndex:ji(6),filterReject:ji(7)},Aoe=cE.find,zx=!0;"find"in[]&&Array(1).find(function(){zx=!1}),dn({target:"Array",proto:!0,forced:zx},{find:function(e){return Aoe(this,e,arguments.length>1?arguments[1]:void 0)}}),Rc("find");var Ooe=aE?{}.toString:function(){return"[object "+U0(this)+"]"};function Hx(e,t,n,r){return t===void 0&&(t=""),n===void 0&&(n="auto"),r===void 0&&(r="auto"),{type:"video",src:e,poster:t,width:n,height:r,children:[{text:""}]}}aE||Dn(Object.prototype,"toString",Ooe,{unsafe:!0});var Ux,uy,Boe={selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=O(e),i="",o="",a="auto",u="auto",s=r.find("iframe");if(s.length>0)return a=s.attr("width")||"auto",u=s.attr("height")||"auto",Hx(i=s[0].outerHTML,o,a,u);var l=r.find("video");return(i=l.attr("src")||"")||l.length>0&&(i=l.find("source").attr("src")||""),a=l.attr("width")||"auto",u=l.attr("height")||"auto",Hx(i,o=l.attr("poster")||"",a,u)}},Lk=function(){var e=Rt(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},fE=K.RegExp,P4=Je(function(){var e=fE("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Foe=P4||Je(function(){return!fE("a"
`)&&e.flags==="s")}),Poe=K.RegExp,Noe=Je(function(){var e=Poe("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Ioe=Fn.get,Roe=tE("native-string-replace",String.prototype.replace),yg=RegExp.prototype.exec,N4=yg,joe=pe("".charAt),Loe=pe("".indexOf),Moe=pe("".replace),sy=pe("".slice),ly=(uy=/b*/g,Ke(yg,Ux=/a/,"a"),Ke(yg,uy,"a"),Ux.lastIndex!==0||uy.lastIndex!==0),Vx=Toe.BROKEN_CARET,cy=/()??/.exec("")[1]!==void 0;(ly||cy||Vx||_oe||Noe)&&(N4=function(e){var t,n,r,i,o,a,u,s=this,l=Ioe(s),c=Mn(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=Ke(N4,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=Vx&&s.sticky,g=Ke(Lk,s),v=s.source,m=0,y=c;if(p&&(g=Moe(g,"y",""),Loe(g,"g")===-1&&(g+="g"),y=sy(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&joe(c,s.lastIndex-1)!==`
`)&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),cy&&(n=new RegExp("^"+v+"$(?!\\s)",g)),ly&&(r=s.lastIndex),i=Ke(yg,p?n:s,y),p?i?(i.input=sy(i.input,m),i[0]=sy(i[0],m),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:ly&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),cy&&i&&i.length>1&&Ke(Roe,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=uE(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var bg=N4;dn({target:"RegExp",proto:!0,forced:/./.exec!==bg},{exec:bg});var dE=Function.prototype,Wx=dE.apply,zoe=dE.bind,qx=dE.call,Mk=typeof Reflect=="object"&&Reflect.apply||(zoe?qx.bind(Wx):function(){return qx.apply(Wx,arguments)}),Hoe=yt("species"),fy=RegExp.prototype,Uoe=pe("".charAt),Gx=pe("".charCodeAt),Voe=pe("".slice),Kx=function(e){return function(t,n){var r,i,o=Mn(fd(t)),a=H0(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=Gx(o,a))<55296||r>56319||a+1===u||(i=Gx(o,a+1))<56320||i>57343?e?Uoe(o,a):r:e?Voe(o,a,a+2):i-56320+(r-55296<<10)+65536}},zk={codeAt:Kx(!1),charAt:Kx(!0)},Woe=zk.charAt,qoe=function(e,t,n){return t+(n?Woe(e,t).length:1)},Goe=Math.floor,dy=pe("".charAt),Koe=pe("".replace),py=pe("".slice),Yoe=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Xoe=/\$([$&'`]|\d{1,2})/g,Joe=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=Xoe;return i!==void 0&&(i=L0(i),s=Yoe),Koe(o,s,function(l,c){var f;switch(dy(c,0)){case"$":return"$";case"&":return e;case"`":return py(t,0,n);case"'":return py(t,a);case"<":f=i[py(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=Goe(d/10);return p===0?l:p<=u?r[p-1]===void 0?dy(c,1):r[p-1]+dy(c,1):l}f=r[d-1]}return f===void 0?"":f})},Zoe=K.TypeError,Qoe=function(e,t){var n=e.exec;if(Ve(n)){var r=Ke(n,e,t);return r!==null&&Rt(r),r}if(Ir(e)==="RegExp")return Ke(bg,e,t);throw Zoe("RegExp#exec called on incompatible receiver")},I4=yt("replace"),eae=Math.max,tae=Math.min,nae=pe([].concat),hy=pe([].push),Yx=pe("".indexOf),Xx=pe("".slice),rae="a".replace(/./,"$0")==="$0",Jx=!!/./[I4]&&/./[I4]("a","$0")==="";function Hk(e){return e===void 0&&(e="r"),e+"-"+U9()}(function(e,t,n,r){var i=yt(e),o=!Je(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!Je(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[Hoe]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=pe(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var g=pe(l),v=c.exec;return v===bg||v===fy.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:g(f,c,d)}:{done:!1}});Dn(String.prototype,e,s[0]),Dn(fy,i,s[1])}r&&li(fy[i],"sham",!0)})("replace",function(e,t,n){var r=Jx?"$":"$0";return[function(i,o){var a=fd(this),u=i==null?void 0:wf(i,I4);return u?Ke(u,i,a,o):Ke(t,Mn(a),i,o)},function(i,o){var a=Rt(this),u=Mn(i);if(typeof o=="string"&&Yx(o,r)===-1&&Yx(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=Ve(o);l||(o=Mn(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=Qoe(a,u);if(p===null||(hy(d,p),!c))break;Mn(p[0])===""&&(a.lastIndex=qoe(u,Fk(a.lastIndex),f))}for(var g,v="",m=0,y=0;y<d.length;y++){for(var h=Mn((p=d[y])[0]),$=eae(tae(H0(p.index),u.length),0),w=[],C=1;C<p.length;C++)hy(w,(g=p[C])===void 0?g:String(g));var D=p.groups;if(l){var A=nae([h],w,$,u);D!==void 0&&hy(A,D);var I=Mn(Mk(o,void 0,A))}else I=Joe(h,u,$,w,D,o);$>=m&&(v+=Xx(u,m,$)+I,m=$+h.length)}return v+Xx(u,m)}]},!!Je(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!rae||Jx);var $g=K.Promise,wg=function(e,t,n){for(var r in t)Dn(e,r,t[r],n);return e},iae=K.String,oae=K.TypeError,Ss=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=pe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,i){return Rt(r),function(o){if(typeof o=="object"||Ve(o))return o;throw oae("Can't set "+iae(o)+" as a prototype")}(i),t?e(r,i):r.__proto__=i,r}}():void 0),aae=gi.f,Zx=yt("toStringTag"),Eg=function(e,t,n){e&&!xt(e
`)&&e.flags==="s")}),Ise=G.RegExp,Rse=Qe(function(){var e=Ise("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),jse=Tn.get,Lse=DE("native-string-replace",String.prototype.replace),kg=RegExp.prototype.exec,Q4=kg,Mse=Ce("".charAt),zse=Ce("".indexOf),Hse=Ce("".replace),Ry=Ce("".slice),jy=(Iy=/b*/g,Le(kg,WA=/a/,"a"),Le(kg,Iy,"a"),WA.lastIndex!==0||Iy.lastIndex!==0),qA=F_.BROKEN_CARET,Ly=/()??/.exec("")[1]!==void 0;(jy||Ly||qA||Nse||Rse)&&(Q4=function(e){var t,n,r,i,o,a,u,s=this,l=jse(s),c=co(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=Le(Q4,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=qA&&s.sticky,g=Le(B_,s),v=s.source,m=0,y=c;if(p&&(g=Hse(g,"y",""),zse(g,"g")===-1&&(g+="g"),y=Ry(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Mse(c,s.lastIndex-1)!==`
`)&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),Ly&&(n=new RegExp("^"+v+"$(?!\\s)",g)),jy&&(r=s.lastIndex),i=Le(kg,p?n:s,y),p?i?(i.input=Ry(i.input,m),i[0]=Ry(i[0],m),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:jy&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),Ly&&i&&i.length>1&&Le(Lse,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=NE(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var _f=Q4;Pr({target:"RegExp",proto:!0,forced:/./.exec!==_f},{exec:_f});var IE=Function.prototype,GA=IE.apply,Use=IE.bind,KA=IE.call,__=typeof Reflect=="object"&&Reflect.apply||(Use?KA.bind(GA):function(){return KA.apply(GA,arguments)}),Vse=bt("species"),My=RegExp.prototype,Wse=bt("match"),qse=G.TypeError,Gse=bt("species"),P_=function(e,t){var n,r=jt(e).constructor;return r===void 0||(n=jt(r)[Gse])==null?t:function(i){if(_E(i))return i;throw qse(Sg(i)+" is not a constructor")}(n)},Kse=Ce("".charAt),YA=Ce("".charCodeAt),Yse=Ce("".slice),XA=function(e){return function(t,n){var r,i,o=co(Af(t)),a=FE(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=YA(o,a))<55296||r>56319||a+1===u||(i=YA(o,a+1))<56320||i>57343?e?Kse(o,a):r:e?Yse(o,a,a+2):i-56320+(r-55296<<10)+65536}},N_={codeAt:XA(!1),charAt:XA(!0)},Xse=N_.charAt,Jse=function(e,t,n){return t+(n?Xse(e,t).length:1)},Zse=G.Array,Qse=Math.max,e$=function(e,t,n){for(var r=gd(e),i=kf(t,r),o=kf(n===void 0?r:n,r),a=Zse(Qse(o-i,0)),u=0;i<o;i++,u++)A_(a,u,e[i]);return a.length=u,a},ele=G.TypeError,JA=function(e,t){var n=e.exec;if(We(n)){var r=Le(n,e,t);return r!==null&&jt(r),r}if(fr(e)==="RegExp")return Le(_f,e,t);throw ele("RegExp#exec called on incompatible receiver")},Ou=F_.UNSUPPORTED_Y,tle=Math.min,I_=[].push,nle=Ce(/./.exec),Bu=Ce(I_),ac=Ce("".slice);(function(e,t,n,r){var i=bt(e),o=!Qe(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!Qe(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[Vse]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=Ce(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var g=Ce(l),v=c.exec;return v===_f||v===My.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:g(f,c,d)}:{done:!1}});Sn(String.prototype,e,s[0]),Sn(My,i,s[1])}r&&Rr(My[i],"sham",!0)})("split",function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var a,u,s=co(Af(this)),l=o===void 0?4294967295:o>>>0;if(l===0)return[];if(i===void 0)return[s];if(!Xe(a=i)||!((u=a[Wse])!==void 0?u:fr(a)=="RegExp"))return Le(t,s,i,l);for(var c,f,d,p=[],g=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),v=0,m=new RegExp(i.source,g+"g");(c=Le(_f,m,s))&&!((f=m.lastIndex)>v&&(Bu(p,ac(s,v,c.index)),c.length>1&&c.index<s.length&&__(I_,p,e$(c,1)),d=c[0].length,v=f,p.length>=l));)m.lastIndex===c.index&&m.lastIndex++;return v===s.length?!d&&nle(m,"")||Bu(p,""):Bu(p,ac(s,v)),p.length>l?e$(p,0,l):p}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:Le(t,this,i,o)}:t,[function(i,o){var a=Af(this),u=i==null?void 0:Ff(i,e);return u?Le(u,i,a,o):Le(r,co(a),i,o)},function(i,o){var a=jt(this),u=co(i),s=n(r,a,u,o,r!==t);if(s.done)return s.value;var l=P_(a,RegExp),c=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Ou?"g":"y"),d=new l(Ou?"^(?:"+a.source+")":a,f),p=o===void 0?4294967295:o>>>0;if(p===0)return[];if(u.length===0)return JA(d,u)===null?[u]:[];for(var g=0,v=0,m=[];v<u.length;){d.lastIndex=Ou?0:v;var y,h=JA(d,Ou?ac(u,v):u);if(h===null||(y=tle(E_(d.lastIndex+(Ou?v:0)),u.length))===g)v=Jse(u,v,c);else{if(Bu(m,ac(u,g,v)),m.length===p)return m;for(var $=1;$<=h.length-1;$++)if(Bu(m,h[$]),m.length===p)return m;v=g=y}}return Bu(m,ac(u,g)),m}]},!!Qe(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),Ou);/*
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var _g=function(){return _g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_g.apply(this,arguments)};function RE(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(l){try{s(r.next(l))}catch(c){o(c)}}function u(l){try{s(r.throw(l))}catch(c){o(c)}}function s(l){var c;l.done?i(l.value):(c=l.value,c instanceof n?c:new n(function(f){f(c)})).then(a,u)}s((r=r.apply(e,t||[])).next())})}function jE(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(c[0]===6&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(f){c=[6,f],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,l])}}}function rle(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ile(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=rle(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(i){t[i]=e[i]&&function(o){return new Promise(function(a,u){(function(s,l,c,f){Promise.resolve(f).then(function(d){s({value:d,done:c})},l)})(a,u,(o=e[i](o)).done,o.value)})}}}var t$=bt("unscopables"),n$=Array.prototype;n$[t$]==null&&vi.f(n$,t$,{configurable:!0,value:NE(null)});var xa,ZA,QA,zy=function(e){n$[t$][e]=!0},As={},ole=!Qe(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),e7=BE("IE_PROTO"),r$=G.Object,ale=r$.prototype,Pg=ole?r$.getPrototypeOf:function(e){var t=SE(e);if(At(t,e7))return t[e7];var n=t.constructor;return We(n)&&t instanceof n?n.prototype:t instanceof r$?ale:null},i$=bt("iterator"),R_=!1;[].keys&&("next"in(QA=[].keys())?(ZA=Pg(Pg(QA)))!==Object.prototype&&(xa=ZA):R_=!0);var ule=xa==null||Qe(function(){var e={};return xa[i$].call(e)!==e});ule&&(xa={}),We(xa[i$])||Sn(xa,i$,function(){return this});var LE={IteratorPrototype:xa,BUGGY_SAFARI_ITERATORS:R_},sle=vi.f,t7=bt("toStringTag"),Ng=function(e,t,n){e&&!At(e=n?e:e.prototype,t7)&&sle(e,t7,{configurable:!0,value:t})},lle=LE.IteratorPrototype,cle=function(){return this},fle=G.String,dle=G.TypeError,Os=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Ce(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,i){return jt(r),function(o){if(typeof o=="object"||We(o))return o;throw dle("Can't set "+fle(o)+" as a prototype")}(i),t?e(r,i):r.__proto__=i,r}}():void 0),ple=hd.PROPER,hle=hd.CONFIGURABLE,n7=LE.IteratorPrototype,$p=LE.BUGGY_SAFARI_ITERATORS,uc=bt("iterator"),gle=function(){return this},j_=function(e,t,n,r,i,o,a){(function(y,h,$,w){var C=h+" Iterator";y.prototype=NE(lle,{next:V0(+!w,$)}),Ng(y,C,!1),As[C]=cle})(n,t,r);var u,s,l,c=function(y){if(y===i&&v)return v;if(!$p&&y in p)return p[y];switch(y){case"keys":case"values":case"entries":retur
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/e.exports&&(e.exports=t),Mg!==void 0&&(Mg.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&amp;/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var i={};i["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[r]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};o["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var a={};a[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(n,r){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:t.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(n){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var i=n.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\
`)&&e.flags==="s")}),_fe=Se.RegExp,Pfe=It(function(){var e=_fe("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Nfe=m$.get,Ife=YE("native-string-replace",String.prototype.replace),Vg=RegExp.prototype.exec,$$=Vg,Rfe=Me("".charAt),jfe=Me("".indexOf),Lfe=Me("".replace),d2=Me("".slice),p2=(f2=/b*/g,kt(Vg,o9=/a/,"a"),kt(Vg,f2,"a"),o9.lastIndex!==0||f2.lastIndex!==0),a9=_P.BROKEN_CARET,h2=/()??/.exec("")[1]!==void 0;(p2||h2||a9||kfe||Pfe)&&($$=function(e){var t,n,r,i,o,a,u,s=this,l=Nfe(s),c=ci(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=kt($$,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=a9&&s.sticky,g=kt(kP,s),v=s.source,m=0,y=c;if(p&&(g=Lfe(g,"y",""),jfe(g,"g")===-1&&(g+="g"),y=d2(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Rfe(c,s.lastIndex-1)!==`
`)&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),h2&&(n=new RegExp("^"+v+"$(?!\\s)",g)),p2&&(r=s.lastIndex),i=kt(Vg,p?n:s,y),p?i?(i.input=d2(i.input,m),i[0]=d2(i[0],m),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:p2&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),h2&&i&&i.length>1&&kt(Ife,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=Ffe(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var Rf=$$;X0({target:"RegExp",proto:!0,forced:/./.exec!==Rf},{exec:Rf});var c5=Function.prototype,u9=c5.apply,Mfe=c5.bind,s9=c5.call,zfe=typeof Reflect=="object"&&Reflect.apply||(Mfe?s9.bind(u9):function(){return s9.apply(u9,arguments)}),Hfe=_o("species"),g2=RegExp.prototype,Ufe=_o("match"),Vfe=Se.TypeError,Wfe=_o("species"),qfe=function(e,t){var n,r=hr(e).constructor;return r===void 0||(n=hr(r)[Wfe])==null?t:function(i){if(SP(i))return i;throw Vfe(vP(i)+" is not a constructor")}(n)},Gfe=Me("".charAt),l9=Me("".charCodeAt),Kfe=Me("".slice),c9=function(e){return function(t,n){var r,i,o=ci(Bs(t)),a=a5(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=l9(o,a))<55296||r>56319||a+1===u||(i=l9(o,a+1))<56320||i>57343?e?Gfe(o,a):r:e?Kfe(o,a,a+2):i-56320+(r-55296<<10)+65536}},Yfe={codeAt:c9(!1),charAt:c9(!0)}.charAt,Xfe=function(e,t,n){return t+(n?Yfe(e,t).length:1)},Jfe=Se.Array,Zfe=Math.max,f9=function(e,t,n){for(var r,i,o,a,u=u5(e),s=y$(t,u),l=y$(n===void 0?u:n,u),c=Jfe(Zfe(l-s,0)),f=0;s<l;s++,f++)r=c,i=f,o=e[s],a=void 0,(a=e5(i))in r?K0.f(r,a,t5(0,o)):r[a]=o;return c.length=f,c},Qfe=Se.TypeError,d9=function(e,t){var n=e.exec;if(en(n)){var r=kt(n,e,t);return r!==null&&hr(r),r}if(ho(e)==="RegExp")return kt(Rf,e,t);throw Qfe("RegExp#exec called on incompatible receiver")},_u=_P.UNSUPPORTED_Y,ede=Math.min,IP=[].push,tde=Me(/./.exec),Pu=Me(IP),gc=Me("".slice);(function(e,t,n,r){var i=_o(e),o=!It(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!It(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[Hfe]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=Me(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var g=Me(l),v=c.exec;return v===Rf||v===g2.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:g(f,c,d)}:{done:!1}});If(String.prototype,e,s[0]),If(g2,i,s[1])}r&&Fs(g2[i],"sham",!0)})("split",function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var a,u,s=ci(Bs(this)),l=o===void 0?4294967295:o>>>0;if(l===0)return[];if(i===void 0)return[s];if(!or(a=i)||!((u=a[Ufe])!==void 0?u:ho(a)=="RegExp"))return kt(t,s,i,l);for(var c,f,d,p=[],g=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),v=0,m=new RegExp(i.source,g+"g");(c=kt(Rf,m,s))&&!((f=m.lastIndex)>v&&(Pu(p,gc(s,v,c.index)),c.length>1&&c.index<s.length&&zfe(IP,p,f9(c,1)),d=c[0].length,v=f,p.length>=l));)m.lastIndex===c.index&&m.lastIndex++;return v===s.length?!d&&tde(m,"")||Pu(p,""):Pu(p,gc(s,v)),p.length>l?f9(p,0,l):p}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:kt(t,this,i,o)}:t,[function(i,o){var a=Bs(this),u=i==null?void 0:yP(i,e);return u?kt(u,i,a,o):kt(r,ci(a),i,o)},function(i,o){var a=hr(this),u=ci(i),s=n(r,a,u,o,r!==t);if(s.done)return s.value;var l=qfe(a,RegExp),c=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(_u?"g":"y"),d=new l(_u?"^(?:"+a.source+")":a,f),p=o===void 0?4294967295:o>>>0;if(p===0)return[];if(u.length===0)return d9(d,u)===null?[u]:[];for(var g=0,v=0,m=[];v<u.length;){d.lastIndex=_u?0:v;var y,h=d9(d,_u?gc(u,v):u);if(h===null||(y=ede(EP(d.lastIndex+(_u?v:0)),u.length))===g)v=Xfe(u,v,c);else{if(Pu(m,gc(u,g,v)),m.length===p)return m;for(var $=1;$<=h.length-1;$++)if(Pu(m,h[$]),m.length===p)return m;v=g=y}}return Pu(m,gc(u,g)),m}]},!!It(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".s
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ct=function(){return ct=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ct.apply(this,arguments)},Pt=function(){function e(){throw new Error(`\u4E0D\u80FD\u5B9E\u4F8B\u5316
Can not construct a instance`)}return e.setEditorConfig=function(t){t===void 0&&(t={}),this.editorConfig=ct(ct({},this.editorConfig),t)},e.setSimpleEditorConfig=function(t){t===void 0&&(t={}),this.simpleEditorConfig=ct(ct({},this.simpleEditorConfig),t)},e.setToolbarConfig=function(t){t===void 0&&(t={}),this.toolbarConfig=ct(ct({},this.toolbarConfig),t)},e.setSimpleToolbarConfig=function(t){t===void 0&&(t={}),this.simpleToolbarConfig=ct(ct({},this.simpleToolbarConfig),t)},e.registerPlugin=function(t){this.plugins.push(t)},e.registerMenu=function(t,n){BV(t,n)},e.registerRenderElem=function(t){tq(t)},e.registerRenderStyle=function(t){eq(t)},e.registerElemToHtml=function(t){MV(t)},e.registerStyleToHtml=function(t){LV(t)},e.registerPreParseHtml=function(t){lW(t)},e.registerParseElemHtml=function(t){fW(t)},e.registerParseStyleHtml=function(t){cW(t)},e.registerModule=function(t){Ja(t)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function Ja(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,i=e.elemsToHtml,o=e.styleToHtml,a=e.preParseHtml,u=e.parseElemsHtml,s=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach(function(c){return Pt.registerMenu(c)}),n&&n.forEach(function(c){return Pt.registerRenderElem(c)}),r&&Pt.registerRenderStyle(r),i&&i.forEach(function(c){return Pt.registerElemToHtml(c)}),o&&Pt.registerStyleToHtml(o),a&&a.forEach(function(c){return Pt.registerPreParseHtml(c)}),u&&u.forEach(function(c){return Pt.registerParseElemHtml(c)}),s&&Pt.registerParseStyleHtml(s),l&&Pt.registerPlugin(l)}DQ.forEach(function(e){return Ja(e)});Ja(Ite);Ja(fie);Ja(Sue);Ja(mce);Ja(ude);var cde='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',fde='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',LP='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',dde='<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',pde='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>';function hde(){return["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:q("editor.more"),iconSvg:dde,menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:q("editor.justify"),iconSvg:fde,menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:q("editor.indent"),iconSvg:cde,menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:q("editor.image"),iconSvg:LP,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:q("editor.video"),iconSvg:pde,menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","fullScreen"]}function gde(){return["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle",
Please use '@${e}' event instead of props`,t}var zP=(e,t)=>{for(const[n,r]of t)e[n]=r;return e};const Nde=g9({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(e,t){const n=v2(null),r=HP(null),i=v2(""),o=()=>{if(!n.value)return;const u=qP(e.defaultContent);xde({selector:n.value,mode:e.mode,content:u||[],html:e.defaultHtml||e.modelValue||"",config:Pde(_de({},e.defaultConfig),{onCreated(s){if(r.value=s,t.emit("onCreated",s),e.defaultConfig.onCreated){const l=Ui("onCreated");throw new Error(l)}},onChange(s){const l=s.getHtml();if(i.value=l,t.emit("update:modelValue",l),t.emit("onChange",s),e.defaultConfig.onChange){const c=Ui("onChange");throw new Error(c)}},onDestroyed(s){if(t.emit("onDestroyed",s),e.defaultConfig.onDestroyed){const l=Ui("onDestroyed");throw new Error(l)}},onMaxLength(s){if(t.emit("onMaxLength",s),e.defaultConfig.onMaxLength){const l=Ui("onMaxLength");throw new Error(l)}},onFocus(s){if(t.emit("onFocus",s),e.defaultConfig.onFocus){const l=Ui("onFocus");throw new Error(l)}},onBlur(s){if(t.emit("onBlur",s),e.defaultConfig.onBlur){const l=Ui("onBlur");throw new Error(l)}},customAlert(s,l){if(t.emit("customAlert",s,l),e.defaultConfig.customAlert){const c=Ui("customAlert");throw new Error(c)}},customPaste:(s,l)=>{if(e.defaultConfig.customPaste){const f=Ui("customPaste");throw new Error(f)}let c;return t.emit("customPaste",s,l,f=>{c=f}),c}})})};function a(u){const s=r.value;s!=null&&s.setHtml(u)}return UP(()=>{o()}),VP(()=>e.modelValue,u=>{u!==i.value&&a(u)}),{box:n}}}),Ide={ref:"box",style:{height:"100%"}};function Rde(e,t,n,r,i,o){return v9(),m9("div",Ide,null,512)}var Xde=zP(Nde,[["render",Rde]]);const jde=g9({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(e){const t=v2(null),n=r=>{if(!!t.value){if(r==null)throw new Error("Not found instance of Editor when create <Toolbar/> component");x.getToolbar(r)||Ade({editor:r,selector:t.value||"<div></div>",mode:e.mode,config:e.defaultConfig})}};return WP(()=>{const{editor:r}=e;r!=null&&n(r)}),{selector:t}}}),Lde={ref:"selector"};function Mde(e,t,n,r,i,o){return v9(),m9("div",Lde,null,512)}var Jde=zP(jde,[["render",Mde]]);export{Xde as E,Jde as T};