|
|
|
|
|
import{$t as e,At as t,C as n,D as r,Dt as i,Et as a,Ht as o,I as s,It as c,Jt as l,Lt as u,Mt as d,Nt as f,O as p,Ot as m,Q as h,Qt as g,Rt as _,S as v,T as y,Ut as b,V as x,Vt as S,W as C,Wt as w,Xt as T,Y as E,Yt as D,Z as O,Zt as ee,_ as k,_t as A,a as j,an as te,at as M,bt as ne,cn as re,ct as ie,f as ae,h as oe,ht as se,in as N,jt as ce,k as le,kt as ue,ln as de,m as fe,nn as pe,nt as me,on as he,ot as ge,q as P,qt as _e,rn as ve,s as ye,sn as be,st as F,un as xe,w as Se,x as Ce,xt as we}from"./vue.runtime.esm-bundler-CACvpnko.js";import{C as Te,a as Ee,f as De,h as I,m as L,p as Oe,s as R}from"./index-D5exsJys.js";import{t as ke}from"./_plugin-vue_export-helper-CXTkFu_Z.js";import{a as Ae,c as je,d as Me,i as Ne,l as Pe,n as Fe,r as Ie,s as Le,t as Re,u as ze}from"./competitions-Cv_Vb4Fy.js";import{t as Be}from"./adminCompetition-D_kJwSx5.js";import{f as Ve,i as He,m as Ue,n as We,o as Ge,r as Ke,s as qe}from"./competitionBranding-CAjogVRl.js";import{n as Je,r as Ye,t as Xe}from"./datetimeShanghai-F85iiY-2.js";import{n as Ze}from"./downloadFeedback-HV11t-9m.js";import{a as Qe}from"./signupOptionCodes-CvTkOKn_.js";import{n as $e}from"./publicSourceChannels-DXk_gQ-o.js";import{a as et,n as tt,o as nt,r as rt,s as it,t as at}from"./applications-AYtK0hKj.js";import{a as ot,n as st,t as ct}from"./schemaAdminColumns-D9uCX5IN.js";import{t as lt}from"./AudienceSessionsPane-CevhlB4D.js";import{t as eee}from"./AudienceRegistrationsPane-DhkJO1qV.js";import{i as ut,n as dt,r as ft,t as pt}from"./competitionAdmins-CEFNkWBF.js";async function mt(e,t){let{data:n}=await R.get(`/competitions/${e}/form-schemas`,{params:t?{purpose:t}:{}}),r=n;return{data:r.data??[],signupFieldRegistry:r.meta?.signup_field_registry}}async function ht(e,t){let{data:n}=await R.get(`/competitions/${e}/form-schemas/${t}`),r=n?.data??n;if(!r||typeof r!=`object`||!(`id`in r))throw Error(`表单详情无效`);return r}async function tee(e,t){let{data:n}=await R.post(`/competitions/${e}/form-schemas`,t);return n}async function gt(e,t,n){let{data:r}=await R.patch(`/competitions/${e}/form-schemas/${t}`,n);return r}async function nee(e,t){await R.delete(`/competitions/${e}/form-schemas/${t}`)}var _t=`commitment_accepted`,vt=`commitment_promise`,yt={scalar_field_keys:[`player_name`,`school`,`degree`,`contact_email`,`contact_mobile`,`company_name`,`project_name`,`track`,`location_country`,`location_province`,`location_city`,`oversea_country`,`event_location`,`team_members`,`intro`,`recommend`],file_field_keys:[...[`plan`,`supporting`]],commitment_field_key:_t,scalar_type_hints:{player_name:[`text`],school:[`text`],degree:[`select`],contact_email:[`email`,`text`],contact_mobile:[`tel`,`text`],company_name:[`text`],project_name:[`text`],track:[`select`],location_country:[`select`],location_province:[`select`,`text`],location_city:[`select`,`text`],oversea_country:[`text`],event_location:[`select`,`text`],team_members:[`text`,`textarea`],intro:[`textarea`,`text`],recommend:[`text`,`textarea`]},generic_scalar_types:[`text`,`textarea`,`email`,`tel`,`select`,`number`,`date`],all_supported_form_keys:[]};yt.all_supported_form_keys=[...yt.scalar_field_keys,...yt.file_field_keys,yt.commitment_field_key];var bt=yt;function xt(e){e&&Array.isArray(e.scalar_field_keys)&&(bt=e)}function St(e){let t=bt;return t.scalar_type_hints[e]??t.generic_scalar_types}function Ct(e,t){let n=e.trim(),r=t.trim();if(!n)return`存在未填写「字段 key」的项(须与 applications 表列名一致)`;let i=bt;if(n===i.commitment_field_key)return r===`checkbox`||r===`commitment_promise`?null:`参赛承诺书字段须为 checkbox 类型`;if(i.file_field_keys.includes(n))return r===`file`?null:`附件字段「${n}」须为 file 类型`;if(!i.scalar_field_keys.includes(n))return i.generic_scalar_types.includes(r)?null:`自定义字段「${n}」类型须为:${i.generic_scalar_types.join(` / `)}`;let a=St(n);return!r||!a.includes(r)?`字段「${n}」类型须为:${a.join(` / `)}`:null}function wt(e){let t=e?.data??e;if(!t||typeof t!=`object`||!(`id`in t))throw Error(`渠道响应格式无效
|
|
|
|
|
|
Details: ${a}`:``}`,s=SyntaxError(o);s.code=e,n&&(s.loc=n),t.onWarn(s)}function nn(e){throw e}function rn(e){}function an(e,t,n,r){let i=`https://vuejs.org/error-reference/#compiler-${e}`,a=SyntaxError(String(i));return a.code=e,a.loc=t,a}function on(e,t,n=!1,r=[],i=Object.create(null)){}function sn(e,t,n){return!1}function cn(e,t){if(e&&(e.type===`ObjectProperty`||e.type===`ArrayPattern`)){let e=t.length;for(;e--;){let n=t[e];if(n.type===`AssignmentExpression`)return!0;if(n.type!==`ObjectProperty`&&!n.type.endsWith(`Pattern`))break}}return!1}function ln(e){let t=e.length;for(;t--;){let n=e[t];if(n.type===`NewExpression`)return!0;if(n.type!==`MemberExpression`)break}return!1}function un(e,t){for(let n of e.params)for(let e of hn(n))t(e)}function dn(e,t){let n=e.type===`SwitchCase`?e.consequent:e.body;for(let e of n)if(e.type===`VariableDeclaration`){if(e.declare)continue;for(let n of e.declarations)for(let e of hn(n.id))t(e)}else if(e.type===`FunctionDeclaration`||e.type===`ClassDeclaration`){if(e.declare||!e.id)continue;t(e.id)}else fn(e)?pn(e,!0,t):e.type===`SwitchStatement`&&mn(e,!0,t)}function fn(e){return e.type===`ForOfStatement`||e.type===`ForInStatement`||e.type===`ForStatement`}function pn(e,t,n){let r=e.type===`ForStatement`?e.init:e.left;if(r&&r.type===`VariableDeclaration`&&(r.kind===`var`?t:!t))for(let e of r.declarations)for(let t of hn(e.id))n(t)}function mn(e,t,n){for(let r of e.cases){for(let e of r.consequent)if(e.type===`VariableDeclaration`&&(e.kind===`var`?t:!t))for(let t of e.declarations)for(let e of hn(t.id))n(e);dn(r,n)}}function hn(e,t=[]){switch(e.type){case`Identifier`:t.push(e);break;case`MemberExpression`:let n=e;for(;n.type===`MemberExpression`;)n=n.object;t.push(n);break;case`ObjectPattern`:for(let n of e.properties)n.type===`RestElement`?hn(n.argument,t):hn(n.value,t);break;case`ArrayPattern`:e.elements.forEach(e=>{e&&hn(e,t)});break;case`RestElement`:hn(e.argument,t);break;case`AssignmentPattern`:hn(e.left,t);break}return t}function gn(e){return ta.includes(e.type)?gn(e.expression):e}function _n(e){switch(e){case`Teleport`:case`teleport`:return ei;case`Suspense`:case`suspense`:return ti;case`KeepAlive`:case`keep-alive`:return ni;case`BaseTransition`:case`base-transition`:return ri}}function vn(e,t,n=t.length){return yn({offset:e.offset,line:e.line,column:e.column},t,n)}function yn(e,t,n=t.length){let r=0,i=-1;for(let e=0;e<n;e++)t.charCodeAt(e)===10&&(r++,i=e);return e.offset+=n,e.line+=r,e.column=i===-1?e.column+n:n-i,e}function bn(e,t){if(!e)throw Error(t||`unexpected compiler condition`)}function xn(e,t,n=!1){for(let r=0;r<e.props.length;r++){let i=e.props[r];if(i.type===7&&(n||i.exp)&&(D(t)?i.name===t:t.test(i.name)))return i}}function Sn(e,t,n=!1,r=!1){for(let i=0;i<e.props.length;i++){let a=e.props[i];if(a.type===6){if(n)continue;if(a.name===t&&(a.value||r))return a}else if(a.name===`bind`&&(a.exp||r)&&Cn(a.arg,t))return a}}function Cn(e,t){return!!(e&&na(e)&&e.content===t)}function wn(e){return e.props.some(e=>e.type===7&&e.name===`bind`&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function Tn(e){return e.type===5||e.type===2}function En(e){return e.type===7&&e.name===`pre`}function Dn(e){return e.type===7&&e.name===`slot`}function On(e){return e.type===1&&e.tagType===3}function kn(e){return e.type===1&&e.tagType===2}function An(e,t=[]){if(e&&!D(e)&&e.type===14){let n=e.callee;if(!D(n)&&ga.has(n))return An(e.arguments[0],t.concat(e))}return[e,t]}function jn(e,t,n){let r,i=e.type===13?e.props:e.arguments[2],a=[],o;if(i&&!D(i)&&i.type===14){let e=An(i);i=e[0],a=e[1],o=a[a.length-1]}if(i==null||D(i))r=At([t]);else if(i.type===14){let e=i.arguments[0];!D(e)&&e.type===15?Mn(t,e)||e.properties.unshift(t):i.callee===Ei?r=Ft(n.helper(xi),[At([t]),i]):i.arguments.unshift(At([t])),!r&&(r=i)}else i.type===15?(Mn(t,i)||i.properties.unshift(t),r=i):(r=Ft(n.helper(xi),[At([t]),i]),o&&o.callee===Ti&&(o=a[a.length-2]));e.type===13?o?o.arguments[0]=r:e.props=r:o?o.arguments[0]=r:e.arguments[2]=r}function Mn(e,t){let n=!1;if(e.key.type===4){let r=e.key.content;n=t.properties.some(e=>e.key.type===
|
|
|
|
|
|
`);else if(In(i.content)){let a=e[r-1]&&e[r-1].type,o=e[r+1]&&e[r+1].type;!a||!o||t&&(a===3&&(o===3||o===1)||a===1&&(o===3||o===1&&Xn(i.content)))?(n=!0,e[r]=null):i.content=` `}else t&&(i.content=Zn(i.content))}return n?e.filter(Boolean):e}function Xn(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n===10||n===13)return!0}return!1}function Zn(e){let t=``,n=!1;for(let r=0;r<e.length;r++)Yt(e.charCodeAt(r))?n||=(t+=` `,!0):(t+=e[r],n=!1);return t}function Qn(e){(Aa[0]||ba).children.push(e)}function $n(e,t){return{start:ja.getPos(e),end:t==null?t:ja.getPos(t),source:t==null?t:Bn(e,t)}}function er(e){return $n(e.start.offset,e.end.offset)}function tr(e,t){e.end=ja.getPos(t),e.source=Bn(e.start.offset,t)}function nr(e){let t={type:6,name:e.rawName,nameLoc:$n(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){let n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function rr(e,t=!1,n,r=0,i=0){return Mt(e,t,n,r)}function ir(e,t,n){ya.onError(an(e,$n(t,t),void 0,n))}function ar(){ja.reset(),Sa=null,Ca=null,wa=``,Ta=-1,Ea=-1,Aa.length=0}function or(e,t){if(ar(),xa=e,ya=d({},va),t){let e;for(e in t)t[e]!=null&&(ya[e]=t[e])}ja.mode=ya.parseMode===`html`?1:ya.parseMode===`sfc`?2:0,ja.inXML=ya.ns===1||ya.ns===2;let n=t&&t.delimiters;n&&(ja.delimiterOpen=Zt(n[0]),ja.delimiterClose=Zt(n[1]));let r=ba=Dt([],e);return ja.parse(xa),r.loc=$n(0,e.length),r.children=Yn(r.children),ba=null,r}function sr(e,t){lr(e,void 0,t,!!cr(e))}function cr(e){let t=e.children.filter(e=>e.type!==3);return t.length===1&&t[0].type===1&&!kn(t[0])?t[0]:null}function lr(e,t,n,r=!1,i=!1){let{children:a}=e,o=[];for(let t=0;t<a.length;t++){let s=a[t];if(s.type===1&&s.tagType===0){let e=r?0:ur(s,n);if(e>0){if(e>=2){s.codegenNode.patchFlag=-1,o.push(s);continue}}else{let e=s.codegenNode;if(e.type===13){let t=e.patchFlag;if((t===void 0||t===512||t===1)&&fr(s,n)>=2){let t=pr(s);t&&(e.props=n.hoist(t))}e.dynamicProps&&=n.hoist(e.dynamicProps)}}}else if(s.type===12&&(r?0:ur(s,n))>=2){s.codegenNode.type===14&&s.codegenNode.arguments.length>0&&s.codegenNode.arguments.push(`-1`),o.push(s);continue}if(s.type===1){let t=s.tagType===1;t&&n.scopes.vSlot++,lr(s,e,n,!1,i),t&&n.scopes.vSlot--}else if(s.type===11)lr(s,e,n,s.children.length===1,!0);else if(s.type===9)for(let t=0;t<s.branches.length;t++)lr(s.branches[t],e,n,s.branches[t].children.length===1,i)}let s=!1;if(o.length===a.length&&e.type===1){if(e.tagType===0&&e.codegenNode&&e.codegenNode.type===13&&u(e.codegenNode.children))e.codegenNode.children=c(kt(e.codegenNode.children)),s=!0;else if(e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!u(e.codegenNode.children)&&e.codegenNode.children.type===15){let t=l(e.codegenNode,`default`);t&&(t.returns=c(kt(t.returns)),s=!0)}else if(e.tagType===3&&t&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!u(t.codegenNode.children)&&t.codegenNode.children.type===15){let n=xn(e,`slot`,!0),r=n&&n.arg&&l(t.codegenNode,n.arg);r&&(r.returns=c(kt(r.returns)),s=!0)}}if(!s)for(let e of o)e.codegenNode=n.cache(e.codegenNode);function c(e){let t=n.cache(e);return t.needArraySpread=!0,t}function l(e,t){if(e.children&&!u(e.children)&&e.children.type===15){let n=e.children.properties.find(e=>e.key===t||e.key.content===t);return n&&n.value}}o.length&&n.transformHoist&&n.transformHoist(a,n,e)}function ur(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;let r=n.get(e);if(r!==void 0)return r;let i=e.codegenNode;if(i.type!==13||i.isBlock&&e.tag!==`svg`&&e.tag!==`foreignObject`&&e.tag!==`math`)return 0;if(i.patchFlag===void 0){let r=3,a=fr(e,t);if(a===0)return n.set(e,0),0;a<r&&(r=a);for(let i=0;i<e.children.length;i++){let a=ur(e.children[i],t);if(a===0)return n.set(e,0),0;a<r&&(r=a)}if(r>1)for(let i=0;i<e.props.length;i++){let a=e.props[i];if(a.type===7&&a.name===`bind`&&a.exp){let i=ur(a.exp,t);if(i===0)return n.set(e,0),0;i<r&&(r=i)}}if(i.isBlock
|
|
|
|
|
|
`+` `.repeat(e),0)}return p}function xr(e,t={}){let n=br(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:r,push:i,prefixIdentifiers:a,indent:o,deindent:s,newline:c,scopeId:l,ssr:u}=n,d=Array.from(e.helpers),f=d.length>0,p=!a&&r!==`module`;if(Sr(e,n),i(`function ${u?`ssrRender`:`render`}(${(u?[`_ctx`,`_push`,`_parent`,`_attrs`]:[`_ctx`,`_cache`]).join(`, `)}) {`),o(),p&&(i(`with (_ctx) {`),o(),f&&(i(`const { ${d.map(Ra).join(`, `)} } = _Vue
|
|
|
|
|
|
`,-1),c())),e.components.length&&(Cr(e.components,`component`,n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Cr(e.directives,`directive`,n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Cr(e.filters,`filter`,n),c()),e.temps>0){i(`let `);for(let t=0;t<e.temps;t++)i(`${t>0?`, `:``}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(`
|
|
|
|
|
|
`,0),c()),u||i(`return `),e.codegenNode?Er(e.codegenNode,n):i(`null`),p&&(s(),i(`}`)),s(),i(`}`),{ast:e,code:n.code,preamble:``,map:n.map?n.map.toJSON():void 0}}function Sr(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:a,runtimeModuleName:o,runtimeGlobalName:s,ssrRuntimeModuleName:c}=t,l=s,u=Array.from(e.helpers);u.length>0&&(i(`const _Vue = ${l}
|
|
|
|
|
|
`,-1),e.hoists.length&&i(`const { ${[si,ci,li,ui,di].filter(e=>u.includes(e)).map(Ra).join(`, `)} } = _Vue
|
|
|
|
|
|
`,-1)),oee(e.hoists,t),a(),i(`return `)}function Cr(e,t,{helper:n,push:r,newline:i,isTS:a}){let o=n(t===`filter`?hi:t===`component`?fi:mi);for(let n=0;n<e.length;n++){let s=e[n],c=s.endsWith(`__self`);c&&(s=s.slice(0,-6)),r(`const ${Nn(s,t)} = ${o}(${JSON.stringify(s)}${c?`, true`:``})${a?`!`:``}`),n<e.length-1&&i()}}function oee(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:r}=t;r();for(let i=0;i<e.length;i++){let a=e[i];a&&(n(`const _hoisted_${i+1} = `),Er(a,t),r())}t.pure=!1}function wr(e,t){let n=e.length>3||!1;t.push(`[`),n&&t.indent(),Tr(e,t,n),n&&t.deindent(),t.push(`]`)}function Tr(e,t,n=!1,r=!0){let{push:i,newline:a}=t;for(let o=0;o<e.length;o++){let s=e[o];D(s)?i(s,-3):u(s)?wr(s,t):Er(s,t),o<e.length-1&&(n?(r&&i(`,`),a()):r&&i(`, `))}}function Er(e,t){if(D(e)){t.push(e,-3);return}if(T(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:Er(e.codegenNode,t);break;case 2:see(e,t);break;case 4:Dr(e,t);break;case 5:cee(e,t);break;case 12:Er(e.codegenNode,t);break;case 8:Or(e,t);break;case 3:uee(e,t);break;case 13:dee(e,t);break;case 14:pee(e,t);break;case 15:mee(e,t);break;case 17:hee(e,t);break;case 18:gee(e,t);break;case 19:_ee(e,t);break;case 20:kr(e,t);break;case 21:Tr(e.body,t,!0,!1);break;case 22:break;case 23:break;case 24:break;case 25:break;case 26:break;case 10:break;default:}}function see(e,t){t.push(JSON.stringify(e.content),-3,e)}function Dr(e,t){let{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,-3,e)}function cee(e,t){let{push:n,helper:r,pure:i}=t;i&&n(La),n(`${r(bi)}(`),Er(e.content,t),n(`)`)}function Or(e,t){for(let n=0;n<e.children.length;n++){let r=e.children[n];D(r)?t.push(r,-3):Er(r,t)}}function lee(e,t){let{push:n}=t;e.type===8?(n(`[`),Or(e,t),n(`]`)):e.isStatic?n(ia(e.content)?e.content:JSON.stringify(e.content),-2,e):n(`[${e.content}]`,-3,e)}function uee(e,t){let{push:n,helper:r,pure:i}=t;i&&n(La),n(`${r(li)}(${JSON.stringify(e.content)})`,-3,e)}function dee(e,t){let{push:n,helper:r,pure:i}=t,{tag:a,props:o,children:s,patchFlag:c,dynamicProps:l,directives:u,isBlock:d,disableTracking:f,isComponent:p}=e,m;c&&(m=String(c)),u&&n(r(gi)+`(`),d&&n(`(${r(ii)}(${f?`true`:``}), `),i&&n(La),n(r(d?Kt(t.inSSR,p):Gt(t.inSSR,p))+`(`,-2,e),Tr(fee([a,o,s,m,l]),t),n(`)`),d&&n(`)`),u&&(n(`, `),Er(u,t),n(`)`))}function fee(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(e=>e||`null`)}function pee(e,t){let{push:n,helper:r,pure:i}=t,a=D(e.callee)?e.callee:r(e.callee);i&&n(La),n(a+`(`,-2,e),Tr(e.arguments,t),n(`)`)}function mee(e,t){let{push:n,indent:r,deindent:i,newline:a}=t,{properties:o}=e;if(!o.length){n(`{}`,-2,e);return}let s=o.length>1||!1;n(s?`{`:`{ `),s&&r();for(let e=0;e<o.length;e++){let{key:r,value:i}=o[e];lee(r,t),n(`: `),Er(i,t),e<o.length-1&&(n(`,`),a())}s&&i(),n(s?`}`:` }`)}function hee(e,t){wr(e.elements,t)}function gee(e,t){let{push:n,indent:r,deindent:i}=t,{params:a,returns:o,body:s,newline:c,isSlot:l}=e;l&&n(`_${Ri[Ni]}(`),n(`(`,-2,e),u(a)?Tr(a,t):a&&Er(a,t),n(`) => `),(c||s)&&(n(`{`),r()),o?(c&&n(`return `),u(o)?wr(o,t):Er(o,t)):s&&Er(s,t),(c||s)&&(i(),n(`}`)),l&&(e.isNonScopedSlot&&n(`, undefined, true`),n(`)`))}function _ee(e,t){let{test:n,consequent:r,alternate:i,newline:a}=e,{push:o,indent:s,deindent:c,newline:l}=t;if(n.type===4){let e=!ia(n.content);e&&o(`(`),Dr(n,t),e&&o(`)`)}else o(`(`),Er(n,t),o(`)`);a&&s(),t.indentLevel++,a||o(` `),o(`? `),Er(r,t),t.indentLevel--,a&&l(),a||o(` `),o(`: `);let u=i.type===19;u||t.indentLevel++,Er(i,t),u||t.indentLevel--,a&&c(!0)}function kr(e,t){let{push:n,helper:r,indent:i,deindent:a,newline:o}=t,{needPauseTracking:s,needArraySpread:c}=e;c&&n(`[...(`),n(`_cache[${e.index}] || (`),s&&(i(),n(`${r(Ai)}(-1`),e.inVOnce&&n(`, true`),n(`),`),o(),n(`(`)),n(`_cache[${e.index}] = `),Er(e.value,t),s&&(n(`).cacheIndex = ${e.index},`),o(),n(`${r(Ai)}(1),`),o(),n(`_cache[${e.index}]`),a()),n(`)`),c&&n(`)]`)}function Ar(e,t,n=!1,r=!1,i=Object.create(t.identifiers)){return e}function jr(e){return D(e)?e:e.type===4?e.content:e.children.map(jr).join(``)}function Mr(e,t,n,r){if(t.name!==`else`&&(!t.exp||!t.exp.content.trim(
|
|
|
|
|
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:`v-model cannot be used on a const binding because it is not writable.`,46:`Error parsing JavaScript expression: `,47:`<KeepAlive> expects exactly one child component.`,52:`@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,48:`"prefixIdentifiers" option is not supported in this build of compiler.`,49:`ES module mode is not supported in this build of compiler.`,50:`"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,51:`"scopeId" option is only supported in module mode.`,54:``},Qi=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),$i=e=>e&&(e.type===`ObjectProperty`||e.type===`ObjectMethod`)&&!e.computed,ea=(e,t)=>$i(t)&&t.key===e,ta=[`TSAsExpression`,`TSTypeAssertion`,`TSNonNullExpression`,`TSInstantiationExpression`,`TSSatisfiesExpression`],na=e=>e.type===4&&e.isStatic,ra=/^$|^\d|[^\$\w\xA0-\uFFFF]/,ia=e=>!ra.test(e),aa=/[A-Za-z_$\xA0-\uFFFF]/,oa=/[\.\?\w$\xA0-\uFFFF]/,sa=/\s+[.[]\s*|\s*[.[]\s+/g,ca=e=>e.type===4?e.content:e.loc.source,la=e=>{let t=ca(e).trim().replace(sa,e=>e.trim()),n=0,r=[],i=0,a=0,o=null;for(let e=0;e<t.length;e++){let s=t.charAt(e);switch(n){case 0:if(s===`[`)r.push(n),n=1,i++;else if(s===`(`)r.push(n),n=2,a++;else if(!(e===0?aa:oa).test(s))return!1;break;case 1:s===`'`||s===`"`||s==="`"?(r.push(n),n=3,o=s):s===`[`?i++:s===`]`&&(--i||(n=r.pop()));break;case 2:if(s===`'`||s===`"`||s==="`")r.push(n),n=3,o=s;else if(s===`(`)a++;else if(s===`)`){if(e===t.length-1)return!1;--a||(n=r.pop())}break;case 3:s===o&&(n=r.pop(),o=null);break}}return!i&&!a},ua=ue,da=la,fa=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,pa=e=>fa.test(ca(e)),ma=ue,ha=pa,ga=new Set([wi,Ti]),_a=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,va={parseMode:`base`,ns:0,delimiters:[`{{`,`}}`],getNamespace:()=>0,isVoidTag:m,isPreTag:m,isIgnoreNewlineTag:m,isCustomElement:m,onError:nn,onWarn:rn,comments:!1,prefixIdentifiers:!1},ya=va,ba=null,xa=``,Sa=null,Ca=null,wa=``,Ta=-1,Ea=-1,Da=0,Oa=!1,ka=null,Aa=[],ja=new qi(Aa,{onerr:ir,ontext(e,t){Hn(Bn(e,t),e,t)},ontextentity(e,t,n){Hn(e,t,n)},oninterpolation(e,t){if(Oa)return Hn(Bn(e,t),e,t);let n=e+ja.delimiterOpen.length,r=t-ja.delimiterClose.length;for(;Yt(xa.charCodeAt(n));)n++;for(;Yt(xa.charCodeAt(r-1));)r--;let i=Bn(n,r);i.includes(`&`)&&(i=ya.decodeEntities(i,!1)),Qn({type:5,content:rr(i,!1,$n(n,r)),loc:$n(e,t)})},onopentagname(e,t){let n=Bn(e,t);Sa={type:1,tag:n,ns:ya.getNamespace(n,Aa[0],ya.ns),tagType:0,props:[],children:[],loc:$n(e-1,t),codegenNode:void 0}},onopentagend(e){Vn(e)},onclosetag(e,t){let n=Bn(e,t);if(!ya.isVoidTag(n)){let r=!1;for(let e=0;e<Aa.length;e++)if(Aa[e].tag.toLowerCase()===n.toLowerCase()){r=!0,e>0&&ir(24,Aa[0].loc.start.offset);for(let n=0;n<=e;n++)Un(Aa.shift(),t,n<e);break}r||ir(23,Gn(e,60))}},onselfclosingtag(e){let t=Sa.tag;Sa.isSelfClosing=!0,Vn(e),Aa[0]&&Aa[0].tag===t&&Un(Aa.shift(),e)},onattribname(e,t){Ca={type:6,name:Bn(e,t),nameLoc:$n(e,t),value:void 0,loc:$n(e)}},ondirname(e,t){let n=Bn(e,t),r=n===`.`||n===`:`?`bind`:n===`@`?`on`:n===`#`?`slot`:n.slice(2);if(!Oa&&r===``&&ir(26,e),Oa||r===``)Ca={type:6,name:n,nameLoc:$n(e,t),value:void 0,loc:$n(e)};else if(Ca={type:7,name:r,rawName:n,exp:void 0,arg:void 0,modifiers:n===`.`?[Mt(`prop`)]:[],loc:$n(e)},r===`pre`){Oa=ja.inVPre=!0,ka=Sa;let e=Sa.props;for(let t=0;t<e.length;t++)e[t].type===7&&(e[t]=nr(e[t]))}},ondirarg(e,t){if(e===t)return;let n=Bn(e,t);if(Oa&&!En(Ca))Ca.name+=n,tr(Ca.nameLoc,t);else{let r=n[0]!==`[`;Ca.arg=rr(r?n:n.slice(1,-1),r,$n(e,t),r?3:0)}},ondirmodifier(e,t){let n=Bn(e,t);if(Oa&&!En(Ca))Ca.name+=`.`+n,tr(Ca.nameLoc,t);else if(Ca.name===`slot`){let e=Ca.arg;e&&(e.content+=`.`+n,tr(e.loc,t))}else{let r=Mt(n,!0,$n(e,t));Ca.modifiers.push(r)}},onattribdata(e,t){wa+=Bn(e,t),Ta<0&&(Ta=e),Ea=t},onattribentity(e,t,n){wa+=e,Ta<0&&(Ta=t),Ea=n},onattribnameend(e){let
|
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ss(e){if(typeof window<`u`&&window.navigator)return!!navigator.userAgent.match(e)}function cs(e,t,n){e.addEventListener(t,n,!Ws&&Xs)}function ls(e,t,n){e.removeEventListener(t,n,!Ws&&Xs)}function us(e,t){if(t){if(t[0]===`>`&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Tee(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ds(e,t,n,r){if(e){n||=document;do{if(t!=null&&(t[0]===`>`?e.parentNode===n&&us(e,t):us(e,t))||r&&e===n)return e;if(e===n)break}while(e=Tee(e))}return null}function fs(e,t,n){e&&t&&(e.classList?e.classList[n?`add`:`remove`](t):e.className=((` `+e.className+` `).replace(Zs,` `).replace(` `+t+` `,` `)+(n?` `+t:``)).replace(Zs,` `))}function ps(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,``):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf(`webkit`)===-1&&(t=`-webkit-`+t),r[t]=n+(typeof n==`string`?``:`px`)}}function ms(e,t){var n=``;if(typeof e==`string`)n=e;else do{var r=ps(e,`transform`);r&&r!==`none`&&(n=r+` `+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function hs(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i<a;i++)n(r[i],i);return r}return[]}function gs(){return document.scrollingElement||document.documentElement}function _s(e,t,n,r,i){if(!(!e.getBoundingClientRect&&e!==window)){var a,o,s,c,l,u,d;if(e!==window&&e.parentNode&&e!==gs()?(a=e.getBoundingClientRect(),o=a.top,s=a.left,c=a.bottom,l=a.right,u=a.height,d=a.width):(o=0,s=0,c=window.innerHeight,l=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(i||=e.parentNode,!Ws))do if(i&&i.getBoundingClientRect&&(ps(i,`transform`)!==`none`||n&&ps(i,`position`)!==`static`)){var f=i.getBoundingClientRect();o-=f.top+parseInt(ps(i,`border-top-width`)),s-=f.left+parseInt(ps(i,`border-left-width`)),c=o+a.height,l=s+a.width;break}while(i=i.parentNode);if(r&&e!==window){var p=ms(i||e),m=p&&p.a,h=p&&p.d;p&&(o/=h,s/=m,d/=m,u/=h,c=o+u,l=s+d)}return{top:o,left:s,bottom:c,right:l,width:d,height:u}}}function vs(e,t,n){for(var r=Cs(e,!0),i=_s(e)[t];r;){var a=_s(r)[n],o=void 0;if(o=n===`top`||n===`left`?i>=a:i<=a,!o)return r;if(r===gs())break;r=Cs(r,!1)}return!1}function ys(e,t,n,r){for(var i=0,a=0,o=e.children;a<o.length;){if(o[a].style.display!==`none`&&o[a]!==Ms.ghost&&(r||o[a]!==Ms.dragged)&&ds(o[a],n.draggable,e,!1)){if(i===t)return o[a];i++}a++}return null}function bs(e,t){for(var n=e.lastElementChild;n&&(n===Ms.ghost||ps(n,`display`)===`none`||t&&!us(n,t));)n=n.previousElementSibling;return n||null}function xs(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!==`TEMPLATE`&&e!==Ms.clone&&(!t||us(e,t))&&n++;return n}function Ss(e){var t=0,n=0,r=gs();if(e)do{var i=ms(e),a=i.a,o=i.d;t+=e.scrollLeft*a,n+=e.scrollTop*o}while(e!==r&&(e=e.parentNode));return[t,n]}function Eee(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function Cs(e,t){if(!e||!e.getBoundingClientRect)return gs();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=ps(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX==`auto`||i.overflowX==`scroll`)||n.clientHeight<n.scrollHeight&&(i.overflowY==`auto`||i.overflowY==`scroll`)){if(!n.getBoundingClientRect||n===document.body)return gs();if(r||t)return n;r=!0}}while(n=n.parentNode);return gs()}function Dee(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function ws(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.rou
|
|
|
|
|
|
`)&&(m=`(?: `+m+`)`,g=` `+g,h++),i=RegExp(`^(?:`+m+`)`,p)),u&&(i=RegExp(`^`+m+`$(?!\\s)`,p)),c&&(n=t.lastIndex),s=a.call(f?i:t,g),f?s?(s.input=s.input.slice(h),s[0]=s[0].slice(h),s.index=t.lastIndex,t.lastIndex+=s[0].length):t.lastIndex=0:c&&s&&(t.lastIndex=t.global?s.index+s[0].length:n),u&&s&&s.length>1&&o.call(s[0],i,function(){for(d=1;d<arguments.length-2;d++)arguments[d]===void 0&&(s[d]=void 0)}),s}),e.exports=s}),"94ca":(function(e,t,n){var r=n(`d039`),i=/#|\.prototype\./,a=function(e,t){var n=s[o(e)];return n==l?!0:n==c?!1:typeof t==`function`?r(t):!!t},o=a.normalize=function(e){return String(e).replace(i,`.`).toLowerCase()},s=a.data={},c=a.NATIVE=`N`,l=a.POLYFILL=`P`;e.exports=a}),"99af":(function(e,t,n){var r=n(`23e7`),i=n(`d039`),a=n(`e8b5`),o=n(`861d`),s=n(`7b0b`),c=n(`50c4`),l=n(`8418`),u=n(`65f0`),d=n(`1dde`),f=n(`b622`),p=n(`2d00`),m=f(`isConcatSpreadable`),h=9007199254740991,g=`Maximum allowed index exceeded`,_=p>=51||!i(function(){var e=[];return e[m]=!1,e.concat()[0]!==e}),v=d(`concat`),y=function(e){if(!o(e))return!1;var t=e[m];return t===void 0?a(e):!!t};r({target:`Array`,proto:!0,forced:!_||!v},{concat:function(e){var t=s(this),n=u(t,0),r=0,i,a,o,d,f;for(i=-1,o=arguments.length;i<o;i++)if(f=i===-1?t:arguments[i],y(f)){if(d=c(f.length),r+d>h)throw TypeError(g);for(a=0;a<d;a++,r++)a in f&&l(n,r,f[a])}else{if(r>=h)throw TypeError(g);l(n,r++,f)}return n.length=r,n}})}),"9bdd":(function(e,t,n){var r=n(`825a`);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw a!==void 0&&r(a.call(e)),t}}}),"9bf2":(function(e,t,n){var r=n(`83ab`),i=n(`0cfb`),a=n(`825a`),o=n(`c04e`),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(a(e),t=o(t,!0),a(n),i)try{return s(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e}}),"9ed3":(function(e,t,n){var r=n(`ae93`).IteratorPrototype,i=n(`7c73`),a=n(`5c6c`),o=n(`d44e`),s=n(`3f8c`),c=function(){return this};e.exports=function(e,t,n){var l=t+` Iterator`;return e.prototype=i(r,{next:a(1,n)}),o(e,l,!1,!0),s[l]=c,e}}),"9f7f":(function(e,t,n){var r=n(`d039`);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r(function(){var e=i(`a`,`y`);return e.lastIndex=2,e.exec(`abcd`)!=null}),t.BROKEN_CARET=r(function(){var e=i(`^r`,`gy`);return e.lastIndex=2,e.exec(`str`)!=null})}),a2bf:(function(e,t,n){var r=n(`e8b5`),i=n(`50c4`),a=n(`0366`),o=function(e,t,n,s,c,l,u,d){for(var f=c,p=0,m=u?a(u,d,3):!1,h;p<s;){if(p in n){if(h=m?m(n[p],p,t):n[p],l>0&&r(h))f=o(e,t,h,i(h.length),f,l-1)-1;else{if(f>=9007199254740991)throw TypeError(`Exceed the acceptable array length`);e[f]=h}f++}p++}return f};e.exports=o}),a352:(function(e,n){e.exports=t}),a434:(function(e,t,n){var r=n(`23e7`),i=n(`23cb`),a=n(`a691`),o=n(`50c4`),s=n(`7b0b`),c=n(`65f0`),l=n(`8418`),u=n(`1dde`),d=n(`ae40`),f=u(`splice`),p=d(`splice`,{ACCESSORS:!0,0:0,1:2}),m=Math.max,h=Math.min,g=9007199254740991,_=`Maximum allowed length exceeded`;r({target:`Array`,proto:!0,forced:!f||!p},{splice:function(e,t){var n=s(this),r=o(n.length),u=i(e,r),d=arguments.length,f,p,v,y,b,x;if(d===0?f=p=0:d===1?(f=0,p=r-u):(f=d-2,p=h(m(a(t),0),r-u)),r+f-p>g)throw TypeError(_);for(v=c(n,p),y=0;y<p;y++)b=u+y,b in n&&l(v,y,n[b]);if(v.length=p,f<p){for(y=u;y<r-p;y++)b=y+p,x=y+f,b in n?n[x]=n[b]:delete n[x];for(y=r;y>r-p+f;y--)delete n[y-1]}else if(f>p)for(y=r-p;y>u;y--)b=y+p-1,x=y+f-1,b in n?n[x]=n[b]:delete n[x];for(y=0;y<f;y++)n[y+u]=arguments[y+2];return n.length=r-p+f,v}})}),a4d3:(function(e,t,n){var r=n(`23e7`),i=n(`da84`),a=n(`d066`),o=n(`c430`),s=n(`83ab`),c=n(`4930`),l=n(`fdbf`),u=n(`d039`),d=n(`5135`),f=n(`e8b5`),p=n(`861d`),m=n(`825a`),h=n(`7b0b`),g=n(`fc6a`),_=n(`c04e`),v=n(`5c6c`),y=n(`7c73`),b=n(`df75`),x=n(`241c`),S=n(`057f`),C=n(`7418`),w=n(`06cf`),T=n(`9bf2`),E=n(`d1e7`),D=n(`9112`),O=n(`6eeb`),ee=n(`5692`),k=n(`f772`),A=n(`d012`),j=n(`90e3`),te=n(`b622`),M=n(`e538`),ne=n(`746f`),re=n(`d44e`),ie=n(`69f3`),ae=n(`b727`).forEach,oe=k(`hidden`),se=`Symbol`,N=`prototype`,ce=te(`toPrimitive`),le=ie.set,ue=ie.getterFor(se),de=Object[N],fe=i.Symbol,pe=a(`JS
|
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(e,t){return l(e)||u(e,t)||f(e,t)||p()}function h(e){if(Array.isArray(e))return d(e)}function g(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function _(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(e){return h(e)||g(e)||f(e)||_()}var y=n(`a352`),b=n.n(y);function x(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function S(e,t,n){var r=n===0?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,r)}var C=n(`dbf1`);n(`13d5`),n(`4fad`),n(`ac1f`),n(`5319`);function w(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var T=/-(\w)/g,E=w(function(e){return e.replace(T,function(e,t){return t.toUpperCase()})});n(`5db7`),n(`73d9`);var D=[`Start`,`Add`,`Remove`,`Update`,`End`],O=[`Choose`,`Unchoose`,`Sort`,`Filter`,`Clone`],ee=[`Move`],k=[ee,D,O].flatMap(function(e){return e}).map(function(e){return`on${e}`}),A={manage:ee,manageAndEmit:D,emit:O};function j(e){return k.indexOf(e)!==-1}n(`caad`),n(`2ca0`);var te=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.math.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rb.rp.rt.rtc.ruby.s.samp.script.section.select.slot.small.source.span.strong.style.sub.summary.sup.svg.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr`.split(`.`);function M(e){return te.includes(e)}function ne(e){return[`transition-group`,`TransitionGroup`].includes(e)}function re(e){return[`id`,`class`,`role`,`style`].includes(e)||e.startsWith(`data-`)||e.startsWith(`aria-`)||e.startsWith(`on`)}function ie(e){return e.reduce(function(e,t){var n=m(t,2),r=n[0];return e[r]=n[1],e},{})}function ae(e){var t=e.$attrs,n=e.componentData,r=n===void 0?{}:n;return c(c({},ie(Object.entries(t).filter(function(e){var t=m(e,2),n=t[0];return t[1],re(n)}))),r)}function oe(e){var t=e.$attrs,n=e.callBackBuilder,r=ie(se(t));Object.entries(n).forEach(function(e){var t=m(e,2),n=t[0],i=t[1];A[n].forEach(function(e){r[`on${e}`]=i(e)})});var i=`[data-draggable]${r.draggable||``}`;return c(c({},r),{},{draggable:i})}function se(e){return Object.entries(e).filter(function(e){var t=m(e,2),n=t[0];return t[1],!re(n)}).map(function(e){var t=m(e,2),n=t[0],r=t[1];return[E(n),r]}).filter(function(e){var t=m(e,2),n=t[0];return t[1],!j(n)})}n(`c740`);function N(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ce(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 le(e,t,n){return t&&ce(e.prototype,t),n&&ce(e,n),e}var ue=function(e){return e.el},de=function(e,t){return e.__draggable_context=t},fe=function(e){return e.__draggable_context},pe=function(){function e(t){var n=t.nodes,r=n.header,i=n.default,a=n.footer,o=t.root,s=t.realList;N(this,e),this.defaultNodes=i,this.children=[].concat(v(r),v(i),v(a)),this.externalComponent=o.externalComponent,this.rootTransition=o.transition,this.tag=o.tag,this.realList=s}return le(e,[{key:`render`,value:function(e,t){var n=this.tag,r=this.children;return e(n,t,this._isRootComponent?{default:function(){return r}}:r)}},{key:`updated`,value:function(){var e=this.defaultNodes,t=this.realList;e.forEach(function(e,n){de(ue(e),{element:t[n],index:n})})}},{key:`getUnderlyingVm`,value:function(e){return fe(e)}},{key:`getVmIndexFromDomIndex`,value:function(e,t){var n=this.defaultNodes,r=n.length,i=t.children,a=i.item(e);if(a===null)return r;var o=fe(a);if(o)return o.index;if(r===0)return 0;var s=ue(n[0]);return e<v(i).findIndex(function(e){return e===s})?0:r}},{key:`_isRootComponent`,get:function(){return this.externalComponent||this.rootTransition}}]),e}(),me=n(`8bbf`);function he(e,t){var n=e[t];return n?n():[]}function ge(e){var t=e.$slots,n=e.realList,r=e.getKey,i=n||[],a=m([`header`,`footer`].map(function(e){return he(t,e)}),2),o=a[0],s=a[1],l=t.item;if(!l)throw Error(`draggable e
|
|
|
|
|
|
`))}}return{__uid:yl(),key:i,type:o,label:String(r.label??`字段 ${n+1}`),labelEn:r.label_i18n!=null&&typeof r.label_i18n==`object`?String(r.label_i18n.en??``):``,required:!!r.required,list:r.list===!0,filter:r.filter===!0,titleSupplement:r.title_supplement==null?``:String(r.title_supplement),placeholder:r.placeholder==null?``:String(r.placeholder),placeholderEn:r.placeholder_i18n!=null&&typeof r.placeholder_i18n==`object`?String(r.placeholder_i18n.en??``):``,help:r.help==null?``:String(r.help),helpEn:r.help_i18n!=null&&typeof r.help_i18n==`object`?String(r.help_i18n.en??``):``,options:o===`select`?Yee(r.options):[],prefillFrom:t===`signup`&&r.prefill_from!=null?String(r.prefill_from).trim():``,requiredWhenField:s,requiredWhenValuesLines:c,fileExtensionsLines:(()=>{if(o!==`file`)return``;let e=r.file_extensions;return Array.isArray(e)?e.map(e=>String(e).trim().toLowerCase().replace(/^\./,``)).filter(Boolean).join(`
|
|
|
|
|
|
`):``})(),fileMaxCount:(()=>{if(o!==`file`)return``;let e=r.file_max_count;if(e==null||e===``)return``;let t=typeof e==`number`?e:parseInt(String(e),10);return Number.isFinite(t)&&t>=1?String(Math.floor(t)):``})()}}):[bl(t,0)]}function Sl(e,t){return e.map(e=>{let n=e.type===vt,r={key:n?`commitment_accepted`:e.key.trim(),type:n?`checkbox`:e.type,label:e.label.trim(),required:e.required};if(e.list&&(r.list=!0),e.filter&&(r.filter=!0),e.labelEn?.trim()&&(r.label_i18n={en:e.labelEn.trim()}),e.placeholder?.trim()&&(r.placeholder=e.placeholder.trim()),e.placeholderEn?.trim()&&(r.placeholder_i18n={en:e.placeholderEn.trim()}),e.help?.trim()&&(r.help=e.help.trim()),e.helpEn?.trim()&&(r.help_i18n={en:e.helpEn.trim()}),e.titleSupplement?.trim()&&(r.title_supplement=e.titleSupplement.trim()),t===`signup`&&!n&&e.type!==`file`&&e.prefillFrom?.trim()&&(r.prefill_from=e.prefillFrom.trim()),e.type===`file`){let t=String(e.fileExtensionsLines??``).split(`
|
|
|
|
|
|
`).map(e=>e.trim().toLowerCase().replace(/^\./,``)).filter(Boolean);t.length&&(r.file_extensions=[...new Set(t)]);let n=parseInt(String(e.fileMaxCount??``).trim(),10);Number.isFinite(n)&&n>=1&&(r.file_max_count=n)}if(e.type===`select`&&e.options?.length&&(r.options=e.options.filter(e=>e.value!==``||e.label!==``).map(e=>{let t={label:e.label,value:e.value};return e.labelEn?.trim()&&(t.label_i18n={en:e.labelEn.trim()}),t})),t===`signup`&&!n&&e.requiredWhenField?.trim()&&e.requiredWhenValuesLines?.trim()){let t=e.requiredWhenValuesLines.split(`
|
|
|
|
|
|
`).map(e=>e.trim()).filter(Boolean);t.length&&(r.required_when={field:e.requiredWhenField.trim(),values:t})}return r})}function Cl(e,t){let n=new Set;for(let r of e){let e=r.key.trim();if(!e)return`存在未填写「字段 key」的项(须为英文/数字/下划线,与存储键一致)`;if(n.has(e))return`字段 key「${e}」重复`;if(n.add(e),!r.label.trim())return`字段「${e}」缺少显示标签`;if(t===`signup`||t===`audience`){let n=r.type===`commitment_promise`?`checkbox`:r.type;if(t===`signup`){let t=Ct(r.type===`commitment_promise`?`commitment_accepted`:e,n);if(t)return t}}if(t===`signup`&&r.type!==`commitment_promise`&&r.requiredWhenField?.trim()&&!r.requiredWhenValuesLines?.trim())return`字段「${e}」填写了条件必填依赖,但未填写「当取值」列表`}return null}var wl={class:`schema-builder__palette`},Tl=[`onClick`],El={class:`schema-builder__canvas`},Dl={class:`schema-builder__pane-title`},Ol=[`onClick`],kl={class:`preview-field-body`},Al={class:`preview-label`},jl={key:0,class:`preview-required`},Ml={key:1,class:`preview-supplement`},Nl={key:4,class:`preview-pledge`},Pl={key:5,class:`preview-upload`},Fl={key:7,class:`preview-help`},Il={key:0,class:`preview-empty`},Ll={class:`schema-builder__props`},Rl={class:`schema-builder__pane-title`},zl={class:`prop-stack`},Bl={key:0},Vl={key:1},Hl={key:2},Ul={class:`prop-switches`},Wl={key:3},Xee={class:`cond-hint`},Zee={key:4},Qee={key:5},$ee={key:6},ete={key:7},tte={class:`prop-actions`},nte={key:1,class:`preview-empty`},Gl=ke(le({__name:`FormSchemaVisualEditor`,props:s({purpose:{},fill:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(t){let i=t,o=me(t,`modelValue`),s=A(``),c=Ce(()=>i.purpose===`review`?Jee:i.purpose===`audience`?qee:Kee),l=Ce(()=>i.purpose===`audience`?`观众报名表`:i.purpose===`review`?`评审表`:`模板表单`),u=Ce(()=>o.value.find(e=>e.__uid===s.value)??null),d=Ce(()=>o.value.findIndex(e=>e.__uid===s.value));M(o,e=>{if(e.length===0){s.value=``;return}e.some(e=>e.__uid===s.value)||(s.value=e[0].__uid)},{immediate:!0});function f(e){return c.value.find(t=>t.value===e)?.label??e}function m(e){let t=new Set(o.value.map(e=>e.key)),n=o.value.length+1,r=`${e}_${n}`;for(;t.has(r);)n+=1,r=`${e}_${n}`;return r}function h(e){let t=bl(i.purpose,o.value.length,e);t.key=m(i.purpose===`review`?`dim`:`field`),t.label=f(e),g(t),o.value=[...o.value,t],s.value=t.__uid}function g(e){e.type===`commitment_promise`?(e.key=`commitment_accepted`,e.options=[],e.prefillFrom=``,e.requiredWhenField=``,e.requiredWhenValuesLines=``,(!e.label.trim()||e.label===f(`commitment_promise`))&&(e.label=`本人已阅读并同意《参赛承诺书》的全部内容`),e.required=!0,e.list=!1,e.filter=!1):e.type!==`select`&&(e.options=[]),e.type===`file`&&(e.prefillFrom=``)}function _(e){g(e)}function b(e){s.value=e}function x(){let e=d.value,t=o.value[e];if(!t)return;let n={...t,__uid:globalThis.crypto?.randomUUID?.()??`f_${Date.now()}`,key:t.type===`commitment_promise`?`commitment_accepted`:`${t.key}_copy`,label:`${t.label}(副本)`,options:t.options?.map(e=>({...e}))},r=[...o.value];r.splice(e+1,0,n),o.value=r,s.value=n.__uid}function S(){if(o.value.length<=1)return;let e=d.value;if(e<0)return;let t=o.value.filter((t,n)=>n!==e);o.value=t,s.value=t[Math.min(e,t.length-1)]?.__uid??``}function C(e){let t=d.value;if(t<0)return;let n=Math.min(Math.max(1,e),o.value.length)-1;if(n===t)return;let r=[...o.value],[i]=r.splice(t,1);r.splice(n,0,i),o.value=r}function w(e){return(e??[]).map(e=>[e.label,e.value,e.labelEn??``].filter((e,t)=>t<2||e).join(`|`)).join(`
|
|
|
|
|
|
`)}function T(e,t){e.options=t.split(`
|
|
|
|
|
|
`).map(e=>{let t=e.split(`|`).map(e=>e.trim());if(t.every(e=>e===``))return null;if(t.length===1)return{label:t[0],value:t[0]};let n=t[0]||t[1],r=t[1]||n,i=t[2]||``;return n||r?{label:n,value:r,...i?{labelEn:i}:{}}:null}).filter(e=>e!=null)}function D(e){return vl.find(t=>t.value===e)?.label??`不设置预填`}function ee(e){return e.placeholder?.trim()||`请填写${e.label||`此项`}`}return(i,f)=>{let m=O(`el-input`),g=O(`el-option`),A=O(`el-select`),j=O(`el-checkbox`),te=O(`el-input-number`),M=O(`el-switch`),ne=O(`el-button`);return P(),y(`div`,{class:e([`schema-builder`,{"schema-builder--fill":t.fill}])},[v(`aside`,wl,[f[21]||=v(`div`,{class:`schema-builder__pane-title`},`组件`,-1),f[22]||=v(`p`,{class:`schema-builder__hint`},`点击添加到表单末尾,中间画布可拖拽排序。`,-1),(P(!0),y(k,null,E(c.value,e=>(P(),y(`button`,{key:e.value,type:`button`,class:`palette-item`,onClick:t=>h(e.value)},N(e.label),9,Tl))),128))]),v(`section`,El,[v(`div`,Dl,N(l.value),1),p(a(Gee.default),{modelValue:o.value,"onUpdate:modelValue":f[0]||=e=>o.value=e,"item-key":`__uid`,handle:`.preview-drag`,animation:200,tag:`div`,class:`preview-list`},{item:F(({element:t})=>[v(`div`,{class:e([`preview-field`,{"is-selected":t.__uid===s.value}]),onClick:e=>b(t.__uid)},[f[23]||=v(`span`,{class:`preview-drag`,title:`拖动排序`},`⠿`,-1),v(`div`,kl,[v(`label`,Al,[t.required?(P(),y(`span`,jl,`*`)):Se(``,!0),r(` `+N(t.label||`未命名字段`)+` `,1),t.titleSupplement?(P(),y(`span`,Ml,N(t.titleSupplement),1)):Se(``,!0)]),[`text`,`email`,`tel`,`number`,`date`].includes(t.type)?(P(),n(m,{key:0,placeholder:ee(t),type:t.type===`number`?`number`:`text`,disabled:``},null,8,[`placeholder`,`type`])):t.type===`textarea`?(P(),n(m,{key:1,type:`textarea`,rows:3,placeholder:ee(t),disabled:``},null,8,[`placeholder`])):t.type===`select`?(P(),n(A,{key:2,class:`w-100`,placeholder:t.placeholder||`请选择`,disabled:``},{default:F(()=>[(P(!0),y(k,null,E(t.options??[],e=>(P(),n(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:2},1032,[`placeholder`])):t.type===`checkbox`?(P(),n(j,{key:3,disabled:``},{default:F(()=>[r(N(t.label||`勾选确认`),1)]),_:2},1024)):t.type===a(`commitment_promise`)?(P(),y(`div`,Nl,` 查看并签署承诺书 `)):t.type===`file`?(P(),y(`div`,Pl,`选择文件`)):(P(),n(m,{key:6,placeholder:ee(t),disabled:``},null,8,[`placeholder`])),t.help?(P(),y(`p`,Fl,N(t.help),1)):Se(``,!0)])],10,Ol)]),_:1},8,[`modelValue`]),o.value.length===0?(P(),y(`p`,Il,`从左侧选择组件,开始搭建表单`)):Se(``,!0)]),v(`aside`,Ll,[v(`div`,Rl,N(u.value?`更新字段`:`字段属性`),1),u.value?(P(),y(k,{key:0},[v(`div`,zl,[v(`div`,null,[f[24]||=v(`div`,{class:`field-label`},`字段类型`,-1),p(A,{modelValue:u.value.type,"onUpdate:modelValue":f[1]||=e=>u.value.type=e,class:`w-100`,onChange:f[2]||=e=>_(u.value)},{default:F(()=>[(P(!0),y(k,null,E(c.value,e=>(P(),n(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),v(`div`,null,[f[25]||=v(`div`,{class:`field-label`},`字段名称`,-1),p(m,{modelValue:u.value.label,"onUpdate:modelValue":f[3]||=e=>u.value.label=e,placeholder:`如:姓名`},null,8,[`modelValue`])]),t.purpose===`review`?Se(``,!0):(P(),y(`div`,Bl,[f[26]||=v(`div`,{class:`field-label`},`英文名称`,-1),p(m,{modelValue:u.value.labelEn,"onUpdate:modelValue":f[4]||=e=>u.value.labelEn=e,placeholder:`Full Name`},null,8,[`modelValue`])])),v(`div`,null,[f[27]||=v(`div`,{class:`field-label`},`字段标识`,-1),p(m,{modelValue:u.value.key,"onUpdate:modelValue":f[5]||=e=>u.value.key=e,disabled:u.value.type===a(vt),placeholder:`如 player_name`},null,8,[`modelValue`,`disabled`])]),v(`div`,null,[f[28]||=v(`div`,{class:`field-label`},`标题补充`,-1),p(m,{modelValue:u.value.titleSupplement,"onUpdate:modelValue":f[6]||=e=>u.value.titleSupplement=e,placeholder:`可选,展示在标题后`},null,8,[`modelValue`])]),v(`div`,null,[f[29]||=v(`div`,{class:`field-label`},`帮助文字`,-1),p(m,{modelValue:u.value.help,"onUpdate:modelValue":f[7]||=e=>u.value.help=e,
|
|
|
|
|
|
overseas`},null,8,[`modelValue`])])):Se(``,!0)]),v(`div`,tte,[p(ne,{type:`primary`,onClick:x},{default:F(()=>[...f[40]||=[r(`复制`,-1)]]),_:1}),p(ne,{type:`danger`,disabled:o.value.length<=1,onClick:S},{default:F(()=>[...f[41]||=[r(`删除`,-1)]]),_:1},8,[`disabled`])])],64)):(P(),y(`p`,nte,`在中间画布点选一个字段后,在此编辑属性。`))])],2)}}}),[[`__scopeId`,`data-v-9970f865`]]),rte={class:`schema-inline`},ite={class:`form-hint`},ate={class:`schema-inline__toolbar`},ote={class:`schema-inline__actions`},ste={key:1},cte={key:2,class:`text-danger small mt-2 mb-0`},lte={class:`cell-muted`},Kl=ke(le({__name:`SchemaInlineEditorPane`,props:s({purpose:{},schemas:{},boundId:{},boundHint:{},busy:{type:Boolean}},{editorId:{required:!0},editorIdModifiers:{},editorName:{required:!0},editorNameModifiers:{},items:{required:!0},itemsModifiers:{},editorTab:{required:!0},editorTabModifiers:{},jsonText:{required:!0},jsonTextModifiers:{},error:{required:!0},errorModifiers:{}}),emits:s([`create`,`refresh`,`save`,`bind`,`publish`,`remove`,`select`,`jsonBlur`],[`update:editorId`,`update:editorName`,`update:items`,`update:editorTab`,`update:jsonText`,`update:error`]),setup(e,{emit:t}){let i=e,o=me(e,`editorId`),s=me(e,`editorName`),c=me(e,`items`),l=me(e,`editorTab`),u=me(e,`jsonText`),d=me(e,`error`),f=t;function m(e){return i.purpose===`signup`?e.is_current_signup:i.purpose===`audience`?!!e.is_current_audience:e.is_current_review}function h(e){return`${e.name}(v${e.version}${m(e)?` · 当前`:``})`}function g(e,t){if(e?.length)return e.join(`、`);if(!Array.isArray(t))return`—`;let n=t.map(e=>typeof e==`object`&&e&&`label`in e?String(e.label||``):``).filter(Boolean);return n.length?n.join(`、`):`—`}let _=i.purpose===`audience`?`新建观众报名表`:i.purpose===`review`?`新建评审表`:`新建报名表`,b=i.purpose===`audience`?`设为当前观众表`:`设为当前报名表`;return(t,i)=>{let x=O(`el-option`),S=O(`el-select`),C=O(`el-input`),w=O(`el-radio-button`),T=O(`el-radio-group`),D=O(`el-button`),ee=O(`el-empty`),A=O(`el-table-column`),j=O(`el-table`),te=O(`el-collapse-item`),M=O(`el-collapse`);return P(),y(`div`,rte,[v(`p`,ite,[r(N(e.boundHint)+` 当前绑定编号:`,1),v(`strong`,null,N(e.boundId??`未绑定`),1)]),v(`div`,ate,[p(S,{"model-value":o.value??void 0,class:`schema-inline__version`,placeholder:`请选择表单版本`,disabled:!e.schemas.length,onChange:i[0]||=e=>f(`select`,e)},{default:F(()=>[(P(!0),y(k,null,E(e.schemas,e=>(P(),n(x,{key:e.id,label:h(e),value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`,`disabled`]),p(C,{modelValue:s.value,"onUpdate:modelValue":i[1]||=e=>s.value=e,class:`schema-inline__name`,placeholder:`版本名称`,autocomplete:`off`},null,8,[`modelValue`]),p(T,{modelValue:l.value,"onUpdate:modelValue":i[2]||=e=>l.value=e,class:`schema-inline__mode`},{default:F(()=>[p(w,{value:`visual`},{default:F(()=>[...i[10]||=[r(`可视化设计`,-1)]]),_:1}),p(w,{value:`json`},{default:F(()=>[...i[11]||=[r(`JSON 源码`,-1)]]),_:1})]),_:1},8,[`modelValue`]),v(`div`,ote,[p(D,{type:`primary`,disabled:!o.value,onClick:i[3]||=e=>f(`save`)},{default:F(()=>[...i[12]||=[r(`保存`,-1)]]),_:1},8,[`disabled`]),p(D,{disabled:!o.value,onClick:i[4]||=e=>o.value&&f(`bind`,o.value)},{default:F(()=>[r(N(a(b)),1)]),_:1},8,[`disabled`]),p(D,{type:`primary`,plain:``,onClick:i[5]||=e=>f(`create`)},{default:F(()=>[r(N(a(_)),1)]),_:1}),p(D,{loading:e.busy,onClick:i[6]||=e=>f(`refresh`)},{default:F(()=>[...i[13]||=[r(`刷新`,-1)]]),_:1},8,[`loading`])])]),o.value?(P(),y(k,{key:0},[l.value===`visual`?(P(),n(Gl,{key:0,modelValue:c.value,"onUpdate:modelValue":i[7]||=e=>c.value=e,purpose:e.purpose,fill:``},null,8,[`modelValue`,`purpose`])):(P(),y(`div`,ste,[i[14]||=v(`p`,{class:`text-muted small mb-2`},`适合粘贴备份或高级字段;切回可视化时会尽量同步(仅识别常用属性)。`,-1),p(C,{modelValue:u.value,"onUpdate:modelValue":i[8]||=e=>u.value=e,type:`textarea`,rows:18,class:`font-monospace`,spellcheck:`false`,onBlur:i[9]||=e=>f(`jsonBlur`)},null,8,[`modelValue
|
|
|
|
|
|
`),t),`
|
|
|
|
|
|
`);return e},one=function(e,t){xu(t)&&`cause`in t&&cd(e,`cause`,t.cause)},Hd={},sne=qu(`iterator`),cne=Array.prototype,Ud={};Ud[qu(`toStringTag`)]=`z`;var Wd=String(Ud)===`[object z]`,lne=qu(`toStringTag`),une=Ql.Object,dne=gu(function(){return arguments}())==`Arguments`,Gd=Wd?gu:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=une(e),lne))==`string`?n:dne?gu(t):(r=gu(t))==`Object`&&su(t.callee)?`Arguments`:r},fne=qu(`iterator`),Kd=function(e){if(e!=null)return Ru(e,fne)||Ru(e,`@@iterator`)||Hd[Gd(e)]},pne=Ql.TypeError,qd=function(e,t,n){var r,i;id(e);try{if(!(r=Ru(e,`return`))){if(t===`throw`)throw n;return n}r=du(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return id(r),n},mne=Ql.TypeError,Jd=function(e,t){this.stopped=e,this.result=t},Yd=Jd.prototype,hne=function(e,t,n){var r,i,a,o,s,c,l,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=rd(t,u),h=function(e){return r&&qd(r,`normal`,e),new Jd(!0,e)},g=function(e){return d?(id(e),p?m(e[0],e[1],h):m(e[0],e[1])):p?m(e,h):m(e)};if(f)r=e;else{if(!(i=Kd(e)))throw mne(Iu(e)+` is not iterable`);if(function(e){return e!==void 0&&(Hd.Array===e||cne[sne]===e)}(i)){for(a=0,o=xd(e);o>a;a++)if((s=g(e[a]))&&Tu(Yd,s))return s;return new Jd(!1)}r=function(e,t){var n=arguments.length<2?Kd(e):t;if(Lu(n))return id(du(n,e));throw pne(Iu(e)+` is not iterable`)}(e,i)}for(c=r.next;!(l=du(c,r)).done;){try{s=g(l.value)}catch(e){qd(r,`throw`,e)}if(typeof s==`object`&&s&&Tu(Yd,s))return s}return new Jd(!1)},gne=Ql.String,Xd=function(e){if(Gd(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return gne(e)},_ne=function(e,t){return e===void 0?arguments.length<2?``:t:Xd(e)},vne=!cu((function(){var e=Error(`a`);return!(`stack`in e)||(Object.defineProperty(e,`stack`,hu(1,7)),e.stack!==7)})),Zd=qu(`toStringTag`),Qd=Ql.Error,$d=[].push,ef=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,i=Tu(tf,this);hd?n=hd(new Qd(void 0),i?md(this):tf):(n=i?this:Ld(tf),cd(n,Zd,`Error`)),cd(n,`message`,_ne(t,``)),vne&&cd(n,`stack`,ane(n.stack,1)),one(n,r);var a=[];return hne(e,$d,{that:a}),cd(n,`errors`,a),n};hd?hd(ef,Qd):function(e,t){for(var n=Yte(t),r=sd.f,i=ed.f,a=0;a<n.length;a++){var o=n[a];Hu(e,o)||r(e,o,i(t,o))}}(ef,Qd);var tf=ef.prototype=Ld(Qd.prototype,{constructor:hu(1,ef),message:hu(1,``),name:hu(1,`AggregateError`)});ld({global:!0},{AggregateError:ef});var nf=ou(Function.toString);su(zu.inspectSource)||(zu.inspectSource=function(e){return nf(e)});var rf,af,of,sf=zu.inspectSource,cf=Ql.WeakMap,lf=su(cf)&&/native code/.test(sf(cf)),uf=Ql.TypeError,df=Ql.WeakMap;if(lf||zu.state){var ff=zu.state||=new df,pf=ou(ff.get),mf=ou(ff.has),hf=ou(ff.set);rf=function(e,t){if(mf(ff,e))throw new uf(`Object already initialized`);return t.facade=e,hf(ff,e,t),t},af=function(e){return pf(ff,e)||{}},of=function(e){return mf(ff,e)}}else{var gf=dd(`state`);wd[gf]=!0,rf=function(e,t){if(Hu(e,gf))throw new uf(`Object already initialized`);return t.facade=e,cd(e,gf,t),t},af=function(e){return Hu(e,gf)?e[gf]:{}},of=function(e){return Hu(e,gf)}}var _f,vf,yf,bf={set:rf,get:af,has:of,enforce:function(e){return of(e)?af(e):rf(e,{})},getterFor:function(e){return function(t){var n;if(!xu(t)||(n=af(t)).type!==e)throw uf(`Incompatible receiver, `+e+` required`);return n}}},xf=Function.prototype,Sf=lu&&Object.getOwnPropertyDescriptor,Cf=Hu(xf,`name`),yne={EXISTS:Cf,PROPER:Cf&&function(){}.name===`something`,CONFIGURABLE:Cf&&(!lu||lu&&Sf(xf,`name`).configurable)},wf=function(e,t,n,r){r&&r.enumerable?e[t]=n:cd(e,t,n)},Tf=qu(`iterator`),Ef=!1;[].keys&&(`next`in(yf=[].keys())?(vf=md(md(yf)))!==Object.prototype&&(_f=vf):Ef=!0),_f=_f==null||cu((function(){var e={};return _f[Tf].call(e)!==e}))?{}:Ld(_f),su(_f[Tf])||wf(_f,Tf,(function(){return this}));var Df={IteratorPrototype:_f,BUGGY_SAFARI_ITERATORS:Ef},bne=Wd?{}.toString:function(){return`[object `+Gd(this)+`]`},xne=sd.f,Of=qu(`toStringTag`),kf=function(e,t,n,r){if(e){var i=n?e:e.prototype;Hu(i,Of)||xne(i,Of,{configurable:!0,value:t}),r&&!Wd
|
|
|
|
|
|
`)&&e.flags===`s`)})),pre=Hf.RegExp,mre=Uf((function(){var e=pre(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`})),hre=im.get,gre=Cp(`native-string-replace`,String.prototype.replace),ah=RegExp.prototype.exec,oh=ah,_re=$f(``.charAt),vre=$f(``.indexOf),yre=$f(``.replace),sh=$f(``.slice),ch=(rh=/b*/g,Kf(ah,nh=/a/,`a`),Kf(ah,rh,`a`),nh.lastIndex!==0||rh.lastIndex!==0),lh=sre.BROKEN_CARET,uh=/()??/.exec(``)[1]!==void 0;(ch||uh||lh||fre||mre)&&(oh=function(e){var t,n,r,i,a,o,s,c=this,l=hre(c),u=qm(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=Kf(oh,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=lh&&c.sticky,m=Kf(Jm,c),h=c.source,g=0,_=u;if(p&&(m=yre(m,`y`,``),vre(m,`g`)===-1&&(m+=`g`),_=sh(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&_re(u,c.lastIndex-1)!==`
|
|
|
|
|
|
`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),uh&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),ch&&(r=c.lastIndex),i=Kf(ah,p?n:c,_),p?i?(i.input=sh(i.input,g),i[0]=sh(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:ch&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),uh&&i&&i.length>1&&Kf(gre,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(i[a]=void 0)})),i&&f)for(i.groups=o=ih(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var dh=oh;Rm({target:`RegExp`,proto:!0,forced:/./.exec!==dh},{exec:dh});var bre=Ap(`species`),fh=RegExp.prototype,xre=$f(``.charAt),ph=$f(``.charCodeAt),Sre=$f(``.slice),mh=function(e){return function(t,n){var r,i,a=qm(rp(t)),o=fm(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=ph(a,o))<55296||r>56319||o+1===s||(i=ph(a,o+1))<56320||i>57343?e?xre(a,o):r:e?Sre(a,o,o+2):i-56320+(r-55296<<10)+65536}},hh={codeAt:mh(!1),charAt:mh(!0)},Cre=hh.charAt,wre=function(e,t,n){return t+(n?Cre(e,t).length:1)},Tre=Hf.TypeError,gh=function(e,t){var n=e.exec;if(ap(n)){var r=Kf(n,e,t);return r!==null&&Lp(r),r}if(ep(e)===`RegExp`)return Kf(dh,e,t);throw Tre(`RegExp#exec called on incompatible receiver`)};(function(e,t,n,r){var i=Ap(e),a=!Uf((function(){var t={};return t[i]=function(){return 7},``[e](t)!=7})),o=a&&!Uf((function(){var t=!1,n=/a/;return e===`split`&&((n={}).constructor={},n.constructor[bre]=function(){return n},n.flags=``,n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](``),!t}));if(!a||!o||n){var s=$f(/./[i]),c=t(i,``[e],(function(e,t,n,r,i){var o=$f(e),c=t.exec;return c===dh||c===fh.exec?a&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}));lm(String.prototype,e,c[0]),lm(fh,i,c[1])}r&&Bp(fh[i],`sham`,!0)})(`match`,(function(e,t,n){return[function(t){var n=rp(this),r=t==null?void 0:bp(t,e);return r?Kf(r,t,n):new RegExp(t)[e](qm(n))},function(e){var r=Lp(this),i=qm(e),a=n(t,r,i);if(a.done)return a.value;if(!r.global)return gh(r,i);var o=r.unicode;r.lastIndex=0;for(var s,c=[],l=0;(s=gh(r,i))!==null;){var u=qm(s[0]);c[l]=u,u===``&&(r.lastIndex=wre(i,_m(r.lastIndex),o)),l++}return l===0?null:c}]})),Rm({global:!0},{globalThis:Hf});var Ere=!Uf((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),_h=Yp(`IE_PROTO`),vh=Hf.Object,Dre=vh.prototype,yh=Ere?vh.getPrototypeOf:function(e){var t=wp(e);if(Tp(t,_h))return t[_h];var n=t.constructor;return ap(n)&&t instanceof n?n.prototype:t instanceof vh?Dre:null},Ore=Hf.String,kre=Hf.TypeError,bh=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=$f(Object.getOwnPropertyDescriptor(Object.prototype,`__proto__`).set))(n,[]),t=n instanceof Array}catch{}return function(n,r){return Lp(n),function(e){if(typeof e==`object`||ap(e))return e;throw kre(`Can't set `+Ore(e)+` as a prototype`)}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Are=Hf.Array,jre=Math.max,Mre=$f(``.replace),Nre=$f(``.split),Pre=$f([].join),xh=String(Error(`zxcasd`).stack),Sh=/\n\s*at [^:]*:[^\n]*/,Fre=Sh.test(xh),Ire=/@[^\n]*\n/.test(xh)&&!/zxcasd/.test(xh),Lre=function(e,t){if(typeof e!=`string`)return e;if(Fre)for(;t--;)e=Mre(e,Sh,``);else if(Ire)return Pre(function(e,t,n){for(var r,i,a,o,s=vm(e),c=hm(t,s),l=hm(n===void 0?s:n,s),u=Are(jre(l-c,0)),d=0;c<l;c++,d++)r=u,i=d,a=e[c],o=void 0,(o=jp(i))in r?zp.f(r,o,Yf(0,a)):r[o]=a;return u.length=d,u}(Nre(e,`
|
|
|
|
|
|
`),t),`
|
|
|
|
|
|
`);return e},Rre=function(e,t){op(t)&&`cause`in t&&Bp(e,`cause`,t.cause)},Ch=$f($f.bind),wh=function(e,t){return yp(e),t===void 0?e:Ch?Ch(e,t):function(){return e.apply(t,arguments)}},Th={},zre=Ap(`iterator`),Bre=Array.prototype,Vre=Ap(`iterator`),Eh=function(e){if(e!=null)return bp(e,Vre)||bp(e,`@@iterator`)||Th[Gm(e)]},Hre=Hf.TypeError,Dh=function(e,t,n){var r,i;Lp(e);try{if(!(r=bp(e,`return`))){if(t===`throw`)throw n;return n}r=Kf(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return Lp(r),n},Ure=Hf.TypeError,Oh=function(e,t){this.stopped=e,this.result=t},kh=Oh.prototype,Wre=function(e,t,n){var r,i,a,o,s,c,l,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=wh(t,u),h=function(e){return r&&Dh(r,`normal`,e),new Oh(!0,e)},g=function(e){return d?(Lp(e),p?m(e[0],e[1],h):m(e[0],e[1])):p?m(e,h):m(e)};if(f)r=e;else{if(!(i=Eh(e)))throw Ure(vp(e)+` is not iterable`);if(function(e){return e!==void 0&&(Th.Array===e||Bre[zre]===e)}(i)){for(a=0,o=vm(e);o>a;a++)if((s=g(e[a]))&&cp(kh,s))return s;return new Oh(!1)}r=function(e,t){var n=arguments.length<2?Eh(e):t;if(yp(n))return Lp(Kf(n,e));throw Hre(vp(e)+` is not iterable`)}(e,i)}for(c=r.next;!(l=Kf(c,r)).done;){try{s=g(l.value)}catch(e){Dh(r,`throw`,e)}if(typeof s==`object`&&s&&cp(kh,s))return s}return new Oh(!1)},Gre=function(e,t){return e===void 0?arguments.length<2?``:t:qm(e)},Kre=!Uf((function(){var e=Error(`a`);return!(`stack`in e)||(Object.defineProperty(e,`stack`,Yf(1,7)),e.stack!==7)})),qre=Ap(`toStringTag`),Ah=Hf.Error,Jre=[].push,jh=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,i=cp(Mh,this);bh?n=bh(new Ah(void 0),i?yh(this):Mh):(n=i?this:ih(Mh),Bp(n,qre,`Error`)),Bp(n,`message`,Gre(t,``)),Kre&&Bp(n,`stack`,Lre(n.stack,1)),Rre(n,r);var a=[];return Wre(e,Jre,{that:a}),Bp(n,`errors`,a),n};bh?bh(jh,Ah):km(jh,Ah);var Mh=jh.prototype=ih(Ah.prototype,{constructor:Yf(1,jh),message:Yf(1,``),name:Yf(1,`AggregateError`)});Rm({global:!0},{AggregateError:jh});var Nh=Ap(`unscopables`),Ph=Array.prototype;Ph[Nh]??zp.f(Ph,Nh,{configurable:!0,value:ih(null)});var Fh,Ih,Lh,Rh=function(e){Ph[Nh][e]=!0},zh=Ap(`iterator`),Bh=!1;[].keys&&(`next`in(Lh=[].keys())?(Ih=yh(yh(Lh)))!==Object.prototype&&(Fh=Ih):Bh=!0),(Fh==null||Uf((function(){var e={};return Fh[zh].call(e)!==e})))&&(Fh={}),ap(Fh[zh])||lm(Fh,zh,(function(){return this}));var Vh={IteratorPrototype:Fh,BUGGY_SAFARI_ITERATORS:Bh},Yre=zp.f,Hh=Ap(`toStringTag`),Uh=function(e,t,n){e&&!Tp(e=n?e:e.prototype,Hh)&&Yre(e,Hh,{configurable:!0,value:t})},Xre=Vh.IteratorPrototype,Zre=function(){return this},Qre=cm.PROPER,$re=cm.CONFIGURABLE,Wh=Vh.IteratorPrototype,Gh=Vh.BUGGY_SAFARI_ITERATORS,Kh=Ap(`iterator`),eie=function(){return this},qh=function(e,t,n,r,i,a,o){(function(e,t,n,r){var i=t+` Iterator`;e.prototype=ih(Xre,{next:Yf(+!r,n)}),Uh(e,i,!1),Th[i]=Zre})(n,t,r);var s,c,l,u=function(e){if(e===i&&h)return h;if(!Gh&&e in p)return p[e];switch(e){case`keys`:case`values`:case`entries`:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+` Iterator`,f=!1,p=e.prototype,m=p[Kh]||p[`@@iterator`]||i&&p[i],h=!Gh&&m||u(i),g=t==`Array`&&p.entries||m;if(g&&(s=yh(g.call(new e)))!==Object.prototype&&s.next&&(yh(s)!==Wh&&(bh?bh(s,Wh):ap(s[Kh])||lm(s,Kh,eie)),Uh(s,d,!0)),Qre&&i==`values`&&m&&m.name!==`values`&&($re?Bp(p,`name`,`values`):(f=!0,h=function(){return Kf(m,this)})),i)if(c={values:u(`values`),keys:a?h:u(`keys`),entries:u(`entries`)},o)for(l in c)(Gh||f||!(l in p))&&lm(p,l,c[l]);else Rm({target:t,proto:!0,forced:Gh||f},c);return p[Kh]!==h&&lm(p,Kh,h,{name:i}),Th[t]=h,c},tie=im.set,nie=im.getterFor(`Array Iterator`),Jh=qh(Array,`Array`,(function(e,t){tie(this,{type:`Array Iterator`,target:ip(e),index:0,kind:t})}),(function(){var e=nie(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`);Th.Arguments=Th.Array,Rh(`keys`),Rh(`values`),Rh(`entries`);var rie=hh.charAt,iie=im.set,aie=im.getterFor(`String Iterator`);qh(String,
|
|
|
|
|
|
Sorry, wangEditor V5+ versions do not support IE browser.`),ag(),og()):global&&(Yh=global.navigator)!=null&&Yh.userAgent.match(`QQBrowser`)&&(ag(),og());function ag(){typeof globalThis>`u`&&(window.globalThis=window)}function og(){Pne===void 0&&(window.AggregateError=function(e,t){var n=Error(t);return n.errors=e,n})}var sg,cg=Array.isArray||function(e){return gu(e)==`Array`},lg=function(){},oie=[],ug=wu(`Reflect`,`construct`),dg=/^\s*(?:class|function)\b/,sie=ou(dg.exec),cie=!dg.exec(lg),fg=function(e){if(!su(e))return!1;try{return ug(lg,oie,e),!0}catch{return!1}},lie=!ug||cu((function(){var e;return fg(fg.call)||!fg(Object)||!fg((function(){e=!0}))||e}))?function(e){if(!su(e))return!1;switch(Gd(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}return cie||!!sie(dg,sf(e))}:fg,uie=qu(`species`),pg=Ql.Array,mg=function(e,t){return new(function(e){var t;return cg(e)&&(t=e.constructor,(lie(t)&&(t===pg||cg(t.prototype))||xu(t)&&(t=t[uie])===null)&&(t=void 0)),t===void 0?pg:t}(e))(t===0?0:t)},die=qu(`species`),hg=qu(`isConcatSpreadable`),gg=Ql.TypeError,fie=Mu>=51||!cu((function(){var e=[];return e[hg]=!1,e.concat()[0]!==e})),pie=(sg=`concat`,Mu>=51||!cu((function(){var e=[];return(e.constructor={})[die]=function(){return{foo:1}},e[sg](Boolean).foo!==1}))),mie=function(e){if(!xu(e))return!1;var t=e[hg];return t===void 0?cg(e):!!t};ld({target:`Array`,proto:!0,forced:!fie||!pie},{concat:function(e){var t,n,r,i,a,o=Vu(this),s=mg(o,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(mie(a=t===-1?o:arguments[t])){if(c+(i=xd(a))>9007199254740991)throw gg(`Maximum allowed index exceeded`);for(n=0;n<i;n++,c++)n in a&&Rd(s,c,a[n])}else{if(c>=9007199254740991)throw gg(`Maximum allowed index exceeded`);Rd(s,c++,a)}return s.length=c,s}});var _g=kd.f,vg=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],yg={f:function(e){return vg&&gu(e)==`Window`?function(e){try{return _g(e)}catch{return zd(vg)}}(e):_g(bu(e))}},hie=ou([].slice),bg={f:qu},gie=sd.f,xg=function(e){var t=Su.Symbol||={};Hu(t,e)||gie(t,e,{value:bg.f(e)})},Sg=ou([].push),Cg=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,a=e==6,o=e==7,s=e==5||a;return function(c,l,u,d){for(var f,p,m=Vu(c),h=vu(m),g=rd(l,u),_=xd(h),v=0,y=d||mg,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:Sg(b,f)}else switch(e){case 4:return!1;case 7:Sg(b,f)}return a?-1:r||i?i:b}},wg={forEach:Cg(0),map:Cg(1),filter:Cg(2),some:Cg(3),every:Cg(4),find:Cg(5),findIndex:Cg(6),filterReject:Cg(7)}.forEach,Tg=dd(`hidden`),Eg=qu(`toPrimitive`),_ie=bf.set,Dg=bf.getterFor(`Symbol`),Og=Object.prototype,kg=Ql.Symbol,Ag=kg&&kg.prototype,jg=Ql.TypeError,Mg=Ql.QObject,Ng=wu(`JSON`,`stringify`),Pg=ed.f,Fg=sd.f,Ig=yg.f,vie=mu.f,Lg=ou([].push),Rg=Bu(`symbols`),zg=Bu(`op-symbols`),Bg=Bu(`string-to-symbol-registry`),Vg=Bu(`symbol-to-string-registry`),yie=Bu(`wks`),Hg=!Mg||!Mg.prototype||!Mg.prototype.findChild,Ug=lu&&cu((function(){return Ld(Fg({},`a`,{get:function(){return Fg(this,`a`,{value:7}).a}})).a!=7}))?function(e,t,n){var r=Pg(Og,t);r&&delete Og[t],Fg(e,t,n),r&&e!==Og&&Fg(Og,t,r)}:Fg,Wg=function(e,t){var n=Rg[e]=Ld(Ag);return _ie(n,{type:`Symbol`,tag:e,description:t}),lu||(n.description=t),n},Gg=function(e,t,n){e===Og&&Gg(zg,t,n),id(e);var r=Ju(t);return id(n),Hu(Rg,r)?(n.enumerable?(Hu(e,Tg)&&e[Tg][r]&&(e[Tg][r]=!1),n=Ld(n,{enumerable:hu(0,!1)})):(Hu(e,Tg)||Fg(e,Tg,hu(1,{})),e[Tg][r]=!0),Ug(e,r,n)):Fg(e,r,n)},Kg=function(e,t){id(e);var n=bu(t);return wg(jd(n).concat(Xg(n)),(function(t){lu&&!du(qg,n,t)||Gg(e,t,n[t])})),e},qg=function(e){var t=Ju(e),n=du(vie,this,t);return!(this===Og&&Hu(Rg,t)&&!Hu(zg,t))&&(!(n||!Hu(this,t)||!Hu(Rg,t)||Hu(this,Tg)&&this[Tg][t])||n)},Jg=function(e,t){var n=bu(e),r=Ju(t);if(n!==Og||!Hu(Rg,r)||Hu(zg,r)){var i=Pg(n,r);return!i||!Hu(Rg,r)||Hu(n,Tg)&&n[Tg][r]||(i.enumerable=!0),i}},Yg=function(e){var t=Ig(bu(e)),n=[];return wg(t,(function(e){Hu(Rg,e)||Hu(wd,e)||Lg(n,e)})),n},Xg=function(e){var t=e===Og,n=Ig(t?zg:
|
|
|
|
|
|
Could not completely normalize the editor after ${o} iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.
|
|
|
|
|
|
`);var c=n(e).pop();if(H.has(e,c)){var l=V.node(e,c);e.normalizeNode(l)}s++}}))}},parent(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=V.path(e,t,n),i=U.parent(r);return V.node(e,i)},path(e,t){var{depth:n,edge:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(U.isPath(t)){if(r===`start`){var[,i]=H.first(e,t);t=i}else if(r===`end`){var[,a]=H.last(e,t);t=a}}return W.isRange(t)&&(t=r===`start`?W.start(t):r===`end`?W.end(t):U.common(t.anchor.path,t.focus.path)),mv.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},hasPath:(e,t)=>H.has(e,t),pathRef(e,t){var{affinity:n=`forward`}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r={current:t,affinity:n,unref(){var{current:t}=r;return V.pathRefs(e).delete(r),r.current=null,t}};return V.pathRefs(e).add(r),r},pathRefs(e){var t=J_.get(e);return t||(t=new Set,J_.set(e,t)),t},point(e,t){var{edge:n=`start`}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(U.isPath(t)){var r;if(n===`end`){var[,i]=H.last(e,t);r=i}else{var[,a]=H.first(e,t);r=a}var o=H.get(e,r);if(!G.isText(o))throw Error(`Cannot get the ${n} point in the node at path [${t}] because it has no ${n} text node.`);return{path:r,offset:n===`end`?o.text.length:0}}if(W.isRange(t)){var[s,c]=W.edges(t);return n===`start`?s:c}return t},pointRef(e,t){var{affinity:n=`forward`}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r={current:t,affinity:n,unref(){var{current:t}=r;return V.pointRefs(e).delete(r),r.current=null,t}};return V.pointRefs(e).add(r),r},pointRefs(e){var t=Y_.get(e);return t||(t=new Set,Y_.set(e,t)),t},*positions(e){var{at:t=e.selection,unit:n=`offset`,reverse:r=!1,voids:i=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t){var a=V.range(e,t),[o,s]=W.edges(a),c=r?s:o,l=!1,u=``,d=0,f=0,p=0;for(var[m,h]of V.nodes(e,{at:t,reverse:r,voids:i})){if(B.isElement(m)){if(!i&&e.isVoid(m)){yield V.start(e,h);continue}if(e.isInline(m))continue;if(V.hasInlines(e,m)){var g=U.isAncestor(h,s.path)?s:V.end(e,h),_=U.isAncestor(h,o.path)?o:V.start(e,h);u=V.string(e,{anchor:_,focus:g},{voids:i}),l=!0}}if(G.isText(m)){var v=U.equals(h,c.path);for(v?(f=r?c.offset:m.text.length-c.offset,p=c.offset):(f=m.text.length,p=r?f:0),(v||l||n===`offset`)&&(yield{path:h,offset:p},l=!1);;){if(d===0){if(u===``)break;d=y(u,n,r),u=nv(u,d,r)[1]}if(p=r?p-d:p+d,(f-=d)<0){d=-f;break}d=0,yield{path:h,offset:p}}}}}function y(e,t,n){return t===`character`?tv(e,n):t===`word`?function(e){for(var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=0,r=!1;e.length>0;){var i=tv(e,t),[a,o]=nv(e,i,t);if(zie(a,o,t))r=!0,n+=i;else{if(r)break;n+=i}e=o}return n}(e,n):t===`line`||t===`block`?e.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:a=e.selection}=t;if(a){var o=V.before(e,a,{voids:r});if(o){var[,s]=V.first(e,[]),c=[o.path,s];if(U.isPath(a)&&a.length===0)throw Error(`Cannot get the previous node from the root node!`);if(i==null)if(U.isPath(a)){var[l]=V.parent(e,a);i=e=>l.children.includes(e)}else i=()=>!0;var[u]=V.nodes(e,{reverse:!0,at:c,match:i,mode:n,voids:r});return u}}},range:(e,t,n)=>W.isRange(t)&&!n?t:{anchor:V.start(e,t),focus:V.end(e,n||t)},rangeRef(e,t){var{affinity:n=`forward`}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r={current:t,affinity:n,unref(){var{current:t}=r;return V.rangeRefs(e).delete(r),r.current=null,t}};return V.rangeRefs(e).add(r),r},rangeRefs(e){var t=X_.get(e);return t||(t=new Set,X_.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){q_.set(e,t)},start:(e,t)=>V.point(e,t,{edge:`start`}),string(e,t){var{voids:n=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=V.range(e,t),[i,a]=W.edges(r),o=``;for(var[s,c]of V.nodes(e,{at:r,match:G.isText,voids:n})){var l=s.text;U.equals(c,a.path)&&(l=l.slice(0,a.offset)),U.equals(c,i.path)&&(l=l.slice(i.offset)),o+=l}return o},unhangRange(e,t){var{voids:n=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},[r,i]=W.edges(t);if(r.offset!==0||i.offset!==0||W.isCollapsed(
|
|
|
|
|
|
`;if(r.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n(`addBulkFilesFailed`,{smart_count:r.length}),details:e},`error`,this.opts.infoTimeout),typeof AggregateError==`function`)throw AggregateError(r,e);{let t=Error(e);throw t.errors=r,t}}}removeFiles(e,t){let{files:n,currentUploads:r}=this.getState(),i={...n},a={...r},o=Object.create(null);function s(e){return o[e]===void 0}e.forEach((e=>{n[e]&&(o[e]=n[e],delete i[e])})),Object.keys(a).forEach((e=>{let t=r[e].fileIDs.filter(s);t.length===0?delete a[e]:a[e]={...r[e],fileIDs:t}}));let c={currentUploads:a,files:i};Object.keys(i).length===0&&(c.allowNewUpload=!0,c.error=null,c.recoveredState=null),this.setState(c),this.calculateTotalProgress();let l=Object.keys(o);l.forEach((e=>{this.emit(`file-removed`,o[e],t)})),l.length>5?this.log(`Removed ${l.length} files`):this.log(`Removed files: ${l.join(`, `)}`)}removeFile(e,t){t===void 0&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;let t=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:t}),this.emit(`upload-pause`,e,t),t}pauseAll(){let e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{e[t]={...e[t],isPaused:!0}})),this.setState({files:e}),this.emit(`pause-all`)}resumeAll(){let e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{e[t]={...e[t],isPaused:!1,error:null}})),this.setState({files:e}),this.emit(`resume-all`)}retryAll(){let e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{e[t]={...e[t],isPaused:!1,error:null}})),this.setState({files:e,error:null}),this.emit(`retry-all`,t),t.length===0)return Promise.resolve({successful:[],failed:[]});let n=J(this,pS)[pS](t,{forceAllowNewUpload:!0});return J(this,gS)[gS](n)}cancelAll(){this.emit(`cancel-all`);let{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,`cancel-all`),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit(`upload-retry`,e);let t=J(this,pS)[pS]([e],{forceAllowNewUpload:!0});return J(this,gS)[gS](t)}reset(){this.cancelAll()}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);let n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){let e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(e.length===0)return this.emit(`progress`,0),void this.setState({totalProgress:0});let t=e.filter((e=>e.progress.bytesTotal!=null)),n=e.filter((e=>e.progress.bytesTotal==null));if(t.length===0){let t=100*e.length,r=n.reduce(((e,t)=>e+t.progress.percentage),0),i=Math.round(r/t*100);this.setState({totalProgress:i});return}let r=t.reduce(((e,t)=>e+t.progress.bytesTotal),0),i=r/t.length;r+=i*n.length;let a=0;t.forEach((e=>{a+=e.progress.bytesUploaded})),n.forEach((e=>{a+=i*(e.progress.percentage||0)/100}));let o=r===0?0:Math.round(a/r*100);o>100&&(o=100),this.setState({totalProgress:o}),this.emit(`progress`,o)}updateOnlineStatus(){window.navigator.onLine===void 0||window.navigator.onLine?(this.emit(`is-online`),this.wasOffline&&=(this.emit(`back-online`),this.info(this.i18n(`connectedToInternet`),`success`,3e3),!1)):(this.emit(`is-offline`),this.info(this.i18n(`noInternetConnection`),`error`,0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if(typeof e!=`function`)throw TypeError(`Expected a plugin class, but got ${e===null?`null`:typeof e}. Please verify that the plugin was imported and spelled correctly.`);let n=new e(t
|
|
|
|
|
|
`)&&e.flags===`s`)})),Rle=Y.RegExp,QE=lw((function(){var e=Rle(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`})),zle=Yw.get,Ble=KC(`native-string-replace`,String.prototype.replace),$E=RegExp.prototype.exec,eD=$E,Vle=XC(``.charAt),Hle=XC(``.indexOf),Ule=XC(``.replace),tD=XC(``.slice),nD=function(){var e=/a/,t=/b*/g;return Tw($E,e,`a`),Tw($E,t,`a`),e.lastIndex!==0||t.lastIndex!==0}(),rD=XE.BROKEN_CARET,iD=/()??/.exec(``)[1]!==void 0;(nD||iD||rD||ZE||QE)&&(eD=function(e){var t,n,r,i,a,o,s,c=this,l=zle(c),u=XT(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=Tw(eD,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=rD&&c.sticky,m=Tw(ZT,c),h=c.source,g=0,_=u;if(p&&(m=Ule(m,`y`,``),Hle(m,`g`)===-1&&(m+=`g`),_=tD(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&Vle(u,c.lastIndex-1)!==`
|
|
|
|
|
|
`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),iD&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),nD&&(r=c.lastIndex),i=Tw($E,p?n:c,_),p?i?(i.input=tD(i.input,g),i[0]=tD(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:nD&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),iD&&i&&i.length>1&&Tw(Ble,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(i[a]=void 0)})),i&&f)for(i.groups=o=sE(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var aD=eD;WT({target:`RegExp`,proto:!0,forced:/./.exec!==aD},{exec:aD});var oD=Function.prototype,sD=oD.apply,Wle=oD.bind,cD=oD.call,lD=typeof Reflect==`object`&&Reflect.apply||(Wle?cD.bind(sD):function(){return cD.apply(sD,arguments)}),Gle=hw(`species`),uD=RegExp.prototype,dD=function(e,t,n,r){var i=hw(e),a=!lw((function(){var t={};return t[i]=function(){return 7},``[e](t)!=7})),o=a&&!lw((function(){var t=!1,n=/a/;return e===`split`&&((n={}).constructor={},n.constructor[Gle]=function(){return n},n.flags=``,n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](``),!t}));if(!a||!o||n){var s=XC(/./[i]),c=t(i,``[e],(function(e,t,n,r,i){var o=XC(e),c=t.exec;return c===aD||c===uD.exec?a&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}));$w(String.prototype,e,c[0]),$w(uD,i,c[1])}r&&Fw(uD[i],`sham`,!0)},Kle=AE.charAt,fD=function(e,t,n){return t+(n?Kle(e,t).length:1)},qle=Math.floor,pD=XC(``.charAt),Jle=XC(``.replace),mD=XC(``.slice),Yle=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Xle=/\$([$&'`]|\d{1,2})/g,Zle=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=Xle;return i!==void 0&&(i=QC(i),c=Yle),Jle(a,c,(function(a,c){var l;switch(pD(c,0)){case`$`:return`$`;case`&`:return e;case"`":return mD(t,0,n);case`'`:return mD(t,o);case`<`:l=i[mD(c,1,-1)];break;default:var u=+c;if(u===0)return a;if(u>s){var d=qle(u/10);return d===0?a:d<=s?r[d-1]===void 0?pD(c,1):r[d-1]+pD(c,1):a}l=r[u-1]}return l===void 0?``:l}))},Qle=Y.TypeError,hD=function(e,t){var n=e.exec;if(tw(n)){var r=Tw(n,e,t);return r!==null&&Cw(r),r}if(eT(e)===`RegExp`)return Tw(aD,e,t);throw Qle(`RegExp#exec called on incompatible receiver`)},gD=hw(`replace`),$le=Math.max,eue=Math.min,tue=XC([].concat),_D=XC([].push),vD=XC(``.indexOf),yD=XC(``.slice),nue=`a`.replace(/./,`$0`)===`$0`,bD=!!/./[gD]&&/./[gD](`a`,`$0`)===``;dD(`replace`,(function(e,t,n){var r=bD?`$`:`$0`;return[function(e,n){var r=ZC(this),i=e==null?void 0:Aw(e,gD);return i?Tw(i,e,r,n):Tw(t,XT(r),e,n)},function(e,i){var a=Cw(this),o=XT(e);if(typeof i==`string`&&vD(i,r)===-1&&vD(i,`$<`)===-1){var s=n(t,a,o,i);if(s.done)return s.value}var c=tw(i);c||(i=XT(i));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var d=[];;){var f=hD(a,o);if(f===null||(_D(d,f),!l))break;XT(f[0])===``&&(a.lastIndex=fD(o,dT(a.lastIndex),u))}for(var p,m=``,h=0,g=0;g<d.length;g++){for(var _=XT((f=d[g])[0]),v=$le(eue(uT(f.index),o.length),0),y=[],b=1;b<f.length;b++)_D(y,(p=f[b])===void 0?p:String(p));var x=f.groups;if(c){var S=tue([_],y,v,o);x!==void 0&&_D(S,x);var C=XT(lD(i,void 0,S))}else C=Zle(_,o,v,y,x,i);v>=h&&(m+=yD(o,h,v)+C,h=v+_.length)}return m+yD(o,h)}]}),!!lw((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:`7`},e},``.replace(e,`$<a>`)!==`7`}))||!nue||bD);var xD=function(e,t){return xD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},xD(e,t)};function SD(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);function n(){this.constructor=e}xD(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var CD=function(){return CD=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},CD.apply(this,arguments)};function wD(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}
|
|
|
|
|
|
`)}return i};function GO(e,t){if(!(e instanceof HTMLElement&&e.dataset.slateVoid===`true`))for(var n=e.childNodes,r=n.length;r--;){var i=n[r],a=i.nodeType;a==3?t(i,e):a!=1&&a!=9&&a!=11||GO(i,t)}}function KO(e){if(e.length===0)return``;var t=e[0];return t.nodeType===IO.ELEMENT_NODE?t.tagName.toLowerCase():``}(LO=IO||={})[LO.ELEMENT_NODE=1]=`ELEMENT_NODE`,LO[LO.TEXT_NODE=3]=`TEXT_NODE`,LO[LO.CDATA_SECTION_NODE=4]=`CDATA_SECTION_NODE`,LO[LO.PROCESSING_INSTRUCTION_NODE=7]=`PROCESSING_INSTRUCTION_NODE`,LO[LO.COMMENT_NODE=8]=`COMMENT_NODE`,LO[LO.DOCUMENT_NODE=9]=`DOCUMENT_NODE`,LO[LO.DOCUMENT_TYPE_NODE=10]=`DOCUMENT_TYPE_NODE`,LO[LO.DOCUMENT_FRAGMENT_NODE=11]=`DOCUMENT_FRAGMENT_NODE`,globalThis.navigator!==void 0&&globalThis.window!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&globalThis.window.MSStream;var qO=typeof navigator<`u`&&/Mac OS X/.test(navigator.userAgent),JO=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 YO=typeof navigator<`u`&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),xue=typeof navigator<`u`&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Sue=typeof navigator<`u`&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),XO=typeof navigator<`u`&&/Chrome/i.test(navigator.userAgent);typeof navigator<`u`&&/.*QQBrowser/.test(navigator.userAgent);var ZO=!Sue&&!xue&&typeof globalThis<`u`&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges==`function`,X={getWindow:function(e){var t=AO.get(e);if(!t)throw Error(`Unable to find a host window element for this editor`);return t},findKey:function(e,t){var n=kO.get(t);return n||(n=new DD,kO.set(t,n)),n},setNewKey:function(e){var t=new DD;kO.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var i=wO.get(r);if(i==null){if(V.isEditor(r))return n;break}var a=CO.get(r);if(a==null)break;n.unshift(a),r=i}throw 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 wO.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 H.get(e,n)},toDOMNode:function(e,t){var n;if(V.isEditor(t))n=TO.get(e);else{var r=X.findKey(e,t);n=DO.get(r)}if(!n)throw 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,a=i!==void 0&&i,o=X.toDOMNode(e,e);try{r=zO(t)?t:t.parentElement}catch(e){if(!e.message.includes(`Permission denied to access property "nodeType"`))throw e}return!!r&&r.closest(`[data-slate-editor]`)===o&&(!a||r.isContentEditable||!!r.getAttribute(`data-slate-zero-width`))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,i=W.isBackward(t),a=X.toDOMPoint(e,n),o=W.isCollapsed(t)?a:X.toDOMPoint(e,r),s=X.getWindow(e).document.createRange(),c=TD(i?o:a,2),l=c[0],u=c[1],d=TD(i?a:o,2),f=d[0],p=d[1],m=!!(zO(l)?l:l.parentElement).getAttribute(`data-slate-zero-width`),h=!!(zO(f)?f:f.parentElement).getAttribute(`data-slate-zero-width`);return s.setStart(l,m?1:u),s.setEnd(f,h?1:p),s},toDOMPoint:function(e,t){var n,r,i,a=TD(V.node(e,t.path),1)[0],o=X.toDOMNode(e,a);V.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(o.querySelectorAll(`[data-slate-string], [data-slate-zero-width]`)),c=0;try{for(var l=wD(s),u=l.next();!u.done;u=l.next()){var d=u.value,f=d.childNodes[0];if(f!=null&&f.textContent!=null){var p=f.textContent.length,m=d.getAttribute(`data-slate-length`),h=c+(m==null?p:parseInt(m,10));if(t.offset<=h){i=[f,Math.min(p,Math.max(0,t.offset-c))];break}c=h}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!i)
|
|
|
|
|
|
`))&&d--}if(!u){if(a)return null;throw Error(`Cannot resolve a Slate point from DOM point: `+t)}var _=X.toSlateNode(e,u);return{path:X.findPath(e,_),offset:d}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return V.hasPath(e,n.path)&&V.hasPath(e,r.path)},getNodeType:function(e){return B.isElement(e)?e.type:``},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map((function(e){return H.string(e)})).join(``)},getSelectedElems:function(e){var t,n,r=[],i=V.nodes(e,{universal:!0});try{for(var a=wD(i),o=a.next();!o.done;o=a.next()){var s=TD(o.value,1)[0];B.isElement(s)&&r.push(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=TD(V.nodes(e,{match:function(e){return n.checkNodeType(e,t)},universal:!0}),1)[0];return r==null?null:r[0]},getSelectedTextNode:function(e){var t=TD(V.nodes(e,{match:function(e){return G.isText(e)},universal:!0}),1)[0];return t==null?null:t[0]},isNodeSelected:function(e,t){var n=TD(V.nodes(e,{match:function(e){return e===t},universal:!0}),1)[0];return n!=null&&TD(n,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(V.isEnd(e,n.anchor,t)||V.isEnd(e,n.focus,t))},getTextarea:function(e){var t=uO.get(e);if(t==null)throw Error(`Cannot find textarea instance by editor`);return t},getToolbar:function(e){return pO.get(e)||null},getHoverbar:function(e){return hO.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,a=X.getTextarea(e).$textArea?.[0].childNodes;if(a)try{for(var o=wD(Array.from(a)),s=o.next();!s.done;s=o.next()){var c=s.value;if(c.nodeType!==3)break;c.remove()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}var l=V.nodes(e,{match:function(t){return!(!B.isElement(t)||e.isInline(t))},universal:!0});try{for(var u=wD(l),d=u.next();!d.done;d=u.next()){var f=d.value;if(f!=null){var p=f[0];GO(X.toDOMNode(e,p),(function(e,t){var n=q(t);n.attr(`data-slate-string`)||n.attr(`data-slate-zero-width`)||n.attr(`data-w-e-reserve`)||t.removeChild(e)}))}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}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=V.nodes(e,{match:function(t){return e.isVoid(t)}}),i=0;try{for(var a=wD(r),o=a.next();!o.done;o=a.next())o.value,i++}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(t==null||W.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=V.node(e,t);if(n==null)return!1;var r=TD(n,1)[0].children;return r.length===1&&r[0].text===``}},Cue=1,QO={},$O={},ek=CT.filter;WT({target:`Array`,proto:!0,forced:!qE(`filter`)},{filter:function(e){return ek(this,e,arguments.length>1?arguments[1]:void 0)}});var tk=`
|
|
|
|
|
|
\v\f\r \xA0 \u2028\u2029`,nk=XC(``.replace),rk=`[`+tk+`]`,ik=RegExp(`^`+rk+rk+`*`),ak=RegExp(rk+rk+`*$`),ok=function(e){return function(t){var n=XT(ZC(t));return 1&e&&(n=nk(n,ik,``)),2&e&&(n=nk(n,ak,``)),n}},sk={start:ok(1),end:ok(2),trim:ok(3)},ck=Qw.PROPER,lk=sk.trim;WT({target:`String`,proto:!0,forced:function(e){return lw((function(){return!!tk[e]()||`
`[e]()!==`
`||ck&&tk[e].name!==e}))}(`trim`)},{trim:function(){return lk(this)}});var uk=[],dk={};function fk(e,t,n){var r=n.isInline(e)?`span`:`div`;return`<`+r+`>`+t+`</`+r+`>`}var pk,mk,hk,gk,_k=Y.Promise,vk=hw(`species`),yk=function(e){var t=nw(e),n=Nw.f;vw&&t&&!t[vk]&&n(t,vk,{configurable:!0,get:function(){return this}})},wue=Y.TypeError,Tue=hw(`species`),bk=function(e,t){var n,r=Cw(e).constructor;return r===void 0||(n=Cw(r)[Tue])==null?t:function(e){if(vT(e))return e;throw wue(Ow(e)+` is not a constructor`)}(n)},xk=XC([].slice),Sk=/(?:ipad|iphone|ipod).*applewebkit/i.test(rw),Ck=eT(Y.process)==`process`,wk=Y.setImmediate,Tk=Y.clearImmediate,Eue=Y.process,Ek=Y.Dispatch,Due=Y.Function,Dk=Y.MessageChannel,Oue=Y.String,Ok=0,kk={};try{pk=Y.location}catch{}var Ak=function(e){if($C(kk,e)){var t=kk[e];delete kk[e],t()}},jk=function(e){return function(){Ak(e)}},Mk=function(e){Ak(e.data)},Nk=function(e){Y.postMessage(Oue(e),pk.protocol+`//`+pk.host)};wk&&Tk||(wk=function(e){var t=xk(arguments,1);return kk[++Ok]=function(){lD(tw(e)?e:Due(e),void 0,t)},mk(Ok),Ok},Tk=function(e){delete kk[e]},Ck?mk=function(e){Eue.nextTick(jk(e))}:Ek&&Ek.now?mk=function(e){Ek.now(jk(e))}:Dk&&!Sk?(gk=(hk=new Dk).port2,hk.port1.onmessage=Mk,mk=sT(gk.postMessage,gk)):Y.addEventListener&&tw(Y.postMessage)&&!Y.importScripts&&pk&&pk.protocol!==`file:`&&!lw(Nk)?(mk=Nk,Y.addEventListener(`message`,Mk,!1)):mk=`onreadystatechange`in xw(`script`)?function(e){tE.appendChild(xw(`script`)).onreadystatechange=function(){tE.removeChild(this),Ak(e)}}:function(e){setTimeout(jk(e),0)});var Pk,Fk,Ik,Lk,Rk,zk,Bk,Vk,Hk={set:wk,clear:Tk},kue=/ipad|iphone|ipod/i.test(rw)&&Y.Pebble!==void 0,Aue=/web0s(?!.*chrome)/i.test(rw),jue=NT.f,Uk=Hk.set,Wk=Y.MutationObserver||Y.WebKitMutationObserver,Gk=Y.document,Kk=Y.process,qk=Y.Promise,Jk=jue(Y,`queueMicrotask`),Yk=Jk&&Jk.value;Yk||(Pk=function(){var e,t;for(Ck&&(e=Kk.domain)&&e.exit();Fk;){t=Fk.fn,Fk=Fk.next;try{t()}catch(e){throw Fk?Lk():Ik=void 0,e}}Ik=void 0,e&&e.enter()},Sk||Ck||Aue||!Wk||!Gk?!kue&&qk&&qk.resolve?((Bk=qk.resolve(void 0)).constructor=qk,Vk=sT(Bk.then,Bk),Lk=function(){Vk(Pk)}):Ck?Lk=function(){Kk.nextTick(Pk)}:(Uk=sT(Uk,Y),Lk=function(){Uk(Pk)}):(Rk=!0,zk=Gk.createTextNode(``),new Wk(Pk).observe(zk,{characterData:!0}),Lk=function(){zk.data=Rk=!Rk}));var Xk,Zk,Qk,$k,eA=Yk||function(e){var t={fn:e,next:void 0};Ik&&(Ik.next=t),Fk||(Fk=t,Lk()),Ik=t},Mue=function(e){var t,n;this.promise=new e((function(e,r){if(t!==void 0||n!==void 0)throw TypeError(`Bad Promise constructor`);t=e,n=r})),this.resolve=kw(t),this.reject=kw(n)},tA={f:function(e){return new Mue(e)}},nA=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Nue=typeof window==`object`,rA=Hk.set,Pue=hw(`species`),iA=`Promise`,aA=Yw.getterFor(iA),Fue=Yw.set,Iue=Yw.getterFor(iA),oA=_k&&_k.prototype,sA=_k,cA=oA,lA=Y.TypeError,uA=Y.document,dA=Y.process,fA=tA.f,Lue=fA,Rue=!!(uA&&uA.createEvent&&Y.dispatchEvent),pA=tw(Y.PromiseRejectionEvent),mA=!1,hA=UT(iA,(function(){var e=zw(sA),t=e!==String(sA);if(!t&&cw===66)return!0;if(cw>=51&&/native code/.test(e))return!1;var n=new sA((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[Pue]=r,!(mA=n.then((function(){}))instanceof r)||!t&&Nue&&!pA})),zue=hA||!wE((function(e){sA.all(e).catch((function(){}))})),gA=function(e){var t;return!(!yw(e)||!tw(t=e.then))&&t},_A=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;eA((function(){for(var r=e.value,i=e.state==1,a=0;n.length>a;){var o,s,c,l=n[a++],u=i?l.ok:l.fail,d=l.resolve,f=l.reject,p=l.domain;try{u?(i||(e.rejection===2&&Vue(e),e.rejection=1),!0===u?o=r:(p&&p.enter(),o=u(r),
|
|
|
|
|
|
`)>=0)return;r&&(r=cj(r),lj(n,r)||n.push({text:r}))}}else{if(e.nodeName===`BR`)return void(lj(n,`
|
|
|
|
|
|
`)||n.push({text:`
|
|
|
|
|
|
`}));var i=fj(q(e),t);Array.isArray(i)?i.forEach((function(e){return n.push(e)})):n.push(i)}})),n)}(e,t),r=function(e){for(var t in LA)if(e[0].matches(t))return LA[t];return Hue}(e)(e[0],n,t);return Array.isArray(r)||(r=[r]),r.forEach((function(r){V.isVoid(t,r)||(n.length===0&&(r.children=[{text:e.text().replace(/\s+/gm,` `)}]),IA.forEach((function(n){r=n(e[0],r,t)})))})),r}function dj(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(e){return e.replace(/ /g,` `).replace(/</g,`<`).replace(/>/g,`>`).replace(/®/g,`®`).replace(/©/g,`©`).replace(/™/g,`™`).replace(/"/g,`"`)}(n);var r={text:n=cj(n)};return IA.forEach((function(n){r=n(e[0],r,t)})),r}function fj(e,t){FA.forEach((function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=q(r(e[0])))}));var n=KO(e);return n===`span`?e.attr(`data-w-e-type`)?uj(e,t):dj(e,t):n===`code`?KO(e.parent())===`pre`?uj(e,t):dj(e,t):PA.includes(n)?dj(e,t):uj(e,t)}function pj(e,t,n){var r=q(n);return!!r.attr(t)||(r.attr(t,`true`),e.on(`destroyed`,(function(){r.removeAttr(t)})),!1)}function mj(e,t){t===void 0&&(t=``);var n=[];t===``&&(t=`<p><br></p>`),t.indexOf(`<`)!==0&&(t=t.split(/\n/).map((function(e){return`<p>`+e+`</p>`})).join(``));var r=q(`<div>`+t+`</div>`);return Array.from(r.children()).forEach((function(t){var r=fj(q(t),e);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)})),n}var Uue=Nw.f,hj=ID.fastKey,gj=Yw.set,_j=Yw.getterFor;HD(`Set`,(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(e,t,n,r){var i=e((function(e,i){BD(e,a),gj(e,{type:t,index:sE(null),first:void 0,last:void 0,size:0}),vw||(e.size=0),i!=null&&zD(i,e[r],{that:e,AS_ENTRIES:n})})),a=i.prototype,o=_j(t),s=function(e,t,n){var r,i,a=o(e),s=c(e,t);return s?s.value=n:(a.last=s={index:i=hj(t,!0),key:t,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||=s,r&&(r.next=s),vw?a.size++:e.size++,i!==`F`&&(a.index[i]=s)),e},c=function(e,t){var n,r=o(e),i=hj(t);if(i!==`F`)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return kD(a,{clear:function(){for(var e=o(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&=n.previous.next=void 0,delete t[n.index],n=n.next;e.first=e.last=void 0,vw?e.size=0:this.size=0},delete:function(e){var t=this,n=o(t),r=c(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first==r&&(n.first=i),n.last==r&&(n.last=a),vw?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=o(this),r=sT(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!c(this,e)}}),kD(a,n?{get:function(e){var t=c(this,e);return t&&t.value},set:function(e,t){return s(this,e===0?0:e,t)}}:{add:function(e){return s(this,e=e===0?0:e,e)}}),vw&&Uue(a,`size`,{get:function(){return o(this).size}}),i},setStrong:function(e,t,n){var r=t+` Iterator`,i=_j(t),a=_j(r);UE(e,t,(function(e,t){gj(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?t==`keys`?{value:n.key,done:!1}:t==`values`?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?`entries`:`values`,!n,!0),yk(t)}});var vj=new Set([`doctype`,`!doctype`,`meta`,`script`,`style`,`link`,`frame`,`iframe`,`title`,`svg`]);function yj(e,t){e.isInline(t)?(e.insertNode(t),t.type===`link`&&e.insertFragment([{text:``}])):K.insertNodes(e,t,{mode:`highest`})}var Wue=function(e){var t=e,n=t.insertText;return t.insertFragment,t.setFragmentData=function(e){var n=t.selection;if(n){var r=TD(W.edges(n),2),i=r[0],a=r[1],o=V.void(t,{at:i.path}),s=V.void(t,{at:a.path});if(!W.isCollapsed(n)||o){var c=X.toDOMRange(t,n),l=c.cloneContents(),u=l.childNodes[0];if(l.childNodes.forEach((function(e){e.textContent&&e.textContent.trim()!==``&&(u=e)})),s){var d=TD(s,1)[0],f=c.cloneRange(),p=X.toDOMNode(t,d);f.setEndAfter(p),l=f.cloneContents()}if(o&&(u=l.querySelector(`[data-slate-spacer]`)),Array.from(l.querySelectorAll(`[data-slate-zero-width]`)).forEach((function(e){e.textContent=e.getAttribute(`data-slate-zero-width`)===`n`?`
|
|
|
|
|
|
`:``})),HO(u)){var m=u.ownerDocument.createElement(`span`);m.style.whiteSpace=`pre`,m.appendChild(u),l.appendChild(m),u=m}var h=t.getFragment(),g=JSON.stringify(h),_=window.btoa(encodeURIComponent(g));u.setAttribute(`data-slate-fragment`,_),e.setData(`application/x-slate-fragment`,_);var v=l.ownerDocument.createElement(`div`);return v.appendChild(l),v.setAttribute(`hidden`,`true`),l.ownerDocument.body.appendChild(v),e.setData(`text/html`,v.innerHTML),e.setData(`text/plain`,bue(v)),l.ownerDocument.body.removeChild(v),e}}},t.insertData=function(e){var r,i,a=e.getData(`application/x-slate-fragment`);if(a){var o=decodeURIComponent(window.atob(a)),s=JSON.parse(o);t.insertFragment(s)}else{var c=e.getData(`text/plain`),l=e.getData(`text/html`);if(l)t.dangerouslyInsertHtml(l);else if(c){var u=c.split(/\r\n|\r|\n/),d=!1;try{for(var f=wD(u),p=f.next();!p.done;p=f.next()){var m=p.value;d&&K.splitNodes(t,{always:!0}),n(m),d=!0}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}}},t},bj=function(e){return e!=null},Gue={object:!0,function:!0,undefined:!0},Kue=/^\s*class[\s{/}]/,que=Function.prototype.toString,xj=function(e){return!!function(e){if(typeof e!=`function`||!hasOwnProperty.call(e,`length`))return!1;try{if(typeof e.length!=`number`||typeof e.call!=`function`||typeof e.apply!=`function`)return!1}catch{return!1}return!function(e){if(!function(e){return!!bj(e)&&hasOwnProperty.call(Gue,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch{return!1}}(e)}(e)&&!Kue.test(que.call(e))},Sj=function(e){return e!=null},Jue=Object.keys,Yue=function(){try{return!0}catch{return!1}}()?Object.keys:function(e){return Jue(Sj(e)?Object(e):e)},Xue=function(e){if(!Sj(e))throw TypeError(`Cannot use null or undefined`);return e},Zue=Math.max,Cj=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,a=Zue(arguments.length,2);for(e=Object(Xue(e)),i=function(r){try{e[r]=t[r]}catch(e){n||=e}},r=1;r<a;++r)Yue(t=arguments[r]).forEach(i);if(n!==void 0)throw n;return e},Que=Array.prototype.forEach,$ue=Object.create,ede=function(e,t){for(var n in e)t[n]=e[n]},wj=function(e){var t=$ue(null);return Que.call(arguments,(function(e){Sj(e)&&ede(Object(e),t)})),t},Tj=`razdwatrzy`,tde=String.prototype.indexOf,Ej=typeof Tj.contains==`function`&&!0===Tj.contains(`dwa`)&&!1===Tj.contains(`foo`)?String.prototype.contains:function(e){return tde.call(this,e,arguments[1])>-1},Dj=zC((function(e){var t=e.exports=function(e,t){var n,r,i,a,o;return arguments.length<2||typeof e!=`string`?(a=t,t=e,e=null):a=arguments[2],bj(e)?(n=Ej.call(e,`c`),r=Ej.call(e,`e`),i=Ej.call(e,`w`)):(n=i=!0,r=!1),o={value:t,configurable:n,enumerable:r,writable:i},a?Cj(wj(a),o):o};t.gs=function(e,t,n){var r,i,a,o;return typeof e==`string`?a=arguments[3]:(a=n,n=t,t=e,e=null),bj(t)?xj(t)?bj(n)?xj(n)||(a=n,n=void 0):n=void 0:(a=t,t=n=void 0):t=void 0,bj(e)?(r=Ej.call(e,`c`),i=Ej.call(e,`e`)):(r=!0,i=!1),o={get:t,set:n,configurable:r,enumerable:i},a?Cj(wj(a),o):o}})),Oj=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function`);return e},nde=zC((function(e,t){var n,r,i,a,o,s,c,l=Function.prototype.apply,u=Function.prototype.call,d=Object.create,f=Object.defineProperty,p=Object.defineProperties,m=Object.prototype.hasOwnProperty,h={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return Oj(t),m.call(this,`__ee__`)?n=this.__ee__:(n=h.value=d(null),f(this,`__ee__`,h),h.value=null),n[e]?typeof n[e]==`object`?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},r=function(e,t){var r,a;return Oj(t),a=this,n.call(this,e,r=function(){i.call(a,e,r),l.call(t,this,arguments)}),r.__eeOnceListener__=t,this},i=function(e,t){var n,r,i,a;if(Oj(t),!m.call(this,`__ee__`)||!(n=this.__ee__)[e])return this;if(typeof(r=n[e])==`object`)for(a=0;i=r[a];++a)i!==t&&i.__eeOnceListener__!==t||(r.length===2?n[e]=r[+!a]:r.splice(a,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},a=function(e){var
|
|
|
|
|
|
`:e)}function Kj(e,t){return e===void 0&&(e=0),t===void 0&&(t=!1),Lb(`span`,{"data-slate-zero-width":t?`n`:`z`,"data-slate-length":e},``,t?Lb(`br`,null):null)}function qj(e,t,n,r){return CO.set(e,t),wO.set(e,n),B.isElement(e)?function(e,t){var n,r=X.findKey(t,e),i=t.isInline(e),a=V.isVoid(t,e),o=jA(r.id),s={id:o,key:r.id,"data-slate-node":`element`,"data-slate-inline":i},c=e.type,l=e.children,u=l===void 0?[]:l,d=function(e){return Wj[e]||pde}(c);n=a?null:u.map((function(n,r){return qj(n,r,e,t)}));var f=d(e,n,t);if(a){s[`data-slate-void`]=!0;var p=i?`span`:`div`,m=TD(TD(H.texts(e),1)[0],1)[0],h=Lb(p,{"data-slate-spacer":!0,style:{height:`0`,color:`transparent`,outline:`none`,position:`absolute`}},qj(m,0,e,t));f=Lb(p,{style:{position:`relative`}},f,h),CO.set(m,0),wO.set(m,e)}return f.data??={},Object.assign(f.data,s),a||i||(f=function(e,t){var n=t;return Uj.forEach((function(r){n=r(e,t)})),n}(e,f)),kA((function(){var t=UO(o);t!=null&&(DO.set(r,t),OO.set(e,t),EO.set(t,e))})),f}(e,r):function(e,t,n){if(e.text==null)throw Error(`Current node is not slate Text `+JSON.stringify(e));var r=X.findKey(n,e),i=n.getConfig().decorate;if(i==null)throw Error(`Can not get config.decorate`);var a=i([e,X.findPath(n,e)]),o=G.decorations(e,a),s=o.map((function(r,i){var a=function(e,t,n,r,i){t===void 0&&(t=!1);var a=e.text,o=X.findPath(i,n),s=U.parent(o);if(V.isEditor(r))throw Error(`Text node `+JSON.stringify(n)+` parent is Editor`);return i.isVoid(r)?Kj(H.string(r).length):a!==``||r.children[r.children.length-1]!==n||i.isInline(r)||V.string(i,s)!==``?a===``?Kj():t&&a.slice(-1)===`
|
|
|
|
|
|
`?Gj(a,!0):Gj(a):Kj(0,!0)}(r,i===o.length-1,e,t,n);return a=function(e,t){var n=t;return Uj.forEach((function(t){n=t(e,n)})),n}(r,a),Lb(`span`,{"data-slate-leaf":!0},a)})),c=function(e){return`w-e-text-`+e}(r.id),l=Lb(`span`,{"data-slate-node":`text`,id:c,key:r.id},s);return kA((function(){var t=UO(c);t!=null&&(DO.set(r,t),OO.set(e,t),EO.set(t,e))})),l}(e,n,r)}function mde(e,t){var n,r=e.$scroll,i=function(e){return`w-e-textarea-`+e}(e.id),a=t.getConfig(),o=a.readOnly,s=a.autoFocus,c=function(e,t){return t===void 0&&(t=!1),Sb(`div#`+e,{props:{contentEditable:!t}})}(i,o);c.children=(t.children||[]).map((function(e,n){var r=qj(e,n,t,t);return Hj(r),r}));var l=bO.get(e);if(l??=!0,l){var u=function(e,t){return q(`<div
|
|
|
|
|
|
id="`+e+`"
|
|
|
|
|
|
data-slate-editor
|
|
|
|
|
|
data-slate-node="value"
|
|
|
|
|
|
suppressContentEditableWarning
|
|
|
|
|
|
role="textarea"
|
|
|
|
|
|
spellCheck="true"
|
|
|
|
|
|
autoCorrect="true"
|
|
|
|
|
|
autoCapitalize="true"
|
|
|
|
|
|
></div>`)}(i);r.append(u),e.$textArea=u,n=u[0],(f=Soe([Eb,Eoe,Fb,Coe,Toe,wb]))(n,c),bO.set(e,!1),xO.set(e,f)}else{var d=SO.get(e),f=xO.get(e);if(d==null||f==null)return;n=d.elm,f(d,c)}if(n!=null||(n=UO(i))!=null){if((l?s:t.isFocused())&&n.focus({preventScroll:!0}),l){var p=RO(n);p&&AO.set(t,p)}TO.set(t,n),OO.set(t,n),EO.set(n,t),SO.set(e,c)}}function Jj(e){return typeof e==`object`&&!!e&&e.nodeType===1}function Yj(e,t){return(!t||e!==`hidden`)&&e!==`visible`&&e!==`clip`}function Xj(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return Yj(n.overflowY,t)||Yj(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch{return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function Zj(e,t,n,r,i,a,o,s){return a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0}function Qj(e,t){var n=window,r=t.scrollMode,i=t.block,a=t.inline,o=t.boundary,s=t.skipOverflowHiddenElements,c=typeof o==`function`?o:function(e){return e!==o};if(!Jj(e))throw TypeError(`Invalid target`);for(var l=document.scrollingElement||document.documentElement,u=[],d=e;Jj(d)&&c(d);){if((d=d.parentElement)===l){u.push(d);break}d!=null&&d===document.body&&Xj(d)&&!Xj(document.documentElement)||d!=null&&Xj(d,s)&&u.push(d)}for(var f=n.visualViewport?n.visualViewport.width:innerWidth,p=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,g=e.getBoundingClientRect(),_=g.height,v=g.width,y=g.top,b=g.right,x=g.bottom,S=g.left,C=i===`start`||i===`nearest`?y:i===`end`?x:y+_/2,w=a===`center`?S+v/2:a===`end`?b:S,T=[],E=0;E<u.length;E++){var D=u[E],O=D.getBoundingClientRect(),ee=O.height,k=O.width,A=O.top,j=O.right,te=O.bottom,M=O.left;if(r===`if-needed`&&y>=0&&S>=0&&x<=p&&b<=f&&y>=A&&x<=te&&S>=M&&b<=j)return T;var ne=getComputedStyle(D),re=parseInt(ne.borderLeftWidth,10),ie=parseInt(ne.borderTopWidth,10),ae=parseInt(ne.borderRightWidth,10),oe=parseInt(ne.borderBottomWidth,10),se=0,N=0,ce=`offsetWidth`in D?D.offsetWidth-D.clientWidth-re-ae:0,le=`offsetHeight`in D?D.offsetHeight-D.clientHeight-ie-oe:0;if(l===D)se=i===`start`?C:i===`end`?C-p:i===`nearest`?Zj(h,h+p,p,ie,oe,h+C,h+C+_,_):C-p/2,N=a===`start`?w:a===`center`?w-f/2:a===`end`?w-f:Zj(m,m+f,f,re,ae,m+w,m+w+v,v),se=Math.max(0,se+h),N=Math.max(0,N+m);else{se=i===`start`?C-A-ie:i===`end`?C-te+oe+le:i===`nearest`?Zj(A,te,ee,ie,oe+le,C,C+_,_):C-(A+ee/2)+le/2,N=a===`start`?w-M-re:a===`center`?w-(M+k/2)+ce/2:a===`end`?w-j+ae+ce:Zj(M,j,k,re,ae+ce,w,w+v,v);var ue=D.scrollLeft,de=D.scrollTop;C+=de-(se=Math.max(0,Math.min(de+se,D.scrollHeight-ee+le))),w+=ue-(N=Math.max(0,Math.min(ue+N,D.scrollWidth-k+ce)))}T.push({el:D,top:se,left:N})}return T}function $j(e){return e===Object(e)&&Object.keys(e).length!==0}function eM(e,t){return BO(t)&&X.hasDOMNode(e,t,{editable:!0})}function tM(e,t){if(e.getConfig().readOnly)return!1;var n=nM(e,t)&&X.toSlateNode(e,t);return V.isVoid(e,n)}function nM(e,t){return BO(t)&&X.hasDOMNode(e,t)}function rM(e,t,n){n===void 0&&(n=!1);var r=t.selection,i=t.getConfig(),a=X.findDocumentOrShadowRoot(t).getSelection();if(a&&(!e.isComposing||n)&&t.isFocused()){var o=a.type!==`None`;if(r||o){var s=TO.get(t),c=!1;if(s.contains(a.anchorNode)&&s.contains(a.focusNode)&&(c=!0),o&&c&&r){var l=X.toSlateRange(t,a,{exactMatch:!0,suppressThrow:!0});if(l&&W.equals(l,r)){var u=!0;if(W.isCollapsed(r)){var d=a.anchorNode,f=a.anchorOffset;if(d===s){var p=s.childNodes,m=void 0;(m=p[f])&&m.matches(`table`)&&(u=!1),(m=p[f-1])&&m.matches(`table`)&&(u=!1)}}if(u)return}}if(!r||X.hasRange(t,r)){e.isUpdatingSelection=!0;var h=r&&X.toDOMRange(t,r);if(h){W.isBackward(r)?a.setBaseAndExtent(h.endContainer,h.endOffset,h.startContainer,h.startOffset):a.setBaseAndExtent(h.startContainer,h.startOffset,h.endContainer,h.endOffset);var g=h.startContainer.parentElement;if(!g.closest(`[data-slate-spacer]`)){g.getBoundingClientRect=h.getBoundingClientRect.bind(h);
|
|
|
|
|
|
`+r:n;e.attr(`data-tooltip`,o),e.addClass(`w-e-menu-tooltip-v5`)}}}dD(`match`,(function(e,t,n){return[function(t){var n=ZC(this),r=t==null?void 0:Aw(t,e);return r?Tw(r,t,n):new RegExp(t)[e](XT(n))},function(e){var r=Cw(this),i=XT(e),a=n(t,r,i);if(a.done)return a.value;if(!r.global)return hD(r,i);var o=r.unicode;r.lastIndex=0;for(var s,c=[],l=0;(s=hD(r,i))!==null;){var u=XT(s[0]);c[l]=u,u===``&&(r.lastIndex=fD(i,dT(r.lastIndex),o)),l++}return l===0?null:c}]}));var pM=function(){function e(e,t,n){var r=this;n===void 0&&(n=!1),this.$elem=q(`<div class="w-e-bar-item"></div>`),this.$button=q(`<button type="button"></button>`),this.disabled=!1,this.menu=t;var i=t.tag,a=t.width;if(i!==`button`)throw Error(`Invalid tag '`+i+`', expected 'button'`);var o=t.title,s=t.hotkey,c=s===void 0?``:s,l=t.iconSvg,u=l===void 0?``:l,d=this.$button;if(u){var f=q(u);lM(f),d.append(f)}else d.text(o);fM(d,u,o,c,n),n&&u&&d.append(q(`<span class="title">`+o+`</span>`)),a&&d.css(`width`,a+`px`),d.attr(`data-menu-key`,e),this.$elem.append(d),kA((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on(`click`,(function(t){t.preventDefault(),yM(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())}))},e.prototype.exec=function(){var e=yM(this),t=this.menu,n=t.getValue(e);t.exec(e,n)},e.prototype.setActive=function(){var e=yM(this),t=this.$button,n=`active`;this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=yM(this),t=this.$button,n=this.menu.isDisabled(e);(e.selection==null||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r=`disabled`;n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),xde=function(e){function t(t,n,r){return r===void 0&&(r=!1),e.call(this,t,n,r)||this}return SD(t,e),t.prototype.onButtonClick=function(){},t}(pM),mM=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=_O.get(e);t??(t=new Set,_O.set(e,t)),t.add(this),vO.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=vO.get(this);e&&e.emit(`modalOrPanelShow`,this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=vO.get(this);e&&e.emit(`modalOrPanelHide`)}},e}(),Sde=function(e){function t(t){var n=e.call(this,t)||this;return n.type=`dropPanel`,n.$elem=q(`<div class="w-e-drop-panel"></div>`),n}return SD(t,e),t.prototype.genSelfElem=function(){return null},t}(mM),Cde=function(e){function t(t,n,r){r===void 0&&(r=!1);var i=e.call(this,t,n,r)||this;if(i.dropPanel=null,i.menu=n,n.showDropPanel){var a=uM();i.$button.append(a)}return i}return SD(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var e=this.menu;if(e.getPanelContentElem!=null){var t=yM(this);if(this.dropPanel==null){var n=new Sde(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var i=this.dropPanel;i.isShow?i.hide():(r=e.getPanelContentElem(t),i.renderContent(r),i.show())}var a=this.dropPanel;if(a.isShow){var o=this.$elem,s=o.offset().left,c=o.parents(`.w-e-bar`);s-c.offset().left>=c.width()/2?a.$elem.css({left:`none`,right:`0`}):a.$elem.css({left:`0`,right:`none`})}}},t}(pM),wde=function(e){function t(t,n){n===void 0&&(n=0);var r=e.call(this,t)||this;r.type=`modal`,r.$elem=q(`<div class="w-e-modal"></div>`),r.width=0,n&&(r.width=n);var i=r.$elem;return i.on(`click`,(function(e){return e.stopPropagation()})),i.on(`keyup`,(function(e){e.code===`Escape`&&(r.hide(),t.restoreSelection())})),r}return SD(t,e),t.prototype.genSelfElem=function(){var e=this,t=q(`<span class="btn-close"><svg viewBox="0 0 1024 1024"><pat
|
|
|
|
|
|
`)},t.getSelectionText=function(){var n=t.selection;return n==null?``:V.string(e,n)},t.getElemsByType=function(e,n){var r,i;n===void 0&&(n=!1);var a=[],o=V.nodes(t,{at:[],universal:!0});try{for(var s=wD(o),c=s.next();!c.done;c=s.next()){var l=TD(c.value,1)[0];if(B.isElement(l)&&(n?l.type.indexOf(e)>=0:l.type===e)){var u=jA(X.findKey(t,l).id);a.push(CD(CD({},l),{id:u}))}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=e===void 0?[]:e;if(n.length>1)return!1;var r=n[0];if(r==null)return!0;if(B.isElement(r)&&r.type===`paragraph`){var i=r.children,a=i===void 0?[]:i;if(a.length>1)return!1;var o=a[0];if(o==null||G.isText(o)&&o.text===``)return!0}return!1},t.clear=function(){K.delete(t,{at:{anchor:V.start(t,[]),focus:V.end(t,[])}}),t.children.length===0&&K.insertNodes(t,[{type:`paragraph`,children:[{text:``}]}])},t.getParentNode=function(e){return X.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,n){if(e===void 0&&(e=``),n===void 0&&(n=!1),e){var r=document.createElement(`div`);r.innerHTML=e;var i=Array.from(r.childNodes);if(i=i.filter((function(e){var t=e.nodeType,n=e.nodeName;return t===IO.TEXT_NODE||t===IO.ELEMENT_NODE&&!vj.has(n.toLowerCase())})),i.length!==0){var a=t.selection;if(a!=null){var o=null;X.isSelectedEmptyParagraph(t)&&!n&&(o=[a.focus.path[0]]),r.setAttribute(`hidden`,`true`),document.body.appendChild(r);var s=0;i.forEach((function(e){var n=e.nodeType,r=e.nodeName,i=e.textContent,a=i===void 0?``:i;if(n!==IO.TEXT_NODE)if(r!==`BR`){var o=e,c=!1;if(PA.includes(r.toLowerCase()))c=!0;else for(var l in LA)if(o.matches(l)){c=!0;break}if(c){var u=fj(q(o),t);Array.isArray(u)?(u.forEach((function(e){return yj(t,e)})),s++):(yj(t,u),s++),X.isSelectedVoidNode(t)&&t.move(1);return}var d=window.getComputedStyle(o).display;X.isSelectedEmptyParagraph(t)||d.indexOf(`inline`)<0&&t.insertBreak(),t.dangerouslyInsertHtml(o.innerHTML,!0)}else t.insertText(`
|
|
|
|
|
|
`);else{if(!a||!a.trim())return;t.insertNode({text:a})}})),s&&o&&X.isEmptyPath(t,o)&&K.removeNodes(t,{at:o}),r.remove()}}}},t.setHtml=function(e){e===void 0&&(e=``);var n=t.isDisabled(),r=t.isFocused(),i=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var a=mj(t,e);if(K.insertFragment(t,a),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(i))}catch{t.select(V.start(t,[]))}},t}(function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in $O)e.push(t);return e},t.getConfig=function(){var e=yO.get(t);if(e==null)throw Error(`Can not get editor config`);return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(n===void 0?{}:n)[e]||{}},t.alert=function(e,n){n===void 0&&(n=`info`);var r=t.getConfig().customAlert;r&&r(e,n)},t}(function(e){var t=Wue(Pie());return t.id=`wangEditor-`+ Cue++,t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(X.toDOMNode(t,t).focus({preventScroll:!0}),jO.set(t,!0),e){var n=V.end(t,[]);K.select(t,n)}else{var r=MO.get(t);r?K.select(t,r):K.select(t,V.start(t,[]))}},t.isFocused=function(){return!!jO.get(t)},t.blur=function(){X.toDOMNode(t,t).blur(),K.deselect(t),jO.set(t,!1)},t.updateView=function(){X.getTextarea(t).changeViewState();var e=X.getToolbar(t);e&&e.changeToolbarState();var n=X.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=X.getTextarea(t);e.destroy(),uO.delete(t),dO.delete(e);var n=X.getToolbar(t);n&&(n.destroy(),pO.delete(t),fO.delete(n));var r=X.getHoverbar(t);r&&(r.destroy(),hO.delete(t),mO.delete(r)),t.isDestroyed=!0,t.emit(`destroyed`)}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n=`编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能`;n+=`
|
|
|
|
|
|
You has disabled editor scroll, please do this yourself`,console.warn(n);return}var r=q(`#`+e);if(r.length!==0){var i=r[0];if(!X.hasDOMNode(t,i))return n=`Element (found by id is '`+e+`') is not in editor DOM`,n+=`
|
|
|
|
|
|
通过 id '`+e+`' 找到的 element 不在 editor DOM 之内`,void console.error(n,i);var a=X.getTextarea(t),o=a.$textAreaContainer,s=a.$scroll,c=r.offset().top,l=o.offset().top;s[0].scrollBy({top:c-l,behavior:`smooth`})}},t.showProgressBar=function(e){e<1||X.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){_O.get(t)?.forEach((function(e){return e.hide()}))},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return X.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=X.getToolbar(t);n&&(e=n.$box);var r=X.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0])throw Error(`Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent
|
|
|
|
|
|
不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致`);r.addClass(`w-e-full-screen-container`);var i=r.css(`z-index`);r.attr(`data-z-index`,i.toString()),t.isFullScreen=!0,t.emit(`fullScreen`)}},t.unFullScreen=function(){if(t.isFullScreen){var e=X.getTextarea(t).$box.parent();setTimeout((function(){e.removeClass(`w-e-full-screen-container`),t.isFullScreen=!1,t.emit(`unFullScreen`)}),200)}},t.getEditableContainer=function(){return X.getTextarea(t).$textAreaContainer[0]},t}()))))));if(n&&function(e,t){return pj(e,`data-w-e-textarea`,t)}(l,n))throw Error(`Repeated create editor by selector '`+n+`'`);var u=function(e){e===void 0&&(e={});var t=Cx(QO),n={},r=e.MENU_CONF,i=r===void 0?{}:r;return cb(t,(function(e,t){n[t]=CD(CD({},e),i[t]||{})})),delete e.MENU_CONF,CD({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(e,t){window.alert(t+`:
|
|
|
|
|
|
`+e)}},e)}(i);yO.set(l,u);var d=u.hoverbarKeys,f=d===void 0?{}:d;if(c.forEach((function(e){l=e(l)})),o!=null&&(l.children=mj(l,o)),a&&a.length&&(l.children=a),l.children.length===0&&(l.children=[{type:`paragraph`,children:[{text:``}]}]),X.normalizeContent(l),n){var p=new bde(n);uO.set(l,p),dO.set(p,l),p.changeViewState(),kA((function(){var e=p.$scroll;e!=null&&e.height()<300&&console.warn(`编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常
|
|
|
|
|
|
Textarea height < 300px . This may be cause modal and hoverbar position error`,e)}));var m=void 0;Object.keys(f).length>0&&(m=new kde,mO.set(m,l),hO.set(l,m)),l.on(`change`,(function(){l.hidePanelOrModal()})),l.on(`scroll`,(function(){l.hidePanelOrModal()}))}else l.children.forEach((function(e,t){return xM(e,t,l,l)}));var h=u.onCreated,g=u.onDestroyed;return h&&l.on(`created`,(function(){return h(l)})),g&&l.on(`destroyed`,(function(){return g(l)})),kA((function(){return l.emit(`created`)})),l}var jde=qE(`splice`),Mde=Y.TypeError,Nde=Math.max,Pde=Math.min;WT({target:`Array`,proto:!0,forced:!jde},{splice:function(e,t){var n,r,i,a,o,s,c=QC(this),l=fT(c),u=PT(e,l),d=arguments.length;if(d===0?n=r=0:d===1?(n=0,r=l-u):(n=d-2,r=Pde(Nde(uT(t),0),l-u)),l+n-r>9007199254740991)throw Mde(`Maximum allowed length exceeded`);for(i=bT(c,r),a=0;a<r;a++)(o=u+a)in c&&_E(i,a,c[o]);if(i.length=r,n<r){for(a=u;a<l-r;a++)s=a+n,(o=a+r)in c?c[s]=c[o]:delete c[s];for(a=l;a>l-r+n;a--)delete c[a-1]}else if(n>r)for(a=l-r;a>u;a--)s=a+n-1,(o=a+r-1)in c?c[s]=c[o]:delete c[s];for(a=0;a<n;a++)c[a+u]=arguments[a+2];return c.length=l-r+n,i}});var Fde=function(){function e(e,t){var n=this;this.$toolbar=q(`<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>`),this.menus={},this.toolbarItems=[],this.config={},this.changeToolbarState=Sx((function(){n.toolbarItems.forEach((function(e){e.changeMenuState()}))}),200),this.config=t;var r=q(e);if(r.length===0)throw Error(`Cannot find toolbar DOM by selector '`+e+`'`);this.$box=r;var i=this.$toolbar;i.on(`mousedown`,(function(e){return e.preventDefault()}),{passive:!1}),r.append(i),kA((function(){n.registerItems(),n.changeToolbarState(),n.getEditorInstance().on(`change`,n.changeToolbarState)}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.registerItems=function(){var e=this,t=``,n=this.$toolbar,r=this.config,i=r.toolbarKeys,a=i===void 0?[]:i,o=r.insertKeys,s=o===void 0?{index:0,keys:[]}:o,c=r.excludeKeys,l=c===void 0?[]:c,u=Cx(a);s.keys.length>0&&(typeof s.keys==`string`&&(s.keys=[s.keys]),s.keys.forEach((function(e,t){u.splice(s.index+t,0,e)})));var d=u.filter((function(e){if(typeof e==`string`){if(l.includes(e))return!1}else if(l.includes(e.key))return!1;return!0})),f=d.length;d.forEach((function(r,i){if(r===`|`){if(i===0||i+1===f||t===`|`)return;var a=dM();n.append(a),t=r;return}if(typeof r==`string`)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t=`group`}))},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new _M(e)}(e),i=e.menuKeys,a=i===void 0?[]:i,o=this.config.excludeKeys,s=o===void 0?[]:o;a.forEach((function(e){s.includes(e)||t.registerSingleItem(e,r)})),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof _M,i=this.menus,a=i[e];if(a==null){var o=$O[e];if(o==null)throw Error(`Not found menu item factory by key '`+e+`'`);if(typeof o!=`function`)throw Error(`Menu item factory (key='`+e+`') is not a function`);a=o(),i[e]=a}else console.warn(`Duplicated toolbar menu key '`+e+`'
|
|
|
|
|
|
重复注册了菜单栏 menu '`+e+`'`);var s=bM(e,a,r);this.toolbarItems.push(s),gO.set(s,n),r?t.appendBarItem(s):t.$toolbar.append(s.$elem)},e.prototype.getEditorInstance=function(){var e=fO.get(this);if(e==null)throw Error(`Can not get editor instance`);return e},e.prototype.destroy=function(){this.$toolbar.remove(),this.menus={},this.toolbarItems=[]},e}(),Ide=Qw.EXISTS,Lde=Nw.f,SM=Function.prototype,Rde=XC(SM.toString),CM=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,zde=XC(CM.exec);function wM(e){var t=e.server,n=t===void 0?``:t,r=e.fieldName,i=r===void 0?``:r,a=e.maxFileSize,o=a===void 0?10485760:a,s=e.maxNumberOfFiles,c=s===void 0?100:s,l=e.meta,u=l===void 0?{}:l,d=e.metaWithUrl,f=d!==void 0&&d,p=e.headers,m=p===void 0?{}:p,h=e.withCredentials,g=h!==void 0&&h,_=e.timeout,v=_===void 0?1e4:_,y=e.onBeforeUpload,b=y===void 0?function(e){return e}:y,x=e.onSuccess,S=x===void 0?function(e,t){}:x,C=e.onError,w=C===void 0?function(e,t,n){console.error(e.name+` upload error`,t,n)}:C,T=e.onProgress,E=T===void 0?function(e){}:T;if(!n)throw Error(`Cannot get upload server address
|
|
|
|
|
|
没有配置上传地址`);if(!i)throw Error(`Cannot get fieldName
|
|
|
|
|
|
没有配置 fieldName`);var D=n;f&&(D=function(e,t){var n=TD(e.split(`#`),2),r=n[0],i=n[1],a=[];cb(t,(function(e,t){a.push(t+`=`+e)}));var o=a.join(`&`);return r=r.indexOf(`?`)>0?r+`&`+o:r+`?`+o,i?r+`#`+i:r}(D,u));var O=new CS({onBeforeUpload:b,restrictions:{maxFileSize:o,maxNumberOfFiles:c},meta:u}).use(LC,{endpoint:D,headers:m,formData:!0,fieldName:i,bundle:!0,withCredentials:g,timeout:v});return O.on(`upload-success`,(function(e,t){var n=t.body,r=n===void 0?{}:n;try{S(e,r)}catch(e){console.error(`wangEditor upload file - onSuccess error`,e)}O.removeFile(e.id)})),O.on(`progress`,(function(e){e<1||E(e)})),O.on(`upload-error`,(function(e,t,n){try{w(e,t,n)}catch(e){console.error(`wangEditor upload file - onError error`,e)}O.removeFile(e.id)})),O.on(`restriction-failed`,(function(e,t){try{w(e,t)}catch(e){console.error(`wangEditor upload file - onError error`,e)}O.removeFile(e.id)})),O}function TM(e){return TM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},TM(e)}function Bde(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EM(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(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Bde(e,t,n[t])}))}return e}function DM(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function OM(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 kM(e,t,n){return t&&OM(e.prototype,t),n&&OM(e,n),e}function AM(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function jM(e,t){if(t&&(TM(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return AM(e)}function MM(e){return MM=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},MM(e)}function NM(e,t){return NM=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},NM(e,t)}function PM(e,t){if(typeof t!=`function`&&t!==null)throw 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&&NM(e,t)}vw&&!Ide&&Lde(SM,`name`,{configurable:!0,get:function(){try{return zde(CM,Rde(this))[1]}catch{return``}}});var Vde={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)}},FM=new(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};DM(this,e),this.init(t,n)}return kM(e,[{key:`init`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||`i18next:`,this.logger=e||Vde,this.options=t,this.debug=t.debug}},{key:`setDebug`,value:function(e){this.debug=e}},{key:`log`,value:function(){var e=[...arguments];return this.forward(e,`log`,``,!0)}},{key:`warn`,value:function(){var e=[...arguments];return this.forward(e,`warn`,``,!0)}},{key:`error`,value:function(){var e=[...arguments];return this.forward(e,`error`,``)}},{key:`deprecate`,value:function(){var e=[...arguments];return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}},{key:`forward`,value:function(e,t,n,r){return r&&!this.debug?null:(typeof e[0]==`string`&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}},{key:`create`,value:function(t){return new e(this.logger,EM({},{prefix:`${this.prefix}:${t}:`},this.options))}}]),e}()),IM=function(){function e(){DM(this,e),this.observers={}}return kM(e,[{key:`on`,value:function(e,t){var n
|
|
|
|
|
|
`)&&e.flags===`s`)})),Lfe=_N.RegExp,Rfe=vN((function(){var e=Lfe(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`})),zfe=QP.get,Bfe=aP(`native-string-replace`,String.prototype.replace),iI=RegExp.prototype.exec,aI=iI,Vfe=kN(``.charAt),Hfe=kN(``.indexOf),Ufe=kN(``.replace),oI=kN(``.slice),sI=(nI=/b*/g,xN(iI,tI=/a/,`a`),xN(iI,nI,`a`),tI.lastIndex!==0||nI.lastIndex!==0),cI=JF.BROKEN_CARET,lI=/()??/.exec(``)[1]!==void 0;(sI||lI||cI||Ife||Rfe)&&(aI=function(e){var t,n,r,i,a,o,s,c=this,l=zfe(c),u=WF(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=xN(aI,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=cI&&c.sticky,m=xN(GF,c),h=c.source,g=0,_=u;if(p&&(m=Ufe(m,`y`,``),Hfe(m,`g`)===-1&&(m+=`g`),_=oI(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&Vfe(u,c.lastIndex-1)!==`
|
|
|
|
|
|
`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),lI&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),sI&&(r=c.lastIndex),i=xN(iI,p?n:c,_),p?i?(i.input=oI(i.input,g),i[0]=oI(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:sI&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),lI&&i&&i.length>1&&xN(Bfe,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(i[a]=void 0)})),i&&f)for(i.groups=o=rI(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var uI=aI;DF({target:`RegExp`,proto:!0,forced:/./.exec!==uI},{exec:uI});var dI=Function.prototype,fI=dI.apply,Wfe=dI.bind,pI=dI.call,mI=typeof Reflect==`object`&&Reflect.apply||(Wfe?pI.bind(fI):function(){return pI.apply(fI,arguments)}),Gfe=vP(`species`),hI=RegExp.prototype,gI=function(e,t,n,r){var i=vP(e),a=!vN((function(){var t={};return t[i]=function(){return 7},``[e](t)!=7})),o=a&&!vN((function(){var t=!1,n=/a/;return e===`split`&&((n={}).constructor={},n.constructor[Gfe]=function(){return n},n.flags=``,n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](``),!t}));if(!a||!o||n){var s=kN(/./[i]),c=t(i,``[e],(function(e,t,n,r,i){var o=kN(e),c=t.exec;return c===uI||c===hI.exec?a&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}));rF(String.prototype,e,c[0]),rF(hI,i,c[1])}r&&PP(hI[i],`sham`,!0)},Kfe=kN(``.charAt),_I=kN(``.charCodeAt),qfe=kN(``.slice),Jfe=function(e){return function(t,n){var r,i,a=WF(NN(t)),o=oF(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=_I(a,o))<55296||r>56319||o+1===s||(i=_I(a,o+1))<56320||i>57343?e?Kfe(a,o):r:e?qfe(a,o,o+2):i-56320+(r-55296<<10)+65536}}(!0),vI=function(e,t,n){return t+(n?Jfe(e,t).length:1)},Yfe=Math.floor,yI=kN(``.charAt),Xfe=kN(``.replace),bI=kN(``.slice),Zfe=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Qfe=/\$([$&'`]|\d{1,2})/g,$fe=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=Qfe;return i!==void 0&&(i=sP(i),c=Zfe),Xfe(a,c,(function(a,c){var l;switch(yI(c,0)){case`$`:return`$`;case`&`:return e;case"`":return bI(t,0,n);case`'`:return bI(t,o);case`<`:l=i[bI(c,1,-1)];break;default:var u=+c;if(u===0)return a;if(u>s){var d=Yfe(u/10);return d===0?a:d<=s?r[d-1]===void 0?yI(c,1):r[d-1]+yI(c,1):a}l=r[u-1]}return l===void 0?``:l}))},epe=_N.TypeError,xI=function(e,t){var n=e.exec;if(FN(n)){var r=xN(n,e,t);return r!==null&&AP(r),r}if(AN(e)===`RegExp`)return xN(uI,e,t);throw epe(`RegExp#exec called on incompatible receiver`)},SI=vP(`replace`),tpe=Math.max,npe=Math.min,rpe=kN([].concat),CI=kN([].push),wI=kN(``.indexOf),TI=kN(``.slice),ipe=`a`.replace(/./,`$0`)===`$0`,EI=!!/./[SI]&&/./[SI](`a`,`$0`)===``;gI(`replace`,(function(e,t,n){var r=EI?`$`:`$0`;return[function(e,n){var r=NN(this),i=e==null?void 0:eP(e,SI);return i?xN(i,e,r,n):xN(t,WF(r),e,n)},function(e,i){var a=AP(this),o=WF(e);if(typeof i==`string`&&wI(i,r)===-1&&wI(i,`$<`)===-1){var s=n(t,a,o,i);if(s.done)return s.value}var c=FN(i);c||(i=WF(i));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var d=[];;){var f=xI(a,o);if(f===null||(CI(d,f),!l))break;WF(f[0])===``&&(a.lastIndex=vI(o,dF(a.lastIndex),u))}for(var p,m=``,h=0,g=0;g<d.length;g++){for(var _=WF((f=d[g])[0]),v=tpe(npe(oF(f.index),o.length),0),y=[],b=1;b<f.length;b++)CI(y,(p=f[b])===void 0?p:String(p));var x=f.groups;if(c){var S=rpe([_],y,v,o);x!==void 0&&CI(S,x);var C=WF(mI(i,void 0,S))}else C=$fe(_,o,v,y,x,i);v>=h&&(m+=TI(o,h,v)+C,h=v+_.length)}return m+TI(o,h)}]}),!!vN((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:`7`},e},``.replace(e,`$<a>`)!==`7`}))||!ipe||EI);var DI=vP(`unscopables`),OI=Array.prototype;OI[DI]??NP.f(OI,DI,{configurable:!0,value:rI(null)});var kI=function(e){OI[DI][e]=!0},ape=VF.find,AI=!0;`find`in[]&&[,].find((function(){AI=!1})),DF({target:`Array`,proto:!0,forced:AI},{find:function(e){return ape(this,e,arguments.length>1?arguments[1]:void 0)}}),kI(`find`);var ope=vP(`match`),jI=function(e){var t;return IN(e)&&((t=e[ope])===void 0?AN(e)==`RegExp`:!!t)},spe=_N.TypeError,cpe=vP(`species`),MI=function(e,t,n){var r=xP(t);r in e?NP.f(e,r,TN(0,n)):e[r]=n},lpe=_N.Array,upe=Math.max,NI=function(e,t,n){for(var r=fF(e),i=lF(t,r),a=lF(n===void 0?r:n
|
|
|
|
|
|
\v\f\r \xA0 \u2028\u2029`,zI=kN(``.replace),BI=`[`+RI+`]`,ppe=RegExp(`^`+BI+BI+`*`),mpe=RegExp(BI+BI+`*$`),VI=function(e){return function(t){var n=WF(NN(t));return 1&e&&(n=zI(n,ppe,``)),2&e&&(n=zI(n,mpe,``)),n}},hpe={start:VI(1),end:VI(2),trim:VI(3)},gpe=nF.PROPER,_pe=hpe.trim;function HI(e){return q(`<div>`+e+`</div>`).children().filter((function(e){return e.tagName!==`BR`})).length===0}function UI(e){return e.length===0?``:e[0].outerHTML}function WI(e){return e.length?e[0].tagName.toLowerCase():``}function GI(e,t){for(var n=``,r=(e.attr(`style`)||``).split(`;`),i=r.length,a=0;a<i;a++){var o=r[a];if(o){var s=o.split(`:`);s[0].trim()===t&&(n=s[1].trim())}}return n}DF({target:`String`,proto:!0,forced:vN((function(){return!!RI.trim()||gpe&&RI.trim.name!==`trim`}))},{trim:function(){return _pe(this)}}),DF({global:!0},{globalThis:_N}),Ry&&(q.fn.css=Ry),Wy&&(q.fn.append=Wy),Gy&&(q.fn.prepend=Gy),wy&&(q.fn.addClass=wy),Ty&&(q.fn.removeClass=Ty),Ey&&(q.fn.hasClass=Ey),jy&&(q.fn.on=jy),My&&(q.fn.off=My),eb&&(q.fn.focus=eb),Dy&&(q.fn.attr=Dy),Oy&&(q.fn.removeAttr=Oy),Iy&&(q.fn.hide=Iy),Ly&&(q.fn.show=Ly),qy&&(q.fn.parents=qy),ky&&(q.fn.dataset=ky),Ay&&(q.fn.val=Ay),Hy&&(q.fn.text=Hy),Vy&&(q.fn.html=Vy),Yy&&(q.fn.children=Yy),Xy&&(q.fn.remove=Xy),Jy&&(q.fn.find=Jy),Ny&&(q.fn.width=Ny),Py&&(q.fn.height=Py),By&&(q.fn.filter=By),Zy&&(q.fn.empty=Zy);var vpe={selector:`p:not([data-w-e-type])`,parseElemHtml:function(e,t,n){var r=q(e);return(t=t.filter((function(e){return!!G.isText(e)||!!n.isInline(e)}))).length===0&&(t=[{text:r.text().replace(/\s+/gm,` `)}]),{type:`paragraph`,children:t}}},KI=function(e,t){return KI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},KI(e,t)};function qI(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);function n(){this.constructor=e}KI(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var JI=function(){return JI=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},JI.apply(this,arguments)};function YI(e,t,n,r){return new(n||=Promise)((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))}function XI(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError(`Generator is already executing.`);for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||a[0]!==6&&a[0]!==2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function ZI(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 TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function QI(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-- >0
|
|
|
|
|
|
<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>
|
|
|
|
|
|
`+o+`
|
|
|
|
|
|
</li>
|
|
|
|
|
|
`);return r.prepend(s),r[0]},e}(),Eme=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=Z(`color.color`),t.iconSvg=Ape,t.mark=`color`,t}return qI(t,e),t}(NL),Dme=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.title=Z(`color.bgColor`),t.iconSvg=jpe,t.mark=`bgColor`,t}return qI(t,e),t}(NL),PL=`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)`.split(`.`),Ome={renderStyle:function(e,t){var n=e,r=n.color,i=n.bgColor,a=t;return r&&ML(a,{color:r}),i&&ML(a,{backgroundColor:i}),a},styleToHtml:function(e,t){if(!G.isText(e))return t;var n,r=e,i=r.color,a=r.bgColor;return i||a?((HI(t)||WI(n=q(t))!==`span`)&&(n=q(`<span>`+t+`</span>`)),i&&n.css(`color`,i),a&&n.css(`background-color`,a),UI(n)):t},preParseHtml:[Tme],parseStyleHtml:function(e,t,n){var r=q(e);if(!G.isText(t))return t;var i=t,a=GI(r,`color`);a&&(i.color=a);var o=GI(r,`background-color`);return o||=GI(r,`background`),o&&(i.bgColor=o),i},menus:[{key:`color`,factory:function(){return new Eme},config:{colors:PL}},{key:`bgColor`,factory:function(){return new Dme},config:{colors:PL}}]},kme=/^(?:\w+:)?\/\/(\S+)$/,Ame=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,jme=/^[^\s\.]+\.\S{2,}$/,Mme=mF.includes;function FL(e){return e===void 0&&(e=`r`),e+`-`+lb()}function IL(e){return e.replace(/</g,`<`).replace(/>/g,`>`)}function LL(e,t,n,r){return YI(this,void 0,void 0,(function(){var i,a;return XI(this,(function(o){switch(o.label){case 0:return(i=t.getMenuConfig(e).checkLink)?[4,i(n,r)]:[3,2];case 1:if(typeof(a=o.sent())==`string`)return t.alert(a,`error`),[2,!1];if(a==null)return[2,!1];o.label=2;case 2:return[2,!0]}}))}))}function RL(e,t,n){return YI(this,void 0,void 0,(function(){var r;return XI(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 zL(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 BL(e,t){return{type:`link`,url:IL(e),children:t?[{text:t}]:[]}}function VL(e,t,n){return YI(this,void 0,void 0,(function(){var r,i,a;return XI(this,(function(o){switch(o.label){case 0:return n?(t||=n,e.restoreSelection(),zL(e)?[2]:[4,LL(`insertLink`,e,t,n)]):[2];case 1:return o.sent()?[4,RL(`insertLink`,e,n)]:[2];case 2:return r=o.sent(),(i=e.selection)==null||(W.isCollapsed(i)?(e.insertText(` `),a=BL(r,t),K.insertNodes(e,a),e.insertFragment([{text:` `}])):V.string(e,i)===t?(a=BL(r),K.wrapNodes(e,a,{split:!0}),K.collapse(e,{edge:`end`})):(e.deleteFragment(),a=BL(r,t),K.insertNodes(e,a))),[2]}}))}))}DF({target:`Array`,proto:!0},{includes:function(e){return Mme(this,e,arguments.length>1?arguments[1]:void 0)}}),kI(`includes`);var Nme={type:`link`,renderElem:function(e,t,n){var r=e,i=r.url,a=r.target;return Lb(`a`,{href:i,target:a===void 0
|
|
|
|
|
|
`)return e.deleteBackward(`character`),void K.insertNodes(r,{type:`paragraph`,children:[{text:``}]},{mode:`highest`})}n(`
|
|
|
|
|
|
`)},r}},dhe=function(){function e(){this.title=Z(`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(e,t){},e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return e.selection==null||!!QI(V.nodes(e,{match:function(t){return X.getNodeType(t)===`pre`||!!V.isVoid(e,t)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(e){if(this.$content==null){var t=q(`<ul class="w-e-panel-content-emotion"></ul>`);t.on(`click`,`li`,(function(t){var n=t.target;if(n!=null){t.preventDefault();var r=q(n).text();e.insertText(r)}})),this.$content=t}var n=this.$content;if(n==null)return document.createElement(`ul`);n.empty();var r=e.getMenuConfig(`emotion`).emotions;return(r===void 0?[]:r).forEach((function(e){var t=q(`<li>`+e+`</li>`);n.append(t)})),n[0]},e}(),fhe={menus:[{key:`emotion`,factory:function(){return new dhe},config:{emotions:`😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏`.split(` `)}}]},phe={1:`12px`,2:`14px`,3:`16px`,4:`19px`,5:`24px`,6:`32px`,7:`48px`},mhe={selector:`font`,preParseHtml:function(e){var t=q(e);if(WI(t)!==`font`)return e;var n=t.attr(`size`)||``;n&&(t.removeAttr(`size`),t.css(`font-size`,phe[n]));var r=t.attr(`face`)||``;return r&&(t.removeAttr(`face`),t.css(`font-family`,r)),t[0]}},hhe=kN(``.indexOf);DF({target:`String`,proto:!0,forced:!bL(`includes`)},{includes:function(e){return!!~hhe(WF(NN(this)),WF(yL(e)),arguments.length>1?arguments[1]:void 0)}});var uR,dR,fR=function(e){return e&&e.Math==Math&&e},pR=fR(typeof globalThis==`object`&&globalThis)||fR(typeof window==`object`&&window)||fR(typeof self==`object`&&self)||fR(typeof fN==`object`&&fN)||function(){return this}()||Function(`return this`)(),mR=Function.prototype,hR=mR.apply,ghe=mR.bind,gR=mR.call,_R=typeof Reflect==`object`&&Reflect.apply||(ghe?gR.bind(hR):function(){return gR.apply(hR,arguments)}),vR=Function.prototype,yR=vR.bind,bR=vR.call,_he=yR&&yR.bind(bR),xR=yR?function(e){return e&&_he(bR,e)}:function(e){return e&&function(){return bR.apply(e,arguments)}},SR=function(e){return typeof e==`function`},CR=function(e){try{return!!e()}catch{return!0}},wR=!CR((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})),TR=Function.prototype.call,ER=TR.bind?TR.bind(TR):function(){return TR.apply(TR,arguments)},DR={}.propertyIsEnumerable,OR=Object.getOwnPropertyDescriptor,kR={f:OR&&!DR.call({1:2},1)?function(e){var t=OR(this,e);return!!t&&t.enumerable}:DR},AR=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},vhe=xR({}.toString),yhe=xR(``.slice),jR=function(e){return yhe(vhe(e),8,-1)},MR=pR.Object,bhe=xR(``.split),NR=CR((function(){return!MR(`z`).propertyIsEnumerable(0)}))?function(e){return jR(e)==`String`?bhe(e,``):MR(e)}:MR,xhe=pR.TypeError,PR=function(e){if(e==null)throw xhe(`Can't call method on `+e);return e},FR=function(e){return NR(PR(e))},IR=function(e){return typeof e==`object`?e!==null:SR(e)},LR={},RR=function(e){return SR(e)?e
|
|
|
|
|
|
`).map((function(e){return{type:`paragraph`,children:[{text:e}]}}));K.insertNodes(e,r,{mode:`highest`})}},e.prototype.changeToCodeBlock=function(e,t){var n,r,i=[],a=V.nodes(e,{match:function(t){return e.children.includes(t)},universal:!0});try{for(var o=ZI(a),s=o.next();!s.done;s=o.next()){var c=QI(s.value,1)[0];c&&i.push(H.string(c))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}K.removeNodes(e,{mode:`highest`});var l={type:`pre`,children:[{type:`code`,language:t,children:[{text:i.join(`
|
|
|
|
|
|
`)}]}]};K.insertNodes(e,l,{mode:`highest`})},e}(),UV={key:`codeBlock`,factory:function(){return new HV}};DF({target:`String`,proto:!0,forced:tL(`anchor`)},{anchor:function(e){return eL(this,`a`,`name`,e)}}),gI(`match`,(function(e,t,n){return[function(t){var n=NN(this),r=t==null?void 0:eP(t,e);return r?xN(r,t,n):new RegExp(t)[e](WF(n))},function(e){var r=AP(this),i=WF(e),a=n(t,r,i);if(a.done)return a.value;if(!r.global)return xI(r,i);var o=r.unicode;r.lastIndex=0;for(var s,c=[],l=0;(s=xI(r,i))!==null;){var u=WF(s[0]);c[l]=u,u===``&&(r.lastIndex=vI(i,dF(r.lastIndex),o)),l++}return l===0?null:c}]}));var WV={menus:[UV],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData;e.insertNode;var i=e;return i.insertBreak=function(){var e=X.getSelectedNodeByType(i,`code`);if(e!=null){var n=function(e,t){var n=t.selection;if(n==null)return``;var r=H.string(e),i=n.anchor.offset,a=r.slice(0,i).split(`
|
|
|
|
|
|
`),o=a.length;return o===0?``:a[o-1]}(e,i);if(n){var r=n.match(/^\s+/);if(r!=null&&r[0]!=null){var a=r[0];i.insertText(`
|
|
|
|
|
|
`+a);return}}i.insertText(`
|
|
|
|
|
|
`)}else t()},i.normalizeNode=function(e){var t=QI(e,2),r=t[0],a=t[1],o=X.getNodeType(r);return o===`code`&&a.length<=1&&K.setNodes(i,{type:`paragraph`},{at:a}),o===`pre`&&(X.isLastNode(i,r)&&K.insertNodes(i,X.genEmptyParagraph(),{at:[a[0]+1]}),X.getNodeType(r.children[0])!==`code`&&(K.unwrapNodes(i),K.setNodes(i,{type:`paragraph`},{mode:`highest`}))),n([r,a])},i.insertData=function(e){if(X.getSelectedNodeByType(i,`code`)!=null){var t=e.getData(`text/plain`);V.insertText(i,t)}else r(e)},i},renderElems:[{type:`pre`,renderElem:function(e,t,n){return Lb(`pre`,null,t)}},{type:`code`,renderElem:function(e,t,n){return Lb(`code`,null,t)}}],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=q(e);if(WI(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:not([data-w-e-type])>code`,parseElemHtml:function(e,t,n){return{type:`code`,language:``,children:[{text:q(e)[0].textContent||``}]}}},{selector:`pre:not([data-w-e-type])`,parseElemHtml:function(e,t,n){var r=q(e);return(t=t.filter((function(e){return X.getNodeType(e)===`code`}))).length===0&&(t=[{type:`code`,language:``,children:[{text:r[0].textContent||``}]}]),{type:`pre`,children:t.filter((function(e){return X.getNodeType(e)===`code`}))}}}]},GV=function(){function e(){this.title=Z(`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(e){return``},e.prototype.isActive=function(e){return e.isFullScreen},e.prototype.isDisabled=function(e){return!1},e.prototype.exec=function(e,t){e.isFullScreen?e.unFullScreen():e.fullScreen()},e}(),KV={menus:[{key:`fullScreen`,factory:function(){return new GV}}]},qV=function(){function e(){this.title=Z(`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(e){return``},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return t==null||!!W.isExpanded(t)},e.prototype.exec=function(e,t){var n=e.selection;if(n!=null){var r=[n.anchor.path[0]];K.insertNodes(e,{type:`paragraph`,children:[{text:``}]},{at:r}),e.select(V.start(e,r))}},e}(),JV=[Xpe,Ome,vV,CV,kV,jV,Qme,LV,fhe,zme,WV,uhe,Cme,ype,the,PV,KV,{menus:[{key:`enter`,factory:function(){return new qV}}]}];eN(`en`,{listModule:{unOrderedList:`Unordered list`,orderedList:`Ordered list`}}),eN(`zh-CN`,{listModule:{unOrderedList:`无序列表`,orderedList:`<EFBFBD><EFBFBD>
|
|
|
|
|
|
`)&&e.flags===`s`)})),o_e=eH.RegExp,s_e=oH((function(){var e=o_e(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`})),c_e=pW.get,l_e=yH(`native-string-replace`,String.prototype.replace),oq=RegExp.prototype.exec,sq=oq,u_e=aH(``.charAt),d_e=aH(``.indexOf),f_e=aH(``.replace),cq=aH(``.slice),lq=(rq=/b*/g,tU(oq,nq=/a/,`a`),tU(oq,rq,`a`),nq.lastIndex!==0||rq.lastIndex!==0),uq=r_e.BROKEN_CARET,dq=/()??/.exec(``)[1]!==void 0;(lq||dq||uq||a_e||s_e)&&(sq=function(e){var t,n,r,i,a,o,s,c=this,l=c_e(c),u=yG(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=tU(sq,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=uq&&c.sticky,m=tU(t_e,c),h=c.source,g=0,_=u;if(p&&(m=f_e(m,`y`,``),d_e(m,`g`)===-1&&(m+=`g`),_=cq(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&u_e(u,c.lastIndex-1)!==`
|
|
|
|
|
|
`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),dq&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),lq&&(r=c.lastIndex),i=tU(oq,p?n:c,_),p?i?(i.input=cq(i.input,g),i[0]=cq(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:lq&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),dq&&i&&i.length>1&&tU(l_e,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(i[a]=void 0)})),i&&f)for(i.groups=o=UU(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var fq=sq;RW({target:`RegExp`,proto:!0,forced:/./.exec!==fq},{exec:fq});var pq=function(){function e(){this.type=`list-item`,this.tag=`button`}return e.prototype.getListNode=function(e){var t=this.type;return X.getSelectedNodeByType(e,t)},e.prototype.getValue=function(e){return``},e.prototype.isActive=function(e){var t=this.getListNode(e);if(t==null)return!1;var n=t.ordered;return(n!==void 0&&n)===this.ordered},e.prototype.isDisabled=function(e){return e.selection==null||!!X.getSelectedElems(e).some((function(t){if(V.isVoid(e,t)&&V.isBlock(e,t))return!0;var n=t.type;return!![`pre`,`code`,`table`].includes(n)||void 0}))},e.prototype.exec=function(e,t){this.isActive(e)?K.setNodes(e,{type:`paragraph`,ordered:void 0,level:void 0}):K.setNodes(e,{type:`list-item`,ordered:this.ordered,indent:void 0})},e}(),p_e=`<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>`,m_e=`<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>`,h_e=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.ordered=!1,t.title=Z(`listModule.unOrderedList`),t.iconSvg=p_e,t}return ZK(t,e),t}(pq),g_e=function(e){function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.ordered=!0,t.title=Z(`listModule.orderedList`),t.iconSvg=m_e,t}return ZK(t,e),t}(pq),__e={key:`bulletedList`,factory:function(){return new h_e}},v_e={key:`numberedList`,factory:function(){return new g_e}},mq=[],y_e={type:`list-item`,elemToHtml:function(e,t){var n=``,r=``,i=e.ordered,a=i!==void 0&&i?`ol`:`ul`,o=function(e){var t=JK.get(e);if(t==null)return 0;var n=e,r=n.type,i=n.ordered,a=i!==void 0&&i,o=n.level,s=o===void 0?0:o,c=X.findPath(t,e);if(c[0]===0)return s+1;var l=U.previous(c),u=V.node(t,l);if(!u)return 0;var d=$K(u,1)[0];if(X.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,m=p!==void 0&&p,h=f.level,g=h===void 0?0:h;return g<s?s-g:g>s?0:g===s?m===a?0:1:0}(e);if(o>0)for(var s=0;s<o;s++)n+=`<`+a+`>`,mq.push(a);var c=function(e){var t=JK.get(e);if(t==null)return 0;var n=e,r=n.type,i=n.ordered,a=i!==void 0&&i,o=n.level,s=o===void 0?0:o,c=X.findPath(t,e);if(c[0]===t.children.length-1)return s+1;var l=U.next(c),u=V.node(t,l);if(!u)return 0;var d=$K(u,1)[0];if(X.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,m=p!==void 0&&p,h=f.level,g=h===void 0?0:h;return g<s?s-g:g>s?0:g===s?m===a?0:1:0}(e);if(c>0)for(s=0;s<c;s++)r+=`</`+mq.pop()+`>`;return{html:`<li>`+t+`</li>`,prefix:n,suffix:r}}},b_e=WH(`species`),x_e=_K.filter;RW({target:`Array`,proto:!0,forced:!(LH>=51||!oH((function(){var e=[];return(e.constructor={})[b_e]=function(){return{foo:1}},e.filter(Boolean).foo!==1})))},{filter:function(e){return x_e(this,e,arguments.length>1?arguments[1]:void 0)}});var hq=Function.prototype,gq=hq.apply,S_e=hq.bind,_q=hq.call,C_e=typeof Reflect==`object`&&Reflect.apply||(S_e?_q.bind(gq):function(){return _q.apply(gq,arguments)}),vq=(WH(`species`),RegExp.prototype),w_e=wG.charAt,T_e=function(e,t,n){return t+(n?w_e(e,t).length:1)},E_e=Math.floor,yq=aH(``.charAt),D_e=aH(``.replace),bq=aH(``.slice),O_e=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,k_e=/\$([$&'`]|\d{1,2})/g,A_e=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=k_e;return i!==void 0&&(i=xH(i),c=O_e),D_e(a,c,(function(a,c){var l;sw
|
|
|
|
|
|
`)&&e.flags===`s`)})),qve=Pq.RegExp,Jve=Fq((function(){var e=qve(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`})),Yve=GJ.get,Xve=hJ(`native-string-replace`,String.prototype.replace),SY=RegExp.prototype.exec,CY=SY,Zve=Gq(``.charAt),Qve=Gq(``.indexOf),$ve=Gq(``.replace),wY=Gq(``.slice),TY=(bY=/b*/g,Rq(SY,yY=/a/,`a`),Rq(SY,bY,`a`),yY.lastIndex!==0||bY.lastIndex!==0),EY=pY.BROKEN_CARET,DY=/()??/.exec(``)[1]!==void 0;(TY||DY||EY||Kve||Jve)&&(CY=function(e){var t,n,r,i,a,o,s,c=this,l=Yve(c),u=cY(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=Rq(CY,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=EY&&c.sticky,m=Rq(uY,c),h=c.source,g=0,_=u;if(p&&(m=$ve(m,`y`,``),Qve(m,`g`)===-1&&(m+=`g`),_=wY(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&Zve(u,c.lastIndex-1)!==`
|
|
|
|
|
|
`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),DY&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),TY&&(r=c.lastIndex),i=Rq(SY,p?n:c,_),p?i?(i.input=wY(i.input,g),i[0]=wY(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:TY&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),DY&&i&&i.length>1&&Rq(Xve,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(i[a]=void 0)})),i&&f)for(i.groups=o=xY(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var OY=CY;iY({target:`RegExp`,proto:!0,forced:/./.exec!==OY},{exec:OY});var kY=Array.isArray||function(e){return Kq(e)==`Array`},AY=function(){},eye=[],jY=$q(`Reflect`,`construct`),MY=/^\s*(?:class|function)\b/,tye=Gq(MY.exec),nye=!MY.exec(AY),NY=function(e){if(!Zq(e))return!1;try{return jY(AY,eye,e),!0}catch{return!1}},PY=!jY||Fq((function(){var e;return NY(NY.call)||!NY(Object)||!NY((function(){e=!0}))||e}))?function(e){if(!Zq(e))return!1;switch(sY(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}return nye||!!tye(MY,IJ(e))}:NY,FY=function(e,t,n){var r=CJ(t);r in e?jJ.f(e,r,Vq(0,n)):e[r]=n},rye=SJ(`species`),IY=function(e){return oJ>=51||!Fq((function(){var t=[];return(t.constructor={})[rye]=function(){return{foo:1}},t[e](Boolean).foo!==1}))},iye=Gq([].slice),aye=IY(`slice`),oye=SJ(`species`),LY=Pq.Array,sye=Math.max;function RY(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function zY(e){var t=e.selection;if(t==null)return!1;var n=RY(V.nodes(e,{match:function(e){return X.checkNodeType(e,`table-cell`)}}),1)[0];if(n){var r=RY(n,2)[1],i=V.start(e,r);if(mv.equals(t.anchor,i))return!0}return!1}function BY(e,t){var n,r,i=V.nodes(e,{at:t,match:function(e){return X.getNodeType(e)===`table`}}),a=!1;try{for(var o=function(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 TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}(i),s=o.next();!s.done;s=o.next())s.value,a=!0}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}iY({target:`Array`,proto:!0,forced:!aye},{slice:function(e,t){var n,r,i,a=Xq(this),o=$J(a),s=ZJ(e,o),c=ZJ(t===void 0?o:t,o);if(kY(a)&&(n=a.constructor,(PY(n)&&(n===LY||kY(n.prototype))||Qq(n)&&(n=n[oye])===null)&&(n=void 0),n===LY||n===void 0))return iye(a,s,c);for(r=new(n===void 0?LY:n)(sye(c-s,0)),i=0;s<c;s++,i++)s in a&&FY(r,i,a[s]);return r.length=i,r}});var VY=Gq(Gq.bind),cye=SJ(`species`),HY=Pq.Array,lye=function(e,t){return new(function(e){var t;return kY(e)&&(t=e.constructor,(PY(t)&&(t===HY||kY(t.prototype))||Qq(t)&&(t=t[cye])===null)&&(t=void 0)),t===void 0?HY:t}(e))(t===0?0:t)},UY=Gq([].push),WY=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,a=e==6,o=e==7,s=e==5||a;return function(c,l,u,d){for(var f,p,m=gJ(c),h=Jq(m),g=function(e,t){return dJ(e),t===void 0?e:VY?VY(e,t):function(){return e.apply(t,arguments)}}(l,u),_=$J(h),v=0,y=d||lye,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:UY(b,f)}else switch(e){case 4:return!1;case 7:UY(b,f)}return a?-1:r||i?i:b}},GY={forEach:WY(0),map:WY(1),filter:WY(2),some:WY(3),every:WY(4),find:WY(5),findIndex:WY(6),filterReject:WY(7)},uye=GY.map;iY({target:`Array`,proto:!0,forced:!IY(`map`)},{map:function(e){return uye(this,e,arguments.length>1?arguments[1]:void 0)}});var dye=oY?{}.toString:function(){return`[object `+sY(this)+`]`};function KY(e){var t=e.children||[];return t.length===0?[]:(t[0]||{}).children||[]}function qY(e){return KY(e).every((function(e){return!!e.isHeader}))}oY||YJ(Object.prototype,`toString`,dye,{unsafe:!0});var fye=JJ.PROPER,JY=RegExp.prototype,YY=JY.toString,pye=Gq(uY),mye=
|
|
|
|
|
|
\v\f\r \xA0 \u2028\u2029`,mX=Gq(``.replace),hX=`[`+pX+`]`,Aye=RegExp(`^`+hX+hX+`*`),jye=RegExp(hX+hX+`*$`),gX=function(e){return function(t){var n=cY(Yq(t));return 1&e&&(n=mX(n,Aye,``)),2&e&&(n=mX(n,jye,``)),n}},Mye={start:gX(1),end:gX(2),trim:gX(3)},Nye=JJ.PROPER,Pye=Mye.trim;function _X(e){return e.length?e[0].tagName.toLowerCase():``}iY({target:`String`,proto:!0,forced:function(e){return Fq((function(){return!!pX[e]()||`
`[e]()!==`
`||Nye&&pX[e].name!==e}))}(`trim`)},{trim:function(){return Pye(this)}}),iY({global:!0},{globalThis:Pq}),Wy&&(q.fn.append=Wy),jy&&(q.fn.on=jy),eb&&(q.fn.focus=eb),Dy&&(q.fn.attr=Dy),Ay&&(q.fn.val=Ay),Vy&&(q.fn.html=Vy),ky&&(q.fn.dataset=ky),wy&&(q.fn.addClass=wy),Ty&&(q.fn.removeClass=Ty),Yy&&(q.fn.children=Yy),zy&&(q.fn.each=zy),Jy&&(q.fn.find=Jy);var vX=!1,yX=0,bX=0,xX=null,SX=null,CX=q(`body`);function wX(e){vX=!1,SX=null,xX=null,CX.off(`mousemove`,TX),CX.off(`mouseup`,wX)}CX.on(`mousedown`,(function(e){var t=e.target;(t.tagName===`TH`||t.tagName===`TD`)&&t.style.cursor===`col-resize`&&(t.style.cursor=`auto`,e.preventDefault(),vX=!0,yX=e.clientX,bX=t.getBoundingClientRect().width,CX.on(`mousemove`,TX),CX.on(`mouseup`,wX))}));var TX=pb((function(e){if(vX&&SX!=null&&xX!=null){e.preventDefault();var t=e.clientX,n=bX+(t-yX);(n=Math.floor(100*n)/100)<30&&(n=30),K.setNodes(SX,{width:n.toString()},{at:xX})}}),100),Fye={type:`table`,renderElem:function(e,t,n){var r=function(e,t){if(e.isDisabled())return!1;var n=e.selection;if(n==null||W.isCollapsed(n))return!0;var r=n.anchor,i=n.focus,a=X.findPath(e,t),o=V.start(e,a),s=V.end(e,a),c=mv.compare(r,s)<=0&&mv.compare(r,o)>=0,l=mv.compare(i,s)<=0&&mv.compare(i,o)>=0;return!!(c&&l&&U.equals(r.path.slice(0,3),i.path.slice(0,3)))}(n,e),i=e.width,a=i===void 0?`auto`:i;return Lb(`div`,{className:`table-container`,"data-selected":X.isNodeSelected(n,e),on:{mousedown:function(t){if(t.target.tagName===`DIV`&&t.preventDefault(),!n.isDisabled()){var r=X.findPath(n,e),i=V.start(n,r),a=n.selection;(a==null||a.anchor.path[0]!==r[0])&&n.select(i)}}}},Lb(`table`,{width:a,contentEditable:r},Lb(`colgroup`,null,KY(e).map((function(e){var t=e.width;return Lb(`col`,{width:t===void 0?`auto`:t})}))),Lb(`tbody`,null,t)))}},Iye={type:`table-row`,renderElem:function(e,t,n){return Lb(`tr`,null,t)}},Lye={type:`table-cell`,renderElem:function(e,t,n){var r=function(e,t){var n=X.getParentNode(e,t);if(n==null)return!1;var r=X.getParentNode(e,n);return r!=null&&KY(r).some((function(e){return e===t}))}(n,e),i=e,a=i.colSpan,o=a===void 0?1:a,s=i.rowSpan,c=s===void 0?1:s,l=i.isHeader;return r?Lb(l!==void 0&&l?`th`:`td`,{colSpan:o,rowSpan:c,style:{borderRightWidth:`3px`},on:{mousemove:pb((function(t){var r=this.elm;if(r!=null){var i=r.getBoundingClientRect(),a=i.left,o=i.width,s=i.top,c=i.height,l=t.clientX,u=t.clientY;vX||(l>a+o-5&&l<a+o&&u>s&&u<s+c?(r.style.cursor=`col-resize`,SX=n,xX=X.findPath(n,e)):vX||(r.style.cursor=`auto`,SX=null,xX=null))}}),100)}},t):Lb(`td`,{colSpan:o,rowSpan:c},t)}},Rye={selector:`table`,preParseHtml:function(e){var t=q(e);if(_X(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]}},zye=GY.filter;iY({target:`Array`,proto:!0,forced:!IY(`filter`)},{filter:function(e){return zye(this,e,arguments.length>1?arguments[1]:void 0)}});var Bye=Math.floor,EX=Gq(``.charAt),Vye=Gq(``.replace),DX=Gq(``.slice),Hye=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Uye=/\$([$&'`]|\d{1,2})/g,Wye=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=Uye;return i!==void 0&&(i=gJ(i),c=Hye),Vye(a,c,(function(a,c){var l;switch(EX(c,0)){case`$`:return`$`;case`&`:return e;case"`":return DX(t,0,n);case`'`:return DX(t,o);case`<`:l=i[DX(c,1,-1)];break;default:var u=+c;if(u===0)return a;if(u>s){var d=Bye(u/10);return d===0?a:d<=s?r[d-1]===void 0?EX(c,1):r[d-1]+EX(c,1):a}l=r[u-1]}return l===void 0?``:l}))},OX=SJ(`replace`),Gye=Math.max,Kye=Math.min,qye=Gq([].concat),kX=Gq([].push),AX=Gq(``.indexOf),jX=Gq(``.slice),Jye=`a`.replace(/./,`$0`)===`$0`,MX=!!/./[OX]&&/./[OX](`a`,`$0`)===``
|
|
|
|
|
|
`)},c.deleteBackward=function(e){if(!zY(c)){var t=c.selection;if(t){var r=V.before(c,t);if(r){var i=BY(c,r),a=BY(c,t);if(i&&!a)return}}n(e)}},c.handleTab=function(){if(X.getSelectedNodeByType(c,`table`)){var t=V.above(e);X.checkNodeType(t[0],`table-cell`)&&K.select(e,t[1]);var n=V.next(e);if(n)n[0]&&n[0].text&&(n=V.above(e,{at:n[1]})??n),K.select(e,n[1]);else{var r=c.children||[],i=r.length;if(X.checkNodeType(r[i-1],`table`)){var a=X.genEmptyParagraph();K.insertNodes(c,a,{at:[i]}),c.handleTab()}}}else o()},c.deleteForward=function(e){zY(c)||r(e)},c.normalizeNode=function(e){var t=RY(e,2),n=t[0],r=t[1];if(X.getNodeType(n)!==`table`)return i([n,r]);if(X.isLastNode(c,n)){var a=X.genEmptyParagraph();K.insertNodes(c,a,{at:[r[0]+1]})}},c.insertData=function(e){if(X.getSelectedNodeByType(c,`table`)!=null){var t=e.getData(`text/plain`);t===`
|
|
|
|
|
|
`||/<img[^>]+>/.test(e.getData(`text/html`))?a(e):V.insertText(c,t)}else a(e)},c.selectAll=function(){var e=c.selection;if(e!=null){var t=X.getSelectedNodeByType(c,`table-cell`);if(t!=null){var n=e.anchor,r=e.focus;if(U.equals(n.path.slice(0,3),r.path.slice(0,3)))if(H.string(t).length!==0){var i=X.findPath(c,t),a={anchor:V.start(c,i),focus:V.end(c,i)};c.select(a)}else s();else s()}else s()}else s()},c}};eN(`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`}}),eN(`zh-CN`,{videoModule:{delete:`删除视频`,uploadVideo:`上传视频`,insertVideo:`插入视频`,videoSrc:`视频地址`,videoSrcPlaceHolder:`视频文件 url 或第三方 <iframe>`,videoPoster:`视频封面`,videoPosterPlaceHolder:`封面图片 url`,ok:`确定`,editSize:`修改尺寸`,width:`宽度`,height:`高度`}});var zX=function(){return zX=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},zX.apply(this,arguments)};function BX(e,t,n,r){return new(n||=Promise)((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))}function VX(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError(`Generator is already executing.`);for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||a[0]!==6&&a[0]!==2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function HX(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function lbe(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function(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 TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}(e),t={},r(`next`),r(`throw`),r(`return`),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}var UX=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function WX(e){var t={exports:{}};return e(t,t.exports),t.exports}var GX,KX,qX=function(e){return e&&e.Math==Math&&e},Q=qX(typeof globalThis==`object`&&globalThis)||qX(typeof window==`object`&&window)||qX(typeof self==`object`&&self)||qX(typeof UX==`object`&&UX)||function(){return this}()||Function(`return this`)(),JX=function(e){try{return!!e()}catch{return!0}},YX
|
|
|
|
|
|
\v\f\r \xA0 \u2028\u2029`,kQ=iZ(``.replace),AQ=`[`+OQ+`]`,axe=RegExp(`^`+AQ+AQ+`*`),oxe=RegExp(AQ+AQ+`*$`),jQ=function(e){return function(t){var n=DQ(cZ(t));return 1&e&&(n=kQ(n,axe,``)),2&e&&(n=kQ(n,oxe,``)),n}},sxe={start:jQ(1),end:jQ(2),trim:jQ(3)},cxe=lQ.PROPER,lxe=sxe.trim;function MQ(e){return e.length?e[0].tagName.toLowerCase():``}function NQ(e,t,n){t===void 0&&(t=`auto`),n===void 0&&(n=`auto`);var r=q(e);return r.attr(`width`,t),r.attr(`height`,n),r[0].outerHTML}CQ({target:`String`,proto:!0,forced:JX((function(){return!!OQ.trim()||cxe&&OQ.trim.name!==`trim`}))},{trim:function(){return lxe(this)}}),CQ({global:!0},{globalThis:Q}),Wy&&(q.fn.append=Wy),jy&&(q.fn.on=jy),eb&&(q.fn.focus=eb),Dy&&(q.fn.attr=Dy),Ay&&(q.fn.val=Ay),Vy&&(q.fn.html=Vy),Ky&&(q.fn.parent=Ky),Ey&&(q.fn.hasClass=Ey),Zy&&(q.fn.empty=Zy);var PQ,uxe={type:`video`,renderElem:function(e,t,n){var r,i=e,a=i.src,o=a===void 0?``:a,s=i.poster,c=s===void 0?``:s,l=i.width,u=l===void 0?`auto`:l,d=i.height,f=d===void 0?`auto`:d,p=X.isNodeSelected(n,e);if(o.trim().indexOf(`<iframe `)===0)r=Lb(`div`,{className:`w-e-textarea-video-container`,"data-selected":p?`true`:``,innerHTML:NQ(o,u,f)});else{var m=Lb(`video`,{poster:c,controls:!0},Lb(`source`,{src:o,type:`video/mp4`}),`Sorry, your browser doesn't support embedded videos.
|
|
|
|
|
|
抱歉,浏览器不支持 video 视频`);u!==`auto`&&(m.data.width=u),f!==`auto`&&(m.data.height=f),r=Lb(`div`,{className:`w-e-textarea-video-container`,"data-selected":p?`true`:``},m)}return Sb(`div`,{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r)}},dxe={type:`video`,elemToHtml:function(e,t){var n=e,r=n.src,i=r===void 0?``:r,a=n.poster,o=a===void 0?``:a,s=n.width,c=s===void 0?`auto`:s,l=n.height,u=l===void 0?`auto`:l,d=`<div data-w-e-type="video" data-w-e-is-void>
|
|
|
|
|
|
`;return i.trim().indexOf(`<iframe `)===0?d+=NQ(i,c,u):d+=`<video poster="`+o+`" controls="true" width="`+c+`" height="`+u+`"><source src="`+i+`" type="video/mp4"/></video>`,d+`
|
|
|
|
|
|
</div>`}},fxe=Object.keys||function(e){return vQ(e,yQ)},pxe=YX?Object.defineProperties:function(e,t){UZ(e);for(var n,r=lZ(t),i=fxe(t),a=i.length,o=0;a>o;)GZ.f(e,n=i[o++],r[n]);return e},FQ=fZ(`document`,`documentElement`),IQ=eQ(`IE_PROTO`),LQ=function(){},RQ=function(e){return`<script>`+e+`<\/script>`},zQ=function(e){e.write(RQ(``)),e.close();var t=e.parentWindow.Object;return e=null,t},BQ=function(){try{PQ=new ActiveXObject(`htmlfile`)}catch{}var e,t;BQ=typeof document<`u`?document.domain&&PQ?zQ(PQ):((t=zZ(`iframe`)).style.display=`none`,FQ.appendChild(t),t.src=`javascript:`,(e=t.contentWindow.document).open(),e.write(RQ(`document.F=Object`)),e.close(),e.F):zQ(PQ);for(var n=yQ.length;n--;)delete BQ.prototype[yQ[n]];return BQ()};tQ[IQ]=!0;var VQ=Object.create||function(e,t){var n;return e===null?n=BQ():(LQ.prototype=UZ(e),n=new LQ,LQ.prototype=null,n[IQ]=e),t===void 0?n:pxe(n,t)},HQ=IZ(`unscopables`),UQ=Array.prototype;UQ[HQ]??GZ.f(UQ,HQ,{configurable:!0,value:VQ(null)});var WQ=function(e){UQ[HQ][e]=!0},mxe=gQ.includes;CQ({target:`Array`,proto:!0},{includes:function(e){return mxe(this,e,arguments.length>1?arguments[1]:void 0)}}),WQ(`includes`);var hxe={selector:`iframe,video,p`,preParseHtml:function(e){var t=q(e),n=t;if(MQ(t)===`p`){var r=t.children();if(r.length===1){var i=r[0],a=i.tagName.toLowerCase();[`iframe`,`video`].includes(a)&&(n=q(i))}}var o=MQ(n);if(o!==`iframe`&&o!==`video`||n.parent().attr(`data-w-e-type`)===`video`)return n[0];var s=q(`<div data-w-e-type="video" data-w-e-is-void></div>`);return s.append(n),s[0]}},GQ=iZ(iZ.bind),KQ=function(e,t){return wZ(e),t===void 0?e:GQ?GQ(e,t):function(){return e.apply(t,arguments)}},qQ=Array.isArray||function(e){return aZ(e)==`Array`},JQ=function(){},gxe=[],YQ=fZ(`Reflect`,`construct`),XQ=/^\s*(?:class|function)\b/,_xe=iZ(XQ.exec),vxe=!XQ.exec(JQ),ZQ=function(e){if(!uZ(e))return!1;try{return YQ(JQ,gxe,e),!0}catch{return!1}},QQ=!YQ||JX((function(){var e;return ZQ(ZQ.call)||!ZQ(Object)||!ZQ((function(){e=!0}))||e}))?function(e){if(!uZ(e))return!1;switch(EQ(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}return vxe||!!_xe(XQ,XZ(e))}:ZQ,yxe=IZ(`species`),$Q=Q.Array,bxe=function(e,t){return new(function(e){var t;return qQ(e)&&(t=e.constructor,(QQ(t)&&(t===$Q||qQ(t.prototype))||dZ(t)&&(t=t[yxe])===null)&&(t=void 0)),t===void 0?$Q:t}(e))(t===0?0:t)},e$=iZ([].push),t$=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,a=e==6,o=e==7,s=e==5||a;return function(c,l,u,d){for(var f,p,m=AZ(c),h=sZ(m),g=KQ(l,u),_=mQ(h),v=0,y=d||bxe,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:e$(b,f)}else switch(e){case 4:return!1;case 7:e$(b,f)}return a?-1:r||i?i:b}},n$={forEach:t$(0),map:t$(1),filter:t$(2),some:t$(3),every:t$(4),find:t$(5),findIndex:t$(6),filterReject:t$(7)},xxe=n$.find,r$=!0;`find`in[]&&[,].find((function(){r$=!1})),CQ({target:`Array`,proto:!0,forced:r$},{find:function(e){return xxe(this,e,arguments.length>1?arguments[1]:void 0)}}),WQ(`find`);var Sxe=TQ?{}.toString:function(){return`[object `+EQ(this)+`]`};function i$(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:``}]}}TQ||uQ(Object.prototype,`toString`,Sxe,{unsafe:!0});var a$,o$,Cxe={selector:`div[data-w-e-type="video"]`,parseElemHtml:function(e,t,n){var r=q(e),i=``,a=``,o=`auto`,s=`auto`,c=r.find(`iframe`);if(c.length>0)return o=c.attr(`width`)||`auto`,s=c.attr(`height`)||`auto`,i$(i=c[0].outerHTML,a,o,s);var l=r.find(`video`);return(i=l.attr(`src`)||``)||l.length>0&&(i=l.find(`source`).attr(`src`)||``),o=l.attr(`width`)||`auto`,s=l.attr(`height`)||`auto`,i$(i,a=l.attr(`poster`)||``,o,s)}},s$=function(){var e=UZ(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},c$=Q.RegExp,l$=JX((function(){var e=c$(`a`,`y`);return e.lastIndex=2,e.exec(`abcd`)!=null})),wxe=l$||JX((function(){return!c$(`a`,`y`).stic
|
|
|
|
|
|
`)&&e.flags===`s`)})),Oxe=Q.RegExp,kxe=JX((function(){var e=Oxe(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`})),Axe=oQ.get,jxe=kZ(`native-string-replace`,String.prototype.replace),u$=RegExp.prototype.exec,d$=u$,Mxe=iZ(``.charAt),Nxe=iZ(``.indexOf),Pxe=iZ(``.replace),f$=iZ(``.slice),p$=(o$=/b*/g,ZX(u$,a$=/a/,`a`),ZX(u$,o$,`a`),a$.lastIndex!==0||o$.lastIndex!==0),m$=Txe.BROKEN_CARET,h$=/()??/.exec(``)[1]!==void 0;(p$||h$||m$||Dxe||kxe)&&(d$=function(e){var t,n,r,i,a,o,s,c=this,l=Axe(c),u=DQ(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=ZX(d$,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=m$&&c.sticky,m=ZX(s$,c),h=c.source,g=0,_=u;if(p&&(m=Pxe(m,`y`,``),Nxe(m,`g`)===-1&&(m+=`g`),_=f$(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&Mxe(u,c.lastIndex-1)!==`
|
|
|
|
|
|
`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),h$&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),p$&&(r=c.lastIndex),i=ZX(u$,p?n:c,_),p?i?(i.input=f$(i.input,g),i[0]=f$(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:p$&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),h$&&i&&i.length>1&&ZX(jxe,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(i[a]=void 0)})),i&&f)for(i.groups=o=VQ(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var g$=d$;CQ({target:`RegExp`,proto:!0,forced:/./.exec!==g$},{exec:g$});var _$=Function.prototype,v$=_$.apply,Fxe=_$.bind,y$=_$.call,b$=typeof Reflect==`object`&&Reflect.apply||(Fxe?y$.bind(v$):function(){return y$.apply(v$,arguments)}),x$=(IZ(`species`),RegExp.prototype),Ixe=iZ(``.charAt),S$=iZ(``.charCodeAt),Lxe=iZ(``.slice),C$=function(e){return function(t,n){var r,i,a=DQ(cZ(t)),o=dQ(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=S$(a,o))<55296||r>56319||o+1===s||(i=S$(a,o+1))<56320||i>57343?e?Ixe(a,o):r:e?Lxe(a,o,o+2):i-56320+(r-55296<<10)+65536}},w$={codeAt:C$(!1),charAt:C$(!0)},Rxe=w$.charAt,zxe=function(e,t,n){return t+(n?Rxe(e,t).length:1)},Bxe=Math.floor,T$=iZ(``.charAt),Vxe=iZ(``.replace),E$=iZ(``.slice),Hxe=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Uxe=/\$([$&'`]|\d{1,2})/g,Wxe=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=Uxe;return i!==void 0&&(i=AZ(i),c=Hxe),Vxe(a,c,(function(a,c){var l;switch(T$(c,0)){case`$`:return`$`;case`&`:return e;case"`":return E$(t,0,n);case`'`:return E$(t,o);case`<`:l=i[E$(c,1,-1)];break;default:var u=+c;if(u===0)return a;if(u>s){var d=Bxe(u/10);return d===0?a:d<=s?r[d-1]===void 0?T$(c,1):r[d-1]+T$(c,1):a}l=r[u-1]}return l===void 0?``:l}))},Gxe=Q.TypeError,Kxe=function(e,t){var n=e.exec;if(uZ(n)){var r=ZX(n,e,t);return r!==null&&UZ(r),r}if(aZ(e)===`RegExp`)return ZX(g$,e,t);throw Gxe(`RegExp#exec called on incompatible receiver`)},D$=IZ(`replace`),qxe=Math.max,Jxe=Math.min,Yxe=iZ([].concat),O$=iZ([].push),k$=iZ(``.indexOf),A$=iZ(``.slice),Xxe=`a`.replace(/./,`$0`)===`$0`,j$=!!/./[D$]&&/./[D$](`a`,`$0`)===``;function M$(e){return e===void 0&&(e=`r`),e+`-`+lb()}(function(e,t,n,r){var i=IZ(e),a=!JX((function(){var t={};return t[i]=function(){return 7},``[e](t)!=7})),o=a&&!JX((function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},t[i](``),!e}));if(!a||!o||n){var s=iZ(/./[i]),c=function(e,t,n){var r=j$?`$`:`$0`;return[function(e,n){var r=cZ(this),i=e==null?void 0:TZ(e,D$);return i?ZX(i,e,r,n):ZX(t,DQ(r),e,n)},function(e,i){var a=UZ(this),o=DQ(e);if(typeof i==`string`&&k$(i,r)===-1&&k$(i,`$<`)===-1){var s=n(t,a,o,i);if(s.done)return s.value}var c=uZ(i);c||(i=DQ(i));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var d=[];;){var f=Kxe(a,o);if(f===null||(O$(d,f),!l))break;DQ(f[0])===``&&(a.lastIndex=zxe(o,pQ(a.lastIndex),u))}for(var p,m=``,h=0,g=0;g<d.length;g++){for(var _=DQ((f=d[g])[0]),v=qxe(Jxe(dQ(f.index),o.length),0),y=[],b=1;b<f.length;b++)O$(y,(p=f[b])===void 0?p:String(p));var x=f.groups;if(c){var S=Yxe([_],y,v,o);x!==void 0&&O$(S,x);var C=DQ(b$(i,void 0,S))}else C=Wxe(_,o,v,y,x,i);v>=h&&(m+=A$(o,h,v)+C,h=v+_.length)}return m+A$(o,h)}]}(0,``[e],(function(e,t,n,r,i){var o=iZ(e),c=t.exec;return c===g$||c===x$.exec?a&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}));uQ(String.prototype,e,c[0]),uQ(x$,i,c[1])}})(`replace`,0,!!JX((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:`7`},e},``.replace(e,`$<a>`)!==`7`}))||!Xxe||j$);var N$=Q.Promise,P$=function(e,t,n){for(var r in t)uQ(e,r,t[r],n);return e},Zxe=Q.String,Qxe=Q.TypeError,F$=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=iZ(Object.getOwnPropertyDescriptor(Object.prototype,`__proto__`).set))(n,[]),t=n instanceof Array}catch{}return function(n,r){return UZ(n),function(e){if(typeof e==`object`||uZ(e))return e;throw Qxe(`Can't set `+Zxe(e)+` as a prototype`)}(r),t?e(n,r):n.__proto__=r,n}}():void 0),$xe=GZ.f,I$=IZ(`toStringTag`),L$=function(e,t,n){e&&!jZ(e=n?e:e.prototype,I$)&&$xe(e,I$,{configurable:!0,value:t})},R$=IZ(`species`),eSe=Q.TypeError,z$=function(e,t){if(pZ(t,e))
|
|
|
|
|
|
`)&&e.flags===`s`)})),Twe=$.RegExp,Ewe=a2((function(){var e=Twe(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`})),Dwe=g4.get,Owe=z2(`native-string-replace`,String.prototype.replace),a3=RegExp.prototype.exec,o3=a3,kwe=h2(``.charAt),Awe=h2(``.indexOf),jwe=h2(``.replace),s3=h2(``.slice),c3=(r3=/b*/g,c2(a3,n3=/a/,`a`),c2(a3,r3,`a`),n3.lastIndex!==0||r3.lastIndex!==0),l3=Y4.BROKEN_CARET,u3=/()??/.exec(``)[1]!==void 0;(c3||u3||l3||wwe||Ewe)&&(o3=function(e){var t,n,r,i,a,o,s,c=this,l=Dwe(c),u=G4(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=c2(o3,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=l3&&c.sticky,m=c2(K4,c),h=c.source,g=0,_=u;if(p&&(m=jwe(m,`y`,``),Awe(m,`g`)===-1&&(m+=`g`),_=s3(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&kwe(u,c.lastIndex-1)!==`
|
|
|
|
|
|
`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),u3&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),c3&&(r=c.lastIndex),i=c2(a3,p?n:c,_),p?i?(i.input=s3(i.input,g),i[0]=s3(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:c3&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),u3&&i&&i.length>1&&c2(Owe,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(i[a]=void 0)})),i&&f)for(i.groups=o=i3(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var d3=o3;j4({target:`RegExp`,proto:!0,forced:/./.exec!==d3},{exec:d3});var f3=Function.prototype,p3=f3.apply,Mwe=f3.bind,m3=f3.call,h3=typeof Reflect==`object`&&Reflect.apply||(Mwe?m3.bind(p3):function(){return m3.apply(p3,arguments)}),Nwe=K2(`species`),g3=RegExp.prototype,Pwe=K2(`match`),Fwe=$.TypeError,Iwe=K2(`species`),_3=function(e,t){var n,r=$2(e).constructor;return r===void 0||(n=$2(r)[Iwe])==null?t:function(e){if(B4(e))return e;throw Fwe(P2(e)+` is not a constructor`)}(n)},Lwe=h2(``.charAt),v3=h2(``.charCodeAt),Rwe=h2(``.slice),y3=function(e){return function(t,n){var r,i,a=G4(y2(t)),o=x4(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=v3(a,o))<55296||r>56319||o+1===s||(i=v3(a,o+1))<56320||i>57343?e?Lwe(a,o):r:e?Rwe(a,o,o+2):i-56320+(r-55296<<10)+65536}},b3={codeAt:y3(!1),charAt:y3(!0)},zwe=b3.charAt,Bwe=function(e,t,n){return t+(n?zwe(e,t).length:1)},Vwe=$.Array,Hwe=Math.max,x3=function(e,t,n){for(var r=w4(e),i=S4(t,r),a=S4(n===void 0?r:n,r),o=Vwe(Hwe(a-i,0)),s=0;i<a;i++,s++)V4(o,s,e[i]);return o.length=s,o},Uwe=$.TypeError,S3=function(e,t){var n=e.exec;if(x2(n)){var r=c2(n,e,t);return r!==null&&$2(r),r}if(g2(e)===`RegExp`)return c2(d3,e,t);throw Uwe(`RegExp#exec called on incompatible receiver`)},C3=Y4.UNSUPPORTED_Y,Wwe=Math.min,w3=[].push,Gwe=h2(/./.exec),T3=h2(w3),E3=h2(``.slice);(function(e,t,n,r){var i=K2(e),a=!a2((function(){var t={};return t[i]=function(){return 7},``[e](t)!=7})),o=a&&!a2((function(){var e=!1,t=/a/;return(t={}).constructor={},t.constructor[Nwe]=function(){return t},t.flags=``,t[i]=/./[i],t.exec=function(){return e=!0,null},t[i](``),!e}));if(!a||!o||n){var s=h2(/./[i]),c=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(e,n){var r,i,a=G4(y2(this)),o=n===void 0?4294967295:n>>>0;if(o===0)return[];if(e===void 0)return[a];if(!S2(r=e)||!((i=r[Pwe])===void 0?g2(r)==`RegExp`:i))return c2(t,a,e,o);for(var s,c,l,u=[],d=(e.ignoreCase?`i`:``)+(e.multiline?`m`:``)+(e.unicode?`u`:``)+(e.sticky?`y`:``),f=0,p=new RegExp(e.source,d+`g`);(s=c2(d3,p,a))&&!((c=p.lastIndex)>f&&(T3(u,E3(a,f,s.index)),s.length>1&&s.index<a.length&&h3(w3,u,x3(s,1)),l=s[0].length,f=c,u.length>=o));)p.lastIndex===s.index&&p.lastIndex++;return f===a.length?!l&&Gwe(p,``)||T3(u,``):T3(u,E3(a,f)),u.length>o?x3(u,0,o):u}:`0`.split(void 0,0).length?function(e,n){return e===void 0&&n===0?[]:c2(t,this,e,n)}:t,[function(t,n){var i=y2(this),a=t==null?void 0:I2(t,e);return a?c2(a,t,i,n):c2(r,G4(i),t,n)},function(e,i){var a=$2(this),o=G4(e),s=n(r,a,o,i,r!==t);if(s.done)return s.value;var c=_3(a,RegExp),l=a.unicode,u=(a.ignoreCase?`i`:``)+(a.multiline?`m`:``)+(a.unicode?`u`:``)+(C3?`g`:`y`),d=new c(C3?`^(?:`+a.source+`)`:a,u),f=i===void 0?4294967295:i>>>0;if(f===0)return[];if(o.length===0)return S3(d,o)===null?[o]:[];for(var p=0,m=0,h=[];m<o.length;){d.lastIndex=C3?0:m;var g,_=S3(d,C3?E3(o,m):o);if(_===null||(g=Wwe(C4(d.lastIndex+(C3?m:0)),o.length))===p)m=Bwe(o,m,l);else{if(T3(h,E3(o,p,m)),h.length===f)return h;for(var v=1;v<=_.length-1;v++)if(T3(h,_[v]),h.length===f)return h;m=p=g}}return T3(h,E3(o,p)),h}]}(i,``[e],(function(e,t,n,r,i){var o=h2(e),c=t.exec;return c===d3||c===g3.exec?a&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}));b4(String.prototype,e,c[0]),b4(g3,i,c[1])}r&&n4(g3[i],`sham`,!0)})(`split`,0,!!a2((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`})),C3);var D3=function(
|
|
|
|
|
|
`)&&e.flags===`s`)})),vDe=d5.RegExp,yDe=j5((function(){var e=vDe(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`})),bDe=g7.get,xDe=m5(`native-string-replace`,String.prototype.replace),C9=RegExp.prototype.exec,w9=C9,SDe=v5(``.charAt),CDe=v5(``.indexOf),wDe=v5(``.replace),T9=v5(``.slice),E9=(S9=/b*/g,q5(C9,x9=/a/,`a`),q5(C9,S9,`a`),x9.lastIndex!==0||S9.lastIndex!==0),D9=h9.BROKEN_CARET,O9=/()??/.exec(``)[1]!==void 0;(E9||O9||D9||_De||yDe)&&(w9=function(e){var t,n,r,i,a,o,s,c=this,l=bDe(c),u=d9(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=q5(w9,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,p=D9&&c.sticky,m=q5(f9,c),h=c.source,g=0,_=u;if(p&&(m=wDe(m,`y`,``),CDe(m,`g`)===-1&&(m+=`g`),_=T9(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&SDe(u,c.lastIndex-1)!==`
|
|
|
|
|
|
`)&&(h=`(?: `+h+`)`,_=` `+_,g++),n=RegExp(`^(?:`+h+`)`,m)),O9&&(n=RegExp(`^`+h+`$(?!\\s)`,m)),E9&&(r=c.lastIndex),i=q5(C9,p?n:c,_),p?i?(i.input=T9(i.input,g),i[0]=T9(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:E9&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),O9&&i&&i.length>1&&q5(xDe,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)arguments[a]===void 0&&(i[a]=void 0)})),i&&f)for(i.groups=o=hDe(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var k9=w9;r9({target:`RegExp`,proto:!0,forced:/./.exec!==k9},{exec:k9});var A9=Function.prototype,j9=A9.apply,TDe=A9.bind,M9=A9.call,EDe=typeof Reflect==`object`&&Reflect.apply||(TDe?M9.bind(j9):function(){return M9.apply(j9,arguments)}),DDe=L5(`species`),N9=RegExp.prototype,ODe=L5(`match`),kDe=d5.TypeError,ADe=L5(`species`),jDe=v5(``.charAt),P9=v5(``.charCodeAt),MDe=v5(``.slice),NDe=function(e){return function(t,n){var r,i,a=d9(y5(t)),o=A7(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=P9(a,o))<55296||r>56319||o+1===s||(i=P9(a,o+1))<56320||i>57343?e?jDe(a,o):r:e?MDe(a,o,o+2):i-56320+(r-55296<<10)+65536}}(!0),PDe=function(e,t,n){return t+(n?NDe(e,t).length:1)},FDe=d5.Array,IDe=Math.max,F9=function(e,t,n){for(var r,i,a,o,s=M7(e),c=Z7(t,s),l=Z7(n===void 0?s:n,s),u=FDe(IDe(l-c,0)),d=0;c<l;c++,d++)r=u,i=d,a=e[c],(o=$5(i))in r?t7.f(r,o,n7(0,a)):r[o]=a;return u.length=d,u},LDe=d5.TypeError,I9=function(e,t){var n=e.exec;if(C5(n)){var r=q5(n,e,t);return r!==null&&G5(r),r}if(x7(e)===`RegExp`)return q5(k9,e,t);throw LDe(`RegExp#exec called on incompatible receiver`)},L9=h9.UNSUPPORTED_Y,RDe=Math.min,R9=[].push,zDe=v5(/./.exec),z9=v5(R9),B9=v5(``.slice);(function(e,t,n,r){var i=L5(e),a=!j5((function(){var t={};return t[i]=function(){return 7},``[e](t)!=7})),o=a&&!j5((function(){var e=!1,t=/a/;return(t={}).constructor={},t.constructor[DDe]=function(){return t},t.flags=``,t[i]=/./[i],t.exec=function(){return e=!0,null},t[i](``),!e}));if(!a||!o||n){var s=v5(/./[i]),c=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(e,n){var r,i,a=d9(y5(this)),o=n===void 0?4294967295:n>>>0;if(o===0)return[];if(e===void 0)return[a];if(!V5(r=e)||!((i=r[ODe])===void 0?x7(r)==`RegExp`:i))return q5(t,a,e,o);for(var s,c,l,u=[],d=(e.ignoreCase?`i`:``)+(e.multiline?`m`:``)+(e.unicode?`u`:``)+(e.sticky?`y`:``),f=0,p=new RegExp(e.source,d+`g`);(s=q5(k9,p,a))&&!((c=p.lastIndex)>f&&(z9(u,B9(a,f,s.index)),s.length>1&&s.index<a.length&&EDe(R9,u,F9(s,1)),l=s[0].length,f=c,u.length>=o));)p.lastIndex===s.index&&p.lastIndex++;return f===a.length?!l&&zDe(p,``)||z9(u,``):z9(u,B9(a,f)),u.length>o?F9(u,0,o):u}:`0`.split(void 0,0).length?function(e,n){return e===void 0&&n===0?[]:q5(t,this,e,n)}:t,[function(t,n){var i=y5(this),a=t==null?void 0:Q5(t,e);return a?q5(a,t,i,n):q5(r,d9(i),t,n)},function(e,i){var a=G5(this),o=d9(e),s=n(r,a,o,i,r!==t);if(s.done)return s.value;var c=function(e,t){var n,r=G5(e).constructor;return r===void 0||(n=G5(r)[ADe])==null?t:function(e){if(R7(e))return e;throw kDe(X5(e)+` is not a constructor`)}(n)}(a,RegExp),l=a.unicode,u=(a.ignoreCase?`i`:``)+(a.multiline?`m`:``)+(a.unicode?`u`:``)+(L9?`g`:`y`),d=new c(L9?`^(?:`+a.source+`)`:a,u),f=i===void 0?4294967295:i>>>0;if(f===0)return[];if(o.length===0)return I9(d,o)===null?[o]:[];for(var p=0,m=0,h=[];m<o.length;){d.lastIndex=L9?0:m;var g,_=I9(d,L9?B9(o,m):o);if(_===null||(g=RDe(j7(d.lastIndex+(L9?m:0)),o.length))===p)m=PDe(o,m,l);else{if(z9(h,B9(o,p,m)),h.length===f)return h;for(var v=1;v<=_.length-1;v++)if(z9(h,_[v]),h.length===f)return h;m=p=g}}return z9(h,B9(o,p)),h}]}(i,``[e],(function(e,t,n,r,i){var o=v5(e),c=t.exec;return c===k9||c===N9.exec?a&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}));b7(String.prototype,e,c[0]),b7(N9,i,c[1])}r&&r7(N9[i],`sham`,!0)})(`split`,0,!!j5((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`})),L9),r9({globa
|
|
|
|
|
|
Can not construct a instance`)}return e.setEditorConfig=function(e){e===void 0&&(e={}),this.editorConfig=W9(W9({},this.editorConfig),e)},e.setSimpleEditorConfig=function(e){e===void 0&&(e={}),this.simpleEditorConfig=W9(W9({},this.simpleEditorConfig),e)},e.setToolbarConfig=function(e){e===void 0&&(e={}),this.toolbarConfig=W9(W9({},this.toolbarConfig),e)},e.setSimpleToolbarConfig=function(e){e===void 0&&(e={}),this.simpleToolbarConfig=W9(W9({},this.simpleToolbarConfig),e)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerMenu=function(e,t){(function(e,t){var n=e.key,r=e.factory,i=e.config,a=CD(CD({},i),t||{});if($O[n]!=null)throw Error(`Duplicated key '`+n+`' in menu items`);$O[n]=r,function(e,t){t!=null&&(QO[e]=t)}(n,a)})(e,t)},e.registerRenderElem=function(e){(function(e){var t=e.type;Wj[t||``]=e.renderElem})(e)},e.registerRenderStyle=function(e){(function(e){Uj.push(e)})(e)},e.registerElemToHtml=function(e){(function(e){var t=e.type;dk[t||``]=e.elemToHtml})(e)},e.registerStyleToHtml=function(e){(function(e){uk.push(e)})(e)},e.registerPreParseHtml=function(e){(function(e){FA.push(e)})(e)},e.registerParseElemHtml=function(e){(function(e){var t=e.selector;LA[t]=e.parseElemHtml})(e)},e.registerParseStyleHtml=function(e){(function(e){IA.push(e)})(e)},e.registerModule=function(e){K9(e)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function K9(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,i=e.elemsToHtml,a=e.styleToHtml,o=e.preParseHtml,s=e.parseElemsHtml,c=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach((function(e){return G9.registerMenu(e)})),n&&n.forEach((function(e){return G9.registerRenderElem(e)})),r&&G9.registerRenderStyle(r),i&&i.forEach((function(e){return G9.registerElemToHtml(e)})),a&&G9.registerStyleToHtml(a),o&&o.forEach((function(e){return G9.registerPreParseHtml(e)})),s&&s.forEach((function(e){return G9.registerParseElemHtml(e)})),c&&G9.registerParseStyleHtml(c),l&&G9.registerPlugin(l)}JV.forEach((function(e){return K9(e)})),K9(z_e),K9(cbe),K9(hCe),K9(iEe),K9(GDe);var q9=`<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>`,J9={link:{menuKeys:[`editLink`,`unLink`,`viewLink`]},image:{menuKeys:[`imageWidth30`,`imageWidth50`,`imageWidth100`,`editImage`,`viewImageLink`,`deleteImage`]},pre:{menuKeys:[`enter`,`codeBlock`,`codeSelectLang`]},table:{menuKeys:[`enter`,`tableHeader`,`tableFullWidth`,`insertTableRow`,`deleteTableRow`,`insertTableCol`,`deleteTableCol`,`deleteTable`]},divider:{menuKeys:[`enter`]},video:{menuKeys:[`enter`,`editVideoSize`]}},JDe={hoverbarKeys:W9(W9({},J9),{text:{menuKeys:[`headerSelect`,`insertLink`,`bulletedList`,`|`,`bold`,`through`,`color`,`bgColor`,`clearStyle`]}})};G9.setEditorConfig(W9(W9({},JDe),{decorate:U9}));var YDe={hoverbarKeys:J9};G9.setSimpleEditorConfig(W9(W9({},YDe),{decorate:U9}));var XDe={toolbarKeys:[`headerSelect`,`blockquote`,`|`,`bold`,`underline`,`italic`,{key:`group-more-style`,title:Z(`editor.more`),iconSvg:`<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>`,menuKeys:[`through`,`code`,`sup`,`sub`,`clearStyle`]},`color`,`bgColor`,`|`,`fontSize`,`fontFamily`,`lineHeight`,`|`,`bulletedList`,`numberedList`,`todo`,{key:`group-justify`,title:Z(`editor.justify`),iconSvg:`<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>`,menuKeys:[`
|
|
|
|
|
|
Please use '@${e}' event instead of props`,t}var Q9=(e,t)=>{for(let[n,r]of t)e[n]=r;return e},sOe=le({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){let n=A(null),r=ne(null),i=A(``),a=()=>{if(!n.value)return;let a=we(e.defaultContent);QDe({selector:n.value,mode:e.mode,content:a||[],html:e.defaultHtml||e.modelValue||``,config:oOe(aOe({},e.defaultConfig),{onCreated(n){if(r.value=n,t.emit(`onCreated`,n),e.defaultConfig.onCreated){let e=Z9(`onCreated`);throw Error(e)}},onChange(n){let r=n.getHtml();if(i.value=r,t.emit(`update:modelValue`,r),t.emit(`onChange`,n),e.defaultConfig.onChange){let e=Z9(`onChange`);throw Error(e)}},onDestroyed(n){if(t.emit(`onDestroyed`,n),e.defaultConfig.onDestroyed){let e=Z9(`onDestroyed`);throw Error(e)}},onMaxLength(n){if(t.emit(`onMaxLength`,n),e.defaultConfig.onMaxLength){let e=Z9(`onMaxLength`);throw Error(e)}},onFocus(n){if(t.emit(`onFocus`,n),e.defaultConfig.onFocus){let e=Z9(`onFocus`);throw Error(e)}},onBlur(n){if(t.emit(`onBlur`,n),e.defaultConfig.onBlur){let e=Z9(`onBlur`);throw Error(e)}},customAlert(n,r){if(t.emit(`customAlert`,n,r),e.defaultConfig.customAlert){let e=Z9(`customAlert`);throw Error(e)}},customPaste:(n,r)=>{if(e.defaultConfig.customPaste){let e=Z9(`customPaste`);throw Error(e)}let i;return t.emit(`customPaste`,n,r,e=>{i=e}),i}})})};function o(e){r.value?.setHtml(e)}return C(()=>{a()}),M(()=>e.modelValue,e=>{e!==i.value&&o(e)}),{box:n}}}),cOe={ref:`box`,style:{height:`100%`}};function lOe(e,t,n,r,i,a){return P(),y(`div`,cOe,null,512)}var uOe=Q9(sOe,[[`render`,lOe]]),dOe=le({props:{editor:{type:Object},mode:{type:String,default:`default`},defaultConfig:{type:Object,default:{}}},setup(e){let t=A(null),n=n=>{if(t.value){if(n==null)throw Error(`Not found instance of Editor when create <Toolbar/> component`);X.getToolbar(n)||$De({editor:n,selector:t.value||`<div></div>`,mode:e.mode,config:e.defaultConfig})}};return ge(()=>{let{editor:t}=e;t!=null&&n(t)}),{selector:t}}}),fOe={ref:`selector`};function pOe(e,t,n,r,i,a){return P(),y(`div`,fOe,null,512)}var mOe=Q9(dOe,[[`render`,pOe]]),hOe={class:`pledge-rich-editor`},gOe={class:`pledge-rich-editor__color-bar`},_Oe=[`value`],vOe=[`onKeydown`],$9=ke(le({__name:`PledgeRichTextEditor`,props:{modelValue:{default:``}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=ne(void 0),o=A(n.modelValue||``),s=A(`#109bd3`),c=[`#000000`,`#333333`,`#666666`,`#999999`,`#109bd3`,`#087db4`,`#c20f18`,`#d94e1f`,`#e8a317`,`#2e7d32`,`#1565c0`,`#6a1b9a`,`#ffffff`];M(()=>n.modelValue,e=>{let t=e||``;if(t===o.value)return;o.value=t;let n=i.value;n!=null&&n.getHtml()!==t&&n.setHtml(t||`<p><br></p>`)}),M(o,e=>{r(`update:modelValue`,e)});let l={excludeKeys:[`uploadImage`,`group-video`,`emotion`]},u={placeholder:`编辑参赛承诺书正文,保存后选手端签署弹窗将展示此处内容…`,MENU_CONF:{color:{colors:c},bgColor:{colors:c}}};function d(e){i.value=e}function f(e){let t=e.trim(),n=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.exec(t);if(!n)return null;let r=n[1];return r.length===3&&(r=r.split(``).map(e=>e+e).join(``)),`#${r.toLowerCase()}`}function m(e){let t=i.value;if(t==null)return;let n=f(e);n&&(s.value=n,t.focus(),t.addMark(`color`,n))}function h(e){let t=e.target;m(t.value)}function g(){let e=f(s.value);e&&m(e)}return x(()=>{let e=i.value;e!=null&&(e.destroy(),i.value=void 0)}),(e,t)=>(P(),y(`div`,hOe,[p(a(mOe),{class:`pledge-rich-editor__toolbar`,editor:i.value,"default-config":l,mode:`default`},null,8,[`editor`]),v(`div`,gOe,[t[2]||=v(`span`,{class:`pledge-rich-editor__color-label`},`自定义文字颜色`,-1),v(`input`,{class:`pledge-rich-editor__color-picker`,type:`color`,value:f(s.value)||`#109bd3`,title:`取色器`,onInput:h},null,40,_Oe),ie(v(`input`,{"onUpdate:modelValue":t[0]||=e=>s.value=e,class:`pledge-rich-editor__color-hex`,type:`text`,maxlength:`7`,placeholder:`#109bd3`,spellcheck:`false`,onKeydown:fe(oe(g,[`prevent`]),[`enter`])},null,40,vOe),[[ae,s.value]]),v(
|
|
|
|
|
|
`)},ce.value=t.settings&&typeof t.settings==`object`&&!Array.isArray(t.settings)?{...t.settings}:{},S.value=Ke(t.branding_json),w.value=We(t.branding_json),_n(t),await An(),Nt.value===`channels`&&await Mn(),Nt.value===`applications`&&await Wn(),Nt.value===`signupForm`&&(await mn(),await gr(`signup`)),Nt.value===`audienceForm`&&(await gn(),await gr(`audience`)),Nt.value===`review`&&await hn()}catch(e){b.value=null,I.error(e instanceof Error?e.message:`加载赛事详情失败`)}}M(()=>[s.fullPath,u.value],()=>{Cn()});function wn(){let e=He(S.value,w.value);return{slug:x.value.slug.trim(),name:x.value.name.trim(),description:x.value.description.trim()||null,status:x.value.status,published:x.value.published,signup_open_at:pn(x.value.signup_open_at),signup_close_at:pn(x.value.signup_close_at),branding_json:e??null,pledge_title:x.value.pledge_title?.trim()?x.value.pledge_title.trim():null,pledge_title_en:x.value.pledge_title_en?.trim()?x.value.pledge_title_en.trim():null,pledge_subtitle:x.value.pledge_subtitle?.trim()?x.value.pledge_subtitle.trim():null,pledge_subtitle_en:x.value.pledge_subtitle_en?.trim()?x.value.pledge_subtitle_en.trim():null,pledge_content_html:x.value.pledge_content_html?.trim()?x.value.pledge_content_html:null,pledge_content_html_en:x.value.pledge_content_html_en?.trim()?x.value.pledge_content_html_en:null,settings:on()}}async function Tn(){Mt.value=!0;try{let e=wn();if(!e.slug||!e.name){I.warning(`请填写赛事名称和访问地址`);return}if(x.value.success_notice_enabled&&!x.value.success_notice_message.trim()){I.warning(`请填写报名成功提示语,或关闭该提示`);return}if(!x.value.review_portal_enabled&&!x.value.review_portal_message.trim()){I.warning(`关闭评审后,请填写评审端说明文字`);return}if(x.value.post_close_file_edit_enabled){let e=an(x.value.post_close_file_edit_mobiles);if(e.length===0){I.warning(`开启截止后补传附件后,请至少填写一个登录手机号`);return}let t=e.find(e=>!/^1[3-9]\d{9}$/.test(e));if(t){I.warning(`手机号格式无效:${t}`);return}}if(s.name===`admin-competition-new`){let t=await Re(e);g.value=t.id,c.selectCompetition(t.id),await o.replace({name:`admin-competition-workspace`}),await Cn(),I.success(`已创建,请在本页顶部标签切换「赛道 / 报名表」等模块继续配置`);return}g.value?(await Pe(g.value,e),I.success(`已保存`),await Cn()):I.warning(`无法保存:请先选择一场赛事,或从「新建赛事」进入后再试`)}catch(e){I.error(e instanceof Error?e.message:`保存失败`)}finally{Mt.value=!1}}function En(e){if(!g.value){I.warning(`请先保存赛事基础信息`);return}St.value=e?.id??null;let t=e?.scoring_sheet_json,n=t&&Array.isArray(t.items)&&t.items.length?t.items.map((e,t)=>({key:String(e.key??``),sort:Number(e.sort)||t+1,category:String(e.category??``),title:String(e.title??``),criteria:String(e.criteria??``),max_score:Number(e.max_score)||0})):[wt(1)];Ct.value=e?{track_code:e.track_code,title:e.title,title_en:e.title_en??``,description:e.description??``,description_en:e.description_en??``,sort:e.sort,is_enabled:e.is_enabled,scoring_sheet_title:String(t?.title??``),scoring_items:n}:{track_code:``,title:``,title_en:``,description:``,description_en:``,sort:(le.value[le.value.length-1]?.sort??0)+10,is_enabled:!0,scoring_sheet_title:``,scoring_items:[wt(1)]},bt.value=!0}function Dn(){let e=(Ct.value.scoring_items[Ct.value.scoring_items.length-1]?.sort??0)+1;Ct.value.scoring_items=[...Ct.value.scoring_items,wt(e)]}function On(e){if(Ct.value.scoring_items.length<=1){Ct.value.scoring_items=[wt(1)];return}Ct.value.scoring_items=Ct.value.scoring_items.filter((t,n)=>n!==e)}function kn(){Ct.value.scoring_sheet_title=``,Ct.value.scoring_items=[]}async function An(){let e=g.value;if(!e){le.value=[];return}ue.value=!0;try{le.value=await Le(e)}finally{ue.value=!1}}async function jn(){let e=g.value;if(!e)return;let t={track_code:Ct.value.track_code.trim(),title:Ct.value.title.trim(),title_en:Ct.value.title_en.trim()||null,description:Ct.value.description.trim()||null,description_en:Ct.value
|
|
|
|
|
|
13800138000
|
|
|
|
|
|
13900139000`},null,8,[`modelValue`])):Se(``,!0)]),_:1})]),_:1}),p(C,{xs:24,sm:12,md:8},{default:F(()=>[p(u,{label:`状态`},{default:F(()=>[p(ce,{modelValue:x.value.status,"onUpdate:modelValue":i[16]||=e=>x.value.status=e,class:`w-100`},{default:F(()=>[p(M,{label:`草稿`,value:`draft`}),p(M,{label:`已发布`,value:`published`}),p(M,{label:`报名进行中`,value:`signup_open`}),p(M,{label:`报名已截止`,value:`signup_closed`}),p(M,{label:`评审中`,value:`reviewing`}),p(M,{label:`已结束`,value:`ended`})]),_:1},8,[`modelValue`])]),_:1})]),_:1}),p(C,{xs:24,sm:12,md:8},{default:F(()=>[p(u,{label:`对外展示`},{default:F(()=>[p(Ce,{modelValue:x.value.published,"onUpdate:modelValue":i[17]||=e=>x.value.published=e},{default:F(()=>[...i[119]||=[r(`在选手端展示`,-1)]]),_:1},8,[`modelValue`])]),_:1})]),_:1}),p(C,{xs:24,md:12},{default:F(()=>[p(u,{label:`报名开始`},{default:F(()=>[p(Te,{modelValue:x.value.signup_open_at,"onUpdate:modelValue":i[18]||=e=>x.value.signup_open_at=e,type:`datetime`,placeholder:`选择报名开始时间`,format:`YYYY-MM-DD HH:mm`,"value-format":`YYYY-MM-DD HH:mm:ss`,class:`w-100`,clearable:``},null,8,[`modelValue`])]),_:1})]),_:1}),p(C,{xs:24,md:12},{default:F(()=>[p(u,{label:`报名截止`},{default:F(()=>[p(Te,{modelValue:x.value.signup_close_at,"onUpdate:modelValue":i[19]||=e=>x.value.signup_close_at=e,type:`datetime`,placeholder:`选择报名截止时间`,format:`YYYY-MM-DD HH:mm`,"value-format":`YYYY-MM-DD HH:mm:ss`,class:`w-100`,clearable:``},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1}),p(u,null,{default:F(()=>[p(s,{"native-type":`button`,type:`primary`,loading:Mt.value,onClick:Tn},{default:F(()=>[r(N(Mt.value?`保存中…`:`保存基础信息`),1)]),_:1},8,[`loading`])]),_:1})]),_:1})]),_:1}),m()?Se(``,!0):(P(),n(I,{key:0,label:`赛道管理`,name:`tracks`,lazy:``},{default:F(()=>[ie((P(),y(`div`,AOe,[v(`div`,jOe,[i[121]||=v(`p`,{class:`form-hint pane-toolbar-tip`},` 维护本场主题赛道与打分表(满分 100)。未配置打分表的赛道禁止评审。新建赛事请先保存基础信息。 `,-1),p(s,{type:`primary`,onClick:i[20]||=e=>En()},{default:F(()=>[...i[120]||=[r(`新增赛道`,-1)]]),_:1})]),p(Ae,{data:le.value,stripe:``,border:``,"empty-text":`暂无赛道`,class:`workspace-table`},{default:F(()=>[p(L,{prop:`track_code`,label:`赛道编码`,"min-width":`120`}),p(L,{prop:`title`,label:`标题`,"min-width":`140`}),p(L,{prop:`description`,label:`简介`,"min-width":`180`,"show-overflow-tooltip":``},{default:F(({row:e})=>[v(`span`,MOe,N(e.description||`—`),1)]),_:1}),p(L,{label:`打分表`,width:`100`},{default:F(({row:e})=>[p(Oe,{type:e.scoring_sheet_configured?`success`:`danger`,effect:`plain`,size:`small`},{default:F(()=>[r(N(e.scoring_sheet_configured?`已配置`:`未配置`),1)]),_:2},1032,[`type`])]),_:1}),p(L,{prop:`sort`,label:`排序`,width:`80`}),p(L,{label:`启用`,width:`80`},{default:F(({row:e})=>[r(N(e.is_enabled?`是`:`否`),1)]),_:1}),p(L,{label:`操作`,width:`140`,fixed:`right`,align:`right`},{default:F(({row:e})=>[p(s,{link:``,type:`primary`,size:`small`,onClick:t=>En(e)},{default:F(()=>[...i[122]||=[r(`编辑`,-1)]]),_:1},8,[`onClick`]),p(s,{link:``,type:`danger`,size:`small`,onClick:t=>sr(e)},{default:F(()=>[...i[123]||=[r(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`])])),[[Ge,ue.value]])]),_:1})),m()?Se(``,!0):(P(),n(I,{key:1,label:`观众场次`,name:`audienceSessions`,lazy:``},{default:F(()=>[g.value?(P(),n(lt,{key:0,"competition-id":g.value},null,8,[`competition-id`])):Se(``,!0)]),_:1})),m()?Se(``,!0):(P(),n(I,{key:2,label:`观众报名`,name:`audienceRegistrations`,lazy:``},{default:F(()=>[g.value?(P(),n(eee,{key:0,"competition-id":g.value},null,8,[`competition-id`])):Se(``,!0)]),_:1})),m()?Se(``,!0):(P(),n(I,{key:3,label:`赛事管理员`,name:`competitionAdmins`,lazy:``},{default:F(()=>[g.value?(P(),n(COe,{key:0,"competition-id":g.value},null,8,[`competition-id`])):Se(``,!0)]),_:1})),m()?Se(``,!0):(P(),n(I,{key:4,label:`渠道管理`,name:`channels`,lazy:``},{default:F(()=>[ie((P(),y(`div`,NOe,[v(`div`,POe,[i[1
|