iedc-go/tpt/js/chunk-642e42d4.a0548030.js
2022-10-31 03:27:23 +08:00

2 lines
12 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-642e42d4"],{"1da1":function(t,e,r){"use strict";r.d(e,"a",function(){return n});r("d3b7");function u(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function n(c){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=c.apply(t,a);function o(t){u(n,e,r,o,i,"next",t)}function i(t){u(n,e,r,o,i,"throw",t)}o(void 0)})}}},2532:function(t,e,r){"use strict";var n=r("23e7"),o=r("5a34"),i=r("1d80"),a=r("577e");n({target:"String",proto:!0,forced:!r("ab13")("includes")},{includes:function(t){return!!~a(i(this)).indexOf(a(o(t)),1<arguments.length?arguments[1]:void 0)}})},"44e7":function(t,e,r){var n=r("861d"),o=r("c6b6"),i=r("b622")("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},"4e15":function(t,e,r){"use strict";r.d(e,"a",function(){return o}),r.d(e,"b",function(){return i});var u=r("f2bf"),l=r("cb23"),n=Object.defineProperty,f=Object.defineProperties,s=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;function g(t){var e=`请使用 '@${t}' 事件,不要放在 props 中`;return e+=`
Please use '@${t}' event instead of props`}e=(t,e)=>{for(var[r,n]of e)t[r]=n;return t},r=Object(u.t)({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(o,i){const e=Object(u.Q)(null),a=Object(u.X)(null),c=Object(u.Q)(""),t=()=>{var t;e.value&&(t=Object(u.ab)(o.defaultContent),Object(l.createEditor)({selector:e.value,mode:o.mode,content:t||[],html:o.defaultHtml||o.modelValue||"",config:(t=((t,e)=>{for(var r in e=e||{})d.call(e,r)&&y(t,r,e[r]);if(h)for(var r of h(e))p.call(e,r)&&y(t,r,e[r]);return t})({},o.defaultConfig),f(t,s({onCreated(t){if(a.value=t,i.emit("onCreated",t),o.defaultConfig.onCreated)throw t=g("onCreated"),new Error(t)},onChange(t){var e=t.getHtml();if(c.value=e,i.emit("update:modelValue",e),i.emit("onChange",t),o.defaultConfig.onChange)throw e=g("onChange"),new Error(e)},onDestroyed(t){if(i.emit("onDestroyed",t),o.defaultConfig.onDestroyed)throw t=g("onDestroyed"),new Error(t)},onMaxLength(t){if(i.emit("onMaxLength",t),o.defaultConfig.onMaxLength)throw t=g("onMaxLength"),new Error(t)},onFocus(t){if(i.emit("onFocus",t),o.defaultConfig.onFocus)throw t=g("onFocus"),new Error(t)},onBlur(t){if(i.emit("onBlur",t),o.defaultConfig.onBlur)throw t=g("onBlur"),new Error(t)},customAlert(t,e){if(i.emit("customAlert",t,e),o.defaultConfig.customAlert)throw t=g("customAlert"),new Error(t)},customPaste:(t,e)=>{var r;if(o.defaultConfig.customPaste)throw r=g("customPaste"),new Error(r);let n;return i.emit("customPaste",t,e,t=>{n=t}),n}})))}))};return Object(u.I)(()=>{t()}),Object(u.ib)(()=>o.modelValue,t=>{if(t!==c.value){const o=a.value;if(null!=o){var e=o.isDisabled(),r=o.isFocused(),n=JSON.stringify(o.selection);if(o.enable(),o.focus(),o.select([]),o.deleteFragment(),l.SlateTransforms.setNodes(o,{type:"paragraph"},{mode:"highest"}),o.dangerouslyInsertHtml(t),!r)return void(o.deselect(),o.blur());if(e)return void(o.deselect(),o.disable());try{o.select(JSON.parse(n))}catch(t){o.select(l.SlateEditor.start(o,[]))}}}}),{box:e}}});const a={ref:"box",style:{height:"100%"}};var o=e(r,[["render",function(t,e,r,n,o,i){return Object(u.L)(),Object(u.n)("div",a,null,512)}]]),r=Object(u.t)({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(e){const r=Object(u.Q)(null);return Object(u.jb)(()=>{var t=e["editor"];if(null!=t)if(r.value){if(null==t)throw new Error("Not found instance of Editor when create <Toolbar/> component");l.DomEditor.getToolbar(t)||Object(l.createToolbar)({editor:t,selector:r.value||"<div></div>",mode:e.mode,config:e.defaultConfig})}}),{selector:r}}});const c={ref:"selector"};var i=e(r,[["render",function(t,e,r,n,o,i){return Object(u.L)(),Object(u.n)("div",c,null,512)}]])},"560e":function(t,e,r){},"5a34":function(t,e,r){var n=r("44e7");t.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},"96cf":function(e,t,r){e=function(a){"use strict";var u,t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o,i,a,c,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),n=new L(n||[]);return e._invoke=(o=t,i=r,a=n,c=s,function(t,e){if(c===d)throw new Error("Generator is already running");if(c===p){if("throw"===t)throw e;return P()}for(a.method=t,a.arg=e;;){var r=a.delegate;if(r){r=function t(e,r){var n=e.iterator[r.method];if(n===u){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=u,t(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}n=f(n,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,y;n=n.arg;if(!n)return r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y;{if(!n.done)return n;r[e.resultName]=n.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=u)}r.delegate=null;return y}(r,a);if(r){if(r===y)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(c===s)throw c=p,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c=d;r=f(o,i,a);if("normal"===r.type){if(c=a.done?p:h,r.arg!==y)return{value:r.arg,done:a.done}}else"throw"===r.type&&(c=p,a.method="throw",a.arg=r.arg)}}),e}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=c;var s="suspendedStart",h="suspendedYield",d="executing",p="completed",y={};function g(){}function v(){}function m(){}var e={},b=(i(e,n,function(){return this}),Object.getPrototypeOf),b=b&&b(b(C([]))),w=(b&&b!==t&&l.call(b,n)&&(e=b),m.prototype=g.prototype=Object.create(e));function x(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function O(a,c){var e;this._invoke=function(r,n){function t(){return new c(function(t,e){!function e(t,r,n,o){var i,t=f(a[t],a,r);if("throw"!==t.type)return(r=(i=t.arg).value)&&"object"==typeof r&&l.call(r,"__await")?c.resolve(r.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):c.resolve(r).then(function(t){i.value=t,n(i)},function(t){return e("throw",t,n,o)});o(t.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(e){if(e){var r,t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(t=function t(){for(;++r<e.length;)if(l.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=u,t.done=!0,t}).next=t}return{next:P}}function P(){return{value:u,done:!0}}return i(w,"constructor",v.prototype=m),i(m,"constructor",v),v.displayName=i(m,o,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,i(t,o,"GeneratorFunction")),t.prototype=Object.create(w),t},a.awrap=function(t){return{__await:t}},x(O.prototype),i(O.prototype,r,function(){return this}),a.AsyncIterator=O,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new O(c(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},x(w),i(w,o,"Generator"),i(w,n,function(){return this}),i(w,"toString",function(){return"[object Generator]"}),a.keys=function(r){var t,n=[];for(t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=C,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=u)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=u),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=l.call(o,"catchLoc"),c=l.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&l.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,j(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=u),y}},a}(e.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},a434:function(t,e,r){"use strict";var n=r("23e7"),s=r("23cb"),h=r("a691"),d=r("50c4"),p=r("7b0b"),y=r("65f0"),g=r("8418"),r=r("1dde")("splice"),v=Math.max,m=Math.min;n({target:"Array",proto:!0,forced:!r},{splice:function(t,e){var r,n,o,i,a,c,u=p(this),l=d(u.length),f=s(t,l),t=arguments.length;if(0===t?r=n=0:n=1===t?(r=0,l-f):(r=t-2,m(v(h(e),0),l-f)),9007199254740991<l+r-n)throw TypeError("Maximum allowed length exceeded");for(o=y(u,n),i=0;i<n;i++)(a=f+i)in u&&g(o,i,u[a]);if(r<(o.length=n)){for(i=f;i<l-n;i++)c=i+r,(a=i+n)in u?u[c]=u[a]:delete u[c];for(i=l;l-n+r<i;i--)delete u[i-1]}else if(n<r)for(i=l-n;f<i;i--)c=i+r-1,(a=i+n-1)in u?u[c]=u[a]:delete u[c];for(i=0;i<r;i++)u[i+f]=arguments[i+2];return u.length=l-n+r,o}})},ab13:function(t,e,r){var n=r("b622")("match");t.exports=function(e){var r=/./;try{"/./"[e](r)}catch(t){try{return r[n]=!1,"/./"[e](r)}catch(t){}}return!1}},c740:function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").findIndex,r=r("44d2"),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),n({target:"Array",proto:!0,forced:a},{findIndex:function(t){return o(this,t,1<arguments.length?arguments[1]:void 0)}}),r(i)},caad:function(t,e,r){"use strict";var n=r("23e7"),o=r("4d64").includes,r=r("44d2");n({target:"Array",proto:!0},{includes:function(t){return o(this,t,1<arguments.length?arguments[1]:void 0)}}),r("includes")},d81d:function(t,e,r){"use strict";var n=r("23e7"),o=r("b727").map;n({target:"Array",proto:!0,forced:!r("1dde")("map")},{map:function(t){return o(this,t,1<arguments.length?arguments[1]:void 0)}})}}]);