Files
safePower/dist/assets/087AC4D233B64EB0index.Dl6UL_p0.js
xiaozhiyong 9c5961efe9 更新
2026-04-29 09:15:49 +08:00

60 lines
1.2 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*!
Build based on gin-vue-admin
Time : 1776662816000 */
import{ab as e,g as t,i as n,o as i,w as o,c as r,N as a,F as l,J as s,cs as c,cY as u,G as d,H as f,r as p,a1 as h,cp as m,cq as g,v,f as _,a as b,a2 as y,bP as x,ac as w,ad as A,ae as k,aw as C,af as S,q as E,I as T,cD as R,a8 as O,b as M,al as D,E as N,x as I,ag as L,d as F,n as P,a3 as B,t as j,h as V,ay as z,K as H,bU as U,cu as W,c9 as Y,m as G,ao as $,bH as q,T as Q}from"./087AC4D233B64EB0index.D-00lXMX.js";
/*!
* @form-create/element-ui v3.2.37
* (c) 2018-2026 xaboy
* Github https://github.com/xaboy/form-create
* Released under the MIT License.
*/function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach(function(t){Z(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ne(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,i=ee(e);if(t){var o=ee(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return ne(this,n)}}function oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var i,o,r=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return r}(e,t)||ae(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(e){return function(e){if(Array.isArray(e))return le(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ae(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ae(e,t){if(e){if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,t):void 0}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function se(e,t){return Object.keys(e).reduce(function(n,i){return t&&-1!==t.indexOf(i)||(n[i]=e[i]),n},{})}function ce(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}var ue=e({name:"fcCheckbox",inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:Array,default:function(){return[]}},type:String,options:Array,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup:function(e,n){var i=u(e.formCreateInject,"options",[]),o=u(e,"options"),r=u(e,"modelValue"),a=u(e,"inputValue",""),l=b(a.value),s=u(e,"input",!1),c=function(e){var t=re(ce(r.value)),n=t.indexOf(l.value);l.value=e,n>-1&&(t.splice(n,1),t.push(e),p(t))};h(a,function(e){s.value?c(e):l.value=e});var f=d(function(){var e=i.value||[];return o.value&&(e=o.value||[]),Array.isArray(e)?e:[]});h(r,function(e){var t=null;if(!a.value&&null!=e&&Array.isArray(e)&&e.length>0&&s.value){var n=f.value.map(function(e){return e.value});e.forEach(function(e){-1===n.indexOf(e)&&(t=e)})}null!=t&&(l.value=t)},{immediate:!0});var p=function(e){n.emit("update:modelValue",e)};return{options:f,value:r,onInput:p,updateCustomValue:c,makeInput:function(e){if(s.value)return _(e,{value:l.value||void 0,label:l.value||void 0},{default:function(){return[_(t("ElInput"),{size:"small",modelValue:l.value,"onUpdate:modelValue":c},null)]}})}}},render:function(){var e,n,i=this,o="button"===this.type?"ElCheckboxButton":"ElCheckbox",r=t(o);return _(t("ElCheckboxGroup"),c(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),X({default:function(){return[i.options.map(function(e,t){var n=X({},e),i=n.value,a=n.label;return delete n.value,delete n.label,_(r,c(n,{label:i,value:i,key:o+t+"-"+i}),{default:function(){return[a||i||""]}})}),null===(e=(n=i.$slots).default)||void 0===e?void 0:e.call(n),i.makeInput(r)]}},se(this.$slots,["default"])))},mounted:function(){this.$emit("fc.el",this.$refs.el)}});function de(e){e=e||new Map;var t={$on:function(t,n){var i=e.get(t);i&&i.push(n)||e.set(t,[n])},$once:function(e,n){n._once=!0,t.$on(e,n)},$off:function(t,n){var i=e.get(t);i&&i.splice(i.indexOf(n)>>>0,1)},$emit:function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];(e.get(n)||[]).slice().map(function(e){e._once&&(t.$off(n,e),delete e._once),e.apply(void 0,o)}),(e.get("*")||[]).slice().map(function(e){e(n,o)})}};return t}function fe(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}fe("._fc-frame ._fc-files img{display:inline-block;height:100%;vertical-align:top;width:100%}._fc-frame ._fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame._fc-disabled ._fc-upload-btn,._fc-frame._fc-disabled .el-button{color:#999;cursor:not-allowed!important}._fc-frame ._fc-upload-cover{background:rgba(0,0,0,.6);bottom:0;left:0;opacity:0;position:absolute;right:0;top:0;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-frame ._fc-upload-cover i{color:#fff;cursor:pointer;font-size:20px;margin:0 2px}._fc-frame ._fc-files:hover ._fc-upload-cover{opacity:1}._fc-frame .el-upload{display:block}._fc-frame ._fc-upload-icon{cursor:pointer}._fc-files,._fc-frame ._fc-upload-btn{background:#fff;border:1px solid #c0ccda;border-radius:4px;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px rgba(0,0,0,.1);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;height:58px;line-height:58px;margin-right:4px;overflow:hidden;position:relative;text-align:center;width:58px}");var pe={name:"IconCircleClose"},he={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},me=[M("path",{fill:"currentColor",d:"M466.752 512l-90.496-90.496a32 32 0 0145.248-45.248L512 466.752l90.496-90.496a32 32 0 1145.248 45.248L557.248 512l90.496 90.496a32 32 0 11-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 01-45.248-45.248L466.752 512z"},null,-1),M("path",{fill:"currentColor",d:"M512 896a384 384 0 100-768 384 384 0 000 768zm0 64a448 448 0 110-896 448 448 0 010 896z"},null,-1)];pe.render=function(e,t,n,o,a,l){return i(),r("svg",he,me)};var ge={name:"IconDocument"},ve={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},_e=[M("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 01-32 32H160a32 32 0 01-32-32V96a32 32 0 0132-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"},null,-1)];ge.render=function(e,t,n,o,a,l){return i(),r("svg",ve,_e)};var be={name:"IconDelete"},ye={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},xe=[M("path",{fill:"currentColor",d:"M160 256H96a32 32 0 010-64h256V95.936a32 32 0 0132-32h256a32 32 0 0132 32V192h256a32 32 0 110 64h-64v672a32 32 0 01-32 32H192a32 32 0 01-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32zm192 0a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32z"},null,-1)];be.render=function(e,t,n,o,a,l){return i(),r("svg",ye,xe)};var we={name:"IconView"},Ae={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},ke=[M("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352zm0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 110 448 224 224 0 010-448zm0 64a160.192 160.192 0 00-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"},null,-1)];we.render=function(e,t,n,o,a,l){return i(),r("svg",Ae,ke)};var Ce={name:"IconFolderOpened"},Se={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Ee=[M("path",{fill:"currentColor",d:"M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 01216.96 384H832zm-24.96 512H96a32 32 0 01-32-32V160a32 32 0 0132-32h287.872l128.384 128H864a32 32 0 0132 32v96h23.04a32 32 0 0131.04 39.744l-112 448A32 32 0 01807.04 896z"},null,-1)];Ce.render=function(e,t,n,o,a,l){return i(),r("svg",Se,Ee)};var Te=e({name:"fcFrame",props:{type:{type:String,default:"input"},field:String,helper:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},src:{type:String,required:!0},icon:{type:String,default:"IconFolderOpened"},width:{type:String,default:"500px"},height:{type:String,default:"370px"},maxLength:{type:Number,default:0},okBtnText:{type:String,default:""},closeBtnText:{type:String,default:""},modalTitle:String,handleIcon:{type:[String,Boolean],default:void 0},title:String,allowRemove:{type:Boolean,default:!0},onOpen:{type:Function,default:function(){}},onOk:{type:Function,default:function(){}},onCancel:{type:Function,default:function(){}},onLoad:{type:Function,default:function(){}},onBeforeRemove:{type:Function,default:function(){}},onRemove:{type:Function,default:function(){}},onHandle:Function,modal:{type:Object,default:function(){return{}}},srcKey:[String,Number],modelValue:[Array,String,Number,Object],previewMask:void 0,footer:{type:Boolean,default:!0},reload:{type:Boolean,default:!0},closeBtn:{type:Boolean,default:!0},okBtn:{type:Boolean,default:!0},formCreateInject:Object},emits:["update:modelValue","change"],components:{IconFolderOpened:Ce,IconView:we},data:function(){return{fileList:ce(this.modelValue),previewVisible:!1,frameVisible:!1,previewImage:"",bus:new de}},watch:{modelValue:function(e){this.fileList=ce(e)}},methods:{close:function(){this.closeModel(!0)},closeModel:function(e){this.bus.$emit(e?"$close":"$ok"),this.reload&&(this.bus.$off("$ok"),this.bus.$off("$close")),this.frameVisible=!1},handleCancel:function(){this.previewVisible=!1},showModel:function(){this.disabled||!1===this.onOpen()||(this.frameVisible=!0)},input:function(){var e=this.fileList,t=1===this.maxLength?e[0]||"":e;this.$emit("update:modelValue",t),this.$emit("change",t)},makeInput:function(){var e=this;return _(t("ElInput"),c({type:"text",modelValue:this.fileList.map(function(t){return e.getSrc(t)}).toString(),readonly:!0},{key:1}),{append:function(){return _(t("ElButton"),{icon:t(e.icon),onClick:function(){return e.showModel()}},null)},suffix:function(){return e.fileList.length&&!e.disabled?_(t("ElIcon"),{class:"el-input__icon _fc-upload-icon",onClick:function(){e.fileList=[],e.input()}},{default:function(){return[_(pe,null,null)]}}):null}})},makeGroup:function(e){return(!this.maxLength||this.fileList.length<this.maxLength)&&e.push(this.makeBtn()),_("div",{key:2},[e])},makeItem:function(e,t){return _("div",{class:"_fc-files",key:"3"+e},[t])},valid:function(e){var t=this.formCreateInject.field||this.field;if(t&&e!==t)throw new Error("[frame]无效的字段值")},makeIcons:function(e,t){if(!1!==this.handleIcon||!0===this.allowRemove){var n=[];return("file"!==this.type&&!1!==this.handleIcon||"file"===this.type&&this.handleIcon)&&n.push(this.makeHandleIcon(e,t)),this.allowRemove&&n.push(this.makeRemoveIcon(e,t)),_("div",{class:"_fc-upload-cover",key:4},[n])}},makeHandleIcon:function(e,n){var i=this,o=t(!0===this.handleIcon||void 0===this.handleIcon?"icon-view":this.handleIcon);return _(t("ElIcon"),{onClick:function(){return i.handleClick(e)},key:"5"+n},{default:function(){return[_(o,null,null)]}})},makeRemoveIcon:function(e,n){var i=this;return _(t("ElIcon"),{onClick:function(){return i.handleRemove(e)},key:"6"+n},{default:function(){return[_(be,null,null)]}})},makeFiles:function(){var e=this;return this.makeGroup(this.fileList.map(function(n,i){return e.makeItem(i,[_(t("ElIcon"),{onClick:function(){return e.handleClick(n)}},{default:function(){return[_(ge,null,null)]}}),e.makeIcons(n,i)])}))},makeImages:function(){var e=this;return this.makeGroup(this.fileList.map(function(t,n){return e.makeItem(n,[_("img",{src:e.getSrc(t)},null),e.makeIcons(t,n)])}))},makeBtn:function(){var e=this,n=t(this.icon);return _("div",{class:"_fc-upload-btn",onClick:function(){return e.showModel()},key:7},[_(t("ElIcon"),null,{default:function(){return[_(n,null,null)]}})])},handleClick:function(e){if(this.onHandle)return this.onHandle(e);this.previewImage=this.getSrc(e),this.previewVisible=!0},handleRemove:function(e){this.disabled||!1!==this.onBeforeRemove(e)&&(this.fileList.splice(this.fileList.indexOf(e),1),this.input(),this.onRemove(e))},getSrc:function(e){return this.srcKey?e[this.srcKey]:e},frameLoad:function(e){var t=this;this.onLoad(e);try{!0===this.helper&&(e.form_create_helper={api:this.formCreateInject.api,close:function(e){t.valid(e),t.closeModel()},set:function(e,n){t.valid(e),!t.disabled&&t.$emit("update:modelValue",n)},get:function(e){return t.valid(e),t.modelValue},onOk:function(e){return t.bus.$on("$ok",e)},onClose:function(e){return t.bus.$on("$close",e)}})}catch(n){}},makeFooter:function(){var e=this,n=this.$props,i=n.okBtnText,o=n.closeBtnText,r=n.closeBtn,a=n.okBtn;if(n.footer)return _("div",null,[r?_(t("ElButton"),{onClick:function(){return!1!==e.onCancel()&&(e.frameVisible=!1)}},{default:function(){return[o||e.formCreateInject.t("close")||"关闭"]}}):null,a?_(t("ElButton"),{type:"primary",onClick:function(){return!1!==e.onOk()&&e.closeModel()}},{default:function(){return[i||e.formCreateInject.t("ok")||"确定"]}}):null])}},render:function(){var e,n=this,i=this.type;e="input"===i?this.makeInput():"image"===i?this.makeImages():this.makeFiles();var o=this.$props,r=o.width,a=void 0===r?"30%":r,l=o.height,s=o.src,u=o.title,d=o.modalTitle;return f(function(){n.$refs.frame&&n.frameLoad(n.$refs.frame.contentWindow||{})}),_("div",{class:{"_fc-frame":!0,"_fc-disabled":this.disabled}},[e,_(t("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:d,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[_("img",{style:"width: 100%",src:n.previewImage},null)]}}),_(t("ElDialog"),c({appendToBody:!0},X({width:a,title:u},this.modal),{modelValue:this.frameVisible,onClose:function(){return n.closeModel(!0)}}),{default:function(){return[n.frameVisible||!n.reload?_("iframe",{ref:"frame",src:s,frameBorder:"0",style:{height:l,border:"0 none",width:"100%"}},null):null]},footer:function(){return n.makeFooter()}})])},beforeMount:function(){var e=this.formCreateInject,t=e.name,n=e.field,i=e.api;t&&i.on("fc:closeModal:"+t,this.close),n&&i.on("fc:closeModal:"+n,this.close)},beforeUnmount:function(){var e=this.formCreateInject,t=e.name,n=e.field,i=e.api;t&&i.off("fc:closeModal:"+t,this.close),n&&i.off("fc:closeModal:"+n,this.close)}}),Re=e({name:"fcRadio",inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[String,Number,Boolean],default:""},options:Array,type:String,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup:function(e,n){var i=u(e.formCreateInject,"options",[]),o=u(e,"options"),r=u(e,"modelValue"),a=u(e,"inputValue",""),l=b(a.value),s=u(e,"input",!1);h(a,function(e){s.value?p(e):l.value=e});var c=d(function(){var e=i.value||[];return o.value&&(e=o.value||[]),Array.isArray(e)?e:[]});h(r,function(e){var t=!1;!a.value&&null!=e&&s.value&&(t=-1===c.value.map(function(e){return e.value}).indexOf(e)),t&&(l.value=e)},{immediate:!0});var f=function(e){n.emit("update:modelValue",e)},p=function(e){var t=l.value;l.value=e,r.value===t&&f(e)};return{options:c,value:r,onInput:f,updateCustomValue:p,customValue:l,makeInput:function(e){if(s.value)return _(e,{checked:!1,value:l.value||void 0,label:l.value||void 0},{default:function(){return[_(t("ElInput"),{size:"small",modelValue:l.value,"onUpdate:modelValue":p},null)]}})}}},render:function(){var e,n,i=this,o="button"===this.type?"ElRadioButton":"ElRadio",r=t(o);return _(t("ElRadioGroup"),c(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),X({default:function(){return[i.options.map(function(e,t){var n=X({},e),i=n.value,a=n.label;return delete n.value,delete n.label,_(r,c(n,{label:i,value:i,key:o+t+"-"+i}),{default:function(){return[a||i||""]}})}),null===(e=(n=i.$slots).default)||void 0===e?void 0:e.call(n),i.makeInput(r)]}},se(this.$slots,["default"])))},mounted:function(){this.$emit("fc.el",this.$refs.el)}}),Oe={type:function(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"},Undef:function(e){return null==e},Element:function(e){return"object"===J(e)&&null!==e&&1===e.nodeType&&!Oe.Object(e)},trueArray:function(e){return Array.isArray(e)&&e.length>0},Function:function(e){var t=this.getType(e);return"Function"===t||"AsyncFunction"===t},getType:function(e){var t=Object.prototype.toString.call(e);return/^\[object (.*)\]$/.exec(t)[1]},empty:function(e){return null==e||(!(!Array.isArray(e)||!Array.isArray(e)||e.length)||"string"==typeof e&&!e)}};function Me(e,t){return{}.hasOwnProperty.call(e,t)}["Date","Object","String","Boolean","Array","Number"].forEach(function(e){Oe[e]=function(t){return Oe.type(t,e)}});var De=e({name:"fcSelect",inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String},emits:["update:modelValue","fc.el"],setup:function(e,t){var n=t.emit,i=u(e.formCreateInject,"options",[]),o=u(e,"modelValue");return{options:d(function(){return Array.isArray(i.value)?i.value:[]}),value:o,handleUpdate:function(e){n("update:modelValue",e)},hasProperty:Me,is:Oe}},mounted:function(){this.$emit("fc.el",this.$refs.el)}});De.render=function(e,u,d,f,p,h){var m=t("el-option"),g=t("el-option-group"),v=t("el-select");return i(),n(v,c(e.$attrs,{"model-value":e.value,"onUpdate:modelValue":e.handleUpdate,ref:"el"}),{default:o(function(){return[(i(!0),r(l,null,s(e.options,function(t,a){return i(),r(l,null,[e.hasProperty(t,"options")?(i(),n(g,{label:t.label,key:"".concat(a,"-").concat(t.label)},{default:o(function(){return[(i(!0),r(l,null,s(e.is.trueArray(t.options)?t.options:[],function(e,t){return i(),n(m,c({key:"".concat(t,"-").concat(e.value)},e),null,16)}),128))]}),_:2},1032,["label"])):(i(),n(m,c(Z({key:1},"key","".concat(a,"-").concat(t.value)),t),null,16))],64)}),256)),a(e.$slots,"default")]}),_:3},16,["model-value","onUpdate:modelValue"])};var Ne=e({name:"fcTree",inheritAttrs:!1,formCreateParser:{mergeProp:function(e){var t=e.prop.props;t.nodeKey||(t.nodeKey="id"),t.props||(t.props={label:"title"})}},props:{type:String,modelValue:{type:[Array,String,Number],default:function(){return[]}}},emits:["update:modelValue","fc.el"],watch:{modelValue:function(){this.setValue()}},methods:{updateValue:function(){var e;this.$refs.tree&&(e="selected"===this.type?this.$refs.tree.getCurrentKey():this.$refs.tree.getCheckedKeys(),this.$emit("update:modelValue",e))},setValue:function(){this.$refs.tree&&("selected"===this.type?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys(ce(this.modelValue)))}},render:function(){return _(t("ElTree"),c(this.$attrs,{ref:"tree",onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted:function(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}});fe("._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}");var Ie={name:"IconUpload"},Le={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Fe=[M("path",{fill:"currentColor",d:"M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"},null,-1)];function Pe(e,t){return"object"===J(e)?e:{url:e,is_string:!0,name:je(e),uid:t}}function Be(e){return X(X({},e),{},{file:e,value:e})}function je(e){return(""+e).split("/").pop()}Ie.render=function(e,t,n,o,a,l){return i(),r("svg",Le,Fe)};var Ve=e({name:"fcUpload",inheritAttrs:!1,formCreateParser:{toFormValue:function(e){return ce(e)},toValue:function(e,t){return 1===t.prop.props.limit?e[0]||"":e}},props:{previewMask:void 0,onPreview:Function,httpRequest:Function,modalTitle:String,listType:String,uploadText:String,formCreateInject:Object,modelValue:[Array,String,Object]},emits:["update:modelValue","change","remove","fc.el"],data:function(){return{previewVisible:!1,previewImage:"",fileList:[]}},created:function(){this.fileList=ce(this.modelValue).map(Pe).map(Be)},watch:{modelValue:function(e){this.fileList=ce(e).map(Pe).map(Be)}},methods:{handlePreview:function(e){this.onPreview?this.onPreview.apply(this,arguments):"text"===this.listType?window.open(e.url):(this.previewImage=e.url,this.previewVisible=!0)},update:function(e){var t=e.map(function(e){return e.is_string?e.url:e.value||e.url}).filter(function(e){return void 0!==e});this.$emit("update:modelValue",t)},handleCancel:function(){this.previewVisible=!1},handleChange:function(e,t){this.$emit.apply(this,["change"].concat(Array.prototype.slice.call(arguments))),"success"===e.status&&this.update(t)},handleRemove:function(e,t){this.$emit.apply(this,["remove"].concat(Array.prototype.slice.call(arguments))),this.update(t)},doHttpRequest:function(e){if(this.httpRequest)return this.httpRequest(e);e.source="upload",this.formCreateInject.api.fetch(e)}},render:function(){var e,n,i=this,o=ce(this.modelValue).length;return _("div",{class:"_fc-upload"},[_(t("ElUpload"),c({key:o},this.$attrs,{listType:this.listType||"picture-card",class:{"_fc-exceed":!!this.$attrs.limit&&this.$attrs.limit<=o},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,httpRequest:this.doHttpRequest,fileList:this.fileList,ref:"upload"}),X({default:function(){return[(null===(e=(n=i.$slots).default)||void 0===e?void 0:e.call(n))||(-1===["text","picture"].indexOf(i.listType)?_(t("ElIcon"),null,{default:function(){return[_(Ie,null,null)]}}):_(t("ElButton"),{type:"primary"},{default:function(){return[i.formCreateInject.t("clickToUpload")||i.uploadText||"点击上传"]}}))]}},se(this.$slots,["default"]))),_(t("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[_("img",{style:"width: 100%",src:i.previewImage},null)]}})])},mounted:function(){this.$emit("fc.el",this.$refs.upload)}});function ze(e,t,n){e[t]=n}function He(e,t){delete e[t]}function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=!1;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var r=t[o];if((i=Array.isArray(r))||Oe.Object(r)){var a=void 0===e[o];if(i)i=!1,a&&ze(e,o,[]);else if(r._clone&&void 0!==n){if(!n){ze(e,o,r._clone());continue}r=r.getRule(),a&&ze(e,o,{})}else a&&ze(e,o,{});e[o]=Ue(e[o],r,n)}else ze(e,o,r),Oe.Undef(r)||(Oe.Undef(r.__json)||(e[o].__json=r.__json),Oe.Undef(r.__origin)||(e[o].__origin=r.__origin))}return void 0!==n&&Array.isArray(e)?e.filter(function(e){return!e||!e.__ctrl}):e}function We(e){return Ue({},{value:e}).value}var Ye=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&ze(e,i,t[i]);return e};function Ge(){return Ye.apply(this,arguments)}function $e(e){return"object"!==J(e)||null===e?e:e instanceof Array?re(e):X({},e)}function qe(e,t){var n=null;return function(){for(var i=this,o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];null!==n&&clearTimeout(n),n=setTimeout(function(){return e.call.apply(e,[i].concat(r))},t)}}function Qe(e){return null==e?"":"object"===J(e)?JSON.stringify(e,null,2):String(e)}function Ke(e){return function(e){return e&&"object"===J(e)&&"function"==typeof e.then}(e)?e:Promise.resolve(e)}function Xe(e){var t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return 0===t.indexOf("-")&&(t=t.substr(1)),t}function Je(e){return e.replace(e[0],e[0].toLocaleUpperCase())}fe('._fc-group{display:flex;flex-direction:column;justify-content:center;min-height:38px;width:100%}._fc-group-disabled ._fc-group-add,._fc-group-disabled ._fc-group-btn{cursor:not-allowed}._fc-group-handle{background-color:#fff;border:1px dashed #d9d9d9;border-radius:15px;bottom:-15px;display:flex;flex-direction:row;padding:3px 8px;position:absolute;right:30px}._fc-group-btn{cursor:pointer}._fc-group-idx{align-items:center;background:#eee;border-radius:15px;bottom:-15px;display:flex;font-weight:700;height:30px;justify-content:center;left:10px;position:absolute;width:30px}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{border:1px dashed #d9d9d9;border-radius:5px;display:flex;flex-direction:column;margin:5px 5px 25px;padding:20px 20px 25px;position:relative}._fc-group-arrow{height:20px;position:relative;width:20px}._fc-group-arrow:before{border-left:2px solid #999;border-top:2px solid #999;content:"";height:9px;left:5px;position:absolute;top:8px;transform:rotate(45deg);width:9px}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{cursor:pointer;height:20px;position:relative;width:20px}._fc-group-plus-minus:after,._fc-group-plus-minus:before{background-color:#409eff;content:"";height:2px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:60%}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{border:1px solid rgba(64,158,255,.5);border-radius:15px;cursor:pointer;height:25px;width:25px}._fc-group-add._fc-group-plus-minus:after,._fc-group-add._fc-group-plus-minus:before{width:50%}._fc-group._fc-group-card{display:flex;flex-direction:column;gap:16px;width:100%}._fc-group._fc-group-card._fc-group-disabled ._fc-group-add,._fc-group._fc-group-card._fc-group-disabled ._fc-group-btn{cursor:not-allowed;opacity:.5}._fc-group._fc-group-card ._fc-group-container{background:#fff;border:1px solid #f0f0f0;border-radius:6px;display:flex;flex-direction:column;margin:0;overflow:hidden;padding:0;position:relative}._fc-group._fc-group-card ._fc-group-header{align-items:center;background:#fafafa;border-bottom:1px solid #f0f0f0;display:flex;justify-content:space-between;padding:16px 20px 12px}._fc-group._fc-group-card ._fc-group-idx{align-items:center;background:#f0f0f0;border:1px solid #e0e0e0;border-radius:6px;color:#666;display:flex;flex-shrink:0;font-size:12px;font-weight:500;height:24px;justify-content:center;margin-right:12px;position:static;width:24px}._fc-group._fc-group-card ._fc-group-title{color:rgba(0,0,0,.85);flex:1;font-size:14px;font-weight:500;line-height:1.5715}._fc-group._fc-group-card ._fc-group-handle{align-items:center;background-color:transparent;border:none;border-radius:0;bottom:auto;display:flex;flex-direction:row;flex-shrink:0;gap:4px;margin-left:12px;padding:0;position:static;right:auto}._fc-group._fc-group-card ._fc-group-btn{align-items:center;background:#fff;border:1px solid #d9d9d9;border-radius:4px;color:rgba(0,0,0,.45);cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px}._fc-group._fc-group-card ._fc-group-btn:hover{background:#f0f8ff;border-color:#1890ff;color:#1890ff}._fc-group._fc-group-card ._fc-group-btn:active{border-color:#096dd9;color:#096dd9}._fc-group._fc-group-card ._fc-group-arrow{position:relative}._fc-group._fc-group-card ._fc-group-arrow:before{border-left:1px solid;border-top:1px solid;content:"";height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%) rotate(45deg);width:5px}._fc-group._fc-group-card ._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group._fc-group-card ._fc-group-sort{align-items:center;display:flex;flex-direction:column;height:24px;justify-content:center;position:relative}._fc-group._fc-group-card ._fc-group-sort:after,._fc-group._fc-group-card ._fc-group-sort:before{border-left:1px solid;border-top:1px solid;content:"";height:4px;left:50%;position:absolute;transform:translateX(-50%);width:4px}._fc-group._fc-group-card ._fc-group-sort:before{top:6px;transform:translateX(-50%) rotate(45deg)}._fc-group._fc-group-card ._fc-group-sort:after{bottom:6px;transform:translateX(-50%) rotate(225deg)}._fc-group._fc-group-card ._fc-group-sort-down,._fc-group._fc-group-card ._fc-group-sort-up{cursor:pointer;height:12px;left:0;position:absolute;right:0;z-index:1}._fc-group._fc-group-card ._fc-group-sort-up{top:0}._fc-group._fc-group-card ._fc-group-sort-down{bottom:0}._fc-group._fc-group-card ._fc-group-sort-down:hover,._fc-group._fc-group-card ._fc-group-sort-up:hover{background:rgba(24,144,255,.1)}._fc-group._fc-group-card ._fc-group-plus-minus{background:#409eff;border-color:#409eff;color:#fff;height:24px;position:relative;width:24px}._fc-group._fc-group-card ._fc-group-plus-minus:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}._fc-group._fc-group-card ._fc-group-plus-minus:after,._fc-group._fc-group-card ._fc-group-plus-minus:before{background-color:currentColor;content:"";height:1px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:8px}._fc-group._fc-group-card ._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus{background:#f56c6c;border-color:#f56c6c}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus:hover{background:#f78989;border-color:#f78989}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group._fc-group-card ._fc-group-content{padding:20px}._fc-group._fc-group-card ._fc-group-add{align-items:center;background:#fff;border:1px solid #d9d9d9;border-radius:4px;color:rgba(0,0,0,.45);cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px}._fc-group._fc-group-card ._fc-group-add:hover{background:#f0f8ff;border-color:#409eff;color:#409eff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus{background:#409eff;border-color:#409eff;color:#fff;height:24px;width:24px}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:after,._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:before{background-color:currentColor;content:"";height:1px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:8px}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group._fc-group-card ._fc-group-empty{color:rgba(0,0,0,.45);font-size:14px;padding:40px 20px;text-align:center}@media (max-width:768px){._fc-group._fc-group-card ._fc-group-container{border-left:none;border-radius:0;border-right:none;margin:0 -8px}._fc-group._fc-group-card ._fc-group-header{padding:12px 16px 8px}._fc-group._fc-group-card ._fc-group-content{padding:16px}._fc-group._fc-group-card ._fc-group-handle{gap:2px}._fc-group._fc-group-card ._fc-group-btn{height:22px;width:22px}}');var Ze="[[FORM-CREATE-PREFIX-",et="-FORM-CREATE-SUFFIX]]";function tt(e,t){return JSON.stringify(Ue(Array.isArray(e)?[]:{},e,!0),function(e,t){if(!t||!0!==t._isVue){if("function"!=typeof t)return t;if(t.__json)return t.__json;if(t.__origin&&(t=t.__origin),!t.__emit)return Ze+t+et}},t)}function nt(e){return new Function("return "+e)()}function it(e,t){if(e&&Oe.String(e)&&e.length>4){var n=e.trim(),i=!1;try{if(n.indexOf(et)>0&&0===n.indexOf(Ze))n=n.replace(et,"").replace(Ze,""),i=!0;else if(0===n.indexOf("$FN:"))n=n.substring(4),i=!0;else if(0===n.indexOf("$EXEC:"))n=n.substring(6),i=!0;else{if(0===n.indexOf("$GLOBAL:")){var o=n.substring(8);return n=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0].api.getGlobalEvent(o);if(i)return i.call.apply(i,[this].concat(t))},n.__json=e,n.__inject=!0,n}if(0===n.indexOf("$FNX:"))return(n=nt("function($inject){\n"+n.substring(5)+"\n}")).__json=e,n.__inject=!0,n;(t||0!==n.indexOf("function ")||"function "===n)&&(t||0!==n.indexOf("function(")||"function("===n)||(i=!0)}if(!i)return e;var r;try{r=nt(n)}catch(a){r=nt("function "+n)}return r.__json=e,r}catch(a){return void"解析失败:".concat(n,"\n\nerr: ").concat(a)}}return e}function ot(e,t){return JSON.parse(e,function(e,n){return Oe.Undef(n)||!n.indexOf?n:it(n,t)})}var rt=0;function at(){var e=370+ ++rt;return"F"+Math.random().toString(36).substr(3,3)+Number("".concat(Date.now())).toString(36)+e.toString(36)+"c"}function lt(e,t,n){var i,o=e;return(t||"").split(".").forEach(function(e){i&&(o[i]&&"object"==J(o[i])||(o[i]={}),o=o[i]),i=e}),o[i]=n,o}var st=e({name:"fcGroup",props:{field:String,rule:Array,expand:Number,options:Object,button:{type:Boolean,default:!0},max:{type:Number,default:0},min:{type:Number,default:0},modelValue:{type:Array,default:function(){return[]}},defaultValue:Object,sortBtn:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},syncDisabled:{type:Boolean,default:!0},title:{type:[String,Function],default:null},type:{type:String,default:"default"},onBeforeRemove:{type:Function,default:function(){}},onBeforeAdd:{type:Function,default:function(){}},formCreateInject:Object,parse:Function},data:function(){return{len:0,cacheRule:{},cacheValue:{},sort:[],form:g(this.formCreateInject.form.$form())}},emits:["update:modelValue","change","itemMounted","remove","add"],watch:{rule:{handler:function(e,t){var n=this;Object.keys(this.cacheRule).forEach(function(i){var o=n.cacheRule[i];if(o.$f){var r=o.$f.formData();if(e===t)o.$f.deferSyncValue(function(){Ue(o.rule,e),o.$f.setValue(r)},!0);else{var a=o.$f.formData();o.$f.once("reloading",function(){o.$f.setValue(a)}),o.rule=We(e)}}})},deep:!0},expand:function(e){var t=e-this.modelValue.length;t>0&&this.expandRule(t)},modelValue:{handler:function(e){var t=this;e=e||[];var n=this.sort,i=n.length,o=i-e.length;if(o<0){for(var r=o;r<0;r++)this.addRule(e.length+r,!0);for(var a=0;a<i;a++)this.setValue(n[a],e[a])}else{if(o>0)for(var l=0;l<o;l++)this.removeRule(n[i-l-1]);e.forEach(function(i,o){t.setValue(n[o],e[o])})}},deep:!0}},methods:{_value:function(e){return e&&Me(e,this.field)?e[this.field]:e},cache:function(e,t){this.cacheValue[e]=JSON.stringify(t)},input:function(e){this.$emit("update:modelValue",e),this.$emit("change",e)},formData:function(e,t){var n=this,i=this.cacheRule,o=this.sort;if(o.filter(function(e){return i[e]&&i[e].$f}).length===o.length){var r=o.map(function(i){var o=e===i?t:X({},n.cacheRule[i].$f.form),r=n.field?o[n.field]||null:o;return n.cache(i,r),r});this.input(r)}},setValue:function(e,t){var n=this.field;n&&(t=Z({},n,this._value(t))),this.cacheValue[e]!==JSON.stringify(n?t[n]:t)&&(this.cacheRule[e].$f&&this.cacheRule[e].$f.coverValue(t),this.cache(e,t))},addRule:function(e,t){var n=this,i=this.formCreateInject.form.copyRules(this.rule||[]),o=this.options?X({},this.options):{submitBtn:!1,resetBtn:!1};if(this.defaultValue){o.formData||(o.formData={});var r=We(this.defaultValue);Ge(o.formData,this.field?Z({},this.field,r):r)}this.parse&&this.parse({rule:i,options:o,index:this.sort.length}),this.cacheRule[++this.len]={rule:i,options:o},this.sort=Object.keys(this.cacheRule),t&&f(function(){return n.$emit("add",i,Object.keys(n.cacheRule).length-1)})},add$f:function(e,t,n){var i=this;this.cacheRule[t].$f=n,f(function(){i.$emit("itemMounted",n,Object.keys(i.cacheRule).indexOf(t))})},removeRule:function(e,t){var n=this,i=Object.keys(this.cacheRule).indexOf(e);delete this.cacheRule[e],delete this.cacheValue[e],this.sort=Object.keys(this.cacheRule),t&&f(function(){return n.$emit("remove",i)})},add:function(e){if(!this.disabled&&!1!==this.onBeforeAdd(this.modelValue)){var t=re(this.modelValue);t.push(this.defaultValue?We(this.defaultValue):this.field?null:{}),this.input(t)}},del:function(e,t){var n=this;if(!this.disabled){Ke(this.onBeforeRemove(this.modelValue,e)).then(function(i){!1!==i&&function(){n.removeRule(t,!0);var i=re(n.modelValue);i.splice(e,1),n.input(i)}()})}},addIcon:function(e){return _("div",{class:"_fc-group-btn _fc-group-plus-minus",onClick:this.add},null)},delIcon:function(e,t){var n=this;return _("div",{class:"_fc-group-btn _fc-group-plus-minus _fc-group-minus",onClick:function(){return n.del(e,t)}},null)},sortUpIcon:function(e){var t=this;return _("div",{class:"_fc-group-btn _fc-group-arrow _fc-group-up",onClick:function(){return t.changeSort(e,-1)}},null)},sortDownIcon:function(e){var t=this;return _("div",{class:"_fc-group-btn _fc-group-arrow _fc-group-down",onClick:function(){return t.changeSort(e,1)}},null)},changeSort:function(e,t){var n=this,i=this.sort[e];this.sort[e]=this.sort[e+t],this.sort[e+t]=i,this.formCreateInject.subForm(this.sort.map(function(e){return n.cacheRule[e].$f})),this.formData(0)},sortIcon:function(e,t){var n=this,i=e>0,o=e<t-1;return i||o?i&&o?_("div",{class:"_fc-group-btn _fc-group-sort"},[_("div",{class:"_fc-group-sort-up",onClick:function(){return n.changeSort(e,-1)}},null),_("div",{class:"_fc-group-sort-down",onClick:function(){return n.changeSort(e,1)}},null)]):i?this.sortUpIcon(e):o?this.sortDownIcon(e):void 0:null},makeIcon:function(e,t,n){var i=this;if(this.$slots.button)return this.$slots.button({total:e,index:t,vm:this,key:n,del:function(){return i.del(t,n)},add:this.add});var o=[];if((!this.max||e<this.max)&&e===t+1&&o.push(this.addIcon(n)),e>this.min&&o.push(this.delIcon(t,n)),this.sortBtn){var r=this.sortIcon(t,e);r&&o.push(r)}return o},expandRule:function(e){for(var t=0;t<e;t++)this.modelValue.push(this.field?null:{});this.input(re(this.modelValue))},getTitle:function(e,t){return"function"==typeof this.title?this.title(e,this.modelValue[e],t):"string"==typeof this.title&&this.title.replace("{index}",e+1)}},created:function(){for(var e=(this.expand||0)-this.modelValue.length,t=0;t<this.modelValue.length;t++)this.addRule(t);e>0&&this.expandRule(e)},render:function(){var e=this,t=this.sort,n=this.button,i=this.form,o=this.disabled,r="card"===this.type,a=0===t.length?this.$slots.default?this.$slots.default({vm:this,add:this.add}):_("div",{key:"a_def",class:"_fc-group-plus-minus _fc-group-add fc-clock",onClick:this.add},null):t.map(function(a,l){var s=e.cacheRule[a],u=s.rule,d=s.options,f=n&&!o?e.makeIcon(t.length,l,a):[],p=e.getTitle(l,a);return _("div",{class:"_fc-group-container",key:a},r?[_("div",{class:"_fc-group-header"},[!1===p?_("div",{class:"_fc-group-idx"},[l+1]):null,!1!==p?_("div",{class:"_fc-group-title"},[p]):null,_("div",{class:"_fc-group-handle fc-clock"},[f.length?f:null])]),_("div",{class:"_fc-group-content"},[_(i,c({key:a},X(X({},e.$attrs),{},{disabled:o,"onUpdate:modelValue":function(t){return e.formData(a,t)},"onUpdate:api":function(t){return e.add$f(l,a,t)},inFor:!0,modelValue:e.field?Z({},e.field,e._value(e.modelValue[l])):e.modelValue[l],rule:u,option:d,extendOption:!0})),null)])]:[_(i,c({key:a},X(X({},e.$attrs),{},{disabled:o,"onUpdate:modelValue":function(t){return e.formData(a,t)},"onUpdate:api":function(t){return e.add$f(l,a,t)},inFor:!0,modelValue:e.field?Z({},e.field,e._value(e.modelValue[l])):e.modelValue[l],rule:u,option:d,extendOption:!0})),null),_("div",{class:"_fc-group-idx"},[l+1]),f.length?_("div",{class:"_fc-group-handle fc-clock"},[f]):null])});return _("div",{key:"con",class:"_fc-group "+(o?"_fc-group-disabled":"")+(r?" _fc-group-card":"")},[a])}}),ct=e({name:"fcSubForm",props:{rule:Array,options:{type:Object,default:function(){return p({submitBtn:!1,resetBtn:!1})}},modelValue:{type:Object,default:function(){return{}}},disabled:{type:Boolean,default:!1},syncDisabled:{type:Boolean,default:!0},formCreateInject:Object},data:function(){return{cacheValue:{},subApi:{},form:g(this.formCreateInject.form.$form())}},emits:["fc:subform","update:modelValue","change","itemMounted"],watch:{modelValue:function(e){this.setValue(e)}},methods:{formData:function(e){this.cacheValue=JSON.stringify(e),this.$emit("update:modelValue",e),this.$emit("change",e)},setValue:function(e){var t=JSON.stringify(e);this.cacheValue!==t&&(this.cacheValue=t,this.subApi.coverValue(e||{}))},add$f:function(e){var t=this;this.subApi=e,f(function(){t.$emit("itemMounted",e)})}},render:function(){var e=this.form;return _(e,{disabled:this.disabled,"onUpdate:modelValue":this.formData,modelValue:this.modelValue,"onUpdate:api":this.add$f,rule:this.rule,option:this.options,extendOption:!0},null)}}),ut={name:"IconWarning"},dt={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},ft=[M("path",{fill:"currentColor",d:"M512 64a448 448 0 110 896 448 448 0 010-896zm0 832a384 384 0 000-768 384 384 0 000 768zm48-176a48 48 0 11-96 0 48 48 0 0196 0zm-48-464a32 32 0 0132 32v288a32 32 0 01-64 0V288a32 32 0 0132-32z"},null,-1)];ut.render=function(e,t,n,o,a,l){return i(),r("svg",dt,ft)};var pt=[ue,Te,Re,De,Ne,Ve,st,ct,ut],ht=["props"],mt=["class","style","directives"],gt=["on","hook"],vt=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[].concat(ht,re(i.normal||[])),r=[].concat(mt,re(i.array||[])),a=[].concat(gt,re(i.functional||[])),l=i.props||[];return t.reduce(function(t,n){for(var i in n)if(t[i])if(l.indexOf(i)>-1)t[i]=e([n[i]],t[i]);else if(o.indexOf(i)>-1)t[i]=X(X({},t[i]),n[i]);else if(r.indexOf(i)>-1){var s=t[i]instanceof Array?t[i]:[t[i]],c=n[i]instanceof Array?n[i]:[n[i]];t[i]=[].concat(re(s),re(c))}else if(a.indexOf(i)>-1)for(var u in n[i])if(t[i][u]){var d=t[i][u]instanceof Array?t[i][u]:[t[i][u]],f=n[i][u]instanceof Array?n[i][u]:[n[i][u]];t[i][u]=[].concat(re(d),re(f))}else t[i][u]=n[i][u];else if("hook"===i)for(var p in n[i])t[i][p]?t[i][p]=_t(t[i][p],n[i][p]):t[i][p]=n[i][p];else t[i]=n[i];else o.indexOf(i)>-1||a.indexOf(i)>-1||l.indexOf(i)>-1?t[i]=X({},n[i]):r.indexOf(i)>-1?t[i]=n[i]instanceof Array?re(n[i]):"object"===J(n[i])?X({},n[i]):n[i]:t[i]=n[i];return t},n)},_t=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},bt=["type","slot","ignore","emitPrefix","value","name","native","hidden","display","inject","options","emit","link","prefix","suffix","update","sync","optionsTo","key","slotUpdate","computed","preview","component","cache","modelEmit"],yt=["validate","children","control"],xt=["effect","deep","renderSlots"];function wt(){return[].concat(bt,re(ht),re(mt),re(gt),yt,xt)}function At(e){return kt(e.replace(/(-[a-z])/g,function(e){return e.replace("-","").toLocaleUpperCase()}))}function kt(e){return e.replace(e[0],e[0].toLowerCase())}function Ct(e,t){return{value:e,enumerable:!1,configurable:!1,writable:!0}}function St(e,t){return Et([e],t||!1)[0]}function Et(e,t){return Ue([],re(e),t||!1)}function Tt(e,t){return vt(Array.isArray(t)?t:[t],e,{array:yt,normal:xt}),e}function Rt(e){var t=Oe.Function(e.getRule)?e.getRule():e;return t.type||(t.type="input"),t}function Ot(e,t){Object.defineProperties(e,Object.keys(t).reduce(function(e,n){return e[n]={get:function(){return t[n]()}},e},{}))}function Mt(e){return e.__fc__||(e.__origin__?e.__origin__.__fc__:null)}function Dt(e,t){try{t=e()}catch(n){!function(e){e.toString()}(n)}return t}function Nt(){var e={},t=function(e){return e||"default"};return{setSlot:function(n,i){n=t(n),!i||Array.isArray(i)&&i.length||(e[n]||(e[n]=[]),e[n].push(i))},getSlot:function(n,i){n=t(n);var o=[];return(e[n]||[]).forEach(function(e){if(Array.isArray(e))o.push.apply(o,re(e));else if(Oe.Function(e)){var t=e.apply(void 0,re(i||[]));Array.isArray(t)?o.push.apply(o,re(t)):o.push(t)}else Oe.Undef(e)||o.push(e)}),o},getSlots:function(){var t=this,n={};return Object.keys(e).forEach(function(e){n[e]=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return t.getSlot(e,i)}}),n},slotLen:function(n){return n=t(n),e[n]?e[n].length:0},mergeBag:function(e){var t=this;if(!e)return this;var n=Oe.Function(e.getSlots)?e.getSlots():e;return Array.isArray(e)||m(e)?this.setSlot(void 0,function(){return e}):Object.keys(n).forEach(function(e){t.setSlot(e,n[e])}),this}}}function It(e){var t=X({},e.props||{});return Object.keys(e.on||{}).forEach(function(n){n.indexOf("-")>0&&(n=At(n));var i="on".concat(Je(n));Array.isArray(t[i])?t[i]=[].concat(re(t[i]),[e.on[n]]):t[i]?t[i]=[t[i],e.on[n]]:t[i]=e.on[n]}),t.key=e.key,t.ref=e.ref,t.class=e.class,t.id=e.id,t.style=e.style,t.slot&&delete t.slot,t}function Lt(e,t){return Object.setPrototypeOf(e,t),e}var Ft=function(e,t){return"string"==typeof e?String(t):"number"==typeof e?Number(t):t},Pt={"==":function(e,t){return JSON.stringify(e)===JSON.stringify(Ft(e,t))},"!=":function(e,t){return!Pt["=="](e,t)},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},on:function(e,t){return e&&e.indexOf&&e.indexOf(Ft(e[0],t))>-1},notOn:function(e,t){return!Pt.on(e,t)},in:function(e,t){return t&&t.indexOf&&t.indexOf(e)>-1},notIn:function(e,t){return!Pt.in(e,t)},between:function(e,t){return e>t[0]&&e<t[1]},notBetween:function(e,t){return e<t[0]||e>t[1]},empty:function(e){return Oe.empty(e)},notEmpty:function(e){return!Oe.empty(e)},pattern:function(e,t){return new RegExp(t,"g").test(e)}};function Bt(e,t){return(Array.isArray(t)?t:(t||"").split(".")).forEach(function(t){null!=e&&(e=e[t])}),e}function jt(e){var t=e.split("."),n=[],i="";return t.forEach(function(e,t){0===t?i=e:i+="."+e,n.push(i)}),n.join(" && ")}function Vt(e){for(var t=[],n="",i=0,o=0;o<e.length;o++){var r=e[o];"["===r?(0===i&&n&&(t.push({type:"key",value:n}),n=""),i++,n+=r):"]"===r?(n+=r,0===--i&&(t.push({type:"bracket",value:Vt(n.slice(1,-1))}),n="")):"."===r&&0===i?n&&(t.push({type:"key",value:n}),n=""):n+=r}return n&&t.push({type:"key",value:n}),t.map(function(e){return"key"===e.type?{key:e.value}:{children:e.value}})}var zt=function(e,t){if(e&&e!==t)return e.props.formCreateInject?e.props.formCreateInject:e.parent?zt(e.parent,t):void 0};function Ht(t,n,i){return e({name:"FormCreate"+(t.isMobile?"Mobile":""),components:n,directives:i,props:{rule:{type:Array,required:!0,default:function(){return[]}},option:{type:Object,default:function(){return{}}},extendOption:Boolean,driver:[String,Object],modelValue:Object,disabled:{type:Boolean,default:void 0},preview:{type:Boolean,default:void 0},index:[String,Number],api:Object,locale:[String,Object],t:Function,name:String,subForm:{type:Boolean,default:!0},inFor:Boolean},emits:["update:api","update:modelValue","mounted","submit","reset","change","emit-event","control","remove-rule","remove-field","sync","reload","repeat-field","update","validate-field-fail","validate-fail","created"],render:function(){return this.fc.render()},setup:function(e){var n=v();D("parentFC",n);var i=A("parentFC",null),o=i;if(i)for(;o.setupState.parent;)o=o.setupState.parent;else o=n;var r=k(e),a=r.rule,l=r.modelValue,s=r.subForm,c=r.inFor,u=p({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:re(a.value||[]),updateValue:JSON.stringify(l.value||{})}),d=new t(n),m=d.api(),_=c.value,b=null;C(function(){S(function(){var t="",n=e.option&&e.option.globalClass||{};Object.keys(n).forEach(function(e){var i="";n[e].style&&Object.keys(n[e].style).forEach(function(t){i+=Xe(t)+":"+n[e].style[t]+";"}),n[e].content&&(i+=n[e].content+";"),i&&(t+=".".concat(e,"{").concat(i,"}"))}),e.option&&e.option.style&&(t+=e.option.style),b||((b=document.createElement("style")).type="text/css",document.head.appendChild(b)),b.innerHTML=t||""})});var y=qe(function(){d.bus.$emit("$loadData.$topForm")},100),x=qe(function(){d.bus.$emit("$loadData.$scopeForm")},100),w=qe(function(){d.bus.$emit("$loadData.$form")},100),O=function(e){d.bus.$emit("change-$form."+e)};return E(function(){i&&(m.top.bus.$on("$loadData.$form",y),m.top.bus.$on("change",O)),m!==m.scope&&m.scope.bus.$on("$loadData.$scopeForm",x),d.mounted()}),T(function(){i&&(m.top.bus.$off("$loadData.$form",y),m.top.bus.$off("change",O)),m!==m.scope&&m.scope.bus.$off("$loadData.$scopeForm",x),function(){var e=zt(n,i);if(e)if(_){var t=ce(e.getSubForm()),o=t.indexOf(m);o>-1&&t.splice(o,1)}else e.subForm()}(),u.destroyed=!0,d.unmount(),b&&(b.parentNode||b.parentElement)&&document.head.removeChild(b)}),R(function(){d.updated()}),function(){if(i){var e,t=zt(n,i);if(t)_?(e=ce(t.getSubForm())).push(m):e=m,t.subForm(e)}}(),h(function(){return e.option},function(){d.initOptions(),m.refresh()},{deep:!0,flush:"sync"}),h(function(){return re(a.value)},function(e){d.$handle.isBreakWatch()||e.length===u.renderRule.length&&e.every(function(e){return u.renderRule.indexOf(e)>-1})||(d.$handle.updateAppendData(),d.$handle.reloadRule(a.value),n.setupState.renderRule())}),h(function(){return[e.disabled,e.preview]},function(){m.refresh()}),h(l,function(e){tt(e||{})!==u.updateValue&&(m.config.forceCoverValue?m.coverValue(e||{}):m.setValue(e||{}))},{deep:!0,flush:"post"}),h(function(){return e.index},function(){m.coverValue({}),d.$handle.updateAppendData(),f(function(){f(function(){m.clearValidateState()})})},{flush:"sync"}),X(X({fc:g(d),parent:i?g(i):i,top:g(o),fapi:g(m)},k(u)),{},{getGroupInject:function(){return zt(n,i)},refresh:function(){++u.unique},renderRule:function(){u.renderRule=re(a.value||[])},updateValue:function(e){if(!u.destroyed){var t=tt(e);u.updateValue!==t&&(u.updateValue=t,n.emit("update:modelValue",e),f(function(){w(),i?s.value||x():(y(),x())}))}}})},created:function(){var e=v();e.emit("update:api",e.setupState.fapi),e.setupState.fc.init()}})}function Ut(e,t){return function(n,i,o){var r=new Wt(e,n,i,o,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{});return t&&(Oe.Function(t)?t(r):r.props(t)),r}}function Wt(e,t,n,i,o){this._data=Ge({props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0},{type:e,title:t,field:n,value:i,props:o||{}}),this.event=this.on}function Yt(e){e.forEach(function(e){Wt.prototype[e]=function(t){return Tt(this._data,Z({},e,arguments.length<2?t:Z({},t,arguments[1]))),this}})}Ge(Wt.prototype,{getRule:function(){return this._data},setProp:function(e,t){return ze(this._data,e,t),this},modelField:function(e){return this._data.modelField=e,this},_clone:function(){var e=new this.constructor;return e._data=St(this._data),e}}),Yt(wt());var Gt=Ut("");function $t(e,t,n){var i=Gt("",t);return i._data.type=e,i._data.title=n,i}function qt(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(n){return t}}function Qt(e){if("undefined"!=typeof XMLHttpRequest){var t,n=new XMLHttpRequest,i=e.action||"";if(n.upload&&e.onProgress&&n.upload.addEventListener("progress",function(t){t.percent=t.total>0?t.loaded/t.total*100:0,e.onProgress(t)}),e.query){var o=Oe.String(e.query)?e.query:Object.keys(e.query).reduce(function(t,n){return t[n]=null===e.query[n]||void 0===e.query[n]?"":e.query[n],t},{}),r=new URLSearchParams(o).toString();r&&(i.includes("?")?i+="&".concat(r):i+="?".concat(r))}n.onerror=function(t){e.onError(t)},n.onload=function(){if(n.status<200||n.status>=300)return e.onError(function(e,t,n){var i="fail to ".concat(e," ").concat(n.status,"'"),o=new Error(i);return o.status=n.status,o.url=e,o}(i,0,n),qt(n));e.onSuccess(qt(n))},n.open(e.method||"get",i,!0),(e.data||e.file)&&(e.file||"json"!==(e.dataType||"").toLowerCase()?(t=new FormData,Object.keys(e.data||{}).map(function(n){t.append(n,e.data[n])})):(t=JSON.stringify(e.data||{}),n.setRequestHeader("content-type","application/json"))),e.file&&t.append(e.filename,e.file,e.file.name),e.withCredentials&&"withCredentials"in n&&(n.withCredentials=!0);var a=e.headers||{};Object.keys(a).forEach(function(e){null!=a[e]&&n.setRequestHeader(e,a[e])}),n.send(t)}}function Kt(e,t,n){return new Promise(function(i,o){(t||Qt)(X(X({},e),{},{onSuccess:function(t){var o=function(e){return e},r=it(e.parse);Oe.Function(r)?o=r:r&&Oe.String(r)&&(o=function(e){return Bt(e,r)}),Ke(o(t,e.targetRule,n)).then(function(e){i(e)})},onError:function(e){o(e)}}))})}function Xt(e){return We(e)}var Jt=1;function Zt(e){Ge(this,{$handle:e,fc:e.fc,vm:e.vm,$manager:e.$manager,vNode:new e.fc.CreateNode(e),force:!1,tmpInput:null,id:Jt++}),Ot(this,{options:function(){return e.options},sort:function(){return e.sort}}),this.initCache(),this.initRender()}Ge(Zt.prototype,{initCache:function(){this.clearCacheAll()},clearCache:function(e){e.rule.cache||(this.cache[e.id]?((!0===this.cache[e.id].use||this.cache[e.id].parent)&&this.$handle.refresh(),this.cache[e.id].parent&&this.clearCache(this.cache[e.id].parent),this.cache[e.id]=null):e.parent&&this.clearCache(e.parent))},clearCacheAll:function(){this.cache={}},setCache:function(e,t,n){this.cache[e.id]={vnode:t,use:!1,parent:n,slot:e.rule.slot}},getCache:function(e){var t=this.cache[e.id];if(t)return t.use=!0,t.vnode}}),function(e){Ge(e.prototype,{initRender:function(){this.cacheConfig={}},getTypeSlot:function(e){return function t(n){if(n){var i=void 0;return e.rule.field&&(i=n.slots["field-"+Xe(e.rule.field)]||n.slots["field-"+e.rule.field]),i||(i=n.slots["type-"+Xe(e.type)]||n.slots["type-"+e.type]),i||t(n.setupState.parent)}}(this.vm)},render:function(){var e=this;if(this.vm.setupState.isShow){this.$manager.beforeRender();var t=Nt();return this.sort.forEach(function(n){e.renderSlot(t,e.$handle.ctxs[n])}),this.$manager.render(t)}},renderSlot:function(e,t,n){if(this.isFragment(t)){t.initProp(),this.mergeGlobal(t),t.initNone();var i=this.renderChildren(t.loadChildrenPending(),t),o=i.default;o&&e.setSlot(t.rule.slot,function(){return o()}),delete i.default,e.mergeBag(i)}else e.setSlot(t.rule.slot,this.renderCtx(t,n))},mergeGlobal:function(e){var t=this;this.$handle.options.global&&(this.cacheConfig[e.trueType]||(this.cacheConfig[e.trueType]=d(function(){var n=t.$handle.options.global;return Tt({},[n["*"]||n.default||{},n[e.originType]||n[e.type]||n[e.type]||{}])})),e.prop=Tt({},[this.cacheConfig[e.trueType].value,e.prop]))},setOptions:function(e){var t=e.loadPending({key:"options",origin:e.prop.options,def:[]});e.prop.options=t,e.prop.optionsTo&&t&&lt(e.prop,e.prop.optionsTo,t)},deepSet:function(e){var t=e.prop.deep;t&&Object.keys(t).sort(function(e,t){return e.length<t.length?-1:1}).forEach(function(n){lt(e.prop,n,t[n])})},parseSide:function(e,t){return Oe.Object(e)?Tt({props:{formCreateInject:t.prop.props.formCreateInject}},e):e},renderSides:function(e,t,n){var i=t[n?"rule":"prop"];return[this.renderRule(this.parseSide(i.prefix,t)),e,this.renderRule(this.parseSide(i.suffix,t))]},renderId:function(e,t){var n=this,i=this.$handle["field"===t?"fieldCtx":"nameCtx"][e];return i?i.map(function(e){return n.renderCtx(e,e.parent)}):void 0},renderCtx:function(e,t){var n=this;try{if("hidden"===e.type)return;var i=e.rule;if(this.force||!this.cache[e.id]||this.cache[e.id].slot!==i.slot){var o;e.initProp(),this.mergeGlobal(e),e.initNone(),this.$manager.tidyRule(e),this.deepSet(e),this.setOptions(e),this.ctxProp(e);var r=e.prop;r.preview=!!(null!=r.preview?r.preview:this.$handle.preview),r.props.formCreateInject=this.injectProp(e);var a=!1!==r.cache,l=r.preview;if(r.hidden)return void this.setCache(e,void 0,t);o=function(){for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];var u={rule:i,prop:r,preview:l,api:n.$handle.api,model:r.model||{},slotValue:s};s.length&&i.slotUpdate&&Dt(function(){return i.slotUpdate(u)});var d={},f=e.loadChildrenPending();e.parser.renderChildren?d=e.parser.renderChildren(f,e):!1!==e.parser.loadChildren&&(d=n.renderChildren(f,e)),Object.keys(r.renderSlots||{}).forEach(function(t){d[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];if(Oe.Function(r.renderSlots[t]))return Dt(function(){var e;return(e=r.renderSlots)[t].apply(e,o)});var l=n.parseSide(r.renderSlots[t],e);return n.renderRule(l)}});var p,h=n.getTypeSlot(e);return h?(u.children=d,p=h(u)):p=l?e.parser.preview($e(d),e):e.parser.render($e(d),e),p=n.renderSides(p,e),!e.input&&Oe.Undef(r.native)||!0===r.native||(n.fc.targetFormDriver("updateWrap",e),p=n.$manager.makeWrap(e,p)),e.none&&(p=Array.isArray(p)?p.map(function(e){return e&&e.__v_isVNode?n.none(e):e}):n.none(p)),a&&n.setCache(e,function(){return n.stable(p)},t),p},this.setCache(e,o,t)}return function(){var t=n.getCache(e);if(t)return t.apply(void 0,arguments);if(!n.cache[e.id]){var i=n.renderCtx(e,e.parent);return i?i():void 0}}}catch(s){return}},none:function(e){if(e)return e.props.class=this.mergeClass(e.props.class,"fc-none"),e},mergeClass:function(e,t){return Array.isArray(e)?(e.push(t),e):e?[e,t]:t},stable:function(e){var t=this;return(Array.isArray(e)?e:[e]).forEach(function(e){e&&e.__v_isVNode&&e.children&&"object"===J(e.children)&&(e.children.$stable=!0,t.stable(e.children))}),e},getModelField:function(e){return e.prop.modelField||e.parser.modelField||this.fc.modelFields[this.vNode.aliasMap[e.type]]||this.fc.modelFields[e.type]||this.fc.modelFields[e.originType]||"modelValue"},isFragment:function(e){return"fragment"===e.type||"template"===e.type},injectProp:function(e){var t=this,n=this.vm.setupState;n.ctxInject[e.id]||(n.ctxInject[e.id]={api:this.$handle.api,form:this.fc.create,subForm:function(n){t.$handle.addSubForm(e,n)},getSubForm:function(){return t.$handle.subForm[e.id]},slots:function(){return t.vm.setupState.top.slots},getWrap:function(){return t.vm.refs[e.wrapRef]},options:[],children:[],preview:!1,id:e.id,field:e.field,rule:e.rule,input:e.input,t:function(){var e;return(e=t.$handle.api).t.apply(e,arguments)},updateValue:function(n){t.$handle.onUpdateValue(e,n)}});var i=n.ctxInject[e.id];return Ge(i,{preview:e.prop.preview,options:e.prop.options,children:e.loadChildrenPending()}),i},ctxProp:function(e){var t=this,n=e.ref,i=e.key,o=e.rule;this.$manager.mergeProp(e),e.parser.mergeProp(e);var r=[{ref:n,key:o.key||"".concat(i,"fc"),slot:void 0,on:{vnodeMounted:function(n){n.el.__rule__=e.rule,t.onMounted(e,n.el)},"fc.updateValue":function(n){t.$handle.onUpdateValue(e,n)},"fc.el":function(t){e.exportEl=t,t&&((t.$el||t).__rule__=e.rule)}}}];if(e.input){var a=this.tmpInput;!0===this.vm.props.disabled&&(e.prop.props.disabled=!0);var l=this.getModelField(e),s={callback:function(n){a&&a(e.field,n,e.rule),t.onInput(e,n)},modelField:l,value:this.$handle.getFormData(e)};r.push({on:X(Z({},"update:".concat(l),s.callback),e.prop.modelEmit?Z({},e.prop.modelEmit,function(){return t.onEmitInput(e)}):{}),props:Z({},l,s.value)}),e.prop.model=s}return vt(r,e.prop),e.prop},onMounted:function(e,t){e.el=this.vm.refs[e.ref]||t,e.parser.mounted(e),this.$handle.effect(e,"mounted"),this.$handle.targetHook(e,"mounted")},onInput:function(e,t){e.prop.modelEmit?this.$handle.onBaseInput(e,t):this.$handle.onInput(e,t)},onEmitInput:function(e){this.$handle.setValue(e,e.parser.toValue(e.modelValue,e),e.modelValue)},renderChildren:function(e,t){var n=this;if(!Oe.trueArray(e))return{};var i=Nt();return e.map(function(o){if(o)return Oe.String(o)||Oe.Number(o)?i.setSlot(null,"".concat(o)):o.__fc__?n.renderSlot(i,o.__fc__,t):void(o.type&&f(function(){n.$handle.loadChildren(e,t),n.$handle.refresh()}))}),i.getSlots()},defaultRender:function(e,t){var n=e.prop;return n.component?"string"==typeof n.component?this.vNode.make(n.component,n,t):this.vNode.makeComponent(n.component,n,t):this.vNode[e.type]?this.vNode[e.type](n,t):this.vNode[e.originType]?this.vNode[e.originType](n,t):this.vNode.make(kt(n.type),n,t)},createChildrenVnodes:function(e,t,n){this.force=!1!==n,this.tmpInput=t;var i=this.renderChildren(e.rule.children,e);return this.force=!1,this.tmpInput=null,i},createRuleVnode:function(e,t,n){this.force=!1!==n,this.tmpInput=t;var i=Nt();return this.renderSlot(i,e,e.parent),this.force=!1,this.tmpInput=null,i.getSlots()},renderRule:function(e,t,n){var i=this;if(e){if(Oe.String(e)||Oe.Number(e))return"".concat(e);var o;if(n)o=e.type;else if(o=e.is,e.type){o=At(e.type);var r=this.vNode.aliasMap[o];r&&(o=At(r))}if(o){var a=Nt();Oe.trueArray(e.children)&&e.children.forEach(function(e){e&&a.setSlot(null==e?void 0:e.slot,function(){return i.renderRule(e)})});var l=X({},e);return delete l.type,delete l.is,this.vNode.make(o,l,a.mergeBag(t).getSlots())}}}})}(Zt);var en=["hook:updated","hook:mounted"];function tn(e,t,n){var i,o=at(),r=!!t.field;Ge(this,{id:o,ref:o,wrapRef:o+"fi",rule:t,origin:t.__origin__||t,name:t.name,pending:{},none:!1,watch:[],linkOn:[],root:[],ctrlRule:[],children:[],parent:null,group:t.subRule?this:null,cacheConfig:null,prop:X({},t),computed:{},payload:{},refRule:{},input:r,el:void 0,exportEl:void 0,defaultValue:r?We(n):void 0,field:t.field||void 0}),this.updateKey(),i=this,Object.defineProperties(i.origin,{__fc__:Ct(g(i))}),i.rule!==i.origin&&Object.defineProperties(i.rule,{__fc__:Ct(g(i))}),this.update(e,!0)}function nn(e,t){for(var n=0;n<e.ctrlRule.length;n++){var i=e.ctrlRule[n];if(i.children===t)return i}}function on(e){return!!e.rule.__ctrl}function rn(e,t){return"function"==typeof t?""+t:t}Ge(tn.prototype,{getParentGroup:function(){for(var e=this.parent;e;){if(e.group)return e;e=e.parent}},loadChildrenPending:function(){var e=this,t=this.rule.children||[];return Array.isArray(t)?t:this.loadPending({key:"children",origin:t,def:[],onLoad:function(t){e.$handle&&e.$handle.loadChildren(t,e)},onUpdate:function(t,n){e.$handle&&(t===n?e.$handle.loadChildren(t,e):e.$handle.updateChildren(e,t,n))},onReload:function(t){e.$handle?e.$handle.updateChildren(e,[],t):delete e.pending.children}})},loadPending:function(e){var t=this,n=e.key,i=e.origin,o=e.def,r=e.onLoad,a=e.onReload,l=e.onUpdate;if(this.pending[n]&&this.pending[n].origin===i)return this.getPending(n,o);delete this.pending[n];var s=i;if(Oe.Function(i)){var c=Dt(function(){return i({rule:t.rule,api:t.$api,update:function(e){var r=e||o,a=t.getPending(n,o);t.setPending(n,i,r),l&&l(r,a)},reload:function(){var e=t.getPending(n,o);delete t.pending[n],a&&a(e),t.$api&&t.$api.sync(t.rule)}})});c&&Oe.Function(c.then)?(c.then(function(e){var a=e||o;t.setPending(n,i,a),r&&r(a),t.$api&&t.$api.sync(t.rule)}).catch(function(e){}),s=o,this.setPending(n,i,s)):(s=c||o,this.setPending(n,i,s),r&&r(s))}return s},getPending:function(e,t){return this.pending[e]&&this.pending[e].value||t},setPending:function(e,t,n){this.pending[e]={origin:t,value:p(n)}},effectData:function(e){return this.payload[e]||(this.payload[e]={}),this.payload[e]},clearEffectData:function(e){void 0===e?this.payload={}:delete this.payload[e]},updateKey:function(e){this.key=at(),e&&this.parent&&this.parent.updateKey(e)},updateType:function(){this.originType=this.rule.type,this.type=At(this.rule.type),this.trueType=this.$handle.getType(this.originType)},setParser:function(e){this.parser=e,e.init(this)},initProp:function(){var e,t,n=this,i=X({},this.rule);delete i.children,delete i.validate,this.prop=Tt({},[i].concat(re(Object.keys(this.payload).map(function(e){return n.payload[e]})),[this.computed])),this.prop.validate=[].concat(re((null===(e=this.refRule)||void 0===e||null===(t=e.__$validate)||void 0===t?void 0:t.value)||[]),re(this.prop.validate||[]))},initNone:function(){this.none=!(Oe.Undef(this.prop.display)||this.prop.display)},hasHidden:function(){return!!this.rule.hidden||!!this.parent&&this.parent.hasHidden()},injectValidate:function(){return this.prop.validate},check:function(e){return this.vm===e.vm},unwatch:function(){var e=this;this.watch.forEach(function(e){return e()}),this.watch=[],Object.keys(this.refRule).forEach(function(t){0!==t.indexOf("__$")&&delete e.refRule[t]})},unlink:function(){this.linkOn.forEach(function(e){return e()}),this.linkOn=[]},link:function(){this.unlink(),this.$handle.appendLink(this)},watchTo:function(){this.$handle.watchCtx(this)},delete:function(){this.unwatch(),this.unlink(),this.rmCtrl(),this.parent&&this.parent.children.splice(this.parent.children.indexOf(this)>>>0,1),Ge(this,{deleted:!0,computed:{},parent:null,children:[],cacheConfig:null,none:!1})},rmCtrl:function(){this.ctrlRule.forEach(function(e){return e.__fc__&&e.__fc__.rm()}),this.ctrlRule=[]},rm:function(){var e=this,t=function(){var t=e.root.indexOf(e.origin);t>-1&&(e.root.splice(t,1),e.$handle&&e.$handle.refresh())};this.deleted?t():this.$handle.noWatch(function(){e.$handle.deferSyncValue(function(){e.rmCtrl(),t(),e.$handle.rmCtx(e),Ge(e,{root:[]})},e.input)})},update:function(e,t){Ge(this,{deleted:!1,$handle:e,$render:e.$render,$api:e.api,vm:e.vm,vNode:e.$render.vNode,updated:!1,cacheValue:this.rule.value}),!t&&this.unwatch(),this.watchTo(),this.link(),this.updateType()}});var an={init:function(e){},toFormValue:function(e,t){return e},toValue:function(e,t){return e},mounted:function(e){},render:function(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultRender?t.$handle.fc.renderDriver.defaultRender(t,e):t.$render.defaultRender(t,e)},preview:function(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultPreview?t.$handle.fc.renderDriver.defaultPreview(t,e):this.render(e,t)},mergeProp:function(e){}},ln=["field","value","vm","template","name","config","control","inject","sync","payload","optionsTo","update","slotUpdate","computed","component","cache"],sn=Symbol("oldValue");function cn(e){var t=this;Ot(this,{options:function(){return e.options.value||{}},bus:function(){return e.bus},preview:function(){return null!=e.vm.props.preview?e.vm.props.preview:e.vm.setupState.parent&&null!=e.vm.setupState.parent.props.preview?e.vm.setupState.parent.props.preview:e.options.value.preview||!1}}),Ge(this,{fc:e,vm:e.vm,watching:!1,loading:!1,reloading:!1,noWatchFn:null,deferSyncFn:null,isMounted:!1,formData:p({}),subRuleData:p({}),subForm:{},form:p({}),appendData:{},ignoreFields:[],providers:{},cycleLoad:null,loadedId:1,nextTick:null,changeStatus:!1,pageEnd:!0,nextReload:function(){t.lifecycle("reload")}}),this.initData(e.rules),this.$manager=new e.manager(this),this.$render=new Zt(this),this.api=e.extendApiFn.reduce(function(e,n){var i=Dt(function(){return n(e,t)});return i&&i!==e&&Ge(e,i),e},function(e){function t(t){return Oe.Undef(t)?t=e.fields():Array.isArray(t)||(t=[t]),t}function n(t,n,i){Oe.Undef(t)?t=Object.keys(X(X({},e.fieldCtx),e.nameCtx)):Array.isArray(t)||(t=[t]),t.forEach(function(t){var o=e.fieldCtx[t]||e.nameCtx[t];o&&o.forEach(function(t){ze(t.rule,n,i),e.$render.clearCache(t)})})}function i(){var t=e.subForm;return Object.keys(t).reduce(function(e,n){var i=t[n];return i?(Array.isArray(i)?e.push.apply(e,re(i)):e.push(i),e):e},[])}var o={get isScope(){return!1===e.vm.props.subForm},get isPreview(){return e.preview},get config(){return e.options},set config(t){e.fc.options.value=t},get options(){return e.options},set options(t){e.fc.options.value=t},get form(){return e.form},get rule(){return e.rules},get parent(){return e.vm.setupState.parent&&e.vm.setupState.parent.setupState.fapi},get top(){return o.parent?o.parent.top:o},get scope(){for(var t=e.vm;t&&t.setupState.fapi;){if(!t.props.subForm)return t.setupState.fapi;t=t.setupState.parent}return o.top},get children(){return i()},get siblings(){var t=e.vm.setupState.getGroupInject();if(t){var n=t.getSubForm();if(Array.isArray(n))return re(n)}},get index(){var e=o.siblings;if(e){var t=e.indexOf(o);return t>-1?t:void 0}},get formulas(){return X({},e.fc.formulas)},formData:function(n){if(null==n||"boolean"==typeof n){var i={};return Object.keys(e.form).forEach(function(t){!0!==n&&-1!==e.ignoreFields.indexOf(t)||(i[t]=Xt(e.form[t]))}),i}return t(n).reduce(function(e,t){return e[t]=o.getValue(t),e},{})},getValue:function(t){var n=e.getFieldCtx(t);return n?Xt(n.rule.value):!1!==e.options.appendValue&&Me(e.appendData,t)?Xt(e.appendData[t]):void 0},coverValue:function(t){var n=X({},t||{});e.deferSyncValue(function(){e.appendData={},o.fields().forEach(function(i){var o=e.fieldCtx[i];if(o){var r=Me(t,i);o.forEach(function(e){e.rule.value=r?t[i]:void 0}),delete n[i]}}),Ge(e.appendData,n)},!0)},setValue:function(t){var n=t;arguments.length>=2&&(n=Z({},t,arguments[1])),e.deferSyncValue(function(){Object.keys(n).forEach(function(t){var i=e.fieldCtx[t];if(!i)return e.appendData[t]=n[t];i.forEach(function(e){e.rule.value=n[t]})})},!0)},removeField:function(t){var n=e.getCtx(t);return e.deferSyncValue(function(){e.getCtxs(t).forEach(function(e){e.rm()})},!0),n?n.origin:void 0},removeRule:function(e){var t=e&&Mt(e);if(t)return t.rm(),t.origin},fields:function(){return e.fields()},append:function(t,n,i){var o,r=e.sort.length-1,a=e.getCtx(n);if(a)if(i){if(o=a.getPending("children",a.rule.children),!Array.isArray(o))return;r=a.rule.children.length-1}else r=a.root.indexOf(a.origin),o=a.root;else o=e.rules;o.splice(r+1,0,t)},prepend:function(t,n,i){var o,r=0,a=e.getCtx(n);if(a)if(i){if(o=a.getPending("children",a.rule.children),!Array.isArray(o))return}else r=a.root.indexOf(a.origin),o=a.root;else o=e.rules;o.splice(r,0,t)},hidden:function(t,i){n(i,"hidden",!!t),e.refresh()},hiddenStatus:function(t){var n=e.getCtx(t);if(n)return!!n.rule.hidden},display:function(t,i){n(i,"display",!!t),e.refresh()},displayStatus:function(t){var n=e.getCtx(t);if(n)return!!n.rule.display},disabled:function(n,i){t(i).forEach(function(t){e.getCtxs(t).forEach(function(e){ze(e.rule.props,"disabled",!!n)})}),e.refresh()},all:function(t){return Object.keys(e.ctxs).map(function(n){var i=e.ctxs[n];return t?i.origin:i.rule})},model:function(t){return e.fields().reduce(function(n,i){var o=e.fieldCtx[i][0];return n[i]=t?o.origin:o.rule,n},{})},component:function(t){return Object.keys(e.nameCtx).reduce(function(n,i){var o=e.nameCtx[i].map(function(e){return t?e.origin:e.rule});return n[i]=1===o.length?o[0]:o,n},{})},bind:function(){return o.form},reload:function(t){e.reloadRule(t)},updateOptions:function(t){e.fc.updateOptions(t),o.refresh()},onSubmit:function(e){o.updateOptions({onSubmit:e})},sync:function(t){if(Array.isArray(t))t.forEach(function(e){return o.sync(e)});else{var n=Oe.Object(t)?Mt(t):e.getCtxs(t);n&&((n=Array.isArray(n)?n:[n]).forEach(function(t){if(!t.deleted){var n=e.subForm[t.id];n&&(Array.isArray(n)?n.forEach(function(e){e.refresh()}):n&&n.refresh()),e.$render.clearCache(t)}}),e.refresh())}},refresh:function(){i().forEach(function(e){e.refresh()}),e.$render.clearCacheAll(),e.refresh()},refreshOptions:function(){e.$manager.updateOptions(e.options),o.refresh()},hideForm:function(t){e.vm.setupState.isShow=!t},changeStatus:function(){return e.changeStatus},clearChangeStatus:function(){e.changeStatus=!1},updateRule:function(t,n){e.getCtxs(t).forEach(function(e){Ge(e.rule,n)})},updateRules:function(e){Object.keys(e).forEach(function(t){o.updateRule(t,e[t])})},mergeRule:function(t,n){e.getCtxs(t).forEach(function(e){Tt(e.rule,n)})},mergeRules:function(e){Object.keys(e).forEach(function(t){o.mergeRule(t,e[t])})},getRule:function(t,n){var i=e.getCtx(t);if(i)return n?i.origin:i.rule},findType:function(t,n){var i=void 0;return Object.keys(e.ctxs).forEach(function(o){var r=e.ctxs[o];r.rule.type===t&&(i=n?r.origin:r.rule)}),i},findTypes:function(t,n){var i=[];return Object.keys(e.ctxs).forEach(function(o){var r=e.ctxs[o];r.rule.type===t&&i.push(n?r.origin:r.rule)}),i},getRenderRule:function(t){var n=e.getCtx(t);if(n)return n.prop},getRefRule:function(t){var n=e.getCtxs(t);if(n){var i=n.map(function(e){return e.rule});return 1===i.length?i[0]:i}},setEffect:function(t,n,i){var o=e.getCtx(t);o&&n&&("$"===n[0]&&(n=n.substr(1)),Me(o.rule,"$"+n)&&ze(o.rule,"$"+n,i),Me(o.rule,"effect")||(o.rule.effect={}),ze(o.rule.effect,n,i))},clearEffectData:function(t,n){var i=e.getCtx(t);i&&(n&&"$"===n[0]&&(n=n.substr(1)),i.clearEffectData(n),o.sync(t))},updateValidate:function(e,t,i){i?o.mergeRule(e,{validate:t}):n(e,"validate",t)},updateValidates:function(e,t){Object.keys(e).forEach(function(n){o.updateValidate(n,e[n],t)})},refreshValidate:function(){o.refresh()},resetFields:function(n){t(n).forEach(function(t){e.getCtxs(t).forEach(function(t){e.$render.clearCache(t),t.rule.value=Xt(t.defaultValue)})}),f(function(){f(function(){f(function(){o.clearValidateState(n)})})}),null==n&&(Oe.Function(e.options.onReset)&&Dt(function(){return e.options.onReset(o)}),e.vm.emit("reset",o))},method:function(e,t){var n,i,r=o.el(e);if(!r||!r[t])throw new Error((n="err",i="".concat(t," 方法不存在"),"[form-create ".concat(n,"]: ").concat(i)+""));return function(){return r[t].apply(r,arguments)}},exec:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];return Dt(function(){return o.method(e,t).apply(void 0,i)})},toJson:function(e){return tt(o.rule,e)},trigger:function(e,t){for(var n=o.el(e),i=arguments.length,r=new Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];n&&n.$emit.apply(n,[t].concat(r))},el:function(t){var n=e.getCtx(t);if(n)return n.el||e.vm.refs[n.ref]},closeModal:function(t){e.bus.$emit("fc:closeModal:"+t)},getSubForm:function(t){var n=e.getCtx(t);return n?e.subForm[n.id]:void 0},getChildrenRuleList:function(t){var n="object"===J(t),i=n?Mt(t):e.getCtx(t),r=i?i.rule:n?t:o.getRule(t);if(!r)return[];var a,l=[];return(a=i?i.loadChildrenPending():r.children)&&a.forEach(function(e){"object"===J(e)&&(e.field&&l.push(e),l.push.apply(l,re(o.getChildrenRuleList(e))))}),l},getParentRule:function(t){return("object"===J(t)?Mt(t):e.getCtx(t)).parent.rule},getParentSubRule:function(t){var n="object"===J(t)?Mt(t):e.getCtx(t);if(n){var i=n.getParentGroup();if(i)return i.rule}},getChildrenFormData:function(e,t){return o.getChildrenRuleList(e).reduce(function(e,n){return!0===n.ignore&&!0!==t||(e[n.field]=Xt(n.value)),e},{})},setChildrenFormData:function(t,n,i){var r=o.getChildrenRuleList(t);e.deferSyncValue(function(){r.forEach(function(e){Me(n,e.field)?e.value=n[e.field]:i&&(e.value=void 0)})})},getGlobalEvent:function(e){var t=o.options.globalEvent[e];if(t)return"object"===J(t)&&(t=t.handle),it(t)},getGlobalData:function(t){return new Promise(function(n,i){var r=o.options.globalData[t];r?"fetch"===r.type?o.fetch(r).then(function(e){n(e)}).catch(i):n(r.data):n(e.fc.loadData[t])})},emitGlobalEvent:function(t){var n=o.getGlobalEvent(t);if(n){for(var i=e.getInjectData({},void 0),r=arguments.length,a=new Array(r>1?r-1:0),l=1;l<r;l++)a[l-1]=arguments[l];return i.args=[].concat(a),a.unshift(i),n.apply(null,a)}},setGlobalData:function(e,t){o.setData("$globalData."+e,t)},setGlobalVar:function(e,t){o.setData("$var."+e,t)},renderRule:function(t,n,i){var o="object"===J(t)?Mt(t):e.getCtx(t);return o?e.$render.createRuleVnode(o,n,i):void 0},renderChildren:function(t,n,i){var o="object"===J(t)?Mt(t):e.getCtx(t);return o?e.$render.createChildrenVnodes(o,n,i):void 0},nextTick:function(t){e.bus.$once("next-tick",t),e.refresh()},nextRefresh:function(t){e.nextRefresh(),t&&Dt(t)},deferSyncValue:function(t,n){e.deferSyncValue(t,n)},emit:function(t){var n;e.vm.emitsOptions&&!e.vm.emitsOptions[t]&&(e.vm.emitsOptions[t]=null);for(var i=arguments.length,o=new Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];(n=e.vm).emit.apply(n,[t].concat(o))},bus:e.bus,getCurrentFormRule:function(){var t;return null===(t=e.vm.setupState.getGroupInject())||void 0===t?void 0:t.rule},fetch:function(t){return new Promise(function(n,i){t=We(t),t=e.loadFetchVar(t);var r=function(e){Dt(function(){return t.onError&&t.onError(e)}),i(e)};e.beforeFetch(t).then(function(){return Kt(t,e.fc.create.fetch,o).then(function(e){Dt(function(){return t.onSuccess&&t.onSuccess(e)}),n(e)}).catch(function(e){r(e)})}).catch(function(e){r(e)})})},watchFetch:function(t,n,i,r){return e.fc.watchLoadData(function(a,l){var s=We(t);if(s=e.loadFetchVar(s,a),!r||!1!==r(s,l)){var c=function(e){Dt(function(){return s.onError&&s.onError(e)}),i&&i(e)};e.beforeFetch(s).then(function(){return Kt(s,e.fc.create.fetch,o).then(function(e){Dt(function(){return s.onSuccess&&s.onSuccess(e)}),n&&n(e,l)}).catch(function(e){c(e)})}).catch(function(e){c(e)})}},null==t.wait?1e3:t.wait)},getData:function(t,n){return e.fc.get?e.fc.get(t,n):e.fc.getLoadData(t,n)},watchData:function(t){return e.fc.watchLoadData(function(e,n){Dt(function(){return t(e,n)})})},setData:function(t,n,i){return e.fc.setData(t,n,i)},refreshData:function(t){return e.fc.refreshData(t)},t:function(t,n){return e.fc.t(t,n)},getLocale:function(){return e.fc.getLocale()},helper:{tidyFields:t,props:n}};return["on","once","off"].forEach(function(t){o[t]=function(){var n;(n=e.bus)["$".concat(t)].apply(n,arguments)}}),o.changeValue=o.changeField=o.setValue,o}(this))}Ge(cn.prototype,{initData:function(e){Ge(this,{ctxs:{},fieldCtx:{},nameCtx:{},sort:[],rules:e})},init:function(){this.updateAppendData(),this.useProvider(),this.usePage(),this.loadRule(),this.$manager.__init(),this.lifecycle("created")},updateAppendData:function(){this.appendData=X(X(X({},We(this.options.formData||{})),this.fc.vm.props.modelValue||{}),this.appendData)},isBreakWatch:function(){return this.loading||this.noWatchFn||this.reloading},globalBeforeFetch:function(e){var t=this;return new Promise(function(n,i){var o=t.options.beforeFetch&&Dt(function(){return t.options.beforeFetch(e,{api:t.api})});o&&Oe.Function(o.then)?o.then(n).catch(i):n()})},beforeFetch:function(e){var t=this;return new Promise(function(n,i){var o=e&&e.beforeFetch&&Dt(function(){return e.beforeFetch(e,{api:t.api})});o&&Oe.Function(o.then)?o.then(n).catch(i):!1===o?i():n()}).then(function(){return t.globalBeforeFetch(e)})},beforeSubmit:function(e){var t=this;return new Promise(function(n,i){var o=t.options.beforeSubmit&&Dt(function(){return t.options.beforeSubmit(e,{api:t.api})});o&&Oe.Function(o.then)?o.then(n).catch(i):!1===o?i():n()})}}),Ge(cn.prototype,{parseInjectEvent:function(e,t){var n=e.inject||this.options.injectEvent;return this.parseEventLst(e,t,n)},parseEventLst:function(e,t,n,i){var o=this;return Object.keys(t).forEach(function(r){var a=o.parseEvent(e,t[r],n,i);a&&(t[r]=a)}),t},parseEvent:function(e,t,n,i){if(Oe.Function(t)&&(!1!==n&&!Oe.Undef(n)||t.__inject))return this.inject(e,t,n);if(!i&&Array.isArray(t)&&t[0]&&(Oe.String(t[0])||Oe.Function(t[0])))return this.parseEventLst(e,t,n,!0);if(Oe.String(t)){var o=it(t);if(o&&t!==o)return o.__inject?this.parseEvent(e,o,n,!0):o}},parseEmit:function(e){var t=this,n={},i=e.rule,o=i.emitPrefix,r=i.field,a=i.name,l=i.inject,s=i.emit||[];return Oe.trueArray(s)&&s.forEach(function(e){if(e){var s,c=o||r||a;if(Oe.Object(e)&&(s=e.inject,c=(e=e.name).prefix||c),c){var u=Xe("".concat(c,"-").concat(e)),d=function(){var e,n,i;t.vm.emitsOptions&&!t.vm.emitsOptions[u]&&(t.vm.emitsOptions[u]=null);for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];(e=t.vm).emit.apply(e,[u].concat(r)),(n=t.vm).emit.apply(n,["emit-event",u].concat(r)),(i=t.bus).$emit.apply(i,[u].concat(r))};if(d.__emit=!0,s||!1!==l){var f=s||l||t.options.injectEvent;n[At(e)]=Oe.Undef(f)?d:t.inject(i,d,f)}else n[At(e)]=d}}}),e.computed.on=n,n},getInjectData:function(e,t){var n=e.__fc__&&e.__fc__.$api,i=(e.__fc__&&e.__fc__.$handle.vm||this.vm).props,o=i.option,r=i.rule;return{$f:n||this.api,api:n||this.api,rule:r,self:e.__origin__,option:o,inject:t}},inject:function(e,t,n){if(t.__origin){if(this.watching&&!this.loading)return t;t=t.__origin}var i=this,o=function(){for(var o=i.getInjectData(e,n),r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];return o.args=[].concat(a),a.unshift(o),t.apply(this,a)};return o.__origin=t,o.__json=t.__json,o},loadStrVar:function(e,t,n){var i=this;if(e&&"string"==typeof e&&e.indexOf("{{")>-1&&e.indexOf("}}")>-1){var o,r=e,a=function(e){for(var t,n=/{{\s*(.*?)\s*}}/g,i={};null!==(t=n.exec(e));)t[1]&&(i[t[1]]=!0);return Object.keys(i)}(e),l=function e(o){var r=[];o.forEach(function(t){t.key?r.push(t.key):t.children&&r.push(e(t.children))});var a=!1;return r.forEach(function(e,t){null==e||0!==e.indexOf("'")&&0!==e.indexOf('"')||(r[t]=e.slice(1,-1),a=!0)}),1!==r.length||!a&&isNaN(Number(r[0]))?function(e){var o,r=!1;if(n&&0===e.indexOf("$form.")){var a=e.split(".");a.shift(),Me(n.value,a[0])&&(r=!0,o=t?t({id:"$form."+a[0]+"_"+n.rule.__fc__.id,getValue:function(){return Bt(n.value,a)}}):Bt(n.value,a))}return r||(o=t?t(e):i.fc.getLoadData(e)),o}(r.join(".")):r[0]};if(a.forEach(function(t){var n=t.split("||"),i=n[0].trim();if(i){var r=(n[1]||"").trim(),a=Vt(i),s=Dt(function(){return l(a)});(null==s||""===s)&&n.length>1&&(s=r),o=s,e=e.replaceAll("{{".concat(t,"}}"),null==s?"":s)}}),1===a.length&&r==="{{".concat(a[0],"}}"))return o}return e},loadFetchVar:function(e,t,n){var i,o=this;n&&n.__fc__&&(i=n.__fc__.getParentGroup());var r=function(e){return o.loadStrVar(e,t,i?{rule:n,value:o.subRuleData[i.id]||{}}:null)};return e.action=r(e.action||""),["headers","data","query"].forEach(function(t){if(e[t]){var n=Array.isArray(e[t])?[]:{};Object.keys(e[t]).forEach(function(i){n[r(i)]=r(e[t][i])}),e[t]=n}}),e}}),function(e){Ge(e.prototype,{usePage:function(){var e=this,t=this.options.page;if(t){var n,i=25,o=(n=this.rules).length<31?31:Math.ceil(n.length/3);Oe.Object(t)&&(t.first&&(i=parseInt(t.first,10)||i),t.limit&&(o=parseInt(t.limit,10)||o)),Ge(this,{first:i,limit:o,pageEnd:this.rules.length<=i}),this.bus.$on("page-end",function(){return e.vm.emit("page-end",e.api)}),this.pageLoad()}},pageLoad:function(){var e=this;this.bus.$on(en,function t(){e.pageEnd?(e.bus.$off(en,t),e.bus.$emit("page-end")):(e.first+=e.limit,e.pageEnd=e.rules.length<=e.first,e.loadRule(),e.refresh())})}})}(cn),function(e){Ge(e.prototype,{clearNextTick:function(){this.nextTick&&clearTimeout(this.nextTick),this.nextTick=null},bindNextTick:function(e){var t=this;this.clearNextTick(),this.nextTick=setTimeout(function(){e(),t.nextTick=null},10)},render:function(){return++this.loadedId,this.vm.setupState.unique>0?this.$render.render():(this.vm.setupState.unique=1,[])}})}(cn),function(e){Ge(e.prototype,{nextRefresh:function(e){var t=this,n=this.loadedId;f(function(){n===t.loadedId&&(e?e():t.refresh())})},parseRule:function(e){var t=this,n=Rt(e);return Object.defineProperties(n,{__origin__:Ct(e)}),function(e){var t={props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0};Object.keys(t).forEach(function(n){Me(e,n)||(e[n]=t[n])})}(n),this.appendValue(n),[n,n.prefix,n.suffix].forEach(function(e){e&&t.loadFn(e,n)}),this.loadCtrl(n),n.update&&(n.update=it(n.update)),n},loadFn:function(e,t){var n=this;["on","props","deep"].forEach(function(i){e[i]&&n.parseInjectEvent(t,e[i])})},loadCtrl:function(e){e.control&&e.control.forEach(function(e){e.handle&&(e.handle=it(e.handle))})},syncProp:function(e){var t=this,n=e.rule;Oe.trueArray(n.sync)&&vt([{on:n.sync.reduce(function(e,i){return e["object"===J(i)&&i.event||"update:".concat(i)]=function(e){n.props["object"===J(i)&&i.prop||i]=e,t.vm.emit("sync",i,e,n,t.fapi)},e},{})}],e.computed)},loadRule:function(){var e=this;this.cycleLoad=!1,this.loading=!0,this.pageEnd&&this.bus.$emit("load-start"),this.deferSyncValue(function(){if(e._loadRule(e.rules),e.loading=!1,e.cycleLoad&&e.pageEnd)return e.loadRule();e.syncForm(),e.pageEnd&&e.bus.$emit("load-end"),e.vm.setupState.renderRule()})},loadChildren:function(e,t){if(this.cycleLoad=!1,this.loading=!0,this.bus.$emit("load-start"),this._loadRule(e,t),this.loading=!1,this.cycleLoad)return this.loadRule();this.syncForm(),this.bus.$emit("load-end"),this.$render.clearCache(t)},_loadRule:function(e,t){var n=this,i=function t(i){var o=e[i-1];if(!o||!o.__fc__)return i>0?t(i-1):-1;var r=n.sort.indexOf(o.__fc__.id);return r>-1?r:t(i-1)},o=function(e,t){Oe.trueArray(e)&&n._loadRule(e,t)},r=e.map(function(r,a){if((!t||Oe.Object(r))&&(n.pageEnd||t||!(a>=n.first))){if(r.__fc__&&r.__fc__.root===e&&n.ctxs[r.__fc__.id])return o(r.__fc__.loadChildrenPending(),r.__fc__),r.__fc__;var l,s=Rt(r),c=function(){return!(!s.field||!n.fieldCtx[s.field]||n.fieldCtx[s.field][0]===r.__fc__)};n.fc.targetFormDriver("loadRule",{rule:s,api:n.api},n.fc),n.ruleEffect(s,"init",{repeat:c()}),c()&&n.vm.emit("repeat-field",r,n.api);var u=!1,d=!!r.__fc__,f=s.value;if(d)if(f=(l=r.__fc__).defaultValue,l.deleted){if(on(l))return;l.update(n)}else if(!l.check(n)){if(on(l))return;e[a]=r=r._clone?r._clone():ot(tt(r)),l=null,u=!0}if(l)l.originType!==l.rule.type&&l.updateType(),n.bindParser(l),n.appendValue(l.rule),l.parent&&l.parent!==t&&n.rmSubRuleData(l);else{var p=n.parseRule(r);l=new tn(n,p,f),n.bindParser(l)}n.parseEmit(l),n.syncProp(l),l.parent=t||null,l.root=e,n.setCtx(l),u||d||(n.effect(l,"load"),n.targetHook(l,"load")),n.effect(l,"created");var h=l.loadChildrenPending();if(!1===l.parser.loadChildren||o(h,l),!t){var m=i(a);m>-1||!a?n.sort.splice(m+1,0,l.id):n.sort.push(l.id)}var g=l.rule;return l.updated||(l.updated=!0,Oe.Function(g.update)&&n.bus.$once("load-end",function(){n.refreshUpdate(l,g.value,"init")}),n.effect(l,"loaded")),n.refreshControl(l)&&(n.cycleLoad=!0),l}}).filter(function(e){return!!e});t&&(t.children=r)},refreshControl:function(e){return e.input&&e.rule.control&&this.useCtrl(e)},useCtrl:function(e){var t=this,n=function(e){var t=e.rule.control||[];return Oe.Object(t)?[t]:t}(e),i=[],o=this.api;if(!n.length)return!1;for(var r=function(t){var r=n[t],a=r.handle||function(e){return(Pt[r.condition||"=="]||Pt["=="])(e,r.value)};if(!Oe.trueArray(r.rule))return"continue";var l=X(X({},r),{},{valid:Dt(function(){return a(e.rule.value,o)}),ctrl:nn(e,r.rule),isHidden:Oe.String(r.rule[0])});if(l.valid&&l.ctrl||!l.valid&&!l.ctrl&&!l.isHidden)return"continue";i.push(l)},a=0;a<n.length;a++)r(a);if(!i.length)return!1;var l=[],s=!1;return this.deferSyncValue(function(){i.reverse().forEach(function(n){var i=n.isHidden,r=n.valid,a=n.rule,c=n.prepend,u=n.append,d=n.child,f=n.ctrl,p=n.method;if(i)return r?e.ctrlRule.push({__ctrl:!0,children:a,valid:r}):f&&e.ctrlRule.splice(e.ctrlRule.indexOf(f)>>>0,1),void l[r?"push":"unshift"](function(){"disabled"===p||"enabled"===p?t.api.disabled(!r,a):"display"===p||"show"===p?t.api.display(r,a):"required"===p?(a.forEach(function(e){t.api.setEffect(e,"required",r)}),r||t.api.clearValidateState(a)):t.api.hidden(!r,a)});if(r){s=!0;var h={type:"fragment",native:!0,__ctrl:!0,children:a};e.ctrlRule.push(h),t.bus.$once("load-start",function(){c?o.prepend(h,c,d):u||d?o.append(h,u||e.id,d):e.root.splice(e.root.indexOf(e.origin)+1,0,h)})}else{e.ctrlRule.splice(e.ctrlRule.indexOf(f),1);var m=Mt(f);m&&m.rm()}})}),l.length&&(this.loading?l.length&&this.bus.$once("load-end",function(){l.forEach(function(e){return e()})}):l.length&&f(function(){l.forEach(function(e){return e()})})),this.vm.emit("control",e.origin,this.api),this.effect(e,"control"),s},reloadRule:function(e){return this._reloadRule(e)},_reloadRule:function(e){var t=this;e||(e=this.rules);var n=X({},this.ctxs);this.clearNextTick(),this.initData(e),this.fc.rules=e,this.deferSyncValue(function(){t.bus.$once("load-end",function(){Object.keys(n).filter(function(e){return void 0===t.ctxs[e]}).forEach(function(e){return t.rmCtx(n[e])}),t.$render.clearCacheAll()}),t.reloading=!0,t.loadRule(),t.reloading=!1,t.refresh(),t.bus.$emit("reloading",t.api)}),this.bus.$off("next-tick",this.nextReload),this.bus.$once("next-tick",this.nextReload),this.bus.$emit("update",this.api)},refresh:function(){this.vm.setupState.refresh()}})}(cn),function(e){Ge(e.prototype,{setValue:function(e,t,n,i){var o=this;e.deleted||(e.rule.value=t,this.changeStatus=!0,this.nextRefresh(),this.$render.clearCache(e),this.setFormData(e,n),this.syncValue(),this.valueChange(e,t),this.vm.emit("change",e.field,t,e.origin,this.api,i||!1),this.effect(e,"value"),this.targetHook(e,"value",{value:t}),this.emitEvent("change",e.field,t,{rule:e.origin,api:this.api,setFlag:i||!1}),i&&f(function(){f(function(){f(function(){o.api.clearValidateState(e.id)})})}),this.$manager.fieldChange(e,t,n,i))},onInput:function(e,t){var n;e.input&&(this.isQuote(e,n=e.parser.toValue(t,e))||this.isChange(e,t))&&this.setValue(e,n,t)},onUpdateValue:function(e,t){var n=this;this.deferSyncValue(function(){var i=e.getParentGroup(),o=i?n.subRuleData[i.id]:null,r={};Object.keys(t||{}).forEach(function(e){o&&Me(o,e)?r[e]=t[e]:Me(n.api.form,e)?n.api.form[e]=t[e]:n.api.top!==n.api&&Me(n.api.top.form,e)&&(n.api.top.form[e]=t[e])}),Object.keys(r).length&&n.api.setChildrenFormData(i.rule,r)})},onBaseInput:function(e,t){this.setFormData(e,t),e.modelValue=t,this.nextRefresh(),this.$render.clearCache(e)},setFormData:function(e,t){e.modelValue=t;var n=e.getParentGroup();n&&(this.subRuleData[n.id]||(this.subRuleData[n.id]={}),this.subRuleData[n.id][e.field]=e.rule.value),ze(this.formData,e.id,t)},rmSubRuleData:function(e){var t=e.getParentGroup();t&&this.subRuleData[t.id]&&delete this.subRuleData[t.id][e.field]},getFormData:function(e){return this.formData[e.id]},syncForm:function(){var e=this,t=p({}),n=this.fields(),i=[];!1!==this.options.appendValue&&Object.keys(this.appendData).reduce(function(t,i){return-1===n.indexOf(i)&&(t[i]=u(e.appendData,i)),t},t),n.reduce(function(t,n){var o=(e.fieldCtx[n]||[]).filter(function(t){return!e.isIgnore(t)})[0];return o||(o=e.fieldCtx[n][0],i.push(n)),t[n]=u(o.rule,"value"),t},t),this.form=t,this.ignoreFields=i,this.syncValue()},isIgnore:function(e){return!0===e.rule.ignore||("hidden"===e.rule.ignore||this.options.ignoreHiddenFields)&&e.hasHidden()},appendValue:function(e){(e.field&&Me(this.appendData,e.field)||Oe.Undef(e.value)&&this.options.forceCoverValue)&&(e.value=this.appendData[e.field],delete this.appendData[e.field])},addSubForm:function(e,t){this.subForm[e.id]=t},deferSyncValue:function(e,t){this.deferSyncFn||(this.deferSyncFn=e),this.deferSyncFn.sync||(this.deferSyncFn.sync=t),Dt(e),this.deferSyncFn===e&&(this.deferSyncFn=null,e.sync&&this.syncForm())},syncValue:function(){var e=this;if(this.deferSyncFn)return this.deferSyncFn.sync=!0;var t={};Object.keys(this.form).forEach(function(n){-1===e.ignoreFields.indexOf(n)&&(t[n]=e.form[n])}),this.vm.setupState.updateValue(t)},isChange:function(e,t){return JSON.stringify(this.getFormData(e),rn)!==JSON.stringify(t,rn)},isQuote:function(e,t){return(t instanceof Function||Oe.Object(t)||Array.isArray(t))&&t===e.rule.value},refreshUpdate:function(e,t,n,i){var o=this;if(Oe.Function(e.rule.update)){var r=Dt(function(){return e.rule.update(t,e.origin,o.api,{origin:n||"change",linkField:i})});if(void 0===r)return;e.rule.hidden=!0===r}},valueChange:function(e,t){this.refreshRule(e,t),this.bus.$emit("change-"+e.field,t)},refreshRule:function(e,t,n,i){this.refreshControl(e)&&(this.$render.clearCacheAll(),this.loadRule(),this.bus.$emit("update",this.api),this.refresh()),this.refreshUpdate(e,t,n,i)},appendLink:function(e){var t=this,n=e.rule.link;Oe.trueArray(n)&&n.forEach(function(n){var i=function(){return t.refreshRule(e,e.rule.value,"link",n)};t.bus.$on("change-"+n,i),e.linkOn.push(function(){return t.bus.$off("change-"+n,i)})})},fields:function(){return Object.keys(this.fieldCtx)}})}(cn),function(e){Ge(e.prototype,{getCtx:function(e){return this.getFieldCtx(e)||this.getNameCtx(e)[0]||this.ctxs[e]},getCtxs:function(e){return this.fieldCtx[e]||this.nameCtx[e]||(this.ctxs[e]?[this.ctxs[e]]:[])},setIdCtx:function(e,t,n){var i="".concat(n,"Ctx");this[i][t]?this[i][t].push(e):this[i][t]=[e]},rmIdCtx:function(e,t,n){var i="".concat(n,"Ctx"),o=this[i][t];if(!o)return!1;var r=o.splice(o.indexOf(e)>>>0,1).length>0;return o.length||delete this[i][t],r},getFieldCtx:function(e){return(this.fieldCtx[e]||[])[0]},getNameCtx:function(e){return this.nameCtx[e]||[]},setCtx:function(e){var t=e.id,n=e.field,i=e.name,o=e.rule;this.ctxs[t]=e,i&&this.setIdCtx(e,i,"name"),e.input&&(this.setIdCtx(e,n,"field"),this.setFormData(e,e.parser.toFormValue(o.value,e)),this.isMounted&&!this.reloading&&this.vm.emit("change",e.field,o.value,e.origin,this.api,!1,!0))},getParser:function(e){var t=this.fc.parsers,n=this.fc.renderDriver;if(n){var i=n.parsers||{},o=i[e.originType]||i[At(e.type)]||i[e.trueType];if(o)return o}return t[e.originType]||t[At(e.type)]||t[e.trueType]||an},bindParser:function(e){e.setParser(this.getParser(e))},getType:function(e){var t=this.fc.CreateNode.aliasMap,n=t[e]||t[At(e)]||e;return At(n)},noWatch:function(e){this.noWatchFn||(this.noWatchFn=e),Dt(e),this.noWatchFn===e&&(this.noWatchFn=null)},watchCtx:function(e){var t=this;if(wt().filter(function(e){return"_"!==e[0]&&"$"!==e[0]&&-1===ln.indexOf(e)}).forEach(function(n){var i=u(e.rule,n),o="children"===n;e.refRule[n]=i,e.watch.push(h(o?function(){return Oe.Function(i.value)?i.value:re(i.value||[])}:function(){return i.value},function(r,a){var l=i.value;if(!t.isBreakWatch()){if(o&&!1===e.parser.loadChildren)return t.$render.clearCache(e),void t.nextRefresh();if(t.watching=!0,f(function(){t.targetHook(e,"watch",{key:n,oldValue:a,newValue:l})}),"hidden"===n&&Boolean(l)!==Boolean(a)&&(t.$render.clearCacheAll(),f(function(){t.targetHook(e,"hidden",{value:l})})),"ignore"===n&&e.input||"hidden"===n&&("hidden"===e.rule.ignore||t.options.ignoreHiddenFields))t.syncForm();else{if("link"===n)return void e.link();["props","on","deep"].indexOf(n)>-1?(t.parseInjectEvent(e.rule,l||{}),"props"===n&&e.input&&t.setFormData(e,e.parser.toFormValue(e.rule.value,e))):"emit"===n?t.parseEmit(e):["prefix","suffix"].indexOf(n)>-1?l&&t.loadFn(l,e.rule):"type"===n?(e.updateType(),t.bindParser(e)):o&&(Oe.Function(a)&&(a=e.getPending("children",[])),Oe.Function(l)&&(l=e.loadChildrenPending()),t.updateChildren(e,l,a))}t.$render.clearCache(e),t.refresh(),t.watching=!1}},{deep:!o,sync:o}))}),e.refRule.__$title=d(function(){var n=("object"===J(e.rule.title)?e.rule.title.title:e.rule.title)||"";if(n){var i=n.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);i&&(n=t.api.t(i[1]))}return n}),e.refRule.__$info=d(function(){var n=("object"===J(e.rule.info)?e.rule.info.info:e.rule.info)||"";if(n){var i=n.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);i&&(n=t.api.t(i[1]))}return n}),e.refRule.__$validate=d(function(){var n=function(n){var i,o,r=n.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);return r?t.api.t(r[1],{title:null===(i=e.refRule)||void 0===i||null===(o=i.__$title)||void 0===o?void 0:o.value}):n};return ce(e.rule.validate).map(function(i){var o=X({},i);if(o.message&&(o.message=n(o.message)),Oe.Function(o.validator)){var r=e;o.validator=function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=i.validator).call.apply(e,[{that:this,id:r.id,field:r.field,rule:r.rule,api:r.$handle.api}].concat(n))}}if(o.adapter){if("object"===J(o.error)){var a=X({},o.error);Object.keys(a).forEach(function(e){a[e]=n(a[e])}),o.error=a}return t.adapterValidate(o,e)}return o})}),e.input){var n=u(e.rule,"value");e.watch.push(h(function(){return n.value},function(){var i=e.parser.toFormValue(n.value,e);t.isChange(e,i)&&t.setValue(e,n.value,i,!0)}))}this.bus.$once("load-end",function(){var n=e.rule.computed;n&&("object"!==J(n)&&(n={value:n}),Object.keys(n).forEach(function(i){var o=d(function(){var o=n[i];if(o){var r=t.compute(e,o);return(o.linkage||o.linkageVariable)&&r===sn?sn:r}}),r=function(n){"value"===i?t.onInput(e,n):"$"===i[0]?t.api.setEffect(e.id,i,n):lt(e.rule,i,n)};("value"===i?[void 0,null,""].indexOf(e.rule.value)>-1:o.value!==Bt(e.rule,i))&&r(o.value),e.watch.push(h(o,function(e){e!==sn&&setTimeout(function(){r(e)})},{deep:!0}))}))}),this.watchEffect(e)},adapterValidate:function(e,t){var n=this;return this.$manager.adapterValidate({required:e.required,message:e.message,trigger:e.trigger},function(i,o){if(!1===(e.beforeValidate&&Dt(function(){return e.beforeValidate({value:i,api:n.api,validate:e,rule:t.rule})})))o();else{var r=n.validator(t,i,e);if(r){var a="";"object"===J(e.error)&&(a=e.error[r]||e.error.default),a||"string"!=typeof e.message||(a=e.message),a||(a=n.getValidateMessage(t,{key:r,rule:e[r]})),o(a)}else if(e.validator){var l=e.validator&&Dt(function(){return e.validator(i,o)});l&&Oe.Function(l.then)&&l.then(function(){return o()}).catch(function(e){return o(e)})}else o()}})},getValidateMessage:function(e,t){var n,i,o,r=Array.isArray(t.rule)?t.rule.join(","):""+t.rule;return this.api.t("required"===t.key?t.key:"validate."+t.key,(Z(o={},t.key,r),Z(o,"title",null===(n=e.refRule)||void 0===n||null===(i=n.__$title)||void 0===i?void 0:i.value),o))},validator:function(e,t,n){var i=this;if(Oe.empty(t))return n.required?"required":void 0;for(var o=function(){var n=oe(a[r],2),o=n[0],l=n[1];switch(o){case"len":case"maxLen":case"minLen":var s=function(e){return"len"===o?e===l:"maxLen"===o?e<=l:e>=l};if(Array.isArray(t)){if(!s(t.length))return{v:o}}else{if("object"===J(t))return{v:o};if(!s((""+t).length))return{v:o}}break;case"pattern":if(!("string"==typeof l?new RegExp(l):l).test(""+t))return{v:o};break;case"uppercase":if(l&&("string"!=typeof t||!/^[A-Z]*$/.test(t)))return{v:o};break;case"lowercase":if(l&&("string"!=typeof t||!/^[a-z]*$/.test(t)))return{v:o};break;case"min":case"max":case"positive":case"negative":case"integer":case"number":var c=Number(t);if(Number.isNaN(c))return{v:o};if("min"===o&&c<l)return{v:o};if("max"===o&&c>l)return{v:o};if("positive"===o&&c<=0)return{v:o};if("negative"===o&&c>=0)return{v:o};if("integer"===o&&!Number.isInteger(c))return{v:o};break;case"equal":if(t!==l)return{v:o};break;case"enum":if(Array.isArray(l)&&!l.includes(t))return{v:o};break;case"hasKeys":if("object"!==J(t)||Array.isArray(l)&&l.some(function(e){return!(e in t)}))return{v:o};break;case"email":if(!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(""+t))return{v:o};break;case"url":if(!new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i").test(""+t))return{v:o};break;case"ip":if(!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test(""+t))return{v:o};break;case"phone":if(!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(""+t))return{v:o};break;case"computed":if(!i.compute(e,l))return{v:o}}},r=0,a=Object.entries(n);r<a.length;r++){var l=o();if("object"===J(l))return l.v}},compute:function(e,t){var n,i=this;if("object"===J(t)){var o=e.getParentGroup(),r=function t(n){if(n=Array.isArray(n)?{mode:"AND",group:n}:n,!Oe.trueArray(n.group))return!0;for(var r="OR"===n.mode,a=!0,l=function(l){var s=n.group[l],c=void 0,u=null,d=null;if(s.variable)d=i.fc.getLoadData(s.variable);else if(s.field)u=jt(s.field||"");else if(!s.mode)return{v:!0};var f=s.compare;if(f&&(f=jt(f||"")),c=s.mode?t(s):!!Pt[s.condition]&&(Oe.Function(s.handler)?Dt(function(){return s.handler(i.api,e.rule)}):Dt(function(){return new Function("$condition","$variableVal","$val","$form","$scope","$group","$rule","with($form){with($scope){with(this){with($group){ return $condition['".concat(s.condition,"'](").concat(s.variable?"$variableVal":u,", ").concat(f||"$val","); }}}}")).call(i.api.form,Pt,d,s.value,i.api.top.form,i.api.top===i.api.scope?{}:i.api.scope.form,o&&i.subRuleData[o.id]||{},e.rule)})),r&&c)return{v:!0};r||(a=a&&c)},s=0;s<n.group.length;s++){var c=l(s);if("object"===J(c))return c.v}return!r&&a}(t);return r=!0===t.invert?!r:r,t.linkage?r?Dt(function(){return i.computeValue(t.linkage,e,o)},void 0):sn:t.linkageVariable?r?Dt(function(){return i.fc.getLoadData(t.linkageVariable)},void 0):sn:r}if(Oe.Function(t))n=function(){return t(i.api.form,i.api,e.rule)};else{var a=e.getParentGroup();n=function(){return i.computeValue(t,e,a)}}return Dt(n,void 0)},computeValue:function(e,t,n){var i=this,o=this,r=Object.keys(this.fc.formulas).reduce(function(e,n){return e[n]=function(){for(var e,i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(e=o.fc.formulas[n]).call.apply(e,[{that:this,rule:t.rule,api:o.api,fc:o.fc}].concat(r))},e},{});return Dt(function(){return new Function("$formulas","$form","$scope","$group","$rule","$api","with($form){with($scope){with(this){with($group){with($formulas){ return ".concat(e," }}}}}")).call(i.api.form,r,i.api.top.form,i.api.top===i.api.scope?{}:i.api.scope.form,n&&i.subRuleData[n.id]||{},t.rule,i.api)},void 0)},updateChildren:function(e,t,n){var i=this;this.deferSyncValue(function(){n&&n.forEach(function(n){-1===(t||[]).indexOf(n)&&n&&!Oe.String(n)&&n.__fc__&&n.__fc__.parent===e&&i.rmCtx(n.__fc__)}),Oe.trueArray(t)&&(i.loadChildren(t,e),i.bus.$emit("update",i.api))})},rmSub:function(e){var t=this;Oe.trueArray(e)&&e.forEach(function(e){e&&e.__fc__&&t.rmCtx(e.__fc__)})},rmCtx:function(e){var t=this;if(!e.deleted){var n=e.id,i=e.field,o=e.input,r=e.name;He(this.ctxs,n),He(this.formData,n),He(this.subForm,n),He(this.vm.setupState.ctxInject,n);var a=e.getParentGroup();a&&this.subRuleData[a.id]&&He(this.subRuleData[a.id],i),e.group&&He(this.subRuleData,n),o&&this.rmIdCtx(e,i,"field"),r&&this.rmIdCtx(e,r,"name"),o&&!Me(this.fieldCtx,i)&&He(this.form,i),this.deferSyncValue(function(){if(!t.reloading){if(!1!==e.parser.loadChildren){var n=e.getPending("children",e.rule.children);Oe.trueArray(n)&&n.forEach(function(e){return e&&e.__fc__&&t.rmCtx(e.__fc__)})}e.root===t.rules&&t.vm.setupState.renderRule()}},o);var l=this.sort.indexOf(n);return l>-1&&this.sort.splice(l,1),this.$render.clearCache(e),e.delete(),this.effect(e,"deleted"),this.targetHook(e,"deleted"),o&&!this.fieldCtx[i]&&this.vm.emit("remove-field",i,e.rule,this.api),e.rule.__ctrl||this.vm.emit("remove-rule",e.rule,this.api),e}}})}(cn),function(e){Ge(e.prototype,{mounted:function(){var e=this,t=function(){e.isMounted=!0,e.lifecycle("mounted")};this.pageEnd?t():this.bus.$once("page-end",t)},lifecycle:function(e){this.fc.targetFormDriver(e,this.api,this.fc),this.vm.emit(e,this.api),this.emitEvent(e,this.api)},emitEvent:function(e){for(var t,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var r=this.options[e]||this.options[At("on-"+e)];if(r){var a=it(r);Oe.Function(a)&&Dt(function(){return a.apply(void 0,i)})}(t=this.bus).$emit.apply(t,[e].concat(i))},targetHook:function(e,t,n){var i,o,r=this,a=function(t,i){t&&(t=Array.isArray(t)?t:[t]).forEach(function(t){Dt(function(){return t(X(X({args:Object.values(n||{})},n||{}),{},{self:e.rule,rule:e.rule,parent:null==i?void 0:i.rule,$f:r.api,api:r.api,option:r.vm.props.option}))})})};a(null===(i=e.prop)||void 0===i||null===(o=i.hook)||void 0===o?void 0:o[t]);for(var l="deep"+Je(t),s=e.parent;s;){var c,u;a(null===(c=s.prop)||void 0===c||null===(u=c.hook)||void 0===u?void 0:u[l],s),s=s.parent}}})}(cn),function(e){Ge(e.prototype,{useProvider:function(){var e=this,t=this.fc.providers;Object.keys(t).forEach(function(n){var i=t[n];Oe.Function(i)&&(i=i(e.fc)),i._c=function(e){var t=e.components;if(Array.isArray(t)){var n=function(e){return e.filter(function(e,t,n){return n.indexOf(e,0)===t})}(t.filter(function(e){return"*"!==e}));return!!n.length&&n}return!!Oe.String(t)&&[t]}(i),e.onEffect(i,n),e.providers[n]=i})},onEffect:function(e,t){var n=this,i=[];(e._c||["*"]).forEach(function(o){var r="*"===o?"*":n.getType(o);i.indexOf(r)>-1||(i.push(r),n.bus.$on("p:".concat(t||e.name,":").concat(r,":").concat(e.input?1:0),function(t,n){e[t]&&e[t].apply(e,re(n))}))}),e._used=i},watchEffect:function(e){var t=this,n={required:function(){var t,n;return(Me(e.rule,"$required")?e.rule.$required:null===(t=e.rule)||void 0===t||null===(n=t.effect)||void 0===n?void 0:n.required)||!1}};Object.keys(e.rule.effect||{}).forEach(function(t){n[t]=function(){return e.rule.effect[t]}}),Object.keys(e.rule).forEach(function(t){"$"===t[0]&&(n[t.substr(1)]=function(){return e.rule[t]})}),Object.keys(n).forEach(function(i){e.watch.push(h(n[i],function(n){t.effect(e,"watch",Z({},i,n))},{deep:!0}))})},ruleEffect:function(e,t,n){this.emitEffect({rule:e,input:!!e.field,type:this.getType(e.type)},t,n)},effect:function(e,t,n){this.emitEffect({rule:e.rule,input:e.input,type:e.trueType,ctx:e,custom:n},t)},getEffect:function(e,t){return Me(e,"$"+t)?e["$"+t]:Me(e,"effect")&&Me(e.effect,t)?e.effect[t]:void 0},emitEffect:function(e,t,n){var i=this,o=e.ctx,r=e.rule,a=e.input,l=e.type,s=e.custom;if(l&&!(["fcFragment","fragment"].indexOf(l)>-1)){var c=s||Object.keys(r).reduce(function(e,t){return"$"===t[0]&&(e[t.substr(1)]=r[t]),e},X({},r.effect||{}));Object.keys(c).forEach(function(e){var s=i.providers[e];if(s&&(!s.input||a)){var u;if(s._c){if(!(s._used.indexOf(l)>-1))return;u=l}else u="*";var d=X({value:c[e],getValue:function(){return i.getEffect(r,e)}},n||{});o&&(d.getProp=function(){return o.effectData(e)},d.clearProp=function(){return o.clearEffectData(e)},d.mergeProp=function(e){return Tt(d.getProp(),[e])},d.id=o.id),i.bus.$emit("p:".concat(e,":").concat(u,":").concat(s.input?1:0),t,[d,r,i.api])}})}}})}(cn);var un=e({name:"fcFragment",inheritAttrs:!1,props:["vnode"],render:function(){return this.vnode}});function dn(e,t){var n=e.directives;return n?(Array.isArray(n)||(n=[n]),y(t,n.reduce(function(e,t){return e.concat(function(e){return Object.keys(e).map(function(t){var n=e[t],i=O(t);if(i)return[i,n.value,n.arg,n.modifiers]}).filter(function(e){return!!e})}(t))},[]))):t}function fn(e){var t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&te(e,t)}(t,pn);var e=ie(t);function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.apply(this,arguments)}return t}();return Object.assign(t.prototype,e),t}function pn(e){Ge(this,{$handle:e,vm:e.vm,options:{},ref:"fcForm",mergeOptionsRule:{normal:["form","row","info","submitBtn","resetBtn"]}}),this.updateKey(),this.init()}Ge(pn.prototype,{__init:function(){var e=this;this.$render=this.$handle.$render,this.$r=function(){var t;return(t=e.$render).renderRule.apply(t,arguments)}},updateKey:function(){this.key=at()},init:function(){},update:function(){},beforeRender:function(){},form:function(){return this.vm.refs[this.ref]},adapterValidate:function(e,t){return e.validator=function(e,n,i){return t(n,i)},e},getSlot:function(e){return function t(n){if(n){var i=n.slots[e];return i||t(n.setupState.parent)}}(this.vm)},mergeOptions:function(e,t){var n=this;return vt(e.map(function(e){return n.tidyOptions(e)}),t,this.mergeOptionsRule)},updateOptions:function(e){this.$handle.fc.targetFormDriver("updateOptions",e,{handle:this.$handle,api:this.$handle.api}),this.options=this.mergeOptions([e],this.getDefaultOptions()),this.update()},tidyOptions:function(e){return e},tidyRule:function(e){},mergeProp:function(e){},getDefaultOptions:function(){return{}},fieldChange:function(e,t,n,i){},render:function(e){}});var hn={name:"componentValidate",load:function(e,t,n){var i=e.getValue();if(i&&!1!==i.method){Oe.Object(i)||(i={method:i});var o=i.method,r=X(X({},i),{},{validator:function(){var i=Mt(t);if(i){for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];return n.exec.apply(n,[i.id,Oe.String(o)?o:"formCreateValidate"].concat(a,[{attr:e,rule:t,api:n}]))}}});delete r.method,e.getProp().validate=[r]}else e.clearProp(),n.clearValidateState([t.field])},watch:function(){hn.load.apply(hn,arguments)}},mn={fetch:function(e){function t(t,i,o){var r=t.value;n.deleted(t),Oe.Function(r)&&(r=r(i,o)),r=function(e){return Oe.String(e)&&(e={action:e,to:"options"}),e}(r);var a=function(n){void 0===n?t.clearProp():lt(t.getProp(),r.to||"options",n),null!=n&&r&&r.key&&e.$handle.options.globalData[r.key]&&e.fetchCache.set(e.$handle.options.globalData[r.key],{status:!0,data:n}),o.sync(i)};if(r&&(r.action||r.key)){(r=We(r)).to||(r.to="options");var l=r.onError,s=function(){if(!t.getValue())return t.clearProp(),o.sync(i),!0};n._fn[t.id]=e.watchLoadData(qe(function(c,u){if(u&&!1===r.watch)return n._fn[t.id]();if(r.key){e.targetRule=i;var d=c("$globalData."+r.key);if(delete e.targetRule,d){if(s())return;a(d)}}else{var f=e.$handle.loadFetchVar(We(r),c,i),p=X(X({headers:{}},f),{},{onSuccess:function(e,t){if(!s()){var n=function(e){return t?e:Me(e,"data")?e.data:e},r=it(f.parse);Oe.Function(r)?n=r:r&&Oe.String(r)&&(n=function(e){return Bt(e,r)}),Ke(n(e,i,o)).then(function(e){a(e)})}},onError:function(e){a(void 0),s()||(l||function(e){e.message||f.action})(e,i,o)}});e.$handle.beforeFetch(p,{rule:i,api:o}).then(function(){Oe.Function(f.action)?Ke(f.action(i,o)).then(function(e){p.onSuccess(e,!0)}).catch(function(e){p.onError(e)}):Dt(function(){return e.create.fetch(p,{inject:t,rule:i,api:o})})}).catch(function(e){})}},r.wait||600))}else a(void 0)}var n={name:"fetch",_fn:[],loaded:function(){t.apply(void 0,arguments)},watch:function(){t.apply(void 0,arguments)},deleted:function(e){this._fn[e.id]&&(this._fn[e.id](),delete this._fn[e.id]),e.clearProp()}};return n},loadData:function(e){var t={name:"loadData",_fn:[],loaded:function(t,n,i){var o=this;this.deleted(t),f(function(){var r=ce(t.getValue()),a=[];r.forEach(function(o){if(o&&(o.attr||o.template)){var r=function(r){var a,l;n&&n.__fc__&&(a=n.__fc__.getParentGroup()),null!=(l=o.template?e.$handle.loadStrVar(o.template,r,a?{rule:n,value:e.$handle.subRuleData[a.id]||{}}:null):o.handler&&Oe.Function(o.handler)?o.handler(r,n,i):e.$handle.loadStrVar("{{".concat(o.attr,"}}"),r,a?{rule:n,value:e.$handle.subRuleData[a.id]||{}}:null))&&""!==l||null==o.default||(l=o.default),!1!==o.copy&&(l=We(l));var s=o.modify?n:t.getProp();"child"===o.to?s.children?s.children[0]=l:s.children=[l]:lt(s,o.to||"options",l),i.sync(n)},l=e.watchLoadData(function(e){return r(e)});r=qe(r,o.wait||300),!1!==o.watch?a.push(l):l()}}),o._fn[t.id]=a})},deleted:function(e){this._fn[e.id]&&(this._fn[e.id].forEach(function(e){e()}),delete this._fn[e.id]),e.clearProp()}};return t.watch=t.loaded,t},t:function(e){var t={name:"t",_fn:[],loaded:function(t,n,i){this.deleted(t);var o=t.getValue()||{},r=[];Object.keys(o).forEach(function(a){var l=o[a];if(l){var s="object"===J(l),c=function(o){var r=e.t(s?l.attr:l,s?l.params:null,o),c=s&&l.modify?n:t.getProp();"child"===a?c.children?c.children[0]=r:c.children=[r]:lt(c,a,r),i.sync(n)},u=e.watchLoadData(function(e){return c(e)});c=qe(c,l.wait||300),!1!==l.watch?r.push(u):u()}}),this._fn[t.id]=r},deleted:function(e){this._fn[e.id]&&(this._fn[e.id].forEach(function(e){e()}),delete this._fn[e.id]),e.clearProp()}};return t.watch=t.loaded,t},componentValidate:hn},gn={name:"html",loadChildren:!1,render:function(e,t){return t.prop.props.innerHTML=e.default(),t.vNode.make(t.prop.props.tag||"div",t.prop)},renderChildren:function(e){return{default:function(){return e.filter(function(e){return Oe.String(e)}).join("")}}}};function vn(e){e+="=";for(var t=decodeURIComponent(document.cookie).split(";"),n=0;n<t.length;n++){for(var i=t[n];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(e)){i=i.substring(e.length,i.length);try{return JSON.parse(i)}catch(o){return i}}}return null}function _n(e){var t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(n){return t}return null}function bn(e){var t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(n){return t}return null}function yn(e,t){if(!t)return null;var n=t.split("."),i=e(n.shift());return n.length?null==i?null:Bt(i,n):i}function xn(e){return yn(vn,e)}function wn(e){return yn(_n,e)}function An(e){return yn(bn,e)}var kn={en:{required:"{title} is required",validate:{url:"{title} is not a valid url",email:"{title} is not a valid email",ip:"{title} {title} is not a valid ip",phone:"{title} {title} is not a valid phone",pattern:"{title} does not match pattern {pattern}",uppercase:"{title} must be all uppercase",lowercase:"{title} must be all lowercased",positive:"{title} is not a positive number",negative:"{title} is not a negative number",equal:"{title} is not equal to {equal}",min:"{title} cannot be less than {min}",max:"{title} cannot be greater than {max}",enum:"{title} must be one of {enum}",hasKeys:"{title} does not contain required fields {hasKeys}",minLen:"{title} must be at least {minLen}",maxLen:"{title} cannot be longer than {maxLen}",len:"{title} must be exactly {len}",integer:"{title} is not an integer",number:"{title} is not an number"}},"zh-cn":{required:"{title}不能为空",validate:{url:"{title}不是有效的 url 地址",email:"{title}不是有效的邮箱地址",ip:"{title}不是有效的 IP 地址",phone:"{title}不是正确的手机号",pattern:"{title}必须匹配 {pattern}",uppercase:"{title}必须全大写",lowercase:"{title}必须全小写",positive:"{title}不是正数",negative:"{title}不是负数",equal:"{title}必须等于 {equal}",min:"{title}必须大于等于 {min}",max:"{title}必须小于等于 {max}",enum:"{title}必须是 {enum} 之一",hasKeys:"{title}必须包含 {hasKeys} 字段",minLen:"{title}长度必须大于 {minLen}",maxLen:"{title}长度必须小于 {maxLen}",len:"{title}长度必须为 {len}",integer:"{title}必须为整数",number:"{title}必须为数字"}}};function Cn(e,t){var n;return 2===arguments.length?t=(n=arguments[1])[e]:n=arguments[2],{id:t,prop:n}}function Sn(){return Cn.apply(void 0,["name"].concat(Array.prototype.slice.call(arguments)))}var En=1,Tn={},Rn=Symbol("defValue");function On(e){var n,i,o,r,a,l=Z({},un.name,un),s={},c={},u={},m={},g=[],y=[],A=[e.extendApi],k=X({},mn),C={create:$t,factory:Ut},S={global:{}},E=!0===e.isMobile,T=p({$mobile:E}),R=function(){var e={};function n(e){this.vm=e.vm,this.handle=e}return Ge(n.prototype,{make:function(e,t,n){return dn(t,this.h(e,It(t),n))},makeComponent:function(e,t,n){try{return dn(t,_(e,It(t),n))}catch(i){return _("")}},h:function(e,n,i){var o=(this.vm||v()).appContext.config.isNativeTag(e),r=this.handle.fc.prop.components[e];!r&&o&&delete n.formCreateInject;try{return _(r||(o?e:t(e)),n,i)}catch(a){return _("")}},aliasMap:e}),Ge(n,{aliasMap:e,alias:function(t,n){e[t]=n},use:function(t){Object.keys(t).forEach(function(i){var o=Xe(i),r=Qe(i).toLocaleLowerCase(),a=t[i];n.alias(i,a),[i,o,r].forEach(function(t){n.prototype[t]=function(n,o){return this.make(e[i]||t,n,o)}})})}}),n}(),O={},M={};function D(e){var t=Tn[e];return Array.isArray(t)?t.map(function(e){return e.api()}):t?t.api():void 0}function N(e){g.push(e)}function I(){var e=Sn.apply(void 0,arguments);e.id&&e.prop&&(c[e.id]=e.prop)}function L(){var e=Sn.apply(void 0,arguments);e.id&&e.prop&&(k[e.id]=Oe.Function(e.prop)?e.prop:X(X({},e.prop),{},{name:e.id}))}function F(e){R.use(e)}function P(e){if(0===arguments.length)return an;if("string"==typeof e&&1===arguments.length)return s[At(e)];var t=Sn.apply(void 0,arguments);if(!t.id||!t.prop)return an;var n=At(t.id),i=t.prop,o=!0===i.merge?s[n]:void 0;s[n]=Lt(i,o||an),C[n]=Ut(n),i.maker&&Ge(C,i.maker)}function B(e,t){var n;if(Oe.String(e)){if(n=e,void 0===t)return l[n]}else n=e.displayName||e.name,t=e;if(n&&t){var i=At(n);l[n]=t,l[i]=t,delete R.aliasMap[n],delete R.aliasMap[i],delete s[n],delete s[i],t.formCreateParser&&P(n,t.formCreateParser)}}function j(){return Ht(ie,l,c)}function V(){return un}function z(e,t){return Oe.Function(e.install)?e.install(H,t):Oe.Function(e)&&e(H,t),this}function H(e,t){var n=function(e,t){var n=j();return x({data:function(){return p({rule:e,option:t})},render:function(){return w(n,X({ref:"fc"},this.$data))}})}(e,t||{});g.forEach(function(e){Dt(function(){return e(H,n)})});var i=document.createElement("div");return((null==t?void 0:t.el)||document.body).appendChild(i),n.mount(i).$refs.fc.fapi}function U(t){var n=X({},e);return t?n.inherit={components:l,parsers:s,directives:c,modelFields:u,providers:k,useApps:g,maker:C,formulas:O,loadData:T}:delete n.inherit,On(n)}function W(e,t){u[e]=t}function Y(e,t){O[e]=t}function G(e,t){var n=m[e]||{},i=n.parsers||{};t.parsers&&Object.keys(t.parsers).forEach(function(e){i[e]=Lt(t.parsers[e],an)}),t.name=e,m[e]=X(X(X({},n),t),{},{parsers:i})}function $(e){e&&Object.keys(Tn).forEach(function(t){(Array.isArray(Tn[t])?Tn[t]:[Tn[t]]).forEach(function(t){t.bus.$emit("$loadData."+e)})})}function q(e,t){lt(T,e,t),$(e)}function Q(e,t){var n=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return Dt(function(){return t.apply(void 0,n)})};n._driver=!0,q(e,n)}function K(e,t){var n=(e||"").split(".");e=n.shift();var i=n.join(".");if(Me(T,e)||(T[e]=Rn),T[e]!==Rn){var o=T[e];return o&&o._driver?o=o(i):n.length&&(o=Bt(o,n)),null==o||""===o?t:o}return t}function ee(e){A.push(e)}function te(e){delete T[e],$(e)}function ne(e,t){y.push({name:e,callback:t})}function ie(t){var n=this;Ge(this,{id:En++,create:H,vm:t,manager:fn(e.manager),parsers:s,providers:k,modelFields:u,formulas:O,isMobile:E,rules:t.props.rule,name:t.props.name||at(),inFor:t.props.inFor,prop:{components:l,directives:c},get:null,drivers:m,renderDriver:null,refreshData:$,loadData:T,CreateNode:R,bus:new de,unwatch:[],options:b({}),extendApiFn:A,fetchCache:new WeakMap,tmpData:p({})}),y.forEach(function(e){n.bus.$on(e.name,e.callback)}),f(function(){h(n.options,function(){n.$handle.$manager.updateOptions(n.options.value),n.api().refresh()},{deep:!0})}),Ge(t.appContext.components,l),Ge(t.appContext.directives,c),this.$handle=new cn(this),this.name&&(this.inFor?(Tn[this.name]||(Tn[this.name]=[]),Tn[this.name].push(this)):Tn[this.name]=this)}function oe(t){Ge(t,{version:e.version,ui:e.ui,isMobile:E,extendApi:ee,getData:K,setDataDriver:Q,setData:q,removeData:te,refreshData:$,maker:C,component:B,directive:I,setModelField:W,setFormula:Y,setDriver:G,register:L,$vnode:V,parser:P,use:z,factory:U,componentAlias:F,copyRule:St,copyRules:Et,mergeRule:Tt,fetch:Qt,$form:j,parseFn:it,parseJson:ot,toJson:tt,useApp:N,getApi:D,on:ne})}if(n=e.attrs||{},i=n.key||[],o=n.array||[],r=n.normal||[],bt.push.apply(bt,re(i)),yt.push.apply(yt,re(o)),xt.push.apply(xt,re(r)),Yt([].concat(re(i),re(o),re(r))),Lt(H,M),ie.isMobile=E,Ge(ie.prototype,{init:function(){var e=this;this.isSub()&&this.unwatch.push(h(function(){return e.vm.setupState.parent.setupState.fc.options.value},function(){e.initOptions(),e.$handle.api.refresh()},{deep:!0,flush:"sync"})),this.vm.props.driver&&(this.renderDriver="object"===J(this.vm.props.driver)?this.vm.props.driver:this.drivers[this.vm.props.driver]),!this.renderDriver&&this.vm.setupState.parent&&(this.renderDriver=this.vm.setupState.parent.setupState.fc.renderDriver),this.renderDriver||(this.renderDriver=this.drivers.default),this.initOptions(),this.$handle.init()},targetFormDriver:function(e){for(var t,n=this,i=arguments.length,o=new Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];if((t=this.bus).$emit.apply(t,[e].concat(o)),this.renderDriver&&this.renderDriver[e])return Dt(function(){var t;return(t=n.renderDriver)[e].apply(t,o)})},t:function(e,t,n){var i=n?n("$t."+e):this.globalLanguageDriver(e);return null==i&&(i=""),i&&t&&Object.keys(t).forEach(function(e){var n=new RegExp("{".concat(e,"}"),"g");i=i.replace(n,t[e])}),i},globalDataDriver:function(e){var t=this,n=e.split("."),i=n.shift(),o=this.options.value.globalData&&this.options.value.globalData[i];if(o){if("static"===o.type)return Bt(o.data,n);var r,a=this.fetchCache.get(o);if(a){if(a.status&&(r=Bt(a.data,n)),!a.loading)return r;a.loading=!1,this.fetchCache.set(o,a)}else this.fetchCache.set(o,{status:!1});var l=qe(function(){c();var e=t.fetchCache.get(o);t.options.value.globalData&&-1!==Object.values(t.options.value.globalData).indexOf(o)?(e&&(e.loading=!0,t.fetchCache.set(o,e)),t.bus.$emit("$loadData.$globalData."+i)):t.fetchCache.delete(o)},o.wait||600),s=function(e){t.fetchCache.set(o,{status:!0,data:e}),t.bus.$emit("$loadData.$globalData."+i)},c=this.watchLoadData(function(e,n){if(n&&!1===o.watch)return c();if(n)l();else{var i=t.$handle.loadFetchVar($e(o),e);i.targetRule=t.targetRule,t.$handle.api.fetch(i).then(function(e){s(e)}).catch(function(e){s(null)})}});return!1===o.watch&&c(),this.unwatch.push(c),r}},getLocale:function(){var e=this.vm.setupState.top.props.locale;return e&&"object"===J(e)?e.name:"string"==typeof e?e:"zh-cn"},globalLanguageDriver:function(e){var t=this.vm.setupState.top.props.t,n=this.vm.setupState.top.props.locale,i=void 0;if(t&&(i=Dt(function(){return t(e)})),null==i&&n&&"object"===J(n)&&(i=Bt(n,e)),null==i){var o=this.options.value.language||{},r=this.getLocale();null==(i=Bt(o[r]||{},e))&&(i=Bt(kn[r]||{},e))}return i},globalVarDriver:function(e){var t=this,n=e.split("."),i=n.shift(),o=this.options.value.globalVariable&&this.options.value.globalVariable[i];if(o){var r=Oe.Function(o)?o:it(o.handle);if(r){var a=r(function(){var e;return(e=t.$handle.api).getData.apply(e,arguments)},this.$handle.api);return Bt(a,n)}}},setData:function(e,t,n){n?q(e,t):(lt(this.vm.setupState.top.setupState.fc.tmpData,e,t),this.bus.$emit("$loadData."+e))},getLoadData:function(e,t){var n=null;if(null!=e){var i=e.split("."),o=i.shift();if(null!=(n=Bt(this.vm.setupState.top.setupState.fc.tmpData,e)))return n;if("$topForm"===o)n=this.$handle.api.top.formData(!0);else if("$scopeForm"===o)n=this.$handle.api.scope.formData(!0);else if("$form"===o)n=this.$handle.api.formData(!0);else if("$options"===o)n=this.options.value;else if("$globalData"===o)n=this.globalDataDriver(i.join(".")),i=[];else if("$var"===o)n=this.globalVarDriver(i.join(".")),i=[];else if("$locale"===o)n=this.getLocale(),i=[];else if("$t"===o)n=this.globalLanguageDriver(i.join(".")),i=[];else{if("$preview"===o)return this.$handle.preview;n=K(e),i=[]}n&&i.length&&(n=Bt(n,i))}return null==n||""===n?t:n},watchLoadData:function(e,t){var n=this,i={},o=function(t){n.get||(n.get=r),Dt(function(){e(r,t)}),n.get===r&&(n.get=void 0)},r=function(e,r){var a;if("object"===J(e)&&(a=e.getValue,e=e.id),i[e])return i[e].val;var l=d(function(){return a?a():n.getLoadData(e,r)}),s=e.split("."),c=s.shift(),u=s.shift()||"",f=qe(function(){var t=a?a():n.getLoadData(e,r);i[e]&&((t instanceof Function||Oe.Object(t)||Array.isArray(t))&&t===i[e].val||JSON.stringify(t)!==JSON.stringify(i[e].val))&&(i[e].val=t,o(!0))},t||0),p=h(l,function(e){f()});return n.bus.$on("$loadData."+c,f),u&&n.bus.$on("$loadData."+c+"."+u,f),i[e]={fn:function(){n.bus.$off("$loadData."+c,f),u&&n.bus.$off("$loadData."+c+"."+u,f),p()},val:l.value},l.value};o(!1);var a=function(){Object.keys(i).forEach(function(e){return i[e].fn()}),i={}};return this.unwatch.push(a),a},isSub:function(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions:function(){this.options.value={};var e=X({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},We(S)),t=this.isSub();t&&(e=this.mergeOptions(e,this.vm.setupState.parent.setupState.fc.options.value||{},!0)),e=this.mergeOptions(e,this.vm.props.option);var n=this.api();this.targetFormDriver("initOptions",e,{api:n,isSubForm:t}),this.updateOptions(e)},mergeOptions:function(e,t,n){return t=X({},t||{}),n&&["page","onSubmit","onReset","onCreated","onChange","onMounted","mounted","onReload","reload","formData","el","globalClass","style"].forEach(function(e){delete t[e]}),t.global&&(e.global=function(e,t){return e?(Object.keys(t||{}).forEach(function(n){t[n]&&(e[n]=Tt(e[n]||{},t[n]))}),e):t}(e.global,t.global),delete t.global),this.$handle.$manager.mergeOptions([t],e),e},updateOptions:function(e){this.options.value=this.mergeOptions(this.options.value,e),this.$handle.$manager.updateOptions(this.options.value),this.bus.$emit("$loadData.$options")},api:function(){return this.$handle.api},render:function(){return this.$handle.render()},mounted:function(){this.$handle.mounted()},unmount:function(){var e=this;if(this.name)if(this.inFor){var t=Tn[this.name].indexOf(this);Tn[this.name].splice(t,1)}else delete Tn[this.name];y.forEach(function(t){e.bus.$off(t.name,t.callback)}),this.tmpData={},this.unwatch.forEach(function(e){return e()}),this.unwatch=[],this.$handle.reloadRule([])},updated:function(){var e=this;this.$handle.bindNextTick(function(){return e.bus.$emit("next-tick",e.$handle.api)})}}),oe(M),Ge(a=M,{create:H,install:function(t,n){S=X(X({},S),n||{});var i="_installedFormCreate".concat(E?"Mobile":"","_").concat(e.ui);if(!0!==t[i]){t[i]=!0;var o=function(e){return H(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})};oe(o),t.config.globalProperties.$formCreate=o;var r=j();t.component(r.name,r),g.forEach(function(e){Dt(function(){return e(a,t)})})}}}),Q("$cookie",xn),Q("$localStorage",wn),Q("$sessionStorage",An),R.use({fragment:"fcFragment"}),e.install&&H.use(e),N(function(e,t){t.mixin({props:["formCreateInject"]})}),P(gn),e.inherit){var ae=e.inherit;ae.components&&Ge(l,ae.components),ae.parsers&&Ge(s,ae.parsers),ae.directives&&Ge(c,ae.directives),ae.modelFields&&Ge(u,ae.modelFields),ae.providers&&Ge(k,ae.providers),ae.useApps&&Ge(g,ae.useApps),ae.maker&&Ge(C,ae.maker),ae.loadData&&Ge(T,ae.loadData),ae.formulas&&Ge(O,ae.formulas)}var le=j();return Lt(le,M),Object.defineProperties(le,{fetch:{get:function(){return M.fetch},set:function(e){M.fetch=e}}}),le.util=M,le}var Mn,Dn={date:"YYYY-MM-DD",month:"YYYY-MM",week:"YYYY-wo",datetime:"YYYY-MM-DD HH:mm:ss",timerange:"HH:mm:ss",daterange:"YYYY-MM-DD",monthrange:"YYYY-MM",datetimerange:"YYYY-MM-DD HH:mm:ss",year:"YYYY"},Nn="datePicker",In={name:Nn,maker:["year","month","date","dates","week","datetime","datetimeRange","dateRange","monthRange"].reduce(function(e,t){return e[t]=Ut(Nn,{type:t.toLowerCase()}),e},{}),mergeProp:function(e){var t=e.prop.props;t.valueFormat||(t.valueFormat=Dn[t.type]||Dn.date)}},Ln="hidden",Fn={name:Ln,maker:Z({},Ln,function(e,t){return Ut(Ln)("",e,t)}),render:function(){return[]}},Pn="input",Bn="slider",jn="timePicker",Vn=[In,Fn,{name:Pn,maker:(Mn=["password","url","email","text","textarea"].reduce(function(e,t){return e[t]=Ut(Pn,{type:t}),e},{}),Mn.idate=Ut(Pn,{type:"date"}),Mn),mergeProp:function(e){var t=e.prop.props;t&&t.autosize&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},{name:"textarea",mergeProp:function(e){var t=e.prop.props;t.type="textarea",t&&t.autosize&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},{name:Bn,maker:{sliderRange:Ut(Bn,{range:!0})},toFormValue:function(e,t){var n=Array.isArray(e),i=t.prop.props,o=i.min||0;return!0===i.range?n?e:[o,parseFloat(e)||o]:n?parseFloat(e[0])||o:parseFloat(e)}},{name:jn,maker:{time:Ut(jn,function(e){return e.props.isRange=!1}),timeRange:Ut(jn,function(e){return e.props.isRange=!0})},mergeProp:function(e){var t=e.prop.props;t.valueFormat||(t.valueFormat="HH:mm:ss")}},{name:"FcRow",render:function(e,t){return t.vNode.col({props:{span:24}},{default:function(){return[t.vNode.row(t.prop,e)]}})}},{name:"select",toFormValue:function(e,t){return t.prop.props.multiple&&!Array.isArray(e)?ce(e):e}}],zn={button:"el-button",icon:"el-icon",slider:"el-slider",rate:"el-rate",upload:"fc-upload",cascader:"el-cascader",popover:"el-popover",tooltip:"el-tooltip",colorPicker:"el-colorPicker",timePicker:"el-time-picker",timeSelect:"el-time-select",datePicker:"el-date-picker",switch:"el-switch",select:"fc-select",checkbox:"fc-checkbox",radio:"fc-radio",inputNumber:"el-input-number",number:"el-input-number",input:"el-input",textarea:"el-input",formItem:"el-form-item",form:"el-form",frame:"fc-frame",col:"el-col",row:"el-row",tree:"fc-tree",autoComplete:"el-autocomplete",auto:"el-autocomplete",group:"fc-group",array:"fc-group",object:"fc-sub-form",subForm:"fc-sub-form"};function Hn(e,t){var n;Me(e,t)&&(Oe.String(e[t])&&(e[t]=(Z(n={},t,e[t]),Z(n,"show",!0),n)))}function Un(e){return!1===e}function Wn(e){var t=X({},e);return delete t.children,t}var Yn={validate:function(){var e=this.form();return e?e.validate():new Promise(function(e){return e()})},validateField:function(e){var t=this;return new Promise(function(n,i){var o=t.form();o?o.validateField(e,function(e,t){t?i(t):n(e)}):n()})},clearValidateState:function(e){var t=this.vm.refs[e.wrapRef];t&&t.clearValidate()},fieldChange:function(e,t,n,i){var o,r;i||(null===(o=this.vm.refs[e.wrapRef])||void 0===o||null===(r=o.validate("change"))||void 0===r||r.catch(function(){}))},tidyOptions:function(e){return["submitBtn","resetBtn","row","info","wrap","col","title"].forEach(function(t){!function(e,t){Me(e,t)&&!Oe.Object(e[t])&&(e[t]={show:!!e[t]})}(e,t)}),e},tidyRule:function(e){var t=e.prop;return Hn(t,"title"),Hn(t,"info"),t},mergeProp:function(e){var t=this,n={info:{trigger:"hover",placement:"top-start",icon:!0},title:{},col:{span:24},wrap:{}};["info","wrap","col","title"].forEach(function(i){e.prop[i]=vt([t.options[i]||{},e.prop[i]||{}],n[i])})},getDefaultOptions:function(){return{form:{inline:!1,labelPosition:"right",labelWidth:"125px",disabled:!1,size:void 0},row:{show:!0,gutter:0},submitBtn:{type:"primary",loading:!1,disabled:!1,innerText:"",show:!0,col:void 0,click:void 0},resetBtn:{type:"default",loading:!1,disabled:!1,innerText:"",show:!1,col:void 0,click:void 0}}},update:function(){var e=this.options.form;this.rule={props:X({},e),on:{submit:function(e){e.preventDefault()}},style:e.style,type:"form"}},beforeRender:function(){var e=this.key,t=this.ref,n=this.$handle,i=this.options.form;Ge(this.rule,{key:e,ref:t,class:[i.className,i.class,"form-create",this.$handle.preview?"is-preview":""]}),Ge(this.rule.props,{model:n.formData})},render:function(e){var t=this;return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,function(){return t.makeFormBtn()}),this.$r(this.rule,Un(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap:function(e,t){var n=this,i=e.prop,o="".concat(this.key).concat(e.key),r=i.col,a=this.isTitle(i)&&!1!==i.wrap.title,l=r.labelWidth||a?r.labelWidth:0,s=this.rule.props,c=s.inline,u=s.col,d=i.wrap.class;delete i.wrap.class,delete i.wrap.title;var f=Un(i.wrap.show)?t:this.$r(vt([i.wrap,{props:X(X({labelWidth:void 0===l?l:Qe(l),label:a?i.title.title:void 0},Wn(i.wrap||{})),{},{prop:e.id,rules:e.injectValidate()}),class:this.$render.mergeClass(d||i.className,"fc-form-item"),key:"".concat(o,"fi"),ref:e.wrapRef,type:"formItem"}]),X({default:function(){return t}},a?{label:function(){return n.makeInfo(i,o,e)}}:{}));return!0===c||Un(u)||Un(r.show)?f:this.makeCol(i,o,[f])},isTitle:function(e){if(!1===this.options.form.title)return!1;var t=e.title;return!(!t.title&&!t.native||Un(t.show))},makeInfo:function(e,t,n){var i,o,r,a,l=this,s=X({},e.title),c=X({},e.info),u="tooltip"===c.type,d=this.options.form,f=this.getSlot("title"),p=[f?f({title:null===(i=n.refRule)||void 0===i||null===(o=i.__$title)||void 0===o?void 0:o.value,rule:n.rule,options:this.options}):(null===(r=n.refRule)||void 0===r||null===(a=r.__$title)||void 0===a?void 0:a.value)+(d.labelSuffix||d["label-suffix"]||"")];if(!Un(c.show)&&(c.info||c.native)&&!Un(c.icon)){var h={type:c.type||"popover",props:Wn(c),key:"".concat(t,"pop")};delete h.props.icon,delete h.props.show,delete h.props.info,delete h.props.align,delete h.props.native;var m,g,v="content";if(c.info&&!Me(h.props,v))h.props[v]=null===(m=n.refRule)||void 0===m||null===(g=m.__$info)||void 0===g?void 0:g.value;p["left"!==c.align?"unshift":"push"](this.$r(vt([c,h]),Z({},s.slot||(u?"default":"reference"),function(){return l.$r({type:"ElIcon",style:"top:2px",key:"".concat(t,"i")},{default:function(){return l.$r({type:!0===c.icon?"icon-warning":c.icon})}},!0)})))}var _=vt([s,{props:Wn(s),key:"".concat(t,"tit"),class:"fc-form-title",type:s.type||"span",on:{click:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];l.$handle.targetHook(n,"titleClick",{args:t})}}}]);return delete _.props.show,delete _.props.title,delete _.props.native,this.$r(_,p)},makeCol:function(e,t,n){var i=e.col;return this.$r({class:this.$render.mergeClass(i.class,"fc-form-col"),type:"col",props:i||{span:24},key:"".concat(t,"col")},n)},makeRow:function(e){var t=this.options.row||{};return this.$r({type:"row",props:t,class:this.$render.mergeClass(t.class,"fc-form-row"),key:"".concat(this.key,"row")},e)},makeFormBtn:function(){var e=[];if(Un(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),Un(this.options.resetBtn.show)||e.push(this.makeResetBtn()),e.length){var t=this.$r({type:"formItem",class:"fc-form-item",key:"".concat(this.key,"fb")},e);return!0===this.rule.props.inline?t:this.$r({type:"col",class:"fc-form-col fc-form-footer",props:{span:24},key:"".concat(this.key,"fc")},[t])}},makeResetBtn:function(){var e=this,t=X({},this.options.resetBtn),n=t.innerText||this.$handle.api.t("reset")||"重置";return delete t.innerText,delete t.click,delete t.col,delete t.show,this.$r({type:"button",props:t,class:"fc-reset-btn",style:{width:t.width},on:{click:function(){var t=e.$handle.api;e.options.resetBtn.click?e.options.resetBtn.click(t):t.resetFields()}},key:"".concat(this.key,"b2")},[n])},makeSubmitBtn:function(){var e=this,t=X({},this.options.submitBtn),n=t.innerText||this.$handle.api.t("submit")||"提交";return delete t.innerText,delete t.click,delete t.col,delete t.show,this.$r({type:"button",props:t,class:"fc-submit-btn",style:{width:t.width},on:{click:function(){var t=e.$handle.api;e.options.submitBtn.click?e.options.submitBtn.click(t):t.submit().catch(function(){})}},key:"".concat(this.key,"b1")},[n])}},Gn={};!function(e){["group","tree","switch","upload","autoComplete","checkbox","cascader","colorPicker","datePicker","frame","inputNumber","radio","rate"].forEach(function(t){e[t]=Ut(t)}),e.auto=e.autoComplete,e.number=e.inputNumber,e.color=e.colorPicker}(Gn),function(e){var t="select",n="multiple";e.selectMultiple=Ut(t,Z({},n,!0)),e.selectOne=Ut(t,Z({},n,!1))}(Gn),function(e){var t={treeSelected:"selected",treeChecked:"checked"};Object.keys(t).reduce(function(e,n){return e[n]=Ut("tree",{type:t[n]}),e},e)}(Gn),function(e){var t={image:["image",0],file:["file",0],uploadFileOne:["file",1],uploadImageOne:["image",1]};Object.keys(t).reduce(function(e,n){return e[n]=Ut("upload",function(e){return e.props({uploadType:t[n][0],maxLength:t[n][1]})}),e},e),e.uploadImage=e.image,e.uploadFile=e.file}(Gn),function(e){var t={frameInputs:["input",0],frameFiles:["file",0],frameImages:["image",0],frameInputOne:["input",1],frameFileOne:["file",1],frameImageOne:["image",1]};Object.keys(t).reduce(function(e,n){return e[n]=Ut("frame",function(e){return e.props({type:t[n][0],maxLength:t[n][1]})}),e},e),e.frameInput=e.frameInputs,e.frameFile=e.frameFiles,e.frameImage=e.frameImages}(Gn);function $n(e,t){return Oe.Boolean(e)?e={show:e}:Oe.Undef(e)||Oe.Object(e)||(e={show:t}),e}function qn(e,t){return{formEl:function(){return t.$manager.form()},wrapEl:function(e){var n=t.getFieldCtx(e);if(n)return t.vm.refs[n.wrapRef]},validate:function(n){return new Promise(function(i,o){var r=e.children,a=[t.$manager.validate()];r.filter(function(e){return!e.isScope}).forEach(function(e){a.push(e.validate())}),Promise.all(a).then(function(){i(!0),n&&n(!0)}).catch(function(i){o(i),n&&n(i),t.vm.emit("validate-fail",i,{api:e}),t.emitEvent("validate-fail",i,{api:e})})})},validateField:function(n,i){return new Promise(function(o,r){var a=t.getFieldCtx(n);if(a){var l=t.subForm[a.id],s=[t.$manager.validateField(a.id)];ce(l).filter(function(e){return!e.isScope}).forEach(function(e){s.push(e.validate())}),Promise.all(s).then(function(){o(null),i&&i(null)}).catch(function(o){r(o),i&&i(o),t.vm.emit("validate-field-fail",o,{field:n,api:e})})}})},clearValidateState:function(n){var i=this,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.helper.tidyFields(n).forEach(function(e){o&&i.clearSubValidateState(e),t.getCtxs(e).forEach(function(e){t.$manager.clearValidateState(e)})})},clearSubValidateState:function(n){e.helper.tidyFields(n).forEach(function(e){t.getCtxs(e).forEach(function(e){var n=t.subForm[e.id];n&&(Array.isArray(n)?n.forEach(function(e){e.clearValidateState()}):n&&n.clearValidateState())})})},btn:{loading:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.submitBtnProps({loading:!!t})},disabled:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.submitBtnProps({disabled:!!t})},show:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.submitBtnProps({show:!!t})}},resetBtn:{loading:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.resetBtnProps({loading:!!t})},disabled:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.resetBtnProps({disabled:!!t})},show:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.resetBtnProps({show:!!t})}},submitBtnProps:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=$n(t.options.submitBtn,!0);Ge(i,n),t.options.submitBtn=i,e.refreshOptions()},resetBtnProps:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=$n(t.options.resetBtn,!1);Ge(i,n),t.options.resetBtn=i,e.refreshOptions()},submit:function(n,i){return new Promise(function(o,r){(!1===t.options.validateOnSubmit?Promise.resolve():e.validate()).then(function(){var i=e.formData();t.beforeSubmit(i).then(function(){Oe.Function(n)&&Dt(function(){return n(i,e)}),Oe.Function(t.options.onSubmit)&&Dt(function(){return t.options.onSubmit(i,e)}),t.vm.emit("submit",i,e),o(i)}).catch(function(e){})}).catch(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];Oe.Function(i)&&Dt(function(){return i.apply(void 0,[e].concat(n))}),r.apply(void 0,n)})})}}}fe(".form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before,.form-create.is-preview .fc-clock{display:none!important}.fc-wrap-right>.el-form-item__label{display:flex;justify-content:flex-end}.fc-wrap-left>.el-form-item__label{display:flex;justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item>.el-form-item__label{display:block;float:unset;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.el-form--large .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item>.el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}");var Qn={name:"required",load:function(e,t,n){var i=function(e){return Oe.Boolean(e)?{required:e}:Oe.String(e)?{message:e}:Oe.Undef(e)?{required:!1}:Oe.Function(e)?{validator:e}:Oe.Object(e)?e:{}}(e.getValue()),o=void 0;if(!1===i.required)e.clearProp(),n.clearValidateState([t.field]);else{var r=X({required:!0,validator:function(e,t,n){a(),Oe.empty(t)?n(r.message):n()}},i),a=function(){var e,a=null===(e=t.__fc__.refRule.__$title)||void 0===e?void 0:e.value;if(o!==a)if(o=a,i.message){var l=i.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);l&&(r.message=n.t(l[1],{title:a}))}else r.message=n.t("required",{title:a})||a+("en"===n.getLocale()?" is required":"不能为空")};a(),e.getProp().validate=[r]}n.sync(t)},watch:function(){Qn.load.apply(Qn,arguments)}};function Kn(e){e.componentAlias(zn),pt.forEach(function(t){e.component(t.name,t)}),e.register(Qn),Vn.forEach(function(t){e.parser(t)}),Object.keys(Gn).forEach(function(t){e.maker[t]=Gn[t]}),"undefined"!=typeof window&&window.ElementPlus&&e.useApp(function(e,t){t.use(window.ElementPlus)})}var Xn=On({ui:"element-ui",version:"3.2.37",manager:Yn,extendApi:qn,install:Kn,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}});"undefined"!=typeof window&&(window.formCreate=Xn),Xn.maker,
/*!
* FormCreate 可视化表单设计器
* @form-create/designer v3.4.0
* (c) 2021-2025 xaboy
* Github https://github.com/xaboy/form-create-designer
* Site https://form-create.com/
* Released under the MIT License.
*/
function(){try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.CodeMirror{color:#000;direction:ltr;font-family:monospace;height:300px}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{background-color:#f7f7f7;border-right:1px solid #ddd;white-space:nowrap}.CodeMirror-linenumber{color:#999;min-width:20px;padding:0 3px 0 5px;text-align:right;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{background:#7e7;border:0!important;width:auto}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:-50px}.CodeMirror-ruler{border-left:1px solid #ccc;bottom:0;position:absolute;top:0}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff;overflow:hidden;position:relative}.CodeMirror-scroll{height:100%;margin-bottom:-50px;margin-right:-50px;outline:none;overflow:scroll!important;padding-bottom:50px;position:relative;z-index:0}.CodeMirror-sizer{border-right:50px solid transparent;position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{display:none;outline:none;position:absolute;z-index:5}.CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:scroll;right:0;top:0}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-x:scroll;overflow-y:hidden}.CodeMirror-scrollbar-filler{bottom:0;right:0}.CodeMirror-gutter-filler{bottom:0;left:0}.CodeMirror-gutters{left:0;min-height:100%;position:absolute;top:0;z-index:3}.CodeMirror-gutter{display:inline-block;height:100%;margin-bottom:-50px;vertical-align:top;white-space:normal}.CodeMirror-gutter-wrapper{background:none!important;border:none!important;position:absolute;z-index:4}.CodeMirror-gutter-background{bottom:0;position:absolute;top:0;z-index:4}.CodeMirror-gutter-elt{cursor:default;position:absolute;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{word-wrap:normal;-webkit-tap-highlight-color:transparent;background:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-variant-ligatures:contextual;line-height:inherit;margin:0;overflow:visible;position:relative;white-space:pre;z-index:2}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}.CodeMirror-linewidget{padding:.1px;position:relative;z-index:2}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}.CodeMirror-cursor{pointer-events:none;position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{position:relative;visibility:hidden;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.CodeMirror-hints{background:#fff;border:1px solid silver;border-radius:3px;box-shadow:2px 3px 5px #0003;font-family:monospace;font-size:90%;list-style:none;margin:0;max-height:20em;overflow:hidden;overflow-y:auto;padding:2px;position:absolute;z-index:1}.CodeMirror-hint{border-radius:2px;color:#000;cursor:pointer;margin:0;padding:0 4px;white-space:pre}li.CodeMirror-hint-active{background:#08f;color:#fff}._fd-fn{display:flex;flex-direction:column;height:100%;position:relative;width:100%}._fd-fn .el-button{bottom:3px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;position:absolute;right:5px}._fd-fn-editor{display:flex;flex:1;overflow:auto;width:100%}._fd-fn-editor .CodeMirror{height:100%;width:100%}._fd-fn-tip{color:#000;direction:ltr;font-family:monospace}._fd-fn-tip .cm-keyword{color:#708;line-height:24px;overflow-x:auto;white-space:nowrap}._fd-fn-tip .cm-keyword::-webkit-scrollbar{background-color:transparent;height:0;width:0}._fd-fn-ind{background-color:#f7f7f7;border-right:1px solid #ddd;display:inline-block;float:left;height:24px;margin-right:4px;width:29px}._fd-fn-arg{cursor:pointer;text-decoration:underline}._fd-fn-arg i{color:#3073ff;font-size:12px}._fd-fn-info a{text-decoration:underline}._fd-event .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-event .el-badge{width:100%}._fd-event-dialog .el-dialog__body{padding:10px 20px}._fd-event-con .el-main{padding:0}._fd-event-l,._fd-event-r{border:1px solid #ececec;display:flex;flex:1;flex-direction:column;height:100%}._fd-event-dropdown .el-dropdown-menu{max-height:500px;overflow:auto}._fd-event-head{align-items:center;background:#f8f9ff;border-bottom:1px solid #eee;display:flex;padding:5px 15px}._fd-event-head .el-button.is-link{color:#2f73ff}._fd-event-r{border-left:0}._fd-event-r ._fd-event-head{justify-content:space-between}._fd-event-l>.el-main,._fd-event-r>.el-main{box-sizing:border-box;display:flex;flex:1;flex-basis:auto;flex-direction:row;min-width:0;width:100%}._fd-event-item,._fd-event-r>.el-main{flex-direction:column}._fd-event-item{display:flex;font-size:14px;justify-content:center;max-width:250px;overflow:hidden;white-space:pre-wrap}._fd-event-item ._fd-label{color:#aaa;font-size:12px}._fd-event-l .el-menu{border-right:0;border-top:0;overflow:auto;padding:0 10px 5px;width:100%}._fd-event-l .el-menu-item.is-active{background:#e4e7ed;color:#303133}._fd-event-l .el-menu-item{border:1px solid #ececec;border-radius:5px;height:auto;line-height:1em;margin-top:5px;padding:0}._fd-event-method{color:#9d238c;display:flex;flex-direction:column;font-family:monospace;font-size:14px;justify-content:center;overflow:hidden;white-space:pre-wrap;width:225px}._fd-event-method ._fd-label{color:#aaa;font-size:12px;margin-top:4px}._fd-event-method>span:first-child,._fd-fn-list-method>span:first-child{color:#9d238c}._fd-event-method>span:first-child>span,._fd-fn-list-method>span:first-child>span{color:#000;margin-left:10px}._fd-event-title{align-items:center;display:flex;justify-content:space-between;padding:10px 0;width:100%}._fd-event-title .fc-icon{color:#282828;font-size:18px;margin-right:6px}._fd-event-title .el-input{width:200px}._fd-event-title .el-input__wrapper{box-shadow:none}._fd-event-title .el-menu-item.is-active i{color:#282828}._fd-event-con .CodeMirror{height:100%;width:100%}._fd-event-con .CodeMirror-wrap pre.CodeMirror-line{padding-left:20px}._fd-type-select{cursor:pointer}._fd-type-select.is-disabled{cursor:default}._fd-type-select .fc-icon{font-size:14px}._fd-type-select-pop{max-height:500px;overflow:auto}._fd-type-select-pop .fc-icon{font-size:14px}._fd-struct,._fd-struct .el-badge{width:100%}._fd-struct .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-struct-con .CodeMirror{height:500px}._fd-struct-con .el-dialog__body{padding:0}._fd-props-input{display:inline-block;width:16px}._fd-props-input .fc-icon{cursor:pointer}._fd-language-config{height:100%;overflow:auto}._fd-lc-body,._fd-lc-header{padding:0 12px}._fd-lc-body{overflow:auto}._fd-lc-header{display:flex;justify-content:flex-end;margin-bottom:12px}._fd-language-config .el-table__cell{height:34px}._fd-language-config ._fc-l-info{margin-bottom:12px}._fd-lc-handle{align-items:center;cursor:pointer;display:flex;justify-content:space-between}._fd-markdown-renderer[data-v-537e7504]{color:#262626;line-height:1.6}._fd-markdown-renderer[data-v-537e7504] h1,._fd-markdown-renderer[data-v-537e7504] h2,._fd-markdown-renderer[data-v-537e7504] h3,._fd-markdown-renderer[data-v-537e7504] h4,._fd-markdown-renderer[data-v-537e7504] h5,._fd-markdown-renderer[data-v-537e7504] h6{color:#262626;font-weight:600;margin:16px 0 8px}._fd-markdown-renderer[data-v-537e7504] h1{font-size:24px}._fd-markdown-renderer[data-v-537e7504] h2{font-size:20px}._fd-markdown-renderer[data-v-537e7504] h3{font-size:18px}._fd-markdown-renderer[data-v-537e7504] h4{font-size:16px}._fd-markdown-renderer[data-v-537e7504] h5{font-size:14px}._fd-markdown-renderer[data-v-537e7504] h6{font-size:12px}._fd-markdown-renderer[data-v-537e7504] p{margin:8px 0}._fd-markdown-renderer[data-v-537e7504] ol,._fd-markdown-renderer[data-v-537e7504] ul{margin:8px 0;padding-left:24px}._fd-markdown-renderer[data-v-537e7504] ul{list-style-type:disc}._fd-markdown-renderer[data-v-537e7504] ol{list-style-type:decimal}._fd-markdown-renderer[data-v-537e7504] li{margin:4px 0}._fd-markdown-renderer[data-v-537e7504] blockquote{background:#f5f5f5;border-left:4px solid #2e73ff;border-radius:0 8px 8px 0;margin:16px 0;padding:12px 16px}._fd-markdown-renderer[data-v-537e7504] blockquote p{color:#666;margin:0}._fd-markdown-renderer[data-v-537e7504] table{border-collapse:collapse;margin:16px 0;width:100%}._fd-markdown-renderer[data-v-537e7504] td,._fd-markdown-renderer[data-v-537e7504] th{border:1px solid #ececec;padding:8px 12px;text-align:left}._fd-markdown-renderer[data-v-537e7504] th{background:#f5f5f5;font-weight:600}._fd-markdown-renderer[data-v-537e7504] code{background:#f5f5f5;border-radius:4px;color:#2e73ff;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;padding:2px 6px}._fd-markdown-renderer[data-v-537e7504] .code-block-container{background:#ececec;border:1px solid #ececec;border-radius:8px;position:relative}._fd-markdown-renderer[data-v-537e7504] .code-block-container pre{background:#ececec;margin:0;max-height:800px;overflow:auto;padding:16px}._fd-markdown-renderer[data-v-537e7504] .code-block-container code{background:none;color:#262626;font-size:13px;line-height:1.5;padding:0}._fd-markdown-renderer[data-v-537e7504] .code-block-header{align-items:center;background:#ececec;border-bottom:1px solid #ececec;border-radius:8px 8px 0 0;box-sizing:border-box;display:flex;gap:8px;height:40px;justify-content:space-between;padding:8px 12px;position:sticky;top:0;z-index:1}._fd-markdown-renderer[data-v-537e7504] .code-block-actions{align-items:center;display:flex;gap:4px}._fd-markdown-renderer[data-v-537e7504] .code-language{color:#666;font-size:12px;font-weight:500;letter-spacing:.5px;text-transform:uppercase}._fd-markdown-renderer[data-v-537e7504] .code-action-item{align-items:center;background:transparent;border:none;border-radius:4px;color:#666;cursor:pointer;display:flex;font-size:12px;gap:4px;padding:2px 8px;transition:all .2s ease}._fd-markdown-renderer[data-v-537e7504] .code-action-item:hover{background:#fff;color:#262626}._fd-markdown-renderer[data-v-537e7504] .code-action-item.is-primary{color:#2e73ff}._fd-markdown-renderer[data-v-537e7504] .code-action-item.is-primary:hover{background:#2e73ff;color:#fff}._fd-markdown-renderer[data-v-537e7504] .code-action-text{font-size:12px;font-weight:500}._fd-markdown-renderer[data-v-537e7504] .hljs{background:#fff!important;color:#262626!important}._fd-markdown-renderer[data-v-537e7504] a{color:#2e73ff;text-decoration:none}._fd-markdown-renderer[data-v-537e7504] a:hover{text-decoration:underline}._fd-markdown-renderer[data-v-537e7504] strong{color:#262626;font-weight:600}._fd-markdown-renderer[data-v-537e7504] em{color:#666;font-style:italic}._fd-markdown-renderer[data-v-537e7504] .diff-lines{font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.5}._fd-markdown-renderer[data-v-537e7504] .diff-line{display:flex}._fd-markdown-renderer[data-v-537e7504] .diff-line-number{background:#ececec;border-right:1px solid #ececec;color:#aaa;flex-shrink:0;font-size:11px;padding:4px;text-align:right;width:30px}._fd-markdown-renderer[data-v-537e7504] .diff-line-content{flex:1;word-break:break-all}._fd-markdown-renderer[data-v-537e7504] .diff-old-line{background:rgba(239,68,68,.1);color:#ef4444;padding:2px 4px}._fd-markdown-renderer[data-v-537e7504] .diff-new-line{background:rgba(34,197,94,.1);color:#22c55e;padding:2px 4px}._fd-markdown-renderer[data-v-537e7504] .diff-same-line{color:#262626;padding:2px 4px}._fd-markdown-renderer[data-v-537e7504] .diff-line-added{background:rgba(34,197,94,.05)}._fd-markdown-renderer[data-v-537e7504] .diff-line-removed{background:rgba(239,68,68,.05)}._fd-markdown-renderer[data-v-537e7504] .diff-line-modified{background:rgba(245,158,11,.05)}._fd-markdown-renderer[data-v-537e7504] .diff-line-unchanged{background:transparent}._fd-markdown-renderer[data-v-537e7504] .diff-context{background:hsla(220,9%,46%,.05);opacity:.7}._fd-markdown-renderer[data-v-537e7504] .diff-context .diff-line-number{color:#aaa;opacity:.6}._fd-ai-panel[data-v-23304ea6]{background:#fff;border-radius:8px;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;height:100%;overflow:hidden}._fd-ai-header[data-v-23304ea6]{background:#fff;border-bottom:1px solid #ececec;height:40px;justify-content:space-between;padding:0 20px}._fd-ai-header[data-v-23304ea6],._fd-ai-title[data-v-23304ea6]{align-items:center;display:flex}._fd-ai-title[data-v-23304ea6]{gap:8px}._fd-ai-name[data-v-23304ea6]{color:#262626;font-size:14px;font-weight:600}._fd-ai-actions[data-v-23304ea6]{display:flex;gap:8px}._fd-ai-action-btn[data-v-23304ea6]{align-items:center;background:transparent;border:none;border-radius:3px;color:#666;cursor:pointer;display:flex;height:24px;justify-content:center;opacity:.8;transition:all .15s ease;width:24px}._fd-ai-action-btn[data-v-23304ea6]:hover{background:#f5f5f5;color:#262626;opacity:1}._fd-ai-content[data-v-23304ea6]{display:flex;flex:1;flex-direction:column;gap:16px;min-height:0;overflow-y:auto;padding:0 20px}._fd-ai-content--centered[data-v-23304ea6]{align-items:center;justify-content:center}._fd-ai-welcome[data-v-23304ea6]{color:#666;margin:0 auto;max-width:600px;padding:20px;text-align:center}._fd-ai-message-avatar[data-v-23304ea6],._fd-ai-welcome-icon[data-v-23304ea6]{background-image:url(data:image/png;base64,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);background-position:50%;background-repeat:no-repeat;background-size:45px}._fd-ai-welcome-icon[data-v-23304ea6]{align-items:center;background-color:#f5f5f5;border-radius:50%;display:flex;height:64px;justify-content:center;margin:0 auto 20px;width:64px}._fd-ai-welcome h3[data-v-23304ea6]{color:#262626;font-size:24px;font-weight:600;margin:0 0 12px}._fd-ai-welcome p[data-v-23304ea6]{color:#666;font-size:16px;line-height:1.6;margin:0 0 32px}._fd-ai-welcome-suggestions[data-v-23304ea6]{text-align:left}._fd-ai-suggestions-header[data-v-23304ea6]{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}._fd-ai-suggestions-header span[data-v-23304ea6]{color:#262626;font-size:14px;font-weight:500}._fd-ai-refresh-btn[data-v-23304ea6]{align-items:center;background:transparent;border:none;border-radius:4px;color:#aaa;cursor:pointer;display:flex;font-size:12px;gap:4px;padding:4px 8px;transition:all .2s ease}._fd-ai-refresh-btn[data-v-23304ea6]:hover{background:#f5f5f5;color:#262626}._fd-ai-suggestions-list[data-v-23304ea6]{display:grid;gap:12px;grid-template-columns:repeat(2,1fr)}._fd-ai-suggestion-item[data-v-23304ea6]{background:#f5f5f5;border:1px solid #ececec;border-radius:12px;color:#262626;cursor:pointer;font-size:14px;line-height:1.4;padding:12px 16px;text-align:left;transition:all .2s ease}._fd-ai-suggestion-item[data-v-23304ea6]:hover{background:#fff;border-color:#2e73ff;box-shadow:0 2px 8px #0000001a;transform:translateY(-1px)}._fd-ai-messages[data-v-23304ea6]{margin-top:16px}._fd-ai-message[data-v-23304ea6],._fd-ai-messages[data-v-23304ea6]{display:flex;flex-direction:column}._fd-ai-message-content[data-v-23304ea6]{align-items:flex-start;display:flex;gap:12px;position:relative}._fd-ai-message-content:hover ._fd-ai-message-footer[data-v-23304ea6]{display:flex}._fd-ai-message--user ._fd-ai-message-actions[data-v-23304ea6],._fd-ai-message--user ._fd-ai-message-content[data-v-23304ea6]{flex-direction:row-reverse}._fd-ai-message-avatar[data-v-23304ea6]{align-items:center;background-color:#f5f5f5;background-size:20px;border-radius:50%;display:flex;flex-shrink:0;height:32px;justify-content:center;width:32px}._fd-ai-message-avatar--error[data-v-23304ea6]{background-color:#ff2e2e0d}._fd-ai-message-bubble[data-v-23304ea6]{word-wrap:break-word;border-radius:12px;margin-bottom:35px;max-width:70%;min-height:21px;min-width:40px;padding:12px 16px;position:relative}._fd-ai-message-bubble--user[data-v-23304ea6]{background:#2e73ff;border-bottom-right-radius:4px;color:#fff}._fd-ai-message-bubble--ai[data-v-23304ea6]{background:#f5f5f5;border-bottom-left-radius:4px;color:#262626}._fd-ai-message-bubble--thinking[data-v-23304ea6]{background:rgba(46,115,255,.05);border:1px solid #2e73ff;border-bottom-left-radius:4px}._fd-ai-message-bubble--error[data-v-23304ea6]{background:rgba(255,46,46,.05);border:1px solid #ff2e2e;border-bottom-left-radius:4px;color:#ff2e2e}._fd-ai-message-text[data-v-23304ea6]{font-size:14px;line-height:1.5}._fd-ai-message-text[data-v-23304ea6] pre{background:transparent;border-radius:0;margin:0;overflow:visible;padding:0}._fd-ai-message-text[data-v-23304ea6] code{background:transparent;border-radius:0;font-family:inherit;font-size:inherit;padding:0}._fd-ai-message-actions[data-v-23304ea6]{display:flex;gap:4px}._fd-ai-message-text--error[data-v-23304ea6]{color:#ff2e2e;font-weight:500}._fd-ai-thinking-status[data-v-23304ea6]{align-items:center;display:flex;gap:8px;margin:8px 0;padding:8px 12px}._fd-ai-message-footer[data-v-23304ea6]{align-items:center;bottom:6px;display:none;gap:8px;left:43px;position:absolute}._fd-ai-message--user ._fd-ai-message-footer[data-v-23304ea6]{left:unset;right:0}._fd-ai-thinking-indicator[data-v-23304ea6]{align-items:center;display:flex;gap:3px}._fd-ai-thinking-dot[data-v-23304ea6]{animation:b-23304ea6 1.4s ease-in-out infinite both;background:#666;border-radius:50%;height:4px;width:4px}._fd-ai-thinking-dot[data-v-23304ea6]:first-child{animation-delay:-.32s}._fd-ai-thinking-dot[data-v-23304ea6]:nth-child(2){animation-delay:-.16s}@keyframes b-23304ea6{0%,80%,to{opacity:.5;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}._fd-ai-thinking-section[data-v-23304ea6]{margin:8px 0}._fd-ai-thinking-steps[data-v-23304ea6]{display:flex;flex-direction:column;gap:8px}._fd-ai-thinking-step[data-v-23304ea6]{align-items:center;border:1px solid #ececec;border-radius:8px;color:#aaa;display:flex;font-size:13px;gap:10px;margin:2px 0;overflow:hidden;padding:8px 12px;position:relative;transition:all .3s cubic-bezier(.4,0,.2,1)}._fd-ai-thinking-step--active[data-v-23304ea6]{background:#fff;border:0;box-shadow:0 2px 8px #0000001a;color:#262626;transform:translate(2px)}._fd-ai-thinking-step-text[data-v-23304ea6]{position:relative;z-index:1}._fd-ai-thinking-step-icon[data-v-23304ea6]{align-items:center;background:#ececec;border-radius:50%;color:#aaa;display:flex;flex-shrink:0;height:20px;justify-content:center;position:relative;transition:all .3s ease;width:20px;z-index:1}._fd-ai-thinking-step-icon--executing[data-v-23304ea6]{animation:c-23304ea6 1.5s ease-in-out infinite;background:rgba(59,130,246,.1);border-radius:50%;color:#2e73ff;height:20px;transform:scale(1.1);width:20px}._fd-ai-thinking-step-icon--completed[data-v-23304ea6]{background:rgba(34,197,94,.1);border-radius:50%;color:#00c050;height:20px;width:20px}@keyframes c-23304ea6{0%,to{opacity:1;transform:scale(1.1)}50%{opacity:.8;transform:scale(1.2)}}._fd-ai-thinking-step-loading[data-v-23304ea6]{animation:d-23304ea6 1s linear infinite;border:2px solid #2e73ff;border-radius:50%;border-top-color:transparent;height:10px;width:10px}._fd-ai-thinking-step-pending[data-v-23304ea6]{background:#aaa;border-radius:50%;height:6px;opacity:.5;width:6px}@keyframes d-23304ea6{0%{transform:rotate(0)}to{transform:rotate(1turn)}}._fd-ai-input[data-v-23304ea6]{background:#fff;display:flex;flex-direction:column;gap:16px;padding:20px 24px;position:relative}._fd-ai-input-container[data-v-23304ea6]{align-items:flex-end;background:#f5f5f5;border:1px solid #ececec;border-radius:15px;box-shadow:0 1px 3px #0000001a;display:flex;gap:12px;padding:12px 16px;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1)}._fd-ai-input-container[data-v-23304ea6]:focus-within{border-color:#2e73ff;box-shadow:0 0 0 3px #3b82f61a,0 4px 12px #00000026}._fd-ai-input-field[data-v-23304ea6]{background:transparent;border:none;color:#262626;flex:1;font-family:inherit;font-size:15px;font-weight:400;line-height:1.6;max-height:120px;min-height:24px;outline:none;padding:4px 0;resize:none}._fd-ai-input-field[data-v-23304ea6]::placeholder{color:#aaa;font-weight:400}._fd-ai-send-btn[data-v-23304ea6]{align-items:center;background:#2e73ff;border:none;border-radius:50%;box-shadow:0 2px 4px #0000001a;color:#fff;cursor:pointer;display:flex;flex-shrink:0;height:32px;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);width:32px}._fd-ai-send-btn[data-v-23304ea6]:hover:not(._fd-ai-send-btn--disabled){box-shadow:0 2px 8px #0000001a;transform:translateY(-1px)}._fd-ai-send-btn--disabled[data-v-23304ea6]{background:#aaa;box-shadow:none;cursor:not-allowed;opacity:.5;transform:none}._fd-ai-input-container:focus-within ._fd-ai-send-btn[data-v-23304ea6]{transform:scale(1.02)}._fd-ai-input-field[data-v-23304ea6]:focus::placeholder{opacity:.7;transform:translateY(-1px);transition:all .2s ease}._fd-ai-content[data-v-23304ea6]{scrollbar-color:#ececec transparent;scrollbar-width:thin}._fd-ai-content[data-v-23304ea6]::-webkit-scrollbar{width:6px}._fd-ai-content[data-v-23304ea6]::-webkit-scrollbar-track{background:transparent}._fd-ai-content[data-v-23304ea6]::-webkit-scrollbar-thumb{background:#ececec;border-radius:3px;opacity:0;transition:opacity .3s ease}._fd-ai-content[data-v-23304ea6]:hover::-webkit-scrollbar-thumb{opacity:1}._fd-ai-content[data-v-23304ea6]::-webkit-scrollbar-thumb:hover{background:#aaa}._fd-struct-editor{flex:1;width:100%}._fd-struct-editor>div{height:100%}._fc-json-preview{color:#262626;display:flex;width:100%}._fc-json-preview .CodeMirror{font-size:12px;height:100%}._fd-warning-pop{max-width:400px}._fd-warning-text{cursor:help;text-decoration:underline;text-decoration-style:dashed}._fd-config-item{color:#666;display:flex;flex-direction:column;font-size:12px;margin-bottom:10px;width:100%}._fd-ci-head{justify-content:space-between}._fd-ci-head,._fd-ci-label{align-items:center;display:flex}._fd-ci-label{color:#262626;font-size:12px}._fd-ci-con{align-items:center;display:flex;justify-content:flex-end;min-width:150px}._fd-ci-label.is-arrow{cursor:pointer}._fd-ci-append{background:#f5f5f5;display:flex;flex-direction:column;margin:5px 3px 3px;padding:4px}._fd-ci-label i{font-size:12px;font-weight:600}._fd-ci-label i.down{transform:rotate(-180deg)}._fd-ci-info{font-size:12px;padding-right:5px}._fd-drag-tool{word-wrap:break-word;box-sizing:border-box;display:block;min-height:20px;outline:1px dashed var(--fc-tool-border-color);overflow:hidden;padding:2px;position:relative;word-break:break-all;z-index:0}._fd-drag-tool ._fd-drag-tool{height:calc(100% - 6px);margin:3px}._fd-drag-tool+._fd-drag-tool{margin-top:5px}._fd-drag-tool.active{outline:1px solid #2e73ff}._fd-drag-tool.active>div>._fd-drag-btn{display:flex}._fd-drag-tool:not(.active):hover>div>._fd-drag-btn{display:flex!important;opacity:.7}._fd-drag-tool._fd-drop-hover ._fd-drag-box{padding-bottom:15px!important;padding-top:15px!important}._fd-drag-tool ._fd-drag-btn{display:none}._fd-drag-r{right:2px;top:calc(100% - 20px)}._fd-drag-l,._fd-drag-r{position:absolute;z-index:3}._fd-drag-l{left:0;top:0}._fd-drag-btn{background-color:#2e73ff;color:#fff;cursor:pointer;float:left;height:18px;justify-content:center;line-height:20px;padding-bottom:1px;text-align:center;width:18px}._fd-drag-btn+._fd-drag-btn{margin-left:2px}._fd-drag-danger{background-color:#ff2e2e}._fd-drag-btn i{font-size:14px}._fd-drag-hidden,._fd-drag-mask{bottom:0;left:0;position:absolute;right:0;top:0;z-index:2}._fd-drag-hidden{align-items:center;background:rgba(51,51,51,.7);color:#fff;display:flex;font-size:14px;justify-content:center}._fd-drag-tool.active ._fd-drag-hidden,._fd-drag-tool:has(._fd-drag-tool.active) ._fd-drag-hidden,._fd-drag-tool:hover ._fd-drag-hidden{display:none}._fd-drag-hidden .fc-icon{margin-right:5px}._fd-drag-tool:hover{outline-color:#2e73ff80;outline-style:solid;z-index:1}._fd-drag-tool:has(._fd-drag-tool:not(.active):hover,._fd-drag-tool.active:hover)>div>._fd-drag-btn{display:none!important}._fd-row{box-sizing:border-box;display:flex;flex-wrap:wrap;position:relative;width:100%}._fd-html-editor{width:100%}._fd-html-editor .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-html-editor-con .CodeMirror{height:450px}._fd-html-editor-con .CodeMirror-line{font-size:13px!important;line-height:16px!important}._fd-html-editor-con .CodeMirror-lint-tooltip{z-index:1!important}._fd-html-editor-con .el-dialog__body{padding:0 20px}._fd-fn-input,._fd-fn-input .el-badge{width:100%}._fd-fn-input .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-fn-input-dialog .CodeMirror-lint-tooltip{z-index:1!important}._fd-fn-input-dialog .el-dialog__body{height:500px;padding:0}._fd-gfc,._fd-gfc .el-badge{width:100%}._fd-gfc .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-gfc-dialog .el-tabs__header{margin-bottom:0}._fd-gfc-dialog .form-create{margin-top:15px}._fd-gfc-con .CodeMirror{height:100%;width:100%}._fd-gfc-con .CodeMirror-wrap pre.CodeMirror-line{padding-left:20px}._fd-fetch-preview{background:#fff;border:1px solid #ececec;border-radius:6px;margin-left:15px;margin-top:20px}._fd-fetch-preview-header{align-items:center;background:#f5f5f5;border-bottom:1px solid #ececec;border-radius:6px 6px 0 0;display:flex;justify-content:space-between;padding:12px 15px}._fd-fetch-preview-title{color:#262626;font-size:14px;font-weight:500}._fd-fetch-preview-content{max-height:300px;min-height:120px;overflow-y:auto;padding:15px}._fd-fetch-preview-empty{align-items:center;background:hsla(0,0%,67%,.05);border:1px dashed #ececec;border-radius:4px;color:#aaa;display:flex;font-size:13px;height:90px;justify-content:center}._fd-fetch-preview-result{display:flex;flex-direction:column;gap:10px}._fd-fetch-preview-status{align-items:center;display:flex;gap:10px}._fd-fetch-preview-time{color:#aaa;font-family:monospace;font-size:12px}._fd-fetch-preview-data{background:#f5f5f5;border:1px solid #ececec;border-radius:4px;max-height:200px;overflow-y:auto;padding:10px}._fd-fetch-preview-data pre{color:#666;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4;margin:0;white-space:pre-wrap;word-break:break-word}._fd-field-input{width:100%}._fd-field-input>.fc-icon{color:#a8abb2;cursor:pointer;height:24px;position:absolute;right:28px;text-align:center;top:1px;width:24px;z-index:1}._fd-field-input>.fc-icon:hover{color:#2e73ff}._fd-field-input .el-input-group__append{color:#606266;cursor:pointer;margin:0;padding:0;width:25px}._fd-fn-list,._fd-fn-list .el-badge{width:100%}._fd-fn-list .el-button{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-fn-list-dialog .el-dialog__body{padding:10px 20px}._fd-fn-list-con .el-main{padding:0}._fd-fn-list-l,._fd-fn-list-r{border:1px solid #ececec;display:flex;flex:1;flex-direction:column;height:100%}._fd-fn-list-head{align-items:center;background:#f8f9ff;border-bottom:1px solid #eee;display:flex;padding:5px 15px}._fd-fn-list-head .el-button.is-link{color:#2f73ff}._fd-fn-list-r{border-left:0}._fd-fn-list-r ._fd-fn-list-head{justify-content:flex-end}._fd-fn-list-l>.el-main,._fd-fn-list-r>.el-main{box-sizing:border-box;display:flex;flex:1;flex-basis:auto;flex-direction:row;min-width:0;width:100%}._fd-fn-list-r>.el-main{flex-direction:column}._fd-fn-list-l .el-menu{border-right:0;border-top:0;overflow:auto;padding:0 10px 5px;width:100%}._fd-fn-list-l .el-menu-item.is-active{background:#e4e7ed;color:#303133}._fd-fn-list-l .el-menu-item{border:1px solid #ececec;border-radius:5px;height:auto;line-height:1em;margin-top:5px;padding:0}._fd-fn-list-method{box-sizing:border-box;display:flex;flex-direction:column;font-family:monospace;font-size:14px;justify-content:center;line-height:1em;overflow:hidden;padding:10px 20px 10px 0;position:relative;white-space:pre-wrap;width:100%}._fd-fn-list-method ._fd-label{color:#aaa;font-size:12px;margin-top:4px}._fd-fn-list-method ._fd-dot{background:#00c050;border-radius:15px;display:block;height:6px;margin-top:-3px;position:absolute;right:16px;top:50%;width:6px}._fd-fn-list-method-info>span:first-child,._fd-fn-list-method>span:first-child{color:#9d238c}._fd-fn-list-method-info>span:first-child>span,._fd-fn-list-method>span:first-child>span{color:#000;margin-left:10px}._fd-fn-list-con .CodeMirror{height:100%;width:100%}._fd-fn-list-con .CodeMirror-wrap pre.CodeMirror-line{padding-left:20px}._fd-table-view{overflow:auto}._fd-table-view-cell{height:100%;min-height:50px;position:relative}._fd-table-row-handle{bottom:-4px;cursor:row-resize;height:8px;left:0;width:100%}._fd-table-col-handle,._fd-table-row-handle{background-color:transparent;position:absolute;z-index:1}._fd-table-col-handle{cursor:col-resize;height:100%;right:-4px;top:0;width:8px}._fd-table-view-cell.selected>._fd-drag-tool{background-color:#2e73ff0d;outline:1px solid #2e73ff}._fd-table-view-cell>._fd-drag-tool{border:0;height:100%;margin:0;max-height:100%;max-width:100%;min-width:unset;outline:0;width:100%}._fd-table-view ._fd-table-view-cell>._fd-drag-tool>._fd-tableCell-drag{display:flex;flex-direction:row;flex-wrap:wrap;min-height:80px}._fd-table-view ._fd-table-view-cell [class*=_fd-fcTable-slot],._fd-table-view ._fd-table-view-cell>._fd-drag-tool>._fd-tableCell-drag{align-content:center;align-items:center;justify-content:center;text-align:center}._fd-table-view-btn{flex-direction:column;padding:0}._fd-table-view-btn .fc-icon{color:#fff;font-size:16px;width:18px}._fd-table-view>table{border-bottom:1px solid #ebeef5;border-collapse:collapse;border-right:1px solid #ebeef5;border-color:#ebeef5 currentcolor currentcolor #ebeef5;border-style:solid none none solid;border-width:1px 0 0 1px;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fd-table-view tr{min-height:50px}._fd-table-view td{border:1px solid #ebeef5;box-sizing:border-box;min-height:50px;min-width:80px;overflow-wrap:break-word;padding:0;position:relative;white-space:nowrap}._fd-tableCell-drag{height:100%}._fd-table-view.is-mini td{min-height:12px;padding:0}._fd-table-view.is-mini .el-form-item{margin:0;padding:0}._fd-table-context-menu{background-color:#fff;border:1px solid #ddd;border-radius:6px;box-shadow:0 1px 10px #0000001a;color:#666;display:block;font-size:14px;min-width:120px;padding:6px 0;position:fixed;z-index:2}._fd-table-context-menuitem{cursor:pointer;line-height:22px;padding:5px 16px}._fd-table-context-menuitem:hover{background-color:#f0f0f0}._fd-table-context-menu-separator{background-color:#eee;height:1px;margin:6px 0}._fc-table{overflow:auto}._fc-table>table{border-bottom:1px solid #ebeef5;border-collapse:collapse;border-right:1px solid #ebeef5;border-color:#ebeef5 currentcolor currentcolor #ebeef5;border-style:solid none none solid;border-width:1px 0 0 1px;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-table td,._fc-table tr{min-height:50px}._fc-table td{border-bottom:0;border-right:0;border-color:currentcolor #ebeef5 #ebeef5 currentcolor;border-style:none solid solid none;border-width:0 1px 1px 0;box-sizing:border-box;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:5px;position:relative;text-align:center;vertical-align:middle}._fc-table.is-mini td{min-height:12px;padding:0}._fc-table.is-mini .el-form-item{margin:0;padding:0}._fd-language-list{max-height:320px;overflow:auto;padding-top:70px}._fd-language-input .el-input-group__append{color:#aaa;cursor:pointer;margin:0;padding:0;width:25px}._fd-language-input.is-variable input{color:#2e73ff}._fd-language-header,._fd-language-item{border-bottom:1px solid #ececec;display:flex;padding:0 12px}._fd-language-header{background-color:#fff;color:#262626;flex-direction:column;font-weight:500;left:0;overflow:auto;padding-top:10px;position:absolute;right:0;top:0}._fd-language-item>div,._fd-language-name>div{flex:1;font-size:12px;min-width:70px;padding:5px}._fd-language-title{margin:6px 0}._fd-language-title .fc-icon{color:#2e73ff;cursor:pointer;font-size:14px}._fd-language-name{display:flex}._fd-language-name>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._fd-language-item{cursor:pointer}._fd-language-item:hover{background-color:#ccdfff;color:#2e73ff}._fd-language-popover{padding:0!important}._fd-validate{display:flex;flex-direction:column;width:100%}._fd-validate-btn{border-color:#2e73ff;color:#2e73ff;font-weight:400;width:100%}._fd-validate-pop .el-dropdown-menu__item{width:248px}._fd-validate-item{border-bottom:1px dashed #ececec;margin-bottom:10px}._fd-validate-item .el-col-12:first-child{padding-right:5px}._fd-validate-item .el-col-12+.el-col-12{padding-left:5px}._fd-validate-item .el-input-number{width:100%}._fd-validate-title{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:10px}._fd-validate-title>div{align-items:center;display:flex}._fd-validate-title>div>span{background:#ececec;border-radius:15px;font-size:12px;height:16px;line-height:16px;margin-right:5px;text-align:center;width:16px}._fd-validate-title i{cursor:pointer}._fd-validate-title i:hover{color:#ff2e2e}._fd-validate .append-msg{cursor:pointer}._fd-validate .el-input-group__append{padding:0 10px}._fd-required{align-items:center;display:flex;width:100%}._fd-required .el-input{margin-left:15px}._fd-required .el-switch{height:28px}._fd-value-input .el-input__validateIcon{display:none}._fd-value-input .el-select,._fd-value-input .el-select__wrapper{height:100%}._td-table-opt[data-v-91131f26]{width:100%}._td-table-opt .el-table[data-v-91131f26]{z-index:1}._td-table-opt-handle[data-v-91131f26]{align-items:center;display:flex;justify-content:space-between;padding-right:5px}._fd-tree-opt ._fd-tree-opt-btn{background-color:#2f73ff;color:#fff;cursor:pointer;float:left;height:19px;justify-content:center;line-height:20px;padding-bottom:1px;text-align:center;width:18px}._fd-tree-opt-node{align-items:center;display:flex}._fd-tree-opt-first{margin-right:5px;width:60px}._fd-tree-opt-last{width:165px}._fd-tree-opt-last._label{width:175px}._fd-tree-opt-last._label .el-input-group__append{width:65px}._fd-tree-opt ._fd-tree-opt-danger{background-color:#ff2d2e;border-radius:0 2px 2px 0}._fd-tree-opt .el-tree-node__content{height:28px;margin-bottom:3px}._fd-tree-opt .el-input__inner{border-right:0}._fd-tree-opt .el-input-group__append{background:#fff;padding-left:1px;padding-right:2px;width:90px}._fd-table-form{background:#fff;border:1px solid #ececec;width:100%}._fc-child-empty,._fd-table-form{min-height:130px}._fd-tf-wrap{display:flex;overflow:auto}._fd-tf-wrap>._fd-drag-tool{display:flex;flex-shrink:0;height:auto;margin:2px;overflow:auto}._fc-table-form{color:#666;overflow:auto}._fc-table-form .form-create td .el-form-item{margin-bottom:1px}._fc-table-form .form-create td .el-form-item.is-error{margin-bottom:22px}._fc-table-form .el-form-item__label,._fc-table-form .van-field__label{display:none!important}._fc-table-form .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}._fc-tf-head-idx,._fc-tf-idx{font-weight:500;min-width:40px;text-align:center;width:40px}._fc-tf-btn,._fc-tf-edit{min-width:70px;text-align:center;width:70px}._fc-tf-btn .fc-icon{cursor:pointer}._fc-table-form._fc-disabled ._fc-tf-btn .fc-icon,._fc-table-form._fc-disabled>.el-button{cursor:not-allowed}._fc-tf-table{border:1px solid #ebeef5;border-bottom:0;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-table-form ._fc-tf-table>thead>tr>th{border:0;border-bottom:1px solid #ebeef5;box-sizing:border-box;font-weight:500;height:40px;padding:0 5px}._fc-table-form ._fc-tf-table>thead>tr>th+th{border-left:1px solid #ebeef5}._fc-table-form tr{min-height:50px}._fc-table-form ._fc-read-view{text-align:center;width:100%}._fc-table-form td{border:0;border-bottom:1px solid #ebeef5;box-sizing:border-box;min-height:50px;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:5px;position:relative}._fc-table-form td+td{border-left:1px solid #ebeef5}._fc-tf-table .el-cascader,._fc-tf-table .el-date-editor,._fc-tf-table .el-input-number,._fc-tf-table .el-select,._fc-tf-table .el-slider{width:100%}._fc-tf-head-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-signature{width:100%}._fc-signature-btn,._fc-signature-preview{background:#fff;border:1px dashed #d4d7e0;border-radius:4px;box-sizing:border-box;color:#c9ccd8;font-size:14px;height:88px;line-height:88px;min-width:160px;position:relative;text-align:center;width:100%}._fc-signature-btn{cursor:pointer}._fc-signature.disabled ._fc-signature-btn{cursor:not-allowed}._fc-signature-preview>img{display:inline-block;height:88px}._fc-signature-preview .icon-delete2{cursor:pointer;display:inline-block;font-size:14px;line-height:14px;position:absolute;right:9px;top:9px}._fc-signature-btn i{font-size:14px}._fc-signature-dialog .el-dialog__body{text-align:center}._fc-signature-pad{background-image:linear-gradient(#fff 14px,transparent 0),linear-gradient(90deg,#fff 14px,#d4d7e0 0);background-size:15px 15px;border:1px dashed #d4d7e0;border-radius:4px}._fc-title{font-size:16px;font-weight:600;margin-bottom:16px;margin-top:1em;width:100%}._fc-title.h1,._fc-title.h2{border-bottom:1px solid #eee;padding-bottom:.3em}._fc-title.h1{font-size:32px;line-height:1.2}._fc-title.h2{font-size:24px;line-height:1.225}._fc-title.h3{font-size:20px;line-height:1.43}._fc-title.h4{font-size:16px}._fc-title.h5{font-size:14px}._fc-title.h6{font-size:12px}._fd-tf-col ._fd-tf-con .el-form-item{margin-bottom:1px!important}._fd-tf-col{display:flex;flex-direction:column;flex-shrink:0;flex-wrap:wrap;width:180px}._fd-tf-con .el-form-item__label,._fd-tf-con .van-field__label{display:none!important}._fd-tf-con{display:flex;flex:1;width:100%}._fd-tf-con .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}._fd-tf-title{border-bottom:1px solid #ebeef5;box-sizing:border-box;height:40px;margin-bottom:0;padding:0 5px}._fd-tf-required{color:#f56c6c;margin-right:4px}._fd-tf-con ._fc-l-item{display:flex;flex-shrink:0;margin-top:4px;width:100%}._fd-tf-con ._fc-l-item>*{display:none!important}._fd-tf-con .el-cascader,._fd-tf-con .el-date-editor,._fd-tf-con .el-input-number,._fd-tf-con .el-select,._fd-tf-con .el-slider{width:100%}._fd-tf-col:has(._fd-tf-col){width:auto!important}._fd-size-input{align-items:center;display:flex}._fd-size-input .el-input-number--small{width:122px}._fd-size-input .el-button{font-size:12px;margin-left:3px;padding:5px;width:25px}._fd-color-input{width:150px}._fd-color-input .el-input .el-color-picker{margin:0}._fd-color-input .el-input .el-input-group__append{padding:0;width:24px}._fd-color-input .el-input .el-color-picker__trigger{border-left:0;border-radius:0 3px 3px 0}._fd-box-size-input .el-form{grid-column-gap:10px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}._fd-box-size-input .el-radio-group{width:100%}._fd-box-size-input .el-radio-button__inner{padding:4px;width:100%}._fd-box-size-input .el-radio-button{flex:1}._fd-box-size-input ._fd-size-input .el-input-number--small{width:100%}._fd-box-space-input{color:#000}._fd-box-space-input ._margin,._fd-box-space-input ._padding{background-color:#f2cea5;box-sizing:border-box;height:180px;padding:40px 55px;position:relative;width:100%}._fd-box-space-input ._margin,html.dark ._fd-box-space-input ._padding{background-color:#a9855c}._fd-box-space-input ._margin{background-color:#c6cf92;height:100px;width:100%}._fd-box-space-input ._fd-input{background-color:unset;border:0;display:inline-block;font-size:12px;height:20px;margin:0;max-width:40px;outline:0 none;padding:0;text-align:center;text-decoration:underline;width:30%}._fd-box-space-input ._fd-input:focus,._fd-box-space-input ._fd-input:hover{background-color:#ececec;color:#262626;opacity:.9}._fd-box-space-input ._fd-left,._fd-box-space-input ._fd-right{left:7px;margin-top:-10px;position:absolute;top:50%}._fd-box-space-input ._fd-bottom,._fd-box-space-input ._fd-top{left:50%;margin-left:-20px;position:absolute;top:5px}._fd-box-space-input ._fd-bottom{bottom:15px;top:unset}._fd-box-space-input ._fd-right{left:unset;right:2px}._fd-box-space-input ._box{align-items:center;background-color:#94b5c0;display:flex;height:100%;justify-content:center;width:100%}._fd-box-space-input ._margin-title,._fd-box-space-input ._padding-title{left:4px;position:absolute;top:2px}._fd-box-space-input ._fd-help{align-items:center;color:#aaa;display:flex;position:absolute;right:5px;top:5px}._fd-box-space-input ._padding .fc-icon{color:#262626;cursor:pointer;font-size:12px}._fd-box-space-input ._padding .fc-icon+.fc-icon{margin-left:2px}._fd-box-space-input .fc-icon.active{color:#2e73ff}._fd-box-space-input ._fd-x{margin:0 5px}._fd-border-input{display:flex;height:110px;justify-content:center;width:100%}._fd-border-input ._fd-bi-left{align-items:center;display:flex;flex-direction:column;height:115px;justify-content:center;width:115px}._fd-border-input ._fd-bi-right{display:flex;flex-direction:column;justify-content:space-around;padding:5px;width:140px}._fd-border-input ._fd-bi-right ._fd-color-input{width:140px}._fd-bi-opt{align-items:center;display:flex;height:100%;width:100%}._fd-bi-opt ._line{width:100%}._fd-bi-opt .solid{border:1px solid #000}._fd-bi-opt .dashed{border:1px dashed #000}._fd-bi-opt .dotted{border:1px dotted #000}._fd-bi-opt .double{border:1px double #000}._fd-border-input ._fd-bil-row{display:flex;height:38px;justify-content:center}._fd-border-input ._fd-bil-col{align-items:center;cursor:pointer;display:flex;font-size:16px;height:22px;justify-content:center;margin:8px;width:22px}._fd-border-input ._fd-bil-col.active{color:#2e73ff;outline:1px dashed #2e73ff}.line-box{box-sizing:border-box;height:20px;padding:1px;width:150px}.line-box-con{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAD5JREFUOE9jZGBg+M+AChjR+HjlQYqHgQFoXibNS+gBBjKMpDAZHAaQ5GQGBgYUV4+mA7QAgaYokgJ14NMBAK1TIAlUJpxYAAAAAElFTkSuQmCC);height:100%;opacity:.3;width:100%}._fd-radius-input{display:flex;flex-direction:column;width:100%}._fd-radius-con{display:flex;flex-wrap:wrap}._fd-radius-item{box-sizing:border-box;padding:5px 0;width:50%}._fd-radius-item,._fd-radius-item ._fd-radius-icon{align-items:center;display:flex;justify-content:center}._fd-radius-item ._fd-radius-icon{height:24px;width:24px}._fd-radius-item ._fd-size-input .el-input-number--small{width:70px}._fd-font-input{display:flex;justify-content:center;padding:0 5px}._fd-fi-box{overflow:hidden;width:150px}._fd-font-input .el-form{grid-column-gap:10px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}._fd-font-input .el-form--inline .el-form-item{margin:0;padding:0}._fd-font-input ._fd-size-input .el-input-number--small{width:100%}._fd-shadow-content{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding:0 5px}._fd-sc-form .fc-icon{font-size:12px}._fd-shadow-content .el-form{grid-column-gap:10px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}._fd-shadow-content .el-form-item{display:grid!important;margin:0!important}._fd-shadow-content .el-input__wrapper{flex:1}._fd-shadow-content ._fd-sc-box{border:1px solid #ccc;border-radius:5px;cursor:pointer;height:250px;overflow:hidden;position:relative;width:250px}._fd-shadow-content ._fd-sc-box .spot{border-radius:100%;height:0;position:absolute;width:0}._fd-shadow-content ._fd-sc-box .spot-id{background:#1989fa;border-radius:100%;height:10px;left:-5px;position:absolute;top:-5px;width:10px;z-index:1}._fd-shadow-content ._fd-sc-box.down .spot-id{box-shadow:1px 1px 10px 2px #1989fa}._fd-shadow-content ._fd-sc-box .center-spot{background:#1989fa;border-radius:100%;height:0;left:125px;position:absolute;top:125px;width:0}._fd-shadow-content ._fd-sc-box .x-hr{background:#ccc;height:1px;position:absolute;top:125px;width:100%}._fd-shadow-content ._fd-sc-box .y-hr{background:#ccc;height:100%;left:125px;position:absolute;width:1px}._fd-shadow-content .el-select__placeholder{text-align:center}._fd-shadow-content .el-input-group__append{padding:0;width:55px}._fd-shadow-content ._fd-color-input,._fd-shadow-content .el-input{width:100%}._fd-shadow-content ._fd-sc-right{margin-top:10px}._fd-shadow-content ._fd-sc-radio{width:100%}._fd-shadow-content ._fd-sc-radio .el-radio-button{display:flex;flex:1}._fd-shadow-content ._fd-sc-radio .el-radio-button__inner{width:100%}._fd-shadow-input ._fd-ci-con{width:150px}._fd-shadow-input :focus-visible{outline:0 none}._fd-si-input .el-input-group__append{display:inline-flex;padding:0;width:24px}._fd-si-input .el-input__wrapper{flex:1}._fd-shadow-input ._fd-ci-con .fc-icon{cursor:pointer}._fd-pos-input{display:flex;flex-direction:column;width:100%}._fd-pos-con{display:flex;flex-wrap:wrap}._fd-pos-item{box-sizing:border-box;padding:5px 0;width:50%}._fd-pos-item,._fd-pos-item ._fd-pos-icon{align-items:center;display:flex;justify-content:center}._fd-pos-item ._fd-pos-icon{height:24px;width:24px}._fd-pos-item ._fd-size-input .el-input-number--small{width:70px}._fd-style-config{display:flex;flex-direction:column;width:100%}._fd-opacity-input ._fd-ci-con{align-items:center;display:flex;justify-content:space-between;width:150px}._fd-opacity-input ._fd-ci-con>span{width:32px}._fd-opacity-input .el-slider{flex:1;margin-right:15px}._fc-designer{--fc-drag-empty:"\\62d6\\62fd\\5de6\\4fa7\\5217\\8868\\4e2d\\7684\\7ec4\\4ef6\\5230\\6b64\\5904";--fc-child-empty:"\\70b9\\51fb\\53f3\\4e0b\\89d2 \\e789 \\6309\\94ae\\6dfb\\52a0\\4e00\\5217";--fc-tool-border-color:#2e73ff;background-color:#fff;cursor:default;height:100%;min-height:500px;overflow:hidden;position:relative}._fc-designer>.el-main{bottom:0;left:0;padding:0;position:absolute;right:0;top:0}._fc-l-menu{border-right:1px solid #ececec;border-top:1px solid #ececec;flex-direction:column}._fc-l-menu,._fc-l-menu-item{align-items:center;display:flex}._fc-l-menu-item{box-sizing:border-box;cursor:pointer;height:40px;justify-content:center;width:100%}._fc-l-menu-item.active{color:#2e73ff}._fc-l-menu-form{border-bottom:1px solid #ececec}._fc-l-menu-item i{font-size:22px}._fc-l-menu-item i:hover{color:#2e73ff}._fc-l-menu-item .el-badge__content{--el-badge-size:15px;--el-badge-padding:4px;background-color:#2e73ff}._fc-l-label{color:#262626;font-size:14px;font-weight:500;line-height:17px;margin-top:5px;padding:12px}._fc-l-info{color:#aaa;font-size:12px;font-style:normal;font-weight:400;line-height:17px;padding:0 12px;text-align:left}._fc-l>.el-container{height:100%}._fc-m .form-create ._fc-l-item{align-items:center;background:#f5f5f5;border:1px dashed #000;border-radius:4px;color:#000;display:flex!important;height:30px;justify-content:center;margin:5px 0;overflow:hidden;padding-bottom:0;transition:all .3s ease;width:100%}._fc-m .form-create ._fc-l-item ._fc-l-icon{display:inline-block!important;padding:0 4px}._fc-m .form-create ._fc-l-item ._fc-l-name{display:inline-block!important;font-size:12px}._fc-l,._fc-m,._fc-r{background-color:#fff;border-top:1px solid #ececec;box-sizing:border-box;overflow:unset;position:relative}._fc-l-close,._fc-l-open,._fc-r-close,._fc-r-open{align-items:center;background:#fff;border-radius:0 5px 5px 0;cursor:pointer;display:flex;height:46px;justify-content:center;position:absolute;right:-12px;top:50%;width:12px;z-index:1}._fc-l-open{left:0;right:unset}._fc-r-close{left:-12px;right:unset}._fc-r-close,._fc-r-open{border-radius:5px 0 0 5px}._fc-r-open{right:0}._fc-l-close>i,._fc-r-open>i{display:block;font-size:9px;transform:rotate(-90deg)}._fc-l-open>i,._fc-r-close>i{display:block;font-size:9px;transform:rotate(90deg)}._fc-r{--el-color-primary:#2e73ff}._fc-r-tab-props{padding:0 20px;position:relative}._fc-r-tools-close{color:#666;cursor:pointer;position:absolute;right:24px;top:12px;transform:rotate(45deg)}._fc-r-title{color:#333;font-size:12px;margin:15px 0 5px}._fc-r-sub ._fc-r-title{align-items:center;display:flex;justify-content:space-between}._fc-r-sub .fc-icon{cursor:pointer}._fc-r-sub ._fd-config-item+._fd-config-item{margin-top:8px}._fc-r-sub>._fd-config-item>._fd-ci-head{padding-left:8px;position:relative}._fc-r-sub>._fd-config-item>._fd-ci-head:before{background-color:#333;border-radius:25px;content:" ";height:5px;left:0;position:absolute;width:5px}._fc-r-config{display:grid;grid-template-areas:"a" "b" "c" "d" "e";grid-template-columns:280px}._fc-r-name-input .el-input-group__append{color:#606266;cursor:pointer;margin:0;padding:0;width:25px}._fc-r-name-input .icon-group{cursor:pointer}._fc-r-name-input .icon-group:hover{color:#2e73ff}._fc-r-tab-props>._fd-config-item{margin-top:15px}._fc-r .el-main{padding-bottom:100px}._fc-l .el-main{padding:0}._fc-l .el-tree-node__label{color:#333;font-weight:400;padding:3px}._fc-l .el-tree-node__content{height:30px;margin-top:5px}._fc-l .el-tree-node__content>.el-tree-node__expand-icon{color:#333}._fc-l .el-tree-node__expand-icon.is-leaf{color:transparent}@keyframes a{0%{transform:rotate(0)}to{transform:rotate(1turn)}}._fc-loading{animation:a 2s linear infinite}._fc-tree-node{align-items:center;display:flex;height:26px;justify-content:space-between;line-height:26px;padding-right:5px;width:100%}._fc-tree-node.active,._fc-tree-node.active .icon-more{color:#2e73ff}._fc-tree-label{align-items:center;display:flex}._fc-tree-label>i{font-weight:700;margin-right:5px}._fc-tree-more{align-items:center;display:flex;font-weight:700;padding:0 15px}._fc-l-tabs{border-bottom:1px solid #ececec;display:flex;padding:0}._fc-l-tab{box-sizing:border-box;color:#303133;display:inline-block;flex:1;font-size:14px;font-weight:600;height:40px;line-height:40px;list-style:none;position:relative;text-align:center}._fc-l ._fc-l-tab.active{border-bottom:2px solid #409eff;color:#409eff}._fc-l-group{border:1px solid #eee;margin:12px;padding:0;user-select:none}._fc-l-group ._fc-l-list{align-items:stretch;display:grid;grid-template-columns:repeat(3,1fr)}._fc-l-title{align-items:center;cursor:pointer;display:flex;font-weight:600;justify-content:space-between;margin:0;padding:12px}._fc-l-title,._fc-l-title i{font-size:14px}._fc-l-title i.down{transform:rotate(90deg)}._fc-l-item{background:#fff;color:#000;cursor:pointer;display:inline-block;line-height:1;padding-bottom:10px;text-align:center;transition:all .2s ease}._fc-l-item i{display:inline-block;font-size:21px}._fc-l-item ._fc-l-name{font-size:12px}._fc-l-item ._fc-l-icon{padding:10px 5px 12px}._fc-l-item:hover{background:#2e73ff;color:#fff}._fc-m-tools{border:1px solid #ececec;border-top:0;height:40px;justify-content:space-between;white-space:nowrap}._fc-m-tools,._fc-m-tools-l,._fc-m-tools-r{align-items:center;display:flex}._fc-m-tools-r{overflow:auto}._fc-m-tools-l .devices .fc-icon{cursor:pointer;width:18px}._fc-m-tools-l .devices .fc-icon.active{color:#2e73ff}._fc-m-tools-l .devices .fc-icon+.fc-icon{margin-left:5px}._fc-m-tools .line{background:#d8d8d8;height:24px;margin:0 10px;width:1px}._fc-m-tools .el-button{align-items:center;border-radius:5px;display:flex;padding:5px 10px}._fc-m-tools .el-button>span{align-items:center;display:inline-flex;justify-content:center}._fc-m-tools .el-button+.el-button,._fc-m-tools .el-dropdown{margin-left:10px}._fc-m-tools ._fd-m-extend{background-color:#f1f1f1;border-color:#ccc;border-radius:5px;color:#666;padding:5px}._fc-m-tools ._fd-m-extend .fc-icon{margin-right:0}._fc-m-tools ._fd-input-btn{align-items:center;display:flex;font-size:12px;justify-content:space-between}._fc-m-tools ._fd-input-btn .el-switch__action{height:18px;left:2px;width:18px}._fc-m-tools ._fd-input-btn .is-checked .el-switch__action{--el-color-white:#2e73ff;left:calc(100% - 20px)}._fc-m-tools ._fd-input-btn .el-switch__core,._fc-m-tools ._fd-input-btn .is-checked .el-switch__core{--el-switch-on-color:var(--el-switch-off-color);border-radius:16px;height:24px;width:46px}._fc-m-tools-r .fc-icon{font-size:14px}._fc-m-tools-l .fc-icon{cursor:pointer;font-size:18px}._fc-m-tools-l .fc-icon+.fc-icon{margin-left:10px}._fc-m-tools-l .fc-icon.disabled{color:#999;cursor:not-allowed}._fc-r .el-tabs__nav-wrap:after{background-color:#ececec;height:1px}._fc-r ._fc-r-tabs{border-bottom:1px solid #ececec;display:flex;padding:0}._fc-r .el-button,._fc-r .el-radio-button__inner,._fc-r .el-table__cell .cell{font-weight:400}._fc-r ._fc-r-tab{box-sizing:border-box;color:#303133;display:inline-block;flex:1;font-size:14px;font-weight:600;height:40px;line-height:40px;list-style:none;position:relative;text-align:center}._fc-r ._fc-r-tab.active{border-bottom:2px solid #409eff;color:#409eff}._fc-m-con{background:#f5f5f5;padding:20px 20px 36px;position:relative}._fc-m-drag{box-sizing:border-box;margin:0 auto;overflow:auto;padding:2px}._fc-m-input{padding:5px 5px 80px}._fc-m-input-handle{background:#fff;bottom:16px;box-shadow:0 2px 10px #0000000d;left:0;margin:20px;padding:12px;position:absolute;right:0;text-align:center;z-index:3}._fc-m-drag.mobile{width:400px}._fc-m-drag.pad{width:770px}._fc-m-drag,.draggable-drag{background:#fff;height:100%;position:relative}._fc-m-drag>form,._fc-m-drag>form>.el-row{height:100%}._fc-m-drag .el-tree{width:100%}._fd-drag-box{height:100%;min-height:80px;transition:padding-bottom,padding-top .3s ease;width:100%}._fd-drag-box>div[data-draggable]{margin-bottom:1px}._fc-r ._fc-group-container+._fc-group-container{margin-top:20px}._fc-r ._fc-group-container{margin:0;padding:10px}._fc-r ._fc-group-handle{right:15px}._fc-r .el-form-item{margin-bottom:10px!important}._fc-r .el-form-item__label{color:#333}._fc-upload-preview{border-radius:5px;display:inline-block;height:120px;overflow:hidden;width:120px}._fc-tabs .el-tabs__item{font-weight:400}._fc-tabs .el-tabs__content{overflow:auto}._fc-tabs .el-tabs__nav-scroll{padding:0 15px}._fc-tabs .el-tab-pane{margin-right:15px}._fc-tabs .el-tabs__nav-wrap:after{height:1px}.form-create .fc-none{display:none}._fd-draggable-drag.drag-holder,._fd-elCard-drag.drag-holder,._fd-elCollapseItem-drag.drag-holder,._fd-elTabPane-drag.drag-holder,._fd-group-drag.drag-holder,._fd-subForm-drag.drag-holder,._fd-tableFormColumn-drag.drag-holder{background:#f5f5f5;background-size:0;min-height:90px;position:relative}._fc-child-empty:after,._fd-draggable-drag.drag-holder:after,._fd-elCard-drag.drag-holder:after,._fd-elCollapseItem-drag.drag-holder:after,._fd-elTabPane-drag.drag-holder:after,._fd-group-drag.drag-holder:after,._fd-subForm-drag.drag-holder:after,._fd-tableFormColumn-drag.drag-holder:after{align-items:center;bottom:0;color:#aaa;content:var(--fc-drag-empty);display:flex;font-size:12px;justify-content:center;left:0;position:absolute;right:0;top:0}._fc-designer ._fc-m-drag ._fd-draggable-drag{overflow:auto;padding:2px 2px 100px}._fc-m-drag._fd-drop-hover ._fd-draggable-drag{padding-top:20px}._fd-draggable-drag.drag-holder{background-color:#fff}._fd-draggable-drag.drag-holder:after{font-size:16px}._fc-child-empty:after{content:var(--fc-child-empty);font-family:fc-icon!important}.fc-configured{color:#999;margin-left:5px}._fc-manage-text{color:#2f73ff;cursor:pointer;font-size:12px;margin-left:4px}._fc-manage-text i{font-size:12px}._fc-message-error{background-color:#fff;border-color:#fff;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;padding:9px 13px;top:16px;z-index:4}._fc-message-error>.el-icon{font-size:18px}._fc-message-error .el-message__content{color:#000000e0;font-size:14px}._fd-preview-copy{align-items:center;background:#2e73ff33;border-radius:10px;color:#2e73ff;cursor:pointer;display:flex;height:28px;justify-content:center;position:absolute;right:35px;top:65px;width:28px}._fd-preview-dialog{border-radius:6px;min-height:40%;padding-top:0}._fd-preview-dialog .el-dialog__header{float:right;position:absolute;right:0;top:0;z-index:2}._fd-preview-code{margin-top:0;max-height:510px;overflow:auto}._fd-preview-tabs .el-tabs__nav-wrap:after{height:1px}._fd-preview-tabs .el-tabs__item{height:46px}._fd-preview-code>code{white-space:pre-wrap}._fd-row-line{background:#d8d8d8;height:1px;margin:10px 0;width:100%}.CodeMirror-hints{z-index:5}@font-face{font-family:fc-icon;src:url(data:font/woff;base64,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) format("woff")}.fc-icon{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:fc-icon!important;font-size:16px;font-style:normal}.icon-vue:before{content:"\\e6e7"}.icon-stack:before{content:"\\e6e5"}.icon-excel:before{content:"\\e6e6"}.icon-write:before{content:"\\e6e4"}.icon-branch:before{content:"\\e6e3"}.icon-device:before{content:"\\e6e0"}.icon-position-left:before{content:"\\e6e2"}.icon-search:before{content:"\\e6e1"}.icon-expand:before{content:"\\e6df"}.icon-expand-left:before{content:"\\e6df";display:inline-block;transform:rotate(-180deg)}.icon-data-select:before{content:"\\e6dd"}.icon-markdown:before{content:"\\e893"}.icon-grid-line:before{content:"\\e600"}.icon-print:before{content:"\\e6de"}.icon-city:before{content:"\\e64b"}.icon-location:before{content:"\\e6d4"}.icon-qrcode:before{content:"\\e6ce"}.icon-input-id:before{content:"\\e6d1"}.icon-iframe:before{content:"\\e6d2"}.icon-audio:before{content:"\\e6d3"}.icon-form-model:before{content:"\\e6d5"}.icon-title:before{content:"\\e6d6"}.icon-sign:before{content:"\\e6d7"}.icon-address:before{content:"\\e6d8"}.icon-statistic:before{content:"\\e6d9"}.icon-barcode:before{content:"\\e6da"}.icon-video:before{content:"\\e6db"}.icon-avatar:before{content:"\\e6dc"}.icon-suspend:before{content:"\\e6cf"}.icon-warning:before{content:"\\e6d0"}.icon-send:before{content:"\\e6cc"}.icon-refresh2:before{content:"\\e6cd"}.icon-ai:before{content:"\\e6cb"}.icon-ai.bright{-webkit-text-fill-color:transparent;background:linear-gradient(90deg,#328ff7,#62e3a3);-webkit-background-clip:text}.icon-column4:before{content:"\\e6c7"}.icon-column3:before{content:"\\e6c6"}.icon-column2:before{content:"\\e6c8"}.icon-column1:before{content:"\\e6c9"}.icon-layout:before{content:"\\e6ca"}.icon-segmented:before{content:"\\e682"}.icon-mention:before{content:"\\e6c5"}.icon-input-tag:before{content:"\\e6c4"}.icon-up:before{content:"\\e697";display:inline-block;transform:rotate(180deg)}.icon-alignitems-flexstart:before{content:"\\e67f";display:inline-block;transform:rotate(180deg)}.icon-align-center:before{content:"\\e6a5";display:inline-block;transform:rotate(90deg)}.icon-align-flexstart:before{content:"\\e6a4";display:inline-block;transform:rotate(90deg)}.icon-align-spacearound:before{content:"\\e670";display:inline-block;transform:rotate(-90deg)}.icon-align-spacebetween:before{content:"\\e695";display:inline-block;transform:rotate(-90deg)}.icon-align-stretch:before{content:"\\e6a7";display:inline-block;transform:rotate(-90deg)}.icon-align-flexend:before{content:"\\e6a4";display:inline-block;transform:rotate(-90deg)}.icon-justify-flexend:before{content:"\\e6a4";display:inline-block;transform:rotate(180deg)}.icon-direction-row:before{content:"\\e68b";display:inline-block;transform:rotate(180deg)}.icon-direction-column:before{content:"\\e68b";display:inline-block;transform:rotate(-90deg)}.icon-direction-columnreverse:before{content:"\\e68b";display:inline-block;transform:rotate(90deg)}.icon-arrow:before{content:"\\e697";display:inline-block;transform:rotate(180deg)}.icon-cell:before{content:"\\e654"}.icon-table:before{content:"\\eb0a"}.icon-next-step:before{content:"\\e6b4";display:inline-block;transform:rotateY(180deg)}.icon-grid:before{content:"\\e65c";display:inline-block;transform:rotate(90deg)}.icon-alignitems-stretch:before{content:"\\e67e"}.icon-alignitems-flexend:before{content:"\\e67f"}.icon-check:before{content:"\\e680"}.icon-auto:before{content:"\\e681"}.icon-config-event:before{content:"\\e66e"}.icon-calendar:before{content:"\\e683"}.icon-config-style:before{content:"\\e684"}.icon-copy:before{content:"\\e676"}.icon-config-advanced:before{content:"\\e686"}.icon-config-props:before{content:"\\e687"}.icon-delete-circle2:before{content:"\\e688"}.icon-delete-circle:before,.icon-delete2:before{content:"\\e689"}.icon-delete:before{content:"\\e68a"}.icon-direction-rowreverse:before{content:"\\e68b"}.icon-display-flex:before{content:"\\e68c"}.icon-dialog:before{content:"\\e66f"}.icon-drag:before{content:"\\e68e"}.icon-display-block:before{content:"\\e68f"}.icon-data:before{content:"\\e690"}.icon-edit2:before{content:"\\e691"}.icon-edit:before{content:"\\e692"}.icon-add-col:before{content:"\\e693"}.icon-display-inlineblock:before{content:"\\e694"}.icon-config-base:before{content:"\\e6bf"}.icon-config-validate:before{content:"\\e696"}.icon-down:before{content:"\\e697"}.icon-display-inline:before{content:"\\e698"}.icon-eye:before{content:"\\e699"}.icon-eye-close:before{content:"\\e69a"}.icon-import:before{content:"\\e6a6"}.icon-preview:before{content:"\\e69b"}.icon-flex-nowrap:before{content:"\\e69c"}.icon-folder:before{content:"\\e69d"}.icon-form-circle:before{content:"\\e69e"}.icon-flex-wrap:before{content:"\\e69f"}.icon-form:before{content:"\\e6a0"}.icon-form-item:before{content:"\\e6a1"}.icon-icon:before{content:"\\e6a2"}.icon-image:before{content:"\\e6a3"}.icon-justify-flexstart:before{content:"\\e6a4"}.icon-justify-center:before{content:"\\e6a5"}.icon-justify-spacearound:before{content:"\\e670"}.icon-justify-stretch:before{content:"\\e6a7"}.icon-link2:before{content:"\\e6a8"}.icon-justify-spacebetween:before{content:"\\e695"}.icon-minus:before{content:"\\e6aa"}.icon-menu2:before{content:"\\e6ab"}.icon-more:before{content:"\\e6ac"}.icon-menu:before{content:"\\e6ad"}.icon-language:before{content:"\\e6ae"}.icon-pad:before{content:"\\e6af"}.icon-mobile:before{content:"\\e6b0"}.icon-page-max:before{content:"\\e6b1"}.icon-move:before{content:"\\e6b2"}.icon-page-min:before{content:"\\e6b3"}.icon-pre-step:before{content:"\\e6b4"}.icon-pc:before{content:"\\e6b5"}.icon-page:before{content:"\\e6b6"}.icon-refresh:before{content:"\\e6b7"}.icon-radius:before{content:"\\e6b8"}.icon-save-filled:before{content:"\\e6b9"}.icon-question:before{content:"\\e6ba"}.icon-scroll:before{content:"\\e6bb"}.icon-script:before{content:"\\e6bc"}.icon-setting:before{content:"\\e6bd"}.icon-save-online:before,.icon-save:before{content:"\\e6be"}.icon-task-add:before{content:"\\e68d"}.icon-shadow:before{content:"\\e6c0"}.icon-variable:before{content:"\\e6c1"}.icon-yes:before{content:"\\e6c2"}.icon-shadow-inset:before{content:"\\e6c3"}.icon-date:before{content:"\\e642"}.icon-date-range:before{content:"\\e643"}.icon-collapse:before{content:"\\e644"}.icon-slider:before{content:"\\e665"}.icon-switch:before{content:"\\e646"}.icon-subform:before{content:"\\e647"}.icon-time-range:before{content:"\\e685"}.icon-tree-select:before{content:"\\e649"}.icon-value:before{content:"\\e64a"}.icon-table-form3:before{content:"\\e6a9"}.icon-alert:before{content:"\\e64c"}.icon-card:before{content:"\\e64d"}.icon-checkbox:before{content:"\\e64e"}.icon-cascader:before{content:"\\e64f"}.icon-button:before{content:"\\e650"}.icon-data-table:before{content:"\\e651"}.icon-group:before{content:"\\e652"}.icon-divider:before{content:"\\e653"}.icon-flex:before{content:"\\e654"}.icon-descriptions:before{content:"\\e655"}.icon-html:before{content:"\\e656"}.icon-editor:before{content:"\\e657"}.icon-input:before{content:"\\e658"}.icon-link:before{content:"\\e659"}.icon-password:before{content:"\\e65a"}.icon-radio:before{content:"\\e65b"}.icon-row:before{content:"\\e65c"}.icon-inline:before{content:"\\e65d"}.icon-rate:before{content:"\\e65e"}.icon-color:before{content:"\\e65f"}.icon-select:before{content:"\\e660"}.icon-json:before{content:"\\e661"}.icon-number:before{content:"\\e662"}.icon-space:before{content:"\\e664"}.icon-step-form:before{content:"\\e663"}.icon-table-form:before{content:"\\e666"}.icon-table-form2:before{content:"\\e667"}.icon-time:before{content:"\\e668"}.icon-span:before{content:"\\e669"}.icon-textarea:before{content:"\\e66a"}.icon-tooltip:before{content:"\\e66b"}.icon-slot:before{content:"\\e66c"}.icon-transfer:before{content:"\\e66d"}.icon-upload:before{content:"\\e673"}.icon-tag:before{content:"\\e671"}.icon-watermark:before{content:"\\e672"}.icon-tab:before{content:"\\e674"}.icon-tree:before{content:"\\e675"}.icon-table:before{content:"\\e677"}.icon-add-child:before{content:"\\e678"}.icon-add2:before{content:"\\e679"}.icon-add:before{content:"\\e67a"}.icon-alignitems-baseline:before{content:"\\e67b"}.icon-add-circle:before{content:"\\e67c"}.icon-alignitems-center:before{content:"\\e67d"}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-subst,.hljs-title{color:#000;font-weight:400}.hljs-title.function_{color:#7a7a43}.hljs-code,.hljs-comment,.hljs-quote{color:#8c8c8c;font-style:italic}.hljs-meta{color:#9e880d}.hljs-section{color:#871094}.hljs-built_in,.hljs-keyword,.hljs-literal,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-selector-tag,.hljs-symbol,.hljs-template-tag,.hljs-type,.hljs-variable.language_{color:#0033b3}.hljs-attr,.hljs-property{color:#871094}.hljs-attribute{color:#174ad4}.hljs-number{color:#1750eb}.hljs-regexp{color:#264eff}.hljs-link{color:#006dcc;text-decoration:underline}.hljs-meta .hljs-string,.hljs-string{color:#067d17}.hljs-char.escape_{color:#0037a6}.hljs-doctag{text-decoration:underline}.hljs-template-variable{color:#248f8f}.hljs-addition{background:#bee6be}.hljs-deletion{background:#d6d6d6}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}')),document.head.appendChild(e)}}catch(rs){}}();var Jn=Object.defineProperty,Zn=(e,t,n)=>(((e,t,n)=>{t in e?Jn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const ei={type:(e,t)=>Object.prototype.toString.call(e)==="[object "+t+"]",Undef:e=>null==e,Element:e=>"object"==typeof e&&null!==e&&1===e.nodeType&&!ei.Object(e),trueArray:e=>Array.isArray(e)&&e.length>0,Function(e){const t=this.getType(e);return"Function"===t||"AsyncFunction"===t},getType(e){const t=Object.prototype.toString.call(e);return/^\[object (.*)\]$/.exec(t)[1]},empty:e=>!!(null==e||Array.isArray(e)&&Array.isArray(e)&&!e.length)||"string"==typeof e&&!e};function ti(e,t){return{}.hasOwnProperty.call(e,t)}function ni(e,t,n){e[t]=n}function ii(e,t={},n){let i=!1;for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o];if((i=Array.isArray(r))||ei.Object(r)){let t=void 0===e[o];i?(i=!1,t&&ni(e,o,[])):r._clone&&void 0!==n||t&&ni(e,o,{}),e[o]=ii(e[o],r,n)}else ni(e,o,r),ei.Undef(r)||(ei.Undef(r.__json)||(e[o].__json=r.__json),ei.Undef(r.__origin)||(e[o].__origin=r.__origin))}return void 0!==n&&Array.isArray(e)?e.filter(e=>!e||!e.__ctrl):e}function oi(e){return ii({},{value:e}).value}["Date","Object","String","Boolean","Array","Number"].forEach(e=>{ei[e]=function(t){return ei.type(t,e)}});const ri="[[FORM-CREATE-PREFIX-",ai="-FORM-CREATE-SUFFIX]]";function li(e){return new Function("return "+e)()}function si(e,t){if(e&&ei.String(e)&&e.length>4){let o=e.trim(),r=!1;try{if(o.indexOf(ai)>0&&0===o.indexOf(ri))o=o.replace(ai,"").replace(ri,""),r=!0;else if(0===o.indexOf("$FN:"))o=o.substring(4),r=!0;else if(0===o.indexOf("$EXEC:"))o=o.substring(6),r=!0;else{if(0===o.indexOf("$GLOBAL:")){const t=o.substring(8);return o=function(...e){const n=e[0].api.getGlobalEvent(t);if(n)return n.call(this,...e)},o.__json=e,o.__inject=!0,o}if(0===o.indexOf("$FNX:"))return o=li("function($inject){\n"+o.substring(5)+"\n}"),o.__json=e,o.__inject=!0,o;(!t&&0===o.indexOf("function ")&&"function "!==o||!t&&0===o.indexOf("function(")&&"function("!==o)&&(r=!0)}if(!r)return e;let i;try{i=li(o)}catch(n){i=li("function "+o)}return i.__json=e,i}catch(i){return void"解析失败:".concat(o,"\n\nerr: ").concat(i)}}return e}function ci(e){return ui(e.replace(/(-[a-z])/g,function(e){return e.replace("-","").toLocaleUpperCase()}))}function ui(e){return e.replace(e[0],e[0].toLowerCase())}const di={name:"zh-cn",form:{field:"字段 ID",title:"字段名称",info:"提示信息",control:"组件联动",labelPosition:"标签的位置",labelStyle:"标签的样式",labelSuffix:"标签的后缀",size:"表单的尺寸",event:"表单事件",labelWidth:"标签的宽度",hideRequiredAsterisk:"隐藏必填字段的标签旁边的红色星号",showMessage:"显示校验错误信息",inlineMessage:"以行内形式展示校验信息",submitBtn:"是否显示表单提交按钮",resetBtn:"是否显示表单重置按钮",appendChild:"添加子级",formMode:"表单模式",formName:"表单名称",componentMode:"生成组件",htmlMode:"生成HTML",document:"帮助文档",controlDocument:"需要更详细的配置方法?请查看{doc}",onSubmit:"表单提交时触发",onReset:"表单重置后触发",onCreated:"表单组件初始化完毕后触发",onMounted:"表单组件渲染完毕后触发",onReload:"表单渲染规则重载后触发",onChange:"表单组件的值发生变化时触发",beforeSubmit:"表单验证通过时触发",beforeFetch:"远程数据请求发送前触发"},ai:{name:"智能助理",welcome:"欢迎使用 AI 助理",info:"我可以帮助您快速生成和修改表单,帮助您轻松高效地完成表单设计。",try:"试着问我",change:"换一换",placeholder:"请描述您的需求...",error:"AI 服务暂时不可用,请稍后重试"},warning:{name:"组件的唯一标识,用于获取和修改该组件的配置规则。通过该标识可以精确定位组件,实现对组件属性和行为的控制。",field:"组件对应的字段名用于与组件的数据进行绑定。字段名需以字母开头,以确保能够正确识别。",fetch:"远程数据通过远程请求加载组件的配置项。配置请求参数后,组件会自动发起请求,获取远程数据并根据返回的结果更新组件。",fetchQuery:"定义请求的 GET 参数,通过 URL 传递数据。",fetchData:"定义请求的 POST 参数,通过请求体传递数据。",fetchDataType:"选择请求体的数据类型,确保数据格式正确。",beforeFetch:"在请求发送前,可通过处理函数修改请求参数;若需终止请求,直接返回 false 或一个拒绝的 Promise。",fetchParse:"请求返回后,可以通过处理函数对返回的结果进行处理,将结果转换为组件所需的数据和结构。",language:"管理页面的多语言数据,在组件中配置不同语言的文本,支持一键切换语言体系,便于在多语言环境下使用和展示内容。"},computed:{fieldUsed:"【{label}】在计算公式中被使用,请先修改对应公式",fieldExist:"【{label}】字段已存在",fieldEmpty:"字段名称不能为空",fieldChar:"字段名称必须以字母开头"},validate:{type:"字段类型",typePlaceholder:"请选择",trigger:"触发方式",mode:"验证方式",modes:{required:"必填",pattern:"正则表达式",validator:"自定义验证",min:"最小值",max:"最大值",len:"长度",maxLen:"最大长度",minLen:"最小长度",uppercase:"全大写",lowercase:"全小写",email:"邮箱格式",url:"URL格式",ip:"IP地址",phone:"手机号",positive:"正数",negative:"负数",integer:"整数",number:"数字"},types:{string:"文本",boolean:"布尔",array:"多选",number:"数字",integer:"整数",float:"小数",object:"合集",date:"日期",url:"URL链接",email:"邮箱地址"},message:"错误信息",auto:"自动获取",autoRequired:"请输入{title}",autoMode:"请输入正确的{title}",requiredPlaceholder:"请输入提示语",required:"是否必填",rule:"验证规则"},tableOptions:{handle:"操作",add:"添加",empty1:"点击右下角",empty2:"按钮添加一列",rmCol:"删除当前列",rmRow:"删除当前行",batchRmCol:"删除列",batchRmRow:"删除行",batchSplit:"拆分单元格",batchMerge:"合并单元格",splitRow:"拆分成行",splitCol:"拆分成列",mergeBottom:"向下合并",mergeRight:"向右合并",addTop:"添加上列",addBottom:"添加下列",addLeft:"添加左列",addRight:"添加右列",keyValue:"键值对"},struct:{title:"编辑数据",only:"【{label}】只允许添加一个",errorMsg:"输入的内容语法错误",configured:"已配置"},event:{title:"设置事件",create:"创建事件",list:"事件列表",placeholder:"请输入事件的名称",saveMsg:"请先保存当前正在编辑的事件",type:"类型",info:"说明",label:"字段",inject:{api:"当前表单的api",rule:"当前表单的生成规则",self:"组件的生成规则",option:"表单的配置",args:"事件的原始参数"}},eventInfo:{blur:"失去焦点时触发",focus:"获得焦点时触发",change:"当绑定值变化时触发",input:"在值改变时触发",clear:"在点击清空按钮时触发",close:"关闭组件时触发",click:"点击组件时触发",add:"增加时触发",delete:"删除时触发",visibleChange:"下拉框出现/隐藏时触发",calendarChange:"在日历所选日期更改时触发",panelChange:"当日期面板改变时触发",open:"打开的回调",opened:"打开动画结束时的回调",closed:"关闭动画结束时的回调",openAutoFocus:"输入焦点聚焦在内容时的回调",closeAutoFocus:"输入焦点从内容失焦时的回调",submit:"表单提交时触发",confirm:"点击确认按钮时触发",validateFail:"表单验证失败时触发",hook_load:"组件规则加载后触发",hook_mounted:"组件挂载后触发",hook_deleted:"组件规则被移除后触发",hook_watch:"组件规则发生变化后触发",hook_value:"组件的值发生变化后触发",hook_hidden:"组件显示状态发生变化后触发",hook_titleClick:"点击组件的标签名称时触发"},fetch:{title:"设置数据源",create:"创建数据源",config:"请求配置",action:"请求链接",actionRequired:"请输入正确的链接",placeholder:"请输入数据源的名称",method:"请求方式",data:"附带数据",dataType:"数据类型",headers:"请求头部",query:"请求参数",parse:"数据处理",response:"接口返回的数据",onError:"错误处理",beforeFetch:"前置处理",remote:"远程数据",static:"静态数据",optionsType:{fetch:"远程数据",struct:"静态数据"},preview:"预览响应数据",test:"测试请求",previewEmpty:'点击"测试请求"按钮预览响应数据',requestFailed:"请求失败"},style:{width:"宽度",height:"高度",color:"颜色",backgroundColor:"背景色",margin:"外边距",padding:"内边距",borderRadius:"圆角",border:"边框",solid:"实线",dashed:"虚线",dotted:"点状虚线",double:"双实线",opacity:"透明度",scale:"缩放",minWidth:"最小宽",minHeight:"最小高",maxWidth:"最大宽",maxHeight:"最大高",overflow:{name:"溢出",visible:"可见",hidden:"隐藏",scroll:"滚动",auto:"溢出后自动滚动"},shadow:{name:"阴影",x:"x轴偏移量",y:"y轴偏移量",vague:"模糊半径",extend:"扩散半径",inset:"向内",external:"向外",mode:"模式",classic:"经典",flat:"扁平",solid:"立体"},font:{name:"文字",size:"大小",family:"字体",align:"对齐方式",height:"行高",spacing:"字间距",preview:"样式预览"},family:{"Microsoft YaHei":"微软雅黑",SimSun:"宋体",SimHei:"黑体",KaiTi:"楷体",FangSong:"仿宋",LiSu:"隶书"},position:{name:"位置",static:"默认定位",relative:"相对定位",absolute:"绝对定位",fixed:"固定定位",sticky:"粘性定位"},decoration:{name:"修饰",underline:"下划线","line-through":"删除线",overline:"上划线"},weight:{name:"粗细",300:"细体",400:"常规体",500:"中黑体",700:"中粗体"}},designer:{component:"组件配置",id:"唯一值",name:"编号",type:"组件类型",form:"表单配置",json:"渲染规则",style:"组件样式配置",rule:"基础配置",advanced:"高级配置",props:"属性配置",customProps:"自定义属性配置",validate:"验证配置",event:"事件配置",clearWarn:"清空后将不能恢复,确定要清空吗?",childEmpty:"点击右下角 \\e789 按钮添加一列",dragEmpty:"拖拽左侧列表中的组件到此处",unload:"确定离开当前页面吗?",comList:"组件列表"},language:{name:"国际化配置",add:"新增词条",batchRemove:"批量删除",select:"选择多语言"},menu:{main:"基础组件",aide:"辅助组件",layout:"布局组件",component:"组件",subform:"子表单组件",tree:"大纲"},props:{success:"成功",error:"失败",disabled:"禁用",time:"时间",size:"尺寸",email:"邮箱",number:"数字",globalData:"全局数据",mobile:"移动端",reactive:"响应式",pc:"电脑端",title:"标题",content:"内容",collection:"合集",group:"分组",custom:"自定义",change:"改变",blur:"失去焦点",preview:"预览",clear:"清空",cancel:"取消",close:"关闭",ok:"确定",save:"保存",refresh:"刷新",submit:"提交",reset:"重置",copy:"复制",import:"导入",delete:"删除",hide:"隐藏",show:"显示",position:"位置",render:"渲染",large:"大",default:"默认",small:"小",always:"常显",never:"不显示",hover:"悬浮",click:"点击",button:"按钮",year:"年份",month:"月份",date:"日期",dates:"日期多选",week:"一周",datetime:"日期时间","datetime-local":"日期时间",datetimerange:"日期时间区间",daterange:"日期区间",monthrange:"月份区间",left:"左对齐",right:"右对齐",top:"顶部",text:"文字",picture:"图片","picture-card":"卡片",center:"居中",vertical:"竖向",horizontal:"横向",manage:"管理",key:"键名",name:"名称",value:"值",inputData:"默认值",append:"插入",options:"选项数据",option:"选项",callback:"回调",style:"样式",card:"卡片",_self:"当前窗口",_blank:"新的窗口",_parent:"父级窗口",_top:"顶级窗口"},com:{cascader:{name:"级联选择器",event:{expandChange:"当展开节点发生变化时触发",removeTag:"在多选模式下移除Tag时触发"},props:{props:"配置选项",placeholder:"输入框占位文本",disabled:"是否禁用",clearable:"是否支持清空选项",showAllLevels:"输入框中是否显示选中值的完整路径",collapseTags:"多选模式下是否折叠Tag",collapseTagsTooltip:"当鼠标悬停于折叠标签的文本时,是否显示所有选中的标签",separator:"选项分隔符",filterable:"该选项是否可以被搜索",tagType:"标签类型"},propsOpt:{multiple:"是否多选",expandTrigger:"次级菜单的展开方式",checkStrictly:"是否严格的遵守父子节点不互相关联",emitPath:"在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组",value:"指定选项的值为选项对象的某个属性值",label:"指定选项标签为选项对象的某个属性值",children:"指定选项的子选项为选项对象的某个属性值",disabled:"指定选项的禁用为选项对象的某个属性值",leaf:"指定选项的叶子节点的标志位为选项对象的某个属性值"}},checkbox:{name:"多选框",props:{input:"是否可以填写",type:"按钮类型",disabled:"是否禁用",min:"可被勾选的最小数量",max:"可被勾选的最大数量",textColor:"当按钮为活跃状态时的字体颜色",fill:"当按钮为活跃状态时的边框和背景颜色"}},col:{name:"布局格子",props:{span:"栅格占据的列数",offset:"栅格左侧的间隔格数",push:"栅格向右移动格数",pull:"栅格向左移动格数"}},colorPicker:{name:"颜色选择器",event:{activeChange:"面板中当前显示的颜色发生改变时触发"},props:{disabled:"是否禁用",showAlpha:"是否支持透明度选择",colorFormat:"颜色的格式",predefine:"预定义颜色"}},datePicker:{name:"日期",props:{pickerOptions:"当前时间日期选择器特有的选项",readonly:"完全只读",disabled:"禁用",type:"显示类型",editable:"文本框可输入",clearable:"是否显示清除按钮",placeholder:"非范围选择时的占位内容",startPlaceholder:"范围选择时开始日期的占位内容",endPlaceholder:"范围选择时结束日期的占位内容",format:"显示在输入框中的格式",align:"对齐方式",rangeSeparator:"选择范围时的分隔符",unlinkPanels:"在范围选择器里取消两个日期面板之间的联动"}},dateRange:{name:"日期区间"},timeRange:{name:"时间区间"},elAlert:{name:"提示",description:"说明文字",props:{title:"标题",type:"主题",description:"辅助性文字",closable:"是否可关闭",center:"文字是否居中",closeText:"关闭按钮自定义文本",showIcon:"是否显示图标",effect:"选择提供的主题"}},elButton:{name:"按钮",props:{formCreateChild:"内容",size:"尺寸",type:"类型",plain:"是否朴素按钮",round:"是否圆角按钮",circle:"是否圆形按钮",loading:"是否加载中状态",disabled:"是否禁用状态"}},elCard:{name:"卡片",props:{header:"标题",shadow:"阴影显示时机"}},elCollapse:{name:"折叠面板",event:{change:"切换当前活动面板在手风琴模式下其类型是string在其他模式下是array"},props:{accordion:"是否手风琴模式"}},elCollapseItem:{name:"面板",props:{title:"面板标题",name:"唯一标志符",disabled:"是否禁用"}},elDivider:{name:"分割线",props:{formCreateChild:"设置分割线文案",contentPosition:"设置分割线文案的位置"}},elTabPane:{name:"选项卡",props:{label:"选项卡标题",disabled:"是否禁用",name:"选项卡的标识符",lazy:"标签是否延迟渲染"}},elTabs:{name:"标签页",event:{tabClick:"tab 被选中时触发",tabChange:"activeName 改变时触发",tabRemove:"点击 tab 移除按钮时触发",tabAdd:"点击 tab 新增按钮时触发",edit:"点击 tab 的新增或移除按钮后触发"},props:{type:"风格类型",closable:"标签是否可关闭",tabPosition:"选项卡所在位置",stretch:"标签的宽度是否自撑开"}},elTag:{name:"标签",props:{formCreateNative:"是否显示标题",formCreateTitle:"标题",formCreateChild:"标签内容",type:"标签的类型",size:"标签的尺寸",effect:"标签的主题",closable:"是否可关闭",disableTransitions:"是否禁用渐变动画",hit:"是否有边框描边",round:"是否为圆形",color:"背景色"}},elTransfer:{name:"穿梭框",event:{leftCheckChange:"左侧列表元素被用户选中 / 取消选中时触发",rightCheckChange:"右侧列表元素被用户选中 / 取消选中时触发"},props:{filterable:"是否可搜索",filterPlaceholder:"搜索框占位符",targetOrder:"右侧列表元素的排序策略",targetOrderInfo:"若为 original则保持与数据相同的顺序若为 push则新加入的元素排在最后若为 unshift则新加入的元素排在最前",titles:"自定义列表标题",buttonTexts:"自定义按钮文案",props:"数据源的字段别名"}},elTreeSelect:{name:"树形选择",event:{removeTag:"多选模式下移除tag时触发"},props:{multiple:"是否多选",disabled:"是否禁用",clearable:"是否可以清空选项",collapseTags:"多选时是否将选中值按文字的形式展示",multipleLimit:"多选时用户最多可以选择的项目数,为 0 则不限制",placeholder:"占位符",props:"配置选项",renderAfterExpand:"是否在第一次展开某个树节点后才渲染其子节点",defaultExpandAll:"是否默认展开所有节点",expandOnClickNode:"是否在点击节点的时候展开或者收缩节点",checkOnClickNode:"是否在点击节点的时候选中节点",nodeKey:"每个树节点用来作为唯一标识的属性,整棵树应该是唯一的"}},elImage:{name:"图片",props:{src:"图片链接"}},fcTitle:{name:"标题",props:{title:"标题",size:"尺寸",align:"对齐方式"}},fcEditor:{name:"富文本框",props:{disabled:"是否禁用"}},fcRow:{name:"栅格布局",props:{gutter:"栅格间隔",type:"flex布局模式",justify:"flex布局下的水平排列方式",align:"flex布局下的垂直排列方式"}},fcTable:{name:"表格布局",props:{border:"是否显示边框",borderColor:"边框颜色",borderWidth:"边框宽度"}},fcTableGrid:{name:"格子"},signaturePad:{name:"手写签名",info:"删除签名前的回调函数,返回 false 可阻止删除操作",props:{penColor:"线条的颜色",disabled:"禁用",beforeRemove:"删除前置回调"}},group:{name:"子表单",info:"删除子表单项前的回调函数,返回 false 可阻止删除操作",props:{type:"类型",title:"标题",disabled:"是否禁用",syncDisabled:"是否与子表单强制同步禁用状态",expand:"设置默认展开几项",button:"是否显示操作按钮",sortBtn:"是否显示排序按钮",min:"设置最小添加几项",max:"设置最多添加几项",onBeforeRemove:"删除前置回调"}},html:{name:"HTML",props:{formCreateNative:"是否显示标题",formCreateTitle:"标题",formCreateChild:"内容"}},input:{name:"输入框",event:{change:"当值改变时当组件失去焦点或用户按Enter时触发"},props:{type:"类型",maxlength:"最大输入长度",minlength:"最小输入长度",placeholder:"输入框占位文本",clearable:"是否显示清除按钮",disabled:"是否禁用",readonly:"是否只读"}},inputNumber:{name:"计数器",props:{precision:"数值精度",min:"设置计数器允许的最小值",max:"设置计数器允许的最大值",step:"计数器步长",stepStrictly:"是否只能输入 step 的倍数",disabled:"是否禁用计数器",controls:"是否使用控制按钮",controlsPosition:"控制按钮位置",placeholder:"输入框占位文本"}},password:{name:"密码输入框",event:{change:"当值改变时当组件失去焦点或用户按Enter时触发"},props:{disabled:"是否禁用",readonly:"是否只读",maxlength:"最大输入长度",minlength:"最小输入长度",placeholder:"输入框占位文本",clearable:"是否显示清除按钮"}},radio:{name:"单选框",props:{input:"是否可以填写",disabled:"是否禁用",type:"按钮形式",textColor:"按钮形式激活时的文本颜色",fill:"按钮形式激活时的填充色和边框色"}},rate:{name:"评分",props:{max:"最大分值",disabled:"是否禁用",allowHalf:"是否允许半选",voidColor:"未选中时图标的颜色",disabledVoidColor:"只读时未选中时图标的颜色",voidIconClass:"未选中时图标的类名",disabledVoidIconClass:"只读时未选中时图标的类名",showScore:"是否显示当前分数",textColor:"辅助文字的颜色",scoreTemplate:"分数显示模板"}},select:{name:"选择器",event:{removeTag:"多选模式下移除tag时触发"},props:{multiple:"是否多选",disabled:"是否禁用",clearable:"是否可以清空选项",collapseTags:"多选时是否将选中值按文字的形式展示",multipleLimit:"多选时用户最多可以选择的项目数,为 0 则不限制",placeholder:"占位符",filterable:"是否可搜索",allowCreate:"是否允许用户创建新条目",noMatchText:"搜索条件无匹配时显示的文字",noDataText:"选项为空时显示的文字",reserveKeyword:"多选且可搜索时,是否在选中一个选项后保留当前的搜索关键词",defaultFirstOption:"在输入框按下回车,选择第一个匹配项",remote:"其中的选项是否从服务器远程加载",remoteMethod:"自定义远程搜索方法"}},slider:{name:"滑块",props:{min:"最小值",max:"最大值",disabled:"是否禁用",step:"步长",showInput:"是否显示输入框,仅在非范围选择时有效",showInputControls:"在显示输入框的情况下,是否显示输入框的控制按钮",showStops:"是否显示间断点",range:"是否为范围选择",vertical:"是否竖向模式",height:"Slider 高度,竖向模式时必填"}},space:{name:"间距",props:{height:"高度"}},subForm:{name:"分组",props:{disabled:"是否禁用",syncDisabled:"是否与子表单强制同步禁用状态"}},switch:{name:"开关",props:{disabled:"是否禁用",width:"宽度px",activeText:"打开时的文字描述",inactiveText:"关闭时的文字描述",activeValue:"打开时的值",inactiveValue:"关闭时的值",activeColor:"打开时的背景色",inactiveColor:"关闭时的背景色"}},tableForm:{name:"表格表单",props:{disabled:"是否禁用",filterEmptyColumn:"是否过滤空行的数据",max:"最多添加几行,为 0 则不限制",min:"最少添加几行",addable:"允许新增",deletable:"允许删除"}},tableFormColumn:{name:"表格格子",label:"自定义名称",props:{align:"对齐方式",label:"标题",width:"宽度",color:"颜色",required:"是否显示必填星号"}},text:{name:"文字",props:{formCreateNative:"是否显示标题",formCreateTitle:"标题",formCreateChild:"内容"}},textarea:{name:"多行输入框",event:{change:"当值改变时当组件失去焦点或用户按Enter时触发"},props:{disabled:"是否禁用",readonly:"是否只读",maxlength:"最大输入长度",minlength:"最小输入长度",showWordLimit:"是否显示统计字数",placeholder:"输入框占位文本",rows:"输入框行数",autosize:"高度是否自适应"}},timePicker:{name:"时间",props:{pickerOptions:"当前时间日期选择器特有的选项",readonly:"完全只读",disabled:"禁用",editable:"文本框可输入",clearable:"是否显示清除按钮",placeholder:"非范围选择时的占位内容",startPlaceholder:"范围选择时开始日期的占位内容",endPlaceholder:"范围选择时开始日期的占位内容",isRange:"是否为时间范围选择",arrowControl:"是否使用箭头进行时间选择",align:"对齐方式"}},tree:{name:"树形控件",event:{nodeClick:"当节点被点击的时候触发",nodeContextmenu:"当某一节点被鼠标右键点击时会触发该事件",checkChange:"当复选框被点击的时候触发",check:"点击节点复选框之后触发",currentChange:"当前选中节点变化时触发的事件",nodeExpand:"节点被展开时触发的事件",nodeCollapse:"节点被关闭时触发的事件",nodeDragStart:"节点开始拖拽时触发的事件",nodeDragEnter:"拖拽进入其他节点时触发的事件",nodeDragLeave:"拖拽离开某个节点时触发的事件",nodeDragOver:"在拖拽节点时触发的事件(类似浏览器的 mouseover 事件)",nodeDragEnd:"拖拽结束时(可能未成功)触发的事件",nodeDrop:"拖拽成功完成时触发的事件"},props:{emptyText:"内容为空的时候展示的文本",props:"配置选项",renderAfterExpand:"是否在第一次展开某个树节点后才渲染其子节点",defaultExpandAll:"是否默认展开所有节点",expandOnClickNode:"是否在点击节点的时候展开或者收缩节点,如果为 false则只有点箭头图标的时候才会展开或者收缩节点。",checkOnClickNode:"是否在点击节点的时候选中节点",autoExpandParent:"展开子节点的时候是否自动展开父节点",checkStrictly:"在显示复选框的情况下,是否严格的遵循父子不互相关联的做法",accordion:"是否每次只打开一个同级树节点展开",indent:"相邻级节点间的水平缩进(px)",nodeKey:"每个树节点用来作为唯一标识的属性,整棵树应该是唯一的"}},upload:{name:"上传",info:"上传成功后,将接口返回的 URL 赋值给 file.url或将返回结果赋值给 file.value以便在后续的表单提交时获取这些数据。",event:{remove:"文件列表移除文件时触发",preview:"点击文件列表中已上传的文件时触发",error:"文件上传失败时触发",progress:"文件上传时触发",exceed:"当超出限制时触发"},props:{listType:"上传类型",multiple:"是否支持多选文件",action:"上传的地址(必填)",beforeUpload:"上传文件之前触发",onSuccess:"上传成功时触发",beforeRemove:"删除文件之前触发",headers:"设置上传的请求头部",data:"上传时附带的额外参数",name:"上传的文件字段名",withCredentials:"支持发送 cookie 凭证信息",accept:"接受上传的文件类型",autoUpload:"是否在选取文件后立即进行上传",disabled:"是否禁用",limit:"最大允许上传个数"}}}},fi=(e,t)=>N({message:e,type:t||"info",customClass:"_fc-message-tip"}),pi=e=>fi(e,"error"),hi=Object.assign||function(e){for(let t,n=1;n<arguments.length;n++)for(let i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&ni(e,i,t[i]);return e};function mi(e){return"object"!=typeof e||null===e?e:e instanceof Array?[...e]:{...e}}function gi(e,t){return'<html lang="zh">\n <head>\n <meta charset="UTF-8">\n \x3c!-- Import style --\x3e\n <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css"/>\n \x3c!-- Import Vue 3 --\x3e\n <script src="https://unpkg.com/vue@3"><\/script>\n \x3c!-- Import element-plus --\x3e\n <script src="https://unpkg.com/element-plus"><\/script>\n \x3c!-- Import formCreate --\x3e\n <script src="https://unpkg.com/@form-create/element-ui@3"><\/script>\n <script src="https://unpkg.com/@form-create/designer@3"><\/script>\n </head>\n <body>\n <div id="app">\n <form-create :rule="rule" :option="options" v-model="formData" v-model:api="api" @submit="onSubmit"></form-create>\n </div>\n <script>\n const App = {\n data() {\n return {\n rule: formCreate.parseJson(\''.concat(e.replaceAll("\\","\\\\").replaceAll("'","\\'"),"'),\n options: formCreate.parseJson('").concat(t.replaceAll("\\","\\\\").replaceAll("'","\\'"),"'),\n formData: {},\n api: null,\n };\n },\n methods: {\n onSubmit(formData){\n console.log('submit', formData);\n }\n }\n };\n const app = Vue.createApp(App);\n app.use(ElementPlus).use(formCreate);\n app.mount(\"#app\");\n <\/script>\n </body>\n</html>")}function vi(){return{type:"Required",field:"formCreate$required",title:"是否必填"}}function _i(e,t,n,i=[]){t.id||(t.id=1),n&&n--;for(let o=0;o<3;o++){const r={[t.label]:e+10*n+(o+1),[t.value]:""+t.id++};n&&_i(e,t,n,r.children=[]),i.push(r)}return i}function bi(e,t){const n=[{label:e("fetch.optionsType.struct"),value:2},{label:e("fetch.optionsType.fetch"),value:1}],i=[{value:1,rule:[{type:"FetchConfig",field:"formCreateEffect>fetch",props:{to:t}}]},{value:2,rule:[{type:"TableOptions",field:"formCreate"+xi(t).replace(".",">"),props:{column:[{label:e("props.key"),key:"label"},{value:!0,label:e("props.value"),key:"value"}],keyValue:"label"}}]}];return{type:"radio",title:e("props.options"),field:"_optionType",value:2,options:n,props:{type:"button"},control:i}}function yi(e,t,n,i){const o=[{label:e("fetch.optionsType.struct"),value:2},{label:e("fetch.optionsType.fetch"),value:1}],r=[{value:1,rule:[{type:"FetchConfig",field:"formCreateEffect>fetch",props:{to:t}}]},{value:2,rule:[{type:"TreeOptions",field:"formCreate"+xi(t).replace(".",">"),props:{columns:{label:n,value:i},keyValue:n}}]}];return{type:"radio",title:e("props.options"),field:"_optionType",value:2,options:o,props:{type:"button"},control:r}}function xi(e){return e.replace(e[0],e[0].toLocaleUpperCase())}const wi=function(e){const t=/object ([a-zA-Z]*)/.exec(Object.prototype.toString.call(e));return t&&Ai[t[1].toLowerCase()]?Ai[t[1].toLowerCase()](e):e},Ai={object:function(e){var t=[];for(var n in e)!ti(e,n)||t.push(wi(n)+": "+(null!=e[n]?wi(e[n]):"null"));return"{\n "+t.join(",\n ")+"\n}"},function:function(e){var t=/^ *([\w]+) *\(/.exec(e=""+e);return t&&"function"!==t[1]?"function "+e:e},array:function(e){for(var t=0,n=[];t<e.length;t++)n[t]=null!=e[t]?wi(e[t]):"null";return"["+n.join(", ")+"]"},string:function(e){for(var t=e.split(""),n=0;n<t.length;n++){var i=t[n];i>=" "?"\\"===i?t[n]="\\\\":'"'===i&&(t[n]='\\"'):t[n]="\n"===i?"\\n":"\r"===i?"\\r":"\t"===i?"\\t":"\b"===i?"\\b":"\f"===i?"\\f":"\\u00"+((i=i.charCodeAt())>15?1:0)+i%16}return'"'+t.join("")+'"'}},ki=function(e){if(e&&"object"==typeof e)for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];(Array.isArray(n)||ei.Object(n))&&ki(n),ei.String(n)&&(e[t]=si(n))}return e};const Ci=e=>(t,n)=>Si(t,n,I(e)),Si=(e,t,n)=>function(e,t,n){let i=0,o=(t=(t||"").split(".")).length;for(;null!=e&&i<o;)e=e[t[i++]];return i&&i===o&&void 0!==e?e:n}(n,e,"").replace(/\{(\w+)\}/g,(e,n)=>{var i;return"".concat(null!=(i=null==t?void 0:t[n])?i:"{".concat(n,"}"))}),Ei=e=>(e=>{const t=d(()=>I(e).name),n=d(()=>xi(ci(t.value||""))),i=L(e)?e:b(e);return{lang:t,name:n,locale:i,t:Ci(e)}})(d(()=>e.value||di)),Ti=(e,t,n)=>t.map(t=>(t.label=e((n||"props")+"."+t.label||t.value)||t.label,t)),Ri=(e,t,n)=>n.map(n=>("formCreate$required"===n.field?n.title=e("validate.required")||n.title:n.field&&"_optionType"!==n.field&&(n.title=e("com."+t+"."+n.field)||n.title),"template"===n.type&&ei.trueArray(n.children)&&(n.children=Ri(e,t,n.children)),n)),Oi=e=>{const t=[];return e&&e.forEach(e=>{if(e._fc_drag_tag){const n={id:e.__fc__.id,rule:e,children:Oi(e.children)};n.children.length||delete n.children,t.push(n)}else t.push(...Oi(e.children))}),t},Mi=e=>{const t=e=>{const n=[];return e&&e.forEach(e=>{e.field?(e.children=t(e.children||[]),e.children.length||delete e.children,n.push(e)):n.push(...t(e.children||[]))}),n};return t(e)},Di=e=>{const t=e=>{const n=[];return e&&e.forEach(e=>{if("object"==typeof e)if(e._fc_drag_tag){const i={_fc_id:e._fc_id,type:e.type,field:e.field,title:e.title,name:e.name,slot:e.slot,props:{...e.props||{}},options:mi(e.options),children:t(e.children||[])};e.children&&"string"==typeof e.children[0]&&(i.content=e.children[0]),i.children.length||delete i.children,n.push(i)}else n.push(...t(e.children))}),n};return t(e)};function Ni(e){return{name:"$inject",info:'$inject <a href="https://view.form-create.com/inject" target="_blank">'.concat(e("form.document"),"</a>")}}function Ii(e){return-1!==["",null,void 0].indexOf(e)}function Li(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.top=0,t.style.left="-9999px",t.value=e,document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(n){}fi("已复制!","success"),document.body.removeChild(t)}function Fi(e){return e.filter((t,n)=>e.indexOf(t)===n)}function Pi(e,t,n={}){const{leading:i=!1,trailing:o=!0}=n;let r,a,l,s,c=0;const u=function(...n){const u=Date.now();l=n,s=this,!c&&!i&&(c=u);const d=t-(u-c);return d<=0||d>t?(r&&(clearTimeout(r),r=null),c=u,a=e.apply(s,l)):!r&&o&&(r=setTimeout(()=>{c=i?0:Date.now(),r=null,a=e.apply(s,l)},d)),a};return u.cancel=function(){clearTimeout(r),c=0,r=null,l=null,s=null},u}function Bi({t:e}){return[{type:"input",field:"formCreateFormName",value:"",title:e("form.formName")},{type:"radio",field:"labelPosition",value:"left",title:e("form.labelPosition"),options:Ti(e,[{value:"left",label:"left"},{value:"right",label:"right"},{value:"top",label:"top"}])},{type:"radio",field:"size",value:"small",title:e("form.size"),options:Ti(e,[{value:"large",label:"large"},{value:"default",label:"default"},{value:"small",label:"small"}])},{type:"input",field:"labelSuffix",value:"",title:e("form.labelSuffix"),style:{width:"150px"}},{type:"SizeInput",field:"labelWidth",value:"125px",title:e("form.labelWidth")},{type:"switch",field:"hideRequiredAsterisk",value:!1,title:e("form.hideRequiredAsterisk")},{type:"switch",field:"showMessage",value:!0,title:e("form.showMessage")},{type:"switch",field:"inlineMessage",value:!1,title:e("form.inlineMessage")},{type:"switch",field:"_submitBtn>show",value:!0,title:e("form.submitBtn")},{type:"switch",field:"_resetBtn>show",value:!1,title:e("form.resetBtn")},{type:"FnConfig",field:"formCreate_event",name:"event",warning:e("form.controlDocument",{doc:'<a target="_blank" href="https://form-create.com/v3/guide/global-event" style="color: inherit;text-decoration: underline;">'+e("form.document")+"</a>"}),value:{},col:{show:!0},props:{eventConfig:[{name:"onSubmit",info:e("form.onSubmit"),args:["formData","api"]},{name:"onReset",info:e("form.onReset"),args:["api"]},{name:"onCreated",info:e("form.onCreated"),args:["api"]},{name:"onMounted",info:e("form.onMounted"),args:["api"]},{name:"onReload",info:e("form.onReload"),args:["api"]},{name:"onChange",info:e("form.onChange"),args:["field","value","options"]},{name:"beforeSubmit",info:e("form.beforeSubmit"),args:["formData","data"]},{name:"beforeFetch",info:e("form.beforeFetch"),args:["config","data"]}]},title:e("form.event")}]}function ji({t:e}){return[{type:"FieldInput",field:"field",value:"",title:e("form.field"),warning:e("warning.field")},{type:"LanguageInput",field:"title",value:"",title:e("form.title")},{type:"LanguageInput",field:"info",value:"",title:e("form.info")},{type:"SizeInput",field:"formCreateWrap>labelWidth",value:"",title:e("form.labelWidth")},{type:"Struct",field:"_control",name:"control",value:[],title:e("form.control"),warning:e("form.controlDocument",{doc:'<a target="_blank" href="https://view.form-create.com/control" style="color: inherit;text-decoration: underline;">'+e("form.document")+"</a>"}),props:{defaultValue:[],validate:e=>!!Array.isArray(e)&&(!e.length||!e.some(({rule:e})=>!Array.isArray(e)))}}]}function Vi({t:e}){return[{type:"Required",field:"$required",title:e("validate.required")},{type:"validate",field:"validate",title:e("validate.rule"),value:[]}]}function zi(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}function Hi(e){e=e||new Map;const t={$on(t,n){const i=e.get(t);i&&i.push(n)||e.set(t,[n])},$once(e,n){n._once=!0,t.$on(e,n)},$off(t,n){const i=e.get(t);i&&i.splice(i.indexOf(n)>>>0,1)},$emit(n,...i){(e.get(n)||[]).slice().map(e=>{e._once&&(t.$off(n,e),delete e._once),e(...i)}),(e.get("*")||[]).slice().map(e=>{e(n,i)})}};return t}let Ui=0;function Wi(){const e=370+ ++Ui;return"F"+Math.random().toString(36).substr(3,3)+Number("".concat(Date.now())).toString(36)+e.toString(36)+"c"}const Yi="radio",Gi={menu:"main",icon:"icon-radio",label:"单选框",name:Yi,input:!0,event:["change"],validate:["string","number"],rule:({t:e})=>({type:Yi,field:Wi(),title:e("com.radio.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:_i(e("props.option"),{label:"label",value:"value"},1)}),props:(e,{t:t})=>Ri(t,Yi+".props",[bi(t,"options"),{type:"switch",field:"disabled"},{type:"switch",field:"input"},{type:"switch",field:"type",props:{activeValue:"button",inactiveValue:"default"}},{type:"ColorInput",field:"textColor"},{type:"ColorInput",field:"fill"}])},$i="checkbox",qi={menu:"main",icon:"icon-checkbox",label:"多选框",name:$i,input:!0,event:["change"],validate:["array"],rule:({t:e})=>({type:$i,field:Wi(),title:e("com.checkbox.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:_i(e("props.option"),{label:"label",value:"value"},1)}),props:(e,{t:t})=>Ri(t,$i+".props",[bi(t,"options"),{type:"switch",field:"disabled"},{type:"switch",field:"input"},{type:"switch",field:"type",props:{activeValue:"button",inactiveValue:"default"}},{field:"min",type:"inputNumber",props:{min:0}},{field:"max",type:"inputNumber",props:{min:0}},{type:"ColorInput",field:"textColor"},{type:"ColorInput",field:"fill"}])},Qi="input",Ki={menu:"main",icon:"icon-input",label:"输入框",name:Qi,input:!0,event:["blur","focus","change","input","clear"],validate:["string","url","email"],rule:({t:e})=>({type:Qi,field:Wi(),title:e("com.input.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ri(t,Qi+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"select",field:"type",options:Ti(t,[{label:"text",value:"text"},{label:"number",value:"number"},{label:"time",value:"time"},{label:"date",value:"date"},{label:"month",value:"month"},{label:"datetime-local",value:"datetime-local"}])},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"clearable"}])},Xi="textarea",Ji={menu:"main",icon:"icon-textarea",label:"多行输入框",name:Xi,input:!0,event:["blur","focus","change","input"],validate:["string"],rule:({t:e})=>({type:"input",field:Wi(),title:e("com.textarea.name"),info:"",$required:!1,props:{type:"textarea"}}),props:(e,{t:t})=>Ri(t,Xi+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"switch",field:"showWordLimit"},{type:"input",field:"placeholder"},{type:"inputNumber",field:"rows",props:{min:0}},{type:"switch",field:"autosize"}])},Zi="password",eo={menu:"main",icon:"icon-password",label:"密码输入框",name:Zi,input:!0,event:["blur","focus","change","input","clear"],validate:["string"],rule:({t:e})=>({type:"input",field:Wi(),title:e("com.password.name"),info:"",$required:!1,props:{type:"password"}}),props:(e,{t:t})=>Ri(t,Zi+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"clearable"}])},to="inputNumber",no={menu:"main",icon:"icon-number",label:"计数器",name:to,input:!0,event:["blur","focus","change"],validate:["number","integer","float"],rule:({t:e})=>({type:to,field:Wi(),title:e("com.inputNumber.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ri(t,to+".props",[{type:"switch",field:"disabled"},{type:"inputNumber",field:"min"},{type:"inputNumber",field:"max"},{type:"inputNumber",title:"precision",field:"precision"},{type:"inputNumber",field:"step",props:{min:0}},{type:"switch",field:"stepStrictly"},{type:"switch",field:"controls",value:!0},{type:"select",field:"controlsPosition",options:Ti(t,[{label:"default",value:""},{label:"right",value:"right"}])},{type:"input",field:"placeholder"}])},io="select",oo={menu:"main",icon:"icon-select",label:"选择器",name:io,input:!0,event:["change","visibleChange","removeTag","clear","blur","focus"],validate:["string","number","array"],rule:({t:e})=>({type:io,field:Wi(),title:e("com.select.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:_i(e("props.option"),{label:"label",value:"value"},1)}),watch:{multiple({rule:e}){e.key=Wi()}},props:(e,{t:t})=>Ri(t,io+".props",[bi(t,"options"),{type:"switch",field:"multiple"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"switch",field:"collapseTags"},{type:"inputNumber",field:"multipleLimit",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"filterable"},{type:"switch",field:"remote"},{type:"FnInput",field:"remoteMethod",props:{body:!0,fnx:!0,name:"remoteMethod",args:[Ni(t)]}},{type:"switch",field:"allowCreate"},{type:"input",field:"noMatchText"},{type:"input",field:"noDataText"},{type:"switch",field:"reserveKeyword"},{type:"switch",field:"defaultFirstOption"}])},ro="switch",ao={menu:"main",icon:"icon-switch",label:"开关",name:ro,input:!0,event:["change"],rule:({t:e})=>({type:ro,field:Wi(),title:e("com.switch.name"),info:"",$required:!1,props:{activeValue:!0,inactiveValue:!1}}),props:(e,{t:t})=>Ri(t,ro+".props",[{type:"switch",field:"disabled"},{type:"inputNumber",field:"width",props:{min:0}},{type:"input",field:"activeText"},{type:"input",field:"inactiveText"},{type:"ValueInput",field:"activeValue"},{type:"ValueInput",field:"inactiveValue"},{type:"ColorInput",field:"activeColor"},{type:"ColorInput",field:"inactiveColor"}])},lo="slider",so={menu:"main",icon:"icon-slider",label:"滑块",name:lo,input:!0,event:["change","input"],validate:["number","array"],rule:({t:e})=>({type:lo,field:Wi(),title:e("com.slider.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ri(t,lo+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"range"},{type:"inputNumber",field:"min",props:{min:0}},{type:"inputNumber",field:"max",props:{min:0}},{type:"inputNumber",field:"step",props:{min:0}},{type:"switch",field:"showInput"},{type:"switch",field:"showInputControls",value:!0},{type:"switch",field:"showStops"},{type:"switch",field:"vertical"},{type:"input",field:"height"}])},co="timePicker",uo={menu:"main",icon:"icon-time",label:"时间",name:co,input:!0,event:["change","blur","focus","visibleChange"],rule:({t:e})=>({type:co,field:Wi(),title:e("com.timePicker.name"),info:"",$required:!1,props:{}}),watch:{isRange({rule:e}){e.key=Wi()}},props:(e,{t:t})=>Ri(t,co+".props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"switch",field:"isRange"},{type:"switch",field:"clearable",value:!0},{type:"switch",field:"editable",value:!0},{type:"input",field:"placeholder"},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"switch",field:"arrowControl"},{type:"select",field:"align",options:Ti(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])},fo={menu:"main",icon:"icon-time-range",label:"时间区间",name:"timeRange",input:!0,event:["change","blur","focus","visibleChange"],rule:({t:e})=>({type:"timePicker",field:Wi(),title:e("com.timeRange.name"),info:"",$required:!1,props:{isRange:!0}}),props:(e,{t:t})=>Ri(t,"timePicker.props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable",value:!0},{type:"switch",field:"editable",value:!0},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"switch",field:"arrowControl"},{type:"select",field:"align",options:Ti(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])},po="datePicker",ho={menu:"main",icon:"icon-date",label:"日期",name:po,input:!0,event:["change","blur","focus","calendarChange","panelChange","visibleChange"],rule:({t:e})=>({type:po,field:Wi(),title:e("com.datePicker.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ri(t,po+".props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"select",field:"type",options:Ti(t,[{label:"year",value:"year"},{label:"month",value:"month"},{label:"date",value:"date"},{label:"dates",value:"dates"},{label:"week",value:"week"},{label:"datetime",value:"datetime"},{label:"datetimerange",value:"datetimerange"},{label:"daterange",value:"daterange"},{label:"monthrange",value:"monthrange"}])},{type:"switch",field:"clearable",value:!0},{type:"switch",field:"editable",value:!0},{type:"input",field:"placeholder"},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"input",field:"format"},{type:"select",field:"align",options:Ti(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"input",field:"rangeSeparator"},{type:"switch",field:"unlinkPanels"}])},mo={menu:"main",icon:"icon-date-range",label:"日期区间",name:"dateRange",input:!0,event:["change","blur","focus","calendarChange","panelChange","visibleChange"],rule:({t:e})=>({type:"datePicker",field:Wi(),title:e("com.dateRange.name"),info:"",$required:!1,props:{type:"datetimerange"}}),props:(e,{t:t})=>Ri(t,"datePicker.props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"select",field:"type",options:Ti(t,[{label:"datetimerange",value:"datetimerange"},{label:"daterange",value:"daterange"},{label:"monthrange",value:"monthrange"}])},{type:"switch",field:"clearable",value:!0},{type:"switch",field:"editable",value:!0},{type:"input",field:"startPlaceholder"},{type:"input",field:"endPlaceholder"},{type:"input",field:"format"},{type:"select",field:"align",options:Ti(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"input",field:"rangeSeparator"},{type:"switch",field:"unlinkPanels"}])},go="rate",vo={menu:"main",icon:"icon-rate",label:"评分",name:go,input:!0,event:["change"],validate:["number"],rule:({t:e})=>({type:go,field:Wi(),title:e("com.rate.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ri(t,go+".props",[{type:"inputNumber",field:"max",props:{min:0}},{type:"switch",field:"disabled"},{type:"switch",field:"allowHalf"},{type:"ColorInput",field:"voidColor"},{type:"ColorInput",field:"disabledVoidColor"},{type:"input",field:"voidIconClass"},{type:"input",field:"disabledVoidIconClass"},{type:"switch",field:"showScore"},{type:"ColorInput",field:"textColor"},{type:"input",field:"scoreTemplate"}])},_o="colorPicker",bo={menu:"main",icon:"icon-color",label:"颜色选择器",name:_o,input:!0,event:["change","activeChange","focus","blur"],validate:["string"],rule:({t:e})=>({type:_o,field:Wi(),title:e("com.colorPicker.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ri(t,_o+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"showAlpha"},{type:"select",field:"colorFormat",options:[{label:"hsl",value:"hsl"},{label:"hsv",value:"hsv"},{label:"hex",value:"hex"},{label:"rgb",value:"rgb"}]},{type:"tableOptions",field:"predefine",props:{column:[{label:t("props.value"),key:"value"}],valueType:"string"}}])},yo="fcRow",xo={menu:"layout",icon:"icon-row",label:"栅格布局",name:yo,mask:!1,children:"col",childrenLen:2,rule:()=>({type:yo,props:{},children:[]}),props:(e,{t:t})=>Ri(t,yo+".props",[{type:"inputNumber",field:"gutter",props:{min:0}},{type:"switch",field:"type",props:{activeValue:"flex",inactiveValue:"default"}},{type:"select",field:"justify",options:[{label:"start",value:"start"},{label:"end",value:"end"},{label:"center",value:"center"},{label:"space-around",value:"space-around"},{label:"space-between",value:"space-between"}]},{type:"select",field:"align",options:[{label:"top",value:"top"},{label:"middle",value:"middle"},{label:"bottom",value:"bottom"}]}])},wo="col",Ao={xs:"<768px",sm:"≥768px",md:"≥992px",lg:"≥1200px",xl:"≥1920px"},ko={name:wo,label:"格子",drag:!0,dragBtn:!1,inside:!0,mask:!1,rule:()=>({type:wo,props:{span:12},children:[]}),props:(e,{t:t})=>Ri(t,wo+".props",[{type:"slider",field:"span",value:12,props:{min:0,max:24}},{type:"slider",field:"offset",props:{min:0,max:24}},{type:"slider",field:"push",props:{min:0,max:24}},{type:"slider",field:"pull",props:{min:0,max:24}},{type:"ConfigItem",props:{label:t("props.reactive")},children:[{type:"elTabs",style:{width:"100%"},slot:"append",children:Object.keys(Ao).map(e=>({type:"elTabPane",props:{label:Ao[e]},style:"padding:0 10px;",children:[{type:"slider",field:e+">span",title:t("com.col.props.span"),value:12,props:{min:0,max:24}},{type:"slider",field:e+">offset",title:t("com.col.props.offset"),props:{min:0,max:24}},{type:"slider",field:e+">push",title:t("com.col.props.push"),props:{min:0,max:24}},{type:"slider",field:e+">pull",title:t("com.col.props.pull"),props:{min:0,max:24}}]}))}]}])},Co="elTabPane",So={label:"选项卡",name:Co,inside:!0,drag:!0,dragBtn:!1,mask:!1,rule:({t:e})=>({type:Co,props:{label:e("com.elTabPane.name")},children:[]}),props:(e,{t:t})=>Ri(t,Co+".props",[{type:"input",field:"label"},{type:"switch",field:"disabled"},{type:"input",field:"name"},{type:"switch",field:"lazy"}])},Eo="elDivider",To={menu:"aide",icon:"icon-divider",label:"分割线",name:Eo,rule:({t:e})=>({type:Eo,props:{},children:[e("com.elDivider.name")]}),props:(e,{t:t})=>Ri(t,Eo+".props",[{type:"input",field:"formCreateChild"},{type:"select",field:"contentPosition",options:Ti(t,[{label:"left",value:"left"},{label:"right",value:"right"},{label:"center",value:"center"}])}])},Ro="cascader",Oo={menu:"main",icon:"icon-cascader",label:"级联选择器",name:Ro,input:!0,event:["change","expandChange","blur","focus","visibleChange","removeTag"],validate:["string","number","array"],rule:({t:e})=>({type:Ro,field:Wi(),title:e("com.cascader.name"),info:"",effect:{fetch:""},$required:!1,props:{options:_i(e("props.option"),{label:"label",value:"value"},3)}}),props:(e,{t:t})=>Ri(t,Ro+".props",[yi(t,"props.options"),{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"input",field:"placeholder"},{type:"Object",field:"props",props:{rule:Ri(t,Ro+".propsOpt",[{type:"switch",field:"multiple"},{type:"select",field:"expandTrigger",options:Ti(t,[{label:"click",value:"click"},{label:"hover",value:"hover"}])},{type:"switch",field:"checkStrictly"},{type:"switch",field:"emitPath",value:!0},{type:"input",field:"value",value:"value"},{type:"input",field:"label",value:"label"},{type:"input",field:"children",value:"children"},{type:"input",field:"disabled",value:"disabled"},{type:"input",field:"leaf"}])}},{type:"switch",field:"showAllLevels",value:!0},{type:"switch",field:"collapseTags"},{type:"switch",field:"collapseTagsTooltip"},{type:"input",field:"separator"},{type:"switch",field:"filterable"},{type:"select",field:"tagType",options:[{label:"success",value:"success"},{label:"info",value:"info"},{label:"warning",value:"warning"},{label:"danger",value:"danger"}]}])},Mo="upload",Do={menu:"main",icon:"icon-upload",label:"上传",name:Mo,input:!0,event:["change","remove","preview","error","progress","exceed"],languageKey:["clickToUpload"],validate:["array"],rule:({t:e})=>({type:Mo,field:Wi(),title:e("com.upload.name"),info:"",$required:!1,props:{action:"/",onSuccess:"$FNX:const res = $inject.args[0];\nconst file = $inject.args[1];\n\nfile.url = res.data.url;"}}),props:(e,{t:t})=>Ri(t,Mo+".props",[{type:"switch",field:"disabled"},{type:"select",field:"listType",options:Ti(t,[{label:"text",value:"text"},{label:"picture",value:"picture"},{label:"picture-card",value:"picture-card"}])},{type:"switch",field:"multiple"},{type:"input",field:"action"},{type:"input",field:"accept"},{type:"FnInput",field:"beforeUpload",props:{body:!0,button:!0,fnx:!0,args:[Ni(t)],name:"beforeUpload"}},{type:"FnInput",field:"beforeRemove",props:{body:!0,button:!0,fnx:!0,args:[Ni(t)],name:"beforeRemove"}},{type:"FnInput",field:"onSuccess",warning:t("com.upload.info"),props:{body:!0,button:!0,fnx:!0,args:[Ni(t)],name:"onSuccess"}},{type:"TableOptions",field:"headers",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"TableOptions",field:"data",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"switch",field:"withCredentials"},{type:"switch",field:"autoUpload",value:!0},{type:"inputNumber",field:"limit",props:{min:0}}])},No="elTransfer",Io={menu:"main",icon:"icon-transfer",label:"穿梭框",name:No,input:!0,event:["change","leftCheckChange","rightCheckChange"],validate:["string","number","array"],rule:({t:e})=>({type:No,field:Wi(),title:e("com.elTransfer.name"),info:"",$required:!1,props:{data:_i(e("props.option"),{label:"label",value:"key"},1)}}),props:(e,{t:t})=>Ri(t,No+".props",[yi(t,"props.data","label","key"),{type:"switch",field:"filterable"},{type:"input",field:"filterPlaceholder"},{type:"select",field:"targetOrder",warning:t("com.elTransfer.props.targetOrderInfo"),options:[{label:"original",value:"original"},{label:"push",value:"push"},{label:"unshift",value:"unshift"}]},{type:"TableOptions",field:"titles",props:{column:[{label:t("props.value"),key:"value"}],valueType:"string",max:2}},{type:"TableOptions",field:"buttonTexts",props:{column:[{label:t("props.value"),key:"value"}],valueType:"string",max:2}}])},Lo="tree",Fo={menu:"main",icon:"icon-tree",label:"树形控件",name:Lo,input:!0,event:["nodeClick","nodeContextmenu","checkChange","check","currentChange","nodeExpand","nodeCollapse","nodeDragStart","nodeDragEnter","nodeDragLeave","nodeDragOver","nodeDragEnd","nodeDrop"],validate:["string","number","array"],rule:({t:e})=>({type:Lo,field:Wi(),title:e("com.tree.name"),info:"",effect:{fetch:""},$required:!1,props:{props:{label:"label"},showCheckbox:!0,nodeKey:"id",data:_i(e("props.option"),{label:"label",value:"id"},3)}}),props:(e,{t:t})=>Ri(t,Lo+".props",[yi(t,"props.data","label","id"),{type:"input",field:"emptyText"},{type:"TableOptions",field:"props",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"switch",field:"renderAfterExpand",value:!0},{type:"switch",field:"defaultExpandAll"},{type:"switch",field:"expandOnClickNode",value:!0},{type:"switch",field:"checkOnClickNode"},{type:"switch",field:"autoExpandParent",value:!0},{type:"switch",field:"checkStrictly"},{type:"switch",field:"accordion"},{type:"inputNumber",field:"indent"},{type:"input",field:"nodeKey"}])},Po="elAlert",Bo={menu:"aide",icon:"icon-alert",label:"提示",name:Po,event:["close"],rule:({t:e})=>({type:Po,props:{title:e("com.elAlert.name"),description:e("com.elAlert.description"),type:"success",effect:"dark"},children:[]}),props:(e,{t:t})=>Ri(t,Po+".props",[{type:"input",field:"title"},{type:"select",field:"type",options:[{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"info",value:"info"},{label:"error",value:"error"}]},{type:"input",field:"description"},{type:"switch",field:"closable",value:!0},{type:"switch",field:"center",value:!0},{type:"input",field:"closeText"},{type:"switch",field:"showIcon"},{type:"select",field:"effect",options:[{label:"light",value:"light"},{label:"dark",value:"dark"}]}])},jo="text",Vo={menu:"aide",icon:"icon-span",label:"文字",name:jo,rule:({t:e})=>({type:"div",title:"",native:!0,style:{whiteSpace:"pre-line",width:"100%"},children:[e("com.text.name")]}),watch:{formCreateNative({value:e,rule:t}){e&&(t.title="")}},props:(e,{t:t})=>Ri(t,jo+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"input",field:"formCreateChild",props:{type:"textarea"}}])},zo="space",Ho={menu:"layout",icon:"icon-space",label:"间距",name:zo,rule:()=>({type:"div",wrap:{show:!1},native:!0,style:{width:"100%",height:"20px"},children:[]}),props:(e,{t:t})=>[{type:"object",field:"formCreateStyle",native:!0,props:{rule:Ri(t,zo+".props",[{type:"input",field:"height",title:"height"}])}}]},Uo="elTabs",Wo={menu:"layout",icon:"icon-tab",label:"标签页",name:Uo,mask:!1,event:["tabClick","tabChange","tabRemove","tabAdd","edit"],children:"elTabPane",rule:()=>({type:Uo,style:{width:"100%"},children:[]}),props:(e,{t:t})=>Ri(t,Uo+".props",[{type:"select",field:"type",options:[{label:"card",value:"card"},{label:"border-card",value:"border-card"}]},{type:"switch",field:"closable"},{type:"select",field:"tabPosition",options:Ti(t,[{label:"top",value:"top"},{label:"right",value:"right"},{label:"left",value:"left"}])},{type:"switch",field:"stretch"}])},Yo="elButton",Go={menu:"aide",icon:"icon-button",label:"按钮",name:Yo,mask:!0,event:["click"],rule:({t:e})=>({type:Yo,props:{},children:[e("com.elButton.name")]}),props:(e,{t:t})=>Ri(t,Yo+".props",[{type:"input",field:"formCreateChild"},{type:"select",field:"size",options:Ti(t,[{label:"large",value:"large"},{label:"default",value:"default"},{label:"small",value:"small"}])},{type:"select",field:"type",options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}]},{type:"switch",field:"plain"},{type:"switch",field:"round"},{type:"switch",field:"circle"},{type:"switch",field:"loading"},{type:"switch",field:"disabled"}])},$o="fcEditor",qo={menu:"main",icon:"icon-editor",label:"富文本框",name:$o,input:!0,event:["change"],validate:["string"],rule:({t:e})=>({type:$o,field:Wi(),title:e("com.fcEditor.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ri(t,$o+".props",[{type:"switch",field:"disabled"}])},Qo="group",Ko={menu:"subform",icon:"icon-subform",label:"子表单",name:Qo,input:!0,inside:!1,drag:!0,dragBtn:!0,mask:!1,event:["change"],subForm:"array",loadRule(e){e.children=e.props.rule||[],e.type="FcRow",delete e.props.rule},parseRule(e){e.props.rule=e.children,e.type="group",delete e.children,delete e.props.mode},rule:({t:e})=>({type:"fcRow",field:Wi(),title:e("com.group.name"),info:"",$required:!1,props:{title:"第{index}页"},children:[]}),props:(e,{t:t})=>Ri(t,Qo+".props",[{type:"select",field:"type",options:[{label:t("props.default"),value:"default"},{label:t("props.card"),value:"card"}],control:[{value:"card",rule:["title"]}]},{type:"input",field:"title"},{type:"switch",field:"disabled"},{type:"switch",field:"button",value:!0},{type:"switch",field:"sortBtn",value:!0},{type:"inputNumber",field:"expand"},{type:"inputNumber",field:"min"},{type:"inputNumber",field:"max"},{type:"FnInput",field:"onBeforeRemove",warning:t("com.group.info"),props:{body:!0,button:!0,fnx:!0,args:[Ni(t)],name:"onBeforeRemove"}}])},Xo="subForm",Jo={menu:"subform",icon:"icon-group",label:"分组",name:Xo,inside:!1,drag:!0,dragBtn:!0,mask:!1,input:!0,subForm:"object",event:["change"],loadRule(e){e.children=e.props.rule||[],e.type="FcRow",delete e.props.rule},parseRule(e){e.props.rule=e.children,e.type="subForm",delete e.children},rule:({t:e})=>({type:"fcRow",field:Wi(),title:e("com.subForm.name"),info:"",$required:!1,props:{},children:[]}),props:(e,{t:t})=>Ri(t,Xo+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"syncDisabled",value:!0}])},Zo="elCard",er={menu:"layout",icon:"icon-card",label:"卡片",name:Zo,drag:!0,inside:!1,mask:!1,rule:({t:e})=>({type:Zo,props:{header:e("com.elCard.props.header")},style:{width:"100%"},children:[]}),props:(e,{t:t})=>Ri(t,Zo+".props",[{type:"input",field:"header"},{type:"select",field:"shadow",value:"always",options:Ti(t,[{label:"always",value:"always"},{label:"never",value:"never"},{label:"hover",value:"hover"}])}])},tr="elCollapse",nr={menu:"layout",icon:"icon-collapse",label:"折叠面板",name:tr,mask:!1,children:"elCollapseItem",event:["change"],rule:()=>({type:tr,props:{},style:{width:"100%"},children:[]}),props:(e,{t:t})=>Ri(t,tr+".props",[{type:"switch",field:"accordion"}])},ir="elCollapseItem",or={icon:"icon-cell",label:"面板",name:ir,drag:!0,dragBtn:!1,inside:!0,mask:!1,rule:({t:e})=>({type:ir,props:{title:e("com.elCollapseItem.name")},style:{},children:[]}),props:(e,{t:t})=>Ri(t,ir+".props",[{type:"input",field:"title"},{type:"input",field:"name"},{type:"switch",field:"disabled"}])},rr="elTreeSelect",ar={menu:"main",icon:"icon-tree-select",label:"树形选择",name:rr,input:!0,event:["change","visibleChange","removeTag","clear","blur","focus"],validate:["string","number","array"],rule:({t:e})=>({type:rr,field:Wi(),title:e("com.elTreeSelect.name"),info:"",effect:{fetch:""},$required:!1,props:{nodeKey:"value",showCheckbox:!0,data:_i(e("props.option"),{label:"label",value:"value"},3)}}),watch:{multiple({rule:e}){e.key=Wi()}},props:(e,{t:t})=>Ri(t,rr+".props",[yi(t,"props.data","label","value"),{type:"switch",field:"multiple"},{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"switch",field:"collapseTags"},{type:"inputNumber",field:"multipleLimit",props:{min:0}},{type:"input",field:"placeholder"},{type:"TableOptions",field:"props",props:{column:[{label:t("props.key"),key:"label"},{label:t("props.value"),key:"value"}],valueType:"object"}},{type:"switch",field:"renderAfterExpand",value:!0},{type:"switch",field:"defaultExpandAll"},{type:"switch",field:"expandOnClickNode",value:!0},{type:"switch",field:"checkOnClickNode"},{type:"input",field:"nodeKey"}])},lr="elTag",sr={menu:"aide",icon:"icon-tag",label:"标签",name:lr,mask:!0,event:["click","close"],rule:({t:e})=>({type:lr,title:"",native:!0,children:[e("com.elTag.name")]}),watch:{formCreateNative({value:e,rule:t}){e&&(t.title="")}},props:(e,{t:t})=>Ri(t,lr+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"input",field:"formCreateChild"},{type:"select",field:"type",options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}]},{type:"select",field:"size",options:Ti(t,[{label:"large",value:"large"},{label:"default",value:"default"},{label:"small",value:"small"}])},{type:"select",field:"effect",options:[{label:"dark",value:"dark"},{label:"light",value:"light"},{label:"plain",value:"plain"}]},{type:"switch",field:"closable"},{type:"switch",field:"disableTransitions"},{type:"switch",field:"hit"},{type:"switch",field:"round"},{type:"ColorInput",field:"color"}])},cr="html",ur={menu:"aide",icon:"icon-html",label:"HTML",name:cr,rule:()=>({type:cr,title:"",native:!0,attrs:{innerHTML:""},style:{display:"block",width:"100%"},children:['<div style="color:blue;">\n html html html html html html html html html\n </div>']}),watch:{formCreateNative({value:e,rule:t}){e&&(t.title="")}},props:(e,{t:t})=>Ri(t,cr+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"HtmlEditor",field:"formCreateChild"}])},dr="fcTable",fr={menu:"layout",icon:"icon-table",label:"表格布局",name:dr,inside:!1,mask:!1,rule:()=>({type:dr,props:{rule:{row:3,col:4,style:{},class:{},layout:[]}},children:[]}),props:(e,{t:t})=>Ri(t,dr+".props",[{type:"switch",field:"border",value:!0},{type:"ColorInput",field:"borderColor"},{type:"input",field:"borderWidth"}])},pr="tableForm",hr={menu:"subform",icon:"icon-table-form",label:"表格表单",name:pr,mask:!1,input:!0,subForm:"array",languageKey:["add","operation","dataEmpty"],event:["change","add","delete"],children:"tableFormColumn",loadRule(e){e.props||(e.props={});const t=e.props.columns||[];e.children=t.map(e=>({type:"tableFormColumn",_fc_drag_tag:"tableFormColumn",props:{label:e.label,align:e.align,required:e.required||!1,width:e.style.width||"",color:e.style.color||""},children:e.rule||[]})),delete e.props.columns},parseRule(e){const t=e.children||[];e.props.columns=t.map(e=>({label:e.props.label,required:e.props.required,align:e.props.align,style:{width:e.props.width,color:e.props.color},rule:e.children||[]})),e.children=[]},rule:({t:e})=>({type:pr,field:Wi(),title:e("com.tableForm.name"),info:"",props:{},children:[]}),props:(e,{t:t})=>Ri(t,pr+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"addable",value:!0},{type:"switch",field:"deletable",value:!0},{type:"switch",field:"filterEmptyColumn",value:!0},{type:"inputNumber",field:"min",props:{min:0}},{type:"inputNumber",field:"max",props:{min:0}}])},mr="tableFormColumn",gr="elImage",vr="signaturePad",_r="fcTitle",br={menu:"aide",icon:"icon-title",label:"标题",name:_r,event:[],rule:({t:e})=>({type:"fcTitle",props:{title:e("props.title")}}),props:(e,{t:t})=>Ri(t,_r+".props",[{type:"input",field:"title"},{type:"select",field:"size",value:"H2",options:[1,2,3,4,5,6].map(e=>({label:"H"+e,value:"h"+e}))},{type:"select",field:"align",options:Ti(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])},yr=[Ki,Ji,eo,no,Gi,qi,oo,ao,vo,uo,fo,so,ho,mo,bo,Oo,Do,Io,Fo,ar,qo,{menu:"main",icon:"icon-sign",label:"手写签名",name:vr,input:!0,mask:!0,languageKey:["signaturePadTip","signaturePadTitle","reset","ok"],event:["change","remove"],rule:({t:e})=>({type:vr,field:Wi(),title:e("com.signaturePad.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ri(t,vr+".props",[{type:"ColorInput",field:"penColor"},{type:"switch",field:"disabled"},{type:"FnInput",field:"beforeRemove",warning:t("com.signaturePad.info"),props:{body:!0,button:!0,fnx:!0,args:[Ni(t)],name:"beforeRemove"}}])},Ko,Jo,hr,{icon:"icon-cell",name:mr,aide:!0,drag:!0,dragBtn:!1,mask:!1,style:!1,rule:({t:e})=>({type:mr,props:{label:e("com.tableFormColumn.label"),width:"auto"},children:[]}),props:(e,{t:t})=>Ri(t,mr+".props",[{type:"input",field:"label"},{type:"select",field:"align",options:Ti(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"switch",field:"required"},{type:"input",field:"width"},{type:"ColorInput",field:"color"}])},Bo,Go,Vo,br,ur,To,sr,{menu:"aide",icon:"icon-image",label:"图片",name:gr,rule:()=>({type:gr,title:"",style:{width:"100px",height:"100px"},props:{src:"https://static.form-create.com/example.png"}}),props:(e,{t:t})=>Ri(t,gr+".props",[{type:"input",field:"src"}])},xo,fr,Wo,Ho,er,nr,ko,So,or];
/**!
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(n),!0).forEach(function(t){kr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ar(e){return(Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cr(){return Cr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Cr.apply(this,arguments)}function Sr(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(o[n]=e[n]))}return o}function Er(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Tr=Er(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Rr=Er(/Edge/i),Or=Er(/firefox/i),Mr=Er(/safari/i)&&!Er(/chrome/i)&&!Er(/android/i),Dr=Er(/iP(ad|od|hone)/i),Nr=Er(/chrome/i)&&Er(/android/i),Ir={capture:!1,passive:!1};function Lr(e,t,n){e.addEventListener(t,n,!Tr&&Ir)}function Fr(e,t,n){e.removeEventListener(t,n,!Tr&&Ir)}function Pr(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(n){return!1}return!1}}function Br(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function jr(e,t,n,i){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&Pr(e,t):Pr(e,t))||i&&e===n)return e;if(e===n)break}while(e=Br(e))}return null}var Vr,zr=/\s+/g;function Hr(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(zr," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(zr," ")}}function Ur(e,t,n){var i=e&&e.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];!(t in i)&&-1===t.indexOf("webkit")&&(t="-webkit-"+t),i[t]=n+("string"==typeof n?"":"px")}}function Wr(e,t){var n="";if("string"==typeof e)n=e;else do{var i=Ur(e,"transform");i&&"none"!==i&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Yr(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o<r;o++)n(i[o],o);return i}return[]}function Gr(){return document.scrollingElement||document.documentElement}function $r(e,t,n,i,o){if(e.getBoundingClientRect||e===window){var r,a,l,s,c,u,d;if(e!==window&&e.parentNode&&e!==Gr()?(a=(r=e.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,u=r.height,d=r.width):(a=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!Tr))do{if(o&&o.getBoundingClientRect&&("none"!==Ur(o,"transform")||n&&"static"!==Ur(o,"position"))){var f=o.getBoundingClientRect();a-=f.top+parseInt(Ur(o,"border-top-width")),l-=f.left+parseInt(Ur(o,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(o=o.parentNode);if(i&&e!==window){var p=Wr(o||e),h=p&&p.a,m=p&&p.d;p&&(s=(a/=m)+(u/=m),c=(l/=h)+(d/=h))}return{top:a,left:l,bottom:s,right:c,width:d,height:u}}}function qr(e,t,n){for(var i=Zr(e,!0),o=$r(e)[t];i;){if(!(o>=$r(i)[n]))return i;if(i===Gr())break;i=Zr(i,!1)}return!1}function Qr(e,t,n,i){for(var o=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==nl.ghost&&(i||a[r]!==nl.dragged)&&jr(a[r],n.draggable,e,!1)){if(o===t)return a[r];o++}r++}return null}function Kr(e,t){for(var n=e.lastElementChild;n&&(n===nl.ghost||"none"===Ur(n,"display")||t&&!Pr(n,t));)n=n.previousElementSibling;return n||null}function Xr(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"!==e.nodeName.toUpperCase()&&e!==nl.clone&&(!t||Pr(e,t))&&n++;return n}function Jr(e){var t=0,n=0,i=Gr();if(e)do{var o=Wr(e),r=o.a,a=o.d;t+=e.scrollLeft*r,n+=e.scrollTop*a}while(e!==i&&(e=e.parentNode));return[t,n]}function Zr(e,t){if(!e||!e.getBoundingClientRect)return Gr();var n=e,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Ur(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return Gr();if(i||t)return n;i=!0}}}while(n=n.parentNode);return Gr()}function ea(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.round(t.width)}function ta(e,t){return function(){if(!Vr){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),Vr=setTimeout(function(){Vr=void 0},t)}}}function na(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function ia(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var oa="Sortable"+(new Date).getTime();function ra(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach(function(e){if("none"!==Ur(e,"display")&&e!==nl.ghost){t.push({target:e,rect:$r(e)});var n=wr({},t[t.length-1].rect);if(e.thisAnimationDuration){var i=Wr(e,!0);i&&(n.top-=i.f,n.left-=i.e)}e.fromRect=n}})},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n);return-1}(t,{target:e}),1)},animateAll:function(n){var i=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var o=!1,r=0;t.forEach(function(e){var t=0,n=e.target,a=n.fromRect,l=$r(n),s=n.prevFromRect,c=n.prevToRect,u=e.rect,d=Wr(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&ea(s,l)&&!ea(a,l)&&(u.top-l.top)/(u.left-l.left)===(a.top-l.top)/(a.left-l.left)&&(t=function(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}(u,s,c,i.options)),ea(l,a)||(n.prevFromRect=a,n.prevToRect=l,t||(t=i.options.animation),i.animate(n,u,l,t)),t&&(o=!0,r=Math.max(r,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},t),n.thisAnimationDuration=t)}),clearTimeout(e),o?e=setTimeout(function(){"function"==typeof n&&n()},r):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,i){if(i){Ur(e,"transition",""),Ur(e,"transform","");var o=Wr(this.el),r=o&&o.a,a=o&&o.d,l=(t.left-n.left)/(r||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,Ur(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),Ur(e,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),Ur(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){Ur(e,"transition",""),Ur(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},i)}}}}var aa=[],la={initializeByDefault:!0},sa={mount:function(e){for(var t in la)la.hasOwnProperty(t)&&!(t in e)&&(e[t]=la[t]);aa.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),aa.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=e+"Global";aa.forEach(function(i){!t[i.pluginName]||(t[i.pluginName][o]&&t[i.pluginName][o](wr({sortable:t},n)),t.options[i.pluginName]&&t[i.pluginName][e]&&t[i.pluginName][e](wr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){for(var o in aa.forEach(function(i){var o=i.pluginName;if(e.options[o]||i.initializeByDefault){var r=new i(e,t,e.options);r.sortable=e,r.options=e.options,e[o]=r,Cr(n,r.defaults)}}),e.options)if(e.options.hasOwnProperty(o)){var r=this.modifyOption(e,o,e.options[o]);typeof r<"u"&&(e.options[o]=r)}},getEventProperties:function(e,t){var n={};return aa.forEach(function(i){"function"==typeof i.eventProperties&&Cr(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return aa.forEach(function(o){!e[o.pluginName]||o.optionListeners&&"function"==typeof o.optionListeners[t]&&(i=o.optionListeners[t].call(e[o.pluginName],n))}),i}};var ca=["evt"],ua=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.evt,o=Sr(n,ca);sa.pluginEvent.bind(nl)(e,t,wr({dragEl:fa,parentEl:pa,ghostEl:ha,rootEl:ma,nextEl:ga,lastDownEl:va,cloneEl:_a,cloneHidden:ba,dragStarted:Da,putSortable:Ca,activeSortable:nl.active,originalEvent:i,oldIndex:ya,oldDraggableIndex:wa,newIndex:xa,newDraggableIndex:Aa,hideGhostForTarget:Ja,unhideGhostForTarget:Za,cloneNowHidden:function(){ba=!0},cloneNowShown:function(){ba=!1},dispatchSortableEvent:function(e){da({sortable:t,name:e,originalEvent:i})}},o))};function da(e){!function(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,r=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,f=e.originalEvent,p=e.putSortable,h=e.extraEventProperties;if(t=t||n&&n[oa]){var m,g=t.options,v="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||Tr||Rr?(m=document.createEvent("Event")).initEvent(i,!0,!0):m=new CustomEvent(i,{bubbles:!0,cancelable:!0}),m.to=a||n,m.from=l||n,m.item=o||n,m.clone=r,m.oldIndex=s,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=d,m.originalEvent=f,m.pullMode=p?p.lastPutMode:void 0;var _=wr(wr({},h),sa.getEventProperties(i,t));for(var b in _)m[b]=_[b];n&&n.dispatchEvent(m),g[v]&&g[v].call(t,m)}}(wr({putSortable:Ca,cloneEl:_a,targetEl:fa,rootEl:ma,oldIndex:ya,oldDraggableIndex:wa,newIndex:xa,newDraggableIndex:Aa},e))}var fa,pa,ha,ma,ga,va,_a,ba,ya,xa,wa,Aa,ka,Ca,Sa,Ea,Ta,Ra,Oa,Ma,Da,Na,Ia,La,Fa,Pa=!1,Ba=!1,ja=[],Va=!1,za=!1,Ha=[],Ua=!1,Wa=[],Ya=typeof document<"u",Ga=Dr,$a=Rr||Tr?"cssFloat":"float",qa=Ya&&!Nr&&!Dr&&"draggable"in document.createElement("div"),Qa=function(){if(Ya){if(Tr)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ka=function(e,t){var n=Ur(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Qr(e,0,t),r=Qr(e,1,t),a=o&&Ur(o),l=r&&Ur(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+$r(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+$r(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=i&&"none"===n[$a]||r&&"none"===n[$a]&&s+c>i)?"vertical":"horizontal"},Xa=function(e){function t(e,n){return function(i,o,r,a){var l=i.options.group.name&&o.options.group.name&&i.options.group.name===o.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(i,o,r,a),n)(i,o,r,a);var s=(n?i:o).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},i=e.group;(!i||"object"!=Ar(i))&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},Ja=function(){!Qa&&ha&&Ur(ha,"display","none")},Za=function(){!Qa&&ha&&Ur(ha,"display","")};Ya&&document.addEventListener("click",function(e){if(Ba)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Ba=!1,!1},!0);var el=function(e){if(fa){var t=function(e,t){var n;return ja.some(function(i){var o=i[oa].options.emptyInsertThreshold;if(o&&!Kr(i)){var r=$r(i),a=e>=r.left-o&&e<=r.right+o,l=t>=r.top-o&&t<=r.bottom+o;if(a&&l)return n=i}}),n}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[oa]._onDragOver(n)}}},tl=function(e){fa&&fa.parentNode[oa]._isOutsideThisEl(e.target)};function nl(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Cr({},t),e[oa]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ka(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==nl.supportPointer&&"PointerEvent"in window&&!Mr,emptyInsertThreshold:5};for(var i in sa.initializePlugins(this,e,n),n)!(i in t)&&(t[i]=n[i]);for(var o in Xa(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&qa,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Lr(e,"pointerdown",this._onTapStart):(Lr(e,"mousedown",this._onTapStart),Lr(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Lr(e,"dragover",this),Lr(e,"dragenter",this)),ja.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Cr(this,ra())}function il(e,t,n,i,o,r,a,l){var s,c,u=e[oa],d=u.options.onMove;return!window.CustomEvent||Tr||Rr?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=i,s.related=o||t,s.relatedRect=r||$r(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function ol(e){e.draggable=!1}function rl(){Ua=!1}function al(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function ll(e){return setTimeout(e,0)}function sl(e){return clearTimeout(e)}nl.prototype={constructor:nl,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Na=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,fa):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,o=i.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=i.filter;if(function(e){Wa.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&Wa.push(i)}}(n),!fa&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||i.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!Mr||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=jr(l,i.draggable,n,!1))&&l.animated||va===l)){if(ya=Xr(l),wa=Xr(l,i.draggable),"function"==typeof c){if(c.call(this,e,l,this))return da({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),ua("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(i){if(i=jr(s,i.trim(),n,!1))return da({sortable:t,rootEl:i,name:"filter",targetEl:l,fromEl:n,toEl:n}),ua("filter",t,{evt:e}),!0})))return void(o&&e.cancelable&&e.preventDefault());i.handle&&!jr(s,i.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var i,o=this,r=o.el,a=o.options,l=r.ownerDocument;if(n&&!fa&&n.parentNode===r){var s=$r(n);if(ma=r,pa=(fa=n).parentNode,ga=fa.nextSibling,va=n,ka=a.group,nl.dragged=fa,Sa={target:fa,clientX:(t||e).clientX,clientY:(t||e).clientY},Oa=Sa.clientX-s.left,Ma=Sa.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,fa.style["will-change"]="all",i=function(){ua("delayEnded",o,{evt:e}),nl.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!Or&&o.nativeDraggable&&(fa.draggable=!0),o._triggerDragStart(e,t),da({sortable:o,name:"choose",originalEvent:e}),Hr(fa,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){Yr(fa,e.trim(),ol)}),Lr(l,"dragover",el),Lr(l,"mousemove",el),Lr(l,"touchmove",el),Lr(l,"mouseup",o._onDrop),Lr(l,"touchend",o._onDrop),Lr(l,"touchcancel",o._onDrop),Or&&this.nativeDraggable&&(this.options.touchStartThreshold=4,fa.draggable=!0),ua("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(Rr||Tr))i();else{if(nl.eventCanceled)return void this._onDrop();Lr(l,"mouseup",o._disableDelayedDrag),Lr(l,"touchend",o._disableDelayedDrag),Lr(l,"touchcancel",o._disableDelayedDrag),Lr(l,"mousemove",o._delayedDragTouchMoveHandler),Lr(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&Lr(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(i,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){fa&&ol(fa),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Fr(e,"mouseup",this._disableDelayedDrag),Fr(e,"touchend",this._disableDelayedDrag),Fr(e,"touchcancel",this._disableDelayedDrag),Fr(e,"mousemove",this._delayedDragTouchMoveHandler),Fr(e,"touchmove",this._delayedDragTouchMoveHandler),Fr(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?Lr(document,"pointermove",this._onTouchMove):Lr(document,t?"touchmove":"mousemove",this._onTouchMove):(Lr(fa,"dragend",this),Lr(ma,"dragstart",this._onDragStart));try{document.selection?ll(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(Pa=!1,ma&&fa){ua("dragStarted",this,{evt:t}),this.nativeDraggable&&Lr(document,"dragover",tl);var n=this.options;!e&&Hr(fa,n.dragClass,!1),Hr(fa,n.ghostClass,!0),nl.active=this,e&&this._appendGhost(),da({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Ea){this._lastX=Ea.clientX,this._lastY=Ea.clientY,Ja();for(var e=document.elementFromPoint(Ea.clientX,Ea.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Ea.clientX,Ea.clientY))!==t;)t=e;if(fa.parentNode[oa]._isOutsideThisEl(e),t)do{if(t[oa]){if(t[oa]._onDragOver({clientX:Ea.clientX,clientY:Ea.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Za()}},_onTouchMove:function(e){if(Sa){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,o=e.touches?e.touches[0]:e,r=ha&&Wr(ha,!0),a=ha&&r&&r.a,l=ha&&r&&r.d,s=Ga&&Fa&&Jr(Fa),c=(o.clientX-Sa.clientX+i.x)/(a||1)+(s?s[0]-Ha[0]:0)/(a||1),u=(o.clientY-Sa.clientY+i.y)/(l||1)+(s?s[1]-Ha[1]:0)/(l||1);if(!nl.active&&!Pa){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(ha){r?(r.e+=c-(Ta||0),r.f+=u-(Ra||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Ur(ha,"webkitTransform",d),Ur(ha,"mozTransform",d),Ur(ha,"msTransform",d),Ur(ha,"transform",d),Ta=c,Ra=u,Ea=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ha){var e=this.options.fallbackOnBody?document.body:ma,t=$r(fa,!0,Ga,!0,e),n=this.options;if(Ga){for(Fa=e;"static"===Ur(Fa,"position")&&"none"===Ur(Fa,"transform")&&Fa!==document;)Fa=Fa.parentNode;Fa!==document.body&&Fa!==document.documentElement?(Fa===document&&(Fa=Gr()),t.top+=Fa.scrollTop,t.left+=Fa.scrollLeft):Fa=Gr(),Ha=Jr(Fa)}Hr(ha=fa.cloneNode(!0),n.ghostClass,!1),Hr(ha,n.fallbackClass,!0),Hr(ha,n.dragClass,!0),Ur(ha,"transition",""),Ur(ha,"transform",""),Ur(ha,"box-sizing","border-box"),Ur(ha,"margin",0),Ur(ha,"top",t.top),Ur(ha,"left",t.left),Ur(ha,"width",t.width),Ur(ha,"height",t.height),Ur(ha,"opacity","0.8"),Ur(ha,"position",Ga?"absolute":"fixed"),Ur(ha,"zIndex","100000"),Ur(ha,"pointerEvents","none"),nl.ghost=ha,e.appendChild(ha),Ur(ha,"transform-origin",Oa/parseInt(ha.style.width)*100+"% "+Ma/parseInt(ha.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,o=n.options;ua("dragStart",this,{evt:e}),nl.eventCanceled?this._onDrop():(ua("setupClone",this),nl.eventCanceled||((_a=ia(fa)).draggable=!1,_a.style["will-change"]="",this._hideClone(),Hr(_a,this.options.chosenClass,!1),nl.clone=_a),n.cloneId=ll(function(){ua("clone",n),!nl.eventCanceled&&(n.options.removeCloneOnHide||ma.insertBefore(_a,fa),n._hideClone(),da({sortable:n,name:"clone"}))}),!t&&Hr(fa,o.dragClass,!0),t?(Ba=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Fr(document,"mouseup",n._onDrop),Fr(document,"touchend",n._onDrop),Fr(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,fa)),Lr(document,"drop",n),Ur(fa,"transform","translateZ(0)")),Pa=!0,n._dragStartId=ll(n._dragStarted.bind(n,t,e)),Lr(document,"selectstart",n),Da=!0,Mr&&Ur(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,i,o,r=this.el,a=e.target,l=this.options,s=l.group,c=nl.active,u=ka===s,d=l.sort,f=Ca||c,p=this,h=!1;if(!Ua){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=jr(a,l.draggable,r,!0),R("dragOver"),nl.eventCanceled)return h;if(fa.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return M(!1);if(Ba=!1,c&&!l.disabled&&(u?d||(i=pa!==ma):Ca===this||(this.lastPutMode=ka.checkPull(this,c,fa,e))&&s.checkPut(this,c,fa,e))){if(o="vertical"===this._getDirection(e,a),t=$r(fa),R("dragOverValid"),nl.eventCanceled)return h;if(i)return pa=ma,O(),this._hideClone(),R("revert"),nl.eventCanceled||(ga?ma.insertBefore(fa,ga):ma.appendChild(fa)),M(!0);var m=Kr(r,l.draggable);if(!m||function(e,t,n){var i=$r(Kr(n.el,n.options.draggable)),o=10;return t?e.clientX>i.right+o||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+o}(e,o,this)&&!m.animated){if(m===fa)return M(!1);if(m&&r===e.target&&(a=m),a&&(n=$r(a)),!1!==il(ma,r,fa,t,a,n,e,!!a))return O(),r.appendChild(fa),pa=r,D(),M(!0)}else if(m&&function(e,t,n){var i=$r(Qr(n.el,0,n.options,!0)),o=10;return t?e.clientX<i.left-o||e.clientY<i.top&&e.clientX<i.right:e.clientY<i.top-o||e.clientY<i.bottom&&e.clientX<i.left}(e,o,this)){var g=Qr(r,0,l,!0);if(g===fa)return M(!1);if(n=$r(a=g),!1!==il(ma,r,fa,t,a,n,e,!1))return O(),r.insertBefore(fa,g),pa=r,D(),M(!0)}else if(a.parentNode===r){n=$r(a);var v,_,b,y=fa.parentNode!==r,x=!function(e,t,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,r=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return i===a||o===l||i+r/2===a+s/2}(fa.animated&&fa.toRect||t,a.animated&&a.toRect||n,o),w=o?"top":"left",A=qr(a,"top","top")||qr(fa,"top","top"),k=A?A.scrollTop:void 0;if(Na!==a&&(_=n[w],Va=!1,za=!x&&l.invertSwap||y),v=function(e,t,n,i,o,r,a,l){var s=i?e.clientY:e.clientX,c=i?n.height:n.width,u=i?n.top:n.left,d=i?n.bottom:n.right,f=!1;if(!a)if(l&&La<c*o){if(!Va&&(1===Ia?s>u+c*r/2:s<d-c*r/2)&&(Va=!0),Va)f=!0;else if(1===Ia?s<u+La:s>d-La)return-Ia}else if(s>u+c*(1-o)/2&&s<d-c*(1-o)/2)return function(e){return Xr(fa)<Xr(e)?1:-1}(t);return f=f||a,f&&(s<u+c*r/2||s>d-c*r/2)?s>u+c/2?1:-1:0}(e,a,n,o,x?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,za,Na===a),0!==v){var C=Xr(fa);do{C-=v,b=pa.children[C]}while(b&&("none"===Ur(b,"display")||b===ha))}if(0===v||b===a)return M(!1);Na=a,Ia=v;var S=a.nextElementSibling,E=!1,T=il(ma,r,fa,t,a,n,e,E=1===v);if(!1!==T)return(1===T||-1===T)&&(E=1===T),Ua=!0,setTimeout(rl,30),O(),E&&!S?r.appendChild(fa):a.parentNode.insertBefore(fa,E?S:a),A&&na(A,0,k-A.scrollTop),pa=fa.parentNode,void 0!==_&&!za&&(La=Math.abs(_-$r(a)[w])),D(),M(!0)}if(r.contains(fa))return M(!1)}return!1}function R(l,s){ua(l,p,wr({evt:e,isOwner:u,axis:o?"vertical":"horizontal",revert:i,dragRect:t,targetRect:n,canSort:d,fromSortable:f,target:a,completed:M,onMove:function(n,i){return il(ma,r,fa,t,n,$r(n),e,i)},changed:D},s))}function O(){R("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function M(t){return R("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(p),p!==f&&(Hr(fa,Ca?Ca.options.ghostClass:c.options.ghostClass,!1),Hr(fa,l.ghostClass,!0)),Ca!==p&&p!==nl.active?Ca=p:p===nl.active&&Ca&&(Ca=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll(function(){R("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===fa&&!fa.animated||a===r&&!a.animated)&&(Na=null),!l.dragoverBubble&&!e.rootEl&&a!==document&&(fa.parentNode[oa]._isOutsideThisEl(e.target),!t&&el(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function D(){xa=Xr(fa),Aa=Xr(fa,l.draggable),da({sortable:p,name:"change",toEl:r,newIndex:xa,newDraggableIndex:Aa,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Fr(document,"mousemove",this._onTouchMove),Fr(document,"touchmove",this._onTouchMove),Fr(document,"pointermove",this._onTouchMove),Fr(document,"dragover",el),Fr(document,"mousemove",el),Fr(document,"touchmove",el)},_offUpEvents:function(){var e=this.el.ownerDocument;Fr(e,"mouseup",this._onDrop),Fr(e,"touchend",this._onDrop),Fr(e,"pointerup",this._onDrop),Fr(e,"touchcancel",this._onDrop),Fr(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;xa=Xr(fa),Aa=Xr(fa,n.draggable),ua("drop",this,{evt:e}),pa=fa&&fa.parentNode,xa=Xr(fa),Aa=Xr(fa,n.draggable),nl.eventCanceled||(Pa=!1,za=!1,Va=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),sl(this.cloneId),sl(this._dragStartId),this.nativeDraggable&&(Fr(document,"drop",this),Fr(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Mr&&Ur(document.body,"user-select",""),Ur(fa,"transform",""),e&&(Da&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ha&&ha.parentNode&&ha.parentNode.removeChild(ha),(ma===pa||Ca&&"clone"!==Ca.lastPutMode)&&_a&&_a.parentNode&&_a.parentNode.removeChild(_a),fa&&(this.nativeDraggable&&Fr(fa,"dragend",this),ol(fa),fa.style["will-change"]="",Da&&!Pa&&Hr(fa,Ca?Ca.options.ghostClass:this.options.ghostClass,!1),Hr(fa,this.options.chosenClass,!1),da({sortable:this,name:"unchoose",toEl:pa,newIndex:null,newDraggableIndex:null,originalEvent:e}),ma!==pa?(xa>=0&&(da({rootEl:pa,name:"add",toEl:pa,fromEl:ma,originalEvent:e}),da({sortable:this,name:"remove",toEl:pa,originalEvent:e}),da({rootEl:pa,name:"sort",toEl:pa,fromEl:ma,originalEvent:e}),da({sortable:this,name:"sort",toEl:pa,originalEvent:e})),Ca&&Ca.save()):xa!==ya&&xa>=0&&(da({sortable:this,name:"update",toEl:pa,originalEvent:e}),da({sortable:this,name:"sort",toEl:pa,originalEvent:e})),nl.active&&((null==xa||-1===xa)&&(xa=ya,Aa=wa),da({sortable:this,name:"end",toEl:pa,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){ua("nulling",this),ma=fa=pa=ha=ga=_a=va=ba=Sa=Ea=Da=xa=Aa=ya=wa=Na=Ia=Ca=ka=nl.dragged=nl.ghost=nl.clone=nl.active=null,Wa.forEach(function(e){e.checked=!0}),Wa.length=Ta=Ra=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":fa&&(this._onDragOver(e),(t=e).dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault());break;case"selectstart":e.preventDefault()}var t},toArray:function(){for(var e,t=[],n=this.el.children,i=0,o=n.length,r=this.options;i<o;i++)jr(e=n[i],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||al(e));return t},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(e,t){var o=i.children[t];jr(o,this.options.draggable,i,!1)&&(n[e]=o)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(i.removeChild(n[e]),i.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return jr(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var i=sa.modifyOption(this,e,t);n[e]=typeof i<"u"?i:t,"group"===e&&Xa(n)},destroy:function(){ua("destroy",this);var e=this.el;e[oa]=null,Fr(e,"mousedown",this._onTapStart),Fr(e,"touchstart",this._onTapStart),Fr(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Fr(e,"dragover",this),Fr(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ja.splice(ja.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ba){if(ua("hideClone",this),nl.eventCanceled)return;Ur(_a,"display","none"),this.options.removeCloneOnHide&&_a.parentNode&&_a.parentNode.removeChild(_a),ba=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ba){if(ua("showClone",this),nl.eventCanceled)return;fa.parentNode!=ma||this.options.group.revertClone?ga?ma.insertBefore(_a,ga):ma.appendChild(_a):ma.insertBefore(_a,fa),this.options.group.revertClone&&this.animate(fa,_a),Ur(_a,"display",""),ba=!1}}else this._hideClone()}},Ya&&Lr(document,"touchmove",function(e){(nl.active||Pa)&&e.cancelable&&e.preventDefault()}),nl.utils={on:Lr,off:Fr,css:Ur,find:Yr,is:function(e,t){return!!jr(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:ta,closest:jr,toggleClass:Hr,clone:ia,index:Xr,nextTick:ll,cancelNextTick:sl,detectDirection:Ka,getChild:Qr},nl.get=function(e){return e[oa]},nl.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(nl.utils=wr(wr({},nl.utils),e.utils)),sa.mount(e)})},nl.create=function(e,t){return new nl(e,t)},nl.version="1.14.0";var cl,ul,dl,fl,pl,hl,ml=[],gl=!1;function vl(){ml.forEach(function(e){clearInterval(e.pid)}),ml=[]}function _l(){clearInterval(hl)}var bl=ta(function(e,t,n,i){if(t.scroll){var o,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=Gr(),u=!1;ul!==n&&(ul=n,vl(),cl=t.scroll,o=t.scrollFn,!0===cl&&(cl=Zr(n,!0)));var d=0,f=cl;do{var p=f,h=$r(p),m=h.top,g=h.bottom,v=h.left,_=h.right,b=h.width,y=h.height,x=void 0,w=void 0,A=p.scrollWidth,k=p.scrollHeight,C=Ur(p),S=p.scrollLeft,E=p.scrollTop;p===c?(x=b<A&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),w=y<k&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(x=b<A&&("auto"===C.overflowX||"scroll"===C.overflowX),w=y<k&&("auto"===C.overflowY||"scroll"===C.overflowY));var T=x&&(Math.abs(_-r)<=l&&S+b<A)-(Math.abs(v-r)<=l&&!!S),R=w&&(Math.abs(g-a)<=l&&E+y<k)-(Math.abs(m-a)<=l&&!!E);if(!ml[d])for(var O=0;O<=d;O++)ml[O]||(ml[O]={});(ml[d].vx!=T||ml[d].vy!=R||ml[d].el!==p)&&(ml[d].el=p,ml[d].vx=T,ml[d].vy=R,clearInterval(ml[d].pid),(0!=T||0!=R)&&(u=!0,ml[d].pid=setInterval(function(){i&&0===this.layer&&nl.active._onTouchMove(pl);var t=ml[this.layer].vy?ml[this.layer].vy*s:0,n=ml[this.layer].vx?ml[this.layer].vx*s:0;"function"==typeof o&&"continue"!==o.call(nl.dragged.parentNode[oa],n,t,e,pl,ml[this.layer].el)||na(ml[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==c&&(f=Zr(f,!1)));gl=u}},30),yl=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,o=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||o;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function xl(){}function wl(){}function Al(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function kl(e,t,n){const i=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,i)}xl.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=Qr(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:yl},Cr(xl,{pluginName:"revertOnSpill"}),wl.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:yl},Cr(wl,{pluginName:"removeOnSpill"}),nl.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?Lr(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Lr(document,"pointermove",this._handleFallbackAutoScroll):t.touches?Lr(document,"touchmove",this._handleFallbackAutoScroll):Lr(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?Fr(document,"dragover",this._handleAutoScroll):(Fr(document,"pointermove",this._handleFallbackAutoScroll),Fr(document,"touchmove",this._handleFallbackAutoScroll),Fr(document,"mousemove",this._handleFallbackAutoScroll)),_l(),vl(),clearTimeout(Vr),Vr=void 0},nulling:function(){pl=ul=cl=gl=hl=dl=fl=null,ml.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,i=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(i,o);if(pl=e,t||this.options.forceAutoScrollFallback||Rr||Tr||Mr){bl(e,this.options,r,t);var a=Zr(r,!0);gl&&(!hl||i!==dl||o!==fl)&&(hl&&_l(),hl=setInterval(function(){var r=Zr(document.elementFromPoint(i,o),!0);r!==a&&(a=r,vl()),bl(e,n.options,r,t)},10),dl=i,fl=o)}else{if(!this.options.bubbleScroll||Zr(r,!0)===Gr())return void vl();bl(e,this.options,Zr(r,!1),!1)}}},Cr(e,{pluginName:"scroll",initializeByDefault:!0})}),nl.mount(wl,xl);const Cl=typeof window<"u"?window.console:global.console;const Sl=/-(\w)/g,El=function(e){const t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}(e=>e.replace(Sl,(e,t)=>t.toUpperCase())),Tl=["Start","Add","Remove","Update","End"],Rl=["Choose","Unchoose","Sort","Filter","Clone"],Ol=["Move"],Ml=[Ol,Tl,Rl].flatMap(e=>e).map(e=>"on".concat(e)),Dl={manage:Ol,manageAndEmit:Tl,emit:Rl};const Nl=["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"];function Il(e){return["id","class","role","style"].includes(e)||e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("on")}function Ll(e){return e.reduce((e,[t,n])=>(e[t]=n,e),{})}function Fl(e){return Object.entries(e).filter(([e,t])=>!Il(e)).map(([e,t])=>[El(e),t]).filter(([e,t])=>!function(e){return-1!==Ml.indexOf(e)}(e))}const Pl=({el:e})=>e,Bl=e=>e.__draggable_context;class jl{constructor({nodes:{header:e,default:t,footer:n},root:i,realList:o}){this.defaultNodes=t,this.children=[...e,...t,...n],this.externalComponent=i.externalComponent,this.rootTransition=i.transition,this.tag=i.tag,this.realList=o}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(e,t){const{tag:n,children:i,_isRootComponent:o}=this;return e(n,t,o?{default:()=>i}:i)}updated(){const{defaultNodes:e,realList:t}=this;e.forEach((e,n)=>{((e,t)=>{e.__draggable_context=t})(Pl(e),{element:t[n],index:n})})}getUnderlyingVm(e){return Bl(e)}getVmIndexFromDomIndex(e,t){const{defaultNodes:n}=this,{length:i}=n,o=t.children,r=o.item(e);if(null===r)return i;const a=Bl(r);if(a)return a.index;if(0===i)return 0;const l=Pl(n[0]);return e<[...o].findIndex(e=>e===l)?0:i}}function Vl(e){const n=function(e){return["transition-group","TransitionGroup"].includes(e)}(e),i=!function(e){return Nl.includes(e)}(e)&&!n;return{transition:n,externalComponent:i,tag:i?t(e):n?q:e}}function zl({$slots:e,tag:t,realList:n,getKey:i}){const o=function({$slots:e,realList:t,getKey:n}){const i=t||[],[o,r]=["header","footer"].map(t=>function(e,t){const n=e[t];return n?n():[]}(e,t)),{item:a}=e;if(!a)throw new Error("draggable element must have an item slot");const l=i.flatMap((e,t)=>a({element:e,index:t}).map(t=>(t.key=n(e),t.props={...t.props||{},"data-draggable":!0},t)));if(l.length!==i.length)throw new Error("Item slot must have only one child");return{header:o,footer:r,default:l}}({$slots:e,realList:n,getKey:i}),r=Vl(t);return new jl({nodes:o,root:r,realList:n})}function Hl(e,t){f(()=>this.$emit(e.toLowerCase(),t))}function Ul(e){return(t,n)=>{if(null!==this.realList)return this["onDrag".concat(e)](t,n)}}function Wl(e){const t=Ul.call(this,e);return(n,i)=>{t.call(this,n,i),Hl.call(this,e,n)}}let Yl=null;const Gl={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},$l=["update:modelValue","change",...[...Dl.manageAndEmit,...Dl.emit].map(e=>e.toLowerCase())],ql=e({name:"draggable",inheritAttrs:!1,props:Gl,emits:$l,data:()=>({error:!1}),render(){try{this.error=!1;const{$slots:e,$attrs:t,tag:n,componentData:i,realList:o,getKey:r}=this,a=zl({$slots:e,tag:n,realList:o,getKey:r});this.componentStructure=a;const l=function({$attrs:e,componentData:t={}}){return{...Ll(Object.entries(e).filter(([e,t])=>Il(e))),...t}}({$attrs:t,componentData:i});return a.render(w,l)}catch(e){return this.error=!0,w("pre",{style:{color:"red"}},e.stack)}},created(){null!==this.list&&null!==this.modelValue&&Cl.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:e,$el:t,componentStructure:n}=this;n.updated();const i=function({$attrs:e,callBackBuilder:t}){const n=Ll(Fl(e));Object.entries(t).forEach(([e,t])=>{Dl[e].forEach(e=>{n["on".concat(e)]=t(e)})});const i="[data-draggable]".concat(n.draggable||"");return{...n,draggable:i}}({$attrs:e,callBackBuilder:{manageAndEmit:e=>Wl.call(this,e),emit:e=>Hl.bind(this,e),manage:e=>Ul.call(this,e)}}),o=1===t.nodeType?t:t.parentElement;this._sortable=new nl(o,i),this.targetDomElement=o,o.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){void 0!==this._sortable&&this._sortable.destroy()},computed:{realList(){const{list:e}=this;return e||this.modelValue},getKey(){const{itemKey:e}=this;return"function"==typeof e?e:t=>t[e]}},watch:{$attrs:{handler(e){const{_sortable:t}=this;!t||Fl(e).forEach(([e,n])=>{t.option(e,n)})},deep:!0}},methods:{getUnderlyingVm(e){return this.componentStructure.getUnderlyingVm(e)||null},getUnderlyingPotencialDraggableComponent:e=>e.__draggable_component__,emitChanges(e){f(()=>this.$emit("change",e))},alterList(e){if(this.list)return void e(this.list);const t=[...this.modelValue];e(t),this.$emit("update:modelValue",t)},spliceList(){this.alterList(e=>e.splice(...arguments))},updatePosition(e,t){this.alterList(n=>n.splice(t,0,n.splice(e,1)[0]))},getRelatedContextFromMoveEvent({to:e,related:t}){const n=this.getUnderlyingPotencialDraggableComponent(e);if(!n)return{component:n};const i=n.realList,o={list:i,component:n};return e!==t&&i?{...n.getUnderlyingVm(t)||{},...o}:o},getVmIndexFromDomIndex(e){return this.componentStructure.getVmIndexFromDomIndex(e,this.targetDomElement)},onDragStart(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),Yl=e.item},onDragAdd(e){const t=e.item._underlying_vm_;if(void 0===t)return;Al(e.item);const n=this.getVmIndexFromDomIndex(e.newIndex);this.spliceList(n,0,t);const i={element:t,newIndex:n};this.emitChanges({added:i})},onDragRemove(e){if(kl(this.$el,e.item,e.oldIndex),"clone"===e.pullMode)return void Al(e.clone);const{index:t,element:n}=this.context;this.spliceList(t,1);const i={element:n,oldIndex:t};this.emitChanges({removed:i})},onDragUpdate(e){Al(e.item),kl(e.from,e.item,e.oldIndex);const t=this.context.index,n=this.getVmIndexFromDomIndex(e.newIndex);this.updatePosition(t,n);const i={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:i})},computeFutureIndex(e,t){if(!e.element)return 0;const n=[...t.to.children].filter(e=>"none"!==e.style.display),i=n.indexOf(t.related),o=e.component.getVmIndexFromDomIndex(i);return-1===n.indexOf(Yl)&&t.willInsertAfter?o+1:o},onDragMove(e,t){const{move:n,realList:i}=this;if(!n||!i)return!0;const o=this.getRelatedContextFromMoveEvent(e),r=this.computeFutureIndex(o,e),a={...this.context,futureIndex:r};return n({...e,relatedContext:o,draggedContext:a},t)},onDragEnd(){Yl=null}}}),Ql=[{name:"main",title:"基础组件",list:[]},{name:"subform",title:"子表单组件",list:[]},{name:"aide",title:"辅助组件",list:[]},{name:"layout",title:"布局组件",list:[]}],Kl=Xn,Xl=Xn.factory();let Jl=null,Zl=b(null);function es(...e){return Jl(...e)}const ts=e=>{Zl.value=e||di;const t=Ei(Zl);return Jl=t.t,t};ts();typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"&&self;var ns,is={exports:{}};function os(){return ns||(ns=1,is.exports=function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),i=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),r=/Edge\/(\d+)/.exec(e),a=i||o||r,l=a&&(i?document.documentMode||6:+(r||o)[1]),s=!r&&/WebKit\//.test(e),c=s&&/Qt\/\d+\.\d+/.test(e),u=!r&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),_=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=g||/Mac/.test(t),y=/\bCrOS\b/.test(e),x=/win/i.test(t),w=f&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(f=!1,s=!0);var A=b&&(c||f&&(null==w||w<12.11)),k=n||a&&l>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,E=function(e,t){var n=e.className,i=C(t).exec(n);if(i){var o=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(o?i[1]+o:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function R(e,t){return T(e).appendChild(t)}function O(e,t,n,i){var o=document.createElement(e);if(n&&(o.className=n),i&&(o.style.cssText=i),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var r=0;r<t.length;++r)o.appendChild(t[r]);return o}function M(e,t,n,i){var o=O(e,t,n,i);return o.setAttribute("role","presentation"),o}function D(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function N(e){var t;try{t=e.activeElement}catch(n){t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function I(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function L(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]&&!C(n[i]).test(t)&&(t+=" "+n[i]);return t}S=document.createRange?function(e,t,n,i){var o=document.createRange();return o.setEnd(i||e,n),o.setStart(e,t),o}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(o){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i};var F=function(e){e.select()};function P(e){return e.display.wrapper.ownerDocument}function B(e){return P(e).defaultView}function j(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function V(e,t,n){for(var i in t||(t={}),e)e.hasOwnProperty(i)&&(!1!==n||!t.hasOwnProperty(i))&&(t[i]=e[i]);return t}function z(e,t,n,i,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var r=i||0,a=o||0;;){var l=e.indexOf("\t",r);if(l<0||l>=t)return a+(t-r);a+=l-r,a+=n-a%n,r=l+1}}g?F=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(F=function(e){try{e.select()}catch(t){}});var H=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function U(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}H.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},H.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var W=50,Y={toString:function(){return"CodeMirror.Pass"}},G={scroll:!1},$={origin:"*mouse"},q={origin:"+move"};function Q(e,t,n){for(var i=0,o=0;;){var r=e.indexOf("\t",i);-1==r&&(r=e.length);var a=r-i;if(r==e.length||o+a>=t)return i+Math.min(a,t-o);if(o+=r-i,i=r+1,(o+=n-o%n)>=t)return i}}var K=[""];function X(e){for(;K.length<=e;)K.push(J(K)+" ");return K[e]}function J(e){return e[e.length-1]}function Z(e,t){for(var n=[],i=0;i<e.length;i++)n[i]=t(e[i],i);return n}function ee(e,t,n){for(var i=0,o=n(t);i<e.length&&n(e[i])<=o;)i++;e.splice(i,0,t)}function te(){}function ne(e,t){var n;return Object.create?n=Object.create(e):(te.prototype=e,n=new te),t&&V(t,n),n}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function oe(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&oe(e))||t.test(e):oe(e)}function ae(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var le=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function se(e){return e.charCodeAt(0)>=768&&le.test(e)}function ce(e,t,n){for(;(n<0?t>0:t<e.length)&&se(e.charAt(t));)t+=n;return t}function ue(e,t,n){for(var i=t>n?-1:1;;){if(t==n)return t;var o=(t+n)/2,r=i<0?Math.ceil(o):Math.floor(o);if(r==t)return e(r)?t:n;e(r)?n=r:t=r+i}}function de(e,t,n,i){if(!e)return i(t,n,"ltr",0);for(var o=!1,r=0;r<e.length;++r){var a=e[r];(a.from<n&&a.to>t||t==n&&a.to==t)&&(i(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",r),o=!0)}o||i(t,n,"ltr")}var fe=null;function pe(e,t,n){var i;fe=null;for(var o=0;o<e.length;++o){var r=e[o];if(r.from<t&&r.to>t)return o;r.to==t&&(r.from!=r.to&&"before"==n?i=o:fe=o),r.from==t&&(r.from!=r.to&&"before"!=n?i=o:fe=o)}return null!=i?i:fe}var he=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,r=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!i.test(e))return!1;for(var u=e.length,d=[],f=0;f<u;++f)d.push(n(e.charCodeAt(f)));for(var p=0,h=c;p<u;++p){var m=d[p];"m"==m?d[p]=h:h=m}for(var g=0,v=c;g<u;++g){var _=d[g];"1"==_&&"r"==v?d[g]="n":r.test(_)&&(v=_,"r"==_&&(d[g]="R"))}for(var b=1,y=d[0];b<u-1;++b){var x=d[b];"+"==x&&"1"==y&&"1"==d[b+1]?d[b]="1":","==x&&y==d[b+1]&&("1"==y||"n"==y)&&(d[b]=y),y=x}for(var w=0;w<u;++w){var A=d[w];if(","==A)d[w]="N";else if("%"==A){var k=void 0;for(k=w+1;k<u&&"%"==d[k];++k);for(var C=w&&"!"==d[w-1]||k<u&&"1"==d[k]?"1":"N",S=w;S<k;++S)d[S]=C;w=k-1}}for(var E=0,T=c;E<u;++E){var R=d[E];"L"==T&&"1"==R?d[E]="L":r.test(R)&&(T=R)}for(var O=0;O<u;++O)if(o.test(d[O])){var M=void 0;for(M=O+1;M<u&&o.test(d[M]);++M);for(var D="L"==(O?d[O-1]:c),N=D==("L"==(M<u?d[M]:c))?D?"L":"R":c,I=O;I<M;++I)d[I]=N;O=M-1}for(var L,F=[],P=0;P<u;)if(a.test(d[P])){var B=P;for(++P;P<u&&a.test(d[P]);++P);F.push(new s(0,B,P))}else{var j=P,V=F.length,z="rtl"==t?1:0;for(++P;P<u&&"L"!=d[P];++P);for(var H=j;H<P;)if(l.test(d[H])){j<H&&(F.splice(V,0,new s(1,j,H)),V+=z);var U=H;for(++H;H<P&&l.test(d[H]);++H);F.splice(V,0,new s(2,U,H)),V+=z,j=H}else++H;j<P&&F.splice(V,0,new s(1,j,P))}return"ltr"==t&&(1==F[0].level&&(L=e.match(/^\s+/))&&(F[0].from=L[0].length,F.unshift(new s(0,0,L[0].length))),1==J(F).level&&(L=e.match(/\s+$/))&&(J(F).to-=L[0].length,F.push(new s(0,u-L[0].length,u)))),"rtl"==t?F.reverse():F}}();function me(e,t){var n=e.order;return null==n&&(n=e.order=he(e.text,t)),n}var ge=[],ve=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var i=e._handlers||(e._handlers={});i[t]=(i[t]||ge).concat(n)}};function _e(e,t){return e._handlers&&e._handlers[t]||ge}function be(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var i=e._handlers,o=i&&i[t];if(o){var r=U(o,n);r>-1&&(i[t]=o.slice(0,r).concat(o.slice(r+1)))}}}function ye(e,t){var n=_e(e,t);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,i)}function xe(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ye(e,n||t.type,e,t),Ee(t)||t.codemirrorIgnore}function we(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)-1==U(n,t[i])&&n.push(t[i])}function Ae(e,t){return _e(e,t).length>0}function ke(e){e.prototype.on=function(e,t){ve(this,e,t)},e.prototype.off=function(e,t){be(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Te(e){Ce(e),Se(e)}function Re(e){return e.target||e.srcElement}function Oe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Me,De,Ne=function(){if(a&&l<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Ie(e){if(null==Me){var t=O("span","");R(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Me=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var n=Me?O("span",""):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Le(e){if(null!=De)return De;var t=R(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),i=S(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(De=i.right-n.right<3)}var Fe,Pe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],i=e.length;t<=i;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var r=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=r.indexOf("\r");-1!=a?(n.push(r.slice(0,a)),t+=a+1):(n.push(r),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Be=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},je="oncopy"in(Fe=O("div"))||(Fe.setAttribute("oncopy","return;"),"function"==typeof Fe.oncopy),Ve=null;function ze(e){if(null!=Ve)return Ve;var t=R(e,O("span","x")),n=t.getBoundingClientRect(),i=S(t,0,1).getBoundingClientRect();return Ve=Math.abs(n.left-i.left)>1}var He={},Ue={};function We(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),He[e]=t}function Ye(e,t){Ue[e]=t}function Ge(e){if("string"==typeof e&&Ue.hasOwnProperty(e))e=Ue[e];else if(e&&"string"==typeof e.name&&Ue.hasOwnProperty(e.name)){var t=Ue[e.name];"string"==typeof t&&(t={name:t}),(e=ne(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ge("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ge("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function $e(e,t){t=Ge(t);var n=He[t.name];if(!n)return $e(e,"text/plain");var i=n(e,t);if(qe.hasOwnProperty(t.name)){var o=qe[t.name];for(var r in o)!o.hasOwnProperty(r)||(i.hasOwnProperty(r)&&(i["_"+r]=i[r]),i[r]=o[r])}if(i.name=t.name,t.helperType&&(i.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)i[a]=t.modeProps[a];return i}var qe={};function Qe(e,t){V(t,qe.hasOwnProperty(e)?qe[e]:qe[e]={})}function Ke(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var o=t[i];o instanceof Array&&(o=o.concat([])),n[i]=o}return n}function Xe(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Je(e,t,n){return!e.startState||e.startState(t,n)}var Ze=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function et(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var o=n.children[i],r=o.chunkSize();if(t<r){n=o;break}t-=r}return n.lines[t]}function tt(e,t,n){var i=[],o=t.line;return e.iter(t.line,n.line+1,function(e){var r=e.text;o==n.line&&(r=r.slice(0,n.ch)),o==t.line&&(r=r.slice(t.ch)),i.push(r),++o}),i}function nt(e,t,n){var i=[];return e.iter(t,n,function(e){i.push(e.text)}),i}function it(e,t){var n=t-e.height;if(n)for(var i=e;i;i=i.parent)i.height+=n}function ot(e){if(null==e.parent)return null;for(var t=e.parent,n=U(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var o=0;i.children[o]!=t;++o)n+=i.children[o].chunkSize();return n+t.first}function rt(e,t){var n=e.first;e:do{for(var i=0;i<e.children.length;++i){var o=e.children[i],r=o.height;if(t<r){e=o;continue e}t-=r,n+=o.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function at(e,t){return t>=e.first&&t<e.first+e.size}function lt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function st(e,t,n){if(void 0===n&&(n=null),!(this instanceof st))return new st(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ct(e,t){return e.line-t.line||e.ch-t.ch}function ut(e,t){return e.sticky==t.sticky&&0==ct(e,t)}function dt(e){return st(e.line,e.ch)}function ft(e,t){return ct(e,t)<0?t:e}function pt(e,t){return ct(e,t)<0?e:t}function ht(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function mt(e,t){if(t.line<e.first)return st(e.first,0);var n=e.first+e.size-1;return t.line>n?st(n,et(e,n).text.length):gt(t,et(e,t.line).text.length)}function gt(e,t){var n=e.ch;return null==n||n>t?st(e.line,t):n<0?st(e.line,0):e}function vt(e,t){for(var n=[],i=0;i<t.length;i++)n[i]=mt(e,t[i]);return n}Ze.prototype.eol=function(){return this.pos>=this.string.length},Ze.prototype.sol=function(){return this.pos==this.lineStart},Ze.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ze.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ze.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ze.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ze.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ze.prototype.skipToEnd=function(){this.pos=this.string.length},Ze.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ze.prototype.backUp=function(e){this.pos-=e},Ze.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=z(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)},Ze.prototype.indentation=function(){return z(this.string,null,this.tabSize)-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)},Ze.prototype.match=function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ze.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ze.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ze.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ze.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var _t=function(e,t){this.state=e,this.lookAhead=t},bt=function(e,t,n,i){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function yt(e,t,n,i){var o=[e.state.modeGen],r={};Rt(e,t.text,e.doc.mode,n,function(e,t){return o.push(e,t)},r,i);for(var a=n.state,l=function(i){n.baseTokens=o;var l=e.state.overlays[i],s=1,c=0;n.state=!0,Rt(e,t.text,l.mode,n,function(e,t){for(var n=s;c<e;){var i=o[s];i>e&&o.splice(s,1,e,o[s+1],i),s+=2,c=Math.min(e,i)}if(t)if(l.opaque)o.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var r=o[n+1];o[n+1]=(r?r+" ":"")+"overlay "+t}},r),n.state=a,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:o,classes:r.bgClass||r.textClass?r:null}}function xt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=wt(e,ot(t)),o=t.text.length>e.options.maxHighlightLength&&Ke(e.doc.mode,i.state),r=yt(e,t,i);o&&(i.state=o),t.stateAfter=i.save(!o),t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function wt(e,t,n){var i=e.doc,o=e.display;if(!i.mode.startState)return new bt(i,!0,t);var r=Ot(e,t,n),a=r>i.first&&et(i,r-1).stateAfter,l=a?bt.fromSaved(i,a,r):new bt(i,Je(i.mode),r);return i.iter(r,t,function(n){At(e,n.text,l);var i=l.line;n.stateAfter=i==t-1||i%5==0||i>=o.viewFrom&&i<o.viewTo?l.save():null,l.nextLine()}),n&&(i.modeFrontier=l.line),l}function At(e,t,n,i){var o=e.doc.mode,r=new Ze(t,e.options.tabSize,n);for(r.start=r.pos=i||0,""==t&&kt(o,n.state);!r.eol();)Ct(o,r,n.state),r.start=r.pos}function kt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Xe(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function Ct(e,t,n,i){for(var o=0;o<10;o++){i&&(i[0]=Xe(e,n).mode);var r=e.token(t,n);if(t.pos>t.start)return r}throw new Error("Mode "+e.name+" failed to advance stream.")}bt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},bt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},bt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},bt.fromSaved=function(e,t,n){return t instanceof _t?new bt(e,Ke(e.mode,t.state),n,t.lookAhead):new bt(e,Ke(e.mode,t),n)},bt.prototype.save=function(e){var t=!1!==e?Ke(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new _t(t,this.maxLookAhead):t};var St=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Et(e,t,n,i){var o,r,a=e.doc,l=a.mode,s=et(a,(t=mt(a,t)).line),c=wt(e,t.line,n),u=new Ze(s.text,e.options.tabSize,c);for(i&&(r=[]);(i||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=Ct(l,u,c.state),i&&r.push(new St(u,o,Ke(a.mode,c.state)));return i?r:new St(u,o,c.state)}function Tt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==t[i]?t[i]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[i])||(t[i]+=" "+n[2])}return e}function Rt(e,t,n,i,o,r,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Ze(t,e.options.tabSize,i),f=e.options.addModeClass&&[null];for(""==t&&Tt(kt(n,i.state),r);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&At(e,t,i,d.pos),d.pos=t.length,s=null):s=Tt(Ct(n,d,i.state,f),r),f){var p=f[0].name;p&&(s="m-"+(s?p+" "+s:p))}if(!l||u!=s){for(;c<d.start;)o(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var h=Math.min(d.pos,c+5e3);o(h,u),c=h}}function Ot(e,t,n){for(var i,o,r=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=r.first)return r.first;var s=et(r,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof _t?c.lookAhead:0)<=r.modeFrontier))return l;var u=z(s.text,null,e.options.tabSize);(null==o||i>u)&&(o=l-1,i=u)}return o}function Mt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,i=t-1;i>n;i--){var o=et(e,i).stateAfter;if(o&&(!(o instanceof _t)||i+o.lookAhead<t)){n=i+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Dt=!1,Nt=!1;function It(){Dt=!0}function Lt(){Nt=!0}function Ft(e,t,n){this.marker=e,this.from=t,this.to=n}function Pt(e,t){if(e)for(var n=0;n<e.length;++n){var i=e[n];if(i.marker==t)return i}}function Bt(e,t){for(var n,i=0;i<e.length;++i)e[i]!=t&&(n||(n=[])).push(e[i]);return n}function jt(e,t,n){var i=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));i&&e.markedSpans&&i.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],i&&i.add(e.markedSpans)),t.marker.attachLine(e)}function Vt(e,t,n){var i;if(e)for(var o=0;o<e.length;++o){var r=e[o],a=r.marker;if(null==r.from||(a.inclusiveLeft?r.from<=t:r.from<t)||r.from==t&&"bookmark"==a.type&&(!n||!r.marker.insertLeft)){var l=null==r.to||(a.inclusiveRight?r.to>=t:r.to>t);(i||(i=[])).push(new Ft(a,r.from,l?null:r.to))}}return i}function zt(e,t,n){var i;if(e)for(var o=0;o<e.length;++o){var r=e[o],a=r.marker;if(null==r.to||(a.inclusiveRight?r.to>=t:r.to>t)||r.from==t&&"bookmark"==a.type&&(!n||r.marker.insertLeft)){var l=null==r.from||(a.inclusiveLeft?r.from<=t:r.from<t);(i||(i=[])).push(new Ft(a,l?null:r.from-t,null==r.to?null:r.to-t))}}return i}function Ht(e,t){if(t.full)return null;var n=at(e,t.from.line)&&et(e,t.from.line).markedSpans,i=at(e,t.to.line)&&et(e,t.to.line).markedSpans;if(!n&&!i)return null;var o=t.from.ch,r=t.to.ch,a=0==ct(t.from,t.to),l=Vt(n,o,a),s=zt(i,r,a),c=1==t.text.length,u=J(t.text).length+(c?o:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var p=Pt(s,f.marker);p?c&&(f.to=null==p.to?null:p.to+u):f.to=o}}if(s)for(var h=0;h<s.length;++h){var m=s[h];null!=m.to&&(m.to+=u),null==m.from?Pt(l,m.marker)||(m.from=u,c&&(l||(l=[])).push(m)):(m.from+=u,c&&(l||(l=[])).push(m))}l&&(l=Ut(l)),s&&s!=l&&(s=Ut(s));var g=[l];if(!c){var v,_=t.text.length-2;if(_>0&&l)for(var b=0;b<l.length;++b)null==l[b].to&&(v||(v=[])).push(new Ft(l[b].marker,null,null));for(var y=0;y<_;++y)g.push(v);g.push(s)}return g}function Ut(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Wt(e,t,n){var i=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;n.readOnly&&(!i||-1==U(i,n))&&(i||(i=[])).push(n)}}),!i)return null;for(var o=[{from:t,to:n}],r=0;r<i.length;++r)for(var a=i[r],l=a.find(0),s=0;s<o.length;++s){var c=o[s];if(!(ct(c.to,l.from)<0||ct(c.from,l.to)>0)){var u=[s,1],d=ct(c.from,l.from),f=ct(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:l.to,to:c.to}),o.splice.apply(o,u),s+=u.length-3}}return o}function Yt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Gt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function $t(e){return e.inclusiveLeft?-1:0}function qt(e){return e.inclusiveRight?1:0}function Qt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var i=e.find(),o=t.find(),r=ct(i.from,o.from)||$t(e)-$t(t);return r?-r:ct(i.to,o.to)||qt(e)-qt(t)||t.id-e.id}function Kt(e,t){var n,i=Nt&&e.markedSpans;if(i)for(var o=void 0,r=0;r<i.length;++r)(o=i[r]).marker.collapsed&&null==(t?o.from:o.to)&&(!n||Qt(n,o.marker)<0)&&(n=o.marker);return n}function Xt(e){return Kt(e,!0)}function Jt(e){return Kt(e,!1)}function Zt(e,t){var n,i=Nt&&e.markedSpans;if(i)for(var o=0;o<i.length;++o){var r=i[o];r.marker.collapsed&&(null==r.from||r.from<t)&&(null==r.to||r.to>t)&&(!n||Qt(n,r.marker)<0)&&(n=r.marker)}return n}function en(e,t,n,i,o){var r=et(e,t),a=Nt&&r.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=ct(c.from,n)||$t(s.marker)-$t(o),d=ct(c.to,i)||qt(s.marker)-qt(o);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?ct(c.to,n)>=0:ct(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?ct(c.from,i)<=0:ct(c.from,i)<0)))return!0}}}function tn(e){for(var t;t=Xt(e);)e=t.find(-1,!0).line;return e}function nn(e){for(var t;t=Jt(e);)e=t.find(1,!0).line;return e}function on(e){for(var t,n;t=Jt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function rn(e,t){var n=et(e,t),i=tn(n);return n==i?t:ot(i)}function an(e,t){if(t>e.lastLine())return t;var n,i=et(e,t);if(!ln(e,i))return t;for(;n=Jt(i);)i=n.find(1,!0).line;return ot(i)+1}function ln(e,t){var n=Nt&&t.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)if((i=n[o]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&sn(e,t,i))return!0}}function sn(e,t,n){if(null==n.to){var i=n.marker.find(1,!0);return sn(e,i.line,Pt(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,r=0;r<t.markedSpans.length;++r)if((o=t.markedSpans[r]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&sn(e,t,o))return!0}function cn(e){for(var t=0,n=(e=tn(e)).parent,i=0;i<n.lines.length;++i){var o=n.lines[i];if(o==e)break;t+=o.height}for(var r=n.parent;r;r=(n=r).parent)for(var a=0;a<r.children.length;++a){var l=r.children[a];if(l==n)break;t+=l.height}return t}function un(e){if(0==e.height)return 0;for(var t,n=e.text.length,i=e;t=Xt(i);){var o=t.find(0,!0);i=o.from.line,n+=o.from.ch-o.to.ch}for(i=e;t=Jt(i);){var r=t.find(0,!0);n-=i.text.length-r.from.ch,n+=(i=r.to.line).text.length-r.to.ch}return n}function dn(e){var t=e.display,n=e.doc;t.maxLine=et(n,n.first),t.maxLineLength=un(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=un(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var fn=function(e,t,n){this.text=e,Gt(this,t),this.height=n?n(this):1};function pn(e,t,n,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Yt(e),Gt(e,n);var o=i?i(e):1;o!=e.height&&it(e,o)}function hn(e){e.parent=null,Yt(e)}fn.prototype.lineNo=function(){return ot(this)},ke(fn);var mn={},gn={};function vn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?gn:mn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function _n(e,t){var n=M("span",null,null,s?"padding-right: .1px":null),i={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var r=o?t.rest[o-1]:t.line,a=void 0;i.pos=0,i.addToken=yn,Le(e.display.measure)&&(a=me(r,e.doc.direction))&&(i.addToken=wn(i.addToken,a)),i.map=[],kn(r,i,xt(e,r,t!=e.display.externalMeasured&&ot(r))),r.styleClasses&&(r.styleClasses.bgClass&&(i.bgClass=L(r.styleClasses.bgClass,i.bgClass||"")),r.styleClasses.textClass&&(i.textClass=L(r.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Ie(e.display.measure))),0==o?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var l=i.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=L(i.pre.className,i.textClass||"")),i}function bn(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function yn(e,t,n,i,o,r,s){if(t){var c,u=e.splitSpaces?xn(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var h=d.exec(t),m=h?h.index-p:t.length-p;if(m){var g=document.createTextNode(u.slice(p,p+m));a&&l<9?c.appendChild(O("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;p+=m+1;var v=void 0;if("\t"==h[0]){var _=e.cm.options.tabSize,b=_-e.col%_;(v=c.appendChild(O("span",X(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=c.appendChild(O("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&l<9?c.appendChild(O("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&l<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||i||o||f||r||s){var y=n||"";i&&(y+=i),o&&(y+=o);var x=O("span",[c],y,r);if(s)for(var w in s)s.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&x.setAttribute(w,s[w]);return e.content.appendChild(x)}e.content.appendChild(c)}}function xn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,i="",o=0;o<e.length;o++){var r=e.charAt(o);" "==r&&n&&(o==e.length-1||32==e.charCodeAt(o+1))&&(r=" "),i+=r,n=" "==r}return i}function wn(e,t){return function(n,i,o,r,a,l,s){o=o?o+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+i.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(n,i,o,r,a,l,s);e(n,i.slice(0,d.to-c),o,r,null,l,s),r=null,i=i.slice(d.to-c),c=d.to}}}function An(e,t,n,i){var o=!i&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!i&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function kn(e,t,n){var i=e.markedSpans,o=e.text,r=0;if(i)for(var a,l,s,c,u,d,f,p=o.length,h=0,m=1,g="",v=0;;){if(v==h){s=c=u=l="",f=null,d=null,v=1/0;for(var _=[],b=void 0,y=0;y<i.length;++y){var x=i[y],w=x.marker;if("bookmark"==w.type&&x.from==h&&w.widgetNode)_.push(w);else if(x.from<=h&&(null==x.to||x.to>h||w.collapsed&&x.to==h&&x.from==h)){if(null!=x.to&&x.to!=h&&v>x.to&&(v=x.to,c=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&x.from==h&&(u+=" "+w.startStyle),w.endStyle&&x.to==v&&(b||(b=[])).push(w.endStyle,x.to),w.title&&((f||(f={})).title=w.title),w.attributes)for(var A in w.attributes)(f||(f={}))[A]=w.attributes[A];w.collapsed&&(!d||Qt(d.marker,w)<0)&&(d=x)}else x.from>h&&v>x.from&&(v=x.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==v&&(c+=" "+b[k]);if(!d||d.from==h)for(var C=0;C<_.length;++C)An(t,0,_[C]);if(d&&(d.from||0)==h){if(An(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=p)break;for(var S=Math.min(p,v);;){if(g){var E=h+g.length;if(!d){var T=E>S?g.slice(0,S-h):g;t.addToken(t,T,a?a+s:s,u,h+T.length==v?c:"",l,f)}if(E>=S){g=g.slice(S-h),h=S;break}h=E,u=""}g=o.slice(r,r=n[m++]),a=vn(n[m++],t.cm.options)}}else for(var R=1;R<n.length;R+=2)t.addToken(t,o.slice(r,r=n[R]),vn(n[R+1],t.cm.options))}function Cn(e,t,n){this.line=t,this.rest=on(t),this.size=this.rest?ot(J(this.rest))-n+1:1,this.node=this.text=null,this.hidden=ln(e,t)}function Sn(e,t,n){for(var i,o=[],r=t;r<n;r=i){var a=new Cn(e.doc,et(e.doc,r),r);i=r+a.size,o.push(a)}return o}var En=null;function Tn(e){En?En.ops.push(e):e.ownsGroup=En={ops:[e],delayedCallbacks:[]}}function Rn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var i=0;i<e.ops.length;i++){var o=e.ops[i];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<t.length)}function On(e,t){var n=e.ownsGroup;if(n)try{Rn(n)}finally{En=null,t(n)}}var Mn=null;function Dn(e,t){var n=_e(e,t);if(n.length){var i,o=Array.prototype.slice.call(arguments,2);En?i=En.delayedCallbacks:Mn?i=Mn:(i=Mn=[],setTimeout(Nn,0));for(var r=function(e){i.push(function(){return n[e].apply(null,o)})},a=0;a<n.length;++a)r(a)}}function Nn(){var e=Mn;Mn=null;for(var t=0;t<e.length;++t)e[t]()}function In(e,t,n,i){for(var o=0;o<t.changes.length;o++){var r=t.changes[o];"text"==r?Bn(e,t):"gutter"==r?Vn(e,t,n,i):"class"==r?jn(e,t):"widget"==r&&zn(e,t,i)}t.changes=null}function Ln(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&l<8&&(e.node.style.zIndex=2)),e.node}function Fn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var i=Ln(t);t.background=i.insertBefore(O("div",null,n),i.firstChild),e.display.input.setUneditable(t.background)}}function Pn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):_n(e,t)}function Bn(e,t){var n=t.text.className,i=Pn(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,jn(e,t)):n&&(t.text.className=n)}function jn(e,t){Fn(e,t),t.line.wrapClass?Ln(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Vn(e,t,n,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Ln(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var r=t.line.gutterMarkers;if(e.options.lineNumbers||r){var a=Ln(t),l=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!r||!r["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(O("div",lt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),r)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=r.hasOwnProperty(c)&&r[c];u&&l.appendChild(O("div",[u],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function zn(e,t,n){t.alignable&&(t.alignable=null);for(var i=C("CodeMirror-linewidget"),o=t.node.firstChild,r=void 0;o;o=r)r=o.nextSibling,i.test(o.className)&&t.node.removeChild(o);Un(e,t,n)}function Hn(e,t,n,i){var o=Pn(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),jn(e,t),Vn(e,t,n,i),Un(e,t,i),t.node}function Un(e,t,n){if(Wn(e,t.line,t,n,!0),t.rest)for(var i=0;i<t.rest.length;i++)Wn(e,t.rest[i],t,n,!1)}function Wn(e,t,n,i,o){if(t.widgets)for(var r=Ln(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=O("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Yn(s,c,n,i),e.display.input.setUneditable(c),o&&s.above?r.insertBefore(c,n.gutter||n.text):r.appendChild(c),Dn(s,"redraw")}}function Yn(e,t,n,i){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(o-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function Gn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!D(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),R(t.display.measure,O("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function $n(e,t){for(var n=Re(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function qn(e){return e.lineSpace.offsetTop}function Qn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Kn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=R(e.measure,O("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(i.left)&&!isNaN(i.right)&&(e.cachedPaddingH=i),i}function Xn(e){return W-e.display.nativeBarWidth}function Jn(e){return e.display.scroller.clientWidth-Xn(e)-e.display.barWidth}function Zn(e){return e.display.scroller.clientHeight-Xn(e)-e.display.barHeight}function ei(e,t,n){var i=e.options.lineWrapping,o=i&&Jn(e);if(!t.measure.heights||i&&t.measure.width!=o){var r=t.measure.heights=[];if(i){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&r.push((s.bottom+c.top)/2-n.top)}}r.push(n.bottom-n.top)}}function ti(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var o=0;o<e.rest.length;o++)if(ot(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function ni(e,t){var n=ot(t=tn(t)),i=e.display.externalMeasured=new Cn(e.doc,t,n);i.lineN=n;var o=i.built=_n(e,i);return i.text=o.pre,R(e.display.lineMeasure,o.pre),i}function ii(e,t,n,i){return ai(e,ri(e,t),n,i)}function oi(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ji(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function ri(e,t){var n=ot(t),i=oi(e,n);i&&!i.text?i=null:i&&i.changes&&(In(e,i,n,Ii(e)),e.curOp.forceUpdate=!0),i||(i=ni(e,t));var o=ti(i,t,n);return{line:t,view:i,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function ai(e,t,n,i,o){t.before&&(n=-1);var r,a=n+(i||"");return t.cache.hasOwnProperty(a)?r=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(ei(e,t.view,t.rect),t.hasHeights=!0),(r=di(e,t,n,i)).bogus||(t.cache[a]=r)),{left:r.left,right:r.right,top:o?r.rtop:r.top,bottom:o?r.rbottom:r.bottom}}var li,si={left:0,right:0,top:0,bottom:0};function ci(e,t,n){for(var i,o,r,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(o=0,r=1,a="left"):t<s?r=1+(o=t-l):(c==e.length-3||t==s&&e[c+3]>t)&&(o=(r=s-l)-1,t>=s&&(a="right")),null!=o){if(i=e[c+2],l==s&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)i=e[2+(c-=3)],a="left";if("right"==n&&o==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)i=e[(c+=3)+2],a="right";break}return{node:i,start:o,end:r,collapse:a,coverStart:l,coverEnd:s}}function ui(e,t){var n=si;if("left"==t)for(var i=0;i<e.length&&(n=e[i]).left==n.right;i++);else for(var o=e.length-1;o>=0&&(n=e[o]).left==n.right;o--);return n}function di(e,t,n,i){var o,r=ci(t.map,n,i),s=r.node,c=r.start,u=r.end,d=r.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){for(;c&&se(t.line.text.charAt(r.coverStart+c));)--c;for(;r.coverStart+u<r.coverEnd&&se(t.line.text.charAt(r.coverStart+u));)++u;if((o=a&&l<9&&0==c&&u==r.coverEnd-r.coverStart?s.parentNode.getBoundingClientRect():ui(S(s,c,u).getClientRects(),i)).left||o.right||0==c)break;u=c,c-=1,d="right"}a&&l<11&&(o=fi(e.display.measure,o))}else{var p;c>0&&(d=i="right"),o=e.options.lineWrapping&&(p=s.getClientRects()).length>1?p["right"==i?p.length-1:0]:s.getBoundingClientRect()}if(a&&l<9&&!c&&(!o||!o.left&&!o.right)){var h=s.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+Ni(e.display),top:h.top,bottom:h.bottom}:si}for(var m=o.top-t.rect.top,g=o.bottom-t.rect.top,v=(m+g)/2,_=t.view.measure.heights,b=0;b<_.length-1&&!(v<_[b]);b++);var y=b?_[b-1]:0,x=_[b],w={left:("right"==d?o.right:o.left)-t.rect.left,right:("left"==d?o.left:o.right)-t.rect.left,top:y,bottom:x};return!o.left&&!o.right&&(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=g),w}function fi(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!ze(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*i,bottom:t.bottom*i}}function pi(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function hi(e){e.display.externalMeasure=null,T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)pi(e.display.view[t])}function mi(e){hi(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function gi(e){return u&&v?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function vi(e){return u&&v?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function _i(e){var t=tn(e).widgets,n=0;if(t)for(var i=0;i<t.length;++i)t[i].above&&(n+=Gn(t[i]));return n}function bi(e,t,n,i,o){if(!o){var r=_i(t);n.top+=r,n.bottom+=r}if("line"==i)return n;i||(i="local");var a=cn(t);if("local"==i?a+=qn(e.display):a-=e.display.viewOffset,"page"==i||"window"==i){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==i?0:vi(P(e)));var s=l.left+("window"==i?0:gi(P(e)));n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function yi(e,t,n){if("div"==n)return t;var i=t.left,o=t.top;if("page"==n)i-=gi(P(e)),o-=vi(P(e));else if("local"==n||!n){var r=e.display.sizer.getBoundingClientRect();i+=r.left,o+=r.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:i-a.left,top:o-a.top}}function xi(e,t,n,i,o){return i||(i=et(e.doc,t.line)),bi(e,i,ii(e,i,t.ch,o),n)}function wi(e,t,n,i,o,r){function a(t,a){var l=ai(e,o,t,a?"right":"left",r);return a?l.left=l.right:l.right=l.left,bi(e,i,l,n)}i=i||et(e.doc,t.line),o||(o=ri(e,i));var l=me(i,e.doc.direction),s=t.ch,c=t.sticky;if(s>=i.text.length?(s=i.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return a("before"==c?s-1:s,"before"==c);function u(e,t,n){return a(n?e-1:e,1==l[t].level!=n)}var d=pe(l,s,c),f=fe,p=u(s,d,"before"==c);return null!=f&&(p.other=u(s,f,"before"!=c)),p}function Ai(e,t){var n=0;t=mt(e.doc,t),e.options.lineWrapping||(n=Ni(e.display)*t.ch);var i=et(e.doc,t.line),o=cn(i)+qn(e.display);return{left:n,right:n,top:o,bottom:o+i.height}}function ki(e,t,n,i,o){var r=st(e,t,n);return r.xRel=o,i&&(r.outside=i),r}function Ci(e,t,n){var i=e.doc;if((n+=e.display.viewOffset)<0)return ki(i.first,0,null,-1,-1);var o=rt(i,n),r=i.first+i.size-1;if(o>r)return ki(i.first+i.size-1,et(i,r).text.length,null,1,1);t<0&&(t=0);for(var a=et(i,o);;){var l=Ri(e,a,o,t,n),s=Zt(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==o)return c;a=et(i,o=c.line)}}function Si(e,t,n,i){i-=_i(t);var o=t.text.length,r=ue(function(t){return ai(e,n,t-1).bottom<=i},o,0);return{begin:r,end:o=ue(function(t){return ai(e,n,t).top>i},r,o)}}function Ei(e,t,n,i){return n||(n=ri(e,t)),Si(e,t,n,bi(e,t,ai(e,n,i),"line").top)}function Ti(e,t,n,i){return!(e.bottom<=n)&&(e.top>n||(i?e.left:e.right)>t)}function Ri(e,t,n,i,o){o-=cn(t);var r=ri(e,t),a=_i(t),l=0,s=t.text.length,c=!0,u=me(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Mi:Oi)(e,t,n,r,u,i,o);l=(c=1!=d.level)?d.from:d.to-1,s=c?d.to:d.from-1}var f,p,h=null,m=null,g=ue(function(t){var n=ai(e,r,t);return n.top+=a,n.bottom+=a,!!Ti(n,i,o,!1)&&(n.top<=o&&n.left<=i&&(h=t,m=n),!0)},l,s),v=!1;if(m){var _=i-m.left<m.right-i,b=_==c;g=h+(b?0:1),p=b?"after":"before",f=_?m.left:m.right}else{!c&&(g==s||g==l)&&g++,p=0==g?"after":g==t.text.length?"before":ai(e,r,g-(c?1:0)).bottom+a<=o==c?"after":"before";var y=wi(e,st(n,g,p),"line",t,r);f=y.left,v=o<y.top?-1:o>=y.bottom?1:0}return ki(n,g=ce(t.text,g,1),p,v,i-f)}function Oi(e,t,n,i,o,r,a){var l=ue(function(l){var s=o[l],c=1!=s.level;return Ti(wi(e,st(n,c?s.to:s.from,c?"before":"after"),"line",t,i),r,a,!0)},0,o.length-1),s=o[l];if(l>0){var c=1!=s.level,u=wi(e,st(n,c?s.from:s.to,c?"after":"before"),"line",t,i);Ti(u,r,a,!0)&&u.top>a&&(s=o[l-1])}return s}function Mi(e,t,n,i,o,r,a){var l=Si(e,t,i,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<o.length;f++){var p=o[f];if(!(p.from>=c||p.to<=s)){var h=ai(e,i,1!=p.level?Math.min(c,p.to)-1:Math.max(s,p.from)).right,m=h<r?r-h+1e9:h-r;(!u||d>m)&&(u=p,d=m)}}return u||(u=o[o.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function Di(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==li){li=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)li.appendChild(document.createTextNode("x")),li.appendChild(O("br"));li.appendChild(document.createTextNode("x"))}R(e.measure,li);var n=li.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function Ni(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");R(e.measure,n);var i=t.getBoundingClientRect(),o=(i.right-i.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function Ii(e){for(var t=e.display,n={},i={},o=t.gutters.clientLeft,r=t.gutters.firstChild,a=0;r;r=r.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=r.offsetLeft+r.clientLeft+o,i[l]=r.clientWidth}return{fixedPos:Li(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function Li(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Fi(e){var t=Di(e.display),n=e.options.lineWrapping,i=n&&Math.max(5,e.display.scroller.clientWidth/Ni(e.display)-3);return function(o){if(ln(e.doc,o))return 0;var r=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(r+=o.widgets[a].height);return n?r+(Math.ceil(o.text.length/i)||1)*t:r+t}}function Pi(e){var t=e.doc,n=Fi(e);t.iter(function(e){var t=n(e);t!=e.height&&it(e,t)})}function Bi(e,t,n,i){var o=e.display;if(!n&&"true"==Re(t).getAttribute("cm-not-content"))return null;var r,a,l=o.lineSpace.getBoundingClientRect();try{r=t.clientX-l.left,a=t.clientY-l.top}catch(d){return null}var s,c=Ci(e,r,a);if(i&&c.xRel>0&&(s=et(e.doc,c.line).text).length==c.ch){var u=z(s,s.length,e.options.tabSize)-s.length;c=st(c.line,Math.max(0,Math.round((r-Kn(e.display).left)/Ni(e.display))-u))}return c}function ji(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,i=0;i<n.length;i++)if((t-=n[i].size)<0)return i}function Vi(e,t,n,i){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),i||(i=0);var o=e.display;if(i&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Nt&&rn(e.doc,t)<o.viewTo&&Hi(e);else if(n<=o.viewFrom)Nt&&an(e.doc,n+i)>o.viewFrom?Hi(e):(o.viewFrom+=i,o.viewTo+=i);else if(t<=o.viewFrom&&n>=o.viewTo)Hi(e);else if(t<=o.viewFrom){var r=Ui(e,n,n+i,1);r?(o.view=o.view.slice(r.index),o.viewFrom=r.lineN,o.viewTo+=i):Hi(e)}else if(n>=o.viewTo){var a=Ui(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):Hi(e)}else{var l=Ui(e,t,t,-1),s=Ui(e,n,n+i,1);l&&s?(o.view=o.view.slice(0,l.index).concat(Sn(e,l.lineN,s.lineN)).concat(o.view.slice(s.index)),o.viewTo+=i):Hi(e)}var c=o.externalMeasured;c&&(n<c.lineN?c.lineN+=i:t<c.lineN+c.size&&(o.externalMeasured=null))}function zi(e,t,n){e.curOp.viewChanged=!0;var i=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(i.externalMeasured=null),!(t<i.viewFrom||t>=i.viewTo)){var r=i.view[ji(e,t)];if(null!=r.node){var a=r.changes||(r.changes=[]);-1==U(a,n)&&a.push(n)}}}function Hi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ui(e,t,n,i){var o,r=ji(e,t),a=e.display.view;if(!Nt||n==e.doc.first+e.doc.size)return{index:r,lineN:n};for(var l=e.display.viewFrom,s=0;s<r;s++)l+=a[s].size;if(l!=t){if(i>0){if(r==a.length-1)return null;o=l+a[r].size-t,r++}else o=l-t;t+=o,n+=o}for(;rn(e.doc,n)!=n;){if(r==(i<0?0:a.length-1))return null;n+=i*a[r-(i<0?1:0)].size,r+=i}return{index:r,lineN:n}}function Wi(e,t,n){var i=e.display;0==i.view.length||t>=i.viewTo||n<=i.viewFrom?(i.view=Sn(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=Sn(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(ji(e,t))),i.viewFrom=t,i.viewTo<n?i.view=i.view.concat(Sn(e,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,ji(e,n)))),i.viewTo=n}function Yi(e){for(var t=e.display.view,n=0,i=0;i<t.length;i++){var o=t[i];!o.hidden&&(!o.node||o.changes)&&++n}return n}function Gi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function $i(e,t){void 0===t&&(t=!0);var n=e.doc,i={},o=i.cursors=document.createDocumentFragment(),r=i.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var l=0;l<n.sel.ranges.length;l++)if(t||l!=n.sel.primIndex){var s=n.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var c=s.empty();if(a){var u=a(e,s);u&&qi(e,u,o)}else(c||e.options.showCursorWhenSelecting)&&qi(e,s.head,o);c||Ki(e,s,r)}}return i}function qi(e,t,n){var i=wi(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(O("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var r=xi(e,t,"div",null,null),a=r.right-r.left;o.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(i.other){var l=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=i.other.left+"px",l.style.top=i.other.top+"px",l.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Qi(e,t){return e.top-t.top||e.left-t.left}function Ki(e,t,n){var i=e.display,o=e.doc,r=document.createDocumentFragment(),a=Kn(e.display),l=a.left,s=Math.max(i.sizerWidth,Jn(e)-i.sizer.offsetLeft)-a.right,c="ltr"==o.direction;function u(e,t,n,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),r.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(i-t)+"px"))}function d(t,n,i){var r,a,d=et(o,t),f=d.text.length;function p(n,i){return xi(e,st(t,n),"div",d,i)}function h(t,n,i){var o=Ei(e,d,null,t),r="ltr"==n==("after"==i)?"left":"right";return p("after"==i?o.begin:o.end-(/\s/.test(d.text.charAt(o.end-1))?2:1),r)[r]}var m=me(d,o.direction);return de(m,n||0,null==i?f:i,function(e,t,o,d){var g="ltr"==o,v=p(e,g?"left":"right"),_=p(t-1,g?"right":"left"),b=null==n&&0==e,y=null==i&&t==f,x=0==d,w=!m||d==m.length-1;if(_.top-v.top<=3){var A=(c?y:b)&&w,k=(c?b:y)&&x?l:(g?v:_).left,C=A?s:(g?_:v).right;u(k,v.top,C-k,v.bottom)}else{var S,E,T,R;g?(S=c&&b&&x?l:v.left,E=c?s:h(e,o,"before"),T=c?l:h(t,o,"after"),R=c&&y&&w?s:_.right):(S=c?h(e,o,"before"):l,E=!c&&b&&x?s:v.right,T=!c&&y&&w?l:_.left,R=c?h(t,o,"after"):s),u(S,v.top,E-S,v.bottom),v.bottom<_.top&&u(l,v.bottom,null,_.top),u(T,_.top,R-T,_.bottom)}(!r||Qi(v,r)<0)&&(r=v),Qi(_,r)<0&&(r=_),(!a||Qi(v,a)<0)&&(a=v),Qi(_,a)<0&&(a=_)}),{start:r,end:a}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var h=et(o,f.line),m=et(o,p.line),g=tn(h)==tn(m),v=d(f.line,f.ch,g?h.text.length+1:null).end,_=d(p.line,g?0:null,p.ch).start;g&&(v.top<_.top-2?(u(v.right,v.top,null,v.bottom),u(l,_.top,_.left,_.bottom)):u(v.right,v.top,_.left-v.right,v.bottom)),v.bottom<_.top&&u(l,v.bottom,null,_.top)}n.appendChild(r)}function Xi(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||to(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ji(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||eo(e))}function Zi(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&to(e))},100)}function eo(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ye(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),s&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Xi(e))}function to(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function no(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,r=0,s=0;s<t.view.length;s++){var c=t.view[s],u=e.options.lineWrapping,d=void 0,f=0;if(!c.hidden){if(o+=c.line.height,a&&l<8){var p=c.node.offsetTop+c.node.offsetHeight;d=p-n,n=p}else{var h=c.node.getBoundingClientRect();d=h.bottom-h.top,!u&&c.text.firstChild&&(f=c.text.firstChild.getBoundingClientRect().right-h.left-1)}var m=c.line.height-d;if((m>.005||m<-.005)&&(o<i&&(r-=m),it(c.line,d),io(c.line),c.rest))for(var g=0;g<c.rest.length;g++)io(c.rest[g]);if(f>e.display.sizerWidth){var v=Math.ceil(f/Ni(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(r)>2&&(t.scroller.scrollTop+=r)}function io(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],i=n.node.parentNode;i&&(n.height=i.offsetHeight)}}function oo(e,t,n){var i=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;i=Math.floor(i-qn(e));var o=n&&null!=n.bottom?n.bottom:i+e.wrapper.clientHeight,r=rt(t,i),a=rt(t,o);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<r?(r=l,a=rt(t,cn(et(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(r=rt(t,cn(et(t,s))-e.wrapper.clientHeight),a=s)}return{from:r,to:Math.max(a,r+1)}}function ro(e,t){if(!xe(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),o=null,r=n.wrapper.ownerDocument;if(t.top+i.top<0?o=!0:t.bottom+i.top>(r.defaultView.innerHeight||r.documentElement.clientHeight)&&(o=!1),null!=o&&!m){var a=O("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-qn(e.display))+"px;\n height: "+(t.bottom-t.top+Xn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function ao(e,t,n,i){var o;null==i&&(i=0),!e.options.lineWrapping&&t==n&&(n="before"==t.sticky?st(t.line,t.ch+1,"before"):t,t=t.ch?st(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var r=0;r<5;r++){var a=!1,l=wi(e,t),s=n&&n!=t?wi(e,n):l,c=so(e,o={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-i,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+i}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(go(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(_o(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}function lo(e,t){var n=so(e,t);null!=n.scrollTop&&go(e,n.scrollTop),null!=n.scrollLeft&&_o(e,n.scrollLeft)}function so(e,t){var n=e.display,i=Di(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,r=Zn(e),a={};t.bottom-t.top>r&&(t.bottom=t.top+r);var l=e.doc.height+Qn(n),s=t.top<i,c=t.bottom>l-i;if(t.top<o)a.scrollTop=s?0:t.top;else if(t.bottom>o+r){var u=Math.min(t.top,(c?l:t.bottom)-r);u!=o&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Jn(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left+d-(h?0:10)):t.right>p+f-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function co(e,t){null!=t&&(ho(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function uo(e){ho(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fo(e,t,n){(null!=t||null!=n)&&ho(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function po(e,t){ho(e),e.curOp.scrollToPos=t}function ho(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,mo(e,Ai(e,t.from),Ai(e,t.to),t.margin))}function mo(e,t,n,i){var o=so(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-i,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+i});fo(e,o.scrollLeft,o.scrollTop)}function go(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||$o(e,{top:t}),vo(e,t,!0),n&&$o(e),jo(e,100))}function vo(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function _o(e,t,n,i){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(!(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||i)&&(e.doc.scrollLeft=t,Xo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function bo(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+Qn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Xn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var yo=function(e,t,n){this.cm=n;var i=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=o.tabIndex=-1,e(i),e(o),ve(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),ve(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yo.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var o=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var r=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+r)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:t?i:0}},yo.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yo.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yo.prototype.zeroWidthHack=function(){var e=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new H,this.disableVert=new H},yo.prototype.enableZeroWidthBar=function(e,t,n){function i(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,i)}e.style.visibility="",t.set(1e3,i)},yo.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xo=function(){};function wo(e,t){t||(t=bo(e));var n=e.display.barWidth,i=e.display.barHeight;Ao(e,t);for(var o=0;o<4&&n!=e.display.barWidth||i!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&no(e),Ao(e,bo(e)),n=e.display.barWidth,i=e.display.barHeight}function Ao(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}xo.prototype.update=function(){return{bottom:0,right:0}},xo.prototype.setScrollLeft=function(){},xo.prototype.setScrollTop=function(){},xo.prototype.clear=function(){};var ko={native:yo,null:xo};function Co(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ko[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ve(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?_o(e,t):go(e,t)},e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var So=0;function Eo(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++So,markArrays:null},Tn(e.curOp)}function To(e){var t=e.curOp;t&&On(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Ro(e)})}function Ro(e){for(var t=e.ops,n=0;n<t.length;n++)Oo(t[n]);for(var i=0;i<t.length;i++)Mo(t[i]);for(var o=0;o<t.length;o++)Do(t[o]);for(var r=0;r<t.length;r++)No(t[r]);for(var a=0;a<t.length;a++)Io(t[a])}function Oo(e){var t=e.cm,n=t.display;Ho(t),e.updateMaxLine&&dn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new zo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mo(e){e.updatedDisplay=e.mustUpdate&&Yo(e.cm,e.update)}function Do(e){var t=e.cm,n=t.display;e.updatedDisplay&&no(t),e.barMeasure=bo(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ii(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Xn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Jn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function No(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&_o(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==N(P(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&wo(t,e.barMeasure),e.updatedDisplay&&Ko(t,e.barMeasure),e.selectionChanged&&Xi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Ji(e.cm)}function Io(e){var t=e.cm,n=t.display,i=t.doc;e.updatedDisplay&&Go(t,e.update),null!=n.wheelStartX&&(null!=e.scrollTop||null!=e.scrollLeft||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&vo(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&_o(t,e.scrollLeft,!0,!0),e.scrollToPos&&ro(t,ao(t,mt(i,e.scrollToPos.from),mt(i,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,r=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||ye(o[a],"hide");if(r)for(var l=0;l<r.length;++l)r[l].lines.length&&ye(r[l],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Lo(e,t){if(e.curOp)return t();Eo(e);try{return t()}finally{To(e)}}function Fo(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Eo(e);try{return t.apply(e,arguments)}finally{To(e)}}}function Po(e){return function(){if(this.curOp)return e.apply(this,arguments);Eo(this);try{return e.apply(this,arguments)}finally{To(this)}}}function Bo(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Eo(t);try{return e.apply(this,arguments)}finally{To(t)}}}function jo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,j(Vo,e))}function Vo(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,i=wt(e,t.highlightFrontier),o=[];t.iter(i.line,Math.min(t.first+t.size,e.display.viewTo+500),function(r){if(i.line>=e.display.viewFrom){var a=r.styles,l=r.text.length>e.options.maxHighlightLength?Ke(t.mode,i.state):null,s=yt(e,r,i,!0);l&&(i.state=l),r.styles=s.styles;var c=r.styleClasses,u=s.classes;u?r.styleClasses=u:c&&(r.styleClasses=null);for(var d=!a||a.length!=r.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=r.styles[f];d&&o.push(i.line),r.stateAfter=i.save(),i.nextLine()}else r.text.length<=e.options.maxHighlightLength&&At(e,r.text,i),r.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>n)return jo(e,e.options.workDelay),!0}),t.highlightFrontier=i.line,t.modeFrontier=Math.max(t.modeFrontier,i.line),o.length&&Lo(e,function(){for(var t=0;t<o.length;t++)zi(e,o[t],"text")})}}var zo=function(e,t,n){var i=e.display;this.viewport=t,this.visible=oo(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Jn(e),this.force=n,this.dims=Ii(e),this.events=[]};function Ho(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Xn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Xn(e)+"px",t.scrollbarsClipped=!0)}function Uo(e){if(e.hasFocus())return null;var t=N(P(e));if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var i=B(e).getSelection();i.anchorNode&&i.extend&&D(e.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}function Wo(e){if(e&&e.activeElt&&e.activeElt!=N(e.activeElt.ownerDocument)&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),i=t.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),n.removeAllRanges(),n.addRange(i),n.extend(e.focusNode,e.focusOffset)}}function Yo(e,t){var n=e.display,i=e.doc;if(t.editorIsHidden)return Hi(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Yi(e))return!1;Jo(e)&&(Hi(e),t.dims=Ii(e));var o=i.first+i.size,r=Math.max(t.visible.from-e.options.viewportMargin,i.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFrom<r&&r-n.viewFrom<20&&(r=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Nt&&(r=rn(e.doc,r),a=an(e.doc,a));var l=r!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Wi(e,r,a),n.viewOffset=cn(et(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=Yi(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Uo(e);return s>4&&(n.lineDiv.style.display="none"),qo(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Wo(c),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,jo(e,400)),n.updateLineNumbers=null,!0}function Go(e,t){for(var n=t.viewport,i=!0;;i=!1){if(i&&e.options.lineWrapping&&t.oldDisplayWidth!=Jn(e))i&&(t.visible=oo(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Qn(e.display)-Zn(e),n.top)}),t.visible=oo(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Yo(e,t))break;no(e);var o=bo(e);Gi(e),wo(e,o),Ko(e,o),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function $o(e,t){var n=new zo(e,t);if(Yo(e,n)){no(e),Go(e,n);var i=bo(e);Gi(e),wo(e,i),Ko(e,i),n.finish()}}function qo(e,t,n){var i=e.display,o=e.options.lineNumbers,r=i.lineDiv,a=r.firstChild;function l(t){var n=t.nextSibling;return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=i.view,u=i.viewFrom,d=0;d<c.length;d++){var f=c[d];if(!f.hidden)if(f.node&&f.node.parentNode==r){for(;a!=f.node;)a=l(a);var p=o&&null!=t&&t<=u&&f.lineNumber;f.changes&&(U(f.changes,"gutter")>-1&&(p=!1),In(e,f,u,n)),p&&(T(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(lt(e.options,u)))),a=f.node.nextSibling}else{var h=Hn(e,f,u,n);r.insertBefore(h,a)}u+=f.size}for(;a;)a=l(a)}function Qo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Dn(e,"gutterChanged",e)}function Ko(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Xn(e)+"px"}function Xo(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=Li(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,r=i+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=r),n[a].gutterBackground&&(n[a].gutterBackground.style.left=r));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=r}e.options.fixedGutter&&(t.gutters.style.left=i+o+"px")}}function Jo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=lt(e.options,t.first+t.size-1),i=e.display;if(n.length!=i.lineNumChars){var o=i.measure.appendChild(O("div",[O("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),r=o.firstChild.offsetWidth,a=o.offsetWidth-r;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(r,i.lineGutter.offsetWidth-a)+1,i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Qo(e.display),!0}return!1}function Zo(e,t){for(var n=[],i=!1,o=0;o<e.length;o++){var r=e[o],a=null;if("string"!=typeof r&&(a=r.style,r=r.className),"CodeMirror-linenumbers"==r){if(!t)continue;i=!0}n.push({className:r,style:a})}return t&&!i&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function er(e){var t=e.gutters,n=e.gutterSpecs;T(t),e.lineGutter=null;for(var i=0;i<n.length;++i){var o=n[i],r=o.className,a=o.style,l=t.appendChild(O("div",null,"CodeMirror-gutter "+r));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==r&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Qo(e)}function tr(e){er(e.display),Vi(e),Xo(e)}function nr(e,t,i,o){var r=this;this.input=i,r.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=M("div",null,"CodeMirror-code"),r.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=O("div",null,"CodeMirror-cursors"),r.measure=O("div",null,"CodeMirror-measure"),r.lineMeasure=O("div",null,"CodeMirror-measure"),r.lineSpace=M("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var c=M("div",[r.lineSpace],"CodeMirror-lines");r.mover=O("div",[c],null,"position: relative"),r.sizer=O("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=O("div",null,null,"position: absolute; height: "+W+"px; width: 1px;"),r.gutters=O("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=O("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=O("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),r.wrapper.setAttribute("translate","no"),a&&l<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),!s&&!(n&&_)&&(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,r.gutterSpecs=Zo(o.gutters,o.lineNumbers),er(r),i.init(r)}zo.prototype.signal=function(e,t){Ae(e,t)&&this.events.push(arguments)},zo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};var ir=0,or=null;function rr(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function ar(e){var t=rr(e);return t.x*=or,t.y*=or,t}function lr(e,t){u&&102==d&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var i=rr(t),o=i.x,r=i.y,a=or;0===t.deltaMode&&(o=t.deltaX,r=t.deltaY,a=1);var l=e.display,c=l.scroller,p=c.scrollWidth>c.clientWidth,h=c.scrollHeight>c.clientHeight;if(o&&p||r&&h){if(r&&b&&s)e:for(var m=t.target,g=l.view;m!=c;m=m.parentNode)for(var v=0;v<g.length;v++)if(g[v].node==m){e.display.currentWheelTarget=m;break e}if(o&&!n&&!f&&null!=a)return r&&h&&go(e,Math.max(0,c.scrollTop+r*a)),_o(e,Math.max(0,c.scrollLeft+o*a)),(!r||r&&h)&&Ce(t),void(l.wheelStartX=null);if(r&&null!=a){var _=r*a,y=e.doc.scrollTop,x=y+l.wrapper.clientHeight;_<0?y=Math.max(0,y+_-50):x=Math.min(e.doc.height,x+_+50),$o(e,{top:y,bottom:x})}ir<20&&0!==t.deltaMode&&(null==l.wheelStartX?(l.wheelStartX=c.scrollLeft,l.wheelStartY=c.scrollTop,l.wheelDX=o,l.wheelDY=r,setTimeout(function(){if(null!=l.wheelStartX){var e=c.scrollLeft-l.wheelStartX,t=c.scrollTop-l.wheelStartY,n=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,n&&(or=(or*ir+n)/(ir+1),++ir)}},200)):(l.wheelDX+=o,l.wheelDY+=r))}}a?or=-.53:n?or=15:u?or=-.7:p&&(or=-1/3);var sr=function(e,t){this.ranges=e,this.primIndex=t};sr.prototype.primary=function(){return this.ranges[this.primIndex]},sr.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],i=e.ranges[t];if(!ut(n.anchor,i.anchor)||!ut(n.head,i.head))return!1}return!0},sr.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new cr(dt(this.ranges[t].anchor),dt(this.ranges[t].head));return new sr(e,this.primIndex)},sr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},sr.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(ct(t,i.from())>=0&&ct(e,i.to())<=0)return n}return-1};var cr=function(e,t){this.anchor=e,this.head=t};function ur(e,t,n){var i=e&&e.options.selectionsMayTouch,o=t[n];t.sort(function(e,t){return ct(e.from(),t.from())}),n=U(t,o);for(var r=1;r<t.length;r++){var a=t[r],l=t[r-1],s=ct(l.to(),a.from());if(i&&!a.empty()?s>0:s>=0){var c=pt(l.from(),a.from()),u=ft(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;r<=n&&--n,t.splice(--r,2,new cr(d?u:c,d?c:u))}}return new sr(t,n)}function dr(e,t){return new sr([new cr(e,t||e)],0)}function fr(e){return e.text?st(e.from.line+e.text.length-1,J(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function pr(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return fr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=fr(t).ch-t.to.ch),st(n,i)}function hr(e,t){for(var n=[],i=0;i<e.sel.ranges.length;i++){var o=e.sel.ranges[i];n.push(new cr(pr(o.anchor,t),pr(o.head,t)))}return ur(e.cm,n,e.sel.primIndex)}function mr(e,t,n){return e.line==t.line?st(n.line,e.ch-t.ch+n.ch):st(n.line+(e.line-t.line),e.ch)}function gr(e,t,n){for(var i=[],o=st(e.first,0),r=o,a=0;a<t.length;a++){var l=t[a],s=mr(l.from,o,r),c=mr(fr(l),o,r);if(o=l.to,r=c,"around"==n){var u=e.sel.ranges[a],d=ct(u.head,u.anchor)<0;i[a]=new cr(d?c:s,d?s:c)}else i[a]=new cr(s,s)}return new sr(i,e.sel.primIndex)}function vr(e){e.doc.mode=$e(e.options,e.doc.modeOption),_r(e)}function _r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,jo(e,100),e.state.modeGen++,e.curOp&&Vi(e)}function br(e,t){return 0==t.from.ch&&0==t.to.ch&&""==J(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function yr(e,t,n,i){function o(e){return n?n[e]:null}function r(e,n,o){pn(e,n,o,i),Dn(e,"change",e,t)}function a(e,t){for(var n=[],r=e;r<t;++r)n.push(new fn(c[r],o(r),i));return n}var l=t.from,s=t.to,c=t.text,u=et(e,l.line),d=et(e,s.line),f=J(c),p=o(c.length-1),h=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(br(e,t)){var m=a(0,c.length-1);r(d,d.text,p),h&&e.remove(l.line,h),m.length&&e.insert(l.line,m)}else if(u==d)if(1==c.length)r(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),p);else{var g=a(1,c.length-1);g.push(new fn(f+u.text.slice(s.ch),p,i)),r(u,u.text.slice(0,l.ch)+c[0],o(0)),e.insert(l.line+1,g)}else if(1==c.length)r(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),o(0)),e.remove(l.line+1,h);else{r(u,u.text.slice(0,l.ch)+c[0],o(0)),r(d,f+d.text.slice(s.ch),p);var v=a(1,c.length-1);h>1&&e.remove(l.line+1,h-1),e.insert(l.line+1,v)}Dn(e,"change",e,t)}function xr(e,t,n){function i(e,o,r){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=o){var s=r&&l.sharedHist;n&&!s||(t(l.doc,s),i(l.doc,e,s))}}}i(e,null,!0)}function wr(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Pi(e),vr(e),Ar(e),e.options.direction=t.direction,e.options.lineWrapping||dn(e),e.options.mode=t.modeOption,Vi(e)}function Ar(e){("rtl"==e.doc.direction?I:E)(e.display.lineDiv,"CodeMirror-rtl")}function kr(e){Lo(e,function(){Ar(e),Vi(e)})}function Cr(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Sr(e,t){var n={from:dt(t.from),to:fr(t),text:tt(e,t.from,t.to)};return Nr(e,n,t.from.line,t.to.line+1),xr(e,function(e){return Nr(e,n,t.from.line,t.to.line+1)},!0),n}function Er(e){for(;e.length&&J(e).ranges;)e.pop()}function Tr(e,t){return t?(Er(e.done),J(e.done)):e.done.length&&!J(e.done).ranges?J(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),J(e.done)):void 0}function Rr(e,t,n,i){var o=e.history;o.undone.length=0;var r,a,l=+new Date;if((o.lastOp==i||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(r=Tr(o,o.lastOp==i)))a=J(r.changes),0==ct(t.from,t.to)&&0==ct(t.from,a.to)?a.to=fr(t):r.changes.push(Sr(e,t));else{var s=J(o.done);for((!s||!s.ranges)&&Dr(e.sel,o.done),r={changes:[Sr(e,t)],generation:o.generation},o.done.push(r);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=l,o.lastOp=o.lastSelOp=i,o.lastOrigin=o.lastSelOrigin=t.origin,a||ye(e,"historyAdded")}function Or(e,t,n,i){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Mr(e,t,n,i){var o=e.history,r=i&&i.origin;n==o.lastSelOp||r&&o.lastSelOrigin==r&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==r||Or(e,r,J(o.done),t))?o.done[o.done.length-1]=t:Dr(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=r,o.lastSelOp=n,i&&!1!==i.clearRedo&&Er(o.undone)}function Dr(e,t){var n=J(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Nr(e,t,n,i){var o=t["spans_"+e.id],r=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[r]=n.markedSpans),++r})}function Ir(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Lr(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var i=[],o=0;o<t.text.length;++o)i.push(Ir(n[o]));return i}function Fr(e,t){var n=Lr(e,t),i=Ht(e,t);if(!n)return i;if(!i)return n;for(var o=0;o<n.length;++o){var r=n[o],a=i[o];if(r&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<r.length;++c)if(r[c].marker==s.marker)continue e;r.push(s)}else a&&(n[o]=a)}return n}function Pr(e,t,n){for(var i=[],o=0;o<e.length;++o){var r=e[o];if(r.ranges)i.push(n?sr.prototype.deepCopy.call(r):r);else{var a=r.changes,l=[];i.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&U(t,Number(u[1]))>-1&&(J(l)[d]=c[d],delete c[d])}}}return i}function Br(e,t,n,i){if(i){var o=e.anchor;if(n){var r=ct(t,o)<0;r!=ct(n,o)<0?(o=t,t=n):r!=ct(t,n)<0&&(t=n)}return new cr(o,t)}return new cr(n||t,t)}function jr(e,t,n,i,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Yr(e,new sr([Br(e.sel.primary(),t,n,o)],0),i)}function Vr(e,t,n){for(var i=[],o=e.cm&&(e.cm.display.shift||e.extend),r=0;r<e.sel.ranges.length;r++)i[r]=Br(e.sel.ranges[r],t[r],null,o);Yr(e,ur(e.cm,i,e.sel.primIndex),n)}function zr(e,t,n,i){var o=e.sel.ranges.slice(0);o[t]=n,Yr(e,ur(e.cm,o,e.sel.primIndex),i)}function Hr(e,t,n,i){Yr(e,dr(t,n),i)}function Ur(e,t,n){var i={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new cr(mt(e,t[n].anchor),mt(e,t[n].head))},origin:n&&n.origin};return ye(e,"beforeSelectionChange",e,i),e.cm&&ye(e.cm,"beforeSelectionChange",e.cm,i),i.ranges!=t.ranges?ur(e.cm,i.ranges,i.ranges.length-1):t}function Wr(e,t,n){var i=e.history.done,o=J(i);o&&o.ranges?(i[i.length-1]=t,Gr(e,t,n)):Yr(e,t,n)}function Yr(e,t,n){Gr(e,t,n),Mr(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Gr(e,t,n){(Ae(e,"beforeSelectionChange")||e.cm&&Ae(e.cm,"beforeSelectionChange"))&&(t=Ur(e,t,n));var i=n&&n.bias||(ct(t.primary().head,e.sel.primary().head)<0?-1:1);$r(e,Qr(e,t,i,!0)),(!n||!1!==n.scroll)&&e.cm&&"nocursor"!=e.cm.getOption("readOnly")&&uo(e.cm)}function $r(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,we(e.cm)),Dn(e,"cursorActivity",e))}function qr(e){$r(e,Qr(e,e.sel,null,!1))}function Qr(e,t,n,i){for(var o,r=0;r<t.ranges.length;r++){var a=t.ranges[r],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[r],s=Xr(e,a.anchor,l&&l.anchor,n,i),c=a.head==a.anchor?s:Xr(e,a.head,l&&l.head,n,i);(o||s!=a.anchor||c!=a.head)&&(o||(o=t.ranges.slice(0,r)),o[r]=new cr(s,c))}return o?ur(e.cm,o,t.primIndex):t}function Kr(e,t,n,i,o){var r=et(e,t.line);if(r.markedSpans)for(var a=0;a<r.markedSpans.length;++a){var l=r.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(o&&(ye(s,"beforeCursorEnter"),s.explicitlyCleared)){if(r.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var d=s.find(i<0?1:-1),f=void 0;if((i<0?u:c)&&(d=Jr(e,d,-i,d&&d.line==t.line?r:null)),d&&d.line==t.line&&(f=ct(d,n))&&(i<0?f<0:f>0))return Kr(e,d,t,i,o)}var p=s.find(i<0?-1:1);return(i<0?c:u)&&(p=Jr(e,p,i,p.line==t.line?r:null)),p?Kr(e,p,t,i,o):null}}return t}function Xr(e,t,n,i,o){var r=i||1;return Kr(e,t,n,r,o)||!o&&Kr(e,t,n,r,!0)||Kr(e,t,n,-r,o)||!o&&Kr(e,t,n,-r,!0)||(e.cantEdit=!0,st(e.first,0))}function Jr(e,t,n,i){return n<0&&0==t.ch?t.line>e.first?mt(e,st(t.line-1)):null:n>0&&t.ch==(i||et(e,t.line)).text.length?t.line<e.first+e.size-1?st(t.line+1,0):null:new st(t.line,t.ch+n)}function Zr(e){e.setSelection(st(e.firstLine(),0),st(e.lastLine()),G)}function ea(e,t,n){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return i.canceled=!0}};return n&&(i.update=function(t,n,o,r){t&&(i.from=mt(e,t)),n&&(i.to=mt(e,n)),o&&(i.text=o),void 0!==r&&(i.origin=r)}),ye(e,"beforeChange",e,i),e.cm&&ye(e.cm,"beforeChange",e.cm,i),i.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function ta(e,t,n){if(e.cm){if(!e.cm.curOp)return Fo(e.cm,ta)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Ae(e,"beforeChange")||e.cm&&Ae(e.cm,"beforeChange"))||(t=ea(e,t,!0))){var i=Dt&&!n&&Wt(e,t.from,t.to);if(i)for(var o=i.length-1;o>=0;--o)na(e,{from:i[o].from,to:i[o].to,text:o?[""]:t.text,origin:t.origin});else na(e,t)}}function na(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ct(t.from,t.to)){var n=hr(e,t);Rr(e,t,n,e.cm?e.cm.curOp.id:NaN),ra(e,t,n,Ht(e,t));var i=[];xr(e,function(e,n){!n&&-1==U(i,e.history)&&(ua(e.history,t),i.push(e.history)),ra(e,t,null,Ht(e,t))})}}function ia(e,t,n){var i=e.cm&&e.cm.state.suppressEdits;if(!i||n){for(var o,r=e.history,a=e.sel,l="undo"==t?r.done:r.undone,s="undo"==t?r.undone:r.done,c=0;c<l.length&&(o=l[c],!(n?o.ranges&&!o.equals(e.sel):!o.ranges));c++);if(c!=l.length){for(r.lastOrigin=r.lastSelOrigin=null;;){if(!(o=l.pop()).ranges){if(i)return void l.push(o);break}if(Dr(o,s),n&&!o.equals(e.sel))return void Yr(e,o,{clearRedo:!1});a=o}var u=[];Dr(a,s),s.push({changes:u,generation:r.generation}),r.generation=o.generation||++r.maxGeneration;for(var d=Ae(e,"beforeChange")||e.cm&&Ae(e.cm,"beforeChange"),f=function(n){var i=o.changes[n];if(i.origin=t,d&&!ea(e,i,!1))return l.length=0,{};u.push(Sr(e,i));var r=n?hr(e,i):J(l);ra(e,i,r,Fr(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:fr(i)});var a=[];xr(e,function(e,t){!t&&-1==U(a,e.history)&&(ua(e.history,i),a.push(e.history)),ra(e,i,null,Fr(e,i))})},p=o.changes.length-1;p>=0;--p){var h=f(p);if(h)return h.v}}}}function oa(e,t){if(0!=t&&(e.first+=t,e.sel=new sr(Z(e.sel.ranges,function(e){return new cr(st(e.anchor.line+t,e.anchor.ch),st(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Vi(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;i<n.viewTo;i++)zi(e.cm,i,"gutter")}}function ra(e,t,n,i){if(e.cm&&!e.cm.curOp)return Fo(e.cm,ra)(e,t,n,i);if(t.to.line<e.first)oa(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);oa(e,o),t={from:st(e.first,0),to:st(t.to.line+o,t.to.ch),text:[J(t.text)],origin:t.origin}}var r=e.lastLine();t.to.line>r&&(t={from:t.from,to:st(r,et(e,r).text.length),text:[t.text[0]],origin:t.origin}),t.removed=tt(e,t.from,t.to),n||(n=hr(e,t)),e.cm?aa(e.cm,t,i):yr(e,t,i),Gr(e,n,G),e.cantEdit&&Xr(e,st(e.firstLine(),0))&&(e.cantEdit=!1)}}function aa(e,t,n){var i=e.doc,o=e.display,r=t.from,a=t.to,l=!1,s=r.line;e.options.lineWrapping||(s=ot(tn(et(i,r.line))),i.iter(s,a.line+1,function(e){if(e==o.maxLine)return l=!0,!0})),i.sel.contains(t.from,t.to)>-1&&we(e),yr(i,t,n,Fi(e)),e.options.lineWrapping||(i.iter(s,r.line+t.text.length,function(e){var t=un(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Mt(i,r.line),jo(e,400);var c=t.text.length-(a.line-r.line)-1;t.full?Vi(e):r.line!=a.line||1!=t.text.length||br(e.doc,t)?Vi(e,r.line,a.line+1,c):zi(e,r.line,"text");var u=Ae(e,"changes"),d=Ae(e,"change");if(d||u){var f={from:r,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Dn(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function la(e,t,n,i,o){var r;i||(i=n),ct(i,n)<0&&(n=(r=[i,n])[0],i=r[1]),"string"==typeof t&&(t=e.splitLines(t)),ta(e,{from:n,to:i,text:t,origin:o})}function sa(e,t,n,i){n<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function ca(e,t,n,i){for(var o=0;o<e.length;++o){var r=e[o],a=!0;if(r.ranges){r.copied||((r=e[o]=r.deepCopy()).copied=!0);for(var l=0;l<r.ranges.length;l++)sa(r.ranges[l].anchor,t,n,i),sa(r.ranges[l].head,t,n,i)}else{for(var s=0;s<r.changes.length;++s){var c=r.changes[s];if(n<c.from.line)c.from=st(c.from.line+i,c.from.ch),c.to=st(c.to.line+i,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function ua(e,t){var n=t.from.line,i=t.to.line,o=t.text.length-(i-n)-1;ca(e.done,n,i,o),ca(e.undone,n,i,o)}function da(e,t,n,i){var o=t,r=t;return"number"==typeof t?r=et(e,ht(e,t)):o=ot(t),null==o?null:(i(r,o)&&e.cm&&zi(e.cm,o,n),r)}function fa(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function pa(e){this.children=e;for(var t=0,n=0,i=0;i<e.length;++i){var o=e[i];t+=o.chunkSize(),n+=o.height,o.parent=this}this.size=t,this.height=n,this.parent=null}cr.prototype.from=function(){return pt(this.anchor,this.head)},cr.prototype.to=function(){return ft(this.anchor,this.head)},cr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},fa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,i=e+t;n<i;++n){var o=this.lines[n];this.height-=o.height,hn(o),Dn(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,n){for(var i=e+t;e<i;++e)if(n(this.lines[e]))return!0}},pa.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var r=Math.min(t,o-e),a=i.height;if(i.removeInner(e,r),this.height-=a-i.height,o==r&&(this.children.splice(n--,1),i.parent=null),0==(t-=r))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof fa))){var l=[];this.collapse(l),this.children=[new fa(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var i=0;i<this.children.length;++i){var o=this.children[i],r=o.chunkSize();if(e<=r){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,l=a;l<o.lines.length;){var s=new fa(o.lines.slice(l,l+=25));o.height-=s.height,this.children.splice(++i,0,s),s.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=r}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new pa(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=U(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var i=new pa(e.children);i.parent=e,e.children=[i,t],e=i}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=0;i<this.children.length;++i){var o=this.children[i],r=o.chunkSize();if(e<r){var a=Math.min(t,r-e);if(o.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=r}}};var ha=function(e,t,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.doc=e,this.node=t};function ma(e,t,n){cn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&co(e,n)}function ga(e,t,n,i){var o=new ha(e,n,i),r=e.cm;return r&&o.noHScroll&&(r.display.alignWidgets=!0),da(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length,Math.max(0,o.insertAt)),0,o),o.line=t,r&&!ln(e,t)){var i=cn(t)<e.scrollTop;it(t,t.height+Gn(o)),i&&co(r,o.height),r.curOp.forceUpdate=!0}return!0}),r&&Dn(r,"lineWidgetAdded",r,o,"number"==typeof t?t:ot(t)),o}ha.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,i=ot(n);if(null!=i&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(n.widgets=null);var r=Gn(this);it(n,Math.max(0,n.height-r)),e&&(Lo(e,function(){ma(e,n,-r),zi(e,i,"widget")}),Dn(e,"lineWidgetCleared",e,this,i))}},ha.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,i=this.line;this.height=null;var o=Gn(this)-t;!o||(ln(this.doc,i)||it(i,i.height+o),n&&Lo(n,function(){n.curOp.forceUpdate=!0,ma(n,i,o),Dn(n,"lineWidgetChanged",n,e,ot(i))}))},ke(ha);var va=0,_a=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++va};function ba(e,t,n,i,o){if(i&&i.shared)return xa(e,t,n,i,o);if(e.cm&&!e.cm.curOp)return Fo(e.cm,ba)(e,t,n,i,o);var r=new _a(e,o),a=ct(t,n);if(i&&V(i,r,!1),a>0||0==a&&!1!==r.clearWhenEmpty)return r;if(r.replacedWith&&(r.collapsed=!0,r.widgetNode=M("span",[r.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||r.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(r.widgetNode.insertLeft=!0)),r.collapsed){if(en(e,t.line,t,n,r)||t.line!=n.line&&en(e,n.line,t,n,r))throw new Error("Inserting collapsed marker partially overlapping an existing one");Lt()}r.addToHistory&&Rr(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,n.line+1,function(i){c&&r.collapsed&&!c.options.lineWrapping&&tn(i)==c.display.maxLine&&(l=!0),r.collapsed&&s!=t.line&&it(i,0),jt(i,new Ft(r,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s}),r.collapsed&&e.iter(t.line,n.line+1,function(t){ln(e,t)&&it(t,0)}),r.clearOnEnter&&ve(r,"beforeCursorEnter",function(){return r.clear()}),r.readOnly&&(It(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),r.collapsed&&(r.id=++va,r.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),r.collapsed)Vi(c,t.line,n.line+1);else if(r.className||r.startStyle||r.endStyle||r.css||r.attributes||r.title)for(var u=t.line;u<=n.line;u++)zi(c,u,"text");r.atomic&&qr(c.doc),Dn(c,"markerAdded",c,r)}return r}_a.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Eo(e),Ae(this,"clear")){var n=this.find();n&&Dn(this,"clear",n.from,n.to)}for(var i=null,o=null,r=0;r<this.lines.length;++r){var a=this.lines[r],l=Pt(a.markedSpans,this);e&&!this.collapsed?zi(e,ot(a),"text"):e&&(null!=l.to&&(o=ot(a)),null!=l.from&&(i=ot(a))),a.markedSpans=Bt(a.markedSpans,l),null==l.from&&this.collapsed&&!ln(this.doc,a)&&e&&it(a,Di(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=tn(this.lines[s]),u=un(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&Vi(e,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&qr(e.doc)),e&&Dn(e,"markerCleared",e,this,i,o),t&&To(e),this.parent&&this.parent.clear()}},_a.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o<this.lines.length;++o){var r=this.lines[o],a=Pt(r.markedSpans,this);if(null!=a.from&&(n=st(t?r:ot(r),a.from),-1==e))return n;if(null!=a.to&&(i=st(t?r:ot(r),a.to),1==e))return i}return n&&{from:n,to:i}},_a.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,i=this.doc.cm;!t||!i||Lo(i,function(){var o=t.line,r=ot(t.line),a=oi(i,r);if(a&&(pi(a),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!ln(n.doc,o)&&null!=n.height){var l=n.height;n.height=null;var s=Gn(n)-l;s&&it(o,o.height+s)}Dn(i,"markerChanged",i,e)})},_a.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||-1==U(t.maybeHiddenMarkers,this))&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},_a.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ke(_a);var ya=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function xa(e,t,n,i,o){(i=V(i)).shared=!1;var r=[ba(e,t,n,i,o)],a=r[0],l=i.widgetNode;return xr(e,function(e){l&&(i.widgetNode=l.cloneNode(!0)),r.push(ba(e,mt(e,t),mt(e,n),i,o));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=J(r)}),new ya(r,a)}function wa(e){return e.findMarks(st(e.first,0),e.clipPos(st(e.lastLine())),function(e){return e.parent})}function Aa(e,t){for(var n=0;n<t.length;n++){var i=t[n],o=i.find(),r=e.clipPos(o.from),a=e.clipPos(o.to);if(ct(r,a)){var l=ba(e,r,a,i.primary,i.primary.type);i.markers.push(l),l.parent=i}}}function ka(e){for(var t=function(t){var n=e[t],i=[n.primary.doc];xr(n.primary.doc,function(e){return i.push(e)});for(var o=0;o<n.markers.length;o++){var r=n.markers[o];-1==U(i,r.doc)&&(r.parent=null,n.markers.splice(o--,1))}},n=0;n<e.length;n++)t(n)}ya.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Dn(this,"clear")}},ya.prototype.find=function(e,t){return this.primary.find(e,t)},ke(ya);var Ca=0,Sa=function(e,t,n,i,o){if(!(this instanceof Sa))return new Sa(e,t,n,i,o);null==n&&(n=0),pa.call(this,[new fa([new fn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var r=st(n,0);this.sel=dr(r),this.history=new Cr(null),this.id=++Ca,this.modeOption=t,this.lineSep=i,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),yr(this,{from:r,to:r,text:e}),Yr(this,dr(r),G)};Sa.prototype=ne(pa.prototype,{constructor:Sa,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,i=0;i<t.length;++i)n+=t[i].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=nt(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Bo(function(e){var t=st(this.first,0),n=this.first+this.size-1;ta(this,{from:t,to:st(n,et(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&fo(this.cm,0,0),Yr(this,dr(t),G)}),replaceRange:function(e,t,n,i){la(this,e,t=mt(this,t),n=n?mt(this,n):t,i)},getRange:function(e,t,n){var i=tt(this,mt(this,e),mt(this,t));return!1===n?i:""===n?i.join(""):i.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(at(this,e))return et(this,e)},getLineNumber:function(e){return ot(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=et(this,e)),tn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return mt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Bo(function(e,t,n){Hr(this,mt(this,"number"==typeof e?st(e,t||0):e),null,n)}),setSelection:Bo(function(e,t,n){Hr(this,mt(this,e),mt(this,t||e),n)}),extendSelection:Bo(function(e,t,n){jr(this,mt(this,e),t&&mt(this,t),n)}),extendSelections:Bo(function(e,t){Vr(this,vt(this,e),t)}),extendSelectionsBy:Bo(function(e,t){Vr(this,vt(this,Z(this.sel.ranges,e)),t)}),setSelections:Bo(function(e,t,n){if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new cr(mt(this,e[o].anchor),mt(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Yr(this,ur(this.cm,i,t),n)}}),addSelection:Bo(function(e,t,n){var i=this.sel.ranges.slice(0);i.push(new cr(mt(this,e),mt(this,t||e))),Yr(this,ur(this.cm,i,i.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,i=0;i<n.length;i++){var o=tt(this,n[i].from(),n[i].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=tt(this,n[i].from(),n[i].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[i]=o}return t},replaceSelection:function(e,t,n){for(var i=[],o=0;o<this.sel.ranges.length;o++)i[o]=e;this.replaceSelections(i,t,n||"+input")},replaceSelections:Bo(function(e,t,n){for(var i=[],o=this.sel,r=0;r<o.ranges.length;r++){var a=o.ranges[r];i[r]={from:a.from(),to:a.to(),text:this.splitLines(e[r]),origin:n}}for(var l=t&&"end"!=t&&gr(this,i,t),s=i.length-1;s>=0;s--)ta(this,i[s]);l?Wr(this,l):this.cm&&uo(this.cm)}),undo:Bo(function(){ia(this,"undo")}),redo:Bo(function(){ia(this,"redo")}),undoSelection:Bo(function(){ia(this,"undo",!0)}),redoSelection:Bo(function(){ia(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Cr(this.history),xr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Pr(this.history.done),undone:Pr(this.history.undone)}},setHistory:function(e){var t=this.history=new Cr(this.history);t.done=Pr(e.done.slice(0),null,!0),t.undone=Pr(e.undone.slice(0),null,!0)},setGutterMarker:Bo(function(e,t,n){return da(this,e,"gutter",function(e){var i=e.gutterMarkers||(e.gutterMarkers={});return i[t]=n,!n&&ae(i)&&(e.gutterMarkers=null),!0})}),clearGutter:Bo(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&da(t,n,"gutter",function(){return n.gutterMarkers[e]=null,ae(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!(at(this,e)&&(t=e,e=et(this,e))))return null}else if(null==(t=ot(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Bo(function(e,t,n){return da(this,e,"gutter"==t?"gutter":"class",function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[i]){if(C(n).test(e[i]))return!1;e[i]+=" "+n}else e[i]=n;return!0})}),removeLineClass:Bo(function(e,t,n){return da(this,e,"gutter"==t?"gutter":"class",function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[i];if(!o)return!1;if(null==n)e[i]=null;else{var r=o.match(C(n));if(!r)return!1;var a=r.index+r[0].length;e[i]=o.slice(0,r.index)+(r.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0})}),addLineWidget:Bo(function(e,t,n){return ga(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return ba(this,mt(this,e),mt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ba(this,e=mt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=et(this,(e=mt(this,e)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=mt(this,e),t=mt(this,t);var i=[],o=e.line;return this.iter(e.line,t.line+1,function(r){var a=r.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];!(null!=s.to&&o==e.line&&e.ch>=s.to||null==s.from&&o!=e.line||null!=s.from&&o==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&i.push(s.marker.parent||s.marker)}++o}),i},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&e.push(n[i].marker)}),e},posFromIndex:function(e){var t,n=this.first,i=this.lineSeparator().length;return this.iter(function(o){var r=o.text.length+i;if(r>e)return t=e,!0;e-=r,++n}),mt(this,st(n,t))},indexFromPos:function(e){var t=(e=mt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new Sa(nt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var i=new Sa(nt(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Aa(i,wa(this)),i},unlinkDoc:function(e){if(e instanceof Vl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),ka(wa(this));break}if(e.history==this.history){var n=[e.id];xr(e,function(e){return n.push(e.id)},!0),e.history=new Cr(null),e.history.done=Pr(this.history.done,n),e.history.undone=Pr(this.history.undone,n)}},iterLinkedDocs:function(e){xr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Pe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Bo(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&kr(this.cm))})}),Sa.prototype.eachLine=Sa.prototype.iter;var Ea=0;function Ta(e){var t=this;if(Ma(t),!xe(t,e)&&!$n(t.display,e)){Ce(e),a&&(Ea=+new Date);var n=Bi(t,e,!0),i=e.dataTransfer.files;if(n&&!t.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var o=i.length,r=Array(o),l=0,s=function(){++l==o&&Fo(t,function(){var e={from:n=mt(t.doc,n),to:n,text:t.doc.splitLines(r.filter(function(e){return null!=e}).join(t.doc.lineSeparator())),origin:"paste"};ta(t.doc,e),Wr(t.doc,dr(mt(t.doc,n),mt(t.doc,fr(e))))})()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))s();else{var i=new FileReader;i.onerror=function(){return s()},i.onload=function(){var e=i.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(r[n]=e),s()},i.readAsText(e)}},u=0;u<i.length;u++)c(i[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Gr(t.doc,dr(n,n)),f)for(var p=0;p<f.length;++p)la(t.doc,"",f[p].anchor,f[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(h){}}}}function Ra(e,t){if(a&&(!e.state.draggingText||+new Date-Ea<100))Te(t);else if(!xe(e,t)&&!$n(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}function Oa(e,t){var n=Bi(e,t);if(n){var i=document.createDocumentFragment();qi(e,n,i),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),R(e.display.dragCursor,i)}}function Ma(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Da(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],i=0;i<t.length;i++){var o=t[i].CodeMirror;o&&n.push(o)}n.length&&n[0].operation(function(){for(var t=0;t<n.length;t++)e(n[t])})}}var Na=!1;function Ia(){Na||(La(),Na=!0)}function La(){var e;ve(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Da(Fa)},100))}),ve(window,"blur",function(){return Da(to)})}function Fa(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Pa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ba=0;Ba<10;Ba++)Pa[Ba+48]=Pa[Ba+96]=String(Ba);for(var ja=65;ja<=90;ja++)Pa[ja]=String.fromCharCode(ja);for(var Va=1;Va<=12;Va++)Pa[Va+111]=Pa[Va+63235]="F"+Va;var za={};function Ha(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,i,o,r,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))r=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);o=!0}}return n&&(e="Alt-"+e),i&&(e="Ctrl-"+e),r&&(e="Cmd-"+e),o&&(e="Shift-"+e),e}function Ua(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete e[n];continue}for(var o=Z(n.split(" "),Ha),r=0;r<o.length;r++){var a=void 0,l=void 0;r==o.length-1?(l=o.join(" "),a=i):(l=o.slice(0,r+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Wa(e,t,n,i){var o=(t=qa(t)).call?t.call(e,i):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Wa(e,t.fallthrough,n,i);for(var r=0;r<t.fallthrough.length;r++){var a=Wa(e,t.fallthrough[r],n,i);if(a)return a}}}function Ya(e){var t="string"==typeof e?e:Pa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Ga(e,t,n){var i=e;return t.altKey&&"Alt"!=i&&(e="Alt-"+e),(A?t.metaKey:t.ctrlKey)&&"Ctrl"!=i&&(e="Ctrl-"+e),(A?t.ctrlKey:t.metaKey)&&"Mod"!=i&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=i&&(e="Shift-"+e),e}function $a(e,t){if(f&&34==e.keyCode&&e.char)return!1;var n=Pa[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Ga(n,e,t))}function qa(e){return"string"==typeof e?za[e]:e}function Qa(e,t){for(var n=e.doc.sel.ranges,i=[],o=0;o<n.length;o++){for(var r=t(n[o]);i.length&&ct(r.from,J(i).to)<=0;){var a=i.pop();if(ct(a.from,r.from)<0){r.from=a.from;break}}i.push(r)}Lo(e,function(){for(var t=i.length-1;t>=0;t--)la(e.doc,"",i[t].from,i[t].to,"+delete");uo(e)})}function Ka(e,t,n){var i=ce(e.text,t+n,n);return i<0||i>e.text.length?null:i}function Xa(e,t,n){var i=Ka(e,t.ch,n);return null==i?null:new st(t.line,i,n<0?"after":"before")}function Ja(e,t,n,i,o){if(e){"rtl"==t.doc.direction&&(o=-o);var r=me(n,t.doc.direction);if(r){var a,l=o<0?J(r):r[0],s=o<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=ri(t,n);a=o<0?n.text.length-1:0;var u=ai(t,c,a).top;a=ue(function(e){return ai(t,c,e).top==u},o<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Ka(n,a,1))}else a=o<0?l.to:l.from;return new st(i,a,s)}}return new st(i,o<0?n.text.length:0,o<0?"before":"after")}function Za(e,t,n,i){var o=me(t,e.doc.direction);if(!o)return Xa(t,n,i);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var r=pe(o,n.ch,n.sticky),a=o[r];if("ltr"==e.doc.direction&&a.level%2==0&&(i>0?a.to>n.ch:a.from<n.ch))return Xa(t,n,i);var l,s=function(e,n){return Ka(t,e instanceof st?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(l=l||ri(e,t),Ei(e,t,l,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==i<0,f=s(n,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var p=d?"before":"after";return new st(n.line,f,p)}}var h=function(e,t,i){for(var r=function(e,t){return t?new st(n.line,s(e,1),"before"):new st(n.line,e,"after")};e>=0&&e<o.length;e+=t){var a=o[e],l=t>0==(1!=a.level),c=l?i.begin:s(i.end,-1);if(a.from<=c&&c<a.to||(c=l?a.from:s(a.to,-1),i.begin<=c&&c<i.end))return r(c,l)}},m=h(r+i,i,u);if(m)return m;var g=i>0?u.end:s(u.begin,-1);return null==g||i>0&&g==t.text.length||!(m=h(i>0?0:o.length-1,i,c(g)))?null:m}za.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},za.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},za.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},za.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},za.default=b?za.macDefault:za.pcDefault;var el={selectAll:Zr,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),G)},killLine:function(e){return Qa(e,function(t){if(t.empty()){var n=et(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:st(t.head.line+1,0)}:{from:t.head,to:st(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Qa(e,function(t){return{from:st(t.from().line,0),to:mt(e.doc,st(t.to().line+1,0))}})},delLineLeft:function(e){return Qa(e,function(e){return{from:st(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Qa(e,function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}})},delWrappedLineRight:function(e){return Qa(e,function(t){var n=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:i}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(st(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(st(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return tl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return il(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return nl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},q)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},q)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:n},"div");return i.ch<e.getLine(i.line).search(/\S/)?il(e,t.head):i},q)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),i=e.options.tabSize,o=0;o<n.length;o++){var r=n[o].from(),a=z(e.getLine(r.line),r.ch,i);t.push(X(i-a%i))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Lo(e,function(){for(var t=e.listSelections(),n=[],i=0;i<t.length;i++)if(t[i].empty()){var o=t[i].head,r=et(e.doc,o.line).text;if(r)if(o.ch==r.length&&(o=new st(o.line,o.ch-1)),o.ch>0)o=new st(o.line,o.ch+1),e.replaceRange(r.charAt(o.ch-1)+r.charAt(o.ch-2),st(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=et(e.doc,o.line-1).text;a&&(o=new st(o.line,1),e.replaceRange(r.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),st(o.line-1,a.length-1),o,"+transpose"))}n.push(new cr(o,o))}e.setSelections(n)})},newlineAndIndent:function(e){return Lo(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var i=0;i<t.length;i++)e.indentLine(t[i].from().line,null,!0);uo(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function tl(e,t){var n=et(e.doc,t),i=tn(n);return i!=n&&(t=ot(i)),Ja(!0,e,i,t,1)}function nl(e,t){var n=et(e.doc,t),i=nn(n);return i!=n&&(t=ot(i)),Ja(!0,e,n,t,-1)}function il(e,t){var n=tl(e,t.line),i=et(e.doc,n.line),o=me(i,e.doc.direction);if(!o||0==o[0].level){var r=Math.max(n.ch,i.text.search(/\S/)),a=t.line==n.line&&t.ch<=r&&t.ch;return st(n.line,a?0:r,n.sticky)}return n}function ol(e,t,n){if("string"==typeof t&&!(t=el[t]))return!1;e.display.input.ensurePolled();var i=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=Y}finally{e.display.shift=i,e.state.suppressEdits=!1}return o}function rl(e,t,n){for(var i=0;i<e.state.keyMaps.length;i++){var o=Wa(t,e.state.keyMaps[i],n,e);if(o)return o}return e.options.extraKeys&&Wa(t,e.options.extraKeys,n,e)||Wa(t,e.options.keyMap,n,e)}var al=new H;function ll(e,t,n,i){var o=e.state.keySeq;if(o){if(Ya(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:al.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),sl(e,o+" "+t,n,i))return!0}return sl(e,t,n,i)}function sl(e,t,n,i){var o=rl(e,t,i);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Dn(e,"keyHandled",e,t,n),("handled"==o||"multi"==o)&&(Ce(n),Xi(e)),!!o}function cl(e,t){var n=$a(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ll(e,"Shift-"+n,t,function(t){return ol(e,t,!0)})||ll(e,n,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ol(e,t)}):ll(e,n,t,function(t){return ol(e,t)}))}function ul(e,t,n){return ll(e,"'"+n+"'",t,function(t){return ol(e,t,!0)})}var dl=null;function fl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=N(P(t)),xe(t,e)))){a&&l<11&&27==e.keyCode&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=16==i||e.shiftKey;var o=cl(t,e);f&&(dl=o?i:null,!o&&88==i&&!je&&(b?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),n&&!b&&!o&&46==i&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18==i&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&pl(t)}}function pl(e){var t=e.display.lineDiv;function n(e){(18==e.keyCode||!e.altKey)&&(E(t,"CodeMirror-crosshair"),be(document,"keyup",n),be(document,"mouseover",n))}I(t,"CodeMirror-crosshair"),ve(document,"keyup",n),ve(document,"mouseover",n)}function hl(e){16==e.keyCode&&(this.doc.sel.shift=!1),xe(this,e)}function ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||$n(t.display,e)||xe(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var n=e.keyCode,i=e.charCode;if(f&&n==dl)return dl=null,void Ce(e);if(!f||e.which&&!(e.which<10)||!cl(t,e)){var o=String.fromCharCode(null==i?n:i);"\b"!=o&&(ul(t,e,o)||t.display.input.onKeyPress(e))}}}var gl,vl,_l=400,bl=function(e,t,n){this.time=e,this.pos=t,this.button=n};function yl(e,t){var n=+new Date;return vl&&vl.compare(n,e,t)?(gl=vl=null,"triple"):gl&&gl.compare(n,e,t)?(vl=new bl(n,e,t),gl=null,"double"):(gl=new bl(n,e,t),vl=null,"single")}function xl(e){var t=this,n=t.display;if(!(xe(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,$n(n,e))return void(s||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100)));if(!Ol(t,e)){var i=Bi(t,e),o=Oe(e),r=i?yl(i,o):"single";B(t).focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),(!i||!wl(t,o,i,r,e))&&(1==o?i?kl(t,i,r,e):Re(e)==n.scroller&&Ce(e):2==o?(i&&jr(t.doc,i),setTimeout(function(){return n.input.focus()},20)):3==o&&(k?t.display.input.onContextMenu(e):Zi(t)))}}}function wl(e,t,n,i,o){var r="Click";return"double"==i?r="Double"+r:"triple"==i&&(r="Triple"+r),ll(e,Ga(r=(1==t?"Left":2==t?"Middle":"Right")+r,o),o,function(t){if("string"==typeof t&&(t=el[t]),!t)return!1;var i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i=t(e,n)!=Y}finally{e.state.suppressEdits=!1}return i})}function Al(e,t,n){var i=e.getOption("configureMouse"),o=i?i(e,t,n):{};if(null==o.unit){var r=y?n.shiftKey&&n.metaKey:n.altKey;o.unit=r?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=b?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(b?n.altKey:n.ctrlKey)),o}function kl(e,t,n,i){a?setTimeout(j(Ji,e),0):e.curOp.focus=N(P(e));var o,r=Al(e,n,i),l=e.doc.sel;e.options.dragDrop&&Ne&&!e.isReadOnly()&&"single"==n&&(o=l.contains(t))>-1&&(ct((o=l.ranges[o]).from(),t)<0||t.xRel>0)&&(ct(o.to(),t)>0||t.xRel<0)?Cl(e,i,t,r):El(e,i,t,r)}function Cl(e,t,n,i){var o=e.display,r=!1,c=Fo(e,function(t){s&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Zi(e)),be(o.wrapper.ownerDocument,"mouseup",c),be(o.wrapper.ownerDocument,"mousemove",u),be(o.scroller,"dragstart",d),be(o.scroller,"drop",c),r||(Ce(t),i.addNew||jr(e.doc,n,null,null,i.extend),s&&!p||a&&9==l?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),u=function(e){r=r||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return r=!0};s&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!i.moveOnDrag,ve(o.wrapper.ownerDocument,"mouseup",c),ve(o.wrapper.ownerDocument,"mousemove",u),ve(o.scroller,"dragstart",d),ve(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}function Sl(e,t,n){if("char"==n)return new cr(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new cr(st(t.line,0),mt(e.doc,st(t.line+1,0)));var i=n(e,t);return new cr(i.from,i.to)}function El(e,t,n,i){a&&Zi(e);var o=e.display,r=e.doc;Ce(t);var l,s,c=r.sel,u=c.ranges;if(i.addNew&&!i.extend?(s=r.sel.contains(n),l=s>-1?u[s]:new cr(n,n)):(l=r.sel.primary(),s=r.sel.primIndex),"rectangle"==i.unit)i.addNew||(l=new cr(n,n)),n=Bi(e,t,!0,!0),s=-1;else{var d=Sl(e,n,i.unit);l=i.extend?Br(l,d.anchor,d.head,i.extend):d}i.addNew?-1==s?(s=u.length,Yr(r,ur(e,u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==i.unit&&!i.extend?(Yr(r,ur(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=r.sel):zr(r,s,l,$):(s=0,Yr(r,new sr([l],0),$),c=r.sel);var f=n;function p(t){if(0!=ct(f,t))if(f=t,"rectangle"==i.unit){for(var o=[],a=e.options.tabSize,u=z(et(r,n.line).text,n.ch,a),d=z(et(r,t.line).text,t.ch,a),p=Math.min(u,d),h=Math.max(u,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=et(r,m).text,_=Q(v,p,a);p==h?o.push(new cr(st(m,_),st(m,_))):v.length>_&&o.push(new cr(st(m,_),st(m,Q(v,h,a))))}o.length||o.push(new cr(n,n)),Yr(r,ur(e,c.ranges.slice(0,s).concat(o),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,y=l,x=Sl(e,t,i.unit),w=y.anchor;ct(x.anchor,w)>0?(b=x.head,w=pt(y.from(),x.anchor)):(b=x.anchor,w=ft(y.to(),x.head));var A=c.ranges.slice(0);A[s]=Tl(e,new cr(mt(r,w),b)),Yr(r,ur(e,A,s),$)}}var h=o.wrapper.getBoundingClientRect(),m=0;function g(t){var n=++m,a=Bi(e,t,!0,"rectangle"==i.unit);if(a)if(0!=ct(a,f)){e.curOp.focus=N(P(e)),p(a);var l=oo(o,r);(a.line>=l.to||a.line<l.from)&&setTimeout(Fo(e,function(){m==n&&g(t)}),150)}else{var s=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;s&&setTimeout(Fo(e,function(){m==n&&(o.scroller.scrollTop+=s,g(t))}),50)}}function v(t){e.state.selectingText=!1,m=1/0,t&&(Ce(t),o.input.focus()),be(o.wrapper.ownerDocument,"mousemove",_),be(o.wrapper.ownerDocument,"mouseup",b),r.history.lastSelOrigin=null}var _=Fo(e,function(e){0!==e.buttons&&Oe(e)?g(e):v(e)}),b=Fo(e,v);e.state.selectingText=b,ve(o.wrapper.ownerDocument,"mousemove",_),ve(o.wrapper.ownerDocument,"mouseup",b)}function Tl(e,t){var n=t.anchor,i=t.head,o=et(e.doc,n.line);if(0==ct(n,i)&&n.sticky==i.sticky)return t;var r=me(o);if(!r)return t;var a=pe(r,n.ch,n.sticky),l=r[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,c=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==c||c==r.length)return t;if(i.line!=n.line)s=(i.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=pe(r,i.ch,i.sticky),d=u-a||(i.ch-n.ch)*(1==l.level?-1:1);s=u==c-1||u==c?d<0:d>0}var f=r[c+(s?-1:0)],p=s==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new cr(new st(n.line,h,m),i)}function Rl(e,t,n,i){var o,r;if(t.touches)o=t.touches[0].clientX,r=t.touches[0].clientY;else try{o=t.clientX,r=t.clientY}catch(u){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&Ce(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(r>l.bottom||!Ae(e,n))return Ee(t);r-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=o)return ye(e,n,e,rt(e.doc,r),e.display.gutterSpecs[s].className,t),Ee(t)}}function Ol(e,t){return Rl(e,t,"gutterClick",!0)}function Ml(e,t){$n(e.display,t)||Dl(e,t)||xe(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Dl(e,t){return!!Ae(e,"gutterContextMenu")&&Rl(e,t,"gutterContextMenu",!1)}function Nl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),mi(e)}bl.prototype.compare=function(e,t,n){return this.time+_l>e&&0==ct(t,this.pos)&&n==this.button};var Il={toString:function(){return"CodeMirror.Init"}},Ll={},Fl={};function Pl(e){var t=e.optionHandlers;function n(n,i,o,r){e.defaults[n]=i,o&&(t[n]=r?function(e,t,n){n!=Il&&o(e,t,n)}:o)}e.defineOption=n,e.Init=Il,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,vr(e)},!0),n("indentUnit",2,vr,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){_r(e),mi(e),Vi(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],i=e.doc.first;e.doc.iter(function(e){for(var o=0;;){var r=e.text.indexOf(t,o);if(-1==r)break;o=r+t.length,n.push(st(i,r))}i++});for(var o=n.length-1;o>=0;o--)la(e.doc,t,n[o],st(n[o].line,n[o].ch+t.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Il&&e.refresh()}),n("specialCharPlaceholder",bn,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",_?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),n("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){Nl(e),tr(e)},!0),n("keyMap","default",function(e,t,n){var i=qa(t),o=n!=Il&&qa(n);o&&o.detach&&o.detach(e,i),i.attach&&i.attach(e,o||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,jl,!0),n("gutters",[],function(e,t){e.display.gutterSpecs=Zo(t,e.options.lineNumbers),tr(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Li(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return wo(e)},!0),n("scrollbarStyle","native",function(e){Co(e),wo(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e,t){e.display.gutterSpecs=Zo(e.options.gutters,t),tr(e)},!0),n("firstLineNumber",1,tr,!0),n("lineNumberFormatter",function(e){return e},tr,!0),n("showCursorWhenSelecting",!1,Gi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(e,t){"nocursor"==t&&(to(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,Bl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Gi,!0),n("singleCursorHeightPerLine",!0,Gi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,_r,!0),n("addModeClass",!1,_r,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,_r,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}function Bl(e,t,n){if(!t!=!(n&&n!=Il)){var i=e.display.dragFunctions,o=t?ve:be;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function jl(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),dn(e)),Pi(e),Vi(e),mi(e),setTimeout(function(){return wo(e)},100)}function Vl(e,t){var n=this;if(!(this instanceof Vl))return new Vl(e,t);this.options=t=t?V(t):{},V(Ll,t,!1);var i=t.value;"string"==typeof i?i=new Sa(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var o=new Vl.inputStyles[t.inputStyle](this),r=this.display=new nr(e,i,o,t);for(var c in r.wrapper.CodeMirror=this,Nl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Co(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new H,keySeq:null,specialChars:null},t.autofocus&&!_&&r.input.focus(),a&&l<11&&setTimeout(function(){return n.display.input.reset(!0)},20),zl(this),Ia(),Eo(this),this.curOp.forceUpdate=!0,wr(this,i),t.autofocus&&!_||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&eo(n)},20):to(this),Fl)Fl.hasOwnProperty(c)&&Fl[c](this,t[c],Il);Jo(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Hl.length;++u)Hl[u](this);To(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(r.lineDiv).textRendering&&(r.lineDiv.style.textRendering="auto")}function zl(e){var t=e.display;ve(t.scroller,"mousedown",Fo(e,xl)),ve(t.scroller,"dblclick",a&&l<11?Fo(e,function(t){if(!xe(e,t)){var n=Bi(e,t);if(n&&!Ol(e,t)&&!$n(e.display,t)){Ce(t);var i=e.findWordAt(n);jr(e.doc,i.anchor,i.head)}}}):function(t){return xe(e,t)||Ce(t)}),ve(t.scroller,"contextmenu",function(t){return Ml(e,t)}),ve(t.input.getField(),"contextmenu",function(n){t.scroller.contains(n.target)||Ml(e,n)});var n,i={end:0};function o(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),(i=t.activeTouch).end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(null==t.left)return!0;var n=t.left-e.left,i=t.top-e.top;return n*n+i*i>400}ve(t.scroller,"touchstart",function(o){if(!xe(e,o)&&!r(o)&&!Ol(e,o)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-i.end<=300?i:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}}),ve(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ve(t.scroller,"touchend",function(n){var i=t.activeTouch;if(i&&!$n(t,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var r,a=e.coordsChar(t.activeTouch,"page");r=!i.prev||s(i,i.prev)?new cr(a,a):!i.prev.prev||s(i,i.prev.prev)?e.findWordAt(a):new cr(st(a.line,0),mt(e.doc,st(a.line+1,0))),e.setSelection(r.anchor,r.head),e.focus(),Ce(n)}o()}),ve(t.scroller,"touchcancel",o),ve(t.scroller,"scroll",function(){t.scroller.clientHeight&&(go(e,t.scroller.scrollTop),_o(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))}),ve(t.scroller,"mousewheel",function(t){return lr(e,t)}),ve(t.scroller,"DOMMouseScroll",function(t){return lr(e,t)}),ve(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){xe(e,t)||Te(t)},over:function(t){xe(e,t)||(Oa(e,t),Te(t))},start:function(t){return Ra(e,t)},drop:Fo(e,Ta),leave:function(t){xe(e,t)||Ma(e)}};var c=t.input.getField();ve(c,"keyup",function(t){return hl.call(e,t)}),ve(c,"keydown",Fo(e,fl)),ve(c,"keypress",Fo(e,ml)),ve(c,"focus",function(t){return eo(e,t)}),ve(c,"blur",function(t){return to(e,t)})}Vl.defaults=Ll,Vl.optionHandlers=Fl;var Hl=[];function Ul(e,t,n,i){var o,r=e.doc;null==n&&(n="add"),"smart"==n&&(r.mode.indent?o=wt(e,t).state:n="prev");var a=e.options.tabSize,l=et(r,t),s=z(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(i||/\S/.test(l.text)){if("smart"==n&&((c=r.mode.indent(o,l.text.slice(u.length),l.text))==Y||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>r.first?z(et(r,t-1).text,null,a):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,d+="\t";if(f<c&&(d+=X(c-f)),d!=u)return la(r,d,st(t,0),st(t,u.length),"+input"),l.stateAfter=null,!0;for(var h=0;h<r.sel.ranges.length;h++){var m=r.sel.ranges[h];if(m.head.line==t&&m.head.ch<u.length){var g=st(t,u.length);zr(r,h,new cr(g,g));break}}}Vl.defineInitHook=function(e){return Hl.push(e)};var Wl=null;function Yl(e){Wl=e}function Gl(e,t,n,i,o){var r=e.doc;e.display.shift=!1,i||(i=r.sel);var a=+new Date-200,l="paste"==o||e.state.pasteIncoming>a,s=Pe(t),c=null;if(l&&i.ranges.length>1)if(Wl&&Wl.text.join("\n")==t){if(i.ranges.length%Wl.text.length==0){c=[];for(var u=0;u<Wl.text.length;u++)c.push(r.splitLines(Wl.text[u]))}}else s.length==i.ranges.length&&e.options.pasteLinesPerSelection&&(c=Z(s,function(e){return[e]}));for(var d=e.curOp.updateInput,f=i.ranges.length-1;f>=0;f--){var p=i.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=st(h.line,h.ch-n):e.state.overwrite&&!l?m=st(m.line,Math.min(et(r,m.line).text.length,m.ch+J(s).length)):l&&Wl&&Wl.lineWise&&Wl.text.join("\n")==s.join("\n")&&(h=m=st(h.line,0)));var g={from:h,to:m,text:c?c[f%c.length]:s,origin:o||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};ta(e.doc,g),Dn(e,"inputRead",e,g)}t&&!l&&ql(e,t),uo(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function $l(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Lo(t,function(){return Gl(t,n,0,null,"paste")}),!0}function ql(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,i=n.ranges.length-1;i>=0;i--){var o=n.ranges[i];if(!(o.head.ch>100||i&&n.ranges[i-1].head.line==o.head.line)){var r=e.getModeAt(o.head),a=!1;if(r.electricChars){for(var l=0;l<r.electricChars.length;l++)if(t.indexOf(r.electricChars.charAt(l))>-1){a=Ul(e,o.head.line,"smart");break}}else r.electricInput&&r.electricInput.test(et(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Ul(e,o.head.line,"smart"));a&&Dn(e,"electricInput",e,o.head.line)}}}function Ql(e){for(var t=[],n=[],i=0;i<e.doc.sel.ranges.length;i++){var o=e.doc.sel.ranges[i].head.line,r={anchor:st(o,0),head:st(o+1,0)};n.push(r),t.push(e.getRange(r.anchor,r.head))}return{text:t,ranges:n}}function Kl(e,t,n,i){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",i?"":"off"),e.setAttribute("spellcheck",!!t)}function Xl(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Kl(e),t}function Jl(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){B(this).focus(),this.display.input.focus()},setOption:function(e,n){var i=this.options,o=i[e];i[e]==n&&"mode"!=e||(i[e]=n,t.hasOwnProperty(e)&&Fo(this,t[e])(this,n,o),ye(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](qa(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Po(function(t,n){var i=t.token?t:e.getMode(this.options,t);if(i.startState)throw new Error("Overlays may not be stateful.");ee(this.state.overlays,{mode:i,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,Vi(this)}),removeOverlay:Po(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var i=t[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return t.splice(n,1),this.state.modeGen++,void Vi(this)}}),indentLine:Po(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),at(this.doc,e)&&Ul(this,e,t,n)}),indentSelection:Po(function(e){for(var t=this.doc.sel.ranges,n=-1,i=0;i<t.length;i++){var o=t[i];if(o.empty())o.head.line>n&&(Ul(this,o.head.line,e,!0),n=o.head.line,i==this.doc.sel.primIndex&&uo(this));else{var r=o.from(),a=o.to(),l=Math.max(n,r.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<n;++s)Ul(this,s,e);var c=this.doc.sel.ranges;0==r.ch&&t.length==c.length&&c[i].from().ch>0&&zr(this.doc,i,new cr(r,c[i].to()),G)}}}),getTokenAt:function(e,t){return Et(this,e,t)},getLineTokens:function(e,t){return Et(this,st(e),t,!0)},getTokenTypeAt:function(e){e=mt(this.doc,e);var t,n=xt(this,et(this.doc,e.line)),i=0,o=(n.length-1)/2,r=e.ch;if(0==r)t=n[2];else for(;;){var a=i+o>>1;if((a?n[2*a-1]:0)>=r)o=a;else{if(!(n[2*a+1]<r)){t=n[2*a+2];break}i=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var i=[];if(!n.hasOwnProperty(t))return i;var o=n[t],r=this.getModeAt(e);if("string"==typeof r[t])o[r[t]]&&i.push(o[r[t]]);else if(r[t])for(var a=0;a<r[t].length;a++){var l=o[r[t][a]];l&&i.push(l)}else r.helperType&&o[r.helperType]?i.push(o[r.helperType]):o[r.name]&&i.push(o[r.name]);for(var s=0;s<o._global.length;s++){var c=o._global[s];c.pred(r,this)&&-1==U(i,c.val)&&i.push(c.val)}return i},getStateAfter:function(e,t){var n=this.doc;return wt(this,(e=ht(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return wi(this,null==e?n.head:"object"==typeof e?mt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return xi(this,mt(this.doc,e),t||"page")},coordsChar:function(e,t){return Ci(this,(e=yi(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=yi(this,{top:e,left:0},t||"page").top,rt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var i,o=!1;if("number"==typeof e){var r=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>r&&(e=r,o=!0),i=et(this.doc,e)}else i=e;return bi(this,i,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-cn(i):0)},defaultTextHeight:function(){return Di(this.display)},defaultCharWidth:function(){return Ni(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,o){var r=this.display,a=(e=wi(this,mt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),r.sizer.appendChild(t),"over"==i)a=e.top;else if("above"==i||"near"==i){var s=Math.max(r.wrapper.clientHeight,this.doc.height),c=Math.max(r.sizer.clientWidth,r.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==o?(l=r.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?l=0:"middle"==o&&(l=(r.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&lo(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Po(fl),triggerOnKeyPress:Po(ml),triggerOnKeyUp:hl,triggerOnMouseDown:Po(xl),execCommand:function(e){if(el.hasOwnProperty(e))return el[e].call(null,this)},triggerElectric:Po(function(e){ql(this,e)}),findPosH:function(e,t,n,i){var o=1;t<0&&(o=-1,t=-t);for(var r=mt(this.doc,e),a=0;a<t&&!(r=Zl(this.doc,r,o,n,i)).hitSide;++a);return r},moveH:Po(function(e,t){var n=this;this.extendSelectionsBy(function(i){return n.display.shift||n.doc.extend||i.empty()?Zl(n.doc,i.head,e,t,n.options.rtlMoveVisually):e<0?i.from():i.to()},q)}),deleteH:Po(function(e,t){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):Qa(this,function(n){var o=Zl(i,n.head,e,t,!1);return e<0?{from:o,to:n.head}:{from:n.head,to:o}})}),findPosV:function(e,t,n,i){var o=1,r=i;t<0&&(o=-1,t=-t);for(var a=mt(this.doc,e),l=0;l<t;++l){var s=wi(this,a,"div");if(null==r?r=s.left:s.left=r,(a=es(this,s,o,n)).hitSide)break}return a},moveV:Po(function(e,t){var n=this,i=this.doc,o=[],r=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy(function(a){if(r)return e<0?a.from():a.to();var l=wi(n,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),o.push(l.left);var s=es(n,l,e,t);return"page"==t&&a==i.sel.primary()&&co(n,xi(n,s,"div").top-l.top),s},q),o.length)for(var a=0;a<i.sel.ranges.length;a++)i.sel.ranges[a].goalColumn=o[a]}),findWordAt:function(e){var t=et(this.doc,e.line).text,n=e.ch,i=e.ch;if(t){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=t.length||!n?++i:--n;for(var r=t.charAt(n),a=re(r,o)?function(e){return re(e,o)}:/\s/.test(r)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!re(e)};n>0&&a(t.charAt(n-1));)--n;for(;i<t.length&&a(t.charAt(i));)++i}return new cr(st(e.line,n),st(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==N(P(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Po(function(e,t){fo(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Xn(this)-this.display.barHeight,width:e.scrollWidth-Xn(this)-this.display.barWidth,clientHeight:Zn(this),clientWidth:Jn(this)}},scrollIntoView:Po(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:st(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?po(this,e):mo(this,e.from,e.to,e.margin)}),setSize:Po(function(e,t){var n=this,i=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=i(e)),null!=t&&(this.display.wrapper.style.height=i(t)),this.options.lineWrapping&&hi(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){zi(n,o,"widget");break}++o}),this.curOp.forceUpdate=!0,ye(this,"refresh",this)}),operation:function(e){return Lo(this,e)},startOperation:function(){return Eo(this)},endOperation:function(){return To(this)},refresh:Po(function(){var e=this.display.cachedTextHeight;Vi(this),this.curOp.forceUpdate=!0,mi(this),fo(this,this.doc.scrollLeft,this.doc.scrollTop),Qo(this.display),(null==e||Math.abs(e-Di(this.display))>.5||this.options.lineWrapping)&&Pi(this),ye(this,"refresh",this)}),swapDoc:Po(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),wr(this,e),mi(this),this.display.input.reset(),fo(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Dn(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ke(e),e.registerHelper=function(t,i,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][i]=o},e.registerGlobalHelper=function(t,i,o,r){e.registerHelper(t,i,r),n[t]._global.push({pred:o,val:r})}}function Zl(e,t,n,i,o){var r=t,a=n,l=et(e,t.line),s=o&&"rtl"==e.direction?-n:n;function c(){var n=t.line+s;return!(n<e.first||n>=e.first+e.size)&&(t=new st(n,t.ch,t.sticky),l=et(e,n))}function u(r){var a;if("codepoint"==i){var u=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new st(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(d?2:1))),-n)}}else a=o?Za(e.cm,l,t,n):Xa(l,t,n);if(null==a){if(r||!c())return!1;t=Ja(o,e.cm,l,t.line,s)}else t=a;return!0}if("char"==i||"codepoint"==i)u();else if("column"==i)u(!0);else if("word"==i||"group"==i)for(var d=null,f="group"==i,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||u(!h);h=!1){var m=l.text.charAt(t.ch)||"\n",g=re(m,p)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(f&&!h&&!g&&(g="s"),d&&d!=g){n<0&&(n=1,u(),t.sticky="after");break}if(g&&(d=g),n>0&&!u(!h))break}var v=Xr(e,t,r,a,!0);return ut(r,v)&&(v.hitSide=!0),v}function es(e,t,n,i){var o,r,a=e.doc,l=t.left;if("page"==i){var s=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||a(e).documentElement.clientHeight),c=Math.max(s-.5*Di(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else"line"==i&&(o=n>0?t.bottom+3:t.top-3);for(;(r=Ci(e,l,o)).outside;){if(n<0?o<=0:o>=a.height){r.hitSide=!0;break}o+=5*n}return r}var ts=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new H,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function ns(e,t){var n=oi(e,t.line);if(!n||n.hidden)return null;var i=et(e.doc,t.line),o=ti(n,i,t.line),r=me(i,e.doc.direction),a="left";r&&(a=pe(r,t.ch)%2?"right":"left");var l=ci(o.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function is(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function os(e,t){return t&&(e.bad=!0),e}function rs(e,t,n,i,o){var r="",a=!1,l=e.doc.lineSeparator(),s=!1;function c(e){return function(t){return t.id==e}}function u(){a&&(r+=l,s&&(r+=l),a=s=!1)}function d(e){e&&(u(),r+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var r,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(st(i,0),st(o+1,0),c(+p));return void(h.length&&(r=h[0].find(0))&&d(tt(e.doc,r.from,r.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&u();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),m&&(a=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;f(t),t!=n;)t=t.nextSibling,s=!1;return r}function as(e,t,n){var i;if(t==e.display.lineDiv){if(!(i=e.display.lineDiv.childNodes[n]))return os(e.clipPos(st(e.display.viewTo-1)),!0);t=null,n=0}else for(i=t;;i=i.parentNode){if(!i||i==e.display.lineDiv)return null;if(i.parentNode&&i.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var r=e.display.view[o];if(r.node==i)return ls(r,t,n)}}function ls(e,t,n){var i=e.text.firstChild,o=!1;if(!t||!D(i,t))return os(st(ot(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var r=e.rest?J(e.rest):e.line;return os(st(ot(r),r.text.length),o)}var a=3==t.nodeType?t:null,l=t;for(!a&&1==t.childNodes.length&&3==t.firstChild.nodeType&&(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var s=e.measure,c=s.maps;function u(t,n,i){for(var o=-1;o<(c?c.length:0);o++)for(var r=o<0?s.map:c[o],a=0;a<r.length;a+=3){var l=r[a+2];if(l==t||l==n){var u=ot(o<0?e.line:e.rest[o]),d=r[a]+i;return(i<0||l!=t)&&(d=r[a+(i?1:0)]),st(u,d)}}}var d=u(a,l,n);if(d)return os(d,o);for(var f=l.nextSibling,p=a?a.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return os(st(d.line,d.ch-p),o);p+=f.textContent.length}for(var h=l.previousSibling,m=n;h;h=h.previousSibling){if(d=u(h,h.firstChild,-1))return os(st(d.line,d.ch+m),o);m+=h.textContent.length}}ts.prototype.init=function(e){var t=this,n=this,i=n.cm,o=n.div=e.lineDiv;function r(e){for(var t=e.target;t;t=t.parentNode){if(t==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(r(e)&&!xe(i,e)){if(i.somethingSelected())Yl({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Ql(i);Yl({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,G),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var a=Wl.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var l=Xl(),s=l.firstChild;i.display.lineSpace.insertBefore(l,i.display.lineSpace.firstChild),s.value=Wl.text.join("\n");var c=N(o.ownerDocument);F(s),setTimeout(function(){i.display.lineSpace.removeChild(l),c.focus(),c==o&&n.showPrimarySelection()},50)}}o.contentEditable=!0,Kl(o,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),ve(o,"paste",function(e){!r(e)||xe(i,e)||$l(e,i)||l<=11&&setTimeout(Fo(i,function(){return t.updateFromDOM()}),20)}),ve(o,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),ve(o,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),ve(o,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ve(o,"touchstart",function(){return n.forceCompositionEnd()}),ve(o,"input",function(){t.composing||t.readFromDOMSoon()}),ve(o,"copy",a),ve(o,"cut",a)},ts.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},ts.prototype.prepareSelection=function(){var e=$i(this.cm,!1);return e.focus=N(this.div.ownerDocument)==this.div,e},ts.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ts.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ts.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),o=i.from(),r=i.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||r.line<t.display.viewFrom)e.removeAllRanges();else{var a=as(t,e.anchorNode,e.anchorOffset),l=as(t,e.focusNode,e.focusOffset);if(!a||a.bad||!l||l.bad||0!=ct(pt(a,l),o)||0!=ct(ft(a,l),r)){var s=t.display.view,c=o.line>=t.display.viewFrom&&ns(t,o)||{node:s[0].measure.map[2],offset:0},u=r.line<t.display.viewTo&&ns(t,r);if(!u){var d=s[s.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(!c||!u)return void e.removeAllRanges();var p,h=e.rangeCount&&e.getRangeAt(0);try{p=S(c.node,c.offset,u.offset,u.node)}catch(m){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):n&&this.startGracePeriod()),this.rememberSelection()}}},ts.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},ts.prototype.showMultipleSelections=function(e){R(this.cm.display.cursorDiv,e.cursors),R(this.cm.display.selectionDiv,e.selection)},ts.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ts.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return D(this.div,t)},ts.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&((!this.selectionInEditor()||N(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ts.prototype.blur=function(){this.div.blur()},ts.prototype.getField=function(){return this.div},ts.prototype.supportsTouch=function(){return!0},ts.prototype.receivedFocus=function(){var e=this,t=this;function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Lo(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,n)},ts.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ts.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&is(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=as(t,e.anchorNode,e.anchorOffset),i=as(t,e.focusNode,e.focusOffset);n&&i&&Lo(t,function(){Yr(t.doc,dr(n,i),G),(n.bad||i.bad)&&(t.curOp.selectionChanged=!0)})}}},ts.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,i=this.cm,o=i.display,r=i.doc.sel.primary(),a=r.from(),l=r.to();if(0==a.ch&&a.line>i.firstLine()&&(a=st(a.line-1,et(i.doc,a.line-1).length)),l.ch==et(i.doc,l.line).text.length&&l.line<i.lastLine()&&(l=st(l.line+1,0)),a.line<o.viewFrom||l.line>o.viewTo-1)return!1;a.line==o.viewFrom||0==(e=ji(i,a.line))?(t=ot(o.view[0].line),n=o.view[0].node):(t=ot(o.view[e].line),n=o.view[e-1].node.nextSibling);var s,c,u=ji(i,l.line);if(u==o.view.length-1?(s=o.viewTo-1,c=o.lineDiv.lastChild):(s=ot(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!n)return!1;for(var d=i.doc.splitLines(rs(i,n,c,t,s)),f=tt(i.doc,st(t,0),st(s,et(i.doc,s).text.length));d.length>1&&f.length>1;)if(J(d)==J(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);p<v&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var _=J(d),b=J(f),y=Math.min(_.length-(1==d.length?p:0),b.length-(1==f.length?p:0));h<y&&_.charCodeAt(_.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==d.length&&1==f.length&&t==a.line)for(;p&&p>a.ch&&_.charCodeAt(_.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=_.slice(0,_.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var x=st(t,p),w=st(s,f.length?J(f).length-h:0);return d.length>1||d[0]||ct(x,w)?(la(i.doc,d,x,w,"+input"),!0):void 0},ts.prototype.ensurePolled=function(){this.forceCompositionEnd()},ts.prototype.reset=function(){this.forceCompositionEnd()},ts.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ts.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},ts.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Lo(this.cm,function(){return Vi(e.cm)})},ts.prototype.setUneditable=function(e){e.contentEditable="false"},ts.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Fo(this.cm,Gl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ts.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ts.prototype.onContextMenu=function(){},ts.prototype.resetPosition=function(){},ts.prototype.needsContentAttribute=!0;var ss=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new H,this.hasSelection=!1,this.composing=null};function cs(e,t){if((t=t?V(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=N(e.ownerDocument);t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function i(){e.value=l.getValue()}var o;if(e.form&&(ve(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var r=e.form;o=r.submit;try{var a=r.submit=function(){i(),r.submit=o,r.submit(),r.submit=a}}catch(s){}}t.finishInit=function(n){n.save=i,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,i(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(be(e.form,"submit",i),!t.leaveSubmitMethodAlone&&"function"==typeof e.form.submit&&(e.form.submit=o))}},e.style.display="none";var l=Vl(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l}function us(e){e.off=be,e.on=ve,e.wheelEventPixels=ar,e.Doc=Sa,e.splitLines=Pe,e.countColumn=z,e.findColumn=Q,e.isWordChar=oe,e.Pass=Y,e.signal=ye,e.Line=fn,e.changeEnd=fr,e.scrollbarModel=ko,e.Pos=st,e.cmpPos=ct,e.modes=He,e.mimeModes=Ue,e.resolveMode=Ge,e.getMode=$e,e.modeExtensions=qe,e.extendMode=Qe,e.copyState=Ke,e.startState=Je,e.innerMode=Xe,e.commands=el,e.keyMap=za,e.keyName=$a,e.isModifierKey=Ya,e.lookupKey=Wa,e.normalizeKeyMap=Ua,e.StringStream=Ze,e.SharedTextMarker=ya,e.TextMarker=_a,e.LineWidget=ha,e.e_preventDefault=Ce,e.e_stopPropagation=Se,e.e_stop=Te,e.addClass=I,e.contains=D,e.rmClass=E,e.keyNames=Pa}ss.prototype.init=function(e){var t=this,n=this,i=this.cm;this.createField(e);var o=this.textarea;function r(e){if(!xe(i,e)){if(i.somethingSelected())Yl({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Ql(i);Yl({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,G):(n.prevInput="",o.value=t.text.join("\n"),F(o))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(o.style.width="0px"),ve(o,"input",function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),ve(o,"paste",function(e){xe(i,e)||$l(e,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())}),ve(o,"cut",r),ve(o,"copy",r),ve(e.scroller,"paste",function(t){if(!$n(e,t)&&!xe(i,t)){if(!o.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var r=new Event("paste");r.clipboardData=t.clipboardData,o.dispatchEvent(r)}}),ve(e.lineSpace,"selectstart",function(t){$n(e,t)||Ce(t)}),ve(o,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),ve(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},ss.prototype.createField=function(e){this.wrapper=Xl(),this.textarea=this.wrapper.firstChild},ss.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ss.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,i=$i(e);if(e.options.moveInputWithCursor){var o=wi(e,n.sel.primary().head,"div"),r=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-r.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-r.left))}return i},ss.prototype.showSelection=function(e){var t=this.cm.display;R(t.cursorDiv,e.cursors),R(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ss.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&F(this.textarea),a&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},ss.prototype.getField=function(){return this.textarea},ss.prototype.supportsTouch=function(){return!1},ss.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!_||N(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},ss.prototype.blur=function(){this.textarea.blur()},ss.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ss.prototype.receivedFocus=function(){this.slowPoll()},ss.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ss.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},ss.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!t.state.focused||Be(n)&&!i&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==i&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===o||b&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var r=o.charCodeAt(0);if(8203==r&&!i&&(i=""),8666==r)return this.reset(),this.cm.execCommand("undo")}for(var s=0,c=Math.min(i.length,o.length);s<c&&i.charCodeAt(s)==o.charCodeAt(s);)++s;return Lo(t,function(){Gl(t,o.slice(s),i.length-s,null,e.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ss.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ss.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},ss.prototype.onContextMenu=function(e){var t=this,n=t.cm,i=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var r=Bi(n,e),c=i.scroller.scrollTop;if(r&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(r)&&Fo(n,Yr)(n.doc,dr(r),G);var u,d=o.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(u=o.ownerDocument.defaultView.scrollY),i.input.focus(),s&&o.ownerDocument.defaultView.scrollTo(null,u),i.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=v,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),a&&l>=9&&g(),k){Te(e);var m=function(){be(window,"mouseup",m),setTimeout(v,20)};ve(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=o.selectionStart){var e=n.somethingSelected(),r=""+(e?o.value:"");o.value="⇚",o.value=r,t.prevInput=e?"":"",o.selectionStart=1,o.selectionEnd=r.length,i.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,o.style.cssText=d,a&&l<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&l<9)&&g();var e=0,r=function(){i.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&""==t.prevInput?Fo(n,Zr)(n):e++<10?i.detectingSelectAll=setTimeout(r,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(r,200)}}},ss.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ss.prototype.setUneditable=function(){},ss.prototype.needsContentAttribute=!1,Pl(Vl),Jl(Vl);var ds="iter insert remove copy getEditor constructor".split(" ");for(var fs in Sa.prototype)Sa.prototype.hasOwnProperty(fs)&&U(ds,fs)<0&&(Vl.prototype[fs]=function(e){return function(){return e.apply(this.doc,arguments)}}(Sa.prototype[fs]));return ke(Sa),Vl.inputStyles={textarea:ss,contenteditable:ts},Vl.defineMode=function(e){!Vl.defaults.mode&&"null"!=e&&(Vl.defaults.mode=e),We.apply(this,arguments)},Vl.defineMIME=Ye,Vl.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Vl.defineMIME("text/plain","null"),Vl.defineExtension=function(e,t){Vl.prototype[e]=t},Vl.defineDocExtension=function(e,t){Sa.prototype[e]=t},Vl.fromTextArea=cs,us(Vl),Vl.version="6.65.7",Vl}()),is.exports}var rs,as=os();(rs=os()).defineMode("javascript",function(e,t){var n,i,o=e.indentUnit,r=t.statementIndent,a=t.jsonld,l=t.json||a,s=!1!==t.trackScope,c=t.typescript,u=t.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),i=e("keyword c"),o=e("keyword d"),r=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:o,break:o,continue:o,new:e("new"),delete:i,void:i,throw:i,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:r,typeof:r,instanceof:r,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:i,export:e("export"),import:e("import"),extends:i,await:i}}(),f=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e){for(var t,n=!1,i=!1;null!=(t=e.next());){if(!n){if("/"==t&&!i)return;"["==t?i=!0:i&&"]"==t&&(i=!1)}n=!n&&"\\"==t}}function m(e,t,o){return n=e,i=o,t}function g(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=v(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if("."==n&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return m(n);if("="==n&&e.eat(">"))return m("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if("/"==n)return e.eat("*")?(t.tokenize=_,_(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):it(e,t,1)?(h(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==n)return t.tokenize=b,b(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),m("meta","meta");if("#"==n&&e.eatWhile(u))return m("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),m("comment","comment");if(f.test(n))return(">"!=n||!t.lexical||">"!=t.lexical.type)&&(e.eat("=")?("!"==n||"="==n)&&e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?m("."):m("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var i=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return m(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",i)}return m("variable","variable",i)}}function v(e){return function(t,n){var i,o=!1;if(a&&"@"==t.peek()&&t.match(p))return n.tokenize=g,m("jsonld-keyword","meta");for(;null!=(i=t.next())&&(i!=e||o);)o=!o&&"\\"==i;return o||(n.tokenize=g),m("string","string")}}function _(e,t){for(var n,i=!1;n=e.next();){if("/"==n&&i){t.tokenize=g;break}i="*"==n}return m("comment","comment")}function b(e,t){for(var n,i=!1;null!=(n=e.next());){if(!i&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}i=!i&&"\\"==n}return m("quasi","string-2",e.current())}var y="([{}])";function x(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));i&&(n=i.index)}for(var o=0,r=!1,a=n-1;a>=0;--a){var l=e.string.charAt(a),s=y.indexOf(l);if(s>=0&&s<3){if(!o){++a;break}if(0==--o){"("==l&&(r=!0);break}}else if(s>=3&&s<6)++o;else if(u.test(l))r=!0;else if(/["'\/`]/.test(l))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==l&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(r&&!o){++a;break}}r&&!o&&(t.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function A(e,t,n,i,o,r){this.indented=e,this.column=t,this.type=n,this.prev=o,this.info=r,null!=i&&(this.align=i)}function k(e,t){if(!s)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var i=e.context;i;i=i.prev)for(n=i.vars;n;n=n.next)if(n.name==t)return!0}function C(e,t,n,i,o){var r=e.cc;for(S.state=e,S.stream=o,S.marked=null,S.cc=r,S.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((r.length?r.pop():l?W:H)(n,i)){for(;r.length&&r[r.length-1].lex;)r.pop()();return S.marked?S.marked:"variable"==n&&k(e,i)?"variable-2":t}}var S={state:null,marked:null,cc:null};function E(){for(var e=arguments.length-1;e>=0;e--)S.cc.push(arguments[e])}function T(){return E.apply(null,arguments),!0}function R(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function O(e){var n=S.state;if(S.marked="def",s){if(n.context)if("var"==n.lexical.info&&n.context&&n.context.block){var i=M(e,n.context);if(null!=i)return void(n.context=i)}else if(!R(e,n.localVars))return void(n.localVars=new I(e,n.localVars));t.globalVars&&!R(e,n.globalVars)&&(n.globalVars=new I(e,n.globalVars))}}function M(e,t){if(t){if(t.block){var n=M(e,t.prev);return n?n==t.prev?t:new N(n,t.vars,!0):null}return R(e,t.vars)?t:new N(t.prev,new I(e,t.vars),!1)}return null}function D(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function N(e,t,n){this.prev=e,this.vars=t,this.block=n}function I(e,t){this.name=e,this.next=t}var L=new I("this",new I("arguments",null));function F(){S.state.context=new N(S.state.context,S.state.localVars,!1),S.state.localVars=L}function P(){S.state.context=new N(S.state.context,S.state.localVars,!0),S.state.localVars=null}function B(){S.state.localVars=S.state.context.vars,S.state.context=S.state.context.prev}function j(e,t){var n=function(){var n=S.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var o=n.lexical;o&&")"==o.type&&o.align;o=o.prev)i=o.indented;n.lexical=new A(i,S.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function V(){var e=S.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function z(e){function t(n){return n==e?T():";"==e||"}"==n||")"==n||"]"==n?E():T(t)}return t}function H(e,t){return"var"==e?T(j("vardef",t),Ee,z(";"),V):"keyword a"==e?T(j("form"),G,H,V):"keyword b"==e?T(j("form"),H,V):"keyword d"==e?S.stream.match(/^\s*$/,!1)?T():T(j("stat"),q,z(";"),V):"debugger"==e?T(z(";")):"{"==e?T(j("}"),P,de,V,B):";"==e?T():"if"==e?("else"==S.state.lexical.info&&S.state.cc[S.state.cc.length-1]==V&&S.state.cc.pop()(),T(j("form"),G,H,V,Ne)):"function"==e?T(Pe):"for"==e?T(j("form"),P,Ie,H,B,V):"class"==e||c&&"interface"==t?(S.marked="keyword",T(j("form","class"==e?e:t),He,V)):"variable"==e?c&&"declare"==t?(S.marked="keyword",T(H)):c&&("module"==t||"enum"==t||"type"==t)&&S.stream.match(/^\s*\w/,!1)?(S.marked="keyword","enum"==t?T(et):"type"==t?T(je,z("operator"),ge,z(";")):T(j("form"),Te,z("{"),j("}"),de,V,V)):c&&"namespace"==t?(S.marked="keyword",T(j("form"),W,H,V)):c&&"abstract"==t?(S.marked="keyword",T(H)):T(j("stat"),oe):"switch"==e?T(j("form"),G,z("{"),j("}","switch"),P,de,V,V,B):"case"==e?T(W,z(":")):"default"==e?T(z(":")):"catch"==e?T(j("form"),F,U,H,V,B):"export"==e?T(j("stat"),Ge,V):"import"==e?T(j("stat"),qe,V):"async"==e?T(H):"@"==t?T(W,H):E(j("stat"),W,z(";"),V)}function U(e){if("("==e)return T(Ve,z(")"))}function W(e,t){return $(e,t,!1)}function Y(e,t){return $(e,t,!0)}function G(e){return"("!=e?E():T(j(")"),q,z(")"),V)}function $(e,t,n){if(S.state.fatArrowAt==S.stream.start){var i=n?ee:Z;if("("==e)return T(F,j(")"),ce(Ve,")"),V,z("=>"),i,B);if("variable"==e)return E(F,Te,z("=>"),i,B)}var o=n?K:Q;return w.hasOwnProperty(e)?T(o):"function"==e?T(Pe,o):"class"==e||c&&"interface"==t?(S.marked="keyword",T(j("form"),ze,V)):"keyword c"==e||"async"==e?T(n?Y:W):"("==e?T(j(")"),q,z(")"),V,o):"operator"==e||"spread"==e?T(n?Y:W):"["==e?T(j("]"),Ze,V,o):"{"==e?ue(ae,"}",null,o):"quasi"==e?E(X,o):"new"==e?T(te(n)):T()}function q(e){return e.match(/[;\}\)\],]/)?E():E(W)}function Q(e,t){return","==e?T(q):K(e,t,!1)}function K(e,t,n){var i=0==n?Q:K,o=0==n?W:Y;if("=>"==e)return T(F,n?ee:Z,B);if("operator"==e)return/\+\+|--/.test(t)||c&&"!"==t?T(i):c&&"<"==t&&S.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?T(j(">"),ce(ge,">"),V,i):"?"==t?T(W,z(":"),o):T(o);if("quasi"==e)return E(X,i);if(";"!=e){if("("==e)return ue(Y,")","call",i);if("."==e)return T(re,i);if("["==e)return T(j("]"),q,z("]"),V,i);if(c&&"as"==t)return S.marked="keyword",T(ge,i);if("regexp"==e)return S.state.lastType=S.marked="operator",S.stream.backUp(S.stream.pos-S.stream.start-1),T(o)}}function X(e,t){return"quasi"!=e?E():"${"!=t.slice(t.length-2)?T(X):T(q,J)}function J(e){if("}"==e)return S.marked="string-2",S.state.tokenize=b,T(X)}function Z(e){return x(S.stream,S.state),E("{"==e?H:W)}function ee(e){return x(S.stream,S.state),E("{"==e?H:Y)}function te(e){return function(t){return"."==t?T(e?ie:ne):"variable"==t&&c?T(ke,e?K:Q):E(e?Y:W)}}function ne(e,t){if("target"==t)return S.marked="keyword",T(Q)}function ie(e,t){if("target"==t)return S.marked="keyword",T(K)}function oe(e){return":"==e?T(V,H):E(Q,z(";"),V)}function re(e){if("variable"==e)return S.marked="property",T()}function ae(e,t){return"async"==e?(S.marked="property",T(ae)):"variable"==e||"keyword"==S.style?(S.marked="property","get"==t||"set"==t?T(le):(c&&S.state.fatArrowAt==S.stream.start&&(n=S.stream.match(/^\s*:\s*/,!1))&&(S.state.fatArrowAt=S.stream.pos+n[0].length),T(se))):"number"==e||"string"==e?(S.marked=a?"property":S.style+" property",T(se)):"jsonld-keyword"==e?T(se):c&&D(t)?(S.marked="keyword",T(ae)):"["==e?T(W,fe,z("]"),se):"spread"==e?T(Y,se):"*"==t?(S.marked="keyword",T(ae)):":"==e?E(se):void 0;var n}function le(e){return"variable"!=e?E(se):(S.marked="property",T(Pe))}function se(e){return":"==e?T(Y):"("==e?E(Pe):void 0}function ce(e,t,n){function i(o,r){if(n?n.indexOf(o)>-1:","==o){var a=S.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),T(function(n,i){return n==t||i==t?E():E(e)},i)}return o==t||r==t?T():n&&n.indexOf(";")>-1?E(e):T(z(t))}return function(n,o){return n==t||o==t?T():E(e,i)}}function ue(e,t,n){for(var i=3;i<arguments.length;i++)S.cc.push(arguments[i]);return T(j(t,n),ce(e,t),V)}function de(e){return"}"==e?T():E(H,de)}function fe(e,t){if(c){if(":"==e)return T(ge);if("?"==t)return T(fe)}}function pe(e,t){if(c&&(":"==e||"in"==t))return T(ge)}function he(e){if(c&&":"==e)return S.stream.match(/^\s*\w+\s+is\b/,!1)?T(W,me,ge):T(ge)}function me(e,t){if("is"==t)return S.marked="keyword",T()}function ge(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(S.marked="keyword",T("typeof"==t?Y:ge)):"variable"==e||"void"==t?(S.marked="type",T(Ae)):"|"==t||"&"==t?T(ge):"string"==e||"number"==e||"atom"==e?T(Ae):"["==e?T(j("]"),ce(ge,"]",","),V,Ae):"{"==e?T(j("}"),_e,V,Ae):"("==e?T(ce(we,")"),ve,Ae):"<"==e?T(ce(ge,">"),ge):"quasi"==e?E(ye,Ae):void 0}function ve(e){if("=>"==e)return T(ge)}function _e(e){return e.match(/[\}\)\]]/)?T():","==e||";"==e?T(_e):E(be,_e)}function be(e,t){return"variable"==e||"keyword"==S.style?(S.marked="property",T(be)):"?"==t||"number"==e||"string"==e?T(be):":"==e?T(ge):"["==e?T(z("variable"),pe,z("]"),be):"("==e?E(Be,be):e.match(/[;\}\)\],]/)?void 0:T()}function ye(e,t){return"quasi"!=e?E():"${"!=t.slice(t.length-2)?T(ye):T(ge,xe)}function xe(e){if("}"==e)return S.marked="string-2",S.state.tokenize=b,T(ye)}function we(e,t){return"variable"==e&&S.stream.match(/^\s*[?:]/,!1)||"?"==t?T(we):":"==e?T(ge):"spread"==e?T(we):E(ge)}function Ae(e,t){return"<"==t?T(j(">"),ce(ge,">"),V,Ae):"|"==t||"."==e||"&"==t?T(ge):"["==e?T(ge,z("]"),Ae):"extends"==t||"implements"==t?(S.marked="keyword",T(ge)):"?"==t?T(ge,z(":"),ge):void 0}function ke(e,t){if("<"==t)return T(j(">"),ce(ge,">"),V,Ae)}function Ce(){return E(ge,Se)}function Se(e,t){if("="==t)return T(ge)}function Ee(e,t){return"enum"==t?(S.marked="keyword",T(et)):E(Te,fe,Me,De)}function Te(e,t){return c&&D(t)?(S.marked="keyword",T(Te)):"variable"==e?(O(t),T()):"spread"==e?T(Te):"["==e?ue(Oe,"]"):"{"==e?ue(Re,"}"):void 0}function Re(e,t){return"variable"!=e||S.stream.match(/^\s*:/,!1)?("variable"==e&&(S.marked="property"),"spread"==e?T(Te):"}"==e?E():"["==e?T(W,z("]"),z(":"),Re):T(z(":"),Te,Me)):(O(t),T(Me))}function Oe(){return E(Te,Me)}function Me(e,t){if("="==t)return T(Y)}function De(e){if(","==e)return T(Ee)}function Ne(e,t){if("keyword b"==e&&"else"==t)return T(j("form","else"),H,V)}function Ie(e,t){return"await"==t?T(Ie):"("==e?T(j(")"),Le,V):void 0}function Le(e){return"var"==e?T(Ee,Fe):"variable"==e?T(Fe):E(Fe)}function Fe(e,t){return")"==e?T():";"==e?T(Fe):"in"==t||"of"==t?(S.marked="keyword",T(W,Fe)):E(W,Fe)}function Pe(e,t){return"*"==t?(S.marked="keyword",T(Pe)):"variable"==e?(O(t),T(Pe)):"("==e?T(F,j(")"),ce(Ve,")"),V,he,H,B):c&&"<"==t?T(j(">"),ce(Ce,">"),V,Pe):void 0}function Be(e,t){return"*"==t?(S.marked="keyword",T(Be)):"variable"==e?(O(t),T(Be)):"("==e?T(F,j(")"),ce(Ve,")"),V,he,B):c&&"<"==t?T(j(">"),ce(Ce,">"),V,Be):void 0}function je(e,t){return"keyword"==e||"variable"==e?(S.marked="type",T(je)):"<"==t?T(j(">"),ce(Ce,">"),V):void 0}function Ve(e,t){return"@"==t&&T(W,Ve),"spread"==e?T(Ve):c&&D(t)?(S.marked="keyword",T(Ve)):c&&"this"==e?T(fe,Me):E(Te,fe,Me)}function ze(e,t){return"variable"==e?He(e,t):Ue(e,t)}function He(e,t){if("variable"==e)return O(t),T(Ue)}function Ue(e,t){return"<"==t?T(j(">"),ce(Ce,">"),V,Ue):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(S.marked="keyword"),T(c?ge:W,Ue)):"{"==e?T(j("}"),We,V):void 0}function We(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&D(t))&&S.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(S.marked="keyword",T(We)):"variable"==e||"keyword"==S.style?(S.marked="property",T(Ye,We)):"number"==e||"string"==e?T(Ye,We):"["==e?T(W,fe,z("]"),Ye,We):"*"==t?(S.marked="keyword",T(We)):c&&"("==e?E(Be,We):";"==e||","==e?T(We):"}"==e?T():"@"==t?T(W,We):void 0}function Ye(e,t){if("!"==t||"?"==t)return T(Ye);if(":"==e)return T(ge,Me);if("="==t)return T(Y);var n=S.state.lexical.prev;return E(n&&"interface"==n.info?Be:Pe)}function Ge(e,t){return"*"==t?(S.marked="keyword",T(Je,z(";"))):"default"==t?(S.marked="keyword",T(W,z(";"))):"{"==e?T(ce($e,"}"),Je,z(";")):E(H)}function $e(e,t){return"as"==t?(S.marked="keyword",T(z("variable"))):"variable"==e?E(Y,$e):void 0}function qe(e){return"string"==e?T():"("==e?E(W):"."==e?E(Q):E(Qe,Ke,Je)}function Qe(e,t){return"{"==e?ue(Qe,"}"):("variable"==e&&O(t),"*"==t&&(S.marked="keyword"),T(Xe))}function Ke(e){if(","==e)return T(Qe,Ke)}function Xe(e,t){if("as"==t)return S.marked="keyword",T(Qe)}function Je(e,t){if("from"==t)return S.marked="keyword",T(W)}function Ze(e){return"]"==e?T():E(ce(Y,"]"))}function et(){return E(j("form"),Te,z("{"),j("}"),ce(tt,"}"),V,V)}function tt(){return E(Te,Me)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return F.lex=P.lex=!0,B.lex=!0,V.lex=!0,{startState:function(e){var n={tokenize:g,lastType:"sof",cc:[],lexical:new A((e||0)-o,0,"block",!1),localVars:t.localVars,context:t.localVars&&new N(null,null,!1),indented:e||0};return t.globalVars&&"object"==typeof t.globalVars&&(n.globalVars=t.globalVars),n},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),x(e,t)),t.tokenize!=_&&e.eatSpace())return null;var o=t.tokenize(e,t);return"comment"==n?o:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",C(t,o,n,i,e))},indent:function(e,n){if(e.tokenize==_||e.tokenize==b)return rs.Pass;if(e.tokenize!=g)return 0;var i,a=n&&n.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(n))for(var s=e.cc.length-1;s>=0;--s){var c=e.cc[s];if(c==V)l=l.prev;else if(c!=Ne&&c!=B)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(i=e.cc[e.cc.length-1])&&(i==Q||i==K)&&!/^[,\.=+\-*:?[\(]/.test(n));)l=l.prev;r&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var u=l.type,d=a==u;return"vardef"==u?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==u&&"{"==a?l.indented:"form"==u?l.indented+o:"stat"==u?l.indented+(nt(e,n)?r||o:0):"switch"!=l.info||d||0==t.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:o):l.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:it,skipExpression:function(e){C(e,"atom","atom","true",new rs.StringStream("",2,null))}}}),rs.registerHelper("wordChars","javascript",/[\w$]/),rs.defineMIME("text/javascript","javascript"),rs.defineMIME("text/ecmascript","javascript"),rs.defineMIME("application/javascript","javascript"),rs.defineMIME("application/x-javascript","javascript"),rs.defineMIME("application/ecmascript","javascript"),rs.defineMIME("application/json",{name:"javascript",json:!0}),rs.defineMIME("application/x-json",{name:"javascript",json:!0}),rs.defineMIME("application/manifest+json",{name:"javascript",json:!0}),rs.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),rs.defineMIME("text/typescript",{name:"javascript",typescript:!0}),rs.defineMIME("application/typescript",{name:"javascript",typescript:!0}),function(e){var t="CodeMirror-hint",n="CodeMirror-hint-active";function i(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var i={hint:t};if(n)for(var o in n)i[o]=n[o];return e.showHint(i)},e.defineExtension("showHint",function(t){t=a(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var o=0;o<n.length;o++)if(n[o].head.line!=n[o].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var r=this.state.completionActive=new i(this,t);!r.options.hint||(e.signal(this,"startCompletion",this),r.update(!0))}}),e.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});var o=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},r=window.cancelAnimationFrame||clearTimeout;function a(e,t,n){var i=e.options.hintOptions,o={};for(var r in h)o[r]=h[r];if(i)for(var r in i)void 0!==i[r]&&(o[r]=i[r]);if(n)for(var r in n)void 0!==n[r]&&(o[r]=n[r]);return o.hint.resolve&&(o.hint=o.hint.resolve(e,t)),o}function l(e){return"string"==typeof e?e:e.text}function s(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var i=e.options.customKeys,o=i?{}:n;function r(e,i){var r;r="string"!=typeof i?function(e){return i(e,t)}:n.hasOwnProperty(i)?n[i]:i,o[e]=r}if(i)for(var a in i)i.hasOwnProperty(a)&&r(a,i[a]);var l=e.options.extraKeys;if(l)for(var a in l)l.hasOwnProperty(a)&&r(a,l[a]);return o}function c(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function u(i,o){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=i,this.data=o,this.picked=!1;var r=this,a=i.cm,u=a.getInputField().ownerDocument,d=u.defaultView||u.parentWindow,f=this.hints=u.createElement("ul");f.setAttribute("role","listbox"),f.setAttribute("aria-expanded","true"),f.id=this.id;var p=i.cm.options.theme;f.className="CodeMirror-hints "+p,this.selectedHint=o.selectedHint||0;for(var h=o.list,m=0;m<h.length;++m){var g=f.appendChild(u.createElement("li")),v=h[m],_=t+(m!=this.selectedHint?"":" "+n);null!=v.className&&(_=v.className+" "+_),g.className=_,m==this.selectedHint&&g.setAttribute("aria-selected","true"),g.id=this.id+"-"+m,g.setAttribute("role","option"),v.render?v.render(g,o,v):g.appendChild(u.createTextNode(v.displayText||l(v))),g.hintId=m}var b=i.options.container||u.body,y=a.cursorCoords(i.options.alignWithWord?o.from:null),x=y.left,w=y.bottom,A=!0,k=0,C=0;if(b!==u.body){var S=-1!==["absolute","relative","fixed"].indexOf(d.getComputedStyle(b).position)?b:b.offsetParent,E=S.getBoundingClientRect(),T=u.body.getBoundingClientRect();k=E.left-T.left-S.scrollLeft,C=E.top-T.top-S.scrollTop}f.style.left=x-k+"px",f.style.top=w-C+"px";var R=d.innerWidth||Math.max(u.body.offsetWidth,u.documentElement.offsetWidth),O=d.innerHeight||Math.max(u.body.offsetHeight,u.documentElement.offsetHeight);b.appendChild(f),a.getInputField().setAttribute("aria-autocomplete","list"),a.getInputField().setAttribute("aria-owns",this.id),a.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var M,D=i.options.moveOnOverlap?f.getBoundingClientRect():new DOMRect,N=!!i.options.paddingForScrollbar&&f.scrollHeight>f.clientHeight+1;if(setTimeout(function(){M=a.getScrollInfo()}),D.bottom-O>0){var I=D.bottom-D.top;if(y.top-(y.bottom-D.top)-I>0)f.style.top=(w=y.top-I-C)+"px",A=!1;else if(I>O){f.style.height=O-5+"px",f.style.top=(w=y.bottom-D.top-C)+"px";var L=a.getCursor();o.from.ch!=L.ch&&(y=a.cursorCoords(L),f.style.left=(x=y.left-k)+"px",D=f.getBoundingClientRect())}}var F,P=D.right-R;if(N&&(P+=a.display.nativeBarWidth),P>0&&(D.right-D.left>R&&(f.style.width=R-5+"px",P-=D.right-D.left-R),f.style.left=(x=Math.max(y.left-P-k,0))+"px"),N)for(var B=f.firstChild;B;B=B.nextSibling)B.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=s(i,{moveFocus:function(e,t){r.changeActive(r.selectedHint+e,t)},setFocus:function(e){r.changeActive(e)},menuSize:function(){return r.screenAmount()},length:h.length,close:function(){i.close()},pick:function(){r.pick()},data:o})),i.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){F=setTimeout(function(){i.close()},100)}),a.on("focus",this.onFocus=function(){clearTimeout(F)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect();M||(M=a.getScrollInfo());var n=w+M.top-e.top,o=n-(d.pageYOffset||(u.documentElement||u.body).scrollTop);if(A||(o+=f.offsetHeight),o<=t.top||o>=t.bottom)return i.close();f.style.top=n+"px",f.style.left=x+M.left-e.left+"px"}),e.on(f,"dblclick",function(e){var t=c(f,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),r.pick())}),e.on(f,"click",function(e){var t=c(f,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),i.options.completeOnSingleClick&&r.pick())}),e.on(f,"mousedown",function(){setTimeout(function(){a.focus()},20)});var j=this.getSelectedHintRange();return(0!==j.from||0!==j.to)&&this.scrollToActive(),e.signal(o,"select",h[this.selectedHint],f.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],i=0;i<t.length;i++)t[i].supportsSelection&&n.push(t[i]);return n}function f(e,t,n,i){if(e.async)e(t,i,n);else{var o=e(t,n);o&&o.then?o.then(i):i(o)}}function p(t,n){var i,o=t.getHelpers(n,"hint");if(o.length){var r=function(e,t,n){var i=d(e,o);function r(o){if(o==i.length)return t(null);f(i[o],e,n,function(e){e&&e.list.length>0?t(e):r(o+1)})}r(0)};return r.async=!0,r.supportsSelection=!0,r}return(i=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:i})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}i.prototype={close:function(){!this.active()||(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var i=t.list[n],o=this;this.cm.operation(function(){i.hint?i.hint(o.cm,t,i):o.cm.replaceRange(l(i),i.from||t.from,i.to||t.to,"complete"),e.signal(t,"pick",i),o.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(r(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var i=this;this.debounce=o(function(){i.update()}),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;f(this.options.hint,this.cm,this.options,function(i){t.tick==n&&t.finishUpdate(i,e)})}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var i=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(i&&1==t.list.length?this.pick(t,0):(this.widget=new u(this,t),e.signal(t,"shown")))}},u.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,i){if(t>=this.data.list.length?t=i?this.data.list.length-1:0:t<0&&(t=i?0:this.data.list.length-1),this.selectedHint!=t){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+n,""),o.removeAttribute("aria-selected")),(o=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,o.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",o.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],o)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],i=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-i.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+i.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",function(t,n){var i,o=t.getCursor(),r=t.getTokenAt(o),a=e.Pos(o.line,r.start),l=o;r.start<o.ch&&/\w/.test(r.string.charAt(o.ch-r.start-1))?i=r.string.substr(0,o.ch-r.start):(i="",a=o);for(var s=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,i.length)==i&&s.push(u)}if(s.length)return{list:s,from:a,to:l}}),e.commands.autocomplete=e.showHint;var h={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(os()),function(e){var t=e.Pos;function n(e,t){for(var n=0,i=e.length;n<i;++n)t(e[n])}function i(e,t){if(!Array.prototype.indexOf){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1}return-1!=e.indexOf(t)}function o(n,i,o,r){var a=n.getCursor(),l=o(n,a);if(!/\b(?:string|comment)\b/.test(l.type)){var s=e.innerMode(n.getMode(),l.state);if("json"!==s.mode.helperType){l.state=s.state,/^[\w$_]*$/.test(l.string)?l.end>a.ch&&(l.end=a.ch,l.string=l.string.slice(0,a.ch-l.start)):l={start:a.ch,end:a.ch,string:"",state:l.state,type:"."==l.string?"property":null};for(var c=l;"property"==c.type;){if("."!=(c=o(n,t(a.line,c.start))).string)return;if(c=o(n,t(a.line,c.start)),!u)var u=[];u.push(c)}return{list:h(l,u,i,r),from:t(a.line,l.start),to:t(a.line,l.end)}}}}function r(e,t){return o(e,d,function(e,t){return e.getTokenAt(t)},t)}function a(e,t){var n=e.getTokenAt(t);return t.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function l(e,t){return o(e,f,a,t)}e.registerHelper("hint","javascript",r),e.registerHelper("hint","coffeescript",l);var s="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),c="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),u="prototype apply call bind".split(" "),d="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),f="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ");function p(e,t){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var n=e;n;n=Object.getPrototypeOf(n))Object.getOwnPropertyNames(n).forEach(t);else for(var i in e)t(i)}function h(e,t,o,r){var a=[],l=e.string,d=r&&r.globalScope||window;function f(e){0==e.lastIndexOf(l,0)&&!i(a,e)&&a.push(e)}function h(e){"string"==typeof e?n(s,f):e instanceof Array?n(c,f):e instanceof Function&&n(u,f),p(e,f)}if(t&&t.length){var m,g=t.pop();for(g.type&&0===g.type.indexOf("variable")?(r&&r.additionalContext&&(m=r.additionalContext[g.string]),(!r||!1!==r.useGlobalScope)&&(m=m||d[g.string])):"string"==g.type?m="":"atom"==g.type?m=1:"function"==g.type&&(null==d.jQuery||"$"!=g.string&&"jQuery"!=g.string||"function"!=typeof d.jQuery?null!=d._&&"_"==g.string&&"function"==typeof d._&&(m=d._()):m=d.jQuery());null!=m&&t.length;)m=m[t.pop().string];null!=m&&h(m)}else{for(var v=e.state.localVars;v;v=v.next)f(v.name);for(var _=e.state.context;_;_=_.prev)for(v=_.vars;v;v=v.next)f(v.name);for(v=e.state.globalVars;v;v=v.next)f(v.name);if(r&&null!=r.additionalContext)for(var b in r.additionalContext)f(b);(!r||!1!==r.useGlobalScope)&&h(d),n(o,f)}return a}}(os());const ls=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},ss=e({name:"FnEditor",emits:["update:modelValue","change"],props:{modelValue:[String,Function],name:String,args:Array,body:Boolean,button:Boolean,fnx:Boolean},inject:["designer"],data:()=>({editor:null,fn:"",visible:!1,value:""}),watch:{modelValue(e){e!=this.value&&(!e||!e.__json||e.__json&&e.__json!=this.value)&&this.editor&&this.editor.setValue(this.tidyValue())}},computed:{t(){return this.designer.setupState.t},argStr(){return(this.args||[]).map(e=>"string"==typeof e?e:e.name).join(", ")},argList(){return this.args.map(e=>"string"==typeof e?{name:e,type:"string"}:e)}},mounted(){this.$nextTick(()=>{this.load()})},methods:{save(){const e=this.editor.getValue()||"";if(""===e.trim())this.fn="";else{let t;try{t=new Function("return function ("+this.argStr+"){\n"+e+"\n}")()}catch(rs){return pi(this.t("struct.errorMsg")),!1}this.body?this.fn=(this.fnx?"$FNX:":"")+e:this.fn="[[FORM-CREATE-PREFIX-"+t+"-FORM-CREATE-SUFFIX]]"}return this.submit(),!0},submit(){this.$emit("update:modelValue",this.fn),this.$emit("change",this.fn),this.value=this.fn,this.visible=!1},trimString(e){const t=e.indexOf("{"),n=e.lastIndexOf("}");return-1===t||-1===n||t>=n?e:e.slice(t+1,n).replace(/^\n+|\n+$/g,"")},tidyValue(){let e=this.modelValue||"";return e.__json&&(e=e.__json),this.fnx&&"string"==typeof e&&0===e.indexOf("$FNX:")&&(e=e.slice(5)),"function"==typeof e?e=this.trimString(wi(e)).trim():this.body||(e=this.trimString(e).trim()),this.value=e,e},load(){this.$nextTick(()=>{let e=this.tidyValue();this.editor=g(as(this.$refs.editor,{lineNumbers:!0,mode:{name:"javascript",globalVars:!0},extraKeys:{"Ctrl-Space":"autocomplete"},line:!0,tabSize:2,lineWrapping:!0,value:e})),this.editor.on("inputRead",(e,t)=>{32===t.keyCode&&t.ctrlKey&&as.showHint(e,as.hint.javascript)}),this.editor.on("change",()=>{this.visible=!0}),this.editor})}}}),cs={class:"_fd-fn"},us={class:"_fd-fn-tip"},ds={class:"cm-keyword"},fs={key:0},ps={class:"_fd-fn-arg"},hs=["innerHTML"],ms={ref:"editor",class:"_fd-fn-editor"};const gs=ls(ss,[["render",function(e,a,c,u,d,f){const p=t("el-table-column"),h=t("el-table"),m=t("el-popover"),g=t("el-button");return i(),r("div",cs,[M("div",us,[a[2]||(a[2]=M("div",{class:"_fd-fn-ind"},null,-1)),M("div",ds,[M("span",null,[V("function "+j(e.name)+"(",1),(i(!0),r(l,null,s(e.argList,(t,s)=>(i(),r(l,null,[V(j(s>0?", ":""),1),"string"===t.type?(i(),r("span",fs,j(t.name),1)):(i(),n(m,{key:1,placement:"top-start",width:400,"hide-after":0,trigger:"click",title:t.name},{reference:o(()=>[M("span",ps,[V(j(t.name),1),a[0]||(a[0]=M("i",{class:"fc-icon icon-question"},null,-1))])]),default:o(()=>[t.info?(i(),r("div",{key:0,class:"_fd-fn-info",innerHTML:t.info||""},null,8,hs)):F("",!0),t.columns?(i(),n(h,{key:1,data:t.columns,border:""},{default:o(()=>[_(p,{width:"120",property:"label",label:e.t("props.field")},null,8,["label"]),_(p,{property:"info",label:e.t("event.info")},null,8,["label"]),_(p,{width:"80",property:"type",label:e.t("event.type")},null,8,["label"])]),_:2},1032,["data"])):F("",!0)]),_:2},1032,["title"]))],64))),256)),a[1]||(a[1]=V(") {"))])])]),M("div",ms,null,512),a[3]||(a[3]=M("div",{class:"_fd-fn-tip"},[M("div",{class:"_fd-fn-ind"}),M("div",{class:"cm-keyword"},"}")],-1)),e.visible&&e.button?(i(),n(g,{key:0,type:"primary",size:"small",onClick:e.save},{default:o(()=>[V(j(e.t("props.save")),1)]),_:1},8,["onClick"])):F("",!0)])}]]),vs="$FNX:",_s=e=>ei.String(e)&&0===e.indexOf(vs),bs=e({name:"EventConfig",emits:["update:modelValue"],props:{modelValue:[Object,void 0,null],componentName:String,eventName:{type:Array,default:()=>[]}},inject:["designer"],components:{FnEditor:gs},data:()=>({visible:!1,activeData:null,val:null,defActive:"no",hookList:["hook_load","hook_mounted","hook_deleted","hook_watch","hook_value","hook_hidden","hook_titleClick"],event:{},cus:!1,cusValue:"",eventStr:""}),computed:{t(){return this.designer.setupState.t},activeRule(){return this.designer.setupState.activeRule},orgEvent(){return this.eventName&&this.eventName.length?this.eventName:["click"]},eventList(){return this.orgEvent.map(e=>"object"==typeof e?e.name:e)},eventInfo(){const e={};return this.orgEvent.forEach(t=>{"object"==typeof t?e[t.name]=this.t("com."+this.componentName+".event."+t.name)||t.info||this.t("eventInfo."+t.name)||"":e[t]=this.t("com."+this.componentName+".event."+t)||this.t("eventInfo."+t)||""}),this.hookList.forEach(t=>{e[t]=this.t("eventInfo."+t)||""}),e},eventNum(){let e=0;Object.keys(this.modelValue||{}).forEach(t=>{e+=Array.isArray(this.modelValue[t])?this.modelValue[t].length:1});const t=this.activeRule?{...this.activeRule._hook||{}}:{};return Object.keys(t).forEach(n=>{e+=Array.isArray(t[n])?t[n].length:1}),e},fnArgs(){return[Ni(this.t)]}},watch:{visible(e){this.event=e?this.loadFN():{},e||(this.destroy(),this.closeCus())}},methods:{addCus(){const e=this.cusValue&&this.cusValue.trim();e&&(this.closeCus(),this.add(e))},closeCus(){this.cus=!1,this.cusValue=""},cusEvent(){this.cus=!0},loadFN(){const e=ii({},this.modelValue||{}),t=this.activeRule?{...this.activeRule._hook||{}}:{};Object.keys(t).forEach(n=>{e["hook_"+n]=t[n]});const n={};return Object.keys(e).forEach(t=>{if(Array.isArray(e[t])){const i=[];e[t].forEach(e=>{_s(e)?i.push(e.replace(vs,"")):ei.Function(e)&&_s(e.__json)?i.push(e.__json.replace(vs,"")):e&&0===e.indexOf("$GLOBAL:")&&i.push(e)}),n[t]=i}else if(_s(e[t]))n[t]=[e[t].replace(vs,"")];else if(ei.Function(e[t])){const i=e[t].__json||"";i?_s(i)?n[t]=[i.replace(vs,"")]:n[t]=[i]:n[t]=[""+e[t]]}else e[t]&&0===e[t].indexOf("$GLOBAL:")&&(n[t]=[e[t]])}),n},parseFN(e){const t={},n={};return Object.keys(e).forEach(i=>{const o=[];e[i].forEach((e,t)=>{o[t]=0!==e.indexOf("$GLOBAL:")?vs+e:e}),o.length>0&&(i.indexOf("hook_")>-1?n[i.replace("hook_","")]=1===o.length?o[0]:o:t[i]=1===o.length?o[0]:o)}),{hooks:n,on:t}},add(e){let t={};if(Array.isArray(this.event[e]))this.event[e].push(""),t={name:e,item:this.event[e],index:this.event[e].length-1};else if(this.event[e]){const n=[this.event[e],""];this.event[e]=n,t={name:e,item:n,index:1}}else{const n=[""];this.event[e]=n,t={name:e,item:n,index:0}}this.activeData||this.edit(t)},edit(e){e.key=Wi(),e.item?this.val=e.item[e.index]:this.val=this.event[e.name],this.activeData=e,this.eventStr=this.val,this.defActive=e.name+(e.index||0)},save(){if(!this.$refs.fn.save())return;const e=this.eventStr;this.activeData.item?this.activeData.item[this.activeData.index]=e:this.event[this.activeData.name]=e,this.destroy()},rm(e){void 0!==e.index?(e.item.splice(e.index,1),0===e.item.length&&delete this.event[e.name]):delete this.event[e.name],this.defActive===e.name+(e.index||0)&&this.destroy()},destroy(){this.activeData=null,this.val=null,this.defActive="no"},close(){this.destroy()},submit(){if(this.activeData)return pi(this.t("event.saveMsg"));const{on:e,hooks:t}=this.parseFN(this.event);this.$emit("update:modelValue",e),this.activeRule._hook=t,this.visible=!1,this.destroy(),this.closeCus()}},beforeCreate(){window.$inject={$f:{},rule:[],self:{},option:{},inject:{},args:[]}}}),ys={class:"_fd-event"},xs={class:"el-dropdown-link"},ws={class:"_fd-event-item"},As={key:0,class:"_fd-label"},ks={class:"_fd-event-item"},Cs={class:"_fd-label"},Ss=["onClick"],Es={class:"_fd-event-method"},Ts={key:0,class:"_fd-label"},Rs=["onClick"],Os=["onClick"],Ms={class:"_fd-event-method"},Ds={key:0,class:"_fd-label"},Ns=["onClick"],Is={target:"_blank",href:"https://form-create.com/v3/instance/"};const Ls=ls(bs,[["render",function(e,a,c,u,d,f){const p=t("el-button"),h=t("el-badge"),m=t("el-dropdown-item"),g=t("el-dropdown-menu"),v=t("el-dropdown"),b=t("el-header"),y=t("el-menu-item"),x=t("el-input"),w=t("el-menu"),A=t("el-main"),k=t("el-container"),C=t("el-aside"),S=t("FnEditor"),E=t("el-dialog");return i(),r("div",ys,[_(h,{value:e.eventNum,type:"warning",hidden:e.eventNum<1},{default:o(()=>[_(p,{size:"small",onClick:a[0]||(a[0]=t=>e.visible=!0)},{default:o(()=>[V(j(e.t("event.title")),1)]),_:1})]),_:1},8,["value","hidden"]),_(E,{class:"_fd-event-dialog",title:e.t("event.title"),modelValue:e.visible,"onUpdate:modelValue":a[8]||(a[8]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"1080px"},{footer:o(()=>[M("div",null,[_(p,{size:"default",onClick:a[7]||(a[7]=t=>e.visible=!1)},{default:o(()=>[V(j(e.t("props.cancel")),1)]),_:1}),_(p,{type:"primary",size:"default",onClick:e.submit,color:"#2f73ff"},{default:o(()=>[V(j(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:o(()=>[_(k,{class:"_fd-event-con",style:{height:"600px"}},{default:o(()=>[_(C,{style:{width:"300px"}},{default:o(()=>[_(k,{class:"_fd-event-l"},{default:o(()=>[_(b,{class:"_fd-event-head",height:"40px"},{default:o(()=>[_(v,{"popper-class":"_fd-event-dropdown",trigger:"click",size:"default",placement:"bottom-start"},{dropdown:o(()=>[_(g,null,{default:o(()=>[(i(!0),r(l,null,s(e.eventList,t=>(i(),n(m,{key:t,onClick:n=>e.add(t),disabled:Object.keys(e.event).indexOf(t)>-1},{default:o(()=>[M("div",ws,[M("span",null,j(t),1),e.eventInfo[t]?(i(),r("span",As,j(e.eventInfo[t]),1)):F("",!0)])]),_:2},1032,["onClick","disabled"]))),128)),(i(!0),r(l,null,s(e.hookList,(t,r)=>(i(),n(m,{divided:e.eventList.length>0&&!r,onClick:n=>e.add(t),disabled:Object.keys(e.event).indexOf(t)>-1},{default:o(()=>[M("div",ks,[M("div",null,j(t),1),M("span",Cs,j(e.eventInfo[t]),1)])]),_:2},1032,["divided","onClick","disabled"]))),256)),_(m,{divided:e.eventList.length>0,onClick:e.cusEvent},{default:o(()=>[M("div",null,j(e.t("props.custom")),1)]),_:1},8,["divided","onClick"])]),_:1})]),default:o(()=>[M("span",xs,[_(p,{link:"",type:"primary",size:"default"},{default:o(()=>[V(j(e.t("event.create")),1),a[9]||(a[9]=M("i",{class:"el-icon-arrow-down el-icon--right"},null,-1))]),_:1,__:[9]})])]),_:1})]),_:1}),_(A,null,{default:o(()=>[_(w,{"default-active":e.defActive,modelValue:e.activeData,"onUpdate:modelValue":a[5]||(a[5]=t=>e.activeData=t)},{default:o(()=>[(i(!0),r(l,null,s(e.event,(t,c)=>(i(),r(l,null,[Array.isArray(t)?(i(!0),r(l,{key:0},s(t,(l,s)=>(i(),n(y,{key:c+s,index:c+s},{default:o(()=>[M("div",{class:"_fd-event-title",onClick:z(n=>e.edit({name:c,item:t,index:s}),["stop"])},[M("div",Es,[M("span",null,[a[10]||(a[10]=V("function")),M("span",null,j(c),1)]),e.eventInfo[c]?(i(),r("span",Ts,j(e.eventInfo[c]),1)):F("",!0)]),M("i",{class:"fc-icon icon-delete",onClick:z(n=>e.rm({name:c,item:t,index:s}),["stop"])},null,8,Rs)],8,Ss)]),_:2},1032,["index"]))),128)):(i(),n(y,{key:1,index:c+0},{default:o(()=>[M("div",{class:"_fd-event-title",onClick:z(t=>e.edit({name:c}),["stop"])},[M("div",Ms,[M("span",null,[a[11]||(a[11]=V("function")),M("span",null,j(c),1)]),e.eventInfo[c]?(i(),r("span",Ds,j(e.eventInfo[c]),1)):F("",!0)]),M("i",{class:"fc-icon icon-delete",onClick:z(t=>e.rm({name:c}),["stop"])},null,8,Ns)],8,Os)]),_:2},1032,["index"]))],64))),256)),e.cus?(i(),n(y,{key:0,style:{"padding-left":"10px"},index:"custom"},{default:o(()=>[M("div",{class:"_fd-event-title",onClick:a[4]||(a[4]=z(()=>{},["stop"]))},[_(x,{type:"text",modelValue:e.cusValue,"onUpdate:modelValue":a[1]||(a[1]=t=>e.cusValue=t),size:"default",onKeydown:G(e.addCus,["enter"]),placeholder:e.t("event.placeholder")},null,8,["modelValue","onKeydown","placeholder"]),M("div",null,[M("i",{class:"fc-icon icon-add",onClick:a[2]||(a[2]=z((...t)=>e.addCus&&e.addCus(...t),["stop"]))}),M("i",{class:"fc-icon icon-delete",onClick:a[3]||(a[3]=z((...t)=>e.closeCus&&e.closeCus(...t),["stop"]))})])])]),_:1})):F("",!0)]),_:1},8,["default-active","modelValue"])]),_:1})]),_:1})]),_:1}),_(A,null,{default:o(()=>[_(k,{class:"_fd-event-r"},{default:o(()=>[e.activeData?(i(),n(b,{key:0,class:"_fd-event-head",height:"40px"},{default:o(()=>[M("div",null,[M("a",Is,j(e.t("form.document")),1)]),M("div",null,[_(p,{size:"small",onClick:e.close},{default:o(()=>[V(j(e.t("props.cancel")),1)]),_:1},8,["onClick"]),_(p,{size:"small",type:"primary",onClick:e.save,color:"#2f73ff"},{default:o(()=>[V(j(e.t("props.save")),1)]),_:1},8,["onClick"])])]),_:1})):F("",!0),e.activeData?(i(),n(A,{key:1},{default:o(()=>[_(S,{ref:"fn",modelValue:e.eventStr,"onUpdate:modelValue":a[6]||(a[6]=t=>e.eventStr=t),body:"",name:e.activeData.name,args:e.fnArgs,style:{height:"558px"}},null,8,["modelValue","name","args"])]),_:1})):F("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["title","modelValue"])])}]]);function Fs(e,t){var n=null;return function(...i){null!==n&&clearTimeout(n),n=setTimeout(()=>e.call(this,...i),t)}}
/*!
Highlight.js v11.9.0 (git: b7ec4bfafc)
(c) 2006-2024 undefined and other contributors
License: BSD-3-Clause
*/function Ps(e){return e instanceof Map?e.clear=e.delete=e.set=()=>{throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=()=>{throw Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],i=typeof n;"object"!==i&&"function"!==i||Object.isFrozen(n)||Ps(n)}),e}class Bs{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function js(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Vs(e,...t){const n=Object.create(null);for(const i in e)n[i]=e[i];return t.forEach(e=>{for(const t in e)n[t]=e[t]}),n}const zs=e=>!!e.scope;class Hs{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=js(e)}openNode(e){if(!zs(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return["".concat(t).concat(n.shift()),...n.map((e,t)=>"".concat(e).concat("_".repeat(t+1)))].join(" ")}return"".concat(t).concat(e)})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){zs(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+='<span class="'.concat(e,'">')}}const Us=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Ws{constructor(){this.rootNode=Us(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=Us({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{Ws._collapse(e)}))}}class Ys extends Ws{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope="language:"+t),this.add(n)}toHTML(){return new Hs(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Gs(e){return e?"string"==typeof e?e:e.source:null}function $s(e){return Ks("(?=",e,")")}function qs(e){return Ks("(?:",e,")*")}function Qs(e){return Ks("(?:",e,")?")}function Ks(...e){return e.map(e=>Gs(e)).join("")}function Xs(...e){return"("+((e=>{const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}})(e).capture?"":"?:")+e.map(e=>Gs(e)).join("|")+")"}function Js(e){return RegExp(e.toString()+"|").exec("").length-1}const Zs=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ec(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;const t=n;let i=Gs(e),o="";for(;i.length>0;){const e=Zs.exec(i);if(!e){o+=i;break}o+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+(Number(e[1])+t):(o+=e[0],"("===e[0]&&n++)}return o}).map(e=>"(".concat(e,")")).join(t)}const tc="[a-zA-Z]\\w*",nc="[a-zA-Z_]\\w*",ic="\\b\\d+(\\.\\d+)?",oc="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",rc="\\b(0b[01]+)",ac={begin:"\\\\[\\s\\S]",relevance:0},lc={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ac]},sc={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ac]},cc=(e,t,n={})=>{const i=Vs({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=Xs("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:Ks(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},uc=cc("//","$"),dc=cc("/\\*","\\*/"),fc=cc("#","$");var pc=Object.freeze({__proto__:null,APOS_STRING_MODE:lc,BACKSLASH_ESCAPE:ac,BINARY_NUMBER_MODE:{scope:"number",begin:rc,relevance:0},BINARY_NUMBER_RE:rc,COMMENT:cc,C_BLOCK_COMMENT_MODE:dc,C_LINE_COMMENT_MODE:uc,C_NUMBER_MODE:{scope:"number",begin:oc,relevance:0},C_NUMBER_RE:oc,END_SAME_AS_BEGIN:e=>Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}}),HASH_COMMENT_MODE:fc,IDENT_RE:tc,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:{begin:"\\.\\s*"+nc,relevance:0},NUMBER_MODE:{scope:"number",begin:ic,relevance:0},NUMBER_RE:ic,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:sc,REGEXP_MODE:{scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ac,{begin:/\[/,end:/\]/,relevance:0,contains:[ac]}]},RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Ks(t,/.*\b/,e.binary,/\b.*/)),Vs({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:{scope:"title",begin:tc,relevance:0},UNDERSCORE_IDENT_RE:nc,UNDERSCORE_TITLE_MODE:{scope:"title",begin:nc,relevance:0}});function hc(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function mc(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function gc(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=hc,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function vc(e,t){Array.isArray(e.illegal)&&(e.illegal=Xs(...e.illegal))}function _c(e,t){if(e.match){if(e.begin||e.end)throw Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function bc(e,t){void 0===e.relevance&&(e.relevance=1)}const yc=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=Ks(n.beforeMatch,$s(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},xc=["of","and","for","in","not","or","if","then","parent","list","value"];function wc(e,t,n="keyword"){const i=Object.create(null);return"string"==typeof e?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(n=>{Object.assign(i,wc(e[n],t,n))}),i;function o(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(t=>{const n=t.split("|");i[n[0]]=[e,Ac(n[0],n[1])]})}}function Ac(e,t){return t?Number(t):(e=>xc.includes(e.toLowerCase()))(e)?0:1}const kc={},Cc=(e,t)=>{kc["".concat(e,"/").concat(t)]||(kc["".concat(e,"/").concat(t)]=!0)},Sc=Error();function Ec(e,t,{key:n}){let i=0;const o=e[n],r={},a={};for(let l=1;l<=t.length;l++)a[l+i]=o[l],r[l+i]=!0,i+=Js(t[l-1]);e[n]=a,e[n]._emit=r,e[n]._multi=!0}function Tc(e){var t;(t=e).scope&&"object"==typeof t.scope&&null!==t.scope&&(t.beginScope=t.scope,delete t.scope),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),(e=>{if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Sc;if("object"!=typeof e.beginScope||null===e.beginScope)throw Sc;Ec(e,e.begin,{key:"beginScope"}),e.begin=ec(e.begin,{joinWith:""})}})(e),(e=>{if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Sc;if("object"!=typeof e.endScope||null===e.endScope)throw Sc;Ec(e,e.end,{key:"endScope"}),e.end=ec(e.end,{joinWith:""})}})(e)}function Rc(e){function t(t,n){return RegExp(Gs(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=Js(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(ec(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&(!n||n.index!==this.lastIndex)){const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Vs(e.classNameAliases||{}),function n(o,r){const a=o;if(o.isCompiled)return a;[mc,_c,Tc,yc].forEach(e=>e(o,r)),e.compilerExtensions.forEach(e=>e(o,r)),o.__beforeBegin=null,[gc,vc,bc].forEach(e=>e(o,r)),o.isCompiled=!0;let l=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),l=o.keywords.$pattern,delete o.keywords.$pattern),l=l||/\w+/,o.keywords&&(o.keywords=wc(o.keywords,e.case_insensitive)),a.keywordPatternRe=t(l,!0),r&&(o.begin||(o.begin=/\B|\b/),a.beginRe=t(a.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(a.endRe=t(a.end)),a.terminatorEnd=Gs(a.end)||"",o.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(o.end?"|":"")+r.terminatorEnd)),o.illegal&&(a.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(e=>{return(t="self"===e?o:e).variants&&!t.cachedVariants&&(t.cachedVariants=t.variants.map(e=>Vs(t,{variants:null},e))),t.cachedVariants?t.cachedVariants:Oc(t)?Vs(t,{starts:t.starts?Vs(t.starts):null}):Object.isFrozen(t)?Vs(t):t;var t})),o.contains.forEach(e=>{n(e,a)}),o.starts&&n(o.starts,r),a.matcher=(e=>{const t=new i;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(a),a}(e)}function Oc(e){return!!e&&(e.endsWithParent||Oc(e.starts))}class Mc extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Dc=js,Nc=Vs,Ic=Symbol("nomatch"),Lc=e=>{const t=Object.create(null),n=Object.create(null),i=[];let o=!0;const r="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Ys};function s(e){return l.noHighlightRe.test(e)}function c(e,t,n){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language):(Cc("10.7.0","highlight(lang, code, ...args) has been deprecated."),Cc("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,i=t),void 0===n&&(n=!0);const r={code:i,language:o};_("before:highlight",r);const a=r.result?r.result:u(r.language,r.code,n);return a.code=r.code,_("after:highlight",a),a}function u(e,n,i,a){const s=Object.create(null);function c(){if(!C.keywords)return E.addText(T);let e=0;C.keywordPatternRe.lastIndex=0;let t=C.keywordPatternRe.exec(T),n="";for(;t;){n+=T.substring(e,t.index);const o=w.case_insensitive?t[0].toLowerCase():t[0],r=(i=o,C.keywords[i]);if(r){const[e,i]=r;if(E.addText(n),n="",s[o]=(s[o]||0)+1,s[o]<=7&&(R+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(T)}var i;n+=T.substring(e),E.addText(n)}function f(){null!=C.subLanguage?(()=>{if(""===T)return;let e=null;if("string"==typeof C.subLanguage){if(!t[C.subLanguage])return E.addText(T);e=u(C.subLanguage,T,!0,S[C.subLanguage]),S[C.subLanguage]=e._top}else e=d(T,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(R+=e.relevance),E.__addSublanguage(e._emitter,e.language)})():c(),T=""}function p(e,t){""!==e&&(E.startScope(t),E.addText(e),E.endScope())}function h(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=w.classNameAliases[e[n]]||e[n],o=t[n];i?p(o,i):(T=o,c(),T=""),n++}}function g(e,t){return e.scope&&"string"==typeof e.scope&&E.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(T,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),T=""):e.beginScope._multi&&(h(e.beginScope,t),T="")),C=Object.create(e,{parent:{value:C}}),C}function v(e,t,n){let i=((e,t)=>{const n=e&&e.exec(t);return n&&0===n.index})(e.endRe,n);if(i){if(e["on:end"]){const n=new Bs(e);e["on:end"](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return v(e.parent,t,n)}function _(e){return 0===C.matcher.regexIndex?(T+=e[0],1):(D=!0,0)}function b(e){const t=e[0],i=n.substring(e.index),o=v(C,e,i);if(!o)return Ic;const r=C;C.endScope&&C.endScope._wrap?(f(),p(t,C.endScope._wrap)):C.endScope&&C.endScope._multi?(f(),h(C.endScope,e)):r.skip?T+=t:(r.returnEnd||r.excludeEnd||(T+=t),f(),r.excludeEnd&&(T=t));do{C.scope&&E.closeNode(),C.skip||C.subLanguage||(R+=C.relevance),C=C.parent}while(C!==o.parent);return o.starts&&g(o.starts,e),r.returnEnd?0:t.length}let y={};function x(t,r){const a=r&&r[0];if(T+=t,null==a)return f(),0;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===a){if(T+=n.slice(r.index,r.index+1),!o){const t=Error("0 width match regex (".concat(e,")"));throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=r,"begin"===r.type)return(e=>{const t=e[0],n=e.rule,i=new Bs(n),o=[n.__beforeBegin,n["on:begin"]];for(const r of o)if(r&&(r(e,i),i.isMatchIgnored))return _(t);return n.skip?T+=t:(n.excludeBegin&&(T+=t),f(),n.returnBegin||n.excludeBegin||(T=t)),g(n,e),n.returnBegin?0:t.length})(r);if("illegal"===r.type&&!i){const e=Error('Illegal lexeme "'+a+'" for mode "'+(C.scope||"<unnamed>")+'"');throw e.mode=C,e}if("end"===r.type){const e=b(r);if(e!==Ic)return e}if("illegal"===r.type&&""===a)return 1;if(M>1e5&&M>3*r.index)throw Error("potential infinite loop, way more iterations than matches");return T+=a,a.length}const w=m(e);if(!w)throw r.replace("{}",e),Error('Unknown language: "'+e+'"');const A=Rc(w);let k="",C=a||A;const S={},E=new l.__emitter(l);(()=>{const e=[];for(let t=C;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>E.openNode(e))})();let T="",R=0,O=0,M=0,D=!1;try{if(w.__emitTokens)w.__emitTokens(n,E);else{for(C.matcher.considerAll();;){M++,D?D=!1:C.matcher.considerAll(),C.matcher.lastIndex=O;const e=C.matcher.exec(n);if(!e)break;const t=x(n.substring(O,e.index),e);O=e.index+t}x(n.substring(O))}return E.finalize(),k=E.toHTML(),{language:e,value:k,relevance:R,illegal:!1,_emitter:E,_top:C}}catch(N){if(N.message&&N.message.includes("Illegal"))return{language:e,value:Dc(n),illegal:!0,relevance:0,_illegalBy:{message:N.message,index:O,context:n.slice(O-100,O+100),mode:N.mode,resultSoFar:k},_emitter:E};if(o)return{language:e,value:Dc(n),illegal:!1,relevance:0,errorRaised:N,_emitter:E,_top:C};throw N}}function d(e,n){n=n||l.languages||Object.keys(t);const i=(e=>{const t={value:Dc(e),illegal:!1,relevance:0,_top:a,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t})(e),o=n.filter(m).filter(v).map(t=>u(t,e,!1));o.unshift(i);const r=o.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(m(e.language).supersetOf===t.language)return 1;if(m(t.language).supersetOf===e.language)return-1}return 0}),[s,c]=r,d=s;return d.secondBest=c,d}function f(e){let t=null;const i=(e=>{let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=l.languageDetectRe.exec(t);if(n){const e=m(n[1]);return e||r.replace("{}",n[1]),e?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>s(e)||m(e))})(e);if(s(i))return;if(_("before:highlightElement",{el:e,language:i}),e.dataset.highlighted)return;if(e.children.length>0&&(l.ignoreUnescapedHTML,l.throwUnescapedHTML))throw new Mc("One of your code blocks includes unescaped HTML.",e.innerHTML);t=e;const o=t.textContent,a=i?c(o,{language:i,ignoreIllegals:!0}):d(o);e.innerHTML=a.value,e.dataset.highlighted="yes",((e,t,i)=>{const o=t&&n[t]||i;e.classList.add("hljs"),e.classList.add("language-"+o)})(e,i,a.language),e.result={language:a.language,re:a.relevance,relevance:a.relevance},a.secondBest&&(e.secondBest={language:a.secondBest.language,relevance:a.secondBest.relevance}),_("after:highlightElement",{el:e,result:a,text:o})}let p=!1;function h(){"loading"!==document.readyState?document.querySelectorAll(l.cssSelector).forEach(f):p=!0}function m(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{n[e.toLowerCase()]=t})}function v(e){const t=m(e);return t&&!t.disableAutodetect}function _(e,t){const n=e;i.forEach(e=>{e[n]&&e[n](t)})}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",()=>{p&&h()},!1),Object.assign(e,{highlight:c,highlightAuto:d,highlightAll:h,highlightElement:f,highlightBlock:e=>(Cc("10.7.0","highlightBlock will be removed entirely in v12.0"),Cc("10.7.0","Please use highlightElement now."),f(e)),configure:e=>{l=Nc(l,e)},initHighlighting:()=>{h(),Cc("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:()=>{h(),Cc("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:(n,i)=>{let r=null;try{r=i(e)}catch(l){if("Language definition for '{}' could not be registered.".replace("{}",n),!o)throw l;r=a}r.name||(r.name=n),t[n]=r,r.rawDefinition=i.bind(null,e),r.aliases&&g(r.aliases,{languageName:n})},unregisterLanguage:e=>{delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:()=>Object.keys(t),getLanguage:m,registerAliases:g,autoDetection:v,inherit:Nc,addPlugin:e=>{var t;(t=e)["before:highlightBlock"]&&!t["before:highlightElement"]&&(t["before:highlightElement"]=e=>{t["before:highlightBlock"](Object.assign({block:e.el},e))}),t["after:highlightBlock"]&&!t["after:highlightElement"]&&(t["after:highlightElement"]=e=>{t["after:highlightBlock"](Object.assign({block:e.el},e))}),i.push(e)},removePlugin:e=>{const t=i.indexOf(e);-1!==t&&i.splice(t,1)}}),e.debugMode=()=>{o=!1},e.safeMode=()=>{o=!0},e.versionString="11.9.0",e.regex={concat:Ks,lookahead:$s,either:Xs,optional:Qs,anyNumberOfTimes:qs};for(const b in pc)"object"==typeof pc[b]&&Ps(pc[b]);return Object.assign(e,pc),e},Fc=Lc({});Fc.newInstance=()=>Lc({});
/*! `xml` grammar compiled for Highlight.js 11.9.0 */
var Pc=(()=>e=>{const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},r=e.inherit(o,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),s={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,l,a,r,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,r,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[s],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[s],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:s}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})(),Bc=(()=>{const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],i=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],a=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],l=[].concat(r,i,o);return s=>{const c=s.regex,u=e,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let o;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const r=e.input.substring(n);((o=r.match(/^\s*=/))||(o=r.match(/^\s+extends\s+/))&&0===o.index)&&t.ignoreMatch()}},f={$pattern:e,keyword:t,literal:n,built_in:l,"variable.language":a},p="[0-9](_?[0-9])*",h="\\.(".concat(p,")"),m="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:"(\\b(".concat(m,")((").concat(h,")|\\.)?|(").concat(h,"))[eE][+-]?(").concat(p,")\\b")},{begin:"\\b(".concat(m,")\\b((").concat(h,")\\b|\\.)?|(").concat(h,")\\b")},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},_={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},b={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,v],subLanguage:"css"}},y={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[s.BACKSLASH_ESCAPE,v]},w={className:"comment",variants:[s.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:u+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),s.C_BLOCK_COMMENT_MODE,s.C_LINE_COMMENT_MODE]},A=[s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,_,b,y,x,{match:/\$\d+/},g];v.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const k=[].concat(w,v.contains),C=k.concat([{begin:/\(/,end:/\)/,keywords:f,contains:["self"].concat(k)}]),S={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:C},E={variants:[{match:[/class/,/\s+/,u,/\s+/,/extends/,/\s+/,c.concat(u,"(",c.concat(/\./,u),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,u],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:c.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...i,...o]}},R={variants:[{match:[/function/,/\s+/,u,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},O={match:c.concat(/\b/,(M=[...r,"super","import"],c.concat("(?!",M.join("|"),")")),u,c.lookahead(/\(/)),className:"title.function",relevance:0};var M;const D={begin:c.concat(/\./,c.lookahead(c.concat(u,/(?![0-9A-Za-z$_(])/))),end:u,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},N={match:[/get|set/,/\s+/,u,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+s.UNDERSCORE_IDENT_RE+")\\s*=>",L={match:[/const|var|let/,/\s+/,u,/\s*/,/=\s*/,/(async\s*)?/,c.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[s.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,_,b,y,x,w,{match:/\$\d+/},g,T,{className:"attr",begin:u+c.lookahead(":"),relevance:0},L,{begin:"("+s.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[w,s.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:s.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:"</>"},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:d.begin,"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},R,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+s.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[S,s.inherit(s.TITLE_MODE,{begin:u,className:"title.function"})]},{match:/\.\.\./,relevance:0},D,{match:"\\$"+u,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},O,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},E,N,{match:/\$[(.]/}]}}})();
/*! `javascript` grammar compiled for Highlight.js 11.9.0 */const jc=e({name:"TypeSelect",inject:["designer"],props:{disabled:Boolean},computed:{t(){return this.designer.setupState.t},activeRule(){return this.designer.setupState.activeRule},customForm(){return this.designer.setupState.customForm},menus(){let e=[];const t=this.designer.setupState;if(this.activeRule){const n=this.activeRule._menu.name,i=t.getConfig("switchType",[]);if(!1===i)return e;let o=[];i.forEach(e=>{e.indexOf(n)>-1&&o.push(...e)}),o=o.filter((e,t)=>e!==n&&o.indexOf(e)===t),o.length?t.menuList.forEach(t=>{t.list.forEach(t=>{o.indexOf(t.name)>-1&&e.push(t)})}):t.menuList.forEach(t=>{t.name===this.activeRule._menu.menu&&t.list.forEach(t=>{t.name!==n&&e.push(t)})})}return e.filter(e=>-1===this.designer.setupState.hiddenItem.indexOf(e.name))}},methods:{handleCommand(e){var t;let n=this.activeRule,i=this.activeRule;i._menu.inside||(i=i.__fc__.parent.rule);const o=i.__fc__.parent.rule.children,r=this.designer.setupState.makeRule(e);let a=r;"DragTool"===r.type&&(a=r.children[0]),a.field&&n.field?["title","info","field","validate","control","$required"].forEach(e=>{a[e]=n[e]}):null!=(t=null==n?void 0:n.computed)&&t.hidden&&(a.computed={hidden:n.computed.hidden}),n.name&&(a.name=n.name),["name","id","on"].forEach(e=>{n[e]&&(a[e]=n[e])}),o.splice(o.indexOf(i),1,r),this.$nextTick(()=>{this.designer.setupState.updateTree(),this.designer.setupState.triggerActive(a)})}}}),Vc={key:0,class:"fc-icon icon-down"};const zc=ls(jc,[["render",function(e,a,c,u,d,f){const p=t("el-tag"),h=t("el-dropdown-item"),m=t("el-dropdown-menu"),g=t("el-dropdown");return i(),n(g,{class:"_fd-type-select",trigger:"click",size:"default","popper-class":"_fd-type-select-pop",disabled:e.disabled||!e.menus.length,onCommand:e.handleCommand},{dropdown:o(()=>[_(m,null,{default:o(()=>[(i(!0),r(l,null,s(e.menus,t=>(i(),n(h,{command:t,key:t.name},{default:o(()=>[M("div",null,[M("i",{class:P(["fc-icon",t.icon||"icon-input"])},null,2),V(j(e.t("com."+t.name+".name")||t.label),1)])]),_:2},1032,["command"]))),128))]),_:1})]),default:o(()=>[_(p,{type:"success",effect:"plain","disable-transitions":""},{default:o(()=>[e.activeRule?(i(),r(l,{key:0},[V(j(e.t("com."+e.activeRule._menu.name+".name")||e.activeRule._menu.label)+" ",1),!e.disabled&&e.menus.length?(i(),r("i",Vc)):F("",!0)],64)):(i(),r(l,{key:1},[V(j(e.t("com."+e.customForm.config.name+".name")||e.customForm.config.label||e.customForm.config.name),1)],64))]),_:1})]),_:1},8,["disabled","onCommand"])}]]);var Hc,Uc={exports:{}},Wc={},Yc={exports:{}},Gc={},$c={};function qc(){if(Hc)return $c;function e(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function t(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function n(n,i){this.__indent_cache=new t(n,i),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return Hc=1,e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},e.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},e.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},e.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},t.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},t.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},t.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},n.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},n.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},n.prototype.remove_indent=function(e){for(var t=this.__lines.length;e<t;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(t,n){for(var i=this.__lines.length-2;i>=0;){var o=this.__lines[i];if(o.is_empty())break;if(0!==o.item(0).indexOf(t)&&o.item(-1)!==n){this.__lines.splice(i+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},$c.Output=n,$c}var Qc,Kc={};function Xc(){if(Qc)return Kc;return Qc=1,Kc.Token=function(e,t,n,i){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null},Kc}var Jc,Zc={};function eu(){return Jc||(Jc=1,function(e){var t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",i="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",r="(?:"+o+"|[\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+n+"])",a="(?:"+o+"|["+t+n+i+"])*";e.identifier=new RegExp(r+a,"g"),e.identifierStart=new RegExp(r),e.identifierMatch=new RegExp("(?:"+o+"|["+t+n+i+"])+"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")}(Zc)),Zc}var tu,nu,iu={},ou={};function ru(){if(tu)return ou;function e(e,n){this.raw_options=t(e,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function t(e,t){var i,o={};for(i in e=n(e))i!==t&&(o[i]=e[i]);if(t&&e[t])for(i in e[t])o[i]=e[t][i];return o}function n(e){var t,n={};for(t in e){n[t.replace(/-/g,"_")]=e[t]}return n}return tu=1,e.prototype._get_array=function(e,t){var n=this.raw_options[e],i=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(i=n.concat()):"string"==typeof n&&(i=n.split(/[^a-zA-Z0-9_\/\-]+/)),i},e.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},e.prototype._get_characters=function(e,t){var n=this.raw_options[e],i=t||"";return"string"==typeof n&&(i=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),i},e.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var i=parseInt(n,10);return isNaN(i)&&(i=t),i},e.prototype._get_selection=function(e,t,n){var i=this._get_selection_list(e,t,n);if(1!==i.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i[0]},e.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var i=this._get_array(e,n);if(!this._is_valid_selection(i,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return i},e.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(e){return-1===t.indexOf(e)})},ou.Options=e,ou.normalizeOpts=n,ou.mergeOpts=t,ou}function au(){if(nu)return iu;nu=1;var e=ru().Options,t=["before-newline","after-newline","preserve-newline"];function n(n){e.call(this,n,"js");var i=this.raw_options.brace_style||null;"expand-strict"===i?this.raw_options.brace_style="expand":"collapse-preserve-inline"===i?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var r=0;r<o.length;r++)"preserve-inline"===o[r]?this.brace_preserve_inline=!0:this.brace_style=o[r];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",t),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return n.prototype=new e,iu.Options=n,iu}var lu,su={},cu={};function uu(){if(lu)return cu;lu=1;var e=RegExp.prototype.hasOwnProperty("sticky");function t(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}return t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position<this.__input_length},t.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},t.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(t=this.__input.charAt(e)),t},t.prototype.__match=function(t,n){t.lastIndex=n;var i=t.exec(this.__input);return i&&!(e&&t.sticky)&&i.index!==n&&(i=null),i},t.prototype.test=function(e,t){return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&!!this.__match(e,t)},t.prototype.testChar=function(e,t){var n=this.peek(t);return e.lastIndex=0,null!==n&&e.test(n)},t.prototype.match=function(e){var t=this.__match(e,this.__position);return t?this.__position+=t[0].length:t=null,t},t.prototype.read=function(e,t,n){var i,o="";return e&&((i=this.match(e))&&(o+=i[0])),t&&(i||!e)&&(o+=this.readUntil(t,n)),o},t.prototype.readUntil=function(e,t){var n,i=this.__position;e.lastIndex=this.__position;var o=e.exec(this.__input);return o?(i=o.index,t&&(i+=o[0].length)):i=this.__input_length,n=this.__input.substring(this.__position,i),this.__position=i,n},t.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},t.prototype.get_regexp=function(t,n){var i=null,o="g";return n&&e&&(o="y"),"string"==typeof t&&""!==t?i=new RegExp(t,o):t&&(i=new RegExp(t.source,o)),i},t.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},t.prototype.peekUntilAfter=function(e){var t=this.__position,n=this.readUntilAfter(e);return this.__position=t,n},t.prototype.lookBack=function(e){var t=this.__position-1;return t>=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},cu.InputScanner=t,cu}var du,fu={},pu={};var hu,mu,gu,vu={},_u={};function bu(){if(hu)return _u;function e(e,t){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,t&&(this._starting_pattern=this._input.get_regexp(t._starting_pattern,!0),this._match_pattern=this._input.get_regexp(t._match_pattern,!0),this._until_pattern=this._input.get_regexp(t._until_pattern),this._until_after=t._until_after)}return hu=1,e.prototype.read=function(){var e=this._input.read(this._starting_pattern);return(!this._starting_pattern||e)&&(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(e){var t=this._create();return t._until_after=!0,t._until_pattern=this._input.get_regexp(e),t._update(),t},e.prototype.until=function(e){var t=this._create();return t._until_after=!1,t._until_pattern=this._input.get_regexp(e),t._update(),t},e.prototype.starting_with=function(e){var t=this._create();return t._starting_pattern=this._input.get_regexp(e,!0),t._update(),t},e.prototype.matching=function(e){var t=this._create();return t._match_pattern=this._input.get_regexp(e,!0),t._update(),t},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},_u.Pattern=e,_u}function yu(){if(gu)return fu;gu=1;var e=uu().InputScanner,t=Xc().Token,n=function(){if(du)return pu;function e(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return du=1,e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},e.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__tokens_length&&(t=this.__tokens[e]),t},e.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},pu.TokenStream=e,pu}().TokenStream,i=function(){if(mu)return vu;mu=1;var e=bu().Pattern;function t(t,n){e.call(this,t,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return t.prototype=new e,t.prototype.__set_whitespace_patterns=function(e,t){e+="\\t ",t+="\\n\\r",this._match_pattern=this._input.get_regexp("["+e+t+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+t+"]")},t.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var e=this._input.read(this._match_pattern);if(" "===e)this.whitespace_before_token=" ";else if(e){var t=this.__split(this._newline_regexp,e);this.newline_count=t.length-1,this.whitespace_before_token=t[this.newline_count]}return e},t.prototype.matching=function(e,t){var n=this._create();return n.__set_whitespace_patterns(e,t),n._update(),n},t.prototype._create=function(){return new t(this._input,this)},t.prototype.__split=function(e,t){e.lastIndex=0;for(var n=0,i=[],o=e.exec(t);o;)i.push(t.substring(n,o.index)),n=o.index+o[0].length,o=e.exec(t);return n<t.length?i.push(t.substring(n,t.length)):i.push(""),i},vu.WhitespacePattern=t,vu}().WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(t,n){this._input=new e(t),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};return r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var e,i=new t(o.START,""),r=null,a=[],l=new n;i.type!==o.EOF;){for(e=this._get_next_token(i,r);this._is_comment(e);)l.add(e),e=this._get_next_token(i,r);l.isEmpty()||(e.comments_before=l,l=new n),e.parent=r,this._is_opening(e)?(a.push(r),r=e):r&&this._is_closing(e,r)&&(e.opened=r,r.closed=e,r=a.pop(),e.parent=r),e.previous=i,i.next=e,this.__tokens.add(e),i=e}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(e,t){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(o.RAW,n):this._create_token(o.EOF,"")},r.prototype._is_comment=function(e){return!1},r.prototype._is_opening=function(e){return!1},r.prototype._is_closing=function(e,t){return!1},r.prototype._create_token=function(e,n){return new t(e,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},fu.Tokenizer=r,fu.TOKEN=o,fu}var xu,wu={};function Au(){if(xu)return wu;function e(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}return xu=1,e.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},e.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},wu.Directives=e,wu}var ku,Cu,Su,Eu,Tu={};function Ru(){if(ku)return Tu;ku=1;var e=bu().Pattern,t={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function n(n,i){e.call(this,n,i),this.__template_pattern=null,this._disabled=Object.assign({},t),this._excluded=Object.assign({},t),i&&(this.__template_pattern=this._input.get_regexp(i.__template_pattern),this._excluded=Object.assign(this._excluded,i._excluded),this._disabled=Object.assign(this._disabled,i._disabled));var o=new e(n);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}return n.prototype=new e,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(e){var t=this._create();return t._disabled[e]=!0,t._update(),t},n.prototype.read_options=function(e){var n=this._create();for(var i in t)n._disabled[i]=-1===e.templating.indexOf(i);return n._update(),n},n.prototype.exclude=function(e){var t=this._create();return t._excluded[e]=!0,t._update(),t},n.prototype.read=function(){var e="";e=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),e+=t,t=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},n.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},n.prototype._read_template=function(){var e="",t=this._input.peek();if("<"===t){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&"?"===n&&(e=e||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&"%"===n&&(e=e||this.__patterns.erb.read())}else"{"===t&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=(e=(e=e||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return e},Tu.TemplatablePattern=n,Tu}function Ou(){if(Cu)return su;Cu=1;var e=uu().InputScanner,t=yu().Tokenizer,n=yu().TOKEN,i=Au().Directives,o=eu(),r=bu().Pattern,a=Ru().TemplatablePattern;function l(e,t){return-1!==t.indexOf(e)}var s={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},c=new i(/\/\*/,/\*\//),u=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,d=/[0-9]/,f=/[^\d\.]/,p=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),h=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";h=(h="\\?\\.(?!\\d) "+(h=h.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,"|");var m,g=new RegExp(h),v="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),_=v.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),b=new RegExp("^(?:"+_.join("|")+")$"),y=function(e,n){t.call(this,e,n),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var i=new r(this._input),l=new a(this._input).read_options(this._options);this.__patterns={template:l,identifier:l.starting_with(o.identifier).matching(o.identifierMatch),number:i.matching(u),punct:i.matching(g),comment:i.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:i.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:i.matching(/<!--/),html_comment_end:i.matching(/-->/),include:i.starting_with(/#include/).until_after(o.lineBreak),shebang:i.starting_with(/#!/).until_after(o.lineBreak),xml:i.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:l.until(/['\\\n\r\u2028\u2029]/),double_quote:l.until(/["\\\n\r\u2028\u2029]/),template_text:l.until(/[`\\$]/),template_expression:l.until(/[`}\\]/)}};return(y.prototype=new t)._is_comment=function(e){return e.type===s.COMMENT||e.type===s.BLOCK_COMMENT||e.type===s.UNKNOWN},y.prototype._is_opening=function(e){return e.type===s.START_BLOCK||e.type===s.START_EXPR},y.prototype._is_closing=function(e,t){return(e.type===s.END_BLOCK||e.type===s.END_EXPR)&&t&&("]"===e.text&&"["===t.text||")"===e.text&&"("===t.text||"}"===e.text&&"{"===t.text)},y.prototype._reset=function(){m=!1},y.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var i=this._input.peek();return null===i?this._create_token(s.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_non_javascript(i))||this._read_string(i))||this._read_pair(i,this._input.peek(1)))||this._read_word(e))||this._read_singles(i))||this._read_comment(i))||this._read_regexp(i,e))||this._read_xml(i,e))||this._read_punctuation())||this._create_token(s.UNKNOWN,this._input.next())},y.prototype._read_word=function(e){var t;return""!==(t=this.__patterns.identifier.read())?(t=t.replace(o.allLineBreaks,"\n"),e.type!==s.DOT&&(e.type!==s.RESERVED||"set"!==e.text&&"get"!==e.text)&&b.test(t)?"in"!==t&&"of"!==t||e.type!==s.WORD&&e.type!==s.STRING?this._create_token(s.RESERVED,t):this._create_token(s.OPERATOR,t):this._create_token(s.WORD,t)):""!==(t=this.__patterns.number.read())?this._create_token(s.WORD,t):void 0},y.prototype._read_singles=function(e){var t=null;return"("===e||"["===e?t=this._create_token(s.START_EXPR,e):")"===e||"]"===e?t=this._create_token(s.END_EXPR,e):"{"===e?t=this._create_token(s.START_BLOCK,e):"}"===e?t=this._create_token(s.END_BLOCK,e):";"===e?t=this._create_token(s.SEMICOLON,e):"."===e&&f.test(this._input.peek(1))?t=this._create_token(s.DOT,e):","===e&&(t=this._create_token(s.COMMA,e)),t&&this._input.next(),t},y.prototype._read_pair=function(e,t){var n=null;return"#"===e&&"{"===t&&(n=this._create_token(s.START_BLOCK,e+t)),n&&(this._input.next(),this._input.next()),n},y.prototype._read_punctuation=function(){var e=this.__patterns.punct.read();if(""!==e)return"="===e?this._create_token(s.EQUALS,e):"?."===e?this._create_token(s.DOT,e):this._create_token(s.OPERATOR,e)},y.prototype._read_non_javascript=function(e){var t="";if("#"===e){if(this._is_first_token()&&(t=this.__patterns.shebang.read()))return this._create_token(s.UNKNOWN,t.trim()+"\n");if(t=this.__patterns.include.read())return this._create_token(s.UNKNOWN,t.trim()+"\n");e=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(d)){do{n+=e=this._input.next()}while(this._input.hasNext()&&"#"!==e&&"="!==e);return"#"===e||("["===this._input.peek()&&"]"===this._input.peek(1)?(n+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(n+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,n)}this._input.back()}else if("<"===e&&this._is_first_token()){if(t=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(o.newline);)t+=this._input.next();return m=!0,this._create_token(s.COMMENT,t)}}else if(m&&"-"===e&&(t=this.__patterns.html_comment_end.read()))return m=!1,this._create_token(s.COMMENT,t);return null},y.prototype._read_comment=function(e){var t=null;if("/"===e){var n="";if("*"===this._input.peek(1)){n=this.__patterns.block_comment.read();var i=c.get_directives(n);i&&"start"===i.ignore&&(n+=c.readIgnored(this._input)),n=n.replace(o.allLineBreaks,"\n"),(t=this._create_token(s.BLOCK_COMMENT,n)).directives=i}else"/"===this._input.peek(1)&&(n=this.__patterns.comment.read(),t=this._create_token(s.COMMENT,n))}return t},y.prototype._read_string=function(t){if("`"===t||"'"===t||'"'===t){var n=this._input.next();return this.has_char_escapes=!1,n+="`"===t?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(n=function(t){for(var n="",i=0,o=new e(t),r=null;o.hasNext();)if((r=o.match(/([\s]|[^\\]|\\\\)+/g))&&(n+=r[0]),"\\"===o.peek()){if(o.next(),"x"===o.peek())r=o.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==o.peek()){n+="\\",o.hasNext()&&(n+=o.next());continue}(r=o.match(/u([0-9A-Fa-f]{4})/g))||(r=o.match(/u\{([0-9A-Fa-f]+)\}/g))}if(!r||(i=parseInt(r[1],16))>126&&i<=255&&0===r[0].indexOf("x"))return t;n+=i>=0&&i<32||i>1114111?"\\"+r[0]:34===i||39===i||92===i?"\\"+String.fromCharCode(i):String.fromCharCode(i)}return n}(n)),this._input.peek()===t&&(n+=this._input.next()),n=n.replace(o.allLineBreaks,"\n"),this._create_token(s.STRING,n)}return null},y.prototype._allow_regexp_or_xml=function(e){return e.type===s.RESERVED&&l(e.text,["return","case","throw","else","do","typeof","yield"])||e.type===s.END_EXPR&&")"===e.text&&e.opened.previous.type===s.RESERVED&&l(e.opened.previous.text,["if","while","for"])||l(e.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},y.prototype._read_regexp=function(e,t){if("/"===e&&this._allow_regexp_or_xml(t)){for(var n=this._input.next(),i=!1,r=!1;this._input.hasNext()&&(i||r||this._input.peek()!==e)&&!this._input.testChar(o.newline);)n+=this._input.peek(),i?i=!1:(i="\\"===this._input.peek(),"["===this._input.peek()?r=!0:"]"===this._input.peek()&&(r=!1)),this._input.next();return this._input.peek()===e&&(n+=this._input.next(),n+=this._input.read(o.identifier)),this._create_token(s.STRING,n)}return null},y.prototype._read_xml=function(e,t){if(this._options.e4x&&"<"===e&&this._allow_regexp_or_xml(t)){var n="",i=this.__patterns.xml.read_match();if(i){for(var r=i[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),a=0===r.indexOf("{"),l=0;i;){var c=!!i[1],u=i[2];if(!(!!i[i.length-1]||"![CDATA["===u.slice(0,8))&&(u===r||a&&u.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(c?--l:++l),n+=i[0],l<=0)break;i=this.__patterns.xml.read_match()}return i||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(o.allLineBreaks,"\n"),this._create_token(s.STRING,n)}}return null},y.prototype._read_string_recursive=function(e,t,n){var i,r;"'"===e?r=this.__patterns.single_quote:'"'===e?r=this.__patterns.double_quote:"`"===e?r=this.__patterns.template_text:"}"===e&&(r=this.__patterns.template_expression);for(var a=r.read(),l="";this._input.hasNext();){if((l=this._input.next())===e||!t&&o.newline.test(l)){this._input.back();break}"\\"===l&&this._input.hasNext()?("x"===(i=this._input.peek())||"u"===i?this.has_char_escapes=!0:"\r"===i&&"\n"===this._input.peek(1)&&this._input.next(),l+=this._input.next()):n&&("${"===n&&"$"===l&&"{"===this._input.peek()&&(l+=this._input.next()),n===l&&(l+="`"===e?this._read_string_recursive("}",t,"`"):this._read_string_recursive("`",t,"${"),this._input.hasNext()&&(l+=this._input.next()))),a+=l+=r.read()}return a},su.Tokenizer=y,su.TOKEN=s,su.positionable_operators=p.slice(),su.line_starters=v.slice(),su}function Mu(){if(Su)return Gc;Su=1;var e=qc().Output,t=Xc().Token,n=eu(),i=au().Options,o=Ou().Tokenizer,r=Ou().line_starters,a=Ou().positionable_operators,l=Ou().TOKEN;function s(e,t){return-1!==t.indexOf(e)}function c(e){return e.replace(/^\s+/g,"")}function u(e,t){return e&&e.type===l.RESERVED&&e.text===t}function d(e,t){return e&&e.type===l.RESERVED&&s(e.text,t)}var f=["case","return","do","if","throw","else","await","break","continue","async"],p=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].replace(/-/g,"_")]=e[n];return t}(["before-newline","after-newline","preserve-newline"]),h=[p.before_newline,p.preserve_newline],m="BlockStatement",g="Statement",v="ObjectLiteral",_="ArrayLiteral",b="ForInitializer",y="Conditional",x="Expression";function w(e,t){t.multiline_frame||t.mode===b||t.mode===y||e.remove_indent(t.start_line_index)}function A(e){return e===_}function k(e){return s(e,[x,b,y])}function C(e,t){t=t||{},this._source_text=e||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new i(t)}C.prototype.create_flags=function(e,n){var i=0;return e&&(i=e.indentation_level,!this._output.just_added_newline()&&e.line_indent_level>i&&(i=e.line_indent_level)),{mode:n,parent:e,last_token:e?e.last_token:new t(l.START_BLOCK,""),last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:i,alignment:0,line_indent_level:e?e.line_indent_level:i,start_line_index:this._output.get_line_number(),ternary_depth:0}},C.prototype._reset=function(t){var n=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new e(this._options,n),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(m);var i=new o(t,this._options);return this._tokens=i.tokenize(),t},C.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._reset(this._source_text),t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&n.lineBreak.test(e||"")&&(t=e.match(n.lineBreak)[0]));for(var i=this._tokens.next();i;)this.handle_token(i),this._last_last_text=this._flags.last_token.text,this._flags.last_token=i,i=this._tokens.next();return this._output.get_code(t)},C.prototype.handle_token=function(e,t){e.type===l.START_EXPR?this.handle_start_expr(e):e.type===l.END_EXPR?this.handle_end_expr(e):e.type===l.START_BLOCK?this.handle_start_block(e):e.type===l.END_BLOCK?this.handle_end_block(e):e.type===l.WORD||e.type===l.RESERVED?this.handle_word(e):e.type===l.SEMICOLON?this.handle_semicolon(e):e.type===l.STRING?this.handle_string(e):e.type===l.EQUALS?this.handle_equals(e):e.type===l.OPERATOR?this.handle_operator(e):e.type===l.COMMA?this.handle_comma(e):e.type===l.BLOCK_COMMENT?this.handle_block_comment(e,t):e.type===l.COMMENT?this.handle_comment(e,t):e.type===l.DOT?this.handle_dot(e):e.type===l.EOF?this.handle_eof(e):(e.type,l.UNKNOWN,this.handle_unknown(e,t))},C.prototype.handle_whitespace_and_comments=function(e,t){var n=e.newlines,i=this._options.keep_array_indentation&&A(this._flags.mode);if(e.comments_before)for(var o=e.comments_before.next();o;)this.handle_whitespace_and_comments(o,t),this.handle_token(o,t),o=e.comments_before.next();if(i)for(var r=0;r<n;r+=1)this.print_newline(r>0,t);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,t);for(var a=1;a<n;a+=1)this.print_newline(!0,t)}};var S=["async","break","continue","return","throw","yield"];return C.prototype.allow_wrap_or_preserved_newline=function(e,t){if(t=void 0!==t&&t,!this._output.just_added_newline()){var n=this._options.preserve_newlines&&e.newlines||t;if(s(this._flags.last_token.text,a)||s(e.text,a)){var i=s(this._flags.last_token.text,a)&&s(this._options.operator_position,h)||s(e.text,a);n=n&&i}if(n)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(d(this._flags.last_token,S))return;this._output.set_wrap_point()}}},C.prototype.print_newline=function(e,t){if(!t&&";"!==this._flags.last_token.text&&","!==this._flags.last_token.text&&"="!==this._flags.last_token.text&&(this._flags.last_token.type!==l.OPERATOR||"--"===this._flags.last_token.text||"++"===this._flags.last_token.text))for(var n=this._tokens.peek();!(this._flags.mode!==g||this._flags.if_block&&u(n,"else")||this._flags.do_block);)this.restore_mode();this._output.add_new_line(e)&&(this._flags.multiline_frame=!0)},C.prototype.print_token_line_indentation=function(e){this._output.just_added_newline()&&(this._options.keep_array_indentation&&e.newlines&&("["===e.text||A(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(e.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},C.prototype.print_token=function(e){if(this._output.raw)this._output.add_raw_token(e);else{if(this._options.comma_first&&e.previous&&e.previous.type===l.COMMA&&this._output.just_added_newline()&&","===this._output.previous_line.last()){var t=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(t),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(e),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(e),this._output.non_breaking_space=!0,this._output.add_token(e.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)}},C.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},C.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},C.prototype.set_mode=function(e){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,e),this._flags=this.create_flags(this._previous_flags,e),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},C.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===g&&w(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},C.prototype.start_of_object_property=function(){return this._flags.parent.mode===v&&this._flags.mode===g&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||d(this._flags.last_token,["get","set"]))},C.prototype.start_of_statement=function(e){var t=!1;return!!(t=(t=(t=(t=(t=(t=(t=t||d(this._flags.last_token,["var","let","const"])&&e.type===l.WORD)||u(this._flags.last_token,"do"))||!(this._flags.parent.mode===v&&this._flags.mode===g)&&d(this._flags.last_token,S)&&!e.newlines)||u(this._flags.last_token,"else")&&!(u(e,"if")&&!e.comments_before))||this._flags.last_token.type===l.END_EXPR&&(this._previous_flags.mode===b||this._previous_flags.mode===y))||this._flags.last_token.type===l.WORD&&this._flags.mode===m&&!this._flags.in_case&&!("--"===e.text||"++"===e.text)&&"function"!==this._last_last_text&&e.type!==l.WORD&&e.type!==l.RESERVED)||this._flags.mode===v&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||d(this._flags.last_token,["get","set"])))&&(this.set_mode(g),this.indent(),this.handle_whitespace_and_comments(e,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e,d(e,["do","for","if","while"])),!0)},C.prototype.handle_start_expr=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e);var t=x;if("["===e.text){if(this._flags.last_token.type===l.WORD||")"===this._flags.last_token.text)return d(this._flags.last_token,r)&&(this._output.space_before_token=!0),this.print_token(e),this.set_mode(t),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));t=_,A(this._flags.mode)&&("["===this._flags.last_token.text||","===this._flags.last_token.text&&("]"===this._last_last_text||"}"===this._last_last_text))&&(this._options.keep_array_indentation||this.print_newline()),s(this._flags.last_token.type,[l.START_EXPR,l.END_EXPR,l.WORD,l.OPERATOR,l.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===l.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,t=b):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,t=y):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===e.whitespace_before?this._output.space_before_token=!1:(s(this._flags.last_token.text,r)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e);else if(this._flags.last_token.type===l.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var i=this._tokens.peek(-4);d(n,["async","function"])||"*"===n.text&&d(i,["async","function"])?this._output.space_before_token=!0:this._flags.mode===v?("{"===n.text||","===n.text||"*"===n.text&&("{"===i.text||","===i.text))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(e);(this._flags.last_token.type===l.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(s(this._last_last_text,["function","yield"])||this._flags.mode===v&&s(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===l.START_BLOCK?this.print_newline():(this._flags.last_token.type===l.END_EXPR||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.END_BLOCK||"."===this._flags.last_token.text||this._flags.last_token.type===l.COMMA)&&this.allow_wrap_or_preserved_newline(e,e.newlines),this.print_token(e),this.set_mode(t),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},C.prototype.handle_end_expr=function(e){for(;this._flags.mode===g;)this.restore_mode();this.handle_whitespace_and_comments(e),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(e,"]"===e.text&&A(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==l.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(e),this.restore_mode(),w(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===y&&(this._previous_flags.mode=x,this._flags.do_block=!1,this._flags.do_while=!1)},C.prototype.handle_start_block=function(e){this.handle_whitespace_and_comments(e);var t=this._tokens.peek(),n=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR?(this.set_mode(m),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(m):n&&(s(n.text,[":",","])&&s(t.type,[l.STRING,l.WORD,l.RESERVED])||s(t.text,["get","set","..."])&&s(n.type,[l.WORD,l.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(n.text,[":",","])?this.set_mode(m):this.set_mode(v):this._flags.last_token.type===l.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(m):s(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])||d(this._flags.last_token,["return","throw","import","default"])?this.set_mode(v):this.set_mode(m),this._flags.last_token&&d(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var i=!t.comments_before&&"}"===t.text,o=i&&"function"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR;if(this._options.brace_preserve_inline){var r=0,a=null;this._flags.inline_frame=!0;do{if(r+=1,(a=this._tokens.peek(r-1)).newlines){this._flags.inline_frame=!1;break}}while(a.type!==l.EOF&&(a.type!==l.END_BLOCK||a.opened!==e))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(o||this._flags.last_token.type===l.EQUALS||d(this._flags.last_token,f)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(A(this._previous_flags.mode)&&(this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.COMMA)&&((this._flags.last_token.type===l.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(e),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(s(this._flags.last_token.type,[l.START_BLOCK,l.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(e),this.indent(),!i&&(!this._options.brace_preserve_inline||!this._flags.inline_frame)&&this.print_newline()},C.prototype.handle_end_block=function(e){for(this.handle_whitespace_and_comments(e);this._flags.mode===g;)this.restore_mode();var t=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!t?this._output.space_before_token=!0:"expand"===this._options.brace_style?t||this.print_newline():t||(A(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(e)},C.prototype.handle_word=function(e){if(e.type===l.RESERVED)if(s(e.text,["set","get"])&&this._flags.mode!==v)e.type=l.WORD;else if("import"===e.text&&s(this._tokens.peek().text,["(","."]))e.type=l.WORD;else if(s(e.text,["as","from"])&&!this._flags.import_block)e.type=l.WORD;else if(this._flags.mode===v){":"===this._tokens.peek().text&&(e.type=l.WORD)}if(this.start_of_statement(e)?d(this._flags.last_token,["var","let","const"])&&e.type===l.WORD&&(this._flags.declaration_statement=!0):!e.newlines||k(this._flags.mode)||this._flags.last_token.type===l.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===l.EQUALS||!this._options.preserve_newlines&&d(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(e):(this.handle_whitespace_and_comments(e),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(u(e,"while"))return this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&u(e,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===g;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&d(e,["case","default"]))return this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(e),void(this._flags.in_case=!0);if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)&&!this.start_of_object_property()&&!(s(this._flags.last_token.text,["+","-"])&&":"===this._last_last_text&&this._flags.parent.mode===v)&&this.allow_wrap_or_preserved_newline(e),u(e,"function"))return(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===l.OPERATOR))&&!this._output.just_added_blankline()&&!e.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?d(this._flags.last_token,["get","set","new","export"])||d(this._flags.last_token,S)||u(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===l.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:!this._flags.multiline_frame&&(k(this._flags.mode)||A(this._flags.mode))||this.print_newline(),this.print_token(e),void(this._flags.last_word=e.text);var t="NONE";if(this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?t="SPACE":d(e,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines?t="NEWLINE":(t="SPACE",this._output.space_before_token=!0):t="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&this._flags.mode===m?t="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&k(this._flags.mode)?t="SPACE":this._flags.last_token.type===l.STRING?t="NEWLINE":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||"*"===this._flags.last_token.text&&(s(this._last_last_text,["function","yield"])||this._flags.mode===v&&s(this._last_last_text,["{",","]))?t="SPACE":this._flags.last_token.type===l.START_BLOCK?t=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,t="NEWLINE"),d(e,r)&&")"!==this._flags.last_token.text&&(t=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),d(e,["else","catch","finally"]))if((this._flags.last_token.type!==l.END_BLOCK||this._previous_flags.mode!==m||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0}else"NEWLINE"===t?d(this._flags.last_token,f)||"declare"===this._flags.last_token.text&&d(e,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==l.END_EXPR?(this._flags.last_token.type!==l.START_EXPR||!d(e,["var","let","const"]))&&":"!==this._flags.last_token.text&&(u(e,"if")&&u(e.previous,"else")?this._output.space_before_token=!0:this.print_newline()):d(e,r)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&A(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===t&&(this._output.space_before_token=!0);e.previous&&(e.previous.type===l.WORD||e.previous.type===l.RESERVED)&&(this._output.space_before_token=!0),this.print_token(e),this._flags.last_word=e.text,e.type===l.RESERVED&&("do"===e.text?this._flags.do_block=!0:"if"===e.text?this._flags.if_block=!0:"import"===e.text?this._flags.import_block=!0:this._flags.import_block&&u(e,"from")&&(this._flags.import_block=!1))},C.prototype.handle_semicolon=function(e){this.start_of_statement(e)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(e);for(var t=this._tokens.peek();!(this._flags.mode!==g||this._flags.if_block&&u(t,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(e)},C.prototype.handle_string=function(e){e.text.startsWith("`")&&0===e.newlines&&""===e.whitespace_before&&(")"===e.previous.text||this._flags.last_token.type===l.WORD)||(this.start_of_statement(e)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(e),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e):!e.text.startsWith("`")||this._flags.last_token.type!==l.END_EXPR||"]"!==e.previous.text&&")"!==e.previous.text||0!==e.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(e)},C.prototype.handle_equals=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0},C.prototype.handle_comma=function(e){this.handle_whitespace_and_comments(e,!0),this.print_token(e),this._output.space_before_token=!0,this._flags.declaration_statement?(k(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)):this._flags.mode===v||this._flags.mode===g&&this._flags.parent.mode===v?(this._flags.mode===g&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)},C.prototype.handle_operator=function(e){var t="*"===e.text&&(d(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),n=s(e.text,["-","+"])&&(s(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||s(this._flags.last_token.text,r)||","===this._flags.last_token.text);if(!this.start_of_statement(e)){var i=!t;this.handle_whitespace_and_comments(e,i)}if("*"!==e.text||this._flags.last_token.type!==l.DOT)if("::"!==e.text)if(s(e.text,["-","+"])&&this.start_of_object_property())this.print_token(e);else{if(this._flags.last_token.type===l.OPERATOR&&s(this._options.operator_position,h)&&this.allow_wrap_or_preserved_newline(e),":"===e.text&&this._flags.in_case)return this.print_token(e),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==l.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var o=!0,c=!0,u=!1;if(":"===e.text?0===this._flags.ternary_depth?o=!1:(this._flags.ternary_depth-=1,u=!0):"?"===e.text&&(this._flags.ternary_depth+=1),!n&&!t&&this._options.preserve_newlines&&s(e.text,a)){var v=":"===e.text,_=v&&u,b=v&&!u;switch(this._options.operator_position){case p.before_newline:return this._output.space_before_token=!b,this.print_token(e),(!v||_)&&this.allow_wrap_or_preserved_newline(e),void(this._output.space_before_token=!0);case p.after_newline:return this._output.space_before_token=!0,!v||_?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(e):this._output.space_before_token=!1,this.print_token(e),void(this._output.space_before_token=!0);case p.preserve_newline:return b||this.allow_wrap_or_preserved_newline(e),o=!(this._output.just_added_newline()||b),this._output.space_before_token=o,this.print_token(e),void(this._output.space_before_token=!0)}}if(t){this.allow_wrap_or_preserved_newline(e),o=!1;var y=this._tokens.peek();c=y&&s(y.type,[l.WORD,l.RESERVED])}else if("..."===e.text)this.allow_wrap_or_preserved_newline(e),o=this._flags.last_token.type===l.START_BLOCK,c=!1;else if(s(e.text,["--","++","!","~"])||n){if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR)&&this.allow_wrap_or_preserved_newline(e),o=!1,c=!1,e.newlines&&("--"===e.text||"++"===e.text||"~"===e.text)){var x=d(this._flags.last_token,f)&&e.newlines;x&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(x,!0)}";"===this._flags.last_token.text&&k(this._flags.mode)&&(o=!0),this._flags.last_token.type===l.RESERVED?o=!0:this._flags.last_token.type===l.END_EXPR?o=!("]"===this._flags.last_token.text&&("--"===e.text||"++"===e.text)):this._flags.last_token.type===l.OPERATOR&&(o=s(e.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(e.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(c=!0)),(this._flags.mode===m&&!this._flags.inline_frame||this._flags.mode===g)&&("{"===this._flags.last_token.text||";"===this._flags.last_token.text)&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||o,this.print_token(e),this._output.space_before_token=c}else this.print_token(e);else this.print_token(e)},C.prototype.handle_block_comment=function(e,t){return this._output.raw?(this._output.add_raw_token(e),void(e.directives&&"end"===e.directives.preserve&&(this._output.raw=this._options.test_output_raw))):e.directives?(this.print_newline(!1,t),this.print_token(e),"start"===e.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):n.newline.test(e.text)||e.newlines?void this.print_block_commment(e,t):(this._output.space_before_token=!0,this.print_token(e),void(this._output.space_before_token=!0))},C.prototype.print_block_commment=function(e,t){var i,o=function(e){for(var t=[],i=(e=e.replace(n.allLineBreaks,"\n")).indexOf("\n");-1!==i;)t.push(e.substring(0,i)),i=(e=e.substring(i+1)).indexOf("\n");return e.length&&t.push(e),t}(e.text),r=!1,a=!1,l=e.whitespace_before,s=l.length;if(this.print_newline(!1,t),this.print_token_line_indentation(e),this._output.add_token(o[0]),this.print_newline(!1,t),o.length>1){for(r=function(e,t){for(var n=0;n<e.length;n++)if(e[n].trim().charAt(0)!==t)return!1;return!0}(o=o.slice(1),"*"),a=function(e,t){for(var n,i=0,o=e.length;i<o;i++)if((n=e[i])&&0!==n.indexOf(t))return!1;return!0}(o,l),r&&(this._flags.alignment=1),i=0;i<o.length;i++)r?(this.print_token_line_indentation(e),this._output.add_token(c(o[i]))):a&&o[i]?(this.print_token_line_indentation(e),this._output.add_token(o[i].substring(s))):(this._output.current_line.set_indent(-1),this._output.add_token(o[i])),this.print_newline(!1,t);this._flags.alignment=0}},C.prototype.handle_comment=function(e,t){e.newlines?this.print_newline(!1,t):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(e),this.print_newline(!1,t)},C.prototype.handle_dot=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),d(this._flags.last_token,f)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(e,")"===this._flags.last_token.text&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(e)},C.prototype.handle_unknown=function(e,t){this.print_token(e),"\n"===e.text[e.text.length-1]&&this.print_newline(!1,t)},C.prototype.handle_eof=function(e){for(;this._flags.mode===g;)this.restore_mode();this.handle_whitespace_and_comments(e)},Gc.Beautifier=C,Gc}var Du,Nu,Iu,Lu={exports:{}},Fu={},Pu={};function Bu(){if(Du)return Pu;Du=1;var e=ru().Options;function t(t){e.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var o=0;o<i.length;o++)"expand"!==i[o]?this.brace_style="collapse":this.brace_style=i[o]}return t.prototype=new e,Pu.Options=t,Pu}function ju(){if(Iu)return Lu.exports;Iu=1;var e=function(){if(Nu)return Fu;Nu=1;var e=Bu().Options,t=qc().Output,n=uu().InputScanner,i=new(0,Au().Directives)(/\/\*/,/\*\//),o=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,a=/\s/,l=/(?:\s|\n)+/g,s=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,c=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function u(t,n){this._source_text=t||"",this._options=new e(n),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return u.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},u.prototype.eatWhitespace=function(e){for(var t=a.test(this._input.peek()),n=0;a.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===n||n<this._options.max_preserve_newlines)&&(n++,this._output.add_new_line(!0));return t},u.prototype.foundNestedPseudoClass=function(){for(var e=0,t=1,n=this._input.peek(t);n;){if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(";"===n||"}"===n)return!1;t++,n=this._input.peek(t)}return!1},u.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},u.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},u.prototype.indent=function(){this._indentLevel++},u.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},u.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,u=this._options.eol;"auto"===u&&(u="\n",e&&o.test(e||"")&&(u=e.match(o)[0]));var d=(e=e.replace(r,"\n")).match(/^[\t ]*/)[0];this._output=new t(this._options,d),this._input=new n(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var f,p,h=0,m=!1,g=!1,v=!1,_=!1,b=!1,y=this._ch,x=!1;f=""!==this._input.read(l),p=y,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),y=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var w=this._input.read(s),A=i.get_directives(w);A&&"start"===A.ignore&&(w+=i.readIgnored(this._input)),this.print_string(w),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(c)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(f),this.print_string(this._ch);var k=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);k.match(/[ :]$/)&&(k=this.eatString(": ").replace(/\s+$/,""),this.print_string(k),this._output.space_before_token=!0),0===h&&-1!==k.indexOf(":")&&(g=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(f),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var C=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);C.match(/[ :]$/)&&(C=this.eatString(": ").replace(/\s+$/,""),this.print_string(C),this._output.space_before_token=!0),0===h&&-1!==C.indexOf(":")?(g=!0,this.indent()):C in this.NESTED_AT_RULE?(this._nestedLevel+=1,C in this.CONDITIONAL_GROUP_RULE&&(v=!0)):0===h&&!g&&(_=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(f),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),_=!1,v?(v=!1,m=this._indentLevel>=this._nestedLevel):m=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&m&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===p?this._output.space_before_token=!1:","!==p&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===p&&this._output.trim(!0),g&&(this.outdent(),g=!1),this.print_string(this._ch),m=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var S=0;S<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;S++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[S])){x=!0;break}!m&&!v||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||_||0!==h?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),g||(g=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var E='"'===p||"'"===p;this.preserveSingleSpace(E||f),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)x=!1,0===h?(g&&(this.outdent(),g=!1),_=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),h++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),h&&(h--,this.outdent()));else{var T=!1;this._input.lookBack("with")&&(T=!0),this.preserveSingleSpace(f||T),this.print_string(this._ch),g&&"$"===p&&this._options.selector_separator_newline?(this._output.add_new_line(),b=!0):(this.eatWhitespace(),h++,this.indent())}else if(")"===this._ch)h&&(h--,this.outdent()),b&&";"===this._input.peek()&&this._options.selector_separator_newline&&(b=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||g&&!b||0!==h||_?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==h)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(f),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var R='"'===p||"'"===p;this.preserveSingleSpace(R||f),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&x&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));return this._output.get_code(u)},Fu.Beautifier=u,Fu}().Beautifier,t=Bu().Options;return Lu.exports=function(t,n){return new e(t,n).beautify()},Lu.exports.defaultOptions=function(){return new t},Lu.exports}var Vu,zu={exports:{}},Hu={},Uu={};function Wu(){if(Vu)return Uu;Vu=1;var e=ru().Options;function t(t){e.call(this,t,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return t.prototype=new e,Uu.Options=t,Uu}var Yu,Gu,$u,qu,Qu={};function Ku(){if(Yu)return Qu;Yu=1;var e=yu().Tokenizer,t=yu().TOKEN,n=Au().Directives,i=Ru().TemplatablePattern,o=bu().Pattern,r={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},a=new n(/<\!--/,/-->/),l=function(t,n){e.call(this,t,n),this._current_tag_name="";var r=new i(this._input).read_options(this._options),a=new o(this._input);if(this.__patterns={word:r.until(/[\n\r\t <]/),word_control_flow_close_excluded:r.until(/[\n\r\t <}]/),single_quote:r.until_after(/'/),double_quote:r.until_after(/"/),attribute:r.until(/[\n\r\t =>]|\/>/),element_name:r.until(/[\n\r\t >\/]/),angular_control_flow_start:a.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),handlebars_open:a.until(/[\n\r\t }]/),handlebars_raw_close:a.until(/}}/),comment:a.starting_with(/<!--/).until_after(/-->/),cdata:a.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:a.starting_with(/<!\[/).until_after(/]>/),processing:a.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var l=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=a.matching(l).until_after(l)}};return(l.prototype=new e)._is_comment=function(e){return!1},l.prototype._is_opening=function(e){return e.type===r.TAG_OPEN||e.type===r.CONTROL_FLOW_OPEN},l.prototype._is_closing=function(e,t){return e.type===r.TAG_CLOSE&&t&&((">"===e.text||"/>"===e.text)&&"<"===t.text[0]||"}}"===e.text&&"{"===t.text[0]&&"{"===t.text[1])||e.type===r.CONTROL_FLOW_CLOSE&&"}"===e.text&&t.text.endsWith("{")},l.prototype._reset=function(){this._current_tag_name=""},l.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var i=this._input.peek();return null===i?this._create_token(r.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_open_handlebars(i,t))||this._read_attribute(i,e,t))||this._read_close(i,t))||this._read_script_and_style(i,e))||this._read_control_flows(i,t))||this._read_raw_content(i,e,t))||this._read_content_word(i,t))||this._read_comment_or_cdata(i))||this._read_processing(i))||this._read_open(i,t))||this._create_token(r.UNKNOWN,this._input.next())},l.prototype._read_comment_or_cdata=function(e){var t=null,n=null,i=null;"<"===e&&("!"===this._input.peek(1)&&((n=this.__patterns.comment.read())?(i=a.get_directives(n))&&"start"===i.ignore&&(n+=a.readIgnored(this._input)):n=this.__patterns.cdata.read()),n&&((t=this._create_token(r.COMMENT,n)).directives=i));return t},l.prototype._read_processing=function(e){var t=null,n=null;if("<"===e){var i=this._input.peek(1);("!"===i||"?"===i)&&(n=(n=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),n&&((t=this._create_token(r.COMMENT,n)).directives=null)}return t},l.prototype._read_open=function(e,t){var n=null,i=null;return(!t||t.type===r.CONTROL_FLOW_OPEN)&&"<"===e&&(n=this._input.next(),"/"===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),i=this._create_token(r.TAG_OPEN,n)),i},l.prototype._read_open_handlebars=function(e,t){var n=null,i=null;return(!t||t.type===r.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&"{"===e&&"{"===this._input.peek(1)&&(this._options.indent_handlebars&&"!"===this._input.peek(2)?(n=(n=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),i=this._create_token(r.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),i=this._create_token(r.TAG_OPEN,n))),i},l.prototype._read_control_flows=function(e,t){var n="",i=null;if(!this._options.templating.includes("angular"))return i;if("@"===e){if(""===(n=this.__patterns.angular_control_flow_start.read()))return i;for(var o=n.endsWith("(")?1:0,a=0;!n.endsWith("{")||o!==a;){var l=this._input.next();if(null===l)break;"("===l?o++:")"===l&&a++,n+=l}i=this._create_token(r.CONTROL_FLOW_OPEN,n)}else"}"===e&&t&&t.type===r.CONTROL_FLOW_OPEN&&(n=this._input.next(),i=this._create_token(r.CONTROL_FLOW_CLOSE,n));return i},l.prototype._read_close=function(e,t){var n=null,i=null;return t&&t.type===r.TAG_OPEN&&("<"===t.text[0]&&(">"===e||"/"===e&&">"===this._input.peek(1))?(n=this._input.next(),"/"===e&&(n+=this._input.next()),i=this._create_token(r.TAG_CLOSE,n)):"{"===t.text[0]&&"}"===e&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),i=this._create_token(r.TAG_CLOSE,"}}"))),i},l.prototype._read_attribute=function(e,t,n){var i=null,o="";if(n&&"<"===n.text[0])if("="===e)i=this._create_token(r.EQUALS,this._input.next());else if('"'===e||"'"===e){var a=this._input.next();a+='"'===e?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),i=this._create_token(r.VALUE,a)}else(o=this.__patterns.attribute.read())&&(i=t.type===r.EQUALS?this._create_token(r.VALUE,o):this._create_token(r.ATTRIBUTE,o));return i},l.prototype._is_content_unformatted=function(e){return-1===this._options.void_elements.indexOf(e)&&(-1!==this._options.content_unformatted.indexOf(e)||-1!==this._options.unformatted.indexOf(e))},l.prototype._read_raw_content=function(e,t,n){var i="";if(n&&"{"===n.text[0])i=this.__patterns.handlebars_raw_close.read();else if(t.type===r.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var o=t.opened.text.substr(1).toLowerCase();this._is_content_unformatted(o)&&(i=this._input.readUntil(new RegExp("</"+o+"[\\n\\r\\t ]*?>","ig")))}return i?this._create_token(r.TEXT,i):null},l.prototype._read_script_and_style=function(e,t){if(t.type===r.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var n=t.opened.text.substr(1).toLowerCase();if("script"===n||"style"===n){var i=this._read_comment_or_cdata(e);if(i)return i.type=r.TEXT,i;var o=this._input.readUntil(new RegExp("</"+n+"[\\n\\r\\t ]*?>","ig"));if(o)return this._create_token(r.TEXT,o)}}return null},l.prototype._read_content_word=function(e,t){var n="";return this._options.unformatted_content_delimiter&&e===this._options.unformatted_content_delimiter[0]&&(n=this.__patterns.unformatted_content_delimiter.read()),n||(n=t&&t.type===r.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),n?this._create_token(r.TEXT,n):null},Qu.Tokenizer=l,Qu.TOKEN=r,Qu}function Xu(){if(Gu)return Hu;Gu=1;var e=Wu().Options,t=qc().Output,n=Ku().Tokenizer,i=Ku().TOKEN,o=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,a=function(e,n){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=e.max_preserve_newlines,this.preserve_newlines=e.preserve_newlines,this._output=new t(e,n)};a.prototype.current_line_has_match=function(e){return this._output.current_line.has_match(e)},a.prototype.set_space_before_token=function(e,t){this._output.space_before_token=e,this._output.non_breaking_space=t},a.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},a.prototype.add_raw_token=function(e){this._output.add_raw_token(e)},a.prototype.print_preserved_newlines=function(e){var t=0;e.type!==i.TEXT&&e.previous.type!==i.TEXT&&(t=e.newlines?1:0),this.preserve_newlines&&(t=e.newlines<this.max_preserve_newlines+1?e.newlines:this.max_preserve_newlines+1);for(var n=0;n<t;n++)this.print_newline(n>0);return 0!==t},a.prototype.traverse_whitespace=function(e){return!(!e.whitespace_before&&!e.newlines)&&(this.print_preserved_newlines(e)||(this._output.space_before_token=!0),!0)},a.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},a.prototype.print_newline=function(e){this._output.add_new_line(e)},a.prototype.print_token=function(e){e.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(e.text))},a.prototype.indent=function(){this.indent_level++},a.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},a.prototype.get_full_indent=function(e){return(e=this.indent_level+(e||0))<1?"":this._output.get_indent_string(e)};var l=function(e,t){var n=null,o=null;return t.closed?("script"===e?n="text/javascript":"style"===e&&(n="text/css"),n=function(e){for(var t=null,n=e.next;n.type!==i.EOF&&e.closed!==n;){if(n.type===i.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===i.EQUALS&&n.next.next&&n.next.next.type===i.VALUE&&(t=n.next.next.text);break}n=n.next}return t}(t)||n,n.search("text/css")>-1?o="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?o="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?o="html":n.search(/test\/null/)>-1&&(o="null"),o):null};function s(e,t){return-1!==t.indexOf(e)}function c(e,t,n){this.parent=e||null,this.tag=t?t.tag_name:"",this.indent_level=n||0,this.parser_token=t||null}function u(e){this._printer=e,this._current_frame=null}function d(t,n,i,o){this._source_text=t||"",n=n||{},this._js_beautify=i,this._css_beautify=o,this._tag_stack=null;var r=new e(n,"html");this._options=r,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,5),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,8),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}u.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},u.prototype.record_tag=function(e){var t=new c(this._current_frame,e,this._printer.indent_level);this._current_frame=t},u.prototype._try_pop_frame=function(e){var t=null;return e&&(t=e.parser_token,this._printer.indent_level=e.indent_level,this._current_frame=e.parent),t},u.prototype._get_frame=function(e,t){for(var n=this._current_frame;n&&-1===e.indexOf(n.tag);){if(t&&-1!==t.indexOf(n.tag)){n=null;break}n=n.parent}return n},u.prototype.try_pop=function(e,t){var n=this._get_frame([e],t);return this._try_pop_frame(n)},u.prototype.indent_to_tag=function(e){var t=this._get_frame(e);t&&(this._printer.indent_level=t.indent_level)},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&o.test(e)&&(t=e.match(o)[0]));var l=(e=e.replace(r,"\n")).match(/^[\t ]*/)[0],s={text:"",type:""},c=new f(this._options),d=new a(this._options,l),p=new n(e,this._options).tokenize();this._tag_stack=new u(d);for(var h=null,m=p.next();m.type!==i.EOF;)m.type===i.TAG_OPEN||m.type===i.COMMENT?c=h=this._handle_tag_open(d,m,c,s,p):m.type===i.ATTRIBUTE||m.type===i.EQUALS||m.type===i.VALUE||m.type===i.TEXT&&!c.tag_complete?h=this._handle_inside_tag(d,m,c,s):m.type===i.TAG_CLOSE?h=this._handle_tag_close(d,m,c):m.type===i.TEXT?h=this._handle_text(d,m,c):m.type===i.CONTROL_FLOW_OPEN?h=this._handle_control_flow_open(d,m):m.type===i.CONTROL_FLOW_CLOSE?h=this._handle_control_flow_close(d,m):d.add_raw_token(m),s=h,m=p.next();return d._output.get_code(t)},d.prototype._handle_control_flow_open=function(e,t){var n={text:t.text,type:t.type};return e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),t.newlines?e.print_preserved_newlines(t):e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),e.print_token(t),e.indent(),n},d.prototype._handle_control_flow_close=function(e,t){var n={text:t.text,type:t.type};return e.deindent(),t.newlines?e.print_preserved_newlines(t):e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),e.print_token(t),n},d.prototype._handle_tag_close=function(e,t,n){var i={text:t.text,type:t.type};return e.alignment_size=0,n.tag_complete=!0,e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):("<"===n.tag_start_char&&(e.set_space_before_token("/"===t.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&e.print_newline(!1)),e.print_token(t)),n.indent_content&&!(n.is_unformatted||n.is_content_unformatted)&&(e.indent(),n.indent_content=!1),!n.is_inline_element&&!(n.is_unformatted||n.is_content_unformatted)&&e.set_wrap_point(),i},d.prototype._handle_inside_tag=function(e,t,n,o){var r=n.has_wrapped_attrs,a={text:t.text,type:t.type};return e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):"{"===n.tag_start_char&&t.type===i.TEXT?e.print_preserved_newlines(t)?(t.newlines=0,e.add_raw_token(t)):e.print_token(t):(t.type===i.ATTRIBUTE?e.set_space_before_token(!0):(t.type===i.EQUALS||t.type===i.VALUE&&t.previous.type===i.EQUALS)&&e.set_space_before_token(!1),t.type===i.ATTRIBUTE&&"<"===n.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(e.traverse_whitespace(t),r=r||0!==t.newlines),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(o.type!==i.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(e.print_newline(!1),r=!0)),e.print_token(t),r=r||e.previous_token_wrapped(),n.has_wrapped_attrs=r),a},d.prototype._handle_text=function(e,t,n){var i={text:t.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(e,t,n):n.is_unformatted||n.is_content_unformatted?e.add_raw_token(t):(e.traverse_whitespace(t),e.print_token(t)),i},d.prototype._print_custom_beatifier_text=function(e,t,n){var i=this;if(""!==t.text){var o,r=t.text,a=1,l="",s="";"javascript"===n.custom_beautifier_name&&"function"==typeof this._js_beautify?o=this._js_beautify:"css"===n.custom_beautifier_name&&"function"==typeof this._css_beautify?o=this._css_beautify:"html"===n.custom_beautifier_name&&(o=function(e,t){return new d(e,t,i._js_beautify,i._css_beautify).beautify()}),"keep"===this._options.indent_scripts?a=0:"separate"===this._options.indent_scripts&&(a=-e.indent_level);var c=e.get_full_indent(a);if(r=r.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===r[0]&&r.match(/^(<!--|<!\[CDATA\[)/)){var u=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(r);if(!u)return void e.add_raw_token(t);l=c+u[1]+"\n",r=u[4],u[5]&&(s=c+u[5]),r=r.replace(/\n[ \t]*$/,""),(u[2]||-1!==u[3].indexOf("\n"))&&((u=u[3].match(/[ \t]+$/))&&(t.whitespace_before=u[0]))}if(r)if(o){var f=function(){this.eol="\n"};f.prototype=this._options.raw_options,r=o(c+r,new f)}else{var p=t.whitespace_before;p&&(r=r.replace(new RegExp("\n("+p+")?","g"),"\n")),r=c+r.replace(/\n/g,"\n"+c)}l&&(r=r?l+r+"\n"+s:l+s),e.print_newline(!1),r&&(t.text=r,t.whitespace_before="",t.newlines=0,e.add_raw_token(t),e.print_newline(!0))}},d.prototype._handle_tag_open=function(e,t,n,o,r){var a=this._get_tag_open_token(t);if(!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||t.type!==i.TAG_OPEN||a.is_start_tag?(e.traverse_whitespace(t),this._set_tag_position(e,t,a,n,o),a.is_inline_element||e.set_wrap_point(),e.print_token(t)):(e.add_raw_token(t),a.start_tag_token=this._tag_stack.try_pop(a.tag_name)),a.is_start_tag&&this._is_wrap_attributes_force){var l,s=0;do{(l=r.peek(s)).type===i.ATTRIBUTE&&(a.attr_count+=1),s+=1}while(l.type!==i.EOF&&l.type!==i.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(a.alignment_size=t.text.length+1),!a.tag_complete&&!a.is_unformatted&&(e.alignment_size=a.alignment_size),a};var f=function(e,t,n){if(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",n){var o;this.tag_start_char=n.text[0],this.text=n.text,"<"===this.tag_start_char?(o=n.text.match(/^<([^\s>]*)/),this.tag_check=o?o[1]:""):(o=n.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=o?o[1]:"",(n.text.startsWith("{{#>")||n.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==n.next?this.tag_check=n.next.text.split(" ")[0]:this.tag_check=n.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),n.type===i.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||n.closed&&"/>"===n.closed.text;var r=2;"{"===this.tag_start_char&&this.text.length>=3&&"~"===this.text.charAt(2)&&(r=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(!e.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(r)))}else this.tag_complete=!0};d.prototype._get_tag_open_token=function(e){var t=new f(this._options,this._tag_stack.get_parser_token(),e);return t.alignment_size=this._options.wrap_attributes_indent_size,t.is_end_tag=t.is_end_tag||s(t.tag_check,this._options.void_elements),t.is_empty_element=t.tag_complete||t.is_start_tag&&t.is_end_tag,t.is_unformatted=!t.tag_complete&&s(t.tag_check,this._options.unformatted),t.is_content_unformatted=!t.is_empty_element&&s(t.tag_check,this._options.content_unformatted),t.is_inline_element=s(t.tag_name,this._options.inline)||this._options.inline_custom_elements&&t.tag_name.includes("-")||"{"===t.tag_start_char,t},d.prototype._set_tag_position=function(e,t,n,o,r){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||e.print_newline(!1)),this._tag_stack.record_tag(n),("script"===n.tag_name||"style"===n.tag_name)&&!(n.is_unformatted||n.is_content_unformatted)&&(n.custom_beautifier_name=l(n.tag_check,t)))),s(n.tag_check,this._options.extra_liners)&&(e.print_newline(!1),e._output.just_added_blankline()||e.print_newline(!0)),n.is_empty_element){if("{"===n.tag_start_char&&"else"===n.tag_check)this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0,e.current_line_has_match(/{{#if/)||e.print_newline(!1);"!--"===n.tag_name&&r.type===i.TAG_CLOSE&&o.is_end_tag&&-1===n.text.indexOf("\n")||(n.is_inline_element||n.is_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n))}else if(n.is_end_tag){var a=!1;a=(a=n.start_tag_token&&n.start_tag_token.multiline_content)||!n.is_inline_element&&!(o.is_inline_element||o.is_unformatted)&&!(r.type===i.TAG_CLOSE&&n.start_tag_token===o)&&"TK_CONTENT"!==r.type,(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&e.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,"<"===n.tag_start_char&&("html"===n.tag_name?n.indent_content=this._options.indent_inner_html:"head"===n.tag_name?n.indent_content=this._options.indent_head_inner_html:"body"===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),!(n.is_inline_element||n.is_unformatted)&&("TK_CONTENT"!==r.type||n.is_content_unformatted)&&e.print_newline(!1),this._calcluate_parent_multiline(e,n)},d.prototype._calcluate_parent_multiline=function(e,t){t.parent&&e._output.just_added_newline()&&(!t.is_inline_element&&!t.is_unformatted||!t.parent.is_inline_element)&&(t.parent.multiline_content=!0)};var p=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],h=["a","audio","del","ins","map","noscript","video"];return d.prototype._do_optional_end_element=function(e){var t=null;if(!e.is_empty_element&&e.is_start_tag&&e.parent){if("body"===e.tag_name)t=t||this._tag_stack.try_pop("head");else if("li"===e.tag_name)t=t||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if("dd"===e.tag_name||"dt"===e.tag_name)t=(t=t||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]);else if("p"===e.parent.tag_name&&-1!==p.indexOf(e.tag_name)){var n=e.parent.parent;(!n||-1===h.indexOf(n.tag_name))&&(t=t||this._tag_stack.try_pop("p"))}else"rp"===e.tag_name||"rt"===e.tag_name?t=(t=t||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===e.tag_name?t=t||this._tag_stack.try_pop("optgroup",["select"]):"option"===e.tag_name?t=t||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===e.tag_name?t=t||this._tag_stack.try_pop("caption",["table"]):"thead"===e.tag_name?t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===e.tag_name||"tfoot"===e.tag_name?t=(t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===e.tag_name?t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):("th"===e.tag_name||"td"===e.tag_name)&&(t=(t=t||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return e.parent=this._tag_stack.get_parser_token(),t}},Hu.Beautifier=d,Hu}function Ju(){if(qu)return Wc;qu=1;var e=function(){if(Eu)return Yc.exports;Eu=1;var e=Mu().Beautifier,t=au().Options;return Yc.exports=function(t,n){return new e(t,n).beautify()},Yc.exports.defaultOptions=function(){return new t},Yc.exports}(),t=ju(),n=function(){if($u)return zu.exports;$u=1;var e=Xu().Beautifier,t=Wu().Options;return zu.exports=function(t,n,i,o){return new e(t,n,i,o).beautify()},zu.exports.defaultOptions=function(){return new t},zu.exports}();function i(i,o,r,a){return n(i,o,r=r||e,a=a||t)}return i.defaultOptions=n.defaultOptions,Wc.js=e,Wc.css=t,Wc.html=i,Wc}!function(e){var t=Ju();t.js_beautify=t.js,t.css_beautify=t.css,t.html_beautify=t.html,e.exports=function(e,t,n){var i=function(t,n){return e.js_beautify(t,n)};return i.js=e.js_beautify,i.css=t.css_beautify,i.html=n.html_beautify,i.js_beautify=e.js_beautify,i.css_beautify=t.css_beautify,i.html_beautify=n.html_beautify,i}(t,t,t)}(Uc);const Zu=Uc.exports,ed=e({name:"Struct",emits:["update:modelValue"],props:{modelValue:[Object,Array,Function],title:String,defaultValue:{require:!1},validate:Function},inject:["designer"],computed:{t(){return this.designer.setupState.t},configured(){return!ei.empty(this.modelValue)&&Object.keys(this.modelValue).length>0}},data:()=>({editor:null,visible:!1,oldVal:null}),watch:{modelValue(){this.load()},visible(e){e&&this.load()}},methods:{load(){const e=wi(ki(this.modelValue?oi(this.modelValue):this.defaultValue));this.oldVal=e,this.$nextTick(()=>{this.editor=g(as(this.$refs.editor,{lineNumbers:!0,mode:"javascript",lint:!0,line:!0,tabSize:2,lineWrapping:!0,value:e?Zu.js(e,{indent_size:"2",indent_char:" ",max_preserve_newlines:"5",indent_scripts:"separate"}):""}))})},onOk(){const e=(this.editor.getValue()||"").trim();let t;try{t=new Function("return "+e)()}catch(rs){return pi(this.t("struct.errorMsg")),!1}return this.validate&&!1===this.validate(t)?(pi(this.t("struct.errorMsg")),!1):(this.visible=!1,wi(t)!==this.oldVal&&this.$emit("update:modelValue",t),!0)}}}),td={class:"_fd-struct"},nd={key:0,ref:"editor"};const id=ls(ed,[["render",function(e,n,l,s,c,u){const d=t("el-button"),f=t("el-badge"),p=t("el-dialog");return i(),r("div",td,[_(f,{type:"warning","is-dot":"",hidden:!e.configured},{default:o(()=>[M("div",{onClick:n[0]||(n[0]=t=>e.visible=!0)},[a(e.$slots,"default",{},()=>[_(d,{class:"_fd-plain-button",plain:"",size:"small"},{default:o(()=>[V(j(e.title||e.t("struct.title")),1)]),_:1})])])]),_:3},8,["hidden"]),_(p,{class:"_fd-struct-con",title:e.title||e.t("struct.title"),modelValue:e.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"800px"},{footer:o(()=>[M("div",null,[_(d,{onClick:n[1]||(n[1]=t=>e.visible=!1),size:"default"},{default:o(()=>[V(j(e.t("props.cancel")),1)]),_:1}),_(d,{type:"primary",onClick:e.onOk,size:"default",color:"#2f73ff"},{default:o(()=>[V(j(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:o(()=>[e.visible?(i(),r("div",nd,null,512)):F("",!0)]),_:1},8,["title","modelValue"])])}]]),od=e({name:"PropsInput",components:{Struct:id},inject:["designer"],data:()=>({}),computed:{t(){return this.designer.setupState.t},activeRule(){return this.designer.setupState.activeRule},props(){var e;const t=(null==(e=this.activeRule._fc_store)?void 0:e.props_keys)||[],n={};return t.forEach(e=>{this.activeRule.props&&null!=this.activeRule.props[e]&&(n[e]=this.activeRule.props[e])}),n}},methods:{onInput(e){this.activeRule.props||(this.activeRule.props={}),this.activeRule._fc_store||(this.activeRule._fc_store={}),Object.keys(this.props).forEach(t=>{null==(e||{})[t]&&delete this.activeRule.props[t]}),function(){hi.apply(this,arguments)}(this.activeRule.props,e||{});const t=Object.keys(e||{});t.length?this.activeRule._fc_store.props_keys=t:delete this.activeRule._fc_store.props_keys}}});const rd=ls(od,[["render",function(e,r,a,l,s,c){const u=t("Struct");return i(),n(u,{class:"_fd-props-input",modelValue:e.props,"onUpdate:modelValue":e.onInput,title:e.t("designer.customProps")},{default:o(()=>r[0]||(r[0]=[M("i",{class:"fc-icon icon-edit"},null,-1)])),_:1,__:[0]},8,["modelValue","onUpdate:modelValue","title"])}]]),ad=e({name:"LanguageConfig",inject:["designer"],computed:{localeOptions(){return this.designer.setupState.getConfig("localeOptions",[{value:"zh-cn",label:"简体中文"},{value:"en",label:"English"}])},t(){return this.designer.setupState.t}},data:()=>({column:[],uni:0,selected:[]}),methods:{copy(e){Li(e)},addColumn(){this.column.unshift({key:this.randomString(),input:!0})},saveColumn(e,t){e.input=t||!1;const n=this.designer.setupState.formOptions.language;this.localeOptions.forEach(t=>{n[t.value]||(n[t.value]={}),n[t.value][e.key]=e[t.value]})},rmColumn(e){const t=this.column[e];this.column.splice(e,1);const n=this.designer.setupState.formOptions.language;this.localeOptions.forEach(e=>{n[e.value]&&delete n[e.value][t.key]})},batchRmColumn(){this.selected.forEach(e=>{this.rmColumn(this.column.indexOf(e))}),this.selected=[]},selectionChange(e){this.selected=e},randomString(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let t="";for(let n=0;n<7;n++)t+=e.charAt(Math.floor(62*Math.random()));return e.charAt(this.uni++%26)+t}},mounted(){const e=this.designer.setupState.formOptions.language||{},t={};Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(i=>{t[i]||(t[i]={key:i}),t[i][n]=e[n][i]})}),this.column=Object.values(t)}}),ld={class:"_fd-language-config"},sd={class:"_fc-l-label"},cd={class:"_fc-l-info"},ud={class:"_fd-lc-header"},dd={class:"_fd-lc-body"},fd={class:"_fd-lc-handle"},pd=["onClick"],hd=["onClick"],md=["onClick"],gd=["onClick"];const vd=ls(ad,[["render",function(e,a,c,u,d,f){const p=t("el-button"),h=t("el-table-column"),m=t("el-input"),g=t("el-table");return i(),r("div",ld,[M("div",sd,j(e.t("language.name")),1),M("div",cd,j(e.t("warning.language")),1),M("div",ud,[_(p,{size:"small",onClick:e.addColumn},{default:o(()=>[V(j(e.t("language.add")),1)]),_:1},8,["onClick"]),_(p,{size:"small",type:"danger",plain:"",disabled:!e.selected.length,onClick:e.batchRmColumn},{default:o(()=>[V(j(e.t("language.batchRemove")),1)]),_:1},8,["disabled","onClick"])]),M("div",dd,[_(g,{data:e.column,size:"small",ref:"table",onSelectionChange:e.selectionChange,"row-key":"key"},{default:o(()=>[_(h,{type:"selection",width:"30px"}),_(h,{prop:"key",label:"Key",width:"90px"}),(i(!0),r(l,null,s(e.localeOptions,t=>(i(),n(h,{key:t.value,prop:t.value,label:t.label,"min-width":"100px"},{default:o(o=>[o.row.input?(i(),n(m,{key:0,size:"small",modelValue:o.row[t.value],"onUpdate:modelValue":e=>o.row[t.value]=e,onBlur:t=>e.saveColumn(o.row,!0)},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(i(),r(l,{key:1},[V(j(o.row[t.value]||"-"),1)],64))]),_:2},1032,["prop","label"]))),128)),_(h,{width:"75px",label:e.t("tableOptions.handle"),fixed:"right"},{default:o(t=>[M("div",fd,[t.row.input?(i(),r("i",{key:1,class:"fc-icon icon-check",onClick:n=>e.saveColumn(t.row)},null,8,hd)):(i(),r("i",{key:0,class:"fc-icon icon-edit",onClick:e=>t.row.input=!0},null,8,pd)),M("i",{class:"fc-icon icon-group",onClick:n=>e.copy(t.row.key)},null,8,md),M("i",{class:"fc-icon icon-delete-circle",onClick:n=>e.rmColumn(t.$index)},null,8,gd)])]),_:1},8,["label"])]),_:1},8,["data","onSelectionChange"])])])}]]);function _d(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var bd={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function yd(e){bd=e}var xd={exec:()=>null};function wd(e,t=""){let n="string"==typeof e?e:e.source,i={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(kd.caret,"$1"),n=n.replace(e,o),i},getRegex:()=>new RegExp(n,t)};return i}var Ad=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch(e){return!1}})(),kd={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp("^( {0,3}".concat(e,")((?:[\t ][^\\n]*)?(?:\\n|$))")),nextBulletRegex:e=>new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))")),hrRegex:e=>new RegExp("^ {0,".concat(Math.min(3,e-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),fencesBeginRegex:e=>new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:```|~~~)")),headingBeginRegex:e=>new RegExp("^ {0,".concat(Math.min(3,e-1),"}#")),htmlBeginRegex:e=>new RegExp("^ {0,".concat(Math.min(3,e-1),"}<(?:[a-z].*>|!--)"),"i")},Cd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Sd=/(?:[*+-]|\d{1,9}[.)])/,Ed=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Td=wd(Ed).replace(/bull/g,Sd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Rd=wd(Ed).replace(/bull/g,Sd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Od=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Md=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Dd=wd(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Md).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Nd=wd(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Sd).getRegex(),Id="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ld=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Fd=wd("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Ld).replace("tag",Id).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pd=wd(Od).replace("hr",Cd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Id).getRegex(),Bd={blockquote:wd(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pd).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Dd,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Cd,html:Fd,lheading:Td,list:Nd,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Pd,table:xd,text:/^[^\n]+/},jd=wd("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Id).getRegex(),Vd={...Bd,lheading:Rd,table:jd,paragraph:wd(Od).replace("hr",Cd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",jd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Id).getRegex()},zd={...Bd,html:wd("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Ld).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:wd(Od).replace("hr",Cd).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Td).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Hd=/^( {2,}|\\)\n(?!\s*$)/,Ud=/[\p{P}\p{S}]/u,Wd=/[\s\p{P}\p{S}]/u,Yd=/[^\s\p{P}\p{S}]/u,Gd=wd(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Wd).getRegex(),$d=/(?!~)[\p{P}\p{S}]/u,qd=wd(/link|precode-code|html/,"g").replace("link",new RegExp("\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("precode-",Ad?"(?<!`)()":"(^^|[^`])").replace("code",new RegExp("(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html",/<(?! )[^<>]*?>/).getRegex(),Qd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Kd=wd(Qd,"u").replace(/punct/g,Ud).getRegex(),Xd=wd(Qd,"u").replace(/punct/g,$d).getRegex(),Jd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zd=wd(Jd,"gu").replace(/notPunctSpace/g,Yd).replace(/punctSpace/g,Wd).replace(/punct/g,Ud).getRegex(),ef=wd(Jd,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,$d).getRegex(),tf=wd("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yd).replace(/punctSpace/g,Wd).replace(/punct/g,Ud).getRegex(),nf=wd(/\\(punct)/,"gu").replace(/punct/g,Ud).getRegex(),of=wd(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),rf=wd(Ld).replace("(?:--\x3e|$)","--\x3e").getRegex(),af=wd("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",rf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),lf=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,sf=wd(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",lf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),cf=wd(/^!?\[(label)\]\[(ref)\]/).replace("label",lf).replace("ref",Md).getRegex(),uf=wd(/^!?\[(ref)\](?:\[\])?/).replace("ref",Md).getRegex(),df=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ff={_backpedal:xd,anyPunctuation:nf,autolink:of,blockSkip:qd,br:Hd,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:xd,emStrongLDelim:Kd,emStrongRDelimAst:Zd,emStrongRDelimUnd:tf,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:sf,nolink:uf,punctuation:Gd,reflink:cf,reflinkSearch:wd("reflink|nolink(?!\\()","g").replace("reflink",cf).replace("nolink",uf).getRegex(),tag:af,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:xd},pf={...ff,link:wd(/^!?\[(label)\]\((.*?)\)/).replace("label",lf).getRegex(),reflink:wd(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lf).getRegex()},hf={...ff,emStrongRDelimAst:ef,emStrongLDelim:Xd,url:wd(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",df).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:wd(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",df).getRegex()},mf={...hf,br:wd(Hd).replace("{2,}","*").getRegex(),text:wd(hf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},gf={normal:Bd,gfm:Vd,pedantic:zd},vf={normal:ff,gfm:hf,breaks:mf,pedantic:pf},_f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},bf=e=>_f[e];function yf(e,t){if(t){if(kd.escapeTest.test(e))return e.replace(kd.escapeReplace,bf)}else if(kd.escapeTestNoEncode.test(e))return e.replace(kd.escapeReplaceNoEncode,bf);return e}function xf(e){try{e=encodeURI(e).replace(kd.percentDecode,"%")}catch(t){return null}return e}function wf(e,t){var n;let i=e.replace(kd.findPipe,(e,t,n)=>{let i=!1,o=t;for(;--o>=0&&"\\"===n[o];)i=!i;return i?"|":" |"}).split(kd.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!(null!=(n=i.at(-1))&&n.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(kd.slashPipe,"|");return i}function Af(e,t,n){let i=e.length;if(0===i)return"";let o=0;for(;o<i;){if(e.charAt(i-o-1)!==t)break;o++}return e.slice(0,i-o)}function kf(e,t,n,i,o){let r=t.href,a=t.title||null,l=e[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let s={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:r,title:a,text:l,tokens:i.inlineTokens(l)};return i.state.inLink=!1,s}var Cf,Sf=class{constructor(e){Zn(this,"options"),Zn(this,"rules"),Zn(this,"lexer"),this.options=e||bd}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Af(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let i=e.match(n.other.indentCodeCompensation);if(null===i)return t;let o=i[1];return t.split("\n").map(e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[i]=t;return i.length>=o.length?e.slice(o.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Af(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Af(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Af(t[0],"\n").split("\n"),n="",i="",o=[];for(;e.length>0;){let t,r=!1,a=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))a.push(e[t]),r=!0;else{if(r)break;a.push(e[t])}e=e.slice(t);let l=a.join("\n"),s=l.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?"".concat(n,"\n").concat(l):l,i=i?"".concat(i,"\n").concat(s):s;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,o,!0),this.lexer.state.top=c,0===e.length)break;let u=o.at(-1);if("code"===(null==u?void 0:u.type))break;if("blockquote"===(null==u?void 0:u.type)){let t=u,r=t.raw+"\n"+e.join("\n"),a=this.blockquote(r);o[o.length-1]=a,n=n.substring(0,n.length-t.raw.length)+a.raw,i=i.substring(0,i.length-t.text.length)+a.text;break}if("list"===(null==u?void 0:u.type)){let t=u,r=t.raw+"\n"+e.join("\n"),a=this.list(r);o[o.length-1]=a,n=n.substring(0,n.length-u.raw.length)+a.raw,i=i.substring(0,i.length-t.raw.length)+a.raw,e=r.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:o,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),i=n.length>1,o={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?"\\d{1,9}\\".concat(n.slice(-1)):"\\".concat(n),this.options.pedantic&&(n=i?n:"[*+-]");let r=this.rules.other.listItemRegex(n),a=!1;for(;e;){let n=!1,i="",l="";if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let s=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(i+=c+"\n",e=e.substring(c.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),r=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;e;){let f,p=e.split("\n",1)[0];if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c)||r.test(c)||a.test(c)||t.test(c)||n.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=d||!c.trim())l+="\n"+f.slice(d);else{if(u||s.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(s)||r.test(s)||n.test(s))break;l+="\n"+c}!u&&!c.trim()&&(u=!0),i+=p+"\n",e=e.substring(p.length+1),s=f.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(a=!0));let f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(l),f&&(l=l.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!f,loose:!1,text:l,tokens:[]}),o.raw+=i}let l=o.items.at(-1);if(!l)return;l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd(),o.raw=o.raw.trimEnd();for(let e of o.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:"checkbox",raw:t[0]+" ",checked:"[ ]"!==t[0]};e.checked=n.checked,o.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:"paragraph",raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!o.loose){let t=e.tokens.filter(e=>"space"===e.type),n=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));o.loose=n}}if(o.loose)for(let e of o.items){e.loose=!0;for(let t of e.tokens)"text"===t.type&&(t.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:i}}}table(e){var t;let n=this.rules.block.table.exec(e);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let i=wf(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=null!=(t=n[3])&&t.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(i.length===o.length){for(let e of o)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<i.length;e++)a.header.push({text:i[e],tokens:this.lexer.inline(i[e]),header:!0,align:a.align[e]});for(let e of r)a.rows.push(wf(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Af(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let i=0;i<e.length;i++)if("\\"===e[i])i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return n>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],i="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],i=e[3])}else i=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),kf(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return kf(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!n||this.rules.inline.punctuation.exec(n))){let n,o,r=[...i[0]].length-1,a=r,l=0,s="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+r);null!=(i=s.exec(t));){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n)continue;if(o=[...n].length,i[3]||i[4]){a+=o;continue}if((i[5]||i[6])&&r%3&&!((r+o)%3)){l+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let t=[...i[0]][0].length,s=e.slice(0,r+i.index+t+o);if(Math.min(r,o)%2){let e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}let c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),i=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&i&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t,n;let i;if(i=this.rules.inline.url.exec(e)){let e,o;if("@"===i[2])e=i[0],o="mailto:"+e;else{let r;do{r=i[0],i[0]=null!=(n=null==(t=this.rules.inline._backpedal.exec(i[0]))?void 0:t[0])?n:""}while(r!==i[0]);e=i[0],o="www."===i[1]?"http://"+i[0]:i[0]}return{type:"link",raw:i[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},Ef=class e{constructor(e){Zn(this,"tokens"),Zn(this,"options"),Zn(this,"state"),Zn(this,"tokenizer"),Zn(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||bd,this.options.tokenizer=this.options.tokenizer||new Sf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:kd,block:gf.normal,inline:vf.normal};this.options.pedantic?(t.block=gf.pedantic,t.inline=vf.pedantic):this.options.gfm&&(t.block=gf.gfm,this.options.breaks?t.inline=vf.breaks:t.inline=vf.gfm),this.tokenizer.rules=t}static get rules(){return{block:gf,inline:vf}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(kd.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var i,o,r;for(this.options.pedantic&&(e=e.replace(kd.tabCharGlobal," ").replace(kd.spaceLine,""));e;){let a;if(null!=(o=null==(i=this.options.extensions)?void 0:i.block)&&o.some(n=>!!(a=n.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let n=t.at(-1);1===a.raw.length&&void 0!==n?n.raw+="\n":t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let n=t.at(-1);"paragraph"===(null==n?void 0:n.type)||"text"===(null==n?void 0:n.type)?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+a.raw,n.text+="\n"+a.text,this.inlineQueue.at(-1).src=n.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let n=t.at(-1);"paragraph"===(null==n?void 0:n.type)||"text"===(null==n?void 0:n.type)?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+a.raw,n.text+="\n"+a.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},t.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let l=e;if(null!=(r=this.options.extensions)&&r.startBlock){let t,n=1/0,i=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},i),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(l=e.substring(0,n+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){let i=t.at(-1);n&&"paragraph"===(null==i?void 0:i.type)?(i.raw+=(i.raw.endsWith("\n")?"":"\n")+a.raw,i.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(a),n=l.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+a.raw,n.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(a);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var n,i,o,r,a,l;let s,c=e,u=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(u=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(u[0].slice(u[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(u=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,u.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(u=this.tokenizer.rules.inline.blockSkip.exec(c));)s=u[2]?u[2].length:0,c=c.slice(0,u.index+s)+"["+"a".repeat(u[0].length-s-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);c=null!=(o=null==(i=null==(n=this.options.hooks)?void 0:n.emStrongMask)?void 0:i.call({lexer:this},c))?o:c;let d=!1,f="";for(;e;){let n;if(d||(f=""),d=!1,null!=(a=null==(r=this.options.extensions)?void 0:r.inline)&&a.some(i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))continue;if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let i=t.at(-1);"text"===n.type&&"text"===(null==i?void 0:i.type)?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,c,f)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let i=e;if(null!=(l=this.options.extensions)&&l.startInline){let t,n=1/0,o=e.slice(1);this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},o),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(i=e.substring(0,n+1))}if(n=this.tokenizer.inlineText(i)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(f=n.raw.slice(-1)),d=!0;let i=t.at(-1);"text"===(null==i?void 0:i.type)?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(t)}}return t}},Tf=class{constructor(e){Zn(this,"options"),Zn(this,"parser"),this.options=e||bd}space(e){return""}code({text:e,lang:t,escaped:n}){var i;let o=null==(i=(t||"").match(kd.notSpaceStart))?void 0:i[0],r=e.replace(kd.endingNewline,"")+"\n";return o?'<pre><code class="language-'+yf(o)+'">'+(n?r:yf(r,!0))+"</code></pre>\n":"<pre><code>"+(n?r:yf(r,!0))+"</code></pre>\n"}blockquote({tokens:e}){return"<blockquote>\n".concat(this.parser.parse(e),"</blockquote>\n")}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return"<h".concat(t,">").concat(this.parser.parseInline(e),"</h").concat(t,">\n")}hr(e){return"<hr>\n"}list(e){let t=e.ordered,n=e.start,i="";for(let r=0;r<e.items.length;r++){let t=e.items[r];i+=this.listitem(t)}let o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+i+"</"+o+">\n"}listitem(e){return"<li>".concat(this.parser.parse(e.tokens),"</li>\n")}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return"<p>".concat(this.parser.parseInline(e),"</p>\n")}table(e){let t="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);t+=this.tablerow({text:n});let i="";for(let o=0;o<e.rows.length;o++){let t=e.rows[o];n="";for(let e=0;e<t.length;e++)n+=this.tablecell(t[e]);i+=this.tablerow({text:n})}return i&&(i="<tbody>".concat(i,"</tbody>")),"<table>\n<thead>\n"+t+"</thead>\n"+i+"</table>\n"}tablerow({text:e}){return"<tr>\n".concat(e,"</tr>\n")}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?"<".concat(n,' align="').concat(e.align,'">'):"<".concat(n,">"))+t+"</".concat(n,">\n")}strong({tokens:e}){return"<strong>".concat(this.parser.parseInline(e),"</strong>")}em({tokens:e}){return"<em>".concat(this.parser.parseInline(e),"</em>")}codespan({text:e}){return"<code>".concat(yf(e,!0),"</code>")}br(e){return"<br>"}del({tokens:e}){return"<del>".concat(this.parser.parseInline(e),"</del>")}link({href:e,title:t,tokens:n}){let i=this.parser.parseInline(n),o=xf(e);if(null===o)return i;let r='<a href="'+(e=o)+'"';return t&&(r+=' title="'+yf(t)+'"'),r+=">"+i+"</a>",r}image({href:e,title:t,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let o=xf(e);if(null===o)return yf(n);let r='<img src="'.concat(e=o,'" alt="').concat(n,'"');return t&&(r+=' title="'.concat(yf(t),'"')),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:yf(e.text)}},Rf=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Of=class e{constructor(e){Zn(this,"options"),Zn(this,"renderer"),Zn(this,"textRenderer"),this.options=e||bd,this.options.renderer=this.options.renderer||new Tf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Rf}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){var t,n;let i="";for(let o=0;o<e.length;o++){let r=e[o];if(null!=(n=null==(t=this.options.extensions)?void 0:t.renderers)&&n[r.type]){let e=r,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){i+=t||"";continue}}let a=r;switch(a.type){case"space":i+=this.renderer.space(a);break;case"hr":i+=this.renderer.hr(a);break;case"heading":i+=this.renderer.heading(a);break;case"code":i+=this.renderer.code(a);break;case"table":i+=this.renderer.table(a);break;case"blockquote":i+=this.renderer.blockquote(a);break;case"list":i+=this.renderer.list(a);break;case"checkbox":i+=this.renderer.checkbox(a);break;case"html":i+=this.renderer.html(a);break;case"def":i+=this.renderer.def(a);break;case"paragraph":i+=this.renderer.paragraph(a);break;case"text":i+=this.renderer.text(a);break;default:{let e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return"";throw new Error(e)}}}return i}parseInline(e,t=this.renderer){var n,i;let o="";for(let r=0;r<e.length;r++){let a=e[r];if(null!=(i=null==(n=this.options.extensions)?void 0:n.renderers)&&i[a.type]){let e=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){o+=e||"";continue}}let l=a;switch(l.type){case"escape":case"text":o+=t.text(l);break;case"html":o+=t.html(l);break;case"link":o+=t.link(l);break;case"image":o+=t.image(l);break;case"checkbox":o+=t.checkbox(l);break;case"strong":o+=t.strong(l);break;case"em":o+=t.em(l);break;case"codespan":o+=t.codespan(l);break;case"br":o+=t.br(l);break;case"del":o+=t.del(l);break;default:{let e='Token with "'+l.type+'" type was not found.';if(this.options.silent)return"";throw new Error(e)}}}return o}},Mf=(Cf=class{constructor(e){Zn(this,"options"),Zn(this,"block"),this.options=e||bd}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Ef.lex:Ef.lexInline}provideParser(){return this.block?Of.parse:Of.parseInline}},Zn(Cf,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Zn(Cf,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Cf),Df=new class{constructor(...e){Zn(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),Zn(this,"options",this.setOptions),Zn(this,"parse",this.parseMarkdown(!0)),Zn(this,"parseInline",this.parseMarkdown(!1)),Zn(this,"Parser",Of),Zn(this,"Renderer",Tf),Zn(this,"TextRenderer",Rf),Zn(this,"Lexer",Ef),Zn(this,"Tokenizer",Sf),Zn(this,"Hooks",Mf),this.use(...e)}walkTokens(e,t){var n,i;let o=[];for(let r of e)switch(o=o.concat(t.call(this,r)),r.type){case"table":{let e=r;for(let n of e.header)o=o.concat(this.walkTokens(n.tokens,t));for(let n of e.rows)for(let e of n)o=o.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=r;o=o.concat(this.walkTokens(e.items,t));break}default:{let e=r;null!=(i=null==(n=this.defaults.extensions)?void 0:n.childTokens)&&i[e.type]?this.defaults.extensions.childTokens[e.type].forEach(n=>{let i=e[n].flat(1/0);o=o.concat(this.walkTokens(i,t))}):e.tokens&&(o=o.concat(this.walkTokens(e.tokens,t)))}}return o}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let i=e.renderer.apply(this,t);return!1===i&&(i=n.apply(this,t)),i}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Tf(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error("renderer '".concat(n,"' does not exist"));if(["options","parser"].includes(n))continue;let i=n,o=e.renderer[i],r=t[i];t[i]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=r.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Sf(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error("tokenizer '".concat(n,"' does not exist"));if(["options","rules","lexer"].includes(n))continue;let i=n,o=e.tokenizer[i],r=t[i];t[i]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=r.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Mf;for(let n in e.hooks){if(!(n in t))throw new Error("hook '".concat(n,"' does not exist"));if(["options","block"].includes(n))continue;let i=n,o=e.hooks[i],r=t[i];Mf.passThroughHooks.has(n)?t[i]=e=>{if(this.defaults.async&&Mf.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await o.call(t,e);return r.call(t,n)})();let i=o.call(t,e);return r.call(t,i)}:t[i]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await o.apply(t,e);return!1===n&&(n=await r.apply(t,e)),n})();let n=o.apply(t,e);return!1===n&&(n=r.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,i=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(i.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Ef.lex(e,null!=t?t:this.defaults)}parser(e,t){return Of.parse(e,null!=t?t:this.defaults)}parseMarkdown(e){return(t,n)=>{let i={...n},o={...this.defaults,...i},r=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return r(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(t):t,i=await(o.hooks?await o.hooks.provideLexer():e?Ef.lex:Ef.lexInline)(n,o),r=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(r,o.walkTokens));let a=await(o.hooks?await o.hooks.provideParser():e?Of.parse:Of.parseInline)(r,o);return o.hooks?await o.hooks.postprocess(a):a})().catch(r);try{o.hooks&&(t=o.hooks.preprocess(t));let n=(o.hooks?o.hooks.provideLexer():e?Ef.lex:Ef.lexInline)(t,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():e?Of.parse:Of.parseInline)(n,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(a){return r(a)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+yf(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Nf(e,t){return Df.parse(e,t)}function If(e,t,n,i=t.length,o=n.length){if(0===i&&0===o)return[];if(i>0&&o>0&&t[i-1]===n[o-1]){const r=If(e,t,n,i-1,o-1);return r.push({type:"unchanged",oldLine:t[i-1],newLine:n[o-1],oldLineIndex:i-1,newLineIndex:o-1}),r}if(o>0&&(0===i||e[i][o-1]>=e[i-1][o])){const r=If(e,t,n,i,o-1);return r.push({type:"added",oldLine:"",newLine:n[o-1],oldLineIndex:-1,newLineIndex:o-1}),r}if(i>0&&(0===o||e[i][o-1]<e[i-1][o])){const r=If(e,t,n,i-1,o);return r.push({type:"removed",oldLine:t[i-1],newLine:"",oldLineIndex:i-1,newLineIndex:-1}),r}return[]}function Lf(e,t,n=5){const i=JSON.stringify(e,null,2),o=JSON.stringify(t,null,2),r=i.split("\n"),a=o.split("\n"),l=function(e,t){const n=e.length,i=t.length,o=Array(n+1).fill(null).map(()=>Array(i+1).fill(0));for(let r=1;r<=n;r++)for(let n=1;n<=i;n++)e[r-1]===t[n-1]?o[r][n]=o[r-1][n-1]+1:o[r][n]=Math.max(o[r-1][n],o[r][n-1]);return o}(r,a),s=If(l,r,a),c=new Set;if(s.forEach((e,t)=>{"unchanged"!==e.type&&c.add(t)}),0===c.size)return[];const u=new Set,d=[],f=Array.from(c).sort((e,t)=>e-t);let p={start:f[0],end:f[0]};for(let m=1;m<f.length;m++)f[m]===p.end+1?p.end=f[m]:(d.push(p),p={start:f[m],end:f[m]});d.push(p),d.forEach(e=>{for(let t=e.start;t<=e.end;t++)u.add(t);for(let t=1;t<=n;t++)e.start-t>=0&&u.add(e.start-t),e.end+t<s.length&&u.add(e.end+t)});const h=[];return Array.from(u).sort((e,t)=>e-t).forEach(e=>{const t=s[e];h.push({type:t.type,oldLine:t.oldLine,newLine:t.newLine,lineNumber:e+1,originalIndex:e,isSame:"unchanged"===t.type,isContext:"unchanged"===t.type&&!c.has(e)})}),h}Nf.options=Nf.setOptions=function(e){return Df.setOptions(e),Nf.defaults=Df.defaults,yd(Nf.defaults),Nf},Nf.getDefaults=_d,Nf.defaults=bd,Nf.use=function(...e){return Df.use(...e),Nf.defaults=Df.defaults,yd(Nf.defaults),Nf},Nf.walkTokens=function(e,t){return Df.walkTokens(e,t)},Nf.parseInline=Df.parseInline,Nf.Parser=Of,Nf.parser=Of.parse,Nf.Renderer=Tf,Nf.TextRenderer=Rf,Nf.Lexer=Ef,Nf.lexer=Ef.lex,Nf.Tokenizer=Sf,Nf.Hooks=Mf,Nf.parse=Nf,Nf.options,Nf.setOptions,Nf.use,Nf.walkTokens,Nf.parseInline,Of.parse,Ef.lex;const Ff={name:"MarkdownRenderer",inject:["designer"],props:{content:{type:String,required:!0}},data:()=>({}),computed:{t(){return this.designer.setupState.t},renderedMarkdown(){if(!this.content)return"";const e=new Nf.Renderer;e.code=({text:e,lang:t})=>{if("fcRuleDiff"===t)return this.renderDiffCode(e,t);const n=this.highlightCode(e,t);return'<pre><code class="language-'.concat(t||"text",'">').concat(n,"</code></pre>")},e.link=({href:e,title:t,text:n})=>{const i=t?' title="'.concat(t,'"'):"";return'<a href="'.concat(e,'"').concat(i,' target="_blank" rel="noopener noreferrer">').concat(n,"</a>")},Nf.setOptions({renderer:e,breaks:!0,gfm:!0});const t=Nf.parse(this.content);return this.postprocessHtml(t)}},methods:{postprocessHtml(e){return e.replace(/<pre><code[^>]*class="([^"]*)"[^>]*>([\s\S]*?)<\/code><\/pre>/g,(e,t,n)=>{const i=this.generateBlockId(),o=t.match(/language-(\w+)/),r=o?o[1]:"text";return'\n <div class="code-block-container" data-block-id="'.concat(i,'">\n <div class="code-block-header">\n <span class="code-language">').concat(r,'</span>\n <div class="code-block-actions">\n <div class="code-action-item" onclick="_fd_copyCode(\'').concat(i,'\')">\n <i class="fc-icon icon-group"></i>\n <span class="code-action-text">').concat(this.t("props.copy"),"</span>\n </div>\n ").concat("fcRule"===r?'<div class="code-action-item is-primary" onclick="_fd_importCode(\''.concat(i,'\')">\n <i class="fc-icon icon-upload"></i>\n <span class="code-action-text">').concat(this.t("props.import"),"</span>\n </div>"):"",'\n </div>\n </div>\n <pre><code class="').concat(t,'">').concat(n,"</code></pre>\n </div>\n ")})},highlightCode(e,t){if(t&&Fc.getLanguage(t))try{return Fc.highlight(e,{language:t}).value}catch(rs){}return Fc.highlightAuto(e).value},generateBlockId:()=>"code-block-"+Math.random().toString(36).substr(2,9),copyCode(e){const t=document.querySelector('[data-block-id="'.concat(e,'"]'));if(t){const e=t.querySelector("code");e&&Li(e.innerText)}},importCode(e){const t=document.querySelector('[data-block-id="'.concat(e,'"]'));if(t){const e=t.querySelector("code");if(e){const t=Kl.parseJson(e.innerText);Array.isArray(t)?this.designer.setupState.setRule(t):t.rule&&this.designer.setupState.setRule(t.rule)}}},renderDiffCode(e,t){try{const t=JSON.parse(e);if(t.oldJson&&t.newJson){const e=Lf(JSON.parse(t.oldJson),JSON.parse(t.newJson));return this.generateDiffHtml(e,t.newJson)}}catch(n){}return'<pre><code class="language-text">'.concat(this.highlightCode(e,"text"),"</code></pre>")},generateDiffHtml(e,t){const n=this.generateBlockId();return'\n <div class="code-block-container" data-block-id="'.concat(n,'">\n <div class="code-block-header">\n <span class="code-language">DIFF</span>\n <div class="code-block-actions">\n <div class="code-action-item" onclick="_fd_copyCode(\'').concat(n,'\')">\n <i class="fc-icon icon-group"></i>\n <span class="code-action-text">').concat(this.t("props.copy"),'</span>\n </div>\n <div class="code-action-item is-primary" onclick="_fd_importCode(\'').concat(n,'\')">\n <i class="fc-icon icon-upload"></i>\n <span class="code-action-text">').concat(this.t("props.import"),'</span>\n </div>\n </div>\n </div>\n <div class="diff-content">\n <div class="diff-view diff-line-view" id="diff-line-').concat(n,'">\n ').concat(this.generateLineDiffHtml(e),'\n </div>\n </div>\n <code style="display: none;">').concat(t,"</code>\n </div>\n ")},generateLineDiffHtml(e){let t='<div class="diff-lines">';return e.forEach((e,n)=>{let i="diff-line diff-line-".concat(e.type);e.isContext&&(i+=" diff-context");const o=e.lineNumber;e.isSame?t+='\n <div class="'.concat(i,'">\n <div class="diff-line-number">').concat(o,'</div>\n <div class="diff-line-content">\n <div class="diff-same-line">').concat(this.escapeHtml(e.oldLine),"</div>\n </div>\n </div>\n "):t+='\n <div class="'.concat(i,'">\n <div class="diff-line-number">').concat(o,'</div>\n <div class="diff-line-content">\n ').concat(e.oldLine?'<div class="diff-old-line">'.concat(this.escapeHtml(e.oldLine),"</div>"):"","\n ").concat(e.newLine?'<div class="diff-new-line">'.concat(this.escapeHtml(e.newLine),"</div>"):"","\n </div>\n </div>\n ")}),t+="</div>",t},escapeHtml(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}},mounted(){window._fd_copyCode=this.copyCode,window._fd_importCode=this.importCode}},Pf=["innerHTML"];const Bf={name:"FcAiPanel",inject:["designer"],components:{MarkdownRenderer:ls(Ff,[["render",function(e,t,n,o,a,l){return i(),r("div",{class:"_fd-markdown-renderer",innerHTML:l.renderedMarkdown},null,8,Pf)}],["__scopeId","data-v-537e7504"]])},data:()=>({page:0,inputText:"",controller:null,isThinking:!1,isUserAtBottom:!0,suggestions:[],messages:[]}),computed:{t(){return this.designer.setupState.t},api(){var e,t;return(null==(t=null==(e=this.designer.props.config)?void 0:e.ai)?void 0:t.api)||"https://api.form-create.com/ai/v2/chat/form"},token(){var e,t;let n=(null==(t=null==(e=this.designer.props.config)?void 0:e.ai)?void 0:t.token)||"";return-1===n.indexOf("Bearer")&&(n="Bearer ".concat(n)),n}},methods:{sendMessage(){if(this.isThinking)return this.isThinking=!1,void(this.controller&&this.controller.abort());if(!this.inputText.trim())return;const e={type:"user",content:this.inputText.trim(),timestamp:new Date};this.messages.push(e),this.inputText="",this.isUserAtBottom=!0,this.$nextTick(()=>{this.scrollToBottom()}),this.simulateThinking()},async simulateThinking(){this.isThinking=!0;const e={type:"ai",content:[],status:"thinking",timestamp:new Date};this.messages.push(e),this.saveHistory(),this.callAiApi(e)},async callAiApi(e){var t,n,i;try{e.status="thinking";const r=this.messages.filter(e=>"user"===e.type),a=r[r.length-1];this.controller=new AbortController;const l=await fetch(this.api,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.token},body:JSON.stringify({ui:"element-plus",basic:!0,form:{rule:this.designer.setupState.getJson(),option:this.designer.setupState.getOptionsJson()},messages:[{role:"user",content:a.content}]}),signal:this.controller.signal});if(!l.ok)throw new Error("HTTP error! status: ".concat(l.status));const s=l.body.getReader(),c=new TextDecoder;let u="",d="";for(;;){const{done:r,value:a}=await s.read();if(r)break;d+=c.decode(a,{stream:!0});const l=d.split("\n");d=l.pop()||"";for(const s of l){const r=s.trim();if(r.startsWith("data: ")){const a=r.slice(6);if("[DONE]"===a)return e.status="completed",this.isThinking=!1,this.$forceUpdate(),void this.saveHistory();try{let o=null==(i=null==(n=null==(t=JSON.parse(a).choices)?void 0:t[0])?void 0:n.delta)?void 0:i.content;if(o){if(o.startsWith("[FC_TOOL]")){const t=JSON.parse(o.replace("[FC_TOOL]",""));this.updateStep(e,t),u=""}else{o.trim().startsWith("```fcRuleDiff")&&(o="\n```fcRuleDiff\n".concat(JSON.stringify({newJson:o.trim().slice(13,-3).trim(),oldJson:Kl.toJson({rule:this.designer.setupState.getRule()})}),"\n```\n")),u+=o;let t=e.content[e.content.length-1];(!t||"text"!==t.type)&&(t={type:"text",text:""},e.content.push(t)),t.text=u.trim()}this.$forceUpdate()}}catch(o){}}}}e.status="completed",this.isThinking=!1,this.$forceUpdate()}catch(r){this.isThinking=!1,"AbortError"===r.name?e.status="completed":(e.status="error",e.isError=!0),this.$forceUpdate()}this.saveHistory()},updateStep(e,t){let n=!1;if(t.id&&e.content.forEach(e=>{"tool"===e.type&&e.steps.forEach(e=>{e.id===t.id&&(e.title=t.title,e.status=t.status,n=!0)})}),!n){let n=e.content[e.content.length-1];(!n||"tool"!==n.type)&&(n={type:"tool",steps:[]},e.content.push(n)),n.steps.push({title:t.title,status:t.status,id:t.id})}},handleKeydown(e){"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),this.sendMessage())},handleInput(){const e=event.target;e.style.height="auto",e.style.height=Math.min(e.scrollHeight,120)+"px"},copyMessage(e){Li("string"==typeof e?e:e.map(e=>{if("text"===e.type)return e.text}).filter(e=>!!e).join("\n").trim())},rmMessage(e){this.messages.splice(e,1)},clearChat(){this.messages=[],this.inputText="",this.isThinking=!1,localStorage.removeItem("fc_ai_chat")},refreshSuggestions(){const e=["生成一个就诊满意度问卷表单","创建一个建议收集表单,包含联系人、联系邮箱、分类和建议内容","追加一个用户信息表单",'添加一个标签组件,显示文本为 "Tag"',"生成一个Vue组件实现金额输入框","生成一个js版本的高精度加法","添加一个日期选择器组件,用于选择出生日期","删除商品简介字段",'当单选框选择 "选项1" 时,显示输入框组件',"设置输入框为必填并限制长度必须大于13","商品价格字段使用数字输入框组件","给输入类组件补充占位提示文本placeholder","添加手机号格式验证","添加自定义验证:确认密码必须与密码一致","将姓名和手机号并排显示在同一行"];4*this.page<e.length?this.page++:this.page=1;const t=4*(this.page-1),n=t+4;this.suggestions=e.slice(t,n)},selectSuggestion(e){this.inputText=e,this.sendMessage()},scrollToBottom(){const e=this.$refs.chatContent;e&&this.isUserAtBottom&&(e.scrollTop=e.scrollHeight)},checkIfUserAtBottom(){const e=this.$refs.chatContent;if(e){const t=e.scrollTop+e.clientHeight>=e.scrollHeight-20;this.isUserAtBottom=t}},handleScroll(){this.checkIfUserAtBottom()},getHistory(){const e=localStorage.getItem("fc_ai_chat");e&&(this.messages=JSON.parse(e)||[])},saveHistory(){localStorage.setItem("fc_ai_chat",JSON.stringify(this.messages))}},created(){this.getHistory(),this.refreshSuggestions()},mounted(){this.$nextTick(()=>{this.scrollToBottom();const e=this.$refs.chatContent;e&&e.addEventListener("scroll",this.handleScroll)})},beforeUnmount(){const e=this.$refs.chatContent;e&&e.removeEventListener("scroll",this.handleScroll),delete window._fd_copyCode,delete window._fd_importCode},updated(){this.$nextTick(()=>{this.scrollToBottom()})}},jf={class:"_fd-ai-panel"},Vf={class:"_fd-ai-header"},zf={class:"_fd-ai-title"},Hf={class:"_fd-ai-name"},Uf={key:0,class:"_fd-ai-actions"},Wf={key:0,class:"_fd-ai-welcome"},Yf={class:"_fd-ai-welcome-suggestions"},Gf={class:"_fd-ai-suggestions-header"},$f={class:"_fd-ai-suggestions-list"},qf=["onClick"],Qf={class:"_fd-ai-messages"},Kf={key:0,class:"_fd-ai-message-content"},Xf={class:"_fd-ai-message-bubble _fd-ai-message-bubble--user"},Jf={class:"_fd-ai-message-text"},Zf={class:"_fd-ai-message-footer"},ep={class:"_fd-ai-message-actions"},tp=["onClick"],np=["onClick"],ip={key:1,class:"_fd-ai-message-content"},op={key:0,class:"_fd-ai-thinking-section"},rp={class:"_fd-ai-thinking-steps"},ap={key:0,height:"12",viewBox:"0 0 12 12",fill:"none"},lp={key:1,class:"_fd-ai-thinking-step-loading"},sp={key:1,class:"_fd-ai-thinking-step-pending"},cp={class:"_fd-ai-thinking-step-text"},up={key:0,class:"_fd-ai-message-text"},dp={key:0,class:"_fd-ai-message-text _fd-ai-message-text--error"},fp={key:1,class:"_fd-ai-thinking-status"},pp={key:0,class:"_fd-ai-message-footer"},hp={class:"_fd-ai-message-actions"},mp=["onClick"],gp=["onClick"],vp={class:"_fd-ai-input"},_p={class:"_fd-ai-input-container"},bp=["placeholder","disabled"],yp={key:0,class:"fc-icon icon-suspend"},xp={key:1,class:"fc-icon icon-send"};const wp=ls(Bf,[["render",function(e,n,o,a,c,u){const d=t("MarkdownRenderer");return i(),r("div",jf,[M("div",Vf,[M("div",zf,[n[6]||(n[6]=M("i",{class:"fc-icon icon-ai bright"},null,-1)),M("span",Hf,j(u.t("ai.name")),1)]),c.messages.length?(i(),r("div",Uf,[M("div",{class:"_fd-ai-action-btn",onClick:n[0]||(n[0]=(...e)=>u.clearChat&&u.clearChat(...e))},n[7]||(n[7]=[M("i",{class:"fc-icon icon-delete2"},null,-1)]))])):F("",!0)]),M("div",{class:P(["_fd-ai-content",{"_fd-ai-content--centered":0===c.messages.length}]),ref:"chatContent"},[0===c.messages.length?(i(),r("div",Wf,[n[9]||(n[9]=M("div",{class:"_fd-ai-welcome-icon"},null,-1)),M("h3",null,j(u.t("ai.welcome")),1),M("p",null,j(u.t("ai.info")),1),M("div",Yf,[M("div",Gf,[M("span",null,j(u.t("ai.try")),1),M("div",{class:"_fd-ai-refresh-btn",onClick:n[1]||(n[1]=(...e)=>u.refreshSuggestions&&u.refreshSuggestions(...e))},[n[8]||(n[8]=M("i",{class:"fc-icon icon-refresh2"},null,-1)),V(" "+j(u.t("ai.change")),1)])]),M("div",$f,[(i(!0),r(l,null,s(c.suggestions,(e,t)=>(i(),r("div",{key:t,class:"_fd-ai-suggestion-item",onClick:t=>u.selectSuggestion(e)},j(e),9,qf))),128))])])])):F("",!0),M("div",Qf,[(i(!0),r(l,null,s(c.messages,(e,t)=>(i(),r("div",{key:t,class:P(["_fd-ai-message","_fd-ai-message--".concat(e.type)])},["user"===e.type?(i(),r("div",Kf,[M("div",Xf,[M("div",Jf,j(e.content),1)]),M("div",Zf,[M("div",ep,[M("div",{class:"_fd-ai-action-btn",onClick:e=>u.rmMessage(t)},n[10]||(n[10]=[M("i",{class:"fc-icon icon-delete2"},null,-1)]),8,tp),M("div",{class:"_fd-ai-action-btn",onClick:t=>u.copyMessage(e.content)},n[11]||(n[11]=[M("i",{class:"fc-icon icon-group"},null,-1)]),8,np)])])])):"ai"===e.type?(i(),r("div",ip,[M("div",{class:P(["_fd-ai-message-avatar",{"_fd-ai-message-avatar--error":e.isError}])},null,2),M("div",{class:P(["_fd-ai-message-bubble",{"_fd-ai-message-bubble--ai":!e.isError,"_fd-ai-message-bubble--error":e.isError,"_fd-ai-message-bubble--thinking":"thinking"===e.type}])},[(i(!0),r(l,null,s(e.content,e=>(i(),r(l,null,["tool"===e.type?(i(),r(l,{key:0},[e.steps&&e.steps.length>0?(i(),r("div",op,[M("div",rp,[(i(!0),r(l,null,s(e.steps,(e,o)=>(i(),r("div",{key:o,class:P(["_fd-ai-thinking-step",{"_fd-ai-thinking-step--active":c.isThinking&&t===c.messages.length-1}])},[M("div",{class:P(["_fd-ai-thinking-step-icon",{"_fd-ai-thinking-step-icon--executing":"end"!==e.status&&c.isThinking&&t===c.messages.length-1,"_fd-ai-thinking-step-icon--completed":"end"===e.status&&c.isThinking&&t===c.messages.length-1}])},[c.messages.length-1===t&&c.isThinking?(i(),r(l,{key:0},["end"===e.status?(i(),r("svg",ap,n[12]||(n[12]=[M("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(i(),r("div",lp))],64)):(i(),r("div",sp))],2),M("span",cp,j(e.title),1)],2))),128))])])):F("",!0)],64)):F("",!0),"text"===e.type?(i(),r(l,{key:1},[e.text?(i(),r("div",up,[_(d,{content:e.text},null,8,["content"])])):F("",!0)],64)):F("",!0)],64))),256)),e.isError?(i(),r("div",dp,j(u.t("ai.error")),1)):F("",!0),"thinking"===e.status?(i(),r("div",fp,n[13]||(n[13]=[M("div",{class:"_fd-ai-thinking-indicator"},[M("div",{class:"_fd-ai-thinking-dot"}),M("div",{class:"_fd-ai-thinking-dot"}),M("div",{class:"_fd-ai-thinking-dot"})],-1)]))):F("",!0)],2),c.isThinking&&t===c.messages.length-1?F("",!0):(i(),r("div",pp,[M("div",hp,[M("div",{class:"_fd-ai-action-btn",onClick:e=>u.rmMessage(t)},n[14]||(n[14]=[M("i",{class:"fc-icon icon-delete2"},null,-1)]),8,mp),M("div",{class:"_fd-ai-action-btn",onClick:t=>u.copyMessage(e.content)},n[15]||(n[15]=[M("i",{class:"fc-icon icon-group"},null,-1)]),8,gp)])]))])):F("",!0)],2))),128))])],2),M("div",vp,[M("div",_p,[y(M("textarea",{"onUpdate:modelValue":n[2]||(n[2]=e=>c.inputText=e),onKeydown:n[3]||(n[3]=(...e)=>u.handleKeydown&&u.handleKeydown(...e)),onInput:n[4]||(n[4]=(...e)=>u.handleInput&&u.handleInput(...e)),placeholder:u.t("ai.placeholder"),class:"_fd-ai-input-field",disabled:c.isThinking},null,40,bp),[[$,c.inputText]]),M("div",{class:P(["_fd-ai-send-btn",{"_fd-ai-send-btn--disabled":!c.inputText.trim()&&!c.isThinking}]),onClick:n[5]||(n[5]=(...e)=>u.sendMessage&&u.sendMessage(...e))},[c.isThinking?(i(),r("div",yp)):(i(),r("div",xp))],2)])])])}],["__scopeId","data-v-23304ea6"]]),Ap=e({name:"StructEditor",props:{modelValue:[Object,Array,Function],format:Boolean,defaultValue:{require:!1}},emits:["blur","focus","update:modelValue"],inject:["designer"],data:()=>({editor:null,visible:!1,err:!1,oldVal:null}),computed:{t(){return this.designer.setupState.t}},watch:{modelValue(e){if(this.editor){const t=e?this.toJson(e):"";this.oldVal=t;const n=this.editor.getScrollInfo().top;this.editor.setValue(t),this.editor.scrollTo(0,n)}}},mounted(){this.$nextTick(()=>{this.load()})},methods:{toJson(e){return this.format?Xl.toJson(e,2):wi(e)},load(){const e=this.modelValue?this.toJson(this.modelValue):"";this.oldVal=e,this.$nextTick(()=>{this.editor=g(as(this.$refs.editor,{lineNumbers:!0,mode:"javascript",lint:!0,line:!0,tabSize:2,lineWrapping:!0,value:e?Zu.js(e,{indent_size:"2",indent_char:" ",max_preserve_newlines:"5",indent_scripts:"separate"}):""})),this.editor.on("blur",()=>{this.$emit("blur")}),this.editor.on("focus",()=>{this.$emit("focus")})})},save(){const e=(this.editor.getValue()||"").trim();let t;try{t=new Function("return "+e)()}catch(rs){return pi(this.t("struct.errorMsg")),!1}return this.validate&&!1===this.validate(t)?(this.err=!0,!1):(this.visible=!1,this.toJson(t)!==this.oldVal&&this.$emit("update:modelValue",t),!0)}}}),kp={class:"_fd-struct-editor"},Cp={ref:"editor"};const Sp=ls(Ap,[["render",function(e,t,n,o,a,l){return i(),r("div",kp,[M("div",Cp,null,512)])}]]);const Ep=ls(e({name:"JsonPreview",components:{StructEditor:Sp},inject:["designer"],data(){return{active:"rule",value:this.designer.setupState.getRule(),oldValue:""}},watch:{active(){this.updateValue()}},computed:{change(){return"rule"===this.active?this.designer.setupState.children:this.designer.setupState.formOptions},t(){return this.designer.setupState.t}},methods:{updateValue(){"rule"===this.active?this.value=this.designer.setupState.getRule():this.value=this.designer.setupState.getOptions()},handleFocus(){this.oldValue=Xl.toJson(this.value)},handleBlur(){let e;this.$refs.editor.save()&&(e=Xl.toJson(this.value))!==this.oldValue&&("rule"===this.active?this.designer.setupState.setRule(e):this.designer.setupState.setOptions(this.value||{}))}},mounted(){this.$watch(()=>this.change,()=>{this.updateValue()},{deep:!0})}}),[["render",function(e,r,a,l,s,c){const u=t("el-header"),d=t("StructEditor"),f=t("el-main"),p=t("el-container");return i(),n(p,{class:"_fc-json-preview"},{default:o(()=>[_(u,{height:"40px",class:"_fc-l-tabs"},{default:o(()=>[M("div",{class:P(["_fc-l-tab",{active:"rule"===e.active}]),onClick:r[0]||(r[0]=t=>e.active="rule")},j(e.t("designer.json")),3),M("div",{class:P(["_fc-l-tab",{active:"options"===e.active}]),onClick:r[1]||(r[1]=t=>e.active="options")},j(e.t("designer.form")),3)]),_:1}),_(f,{style:{padding:"8px"}},{default:o(()=>[_(d,{ref:"editor",modelValue:e.value,"onUpdate:modelValue":r[2]||(r[2]=t=>e.value=t),onBlur:e.handleBlur,onFocus:e.handleFocus,format:"",style:{height:"100%"}},null,8,["modelValue","onBlur","onFocus"])]),_:1})]),_:1})}]]),Tp=e({name:"Warning",props:{tooltip:String},data:()=>({})}),Rp=["innerHTML"],Op={key:0,class:"_fd-warning-text"},Mp={key:1,class:"fc-icon icon-question"};const Dp=ls(Tp,[["render",function(e,l,s,c,u,d){const f=t("el-tooltip");return i(),n(f,{effect:"dark",placement:"top-start","popper-class":"_fd-warning-pop"},{content:o(()=>[M("span",{innerHTML:e.tooltip},null,8,Rp)]),default:o(()=>[e.$slots.default?(i(),r("span",Op,[a(e.$slots,"default")])):(i(),r("i",Mp))]),_:3})}]]),Np=["props"],Ip=["class","style","directives"],Lp=["on","hook"],Fp=(e,t={},n={})=>{const i=[...Np,...n.normal||[]],o=[...Ip,...n.array||[]],r=[...Lp,...n.functional||[]],a=n.props||[];return e.reduce((e,t)=>{for(const n in t)if(e[n])if(a.indexOf(n)>-1)e[n]=Fp([t[n]],e[n]);else if(i.indexOf(n)>-1)e[n]={...e[n],...t[n]};else if(o.indexOf(n)>-1){const i=e[n]instanceof Array?e[n]:[e[n]],o=t[n]instanceof Array?t[n]:[t[n]];e[n]=[...i,...o]}else if(r.indexOf(n)>-1)for(const i in t[n])if(e[n][i]){const o=e[n][i]instanceof Array?e[n][i]:[e[n][i]],r=t[n][i]instanceof Array?t[n][i]:[t[n][i]];e[n][i]=[...o,...r]}else e[n][i]=t[n][i];else if("hook"===n)for(let i in t[n])e[n][i]?e[n][i]=Pp(e[n][i],t[n][i]):e[n][i]=t[n][i];else e[n]=t[n];else i.indexOf(n)>-1||r.indexOf(n)>-1||a.indexOf(n)>-1?e[n]={...t[n]}:o.indexOf(n)>-1?e[n]=t[n]instanceof Array?[...t[n]]:"object"==typeof t[n]?{...t[n]}:t[n]:e[n]=t[n];return e},t)},Pp=(e,t)=>function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)},Bp=e({name:"ConfigItem",components:{Warning:Dp},props:{label:String,info:String,warning:String,appendBackground:String,arrow:{type:Boolean,default:!0},showAppend:Boolean},data:()=>({visit:!1})}),jp={class:"_fd-config-item"},Vp={class:"_fd-ci-head"},zp={key:0,class:"_fd-ci-con"},Hp={key:1,class:"_fd-ci-info"};const Up=ls(Bp,[["render",function(e,l,s,c,u,d){const f=t("Warning");return i(),r("div",jp,[M("div",Vp,[M("div",{class:P(["_fd-ci-label",e.$slots.append&&!1!==e.arrow?"is-arrow":""]),onClick:l[0]||(l[0]=t=>e.visit=e.$slots.append&&!1!==e.arrow&&!e.visit)},[e.warning?(i(),n(f,{key:0,tooltip:e.warning},{default:o(()=>[a(e.$slots,"label",{},()=>[M("span",null,j(e.label),1)])]),_:3},8,["tooltip"])):a(e.$slots,"label",{key:1},()=>[M("span",null,j(e.label),1)]),e.$slots.append&&!1!==e.arrow?(i(),r("i",{key:2,class:P(["fc-icon icon-down",e.showAppend||e.visit?"down":""])},null,2)):F("",!0)],2),e.$slots.default||e.info?(i(),r("div",zp,[e.$slots.default?a(e.$slots,"default",{key:0}):(i(),r("span",Hp,j(e.info),1))])):F("",!0)]),e.showAppend||e.visit?(i(),r("div",{key:0,class:"_fd-ci-append",style:H("background:"+e.appendBackground)},[a(e.$slots,"append")],4)):F("",!0)])}]]);Fc.registerLanguage("javascript",Bc),Fc.registerLanguage("xml",Pc);const Wp=e({name:"FcDesigner",components:{ConfigItem:Up,Warning:Dp,JsonPreview:Ep,FcAiPanel:wp,LanguageConfig:vd,PropsInput:rd,TypeSelect:zc,fcDraggable:ql,DragForm:Xl.$form(),ViewForm:Kl.$form(),EventConfig:Ls},props:{menu:Array,height:[String,Number],config:{type:Object,default:()=>({})},mask:{type:Boolean,default:void 0},locale:Object,handle:Array},emits:["active","create","copy","delete","drag","inputData","save","clear","copyRule","pasteRule","sortUp","sortDown","changeDevice","previewSubmit","previewReset","changeField"],setup(e){var t,n,i,o,r,a;const{menu:l,height:s,mask:c,locale:m,handle:_}=k(e),y=v(),x=p({active:null});D("fcx",x),D("designer",y);const w=u(e,"config",{}),A=u(w.value,"baseRule",null),C=u(w.value,"componentRule",{}),S=u(w.value,"validateRule",null),E=u(w.value,"formRule",null),T=u(w.value,"updateDefaultRule",{}),R=d(()=>{const e=s.value;return e?ei.Number(e)?"".concat(e,"px"):e:"100%"}),O=d(()=>!1!==w.value.fieldReadonly),M=d(()=>w.value.hiddenMenu||[]),N=d(()=>w.value.hiddenItem||[]),I=d(()=>!0===w.value.hiddenDragMenu),L=d(()=>!0===w.value.hiddenDragBtn),F=d(()=>{const e=["base","props","style","event","validate"];let t=w.value.configFormOrder?[...w.value.configFormOrder]:[],n=[];return t.length?[...t,...e].forEach(t=>{-1===n.indexOf(t)&&e.indexOf(t)>-1&&n.push(t)}):n=e,n.map(e=>'"'.concat(e,'"')).join(" ")});let P=es;m.value&&(P=Ei(m).t);const B=(...e)=>P(...e),j=(e,t,...n)=>{if(t){if(ei.Function(t))return t(...n);if(t.rule){let i=t.rule(...n);return t.prepend?i=[...i,...e(...n)]:t.append&&(i=[...e(...n),...i]),i}}return e(...n)},V=b(oi(Ql)),z=p({cacheProps:{},operation:{idx:-1,list:[]},hiddenLeft:!1,hiddenRight:!1,moveRule:null,addRule:null,added:null,bus:Hi(),device:(null==(t=w.value)?void 0:t.device)||"pc",activeModule:"base",activeTab:"form",activeMenuTab:"menu",activeRule:null,activePermission:{},children:b([]),treeInfo:[],dragRuleList:{},eventShow:!1,unloadStatus:!1,previewStatus:"form",t:B,preview:{state:!1,rule:[],option:{},api:{}},inputForm:{state:!1,rule:[],option:{},api:{},data:{},key:""},dragForm:b({rule:[],api:{}}),formOptions:{},oldOptionsKeys:[],form:{rule:j(Bi,E.value,{t:B}),api:{},option:{global:{input:!1!==(null==(n=w.value)?void 0:n.updateConfigOnBlur)?{modelEmit:"blur"}:{},select:{props:{clearable:!0}}},form:{labelPosition:"top",size:"small"},submitBtn:!1},value:{form:{},submitBtn:!1}},baseForm:{isShow:!1,rule:j(ji,A.value,{t:B}),api:{},value:{},options:{global:{input:!1!==(null==(i=w.value)?void 0:i.updateConfigOnBlur)?{modelEmit:"blur"}:{}},form:{labelPosition:"top",size:"small"},submitBtn:!1,mounted:e=>{e.activeRule=z.activeRule,e.setValue(e.options.formData||{})}}},styleForm:{isShow:!1,rule:[{type:"input",title:"ID",field:"id",wrap:{labelWidth:"45px"}},{type:"input",title:"Class",field:"class",wrap:{labelWidth:"45px"}},{type:"StyleConfig",field:"style",title:"",value:{}}],api:{},value:{},options:{form:{labelPosition:"left",size:"small"},submitBtn:!1,mounted:e=>{e.activeRule=z.activeRule,e.setValue(e.options.formData||{})}}},validateForm:{isShow:!1,rule:j(Vi,S.value,{t:B}),api:{},value:[],options:{global:{input:!1!==(null==(o=w.value)?void 0:o.updateConfigOnBlur)?{modelEmit:"blur"}:{}},form:{labelPosition:"top",size:"small"},submitBtn:!1,mounted:e=>{e.activeRule=z.activeRule,e.setValue(e.options.formData||{})}}},propsForm:{isShow:!1,rule:[],api:{},value:{},options:{global:{input:!1!==(null==(r=w.value)?void 0:r.updateConfigOnBlur)?{modelEmit:"blur"}:{},inputNumber:{props:{controlsPosition:"right"}}},form:{labelPosition:"top",size:"small"},submitBtn:!1,mounted:e=>{e.activeRule=z.activeRule,e.setValue(e.options.formData||{})}}},customForm:{isShow:!1,config:null,key:"",rule:[],api:{},options:{global:{input:!1!==(null==(a=w.value)?void 0:a.updateConfigOnBlur)?{modelEmit:"blur"}:{}},form:{labelPosition:"top",size:"small"},submitBtn:!1}}});h(()=>z.preview.state,function(e){e||f(()=>{z.previewStatus="form",z.preview.rule=z.preview.option=null})});let H=null;const U=(e,t)=>{if(">"!==e[10]){if(!(e=e.replace("formCreate","")))return;e=ui(e)}else e=e.replace("formCreate>","");const n=e.split(">"),i=n.pop();let o=z.activeRule;n.forEach((e,t)=>{t||(e=ui(e)),o[e]||(o[e]={}),o=o[e]}),t({source:o,field:i})};h(()=>m.value,e=>{P=e?Ei(m).t:es,Y.clearActiveRule();const t=z.form.api.formData&&z.form.api.formData(),n=z.baseForm.api.formData&&z.baseForm.api.formData(),i=z.validateForm.api.formData&&z.validateForm.api.formData();z.validateForm.rule=j(Vi,S.value,{t:B}),z.baseForm.rule=j(ji,A.value,{t:B}),z.form.rule=j(Bi,E.value,{t:B}),z.cacheProps={};const o=z.activeRule;let r=null;o&&(r=z.propsForm.api.formData&&z.propsForm.api.formData(),z.propsForm.rule=z.cacheProps[o._fc_id]=Y.getPropsRule(o)),f(()=>{t&&z.form.api.setValue(t),n&&z.baseForm.api.setValue(n),i&&z.validateForm.api.setValue(i),r&&z.propsForm.api.setValue(r)})});const W=d(()=>Array.isArray(l.value)?l.value:V.value),Y={setDevice(e){z.device=e,y.emit("changeDevice",e)},unWatchActiveRule(){H&&H(),H=null},watchActiveRule(){Y.unWatchActiveRule(),H=h(()=>z.activeRule,function(e,t){e&&(Y.updateRuleFormData(),e===t&&Y.addOperationRecordThrottle(Y.getJson()))},{deep:!0,flush:"post"})},makeChildren:e=>p({children:e}).children,addMenu(e){if(!e.name)return;e.list||(e.list=[]);let t=!0;W.value.forEach((n,i)=>{n.name===e.name&&(W.value[i]=e,t=!1)}),t&&(e.before?W.value.unshift(e):W.value.push(e))},removeMenu(e){[...W.value].forEach((t,n)=>{t.name===e&&W.value.splice(n,1)})},setMenuItem(e,t){W.value.forEach(n=>{n.name===e&&(n.list=t)})},appendMenuItem(e,t){W.value.forEach(n=>{n.name===e&&(n.list||(n.list=[]),n.list.push(...Array.isArray(t)?t:[t]))})},removeMenuItem(e){W.value.forEach(t=>{let n;ei.String(e)?[...t.list].forEach((n,i)=>{n.name===e&&t.list.splice(i,1)}):(n=t.list.indexOf(e))>-1&&t.list.splice(n,1)})},addComponent(e){Array.isArray(e)?e.forEach(e=>{z.dragRuleList[e.name]=e,e.menu&&Y.appendMenuItem(e.menu,e)}):(z.dragRuleList[e.name]=e,e.menu&&Y.appendMenuItem(e.menu,e))},openInputData(e){z.inputForm.state=void 0===e?!z.inputForm.state:!!e,z.inputForm.state&&(z.inputForm.rule=Xl.parseJson(Y.getJson()),z.inputForm.option=Xl.parseJson(Y.getOptionsJson()),z.inputForm.option.formData=oi(z.inputForm.data),z.inputForm.option.appendValue=!1,z.inputForm.option.submitBtn.show=!1,z.inputForm.option.resetBtn.show=!1,Y.clearActiveRule())},inputSave(){const e=z.inputForm.api.formData();Object.keys(e).forEach(t=>{Ii(e[t])&&delete e[t]});const t=JSON.stringify(z.inputForm.data)!==JSON.stringify(e);z.inputForm.data=e,z.inputForm.state=!1,y.emit("inputData",e),t&&Y.addOperationRecord()},inputClear(){Y.inputReset({})},inputReset(e){z.inputForm.rule=Xl.parseJson(Y.getJson()),z.inputForm.option.formData=e||oi(z.inputForm.data),z.inputForm.key=Wi()},setFormData(e){z.inputForm.data=e||{}},getFormData:()=>z.inputForm.data,getParent(e){let t=e.__fc__.parent.rule;const n=t._menu;return n&&n.inside&&(e=t,t=t.__fc__.parent.rule),{root:t,parent:e}},copyName(){Li(z.activeRule.name)},updateName(){z.activeRule.name="ref_"+Wi()},makeDrag:(e,t,n,i,o)=>({type:"DragBox",wrap:{show:!1},col:{show:!1},inject:!0,props:{rule:{props:{tag:"el-col",group:{name:!0===e?"default":e,put:(...e)=>Y.dragPut(...e)},swapThreshold:"draggable"===t?.25:.8,ghostClass:"ghost",animation:150,handle:"._fd-drag-btn",emptyInsertThreshold:0,direction:"auto",itemKey:"_fc_id"}},tag:t},children:n,slot:o,on:i}),clearDragRule(){Y.setRule([]),Y.addOperationRecord(),z.unloadStatus=!1,y.emit("clear")},makeDragRule:e=>Y.makeChildren([Y.makeDrag(!0,"draggable",e,{add:(t,n)=>Y.dragAdd(e,n),end:(t,n)=>Y.dragEnd(e,n),start:(t,n)=>Y.dragStart(e,n),unchoose:(t,n)=>Y.dragUnchoose(e,n)})]),handleSave(){y.emit("save",{rule:Y.getJson(),options:Y.getOptionsJson()})},previewSubmit(...e){y.emit("previewSubmit",...e)},previewReset(...e){y.emit("previewReset",...e)},openPreview(){z.preview.state=!0;const e=Y.getJson(),t=Y.getOptionsJson();z.preview.rule=Xl.parseJson(e),z.preview.option=Xl.parseJson(t);const n=Y.getConfig("useTemplate",!1);z.preview.component=Fc.highlight(n?function(e,t){return'<template>\n <form-create\n v-model="formData"\n v-model:api="fapi"\n :rule="rule"\n :option="option"\n @submit="onSubmit"\n ></form-create>\n</template>\n\n<script>\nimport formCreate from "@form-create/element-ui";\n\nexport default {\n components: {\n formCreate: formCreate.$form()\n },\n data () {\n const option = formCreate.parseJson(\''.concat(t.replaceAll("\\","\\\\").replaceAll("'","\\'"),"');\n return {\n formData: {},\n fapi: null,\n rule: formCreate.parseJson('").concat(e.replaceAll("\\","\\\\").replaceAll("'","\\'"),"'),\n option: option\n }\n },\n methods: {\n onSubmit (formData) {\n //todo 提交表单\n }\n }\n}\n<\/script>")}(e,t):function(e,t){return'<template>\n <form-create\n v-model="formData"\n v-model:api="fapi"\n :rule="rule"\n :option="option"\n @submit="onSubmit"\n ></form-create>\n</template>\n\n<script setup>\nimport {ref} from "vue";\nimport formCreate from "@form-create/element-ui";\n\nconst option = ref(formCreate.parseJson(\''.concat(t.replaceAll("\\","\\\\").replaceAll("'","\\'"),"'));\nconst rule = ref(formCreate.parseJson('").concat(e.replaceAll("\\","\\\\").replaceAll("'","\\'"),"'));\nconst fapi = ref(null);\nconst formData = ref({});\n\nconst onSubmit = (formData) => {\n //todo 提交表单\n}\n<\/script>")}(e,t),{language:"xml"}).value,z.preview.html=Fc.highlight(gi(e,t),{language:"xml"}).value},copyCode(){Li(this.$refs.previewCode.innerText)},getHtml:()=>gi(Y.getJson(),Y.getOptionsJson()),getRule:()=>Y.parseRule(oi(z.dragForm.rule[0].children)),getJson:()=>Xl.toJson(Y.getRule()),getOption(){const e=oi(z.formOptions);["onReset","onSubmit","beforeSubmit","onCreated","onMounted","onReload","onChange","beforeFetch"].forEach(t=>{delete e[t]}),Object.keys(e._event||{}).forEach(t=>{e._event[t]&&(e[t]=e._event[t])}),delete e._event,e.submitBtn=e._submitBtn,e.resetBtn=e._resetBtn,e.resetBtn.innerText||(e.resetBtn.innerText=B("props.reset")),e.submitBtn.innerText||(e.submitBtn.innerText=B("props.submit"));const t=oi(z.inputForm.data);return Object.keys(t).length>0&&(e.formData=t),e.language&&Object.keys(e.language).forEach(t=>{Object.keys(e.language[t]).forEach(n=>{e.language[t][n]||delete e.language[t][n]}),Object.keys(e.language[t]).length||delete e.language[t]}),Object.keys(e).forEach(t=>{ei.Object(e[t])&&!Object.keys(e[t]).length&&delete e[t]}),delete e._submitBtn,delete e._resetBtn,e},getOptions:()=>Y.getOption(),getOptionsJson:()=>Xl.toJson([Y.getOption()]).slice(1).slice(0,-1),setRule(e){e||(e=[]),z.children=b(Y.loadRule(ei.String(e)?Xl.parseJson(e):oi(e))),Y.clearActiveRule(),z.dragForm.rule=Y.makeDragRule(Y.makeChildren(z.children)),Y.updateTree()},setBaseRuleConfig(e,t){A.value={rule:e,append:t},z.baseForm.rule=j(ji,A.value,{t:B})},setComponentRuleConfig(e,t,n){C.value[e]={rule:t,append:n},z.cacheProps={};const i=z.activeRule;if(i){const e=z.propsForm.api.formData&&z.propsForm.api.formData();z.propsForm.rule=z.cacheProps[i._fc_id]=j(i._menu.props,C.value&&C.value[i._menu.name],i,{t:B,api:z.dragForm.api}),f(()=>{e&&z.propsForm.api.setValue(e)})}},setValidateRuleConfig(e,t){S.value={rule:e,append:t},z.validateForm.rule=j(ji,S.value,{t:B})},setFormRuleConfig(e,t){E.value={rule:e,append:t},z.form.rule=j(ji,E.value,{t:B})},clearActiveRule(){z.activeRule=null,z.activePermission={},z.customForm.config=null,z.activeTab="form",x.active=""},setOption(e){const t=oi(Y.getConfig("formOptions",{})),n=t.form||{};delete t.form;let i={...t,...ei.String(e)?JSON.parse(e):oi(e||{})};i.form={inline:!1,hideRequiredAsterisk:!1,labelPosition:"right",size:"default",labelWidth:"125px",...n,...i.form||{}},i._event={onReset:i.onReset||"",onSubmit:i.onSubmit||"",onCreated:i.onCreated||"",onMounted:i.onMounted||"",beforeSubmit:i.beforeSubmit||"",onReload:i.onReload||"",onChange:i.onChange||"",beforeFetch:i.beforeFetch||""},ti(i,"language")||(i.language={}),i._resetBtn="object"==typeof i.resetBtn?i.resetBtn:{show:!0===i.resetBtn},i._submitBtn="object"==typeof i.submitBtn?i.submitBtn:{show:!1!==i.submitBtn},i.submitBtn=i.resetBtn=!1,z.inputForm.data=i.formData||{},z.oldOptionsKeys=Object.keys(z.form.value),delete i.formData,z.formOptions=i,Y.updateOptionsValue()},setOptions(e){Y.setOption(e)},mergeOptions(e){if(["form"].forEach(t=>{e[t]&&(z.formOptions[t]={...z.formOptions[t]||{},...e[t]})}),e.style&&(!z.formOptions.style||-1===z.formOptions.style.indexOf(e.style))&&(z.formOptions.style=(z.formOptions.style||"")+"\n"+e.style),z.formOptions.language||(z.formOptions.language={}),e.language&&Object.keys(e.language).forEach(t=>{z.formOptions.language[t]={...z.formOptions.language[t]||{},...e.language[t]}}),e.languageKey){const t=Y.getConfig("localeOptions",[{value:"zh-cn",label:"简体中文"},{value:"en",label:"English"}]);e.languageKey.forEach(e=>{t.forEach(({value:t})=>{z.formOptions.language[t]||(z.formOptions.language[t]={}),z.formOptions.language[t][e]||(z.formOptions.language[t][e]="")})})}},updateOptionsValue(){const e={};z.oldOptionsKeys.forEach(t=>{e[t]=void 0});const t={...e,...z.formOptions.form};Object.keys(z.formOptions).forEach(e=>{const n=z.formOptions[e];t[">"+e]=n,t["formCreate"+xi(e)]=n,"object"==typeof n&&Object.keys(n).forEach(i=>{t[e+">"+i]=n[i]})}),z.form.value=t},loadRule(e,t,n){const i=[];return e.forEach(e=>{if(ei.String(e))return i.push(e);let o=z.dragRuleList[e._fc_drag_tag]||z.dragRuleList[e.type];if(o||(o=function(e){return{icon:e.field?"icon-input":"icon-cell",label:e.field||e.type,name:"_",mask:!0,handleBtn:["delete"],rule:()=>e,props:()=>[]}}(e),e._fc_drag_tag="_"),n&&(e._fc_template=n),o&&o.loadRule&&o.loadRule(e),e.children=Y.loadRule(e.children||[],o,n),["control","computed","on","hidden","display","hook"].forEach(t=>{null!=e[t]&&(e["_"+t]=e[t],delete e[t])}),o){const n=e.slot;let i;t&&t.slot&&n&&"default"!==n&&(i=Y.getSlotConfig(t,n,o)),delete e.slot,e=Y.makeRule(i||o,e),n&&(e.slot=n)}i.push(e)}),i},parseRule:(e,t)=>[...e].reduce((e,n)=>{let i=t;if(ei.String(n))return e.push(n),e;if("DragBox"===n.type)return e.push(...Y.parseRule(n.children,i||n.slot)),e;if("DragTool"===n.type){if(i=n.slot||t,n=n.children[0],ei.String(n))return e.push(n),e;if("DragBox"===n.type)return e.push(...Y.parseRule(n.children,i||n.slot)),e}return n&&(n={...n},i&&"default"!==i&&(n.slot=i),n.children&&n.children.length&&(n.children=Y.parseRule(n.children)),delete n.key,delete n.component,n._menu&&(n._menu.parseRule&&n._menu.parseRule(n),delete n._menu),"_"===n._fc_drag_tag&&delete n._fc_drag_tag,["control","computed","on","hidden","display","hook"].forEach(e=>{null!=n["_"+e]&&""!==n["_"+e]&&(n[e]=n["_"+e]),delete n["_"+e]}),n.slot||delete n.slot,n.props&&Object.keys(n.props).forEach(e=>{Ii(n.props[e])&&delete n.props[e]}),Object.keys(n).filter(e=>0===e.indexOf("__")||Array.isArray(n[e])&&0===n[e].length||ei.Object(n[e])&&0===Object.keys(n[e]).length).forEach(e=>{delete n[e]}),e.push(n)),e},[]),fields:()=>z.dragForm.api.all().map(e=>e.field).filter(e=>!!e),formMounted(){z.form.api.hidden(!0,w.value.hiddenFormConfig||[]),z.form.api.disabled(!0,w.value.disabledFormConfig||[])},baseChange(e,t,n,i){Y.handleChange("",e,t,n,i)},formOptChange(e,t){z.form.value[e]=t,0===e.indexOf("formCreate")&&(e=">"+ui(e.replace("formCreate",""))),-1===e.indexOf(">")&&(e="form>"+e);let n=z.formOptions;const i=e.split(">"),o=i.pop();i.forEach(e=>{e&&(n[e]||(n[e]={}),n=n[e])}),n[o]=t},propRemoveField(e,t,n){var i,o,r;if(z.activeRule&&n[z.activeRule._fc_id]===z.activeRule){Y.unWatchActiveRule();const t=e;z.dragForm.api.sync(z.activeRule),0!==e.indexOf("__")&&("formCreateChild"===e?delete z.activeRule.children[0]:0===e.indexOf("formCreate")||e.indexOf(">")>0?(e.indexOf("formCreate")<0&&(e="props>"+e),U(e,({source:e,field:t})=>{delete e[t]})):delete z.activeRule.props[e]),Y.watchActiveRule(),null==(r=null==(o=null==(i=z.activeRule._menu)?void 0:i.watch)?void 0:o[t])||r.call(o,{field:t,value:void 0,api:n,rule:z.activeRule,ctx:y})}},propChange(e,t,n,i){Y.handleChange("props",e,t,n,i)},styleChange(e,t,n,i){if(z.customForm.config)return z.customForm.config.style.change(e,t);Y.handleChange("",e,t,n,i)},handleChange(e,t,n,i,o){var r,a,l;if(z.activeRule&&o[z.activeRule._fc_id]===z.activeRule){Y.unWatchActiveRule();const i=t;0!==t.indexOf("__")&&("formCreateChild"===t?z.activeRule.children[0]=n:0===t.indexOf("formCreate")||t.indexOf(">")>0?(t.indexOf("formCreate")<0&&(t=(e?e+">":"")+t),U(t,({source:e,field:t})=>{Ii(n)?delete e[t]:e[t]=n})):e&&Ii(n)?delete z.activeRule[e][t]:(e?z.activeRule[e]:z.activeRule)[t]=n),Y.watchActiveRule(),null==(l=null==(a=null==(r=z.activeRule._menu)?void 0:r.watch)?void 0:a[i])||l.call(a,{field:i,value:n,api:o,rule:z.activeRule,ctx:y}),Y.addOperationRecordThrottle(Y.getJson())}},validateChange(e,t,n,i){!z.activeRule||z.validateForm.api[z.activeRule._fc_id]!==z.activeRule||(Y.handleChange("",e,t,n,i),z.dragForm.api.refreshValidate(),z.dragForm.api.nextTick(()=>{z.dragForm.api.clearValidateState(z.activeRule.__fc__.id)}))},triggerActive(e){let t;if(ei.String(e)&&(e=Y.findRule(e)),e&&(t=e._menu.inside?e.children[0]:e.__fc__.parent.rule,t&&"DragTool"===t.type)){const n=z.dragForm.api.el(t.__fc__.id);n&&(x.active=n.id,y.emit("active",e),Y.toolActive(e))}},customFormChange(e,t){z.customForm.config&&z.customForm.config.change(e,t)},customActive(e){z.baseForm.isShow=!1,z.propsForm.isShow=!1,z.eventShow=!1,z.validateForm.isShow=!1,z.styleForm.isShow=!!e.style&&!1!==Y.getConfig("showStyleForm"),z.activeRule=null,z.activePermission={},x.active="",z.customForm.config=e,z.customForm.isShow=!0,z.customForm.propsShow=e.props&&!1!==Y.getConfig("showPropsForm"),z.customForm.key=Wi(),z.customForm.rule=z.customForm.propsShow?e.props({t:B}):[],z.customForm.options.formData=e.formData,e.style&&(z.styleForm.value=e.style.formData||{}),f(()=>{z.activeTab="props"})},getPropsRule(e){let t=j(e._menu.props,C.value&&C.value[e._menu.name],e,{t:B,api:z.dragForm.api});if(C.value&&C.value.default){const n=C.value.default;t=j(()=>t,ei.Function(n)?{rule:n,append:!0}:n,e,{t:B,api:z.dragForm.api})}return t},findRule(e){let t;const n=i=>{i.forEach(i=>{[i.rule.field,i.rule.name,i.rule._fc_id].indexOf(e)>-1?t=i.rule:i.children&&n(i.children)})};return n(z.treeInfo),t},toolActive(e){if(w.value.beforeActiveRule&&!1===w.value.beforeActiveRule({rule:e}))return;Y.unWatchActiveRule(),z.customForm.isShow=!1,z.customForm.config=null,z.activeRule&&(delete z.propsForm.api[z.activeRule._fc_id],delete z.baseForm.api[z.activeRule._fc_id],delete z.validateForm.api[z.activeRule._fc_id],delete z.styleForm.api[z.activeRule._fc_id],delete z.dragForm.api.activeRule);const t=Y.getPermission(e);z.activeRule=e,z.activePermission=t,z.dragForm.api.activeRule=e,f(()=>{z.activeTab="props",f(()=>{z.propsForm.api[z.activeRule._fc_id]=z.activeRule,z.baseForm.api[z.activeRule._fc_id]=z.activeRule,z.validateForm.api[z.activeRule._fc_id]=z.activeRule,z.styleForm.api[z.activeRule._fc_id]=z.activeRule})}),z.cacheProps[e._fc_id]||(z.cacheProps[e._fc_id]=Y.getPropsRule(e));const n=Y.getConfig("hiddenItemConfig",{}),i=Y.getConfig("disabledItemConfig",{}),o=Fi([...t.hiddenConfig||[],...(null==n?void 0:n.default)||[],...(null==n?void 0:n[e._menu.name])||[]]),r=[...o,...e._menu.hiddenBaseField||[]],a=Fi([...t.disabledConfig||[],...(null==i?void 0:i.default)||[],...(null==i?void 0:i[e._menu.name])||[]]);z.baseForm.api.disabled(!1),z.baseForm.api.hidden(!1),f(()=>{z.baseForm.api.all().forEach(e=>{(e.name||e.field)&&(e.hidden=-1!==r.indexOf(e.name)||-1!==r.indexOf(e.field))}),z.propsForm.api.hidden(!0,o),Y.getConfig("showControl",!0)||z.baseForm.api.hidden(!0,"_control")}),a.length&&(z.baseForm.api.disabled(!0,a),f(()=>{z.propsForm.api.disabled(!0,a)}));const l=ti(e,"field");z.baseForm.isShow=!1!==t.base&&l&&!1!==e.input&&!1!==Y.getConfig("showBaseForm"),z.propsForm.isShow=!1!==t.props&&z.cacheProps[e._fc_id].length>0&&!1!==Y.getConfig("showPropsForm"),z.styleForm.isShow=!1!==t.style&&!1!==e._menu.style&&!1!==Y.getConfig("showStyleForm"),z.eventShow=!1!==t.event&&!1!==e._menu.event&&!1!==Y.getConfig("showEventForm");const s=Y.getConfig("showValidateForm");z.validateForm.isShow=!1!==t.validate&&(z.baseForm.isShow&&!1!==s||!0===s)&&!1!==e._menu.validate,z.propsForm.rule=z.cacheProps[e._fc_id],z.validateForm.isShow&&f(()=>{z.validateForm.api.hidden(!0===Y.getConfig("validateOnlyRequired")||"required"===e._menu.validate,["validate"])}),Y.updateRuleFormData(),Y.watchActiveRule()},getConfig:(e,t)=>w.value&&ti(w.value,e)?w.value[e]:t,getPermission(e){var t;let n={};return((null==(t=w.value)?void 0:t.componentPermission)||[]).forEach(t=>{let i=!1;(t.field&&(Array.isArray(t.field)?t.field.indexOf(e.field)>-1:t.field===e.field)||t.name&&(Array.isArray(t.name)?t.name.indexOf(e.name)>-1:t.name===e.name)||t.id&&(Array.isArray(t.id)?t.id.indexOf(e._fc_id)>-1:t.id===e._fc_id)||t.tag&&(Array.isArray(t.tag)?t.tag.indexOf(e._fc_drag_tag)>-1:t.tag===e._fc_drag_tag))&&(i=!0),i&&(n=t.permission||{})}),n},updateRuleFormData(){const e=z.activeRule;let t={formCreateChild:""+e.children[0],"formCreateWrap>labelWidth":""};const n=w.value.appendConfigData;ei.Function(n)?t={...t,...n(e)}:Array.isArray(n)&&n.forEach(e=>{t[e]=void 0}),Object.keys(e).forEach(n=>{["effect","config","payload","id","type","_menu"].indexOf(n)<0&&(t["formCreate"+xi(n)]=oi(e[n]))}),Object.keys(e.props).forEach(n=>{const i=e.props[n];t[n]=oi(i),ei.Object(i)&&Object.keys(i).forEach(e=>{t[n+">"+e]=oi(i[e])})}),["props","effect","attrs","style","wrap"].forEach(n=>{e[n]&&"object"==typeof e[n]&&Object.keys(e[n]).forEach(i=>{t["formCreate"+xi(n)+">"+i]=oi(e[n][i])})});const i=e._menu.attrs||{};Object.keys(i).forEach(n=>{t["__"+n]=i[n]({rule:e})}),z.propsForm.value=t,z.styleForm.value={style:e.style,class:e.class,id:e.id},z.baseForm.isShow&&(z.baseForm.value={field:e.field,title:e.title||"",info:e.info,_control:e._control,...t},z.validateForm.value={validate:e.validate?[...e.validate]:[],$required:t.formCreate$required},z.dragForm.api.refreshValidate(),z.dragForm.api.nextTick(()=>{z.dragForm.api.clearValidateState(e.__fc__.id)}))},dragStart(e){z.moveRule=e,z.added=!1},dragUnchoose(e,t){z.addRule={children:e,oldIndex:t.oldIndex}},clickMenu(e){this.checkDragToContainer(e)&&Y.dragMenu({menu:e,children:z.children,index:z.children.length})},checkOnly(e){let t=!1;return z.dragForm.api.all().forEach(n=>{t=t||n._fc_template===e.name||n._menu&&n._menu.name===e.name}),t&&pi(z.t("struct.only",{label:B("com."+e.name+".name")||e.label})),t},dragMenu({menu:e,children:t,index:n,slot:i}){if(z.inputForm.state||e.only&&Y.checkOnly(e))return;Y.handleAddBefore();const o=z.dragRuleList[e.name];y.emit("drag",{item:e,dragRule:o});const r=Y.makeRule(z.dragRuleList[o.name]);i&&(r.slot=i),t.splice(n,0,r);const a="DragTool"===r.type?r.children[0]:r;Y.handleAddAfter({rule:r}),a&&Y.getConfig("autoActive",!0)&&f(()=>{Y.triggerActive(a)})},replaceField(e){const t=["array","object"].indexOf(e._menu.subForm)>-1;let n=Y.parseRule(oi([e]))[0];const i=!1!==Y.getConfig("autoResetName");return t&&(n.field=Wi(),i&&(n.name="ref_"+Wi())),n=Xl.toJson(n),t?n=Y.batchReplaceUni(n):(n=Y.batchReplaceField(n),i&&(n=Y.batchReplaceName(n))),Y.loadRule([Xl.parseJson(n)])[0]},batchReplaceField:e=>(e=e.replace(/"field"\s*:\s*"(\w[\w\d]+)"/g,(e,t)=>'"field":"'.concat(Wi(),'"')),Y.batchReplaceUni(e)),batchReplaceUni:e=>e=e.replace(/"_fc_id"\s*:\s*"(\w[\w\d]+)"/g,()=>'"_fc_id":"id_'.concat(Wi(),'"')),batchReplaceName:e=>e=e.replace(/"name"\s*:\s*"ref_(\w[\w\d]+)"/g,()=>'"name":"ref_'.concat(Wi(),'"')),getTrueRule(e){if(e){if(e._menu)return e._menu._get();if(e._config)return e._config._get()}},checkDragToContainer:e=>!e.allowDragTo||(Array.isArray(e.allowDragTo)?e.allowDragTo.indexOf("draggable")>-1:"draggable"===e.allowDragTo),dragPut(e,t,n){const i=Y.getTrueRule(e.el.__rule__),o=n._underlying_vm_.__fc__?n._underlying_vm_._config||n._underlying_vm_._menu:n._underlying_vm_;if(!i)return!o||this.checkDragToContainer(o);const r=i._menu,a=n._fc_allow_drag||{};if(void 0===a[i._fc_id]){const e=Y.getTrueRule(n._underlying_vm_);a[i._fc_id]=!(o&&r&&!Y.checkDrag({menu:o,toMenu:r,rule:e,toRule:i})),n._fc_allow_drag=a}return n._fc_allow_drag[i._fc_id]},checkDrag({menu:e,toMenu:t,rule:n,toRule:i}){var o,r;return!(!Y.checkAllowDrag(e,t)||i.children&&t.maxChildren&&t.maxChildren<=(null==(r=null==(o=i.children[0])?void 0:o.children)?void 0:r.length)||e.checkDrag&&!1===e.checkDrag({menu:e,toMenu:t,rule:n,toRule:i,designer:y})||t.checkDrag&&!1===t.checkDrag({menu:e,toMenu:t,rule:n,toRule:i,designer:y})||w.value.checkDrag&&!1===w.value.checkDrag({menu:e,toMenu:t,rule:n,toRule:i}))},checkAllowDrag(e,t){function n(t){return Array.isArray(t)&&(t={item:t}),zi(t.item).indexOf(e.name)>-1||zi(t.menu).indexOf(e.menu)>-1}const i=Y.getConfig("allowDrag",{})[t.name],o=Y.getConfig("denyDrag",{})[t.name];return(!e.allowDragTo||(Array.isArray(e.allowDragTo)?-1!==e.allowDragTo.indexOf(t.name):e.allowDragTo===t.name))&&(!!(t.allowDrag&&n(t.allowDrag)||i&&n(i))||!(t.allowDrag||i||t.denyDrag&&n(t.denyDrag))&&!(o&&n(o)))},dragAdd(e,t,n){delete t.item._fc_allow_drag;const i=t.newIndex,o=t.item._underlying_vm_||t.item.__rule__;if(z.added=!0,o&&o.__fc__){if(z.addRule){Y.handleSortBefore();const t=z.addRule.children.splice(z.addRule.children.indexOf(o),1)[0];n?t.slot=n:delete t.slot,e.splice(i,0,t),Y.handleSortAfter({rule:t})}}else Y.dragMenu({menu:o,children:e,index:i,slot:n})},dragEnd(e,{item:t,newIndex:n,oldIndex:i},o){if(delete t._fc_allow_drag,!z.added&&(z.moveRule!==e||n!==i)){Y.handleSortBefore();const t=z.moveRule.splice(i,1);o&&(t.slot=o),e.splice(n,0,t[0]),Y.handleSortAfter({rule:t[0]})}z.moveRule=null,z.addRule=null,z.added=!1},getSlotConfig(e,t,n){let i={};return(e.slot||[]).forEach(e=>{e.name===t&&(i=e.config||{})}),{...n,dragBtn:!1,handleBtn:!!n.children&&["addChild"],...i}},makeRule(e,t){let n=t||e.rule({t:B});const i=T.value&&T.value[e.name];if(!t&&i)if("function"==typeof i)try{i(n)}catch(s){}else{let e=oi(i);delete e.children,delete e.component,n=Fp([n,e])}n._menu=g({...e}),n._menu._get=()=>n,n._fc_id||(n._fc_id="id_"+Wi()),n.name||(n.name="ref_"+Wi()),e.component&&(n.component=g(e.component)),n._computed||(n._computed={}),n.effect||(n.effect={}),e.input&&!n.field&&(n.field=Wi()),e.languageKey&&Y.mergeOptions({languageKey:e.languageKey}),ti(n,"display")||(n.display=!0),ti(n,"hidden")||(n.hidden=!1),n.children||(n.children=[]),n._fc_drag_tag=e.name;let o,r=!0===e.only;const a=n.children||[];if(e.drag&&(n.children=[o=Y.makeDrag(e.drag,n._menu?n._menu.name:n.type,a,{end:(e,t)=>Y.dragEnd(e.self.children,t),add:(e,t)=>Y.dragAdd(e.self.children,t),start:(e,t)=>Y.dragStart(e.self.children,t),unchoose:(e,t)=>Y.dragUnchoose(e.self.children,t)})],o._config=n._menu),e.children&&!t&&!a.length)for(let c=0;c<(e.childrenLen||1);c++){const t=Y.makeRule(z.dragRuleList[e.children]);(o||n).children.push(t)}const l=void 0!==c.value?!1!==c.value:!1!==e.mask;return!1===e.tool?n:e.inside?(n.children=Y.makeChildren([{type:"DragTool",props:{dragBtn:!1!==e.dragBtn,children:e.children,mask:l,hidden:!0===n._hidden||!1===n._display,handleBtn:e.handleBtn,only:r},inject:!0,on:{delete:({self:e})=>{const t=Y.getParent(e).parent;!1!==Y.handleRemoveBefore({parent:t,rule:t})&&(t.__fc__.rm(),y.emit("delete",t),z.activeRule===t&&Y.clearActiveRule(),Y.handleRemoveAfter({rule:t}))},create:({self:e})=>{Y.handleAddBefore();const t=Y.getParent(e);y.emit("create",t.parent);const n=Y.makeRule(t.parent._menu);t.parent.slot&&(n.slot=t.parent.slot),t.root.children.splice(t.root.children.indexOf(t.parent)+1,0,n),Y.handleAddAfter({rule:t.parent})},addChild:({self:e})=>{Y.handleAddBefore();const t=Y.getParent(e),n=t.parent._menu,i=z.dragRuleList[n.children];if(!i)return;const o=Y.makeRule(i);(n.drag?t.parent.children[0]:t.parent).children[0].children.push(o),Y.handleAddAfter({rule:o})},copy:({self:e})=>{Y.handleCopyBefore();const t=Y.getParent(e);y.emit("copy",t.parent);const n=Y.replaceField(t.parent);t.root.children.splice(t.root.children.indexOf(t.parent)+1,0,n),Y.handleCopyAfter({rule:t.parent})},active:({self:e})=>{const t=Y.getParent(e);y.emit("active",t.parent),setTimeout(()=>{Y.toolActive(t.parent)},10)}},_config:n._menu,children:n.children}]),n):{type:"DragTool",props:{dragBtn:!1!==e.dragBtn,children:e.children,mask:l,hidden:!0===n._hidden||!1===n._display,handleBtn:e.handleBtn,only:r},inject:!0,display:!!n.display,on:{delete:({self:e})=>{!1!==Y.handleRemoveBefore({parent:e,rule:e.children[0]})&&(y.emit("delete",e.children[0]),e.__fc__.rm(),z.activeRule===e.children[0]&&Y.clearActiveRule(),Y.handleRemoveAfter({rule:e.children[0]}))},create:({self:e})=>{Y.handleAddBefore(),y.emit("create",e.children[0]);const t=Y.getParent(e),n=Y.makeRule(e.children[0]._menu);t.parent.slot&&(n.slot=t.parent.slot),t.root.children.splice(t.root.children.indexOf(t.parent)+1,0,n),Y.handleAddAfter({rule:n})},addChild:({self:e})=>{Y.handleAddBefore();const t=e.children[0]._menu,n=z.dragRuleList[t.children];if(!n)return;const i=Y.makeRule(n);(t.drag?e.children[0]:e).children[0].children.push(i),Y.handleAddAfter({rule:i})},copy:({self:e})=>{Y.handleCopyBefore(),y.emit("copy",e.children[0]);const t=Y.getParent(e),n=Y.replaceField(e.children[0]);e.slot&&(n.slot=e.slot),t.root.children.splice(t.root.children.indexOf(t.parent)+1,0,n),Y.handleCopyAfter({rule:e.children[0]})},active:({self:e})=>{y.emit("active",e.children[0]),setTimeout(()=>{Y.toolActive(e.children[0])},10)}},_config:n._menu,children:Y.makeChildren([n])}},toolHidden(e){const t=!(void 0!==e._hidden&&e._hidden);e._menu.inside?e.children[0].props.hidden=t:e.__fc__.parent.rule.props.hidden=t,e._hidden=t,t||(e._display=!0)},toolHandle(e,t){if(!e._fc_drag_tag||!1===e._menu.tool)return void e.__fc__.rm();let n;n=e._menu.inside?e.children[0].__fc__.exportEl:e.__fc__.parent.exportEl,n.$emit(t)},handleAddBefore(){},handleRemoveBefore({rule:e}){if(w.value.beforeRemoveRule&&!1===w.value.beforeRemoveRule({rule:e}))return!1},handleCopyBefore(){},handleSortBefore(){},addOperationRecord(e){const t=e||Y.getJson(),n=oi(z.inputForm.data),i=z.operation.list.slice(0,z.operation.idx+1);i.push({rule:t,formData:n});i.length>20?(i.splice(0,i.length-20),z.operation.idx=19):z.operation.idx=i.length-1,z.operation.list=i,z.unloadStatus=1!==i.length},addOperationRecordThrottle:Pi(e=>{Y.addOperationRecord(e)},3e3),prevOperationRecord(){if(!z.operation.list[z.operation.idx-1])return;const e=z.operation.list[--z.operation.idx];Y.useOperationRecord(e),Y.clearActiveRule()},nextOperationRecord(){if(!z.operation.list[z.operation.idx+1])return;const e=z.operation.list[++z.operation.idx];Y.useOperationRecord(e),Y.clearActiveRule()},useOperationRecord(e){z.inputForm.data=e.formData,Y.setRule(e.rule)},handleAddAfter(){Y.addOperationRecord(),Y.updateTree()},handleRemoveAfter(){Y.addOperationRecord(),Y.updateTree()},handleCopyAfter(){Y.addOperationRecord(),Y.updateTree()},handleSortAfter(){Y.addOperationRecord(),Y.updateTree()},treeChange(e){Y.triggerActive(e.rule)},getFormDescription:()=>Mi(Y.getDescription()),getDescription:()=>Di(z.dragForm.rule[0].children),getSubFormDescription(e){let t=e.__fc__&&e.__fc__.parent;for(;t;){if(t.rule._menu&&["array","object"].indexOf(t.rule._menu.subForm)>-1)return Mi(Di(t.rule.children));t=t.parent}return null},getSubFormChildren(e){let t=e.__fc__&&e.__fc__.parent;for(;t;){if(t.rule._menu&&["array","object"].indexOf(t.rule._menu.subForm)>-1)return t.rule.children||[];t=t.parent}return null},updateTree:Fs(function(){f(()=>{z.treeInfo=Oi(z.dragForm.rule[0].children)})},300),findTree(e){let t;const n=i=>{i.forEach(i=>{i.rule.field===e?t=i.children:i.children&&n(i.children)})};return n(z.treeInfo),t||[]},handleDragenter(e){z.bus.$emit("dragenter",e)},handleDragleave(e){z.bus.$emit("dragleave",e)},handleDrop(e){z.bus.$emit("drop",e)},changeEvent(e){z.activeRule._on=e},triggerHandle(e){e.handle()},bindHotkey(e){const t=e.ctrlKey||e.metaKey;if(!getSelection().toString()&&t&&"BODY"===e.target.tagName&&["ArrowUp","ArrowDown","Backspace","c","x","z","p","1","2","3","4"].indexOf(e.key)>-1){if(e.preventDefault(),z.inputForm.state)return;G[e.key]?G[e.key](e):"1234".indexOf(e.key)>-1&&G.num(e)}},bindPaste(e){if(z.inputForm.state)return;let t=e.clipboardData.getData("text/plain");if(t&&0===t.indexOf("FormCreate:")){let n=z.children;t=t.slice(11,t.length),!1!==Y.getConfig("autoResetField")&&(t=Y.batchReplaceField(t)),!1!==Y.getConfig("autoResetName")&&(t=Y.batchReplaceName(t));const i=Y.loadRule([Xl.parseJson(t)])[0];let o=!0;if(z.activeRule&&z.activeRule._menu.drag){const e=Y.getTrueRule(i);if(e&&!Y.checkDrag({rule:e,menu:e._menu,toRule:z.activeRule,toMenu:z.activeRule._menu}))return;n=z.activeRule._menu.inside?z.activeRule.children[0].children[0].children:z.activeRule.children[0].children}else z.customForm.config&&z.customForm.config.onPaste&&(z.customForm.config.onPaste(i),o=!1);o&&n.push(i),Y.updateTree(),Y.addOperationRecord(),y.emit("pasteRule",{event:e,copyRule:i})}}};Y.addDragRule=Y.addComponent;const G={z(e){e.shiftKey?Y.nextOperationRecord():Y.prevOperationRecord()},Backspace(){!z.activeRule||Y.toolHandle(z.activeRule,"delete")},c(e){const t=z.activeRule;!t||(Li("FormCreate:"+Xl.toJson(Y.parseRule([t])[0])),y.emit("copyRule",{event:e,rule:t}))},x(e){!z.activeRule||(G.c(e),Y.toolHandle(z.activeRule,"delete"))},p(){Y.openPreview()},num(e){e.key,"1"===e.key?(z.activeModule="base",z.activeMenuTab="menu"):"2"===e.key?(z.activeModule="base",z.activeMenuTab="tree"):"3"===e.key?z.activeModule="json":"4"===e.key&&(z.activeModule="language")},ArrowUp(e){let t=z.activeRule;if(!t)return;t._menu.inside||(t=t.__fc__.parent.rule);const n=t.__fc__.parent.rule,i=n.children.indexOf(t);if(n.children.length>1&&i>=0){const o="ArrowUp"===e.key?-1:"ArrowDown"===e.key?1:0;o&&i+o>=0&&i+o<n.children.length&&(n.children.splice(i,1),n.children.splice(i+o,0,t),Y.updateTree(),Y.addOperationRecord(),y.emit("sort"+("ArrowUp"===e.key?"Up":"Down"),{event:e,rule:t}))}},ArrowDown(e){G.ArrowUp(e)}};z.dragForm.rule=Y.makeDragRule(Y.makeChildren(z.children)),Y.setOption({}),l.value?yr.forEach(e=>{z.dragRuleList[e.name]=e}):Y.addComponent(yr);const $=d(()=>Object.keys(z.inputForm.data).length>0);return{...k(z),...Y,dragHeight:R,t:B,handle:_,inputCheckStatus:$,fieldReadonly:O,hiddenMenu:M,hiddenItem:N,hiddenDragMenu:I,hiddenDragBtn:L,menuList:W,configFormOrderStyle:F}},created(){document.body.ondrop=e=>{e.preventDefault(),e.stopPropagation()},window.onbeforeunload=e=>{var t;this.unloadStatus&&!1!==(null==(t=this.config)?void 0:t.exitConfirm)&&(e.returnValue=this.t("designer.unload"))}},mounted(){var e;!1!==(null==(e=this.config)?void 0:e.hotKey)&&(document.addEventListener("keydown",this.bindHotkey),document.addEventListener("paste",this.bindPaste))},unmounted(){document.removeEventListener("keydown",this.bindHotkey),document.removeEventListener("paste",this.bindPaste)}}),Yp=["onClick"],Gp=["onClick"],$p={class:"_fc-l-icon"},qp={class:"_fc-l-name"},Qp={class:"_fc-tree-label"},Kp={class:"_fc-m-tools-l"},Xp={class:"devices"},Jp={class:"_fc-m-tools-r"},Zp={class:"_fd-input-btn"},eh={key:0,class:"_fc-m-input"},th={key:0,class:"_fc-m-input-handle"},nh={class:"_fc-r-title"},ih={class:"_fc-r-title"},oh={style:{"grid-area":"base"}},rh={style:{"grid-area":"props"}},ah={style:{"grid-area":"style"}},lh={style:{"grid-area":"event"}},sh={key:0,style:{"grid-area":"validate"}},ch={key:2,class:"_fd-preview-code",ref:"previewCode"},uh=["innerHTML"],dh={key:3,class:"_fd-preview-code",ref:"previewCode"},fh=["innerHTML"];const ph=ls(Wp,[["render",function(e,c,u,d,f,p){const h=t("el-tooltip"),m=t("el-aside"),g=t("FcAiPanel"),v=t("LanguageConfig"),b=t("JsonPreview"),x=t("el-header"),w=t("fcDraggable"),A=t("el-main"),k=t("el-dropdown-item"),C=t("el-dropdown-menu"),S=t("el-dropdown"),E=t("el-tree"),T=t("el-container"),R=t("el-button"),O=t("el-popconfirm"),D=t("el-switch"),N=t("ViewForm"),I=t("DragForm"),L=t("Warning"),G=t("TypeSelect"),$=t("el-input"),q=t("ConfigItem"),Q=t("el-divider"),K=t("PropsInput"),X=t("EventConfig"),J=t("el-tab-pane"),Z=t("el-tabs"),ee=t("el-dialog");return i(),n(T,{class:"_fc-designer",style:H(e.height?"height:".concat(e.dragHeight,";flex:0;"):""),onDragenter:e.handleDragenter,onDragleave:e.handleDragleave,onDrop:e.handleDrop},{default:o(()=>[_(A,null,{default:o(()=>[(i(),n(T,{style:{height:"100%"},key:e.locale&&e.locale.name},{default:o(()=>[!1!==e.getConfig("showMenuBar")?y((i(),n(m,{key:0,class:"_fc-l-menu",width:"40px"},{default:o(()=>[_(h,{effect:"dark",content:e.t("designer.comList"),placement:"right","hide-after":0},{default:o(()=>[M("div",{class:P(["_fc-l-menu-item",{active:"base"===e.activeModule}]),onClick:c[0]||(c[0]=t=>e.activeModule="base")},c[38]||(c[38]=[M("i",{class:"fc-icon icon-menu"},null,-1)]),2)]),_:1},8,["content"]),e.getConfig("showLanguage",!0)?(i(),n(h,{key:0,effect:"dark",content:e.t("language.name"),placement:"right","hide-after":0},{default:o(()=>[M("div",{class:P(["_fc-l-menu-item",{active:"language"===e.activeModule}]),onClick:c[1]||(c[1]=t=>e.activeModule="language")},c[39]||(c[39]=[M("i",{class:"fc-icon icon-language"},null,-1)]),2)]),_:1},8,["content"])):F("",!0),e.getConfig("showJsonPreview",!0)?(i(),n(h,{key:1,effect:"dark",content:"JSON",placement:"right","hide-after":0},{default:o(()=>[M("div",{class:P(["_fc-l-menu-item",{active:"json"===e.activeModule}]),onClick:c[2]||(c[2]=t=>e.activeModule="json")},c[40]||(c[40]=[M("i",{class:"fc-icon icon-script"},null,-1)]),2)]),_:1})):F("",!0),e.getConfig("showAi",!0)?(i(),n(h,{key:2,effect:"dark",content:e.t("ai.name"),placement:"right","hide-after":0},{default:o(()=>[M("div",{class:P(["_fc-l-menu-item",{active:"ai"===e.activeModule}]),onClick:c[3]||(c[3]=t=>e.activeModule="ai")},c[41]||(c[41]=[M("i",{class:"fc-icon icon-ai bright"},null,-1)]),2)]),_:1},8,["content"])):F("",!0)]),_:1},512)),[[B,!e.hiddenLeft]]):F("",!0),e.hiddenLeft?F("",!0):(i(),n(m,{key:1,class:"_fc-l",width:"language"===e.activeModule||"ai"===e.activeModule?"450px":"266px"},{default:o(()=>[M("div",{class:"_fc-l-close",onClick:c[4]||(c[4]=t=>e.hiddenLeft=!0)},c[42]||(c[42]=[M("i",{class:"fc-icon icon-arrow"},null,-1)])),y(_(g,null,null,512),[[B,"ai"===e.activeModule]]),"language"===e.activeModule?(i(),n(v,{key:0})):F("",!0),"json"===e.activeModule?(i(),n(b,{key:1})):F("",!0),"base"===e.activeModule?(i(),n(T,{key:2,style:{height:"100%"}},{default:o(()=>[_(x,{height:"40px",class:"_fc-l-tabs"},{default:o(()=>[M("div",{class:P(["_fc-l-tab",{active:"menu"===e.activeMenuTab}]),onClick:c[5]||(c[5]=t=>e.activeMenuTab="menu")},j(e.t("menu.component")),3),M("div",{class:P(["_fc-l-tab",{active:"tree"===e.activeMenuTab}]),onClick:c[6]||(c[6]=t=>e.activeMenuTab="tree")},j(e.t("menu.tree")),3)]),_:1}),y(_(A,null,{default:o(()=>[(i(!0),r(l,null,s(e.menuList,(t,n)=>(i(),r(l,null,[-1===e.hiddenMenu.indexOf(t.name)?(i(),r("div",{class:"_fc-l-group",key:n},[M("h4",{class:"_fc-l-title",onClick:e=>t.hidden=!t.hidden},[V(j(e.t("menu."+t.name)||t.title)+" ",1),M("i",{class:P(["fc-icon icon-arrow",{down:!t.hidden}])},null,2)],8,Yp),y(_(w,{group:{name:"default",pull:"clone",put:!1},sort:!1,itemKey:"name",class:"_fc-l-list",list:t.list},{item:o(({element:t})=>[-1===e.hiddenItem.indexOf(t.name)?(i(),r("div",{key:0,class:"_fc-l-item",onClick:n=>e.clickMenu(t)},[M("div",$p,[M("i",{class:P(["fc-icon",t.icon||"icon-input"])},null,2)]),M("span",qp,j(e.t("com."+t.name+".name")||t.label),1)],8,Gp)):F("",!0)]),_:2},1032,["list"]),[[B,!t.hidden]])])):F("",!0)],64))),256))]),_:1},512),[[B,"menu"===e.activeMenuTab]]),"tree"===e.activeMenuTab?(i(),n(A,{key:0},{default:o(()=>[_(E,{ref:"treeRef",data:e.treeInfo,"default-expand-all":"","expand-on-click-node":!1,onCurrentChange:e.treeChange},{default:o(({node:t,data:a})=>{var l,s,u,d;return[M("div",{class:P(["_fc-tree-node",{active:e.activeRule===a.rule}])},[M("div",Qp,[M("i",{class:P(["fc-icon",a.rule._menu&&a.rule._menu.icon||"icon-cell"])},null,2),M("span",null,j(((null==(d=null==(u=null==(s=null==(l=a.rule)?void 0:l.__fc__)?void 0:s.refRule)?void 0:u.__$title)?void 0:d.value)||a.rule.title||"").trim()||a.rule.props&&a.rule.props.label||e.t("com."+(a.rule._menu&&a.rule._menu.name)+".name")||a.rule._menu&&a.rule._menu.label||a.rule.type),1)]),a.slot?F("",!0):(i(),r("div",{key:0,class:"_fc-tree-more",onClick:c[7]||(c[7]=z(()=>{},["stop"]))},[_(S,{trigger:"click",size:"default"},{dropdown:o(()=>[_(C,null,{default:o(()=>["_"!==a.rule._fc_drag_tag?(i(),n(k,{key:"1",onClick:t=>e.toolHandle(a.rule,"copy")},{default:o(()=>[V(j(e.t("props.copy")),1)]),_:2},1032,["onClick"])):F("",!0),a.rule._menu&&a.rule._menu.children&&"_"!==a.rule._fc_drag_tag?(i(),n(k,{key:"2",onClick:t=>e.toolHandle(a.rule,"addChild")},{default:o(()=>[V(j(e.t("form.appendChild")),1)]),_:2},1032,["onClick"])):F("",!0),_(k,{key:"3",onClick:t=>e.toolHandle(a.rule,"delete")},{default:o(()=>[V(j(e.t("props.delete")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:o(()=>[c[43]||(c[43]=M("i",{class:"fc-icon icon-more"},null,-1))]),_:2,__:[43]},1024)]))],2)]}),_:1},8,["data","onCurrentChange"])]),_:1})):F("",!0)]),_:1})):F("",!0)]),_:1},8,["width"])),_(T,{class:"_fc-m"},{default:o(()=>[_(x,{class:"_fc-m-tools",height:"45"},{default:o(()=>[M("div",Kp,[e.inputForm.state?F("",!0):(i(),r(l,{key:0},[!1!==e.getConfig("showDevice")?(i(),r(l,{key:0},[M("div",Xp,[M("i",{class:P(["fc-icon icon-pc",{active:"pc"===e.device}]),onClick:c[8]||(c[8]=t=>e.setDevice("pc"))},null,2),M("i",{class:P(["fc-icon icon-pad",{active:"pad"===e.device}]),onClick:c[9]||(c[9]=t=>e.setDevice("pad"))},null,2),M("i",{class:P(["fc-icon icon-mobile",{active:"mobile"===e.device}]),onClick:c[10]||(c[10]=t=>e.setDevice("mobile"))},null,2)]),c[44]||(c[44]=M("div",{class:"line"},null,-1))],64)):F("",!0),M("div",null,[M("i",{class:P(["fc-icon icon-pre-step",{disabled:!e.operation.list[e.operation.idx-1]}]),onClick:c[11]||(c[11]=(...t)=>e.prevOperationRecord&&e.prevOperationRecord(...t))},null,2),M("i",{class:P(["fc-icon icon-next-step",{disabled:!e.operation.list[e.operation.idx+1]}]),onClick:c[12]||(c[12]=(...t)=>e.nextOperationRecord&&e.nextOperationRecord(...t))},null,2)])],64))]),M("div",Jp,[e.inputForm.state?F("",!0):(i(),r(l,{key:0},[a(e.$slots,"handle"),e.getConfig("showSaveBtn",!1)?(i(),n(R,{key:0,type:"success",plain:"",size:"small",onClick:e.handleSave},{default:o(()=>[c[45]||(c[45]=M("i",{class:"fc-icon icon-save-online"},null,-1)),V(" "+j(e.t("props.save")),1)]),_:1,__:[45]},8,["onClick"])):F("",!0),!1!==e.getConfig("showPreviewBtn")?(i(),n(R,{key:1,type:"primary",plain:"",size:"small",onClick:e.openPreview},{default:o(()=>[c[46]||(c[46]=M("i",{class:"fc-icon icon-preview"},null,-1)),V(" "+j(e.t("props.preview")),1)]),_:1,__:[46]},8,["onClick"])):F("",!0),_(O,{title:e.t("designer.clearWarn"),width:"200px","confirm-button-text":e.t("props.clear"),"cancel-button-text":e.t("props.cancel"),onConfirm:e.clearDragRule},{reference:o(()=>[_(R,{type:"danger",plain:"",size:"small"},{default:o(()=>[c[47]||(c[47]=M("i",{class:"fc-icon icon-delete"},null,-1)),V(j(e.t("props.clear")),1)]),_:1,__:[47]})]),_:1},8,["title","confirm-button-text","cancel-button-text","onConfirm"]),e.handle&&e.handle.length?(i(),n(S,{key:2,trigger:"click",size:"default"},{dropdown:o(()=>[_(C,null,{default:o(()=>[(i(!0),r(l,null,s(e.handle,t=>(i(),n(k,{onClick:z(n=>e.triggerHandle(t),["stop"])},{default:o(()=>[M("div",null,j(t.label),1)]),_:2},1032,["onClick"]))),256))]),_:1})]),default:o(()=>[_(R,{class:"_fd-m-extend",plain:"",size:"small"},{default:o(()=>c[48]||(c[48]=[M("i",{class:"fc-icon icon-more"},null,-1)])),_:1,__:[48]})]),_:1})):F("",!0)],64)),e.getConfig("showInputData",!0)?(i(),r(l,{key:1},[c[51]||(c[51]=M("div",{class:"line"},null,-1)),M("div",Zp,[_(D,{size:"default","model-value":e.inputForm.state,"inline-prompt":"","onUpdate:modelValue":e.openInputData},{"active-action":o(()=>c[49]||(c[49]=[M("i",{class:"fc-icon icon-edit2",style:{"font-size":"12px",color:"#fff"}},null,-1)])),"inactive-action":o(()=>c[50]||(c[50]=[M("i",{class:"fc-icon icon-edit2",style:{"font-size":"12px",color:"#333"}},null,-1)])),_:1},8,["model-value","onUpdate:modelValue"])])],64)):F("",!0)])]),_:3}),_(A,{class:"_fc-m-con"},{default:o(()=>{var t,a;return[(i(),r("a",{key:e.activeRule?e.activeRule._fc_id:"",style:{"background-image":"url(data:image/png;base64,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) !important","background-repeat":"no-repeat !important","background-size":"cover !important","background-position":"center !important",position:"absolute !important",overflow:"hidden !important",left:"50% !important",width:"160px!important",right:"0 !important",top:"auto !important",bottom:"9px !important",display:"block !important",height:"17px !important","text-align":"center !important",opacity:"1 !important",visibility:"visible !important",margin:"0 0 0 -80px !important",padding:"0 !important"},target:"_blank",href:"https://form-create.com/"})),M("div",{class:P(["_fc-m-drag",e.device]),ref:"dragCon",style:H({"--fc-drag-empty":"'".concat(e.t("designer.dragEmpty"),"'"),"--fc-child-empty":"'".concat(e.t("designer.childEmpty"),"'")})},[e.inputForm.state?(i(),r("div",eh,[(i(),n(N,{key:e.inputForm.key,rule:e.inputForm.rule,option:e.inputForm.option,locale:null==(t=e.locale)?void 0:t.name,api:e.inputForm.api,"onUpdate:api":c[13]||(c[13]=t=>e.inputForm.api=t),disabled:!1},null,8,["rule","option","locale","api"]))])):(i(),n(I,{key:1,rule:e.dragForm.rule,option:e.formOptions,locale:null==(a=e.locale)?void 0:a.name,api:e.dragForm.api,"onUpdate:api":c[14]||(c[14]=t=>e.dragForm.api=t)},null,8,["rule","option","locale","api"]))],6),e.inputForm.state?(i(),r("div",th,[_(R,{plain:"",onClick:c[15]||(c[15]=t=>e.inputClear())},{default:o(()=>[V(j(e.t("props.clear")),1)]),_:1}),_(R,{plain:"",onClick:c[16]||(c[16]=t=>e.inputReset())},{default:o(()=>[V(j(e.t("props.reset")),1)]),_:1}),_(R,{type:"primary",plain:"",onClick:c[17]||(c[17]=t=>e.inputSave())},{default:o(()=>[V(j(e.t("props.save")),1)]),_:1})])):F("",!0)]}),_:1})]),_:3}),e.config&&!1===e.config.showConfig?F("",!0):y((i(),n(m,{key:2,class:"_fc-r",width:"320px"},{default:o(()=>[M("div",{class:"_fc-r-close",onClick:c[18]||(c[18]=t=>e.hiddenRight=!0)},c[52]||(c[52]=[M("i",{class:"fc-icon icon-arrow"},null,-1)])),_(T,{style:{height:"100%"}},{default:o(()=>[_(x,{height:"40px",class:"_fc-r-tabs"},{default:o(()=>[e.activeRule||e.customForm.isShow||e.config&&!1===e.config.showFormConfig?(i(),r("div",{key:0,class:P(["_fc-r-tab",{active:"props"===e.activeTab}]),onClick:c[19]||(c[19]=t=>e.activeTab="props")},j(e.t("designer.component")),3)):F("",!0),e.config&&!1===e.config.showFormConfig?F("",!0):(i(),r("div",{key:1,class:P(["_fc-r-tab",{active:"form"===e.activeTab&&(!!e.activeRule||e.customForm.isShow)}]),onClick:c[20]||(c[20]=t=>e.activeTab="form")},j(e.t("designer.form")),3))]),_:1}),e.config&&!1===e.config.showFormConfig?F("",!0):y((i(),n(A,{key:0,class:"_fc-r-tab-form"},{default:o(()=>[_(I,{rule:e.form.rule,option:e.form.option,modelValue:e.form.value,onChange:e.formOptChange,api:e.form.api,"onUpdate:api":c[21]||(c[21]=t=>e.form.api=t),onMounted:e.formMounted},{title:o(e=>[e.rule.warning?(i(),n(L,{key:0,tooltip:e.rule.warning},{default:o(()=>[V(j(e.rule.title),1)]),_:2},1032,["tooltip"])):(i(),r(l,{key:1},[V(j(e.rule.title),1)],64))]),_:1},8,["rule","option","modelValue","onChange","api","onMounted"])]),_:1},512)),[[B,"form"===e.activeTab]]),y((i(),n(A,{class:"_fc-r-tab-props",key:e.activeRule?e.activeRule._fc_id:e.customForm.config?e.customForm.key:""},{default:o(()=>[M("div",{class:"_fc-r-tools-close",onClick:c[22]||(c[22]=(...t)=>e.clearActiveRule&&e.clearActiveRule(...t))},c[53]||(c[53]=[M("i",{class:"fc-icon icon-add2"},null,-1)])),e.activeRule||e.customForm.config&&(e.customForm.config.name||e.customForm.config.label)?(i(),r(l,{key:0},[M("p",nh,j(e.t("designer.type")),1),_(G,{disabled:!1===e.activePermission.switchType},null,8,["disabled"]),!1!==e.activePermission.name&&e.activeRule&&e.activeRule.name&&!1!==e.config.showComponentName?(i(),r(l,{key:0},[M("p",ih,[_(L,{tooltip:e.t("warning.name")},{default:o(()=>[V(j(e.t("designer.name")),1)]),_:1},8,["tooltip"])]),_($,{size:"small",class:"_fc-r-name-input",modelValue:e.activeRule.name,"onUpdate:modelValue":c[25]||(c[25]=t=>e.activeRule.name=t),modelModifiers:{trim:!0},readonly:!1!==e.getConfig("nameReadonly")},{suffix:o(()=>[M("i",{class:"fc-icon icon-group",onClick:c[23]||(c[23]=(...t)=>e.copyName&&e.copyName(...t))})]),append:o(()=>[M("i",{class:"fc-icon icon-auto",onClick:c[24]||(c[24]=(...t)=>e.updateName&&e.updateName(...t))})]),_:1},8,["modelValue","readonly"])],64)):F("",!0),e.activeRule?(i(),n(q,{key:1,label:e.t("props.hide")},{default:o(()=>[_(D,{size:"small",modelValue:e.activeRule._hidden,"onUpdate:modelValue":c[26]||(c[26]=t=>e.toolHidden(e.activeRule))},null,8,["modelValue"])]),_:1},8,["label"])):F("",!0)],64)):F("",!0),M("div",{class:"_fc-r-config",style:H({"grid-template-areas":e.configFormOrderStyle})},[M("div",oh,[e.baseForm.isShow?(i(),n(Q,{key:0},{default:o(()=>[V(j(e.t("designer.rule")),1)]),_:1})):F("",!0),y(_(I,{api:e.baseForm.api,"onUpdate:api":c[27]||(c[27]=t=>e.baseForm.api=t),rule:e.baseForm.rule,option:e.baseForm.options,modelValue:e.baseForm.value,onChange:e.baseChange},{title:o(e=>[e.rule.warning?(i(),n(L,{key:0,tooltip:e.rule.warning},{default:o(()=>[V(j(e.rule.title),1)]),_:2},1032,["tooltip"])):(i(),r(l,{key:1},[V(j(e.rule.title),1)],64))]),_:1},8,["api","rule","option","modelValue","onChange"]),[[B,e.baseForm.isShow]])]),M("div",rh,[e.propsForm.isShow?(i(),n(Q,{key:0},{default:o(()=>[V(j(e.t("designer.props"))+" ",1),e.activeRule&&e.getConfig("showCustomProps",!0)?(i(),n(K,{key:0})):F("",!0)]),_:1})):F("",!0),y(_(I,{api:e.propsForm.api,"onUpdate:api":c[28]||(c[28]=t=>e.propsForm.api=t),rule:e.propsForm.rule,option:e.propsForm.options,modelValue:e.propsForm.value,onChange:e.propChange,onRemoveField:e.propRemoveField},{title:o(e=>[e.rule.warning?(i(),n(L,{key:0,tooltip:e.rule.warning},{default:o(()=>[V(j(e.rule.title),1)]),_:2},1032,["tooltip"])):(i(),r(l,{key:1},[V(j(e.rule.title),1)],64))]),_:1},8,["api","rule","option","modelValue","onChange","onRemoveField"]),[[B,e.propsForm.isShow]]),e.customForm.isShow&&e.customForm.propsShow?(i(),n(Q,{key:1},{default:o(()=>[V(j(e.t("designer.props")),1)]),_:1})):F("",!0),e.customForm.isShow&&e.customForm.propsShow?(i(),n(I,{api:e.customForm.api,"onUpdate:api":c[29]||(c[29]=t=>e.customForm.api=t),rule:e.customForm.rule,option:e.customForm.options,key:e.customForm.key,onChange:e.customFormChange},null,8,["api","rule","option","onChange"])):F("",!0)]),M("div",ah,[e.styleForm.isShow?(i(),n(Q,{key:0,id:"_fd-config-style"},{default:o(()=>[V(j(e.t("designer.style")),1)]),_:1})):F("",!0),y(_(I,{rule:e.styleForm.rule,option:e.styleForm.options,modelValue:e.styleForm.value,onChange:e.styleChange,api:e.styleForm.api,"onUpdate:api":c[30]||(c[30]=t=>e.styleForm.api=t)},null,8,["rule","option","modelValue","onChange","api"]),[[B,e.styleForm.isShow]])]),M("div",lh,[e.eventShow?(i(),n(Q,{key:0},{default:o(()=>[V(j(e.t("designer.event")),1)]),_:1})):F("",!0),e.eventShow?(i(),n(X,{key:1,"event-name":e.activeRule&&e.activeRule._menu.event||[],"component-name":e.activeRule&&e.activeRule._menu.name||"","model-value":e.activeRule&&e.activeRule._on||{},"onUpdate:modelValue":e.changeEvent},null,8,["event-name","component-name","model-value","onUpdate:modelValue"])):F("",!0)]),e.activeRule?(i(),r("div",sh,[e.validateForm.isShow?(i(),n(Q,{key:0},{default:o(()=>[V(j(e.t("designer.validate")),1)]),_:1})):F("",!0),e.validateForm.isShow?(i(),n(I,{api:e.validateForm.api,"onUpdate:api":c[31]||(c[31]=t=>e.validateForm.api=t),rule:e.validateForm.rule,option:e.validateForm.options,modelValue:e.validateForm.value,onChange:e.validateChange,key:e.activeRule._fc_id},null,8,["api","rule","option","modelValue","onChange"])):F("",!0)])):F("",!0)],4)]),_:1})),[[B,"props"===e.activeTab]])]),_:1})]),_:1},512)),[[B,!e.hiddenRight]]),e.hiddenLeft?(i(),r("div",{key:3,class:"_fc-l-open",onClick:c[32]||(c[32]=t=>e.hiddenLeft=!1)},c[54]||(c[54]=[M("i",{class:"fc-icon icon-arrow"},null,-1)]))):F("",!0),e.hiddenRight?(i(),r("div",{key:4,class:"_fc-r-open",onClick:c[33]||(c[33]=t=>e.hiddenRight=!1)},c[55]||(c[55]=[M("i",{class:"fc-icon icon-arrow"},null,-1)]))):F("",!0),_(ee,{modelValue:e.preview.state,"onUpdate:modelValue":c[37]||(c[37]=t=>e.preview.state=t),width:"80%",class:"_fd-preview-dialog","append-to-body":""},{default:o(()=>{var t;return[_(Z,{class:"_fd-preview-tabs",modelValue:e.previewStatus,"onUpdate:modelValue":c[34]||(c[34]=t=>e.previewStatus=t)},{default:o(()=>[_(J,{label:e.t("form.formMode"),name:"form"},null,8,["label"]),_(J,{label:e.t("form.componentMode"),name:"component"},null,8,["label"]),_(J,{label:e.t("form.htmlMode"),name:"html"},null,8,["label"])]),_:1},8,["modelValue"]),["component","html"].indexOf(e.previewStatus)>-1?(i(),r("div",{key:0,class:"_fd-preview-copy",onClick:c[35]||(c[35]=(...t)=>e.copyCode&&e.copyCode(...t))},c[56]||(c[56]=[M("i",{class:"fc-icon icon-copy"},null,-1)]))):F("",!0),"form"===e.previewStatus?(i(),r(l,{key:1},[e.preview.state?(i(),n(N,{key:0,rule:e.preview.rule,option:e.preview.option,api:e.preview.api,"onUpdate:api":c[36]||(c[36]=t=>e.preview.api=t),onSubmit:e.previewSubmit,onReset:e.previewReset,locale:null==(t=e.locale)?void 0:t.name},U({_:2},[s(e.$slots,(t,n)=>({name:n,fn:o(t=>[a(e.$slots,n,W(Y(null!=t?t:{})))])}))]),1032,["rule","option","api","onSubmit","onReset","locale"])):F("",!0)],64)):"component"===e.previewStatus?(i(),r("pre",ch,[M("code",{innerHTML:e.preview.component},null,8,uh)],512)):(i(),r("pre",dh,[M("code",{innerHTML:e.preview.html},null,8,fh)],512))]}),_:3},8,["modelValue"])]),_:3}))]),_:3})]),_:3},8,["style","onDragenter","onDragleave","onDrop"])}]]),hh=e({name:"DragTool",emits:["create","copy","addChild","delete","active","fc.el"],props:{dragBtn:Boolean,children:String,mask:Boolean,hidden:Boolean,handleBtn:[Boolean,Array],formCreateInject:Object,unique:String,only:Boolean},inject:{fcx:{default:null},designer:{default:null},dragTool:{default:null}},provide(){return{dragTool:this}},computed:{isCreate(){return!!this.dragTool&&!!this.dragTool.children},btns(){return Array.isArray(this.handleBtn)?!!this.handleBtn.length&&this.handleBtn:!1!==this.handleBtn},id(){return this.unique||this.formCreateInject.id},hiddenMenu(){return this.designer.ctx.hiddenDragMenu},hiddenBtn(){return this.designer.ctx.hiddenDragBtn},rule(){var e,t;return null==(t=null==(e=this.formCreateInject)?void 0:e.rule)?void 0:t._config._get()},t(){return this.designer.setupState.t},permission(){return this.rule?this.designer.setupState.getPermission(this.rule):{}}},methods:{active(){this.fcx.active!==this.id&&(this.fcx.active=this.id,this.$emit("active"))}},mounted(){this.$emit("fc.el",this)}}),mh={key:0,class:"_fd-drag-mask"},gh={key:1,class:"_fd-drag-hidden"},vh={key:0,class:"_fd-drag-btn",style:{cursor:"move"}},_h={key:3,class:"_fd-drag-r"};const bh=ls(hh,[["render",function(e,t,n,o,l,s){return i(),r("div",{class:P(["_fd-drag-tool",{active:e.fcx.active===e.id}]),onClick:t[5]||(t[5]=z((...t)=>e.active&&e.active(...t),["stop"]))},[e.mask?(i(),r("div",mh)):F("",!0),e.hidden?(i(),r("div",gh,[t[6]||(t[6]=M("i",{class:"fc-icon icon-eye-close"},null,-1)),V(" "+j(e.t("props.hide")),1)])):F("",!0),e.hiddenBtn||!1===e.permission.move?F("",!0):(i(),r("div",{key:2,class:"_fd-drag-l",onClick:t[0]||(t[0]=z(()=>{},["stop"]))},[!1!==e.dragBtn?y((i(),r("div",vh,t[7]||(t[7]=[M("i",{class:"fc-icon icon-move"},null,-1)]),512)),[[B,e.fcx.active===e.id]]):F("",!0)])),!1===e.btns||e.hiddenMenu||!1===e.permission.dragMenu?F("",!0):(i(),r("div",_h,[a(e.$slots,"handle",{},()=>[!1!==e.permission.create&&e.isCreate&&(!0===e.btns||e.btns.indexOf("create")>-1)?(i(),r("div",{key:0,class:"_fd-drag-btn",onClick:t[1]||(t[1]=z(t=>e.$emit("create"),["stop"]))},t[8]||(t[8]=[M("i",{class:"fc-icon icon-add"},null,-1)]))):F("",!0),!1!==e.permission.copy&&!e.only&&(!0===e.btns||e.btns.indexOf("copy")>-1)?(i(),r("div",{key:1,class:"_fd-drag-btn",onClick:t[2]||(t[2]=z(t=>e.$emit("copy"),["stop"]))},t[9]||(t[9]=[M("i",{class:"fc-icon icon-copy"},null,-1)]))):F("",!0),!1!==e.permission.addChild&&e.children&&(!0===e.btns||e.btns.indexOf("addChild")>-1)?(i(),r("div",{key:2,class:"_fd-drag-btn",onClick:t[3]||(t[3]=z(t=>e.$emit("addChild"),["stop"]))},t[10]||(t[10]=[M("i",{class:"fc-icon icon-add-child"},null,-1)]))):F("",!0),!1!==e.permission.delete&&(!0===e.btns||e.btns.indexOf("delete")>-1)?(i(),r("div",{key:3,class:"_fd-drag-btn _fd-drag-danger",onClick:t[4]||(t[4]=z(t=>e.$emit("delete"),["stop"]))},t[11]||(t[11]=[M("i",{class:"fc-icon icon-delete"},null,-1)]))):F("",!0)])])),a(e.$slots,"default")],2)}]]);const yh=ls(e({name:"fcRow",mounted(){}}),[["render",function(e,t,n,o,l,s){return i(),r("div",c({class:["_fd-row el-row",{"_fc-child-empty":!e.$slots.default}]},e.$attrs),[a(e.$slots,"default")],16)}]]),xh=e({name:"HtmlEditor",emits:["update:modelValue"],props:{modelValue:String,title:String,defaultValue:{require:!1}},inject:["designer"],computed:{t(){return this.designer.setupState.t}},data:()=>({editor:null,visible:!1,oldVal:null}),watch:{modelValue(){this.load()},visible(e){e&&this.load()}},methods:{validateXML(e){var t;const n=(new DOMParser).parseFromString(e,"text/html").getElementsByTagName("parsererror");return n.length>0&&null!=(t=n[0].innerText.split("\n")[0])?t:""},load(){this.oldVal=this.modelValue,this.$nextTick(()=>{this.editor=g(as(this.$refs.editor,{lineNumbers:!0,mode:"xml",lint:!0,line:!0,tabSize:2,lineWrapping:!0,value:this.modelValue||""}))})},onOk(){const e=this.editor.getValue();return this.validateXML(e)?(pi(this.t("struct.errorMsg")),!1):(this.visible=!1,e!==this.oldVal&&this.$emit("update:modelValue",e),!0)}}}),wh={class:"_fd-html-editor"},Ah={key:0,ref:"editor"};const kh=ls(xh,[["render",function(e,n,a,l,s,c){const u=t("el-button"),d=t("el-dialog");return i(),r("div",wh,[_(u,{onClick:n[0]||(n[0]=t=>e.visible=!0),style:{width:"100%"}},{default:o(()=>[V(j(e.title||e.t("struct.title")),1)]),_:1}),_(d,{class:"_fd-html-editor-con",title:e.title||e.t("struct.title"),modelValue:e.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>e.visible=t),"close-on-click-modal":!1,"append-to-body":""},{footer:o(()=>[M("div",null,[_(u,{onClick:n[1]||(n[1]=t=>e.visible=!1),size:"default"},{default:o(()=>[V(j(e.t("props.cancel")),1)]),_:1}),_(u,{type:"primary",onClick:e.onOk,size:"default"},{default:o(()=>[V(j(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:o(()=>[e.visible?(i(),r("div",Ah,null,512)):F("",!0)]),_:1},8,["title","modelValue"])])}]]),Ch=e({name:"FnInput",components:{FnEditor:gs},emits:["update:modelValue","change"],props:{modelValue:[String,Function],name:String,args:Array,title:String,body:Boolean,fnx:Boolean,defaultValue:{require:!1},validate:Function},inject:["designer"],computed:{t(){return this.designer.setupState.t},configured(){return!!this.modelValue}},data(){return{visible:!1,value:this.modelValue}},watch:{modelValue(e){this.value=e}},methods:{onOk(){this.$refs.editor.save()&&(this.$emit("update:modelValue",this.value),this.$emit("change",this.value),this.visible=!1)}}}),Sh={class:"_fd-fn-input"};const Eh=ls(Ch,[["render",function(e,n,l,s,c,u){const d=t("el-button"),f=t("el-badge"),p=t("FnEditor"),h=t("el-dialog");return i(),r("div",Sh,[_(f,{type:"warning","is-dot":"",hidden:!e.configured},{default:o(()=>[_(d,{onClick:n[0]||(n[0]=t=>e.visible=!0),size:"small"},{default:o(()=>[a(e.$slots,"default",{},()=>[V(j(e.t("event.title")),1)])]),_:3})]),_:3},8,["hidden"]),_(h,{class:"_fd-fn-input-dialog _fd-config-dialog",title:e.title||e.t("struct.title"),modelValue:e.visible,"onUpdate:modelValue":n[3]||(n[3]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"800px"},{footer:o(()=>[M("div",null,[_(d,{onClick:n[2]||(n[2]=t=>e.visible=!1),size:"default"},{default:o(()=>[V(j(e.t("props.cancel")),1)]),_:1}),_(d,{type:"primary",onClick:e.onOk,size:"default"},{default:o(()=>[V(j(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:o(()=>[_(p,{ref:"editor",modelValue:e.value,"onUpdate:modelValue":n[1]||(n[1]=t=>e.value=t),name:e.name,args:e.args,body:e.body,fnx:e.fnx},null,8,["modelValue","name","args","body","fnx"])]),_:1},8,["title","modelValue"])])}]]),Th=e({name:"FetchConfig",emits:["update:modelValue"],props:{modelValue:[Object,String],to:String},components:{Warning:Dp,DragForm:Xl.$form(),FnEditor:gs,StructEditor:Sp},inject:["designer"],data(){return{visible:!1,value:oi(this.modelValue||{}),form:{api:{},formData:{},rule:[],options:{form:{labelWidth:"90px",size:"default"},submitBtn:!1,resetBtn:!1}},previewLoading:!1,previewResult:null}},computed:{t(){return this.designer.setupState.t},configured(){return!ei.empty(this.modelValue)}},watch:{visible(e){e&&(this.value=oi(this.modelValue||{}),this.active())}},methods:{open(){this.visible=!0},active(){const e=this.value;this.form.rule="static"===e.type?[]:(e=>[{type:"input",field:"action",title:e("fetch.action"),value:"",props:{size:"default"},validate:[{required:!0,message:e("fetch.actionRequired"),trigger:"blur"}]},{type:"radio",field:"method",title:e("fetch.method"),value:"GET",props:{size:"default"},options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"}],$required:!0},{type:"radio",field:"dataType",title:e("fetch.dataType"),warning:e("warning.fetchDataType"),value:"json",props:{size:"default"},options:[{label:"JSON",value:"json"},{label:"FormData",value:"formData"}],$required:!0},{type:"TableOptions",field:"headers",title:e("fetch.headers"),value:{},props:{column:[{label:e("props.key"),key:"label"},{label:e("props.value"),key:"value"}],valueType:"object",size:"default"}},{type:"TableOptions",field:"query",title:e("fetch.query"),warning:e("warning.fetchQuery"),value:{},props:{column:[{label:e("props.key"),key:"label"},{label:e("props.value"),key:"value"}],valueType:"object",size:"default"}},{type:"TableOptions",field:"data",title:e("fetch.data"),warning:e("warning.fetchData"),value:{},props:{column:[{label:e("props.key"),key:"label"},{label:e("props.value"),key:"value"}],valueType:"object",size:"default"}}])(this.t),this.form.formData={...e},this.form.label=e.label,this.form.type=e.type,this.form.data=e.data,this.form.dataType=e.dataType,this.form.parse=e.parse||"",this.form.beforeFetch=e.beforeFetch||"",this.form.onError=e.onError||""},save(){this.form.api.validate().then(()=>{const e={...this.form.formData};this.$refs.parse&&!this.$refs.parse.save()||this.$refs.beforeFetch&&!this.$refs.beforeFetch.save()||this.$refs.error&&!this.$refs.error.save()||(e.parse=Xl.parseFn(this.form.parse),e.beforeFetch=Xl.parseFn(this.form.beforeFetch),e.onError=this.form.onError,e.label=this.form.label,e.type=this.form.type,e.to=this.to||"options",this.$emit("update:modelValue",e),this.visible=!1)}).catch(e=>{pi(e[Object.keys(e)[0]][0].message)})},previewData(){this.form.api.validate().then(()=>{this.previewLoading=!0,this.previewResult=null;const e=Date.now(),t={...this.form.formData};delete t.beforeFetch,delete t.parse,delete t.onError,this.form.beforeFetch&&(t.beforeFetch=Xl.parseFn(this.form.beforeFetch)),this.designer.setupState.dragForm.api.fetch(t).then(t=>{const n=Date.now();this.previewResult={success:!0,time:n-e,data:JSON.stringify(t,null,2)},this.previewLoading=!1}).catch(()=>{const t=Date.now();this.previewResult={success:!1,time:t-e,data:this.t("fetch.requestFailed")},this.previewLoading=!1})})}},created(){this.active()}}),Rh={class:"_fd-gfc"},Oh={class:"_fd-fetch-preview"},Mh={class:"_fd-fetch-preview-header"},Dh={class:"_fd-fetch-preview-title"},Nh={class:"_fd-fetch-preview-content"},Ih={key:0,class:"_fd-fetch-preview-empty"},Lh={key:1,class:"_fd-fetch-preview-result"},Fh={class:"_fd-fetch-preview-status"},Ph={class:"_fd-fetch-preview-time"},Bh={class:"_fd-fetch-preview-data"};const jh=ls(Th,[["render",function(e,a,s,c,u,d){const f=t("el-button"),p=t("el-badge"),h=t("Warning"),m=t("DragForm"),g=t("el-tag"),v=t("el-tab-pane"),b=t("FnEditor"),y=t("el-tabs"),x=t("el-container"),w=t("el-dialog");return i(),r("div",Rh,[_(p,{type:"warning","is-dot":"",hidden:!e.configured},{default:o(()=>[_(f,{onClick:a[0]||(a[0]=t=>e.visible=!0),size:"small"},{default:o(()=>[V(j(e.t("struct.title")),1)]),_:1})]),_:1},8,["hidden"]),_(w,{class:"_fd-gfc-dialog",modelValue:e.visible,"onUpdate:modelValue":a[7]||(a[7]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"1080px"},{header:o(()=>[V(j(e.t("fetch.optionsType.fetch"))+" ",1),_(h,{tooltip:e.t("warning.fetch")},null,8,["tooltip"])]),footer:o(()=>[M("div",null,[_(f,{size:"default",onClick:a[6]||(a[6]=t=>e.visible=!1)},{default:o(()=>[V(j(e.t("props.cancel")),1)]),_:1}),_(f,{type:"primary",size:"default",onClick:e.save,color:"#2f73ff"},{default:o(()=>[V(j(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:o(()=>[_(x,{class:"_fd-gfc-con",style:{height:"600px"}},{default:o(()=>[_(y,{"model-value":"first",class:"_fc-tabs",style:{width:"100%"}},{default:o(()=>[_(v,{label:e.t("fetch.config"),name:"first"},{default:o(()=>[_(m,{api:e.form.api,"onUpdate:api":a[1]||(a[1]=t=>e.form.api=t),modelValue:e.form.formData,"onUpdate:modelValue":a[2]||(a[2]=t=>e.form.formData=t),rule:e.form.rule,option:e.form.options},{title:o(e=>[e.rule.warning?(i(),n(h,{key:0,tooltip:e.rule.warning},{default:o(()=>[V(j(e.rule.title),1)]),_:2},1032,["tooltip"])):(i(),r(l,{key:1},[V(j(e.rule.title),1)],64))]),_:1},8,["api","modelValue","rule","option"]),M("div",Oh,[M("div",Mh,[M("span",Dh,j(e.t("fetch.preview")),1),_(f,{size:"small",type:"primary",onClick:e.previewData,loading:e.previewLoading},{default:o(()=>[V(j(e.t("fetch.test")),1)]),_:1},8,["onClick","loading"])]),M("div",Nh,[e.previewResult?(i(),r("div",Lh,[M("div",Fh,[_(g,{"disable-transitions":"",type:e.previewResult.success?"success":"danger"},{default:o(()=>[V(j(e.previewResult.success?e.t("props.success"):e.t("props.error")),1)]),_:1},8,["type"]),M("span",Ph,j(e.previewResult.time)+"ms",1)]),M("div",Bh,[M("pre",null,j(e.previewResult.data),1)])])):(i(),r("div",Ih,j(e.t("fetch.previewEmpty")),1))])])]),_:1},8,["label"]),_(v,{lazy:"",label:e.t("fetch.beforeFetch"),name:"second"},{label:o(()=>[V(j(e.t("fetch.beforeFetch"))+" ",1),_(h,{tooltip:e.t("warning.beforeFetch")},null,8,["tooltip"])]),default:o(()=>[_(b,{style:{height:"415px"},modelValue:e.form.beforeFetch,"onUpdate:modelValue":a[3]||(a[3]=t=>e.form.beforeFetch=t),name:"beforeFetch",args:["config","data"],ref:"beforeFetch"},null,8,["modelValue"])]),_:1},8,["label"]),_(v,{lazy:"",name:"third"},{label:o(()=>[V(j(e.t("fetch.parse"))+" ",1),_(h,{tooltip:e.t("warning.fetchParse")},null,8,["tooltip"])]),default:o(()=>[_(b,{style:{height:"415px"},modelValue:e.form.parse,"onUpdate:modelValue":a[4]||(a[4]=t=>e.form.parse=t),name:"parse",args:[{name:"res",info:e.t("fetch.response")},"rule","api"],ref:"parse"},null,8,["modelValue","args"])]),_:1}),_(v,{lazy:"",label:e.t("fetch.onError"),name:"fourth"},{default:o(()=>[_(b,{style:{height:"415px"},modelValue:e.form.onError,"onUpdate:modelValue":a[5]||(a[5]=t=>e.form.onError=t),name:"onError",args:["e"],ref:"error"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}]]),Vh=e({name:"FieldInput",inject:["designer"],emits:["update:modelValue"],props:{modelValue:String,disabled:Boolean},computed:{fieldReadonly(){return this.designer.setupState.fieldReadonly},activeRule(){return this.designer.setupState.activeRule},t(){return this.designer.setupState.t}},data(){return{value:this.modelValue||"",oldValue:""}},watch:{modelValue(e){this.value=e}},methods:{copy(){Li(this.modelValue)},getSubChildren(){let e=this.designer.setupState.getSubFormChildren(this.activeRule)||[];return e=ei.trueArray(e)?e:this.designer.setupState.children,e},getSubFieldChildren(){const e=this.getSubChildren(),t=[],n=e=>(e&&e.forEach(e=>{e&&e._fc_drag_tag&&e.field?t.push({...e,children:[]}):e&&e.children&&n(e.children)}),t);return n(e)},checkValue(){const e=this.oldValue;let t=(this.value||"").replace(/[\s ]/g,"");if(!t)return pi(this.t("computed.fieldEmpty")),e;if(!/^[a-zA-Z]/.test(t))return pi(this.t("computed.fieldChar")),e;if(e!==t){const n=t.indexOf(".")>-1;if(n&&(t=t.replaceAll(".","_")),this.getSubFieldChildren().filter(e=>e.field===t).length>0)return pi(this.t("computed.fieldExist",{label:t})),e;if(n)return t}return this.oldValue="",t},onFocus(){this.oldValue=this.value},makeField(){this.oldValue=this.value,this.value=Wi(),this.onInput()},onInput(){this.value!==this.modelValue&&(this.value=this.checkValue(),this.oldValue=this.value,this.value!==this.modelValue&&(this.designer.emit("changeField",{field:this.value,oldField:this.modelValue,rule:this.activeRule}),this.$emit("update:modelValue",this.value)))}}}),zh={class:"_fd-field-input"};const Hh=ls(Vh,[["render",function(e,n,a,l,s,c){const u=t("el-input");return i(),r("div",zh,[M("i",{class:"fc-icon icon-group",onClick:n[0]||(n[0]=z((...t)=>e.copy&&e.copy(...t),["stop"]))}),_(u,{modelValue:e.value,"onUpdate:modelValue":n[2]||(n[2]=t=>e.value=t),readonly:e.fieldReadonly||e.disabled,disabled:e.fieldReadonly||e.disabled,onFocus:e.onFocus,onBlur:e.onInput},U({_:2},[e.fieldReadonly?void 0:{name:"append",fn:o(()=>[M("i",{class:"fc-icon icon-auto",onClick:n[1]||(n[1]=(...t)=>e.makeField&&e.makeField(...t))})]),key:"0"}]),1032,["modelValue","readonly","disabled","onFocus","onBlur"])])}]]),Uh=e({name:"FnConfig",emits:["update:modelValue"],props:{modelValue:[Object,void 0,null],eventConfig:{type:Array,default:()=>[]}},inject:["designer"],components:{FnEditor:gs},data:()=>({visible:!1,activeData:null,defActive:"no",event:{},cus:!1,eventStr:""}),computed:{eventInfo(){const e={};return this.eventConfig.forEach(t=>{e[t.name]=t.info}),e},t(){return this.designer.setupState.t},eventNum(){let e=0;return Object.keys(this.modelValue||{}).forEach(t=>{this.modelValue[t]&&e++}),e}},watch:{visible(e){this.event=e?this.loadFN(ii({},this.modelValue||{})):{},e||this.destroy()}},methods:{getArgs:e=>e.args.join(", "),loadFN(e){const t={};return this.eventConfig.forEach(n=>{const i=n.name,o=e[i]||"";t[i]={item:n,fn:o}}),t},parseFN(e){const t={};return Object.keys(e).forEach(n=>{e[n].fn&&(t[n]=e[n].fn)}),t},edit(e){e.key=Wi(),this.activeData=e,this.eventStr=e.fn||"[[FORM-CREATE-PREFIX-"+"function ".concat(e.item.name,"(").concat(this.getArgs(e.item),"){}")+"-FORM-CREATE-SUFFIX]]",this.defActive=e.item.name},save(){return!!this.$refs.fn.save()&&(this.activeData.fn=this.eventStr,this.destroy(),!0)},destroy(){this.activeData=null,this.defActive="no"},close(){this.destroy()},submit(){this.activeData&&!this.save()||(this.$emit("update:modelValue",this.parseFN(this.event)),this.visible=!1,this.destroy())}}}),Wh={class:"_fd-fn-list"},Yh=["onClick"],Gh={key:0,class:"_fd-label"},$h={key:1,class:"_fd-dot"};const qh=ls(Uh,[["render",function(e,a,c,u,d,f){const p=t("el-button"),h=t("el-badge"),m=t("el-text"),g=t("el-header"),v=t("el-menu-item"),b=t("el-menu"),y=t("el-main"),x=t("el-container"),w=t("el-aside"),A=t("FnEditor"),k=t("el-dialog");return i(),r("div",Wh,[_(h,{value:e.eventNum,type:"warning",hidden:e.eventNum<1},{default:o(()=>[_(p,{onClick:a[0]||(a[0]=t=>e.visible=!0),size:"small"},{default:o(()=>[V(j(e.t("event.title")),1)]),_:1})]),_:1},8,["value","hidden"]),_(k,{class:"_fd-fn-list-dialog",title:e.t("event.title"),modelValue:e.visible,"onUpdate:modelValue":a[4]||(a[4]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"1080px"},{footer:o(()=>[M("div",null,[_(p,{size:"default",onClick:a[3]||(a[3]=t=>e.visible=!1)},{default:o(()=>[V(j(e.t("props.cancel")),1)]),_:1}),_(p,{type:"primary",size:"default",onClick:e.submit,color:"#2f73ff"},{default:o(()=>[V(j(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:o(()=>[_(x,{class:"_fd-fn-list-con",style:{height:"600px"}},{default:o(()=>[_(w,{style:{width:"300px"}},{default:o(()=>[_(x,{class:"_fd-fn-list-l"},{default:o(()=>[_(g,{class:"_fd-fn-list-head",height:"40px"},{default:o(()=>[_(m,{type:"primary",size:"default"},{default:o(()=>[V(j(e.t("event.list")),1)]),_:1})]),_:1}),_(y,null,{default:o(()=>[_(b,{"default-active":e.defActive,modelValue:e.activeData,"onUpdate:modelValue":a[1]||(a[1]=t=>e.activeData=t)},{default:o(()=>[(i(!0),r(l,null,s(e.event,(t,l)=>(i(),n(v,{index:l},{default:o(()=>[M("div",{class:"_fd-fn-list-method",onClick:z(n=>e.edit(t),["stop"])},[M("span",null,[a[5]||(a[5]=V("function")),M("span",null,j(l),1)]),e.eventInfo[l]?(i(),r("span",Gh,j(e.eventInfo[l]),1)):F("",!0),t.fn?(i(),r("span",$h)):F("",!0)],8,Yh)]),_:2},1032,["index"]))),256))]),_:1},8,["default-active","modelValue"])]),_:1})]),_:1})]),_:1}),_(y,null,{default:o(()=>[_(x,{class:"_fd-fn-list-r"},{default:o(()=>[e.activeData?(i(),n(g,{key:0,class:"_fd-fn-list-head",height:"40px"},{default:o(()=>[_(p,{size:"small",onClick:e.close},{default:o(()=>[V(j(e.t("props.cancel")),1)]),_:1},8,["onClick"]),_(p,{size:"small",type:"primary",onClick:e.save,color:"#2f73ff"},{default:o(()=>[V(j(e.t("props.save")),1)]),_:1},8,["onClick"])]),_:1})):F("",!0),e.activeData?(i(),n(y,{key:1},{default:o(()=>[_(A,{ref:"fn",modelValue:e.eventStr,"onUpdate:modelValue":a[2]||(a[2]=t=>e.eventStr=t),name:e.activeData.item.name,args:e.activeData.item.args},null,8,["modelValue","name","args"])]),_:1})):F("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["title","modelValue"])])}]]),Qh=e({name:"DragBox",props:["rule","tag","formCreateInject","list"],render(e){const t={...e.$props.rule.props,...e.$attrs};let n="_fd-"+e.$props.tag+"-drag _fd-drag-box";Object.keys(e.$slots).length||(n+=" drag-holder"),t.class=n,t.modelValue=e.$props.list||[...e.$props.formCreateInject.children];const i={};return e.$slots.default&&e.$slots.default().forEach(e=>{e.key&&(i[e.key]=e)}),w(ql,t,{item:({element:t,index:n})=>{var o;const r=null==(o=null==t?void 0:t.__fc__)?void 0:o.key;if(r){let n=i["_"+t.slot];if(n?n.children.forEach(e=>{e.key===r+"fc"&&(n=e)}):n=i[r+"fc"],n)return w("div",{class:"_fc-"+e.$props.tag+"-item _fd-drag-item",key:r},n)}return w("div",{class:"_fc-"+e.$props.tag+"-item _fd-drag-item",key:n},null)}})}}),Kh=e({name:"FcTableView",props:{mini:Boolean,label:String,width:[Number,String],formCreateInject:Object,border:{type:Boolean,default:!0},borderWidth:String,borderColor:String,rule:{type:Object,default:()=>({row:1,col:1})}},inject:["designer"],components:{DragTool:bh,DragBox:Qh},watch:{rule:{handler(){this.initRule(),this.style=this.rule.style},immediate:!0}},data(){return{unique:{},style:{},selection:[],selectionPos:null,visible:!1,resize:{isResizing:!1,startX:0,startY:0,startWidth:0,startHeight:0},menuPos:{left:0,top:0},isSelecting:null,oldSelection:null,dragProp:{rule:{props:{tag:"el-col",group:{name:"default",put:(e,...t)=>(e.el.__rule__=this.formCreateInject.rule,this.designer.setupState.dragPut(e,...t))},ghostClass:"ghost",animation:150,handle:"._fd-drag-btn",emptyInsertThreshold:0,direction:"vertical",itemKey:"type"}},tag:"tableCell"},lattice:{},uni:{}}},computed:{t(){return this.designer.setupState.t},tableColor(){const e={};return!1===this.border?e.border="0 none":(this.borderColor&&(e.borderColor=this.borderColor),this.borderWidth&&(e.borderWidth=this.borderWidth)),e}},methods:{contextmenu(e){e.preventDefault(),e.stopPropagation(),this.selectionPos&&(this.menuPos={left:"".concat(e.clientX,"px"),top:"".concat(e.clientY,"px")},this.visible=!0)},rowResize(e,{pid:t,idx:n}){e.preventDefault(),e.stopPropagation();let i,o="".concat(this.lattice[t][n].startRow||t,":").concat(this.lattice[t][n].startCol||0);(!this.$refs["td_".concat(o)]||this.lattice[t][n].colspan>1||this.lattice[t][n].rowspan>1)&&(o="".concat(t,":").concat(n));const r=this.$refs["td_".concat(o)][0].parentElement,a=this.rule.style[o]||{},l=e=>{if(!this.resize.isResizing)return;const t=e.clientY-this.resize.startY,n=this.resize.startHeight+t;n>20&&(r.style.height="".concat(n,"px"),i=n)},s=()=>{!this.resize.isResizing||(this.resize.isResizing=!1,a.height="".concat(i,"px"),this.rule.style[o]=a,document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s))};this.resize.isResizing=!0,this.resize.startY=e.clientY,this.resize.startHeight=r.offsetHeight,a.height&&(r.style.height=a.height,delete a.height),document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)},colResize(e,{pid:t,idx:n}){e.preventDefault(),e.stopPropagation();let i,o="".concat(this.lattice[t][n].startRow||0,":").concat(this.lattice[t][n].startCol||n);(!this.$refs["td_".concat(o)]||this.lattice[t][n].colspan>1||this.lattice[t][n].rowspan>1)&&(o="".concat(t,":").concat(n));const r=this.$refs["td_".concat(o)][0],a=this.rule.style[o]||{},l=e=>{if(!this.resize.isResizing)return;const t=e.clientX-this.resize.startX,n=this.resize.startWidth+t;n>20&&(r.style.width="".concat(n,"px"),i=n)},s=()=>{!this.resize.isResizing||(this.resize.isResizing=!1,a.width="".concat(i,"px"),this.rule.style[o]=a,document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s))};this.resize.isResizing=!0,this.resize.startX=e.clientX,this.resize.startWidth=r.offsetWidth,document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)},mousedown(e,{pid:t,idx:n}){0===e.button&&!e.target.classList.contains("icon-move")&&!e.target.classList.contains("_fd-table-row-handle")&&!e.target.classList.contains("_fd-table-col-handle")&&(e.stopPropagation(),e.preventDefault(),this.visible?this.visible=!1:(this.isSelecting={pid:t,idx:n},this.updateSelection({pid:t,idx:n})))},mousemove(e,{pid:t,idx:n}){this.isSelecting&&(e.stopPropagation(),(!this.oldSelection||this.oldSelection.pid!==t||this.oldSelection.idx!==n)&&(this.updateSelection({pid:t,idx:n}),this.oldSelection={pid:t,idx:n}))},mouseup(){this.isSelecting=null},dblclick(e,{pid:t,idx:n}){let i=!1;if(this.formCreateInject.children.forEach(e=>{i=i||e&&e.slot==="".concat(t,":").concat(n)}),!i){const e=this.designer.setupState;e.dragMenu({menu:e.dragRuleList.text,children:this.formCreateInject.children,index:this.formCreateInject.children.length,slot:"".concat(t,":").concat(n)})}},updateSelection({pid:e,idx:t}){const n=this.selectionRect(this.isSelecting,{pid:e,idx:t}),{startRow:i,startCol:o,endRow:r,endCol:a}=this.getSelectionPos({startRow:n[0].pid,startCol:n[0].idx,endRow:n[n.length-1].pid,endCol:n[n.length-1].idx,selection:n});this.selectionPos={startRow:i,startCol:o,endRow:r,endCol:a},this.selection=this.selectionRect({pid:i,idx:o},{pid:r,idx:a},!0)},getSelectionPos(e){let{startRow:t,startCol:n,endRow:i,endCol:o}=e;return(e.selection||this.selectionRect({pid:t,idx:n},{pid:i,idx:o})).forEach(e=>{const r=this.lattice[e.pid][e.idx];if(r.show)r.rowspan>1&&(i=Math.max(i,e.pid+r.rowspan-1)),r.colspan>1&&(o=Math.max(o,e.idx+r.colspan-1));else{const e=this.lattice[r.startRow][r.startCol];t=Math.min(t,r.startRow),n=Math.min(n,r.startCol),i=Math.max(i,r.startRow+e.rowspan-1),o=Math.max(o,r.startCol+e.colspan-1)}}),e.startRow!==t||e.endRow!==i||e.startCol!==n||e.endCol!==o?this.getSelectionPos({startRow:t,startCol:n,endRow:i,endCol:o}):{startRow:t,startCol:n,endRow:i,endCol:o}},selectionRect(e,t,n){const i=e.pid,o=e.idx,r=t.pid,a=t.idx,l=Math.min(i,r),s=Math.max(i,r),c=Math.min(o,a),u=Math.max(o,a),d=[];for(let f=l;f<=s;f++)for(let e=c;e<=u;e++)d.push(n?"".concat(f,":").concat(e):{pid:f,idx:e});return d},clearSelection(){this.isSelecting=null,this.oldSelection=null,this.selection=[],this.selectionPos=null},getUnique(e){return this.unique[e]||(this.unique[e]=Wi()),this.unique[e]},getSlotChildren(e){const t=[];return this.formCreateInject.children.forEach(n=>{e.indexOf(n.slot)>-1&&t.push(n)}),t},dragAdd(e,t){const n=this.designer.setupState,i=this.formCreateInject.children,o="".concat(t.pid,":").concat(t.idx),r=e.item._underlying_vm_,a=n.addRule&&n.addRule.children===n.moveRule;a&&n.moveRule.splice(n.moveRule.indexOf(r),1);let l=0;const s="drag"+t.pid+t.idx;if(this.$refs[s][0].list.length){let t=this.$refs[s][0].list[e.newIndex?e.newIndex-1:0];l=i.indexOf(t)+(e.newIndex?1:0)}else if(i.length){const e=Object.keys(this.$refs);for(let t=e.indexOf(s)-1;t>=0;t--){if(!this.$refs[e[t]]||!this.$refs[e[t]].length)continue;const n=this.$refs[e[t]][0].list||[];if(n.length){l=i.indexOf(n[n.length-1])+1;break}}}e.newIndex=l,a?(r.slot=o,i.splice(e.newIndex,0,r),n.added=!0,n.handleSortAfter({rule:r})):n.dragAdd(i,e,"".concat(t.pid,":").concat(t.idx))},dragEnd(e,t){const n=this.designer.setupState,i=this.formCreateInject.children,o=e.item._underlying_vm_,r=i.indexOf(o);e.newIndex=r+(e.newIndex-e.oldIndex),e.oldIndex=r,n.dragEnd(this.formCreateInject.children,e,"".concat(t.pid,":").concat(t.idx))},dragStart(){this.designer.setupState.dragStart(this.formCreateInject.children)},dragUnchoose(e){this.designer.setupState.dragUnchoose(this.formCreateInject.children,e)},initRule(){const e=this.rule;e.style||(e.style={}),e.class||(e.class={}),e.layout||(e.layout=[]),e.row||(e.row=1),e.col||(e.col=1)},active(e){const t="".concat(e.pid,":").concat(e.idx);this.designer.setupState.customActive({name:"fcTableGrid",onPaste:e=>{e.slot=t,this.formCreateInject.children.push(e)},style:{formData:{style:this.rule.style[t]||{},class:this.rule.class[t]||""},change:(e,n)=>{n&&0!==Object.keys(n).length?this.rule[e][t]=n:delete this.rule[e][t]}}})},rmSlot(e,t){const n=Object.keys(e),i=this.formCreateInject.children;let o=0;[...i].forEach((r,a)=>{if(!r.slot)return;let l;t.indexOf(r.slot)>-1?(i.splice(a-o,1),o++):(l=n.indexOf(r.slot))>-1&&(r.slot=e[n[l]])}),t.forEach(e=>{delete this.style[e]}),this.loadRule()},makeMap(e){let t=[];for(let n=e.top;n<(e.row||e.top+1);n++)for(let i=e.left;i<(e.col||e.left+1);i++)t.push("".concat(n,":").concat(i));return t},rmSelectionContent(){this.rmSlot({},this.selection)},selectionStyle(){const e={...this.rule.style[this.selection[0]]||{}},t=this.selection.reduce((e,t)=>(e[t]={...this.rule.style[t]||{}},e),{});this.designer.setupState.customActive({name:"fcTableGrid",style:{formData:{style:e,class:this.rule.class[this.selection[0]]||""},change:(n,i)=>{this.selection.forEach(o=>{if(i&&0!==Object.keys(i).length)if("style"===n){const r={...t[o]};Object.keys(i).forEach(t=>{i[t]!==e[t]&&(r[t]=i[t])}),this.rule[n][o]=r}else this.rule[n][o]=i;else delete this.rule[n][o]})}}})},rmSelectionCol(){const e=this.selectionPos.endCol-this.selectionPos.startCol+1,t={};for(let i=0;i<this.rule.row;i++)for(let n=this.selectionPos.endCol+1;n<this.rule.col;n++)t["".concat(i,":").concat(n)]="".concat(i,":").concat(n-e);const n=this.filterSelectionLayout();n.forEach(t=>{t.left>this.selectionPos.startCol&&(t.left-=e)}),this.rule.layout=n,this.rule.col-e<=0?this.formCreateInject.children.splice(0,this.formCreateInject.children.length):this.rmSlot(t,this.selectionRect({pid:0,idx:this.selectionPos.startCol},{pid:this.rule.row,idx:this.selectionPos.endCol},!0)),this.rule.col=Math.max(1,this.rule.col-e),this.clearSelection()},rmSelectionRow(){const e=this.selectionPos.endRow-this.selectionPos.startRow+1,t={};for(let i=this.selectionPos.endRow+1;i<this.rule.row;i++)for(let n=0;n<this.rule.col;n++)t["".concat(i,":").concat(n)]="".concat(i-e,":").concat(n);const n=this.filterSelectionLayout();n.forEach(t=>{t.top>this.selectionPos.startRow&&(t.top-=e)}),this.rule.layout=n,this.rule.row-e<=0?this.formCreateInject.children.splice(0,this.formCreateInject.children.length):this.rmSlot(t,this.selectionRect({pid:this.selectionPos.startRow,idx:0},{pid:this.selectionPos.endRow,idx:this.rule.col},!0)),this.rule.row=Math.max(1,this.rule.row-e),this.clearSelection()},filterSelectionLayout(){return(this.rule.layout||[]).filter(e=>e.top<this.selectionPos.startRow||e.top>this.selectionPos.endRow||e.left<this.selectionPos.startCol||e.left>this.selectionPos.endCol)},mergeSelection(e){const t=this.filterSelectionLayout();if(!e){t.push({top:this.selectionPos.startRow,left:this.selectionPos.startCol,row:this.selectionPos.endRow-this.selectionPos.startRow+1,col:this.selectionPos.endCol-this.selectionPos.startCol+1});const e={};for(let t=this.selectionPos.startRow;t<=this.selectionPos.endRow;t++)for(let n=this.selectionPos.startCol;n<=this.selectionPos.endCol;n++)e["".concat(t,":").concat(n)]="".concat(this.selectionPos.startRow,":").concat(this.selectionPos.startCol);this.rmSlot(e,[])}this.rule.layout=t,this.loadRule()},addCol(e,t){if(this.clearSelection(),this.rule.col++,this.rule.layout.forEach(n=>{n.left>(t?e.idx-1:e.idx)&&n.left++}),t||e.idx<this.rule.col-2){const n={};for(let o=0;o<this.rule.row;o++)for(let i=t?e.idx-1:e.idx+1;i<this.rule.col-1;i++)n["".concat(o,":").concat(i)]="".concat(o,":").concat(i+1);const i=Object.keys(n);this.formCreateInject.children.forEach(e=>{let t;e.slot&&(t=i.indexOf(e.slot))>-1&&(e.slot=n[i[t]])}),i.forEach(e=>{this.style[e]&&(this.style[n[e]]=this.style[e],delete this.style[e])})}this.loadRule()},addRow(e,t){if(this.clearSelection(),this.rule.row++,this.rule.layout.forEach(n=>{n.top>(t?e.pid-1:e.pid)&&n.top++}),t||e.pid<this.rule.row-2){const n={};for(let o=t?e.pid-1:e.pid+1;o<this.rule.row;o++)for(let e=0;e<this.rule.col;e++)n["".concat(o,":").concat(e)]="".concat(o+1,":").concat(e);const i=Object.keys(n);this.formCreateInject.children.forEach(e=>{let t;e.slot&&(t=i.indexOf(e.slot))>-1&&(e.slot=n[i[t]])}),i.reverse().forEach(e=>{this.style[e]&&(this.style[n[e]]=this.style[e],delete this.style[e])})}this.loadRule()},loadRule(){const e=[],t=this.rule||{row:1,col:1};for(let i=0;i<t.row;i++){const n=[];e.push(n);for(let e=0;e<t.col;e++)n.push({rowspan:1,colspan:1,slot:[],show:!0,id:this.getUnique("".concat(i).concat(e))})}[...t.layout||[]].forEach((n,i)=>{if((!n.row||n.row<=0)&&(!n.col||n.col<=0)||!e[n.top]||!e[n.top][n.left]||!e[n.top][n.left].show)return void t.layout.splice(i,1);const o=e[n.top][n.left];o.layout=n;let r=1,a=1;if(n.col&&(r=n.col+n.left>t.col?t.col-n.left:n.col,o.colspan=r),n.row&&(a=n.row+n.top>t.row?t.row-n.top:n.row,o.rowspan=a),a&&r)for(let t=0;t<a;t++){const i=e[n.top+t];if(i)for(let e=0;e<r;e++)!e&&!t||(i[n.left+e]&&(i[n.left+e].show=!1,i[n.left+e].startRow=n.top,i[n.left+e].startCol=n.left),o.slot.push("".concat(n.top+t,":").concat(n.left+e)))}});const n=e=>!(e&&!e.layout&&e.show);e.forEach((t,i)=>{t.forEach((o,r)=>{let a=!1,l=!1;if(o.layout){const t=o.layout.col||1,s=o.layout.row||1;for(let o=0;o<t;o++)if(!e[i+s]||n(e[i+s][r+o])){l=!0;continue}for(let o=0;o<s;o++)if(!e[i+o]||n(e[i+o][r+t])){a=!0;continue}}else a=n(t[r+1]),l=!e[i+1]||n(e[i+1][r]);o.right=a,o.bottom=l})}),this.lattice=e,this.formCreateInject.rule.props.rule=t},hideMenu(){this.visible=!1}},beforeMount(){this.loadRule()},mounted(){document.addEventListener("click",this.hideMenu,!0)},beforeUnmount(){document.removeEventListener("click",this.hideMenu,!0)}}),Xh=["onContextmenu","onMousedown","onMousemove","onDblclick"],Jh=["onMousedown"],Zh=["onMousedown"],em=["onClick"],tm=["onClick"];const nm=ls(Kh,[["render",function(e,n,u,d,f,p){const h=t("DragBox"),m=t("DragTool");return i(),r("div",{class:P(["_fd-table-view",{"is-mini":e.mini}])},[M("table",{border:"1",cellspacing:"0",cellpadding:"0",style:H(e.tableColor),onMouseleave:n[2]||(n[2]=(...t)=>e.mouseup&&e.mouseup(...t)),onMouseup:n[3]||(n[3]=(...t)=>e.mouseup&&e.mouseup(...t))},[(i(!0),r(l,null,s(e.rule.row,(t,u)=>(i(),r("tr",{key:u},[(i(!0),r(l,null,s(e.rule.col,(t,s)=>(i(),r(l,null,[e.lattice[u][s].show?(i(),r("td",c({key:"".concat(u).concat(s),ref_for:!0,ref:"td_".concat(u,":").concat(s),class:"_fd-table-view-cell"},{ref_for:!0},e.lattice[u][s]?{colspan:e.lattice[u][s].colspan,rowspan:e.lattice[u][s].rowspan}:{},{style:[e.tableColor,e.style&&e.style["".concat(u,":").concat(s)]||{}],class:[e.rule.class&&e.rule.class["".concat(u,":").concat(s)]||"",{selected:e.selection.indexOf("".concat(u,":").concat(s))>-1}],onContextmenu:t=>e.contextmenu(t,{pid:u,idx:s}),onMousedown:t=>e.mousedown(t,{pid:u,idx:s}),onMousemove:t=>e.mousemove(t,{pid:u,idx:s}),onDblclick:t=>e.dblclick(t,{pid:u,idx:s})}),[u!==e.rule.row-1?(i(),r("div",{key:0,class:"_fd-table-row-handle",onMousedown:t=>e.rowResize(t,{pid:u,idx:s})},null,40,Jh)):F("",!0),s!==e.rule.col-1?(i(),r("div",{key:1,class:"_fd-table-col-handle",onMousedown:t=>e.colResize(t,{pid:u,idx:s})},null,40,Zh)):F("",!0),_(m,{"drag-btn":!1,"handle-btn":!0,onActive:t=>e.active({pid:u,idx:s}),unique:e.lattice[u][s].id},{handle:o(()=>[M("div",{class:"_fd-drag-btn _fd-table-view-btn",onClick:z(t=>e.addRow({pid:u,idx:s,data:e.lattice[u][s]},0),["stop"])},n[14]||(n[14]=[M("i",{class:"fc-icon icon-add-col"},null,-1)]),8,em),M("div",{class:"_fd-drag-btn _fd-table-view-btn",onClick:z(t=>e.addCol({pid:u,idx:s,data:e.lattice[u][s]},0),["stop"])},n[15]||(n[15]=[M("i",{class:"fc-icon icon-add-col",style:{transform:"rotate(90deg)"}},null,-1)]),8,tm)]),default:o(()=>[_(h,c({ref_for:!0},e.dragProp,{onAdd:t=>e.dragAdd(t,{pid:u,idx:s}),ref_for:!0,ref:"drag"+u+s,onEnd:t=>e.dragEnd(t,{pid:u,idx:s}),onStart:n[0]||(n[0]=t=>e.dragStart(t)),onUnchoose:n[1]||(n[1]=t=>e.dragUnchoose(t)),list:e.getSlotChildren(["".concat(u,":").concat(s),...e.lattice[u][s].slot])}),{default:o(()=>[a(e.$slots,"".concat(u,":").concat(s))]),_:2},1040,["onAdd","onEnd","list"])]),_:2},1032,["onActive","unique"])],16,Xh)):F("",!0)],64))),256))]))),128))],36),e.visible?(i(),r("div",{key:0,class:"_fd-table-context-menu",style:H(e.menuPos)},[M("div",{class:"_fd-table-context-menuitem",onClick:n[4]||(n[4]=z((...t)=>e.selectionStyle&&e.selectionStyle(...t),["stop"]))},j(e.t("props.style")),1),M("div",{class:"_fd-table-context-menuitem",onClick:n[5]||(n[5]=z((...t)=>e.rmSelectionContent&&e.rmSelectionContent(...t),["stop"]))},j(e.t("props.clear")),1),n[16]||(n[16]=M("div",{class:"_fd-table-context-menu-separator"},null,-1)),M("div",{class:"_fd-table-context-menuitem",onClick:n[6]||(n[6]=z(t=>e.mergeSelection(!1),["stop"]))},j(e.t("tableOptions.batchMerge")),1),M("div",{class:"_fd-table-context-menuitem",onClick:n[7]||(n[7]=z(t=>e.mergeSelection(!0),["stop"]))},j(e.t("tableOptions.batchSplit")),1),M("div",{class:"_fd-table-context-menuitem",onClick:n[8]||(n[8]=z(t=>e.addCol({pid:e.selectionPos.startRow,idx:e.selectionPos.startCol},1),["stop"]))},j(e.t("tableOptions.addLeft")),1),M("div",{class:"_fd-table-context-menuitem",onClick:n[9]||(n[9]=z(t=>e.addCol({pid:e.selectionPos.startRow,idx:e.selectionPos.endCol},0),["stop"]))},j(e.t("tableOptions.addRight")),1),M("div",{class:"_fd-table-context-menuitem",onClick:n[10]||(n[10]=z(t=>e.addRow({pid:e.selectionPos.startRow,idx:e.selectionPos.startCol},1),["stop"]))},j(e.t("tableOptions.addTop")),1),M("div",{class:"_fd-table-context-menuitem",onClick:n[11]||(n[11]=z(t=>e.addRow({pid:e.selectionPos.startRow,idx:e.selectionPos.endCol},0),["stop"]))},j(e.t("tableOptions.addBottom")),1),n[17]||(n[17]=M("div",{class:"_fd-table-context-menu-separator"},null,-1)),M("div",{class:"_fd-table-context-menuitem",onClick:n[12]||(n[12]=z((...t)=>e.rmSelectionRow&&e.rmSelectionRow(...t),["stop"]))},j(e.t("tableOptions.batchRmRow")),1),M("div",{class:"_fd-table-context-menuitem",onClick:n[13]||(n[13]=z((...t)=>e.rmSelectionCol&&e.rmSelectionCol(...t),["stop"]))},j(e.t("tableOptions.batchRmCol")),1)],4)):F("",!0)],2)}]]),im={name:"FcTable",props:{mini:Boolean,label:String,width:[Number,String],border:{type:Boolean,default:!0},borderWidth:String,borderColor:String,rule:{type:Object,default:()=>({row:1,col:1})}},watch:{rule:{handler(){this.initRule(),this.loadRule(),this.tdStyle=this.rule.style||{},this.tdClass=this.rule.class||{}},immediate:!0,deep:!0}},data:()=>({tdStyle:{},tdClass:{},lattice:{}}),computed:{tableColor(){const e={};return!1===this.border?e.border="0 none":(this.borderColor&&(e.borderColor=this.borderColor),this.borderWidth&&(e.borderWidth=this.borderWidth)),e}},methods:{initRule(){const e=this.rule;e.style||(e.style={}),e.layout||(e.layout=[]),e.row||(e.row=1),e.col||(e.col=1)},loadRule(){const e=[],t=this.rule||{row:1,col:1};for(let i=0;i<t.row;i++){const n=[];e.push(n);for(let e=0;e<t.col;e++)n.push({rowspan:1,colspan:1,slot:[],show:!0})}[...t.layout||[]].forEach((n,i)=>{if((!n.row||n.row<=0)&&(!n.col||n.col<=0)||!e[n.top]||!e[n.top][n.left]||!e[n.top][n.left].show)return void t.layout.splice(i,1);const o=e[n.top][n.left];o.layout=n;let r=1,a=1;if(n.col&&(r=n.col+n.left>t.col?t.col-n.left:n.col,o.colspan=r),n.row&&(a=n.row+n.top>t.row?t.row-n.top:n.row,o.rowspan=a),a&&r)for(let t=0;t<a;t++){const i=e[n.top+t];if(i)for(let e=0;e<r;e++)!e&&!t||(i[n.left+e]&&(i[n.left+e].show=!1),o.slot.push("".concat(n.top+t,":").concat(n.left+e)))}});const n=e=>!(e&&!e.layout&&e.show);e.forEach((t,i)=>{t.forEach((o,r)=>{let a=!1,l=!1;if(o.layout){const t=o.layout.col||1,s=o.layout.row||1;for(let o=0;o<t;o++)if(!e[i+s]||n(e[i+s][r+o])){l=!0;continue}for(let o=0;o<s;o++)if(!e[i+o]||n(e[i+o][r+t])){a=!0;continue}}else a=n(t[r+1]),l=!e[i+1]||n(e[i+1][r]);o.right=a,o.bottom=l})}),this.lattice=e}}};const om=ls(im,[["render",function(e,u,d,f,p,h){const m=t("el-col");return i(),n(m,{span:24},{default:o(()=>[M("div",{class:P(["_fc-table",{"is-mini":d.mini}])},[M("table",{border:"1",cellspacing:"0",cellpadding:"0",style:H(h.tableColor)},[(i(!0),r(l,null,s(d.rule.row,(t,n)=>(i(),r("tr",{key:n},[(i(!0),r(l,null,s(d.rule.col,(t,o)=>(i(),r(l,{key:"".concat(n).concat(o)},[p.lattice[n][o].show?(i(),r("td",c({key:0,ref_for:!0},p.lattice[n][o]?{colspan:p.lattice[n][o].colspan,rowspan:p.lattice[n][o].rowspan}:{},{valign:"top",class:p.tdClass&&p.tdClass["".concat(n,":").concat(o)]||"",style:[h.tableColor,p.tdStyle&&p.tdStyle["".concat(n,":").concat(o)]||{}]}),[a(e.$slots,"".concat(n,":").concat(o)),(i(!0),r(l,null,s(p.lattice[n][o].slot,t=>a(e.$slots,"".concat(t))),256))],16)):F("",!0)],64))),128))]))),128))],4)],2)]),_:3})}]]),rm=e({name:"LanguageInput",inject:["designer"],emits:["update:modelValue","blur","change"],props:{size:String,placeholder:String,modelValue:String,disabled:Boolean},computed:{isVar(){return!!(this.modelValue||"").match(/^\{\{\s*\$t\.(.+)\s*\}\}$/)},t(){return this.designer.setupState.t},localeList(){var e,t;const n=this.designer.setupState.getConfig("localeOptions",[{value:"zh-cn",label:"简体中文"},{value:"en",label:"English"}]),i=[],o=(null==(t=null==(e=this.designer.props)?void 0:e.locale)?void 0:t.name)||"zh-cn";return n.forEach(e=>{e.value===o?i.unshift(e):i.length<2&&i.push(e)}),i.length>2&&i.pop(),i},showLanguage(){return this.designer.setupState.getConfig("showLanguage")},language(){const e=this.designer.setupState.formOptions.language||{},t={};return Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(i=>{t[i]||(t[i]={key:i}),t[i][n]=e[n][i]})}),Object.values(t)}},methods:{openConfig(){this.designer.setupState.activeModule="language"},clickLang(e){this.onInput("{{$t.".concat(e,"}}")),this.$refs.pop.hide()},onInput(e){this.$emit("update:modelValue",e),this.$emit("change",e)}},mounted(){}}),am={class:"_fd-language-list"},lm={class:"_fd-language-header"},sm={class:"_fd-language-title"},cm={class:"_fd-language-name"},um=["onClick"];const dm=ls(rm,[["render",function(e,a,c,u,d,f){const p=t("el-popover"),h=t("el-input");return i(),n(h,{class:P(["_fd-language-input",{"is-variable":e.isVar}]),placeholder:e.placeholder,disabled:e.disabled,modelValue:e.modelValue,"onUpdate:modelValue":e.onInput,onBlur:a[1]||(a[1]=t=>e.$emit("blur")),size:e.size||"small"},U({_:2},[!1!==e.showLanguage?{name:"append",fn:o(()=>[_(p,{placement:"bottom-end",width:300,"hide-after":0,trigger:"click",ref:"pop","popper-class":"_fd-language-popover"},{reference:o(()=>a[2]||(a[2]=[M("i",{class:"fc-icon icon-language"},null,-1)])),default:o(()=>[M("div",am,[M("div",lm,[M("div",sm,[V(j(e.t("language.select")),1),M("i",{class:"fc-icon icon-setting",onClick:a[0]||(a[0]=(...t)=>e.openConfig&&e.openConfig(...t))})]),M("div",cm,[(i(!0),r(l,null,s(e.localeList,e=>(i(),r("div",{key:e.value},j(e.label),1))),128))])]),(i(!0),r(l,null,s(e.language,t=>(i(),r("div",{key:t.key,class:"_fd-language-item",onClick:n=>e.clickLang(t.key)},[(i(!0),r(l,null,s(e.localeList,e=>(i(),r("div",{key:e.value},j(t[e.value]||"-"),1))),128))],8,um))),128))])]),_:1},512)]),key:"0"}:void 0]),1032,["class","placeholder","disabled","modelValue","onUpdate:modelValue","size"])}]]),fm=e({name:"Validate",inject:["designer"],emits:["update:modelValue"],props:{modelValue:Array},components:{LanguageInput:dm,FnInput:Eh},watch:{modelValue(e){this.validate=this.parseValue(e||[])}},data(){return{validate:this.parseValue(this.modelValue||[])}},computed:{t(){return this.designer.setupState.t},modes(){const e=this.designer.setupState.activeRule;return e&&"object"===e._menu.subForm?{validator:this.t("validate.modes.validator")}:{len:this.t("validate.modes.len"),maxLen:this.t("validate.modes.maxLen"),minLen:this.t("validate.modes.minLen"),pattern:this.t("validate.modes.pattern"),uppercase:this.t("validate.modes.uppercase"),lowercase:this.t("validate.modes.lowercase"),email:this.t("validate.modes.email"),url:this.t("validate.modes.url"),ip:this.t("validate.modes.ip"),phone:this.t("validate.modes.phone"),min:this.t("validate.modes.min"),max:this.t("validate.modes.max"),positive:this.t("validate.modes.positive"),negative:this.t("validate.modes.negative"),integer:this.t("validate.modes.integer"),number:this.t("validate.modes.number"),validator:this.t("validate.modes.validator")}},triggers(){return Ti(this.t,[{label:"blur",value:"blur"},{label:"change",value:"change"},{label:"submit",value:"submit"}])}},methods:{handleCommand(e){const t={mode:e,trigger:"blur",adapter:!0};["uppercase","lowercase","email","url","ip","phone","positive","negative","integer","number"].includes(e)?t[e]=!0:["min","max","len","minLen","maxLen"].includes(e)?t[e]=0:"pattern"===e&&(t[e]=""),this.validate.push(t)},autoMessage(e){const t=this.designer.setupState.activeRule.title;this.designer.setupState.activeRule&&(e.message=this.t("validate.autoRequired",{title:t}),this.onInput())},getSpan:e=>["pattern","validator","required","uppercase","lowercase","email","url","ip","phone","positive","negative","integer","number"].indexOf(e.mode)>-1?24:12,onInput:function(){this.$emit("update:modelValue",this.validate.map(e=>((e={...e}).message||delete e.message,e)))},remove(e){this.validate.splice(e,1),this.onInput()},parseValue:e=>oi(e.map(e=>(e.validator&&(e.mode="validator"),e.mode||Object.keys(e).forEach(t=>{["message","type","trigger","mode"].indexOf(t)<0&&(e.mode=t)}),e)))}}),pm={class:"_fd-validate"},hm={class:"_fd-validate-item"},mm={class:"_fd-validate-title"},gm=["onClick"];const vm=ls(fm,[["render",function(e,a,c,u,d,f){const p=t("el-option"),h=t("el-select"),m=t("el-form-item"),g=t("el-col"),v=t("elInput"),b=t("FnInput"),y=t("el-input-number"),x=t("LanguageInput"),w=t("el-row"),A=t("el-button"),k=t("el-dropdown-item"),C=t("el-dropdown-menu"),S=t("el-dropdown");return i(),r("div",pm,[(i(!0),r(l,null,s(e.validate,(t,a)=>(i(),r("div",hm,[M("div",mm,[M("div",null,[M("span",null,j(a+1),1),V(" "+j(e.modes[t.mode]),1)]),M("i",{class:"fc-icon icon-delete-circle",onClick:t=>e.remove(a)},null,8,gm)]),_(w,null,{default:o(()=>[_(g,{span:e.getSpan(t)},{default:o(()=>[_(m,{label:e.t("validate.mode")},{default:o(()=>[_(h,{modelValue:t.trigger,"onUpdate:modelValue":e=>t.trigger=e,onChange:e.onInput},{default:o(()=>[(i(!0),r(l,null,s(e.triggers,e=>(i(),n(p,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["label"])]),_:2},1032,["span"]),-1===["required","uppercase","lowercase","email","url","ip","phone","positive","negative","integer","number"].indexOf(t.mode)?(i(),n(g,{key:0,span:e.getSpan(t)},{default:o(()=>[_(m,{label:e.modes[t.mode]},{default:o(()=>["pattern"===t.mode?(i(),n(v,{key:0,modelValue:t[t.mode],"onUpdate:modelValue":e=>t[t.mode]=e,onChange:e.onInput},null,8,["modelValue","onUpdate:modelValue","onChange"])):"validator"===t.mode?(i(),n(b,{key:1,modelValue:t[t.mode],"onUpdate:modelValue":e=>t[t.mode]=e,name:"validator",args:t.adapter?["value","callback"]:["rule","value","callback"],onChange:e.onInput},{default:o(()=>[V(j(e.t("validate.modes.validator")),1)]),_:2},1032,["modelValue","onUpdate:modelValue","args","onChange"])):(i(),n(y,{key:2,modelValue:t[t.mode],"onUpdate:modelValue":e=>t[t.mode]=e,onChange:e.onInput},null,8,["modelValue","onUpdate:modelValue","onChange"]))]),_:2},1032,["label"])]),_:2},1032,["span"])):F("",!0),_(g,{span:24},{default:o(()=>[_(m,{label:e.t("validate.message")},{default:o(()=>[_(x,{modelValue:t.message,"onUpdate:modelValue":e=>t.message=e,placeholder:e.t("validate.requiredPlaceholder"),onChange:e.onInput},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"])]),_:2},1032,["label"])]),_:2},1024)]),_:2},1024)]))),256)),_(S,{trigger:"click",size:"default","popper-class":"_fd-validate-pop",onCommand:e.handleCommand},{dropdown:o(()=>[_(C,null,{default:o(()=>[(i(!0),r(l,null,s(e.modes,(e,t)=>(i(),n(k,{command:t,key:t},{default:o(()=>[M("div",null,j(e),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:o(()=>[_(A,{class:"_fd-validate-btn",plain:"",size:"small"},{default:o(()=>[V(j(e.t("validate.rule"))+" + ",1)]),_:1})]),_:1},8,["onCommand"])])}]]),_m=e({name:"Required",components:{LanguageInput:dm},emits:["update:modelValue"],props:{modelValue:{}},inject:["designer"],watch:{required(){this.update()},requiredMsg(){this.update()},modelValue(e){const t=ei.String(e);this.required=void 0!==e&&(!!t||!!e),this.requiredMsg=t?e:""}},computed:{t(){return this.designer.setupState.t}},data(){const e=ei.String(this.modelValue);return{required:void 0!==this.modelValue&&(!!e||!!this.modelValue),requiredMsg:e?this.modelValue:""}},methods:{update(){let e;e=!1!==this.required&&(this.requiredMsg||!0),this.$emit("update:modelValue",e)}}}),bm={class:"_fd-required"};const ym=ls(_m,[["render",function(e,o,a,l,s,c){const u=t("el-switch"),d=t("LanguageInput");return i(),r("div",bm,[_(u,{modelValue:e.required,"onUpdate:modelValue":o[0]||(o[0]=t=>e.required=t)},null,8,["modelValue"]),e.required?(i(),n(d,{key:0,modelValue:e.requiredMsg,"onUpdate:modelValue":o[1]||(o[1]=t=>e.requiredMsg=t),placeholder:e.t("validate.requiredPlaceholder")},null,8,["modelValue","placeholder"])):F("",!0)])}]]);const xm=ls(e({name:"ValueInput",emits:["update:modelValue","change","change-type","blur"],inject:["designer"],props:{modelValue:[String,Number,Boolean],disabled:Boolean},data:()=>({type:"1",value:""}),computed:{t(){return this.designer.setupState.t}},watch:{modelValue:{handler:function(e){this.type="number"==typeof e?"2":"boolean"==typeof e?"3":"1",this.value=null==e?"":""+e},immediate:!0},type(){this.updateValue(this.value),this.$emit("change-type",this.type)}},methods:{onBlur(...e){this.value!==this.toValue(this.modelValue)&&this.updateValue(this.value),this.$emit("blur",...e)},updateValue(e){const t=this.toValue(e);this.$emit("update:modelValue",t),this.$emit("change",t)},toValue(e){return"1"===this.type?""+e:"2"===this.type?parseFloat(e)||0:"true"===e}}}),[["render",function(e,r,l,s,u,d){const f=t("el-option"),p=t("el-select"),h=t("el-input");return i(),n(h,c({class:"_fd-value-input",disabled:e.disabled,modelValue:e.value,"onUpdate:modelValue":r[1]||(r[1]=t=>e.value=t),onBlur:e.onBlur},e.$attrs),U({prepend:o(()=>[_(p,{modelValue:e.type,"onUpdate:modelValue":r[0]||(r[0]=t=>e.type=t),style:{width:"60px"},disabled:e.disabled},{default:o(()=>[_(f,{label:e.t("validate.types.string"),value:"1"},null,8,["label"]),_(f,{label:e.t("validate.types.number"),value:"2"},null,8,["label"]),_(f,{label:e.t("validate.types.boolean"),value:"3"},null,8,["label"])]),_:1},8,["modelValue","disabled"])]),_:2},[e.$slots.append?{name:"append",fn:o(()=>[a(e.$slots,"append")]),key:"0"}:void 0]),1040,["disabled","modelValue","onBlur"])}]]),wm=e({name:"TableOptions",emits:["update:modelValue","change"],components:{ValueInput:xm},props:{modelValue:[Array,Object],column:{type:Array,default:()=>[{label:"label",key:"label"},{label:"value",key:"value"}]},valueType:String,max:Number,size:String,disabled:Boolean},inject:["designer"],watch:{modelValue(){this.value=this.tidyModelValue()}},computed:{t(){return this.designer.setupState.t}},data(){return{value:this.tidyModelValue()}},methods:{tidyModelValue(){const e=this.modelValue;return"string"===this.valueType?(e||[]).map(e=>({value:""+e})):"object"===this.valueType?Object.keys(e||{}).map(t=>({label:t,value:e[t]})):[...e||[]].map(e=>mi(e))},tidyValue(){if("object"===this.valueType){const e={};return this.value.forEach(t=>{t.label&&t.value&&(e[t.label]=t.value)}),e}return this.value.map(e=>"string"===this.valueType?e.value:{...e})},onInput(e){1===this.column.length&&""===e[this.column[0].key]||this.column.every(t=>!1===t.required||(["object","string"].indexOf(this.valueType)>-1?void 0!==e[t.key]&&""!==e[t.key]&&null!==e[t.key]:void 0!==e[t.key]))&&this.input()},input(){const e=this.tidyValue();this.$emit("update:modelValue",e),this.$emit("change",e)},add(){this.value.push(this.column.reduce((e,t)=>(e[t.key]="",e),{}))},del(e){this.value.splice(e,1),this.input()}}}),Am={class:"_td-table-opt"},km=["onClick"],Cm={class:"_td-table-opt-handle"};const Sm=ls(wm,[["render",function(e,a,c,u,d,f){const p=t("ValueInput"),h=t("el-input"),m=t("el-table-column"),g=t("el-table"),v=t("el-button");return i(),r("div",Am,[_(g,{data:e.value,border:"",size:e.size||"small",style:{width:"100%"}},{default:o(()=>[(i(!0),r(l,null,s(e.column,(t,r)=>(i(),n(m,{key:t.label+r,label:t.label},{default:o(o=>[t.value?(i(),n(p,{key:0,size:e.size||"small",modelValue:o.row[t.key],disabled:e.disabled,"onUpdate:modelValue":e=>o.row[t.key]=e,onBlur:t=>e.onInput(o.row),onChangeType:t=>e.onInput(o.row)},null,8,["size","modelValue","disabled","onUpdate:modelValue","onBlur","onChangeType"])):(i(),n(h,{key:1,size:e.size||"small",disabled:e.disabled,modelValue:o.row[t.key]||"","onUpdate:modelValue":e=>o.row[t.key]=e,onBlur:t=>e.onInput(o.row)},null,8,["size","disabled","modelValue","onUpdate:modelValue","onBlur"]))]),_:2},1032,["label"]))),128)),e.disabled?F("",!0):(i(),n(m,{key:0,width:"45",align:"center",fixed:"right"},{default:o(t=>[M("i",{class:"fc-icon icon-delete",onClick:n=>e.del(t.$index)},null,8,km)]),_:1}))]),_:1},8,["data","size"]),M("div",Cm,[!e.max||e.max>e.value.length?(i(),n(v,{key:0,link:"",type:"primary",onClick:e.add},{default:o(()=>[a[0]||(a[0]=M("i",{class:"fc-icon icon-add"},null,-1)),V(" "+j(e.t("tableOptions.add")),1)]),_:1,__:[0]},8,["onClick"])):F("",!0)])])}],["__scopeId","data-v-91131f26"]]),Em=e({name:"TreeOptions",emits:["update:modelValue"],components:{ValueInput:xm},props:{modelValue:Array,columns:Object,disabled:Boolean},inject:["designer"],data(){return{value:[...oi(this.modelValue||[])]}},computed:{t(){return this.designer.setupState.t},overColumns(){return this.columns?{label:this.columns.label||"label",value:this.columns.value||"value"}:{label:"label",value:"value"}}},created(){this.value.length||(this.value=[{}])},methods:{tidyValue(){return oi(this.value)},change(){this.$emit("update:modelValue",this.tidyValue())},add(e){const t=e.parent;(t.data.children||t.data).push({})},append(e){e.children||(e.children=[]),e.children.push({})},remove(e,t){const n=e.parent;n.data.children?(n.data.children.splice(n.data.children.indexOf(t),1),n.data.children.length||delete n.data.children):n.data.splice(n.data.indexOf(t),1),this.change()}}}),Tm={class:"_fd-tree-opt"},Rm={class:"_fd-tree-opt-node"},Om=["onClick"],Mm=["onClick"],Dm=["onClick"];const Nm=ls(Em,[["render",function(e,n,a,l,s,c){const u=t("el-input"),d=t("ValueInput"),f=t("el-tree");return i(),r("div",Tm,[_(f,{data:e.value,"node-key":"index","expand-on-click-node":!1},{default:o(({node:t,data:i})=>[M("div",Rm,[_(u,{class:"_fd-tree-opt-first",modelValue:i[e.overColumns.label],"onUpdate:modelValue":t=>i[e.overColumns.label]=t,disabled:e.disabled,onBlur:e.change},null,8,["modelValue","onUpdate:modelValue","disabled","onBlur"]),_(d,{class:"_fd-tree-opt-last",modelValue:i[e.overColumns.value],"onUpdate:modelValue":t=>i[e.overColumns.value]=t,onBlur:e.change,disabled:e.disabled,onChangeType:e.change},U({_:2},[e.disabled?void 0:{name:"append",fn:o(()=>[M("div",{class:"_fd-tree-opt-btn",onClick:n=>e.add(t,i)},n[0]||(n[0]=[M("i",{class:"fc-icon icon-add"},null,-1)]),8,Om),M("div",{class:"_fd-tree-opt-btn",onClick:t=>e.append(i)},n[1]||(n[1]=[M("i",{class:"fc-icon icon-add-child"},null,-1)]),8,Mm),M("div",{class:"_fd-tree-opt-btn _fd-tree-opt-danger",onClick:n=>e.remove(t,i)},n[2]||(n[2]=[M("i",{class:"fc-icon icon-delete"},null,-1)]),8,Dm)]),key:"0"}]),1032,["modelValue","onUpdate:modelValue","onBlur","disabled","onChangeType"])])]),_:1},8,["data"])])}]]),Im=e({name:"TableFormView",data:()=>({})}),Lm={class:"_fd-table-form"},Fm={key:0,class:"_fd-tf-wrap"},Pm={key:1,class:"_fc-child-empty"};const Bm=ls(Im,[["render",function(e,t,n,o,l,s){return i(),r("div",Lm,[e.$slots.default?(i(),r("div",Fm,[a(e.$slots,"default")])):(i(),r("div",Pm))])}]]),jm={name:"TableForm",emits:["change","add","delete","update:modelValue"],props:{formCreateInject:Object,modelValue:{type:Array,default:()=>[]},columns:{type:Array,required:!0,default:()=>[]},filterEmptyColumn:{type:Boolean,default:!0},deletable:{type:Boolean,default:!0},addable:{type:Boolean,default:!0},options:{type:Object,default:()=>p({submitBtn:!1,resetBtn:!1})},max:Number,min:Number,disabled:Boolean},watch:{modelValue:{handler(){this.updateTable()},deep:!0},"formCreateInject.preview":function(e){this.emptyRule.children[0].props.colspan=this.columns.length+(e?1:2)}},data(){return{rule:[],trs:[],fapi:{},Form:g(this.formCreateInject.form.$form()),copyTrs:"",oldValue:"",emptyRule:{type:"tr",_isEmpty:!0,native:!0,subRule:!0,children:[{type:"td",style:{textAlign:"center"},native:!0,subRule:!0,props:{colspan:this.columns.length+(this.formCreateInject.preview?1:2)},children:[this.formCreateInject.t("dataEmpty")||"暂无数据"]}]}}},methods:{formChange(){this.updateValue()},updateValue(){const e=this.trs.map((e,t)=>({...this.modelValue[t]||{},...this.fapi.getChildrenFormData(e)})).filter(e=>{if(!this.filterEmptyColumn)return!0;if(null==e)return!1;let t=!1;return Object.keys(e).forEach(n=>{t=t||void 0!==e[n]&&""!==e[n]&&null!==e[n]}),t}),t=JSON.stringify(e);t!==this.oldValue&&(this.oldValue=t,this.$emit("update:modelValue",e),this.$emit("change",e))},setRawData(e,t){const n=this.trs[e];this.fapi.setChildrenFormData(n,t,!0)},updateTable(){const e=JSON.stringify(this.modelValue);this.oldValue!==e&&(this.oldValue=e,this.trs=this.trs.splice(0,this.modelValue.length),this.modelValue.length?this.clearEmpty():this.addEmpty(),this.modelValue.forEach((e,t)=>{this.trs[t]||this.addRaw(),this.setRawData(t,e||{})}),this.rule[0].children[1].children=this.trs)},addEmpty(){this.trs.length&&this.trs.splice(0,this.trs.length),this.trs.push(this.emptyRule)},clearEmpty(){this.trs[0]&&this.trs[0]._isEmpty&&this.trs.splice(0,1)},delRaw(e){this.disabled||!this.deletable||this.min>0&&this.trs.length<=this.min||(this.trs.splice(e,1),this.updateValue(),this.trs.length?this.trs.forEach(e=>this.updateRaw(e)):this.addEmpty(),this.$emit("delete",e))},addRaw(e){if(e&&this.disabled)return;const t=this.formCreateInject.form.parseJson(this.copyTrs)[0];1===this.trs.length&&this.trs[0]._isEmpty&&this.trs.splice(0,1),this.trs.push(t),this.updateRaw(t),e&&(this.$emit("add",this.trs.length),this.updateValue())},updateRaw(e){const t=this.trs.indexOf(e);e.children[0].props.innerText=t+1,e.children[e.children.length-1].children[0].props.onClick=()=>{this.delRaw(t)}},loadRule(){const e=[{type:"th",native:!0,class:"_fc-tf-head-idx"}];let t=[{type:"td",class:"_fc-tf-idx",native:!0,props:{innerText:"0"}}];this.columns.forEach(n=>{e.push({type:"th",native:!0,style:{...n.style||{},textAlign:n.align||"center"},class:n.required?"_fc-tf-head-required":"",props:{innerText:n.label||""}}),t.push({type:"td",native:!0,children:[...n.rule||[]]})}),e.push({type:"th",native:!0,class:"_fc-tf-edit fc-clock",props:{innerText:this.formCreateInject.t("operation")||"操作"}}),t.push({type:"td",native:!0,class:"_fc-tf-btn fc-clock",children:[{type:"i",native:!0,class:"fc-icon icon-delete",props:{}}]}),this.copyTrs=this.formCreateInject.form.toJson([{type:"tr",native:!0,subRule:!0,children:t}]),this.rule=[{type:"table",native:!0,class:"_fc-tf-table",props:{border:"1",cellspacing:"0",cellpadding:"0"},children:[{type:"thead",native:!0,children:[{type:"tr",native:!0,children:e}]},{type:"tbody",native:!0,children:this.trs}]}]}},created(){this.loadRule()},mounted(){this.updateTable()}};const Vm=ls(jm,[["render",function(e,a,l,s,c,u){const d=t("el-button");return i(),r("div",{class:P(["_fc-table-form",{"_fc-disabled":l.disabled}])},[(i(),n(Q(c.Form),{option:l.options,rule:c.rule,extendOption:!0,disabled:l.disabled,onChange:u.formChange,api:c.fapi,"onUpdate:api":a[0]||(a[0]=e=>c.fapi=e),onEmitEvent:e.$emit},null,40,["option","rule","disabled","onChange","api","onEmitEvent"])),l.addable&&(!l.max||l.max>this.trs.length)?(i(),n(d,{key:0,link:"",type:"primary",class:"fc-clock",onClick:a[1]||(a[1]=e=>u.addRaw(!0))},{default:o(()=>[a[2]||(a[2]=M("i",{class:"fc-icon icon-add-circle",style:{"font-weight":"700"}},null,-1)),V(" "+j(l.formCreateInject.t("add")||"添加"),1)]),_:1,__:[2]})):F("",!0)],2)}]]);
/*!
* Signature Pad v5.0.10 | https://github.com/szimek/signature_pad
* (c) 2025 Szymon Nowak | Released under the MIT license
*/class zm{constructor(e,t,n,i){if(isNaN(e)||isNaN(t))throw new Error("Point is invalid: (".concat(e,", ").concat(t,")"));this.x=+e,this.y=+t,this.pressure=n||0,this.time=i||Date.now()}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}equals(e){return this.x===e.x&&this.y===e.y&&this.pressure===e.pressure&&this.time===e.time}velocityFrom(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):0}}class Hm{static fromPoints(e,t){const n=this.calculateControlPoints(e[0],e[1],e[2]).c2,i=this.calculateControlPoints(e[1],e[2],e[3]).c1;return new Hm(e[1],n,i,e[2],t.start,t.end)}static calculateControlPoints(e,t,n){const i=e.x-t.x,o=e.y-t.y,r=t.x-n.x,a=t.y-n.y,l=(e.x+t.x)/2,s=(e.y+t.y)/2,c=(t.x+n.x)/2,u=(t.y+n.y)/2,d=Math.sqrt(i*i+o*o),f=Math.sqrt(r*r+a*a),p=d+f==0?0:f/(d+f),h=c+(l-c)*p,m=u+(s-u)*p,g=t.x-h,v=t.y-m;return{c1:new zm(l+g,s+v),c2:new zm(c+g,u+v)}}constructor(e,t,n,i,o,r){this.startPoint=e,this.control2=t,this.control1=n,this.endPoint=i,this.startWidth=o,this.endWidth=r}length(){let e,t,n=0;for(let i=0;i<=10;i+=1){const o=i/10,r=this.point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this.point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(i>0){const i=r-e,o=a-t;n+=Math.sqrt(i*i+o*o)}e=r,t=a}return n}point(e,t,n,i,o){return t*(1-e)*(1-e)*(1-e)+3*n*(1-e)*(1-e)*e+3*i*(1-e)*e*e+o*e*e*e}}class Um{constructor(){try{this._et=new EventTarget}catch(e){this._et=document}}addEventListener(e,t,n){this._et.addEventListener(e,t,n)}dispatchEvent(e){return this._et.dispatchEvent(e)}removeEventListener(e,t,n){this._et.removeEventListener(e,t,n)}}class Wm extends Um{constructor(e,t={}){var n,i,o;super(),this.canvas=e,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this.velocityFilterWeight=t.velocityFilterWeight||.7,this.minWidth=t.minWidth||.5,this.maxWidth=t.maxWidth||2.5,this.throttle=null!==(n=t.throttle)&&void 0!==n?n:16,this.minDistance=null!==(i=t.minDistance)&&void 0!==i?i:5,this.dotSize=t.dotSize||0,this.penColor=t.penColor||"black",this.backgroundColor=t.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=t.compositeOperation||"source-over",this.canvasContextOptions=null!==(o=t.canvasContextOptions)&&void 0!==o?o:{},this._strokeMoveUpdate=this.throttle?function(e,t=250){let n,i,o,r=0,a=null;const l=()=>{r=Date.now(),a=null,n=e.apply(i,o),a||(i=null,o=[])};return function(...s){const c=Date.now(),u=t-(c-r);return i=this,o=s,u<=0||u>t?(a&&(clearTimeout(a),a=null),r=c,n=e.apply(i,o),a||(i=null,o=[])):a||(a=window.setTimeout(l,u)),n}}(Wm.prototype._strokeUpdate,this.throttle):Wm.prototype._strokeUpdate,this._handleMouseDown=this._handleMouseDown.bind(this),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handlePointerDown=this._handlePointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._ctx=e.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:e,canvas:t}=this;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0,this._strokePointerId=void 0}fromDataURL(e,t={}){return new Promise((n,i)=>{const o=new Image,r=t.ratio||window.devicePixelRatio||1,a=t.width||this.canvas.width/r,l=t.height||this.canvas.height/r,s=t.xOffset||0,c=t.yOffset||0;this._reset(this._getPointGroupOptions()),o.onload=()=>{this._ctx.drawImage(o,s,c,a,l),n()},o.onerror=e=>{i(e)},o.crossOrigin="anonymous",o.src=e,this._isEmpty=!1})}toDataURL(e="image/png",t){return"image/svg+xml"===e?("object"!=typeof t&&(t=void 0),"data:image/svg+xml;base64,".concat(btoa(this.toSVG(t)))):("number"!=typeof t&&(t=void 0),this.canvas.toDataURL(e,t))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const e=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!e?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var e;const t=window.document===this.canvas.ownerDocument?window:null!==(e=this.canvas.ownerDocument.defaultView)&&void 0!==e?e:this.canvas.ownerDocument;return{addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}_removeMoveUpEventListeners(){const{removeEventListener:e}=this._getListenerFunctions();e("pointermove",this._handlePointerMove),e("pointerup",this._handlePointerUp),e("mousemove",this._handleMouseMove),e("mouseup",this._handleMouseUp),e("touchmove",this._handleTouchMove),e("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(e,{clear:t=!0}={}){t&&this.clear(),this._fromData(e,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(e)}toData(){return this._data}_isLeftButtonPressed(e,t){return t?1===e.buttons:!(1&~e.buttons)}_pointerEventToSignatureEvent(e){return{event:e,type:e.type,x:e.clientX,y:e.clientY,pressure:"pressure"in e?e.pressure:0}}_touchEventToSignatureEvent(e){const t=e.changedTouches[0];return{event:e,type:e.type,x:t.clientX,y:t.clientY,pressure:t.force}}_handleMouseDown(e){!this._isLeftButtonPressed(e,!0)||this._drawingStroke||this._strokeBegin(this._pointerEventToSignatureEvent(e))}_handleMouseMove(e){this._isLeftButtonPressed(e,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(e)):this._strokeEnd(this._pointerEventToSignatureEvent(e),!1)}_handleMouseUp(e){this._isLeftButtonPressed(e)||this._strokeEnd(this._pointerEventToSignatureEvent(e))}_handleTouchStart(e){1!==e.targetTouches.length||this._drawingStroke||(e.cancelable&&e.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(e)))}_handleTouchMove(e){if(1===e.targetTouches.length){if(e.cancelable&&e.preventDefault(),!this._drawingStroke)return void this._strokeEnd(this._touchEventToSignatureEvent(e),!1);this._strokeMoveUpdate(this._touchEventToSignatureEvent(e))}}_handleTouchEnd(e){0===e.targetTouches.length&&(e.cancelable&&e.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(e)))}_getPointerId(e){return e.persistentDeviceId||e.pointerId}_allowPointerId(e,t=!1){return typeof this._strokePointerId>"u"?t:this._getPointerId(e)===this._strokePointerId}_handlePointerDown(e){this._drawingStroke||!this._isLeftButtonPressed(e)||!this._allowPointerId(e,!0)||(this._strokePointerId=this._getPointerId(e),e.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(e)))}_handlePointerMove(e){if(this._allowPointerId(e)){if(!this._isLeftButtonPressed(e,!0)||!this._drawingStroke)return void this._strokeEnd(this._pointerEventToSignatureEvent(e),!1);e.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(e))}}_handlePointerUp(e){this._isLeftButtonPressed(e)||!this._allowPointerId(e)||(e.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(e)))}_getPointGroupOptions(e){return{penColor:e&&"penColor"in e?e.penColor:this.penColor,dotSize:e&&"dotSize"in e?e.dotSize:this.dotSize,minWidth:e&&"minWidth"in e?e.minWidth:this.minWidth,maxWidth:e&&"maxWidth"in e?e.maxWidth:this.maxWidth,velocityFilterWeight:e&&"velocityFilterWeight"in e?e.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:e&&"compositeOperation"in e?e.compositeOperation:this.compositeOperation}}_strokeBegin(e){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:e,cancelable:!0})))return;const{addEventListener:t}=this._getListenerFunctions();switch(e.event.type){case"mousedown":t("mousemove",this._handleMouseMove,{passive:!1}),t("mouseup",this._handleMouseUp,{passive:!1});break;case"touchstart":t("touchmove",this._handleTouchMove,{passive:!1}),t("touchend",this._handleTouchEnd,{passive:!1});break;case"pointerdown":t("pointermove",this._handlePointerMove,{passive:!1}),t("pointerup",this._handlePointerUp,{passive:!1})}this._drawingStroke=!0;const n=this._getPointGroupOptions(),i=Object.assign(Object.assign({},n),{points:[]});this._data.push(i),this._reset(n),this._strokeUpdate(e)}_strokeUpdate(e){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(e);this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:e}));const t=this._createPoint(e.x,e.y,e.pressure),n=this._data[this._data.length-1],i=n.points,o=i.length>0&&i[i.length-1],r=!!o&&t.distanceTo(o)<=this.minDistance,a=this._getPointGroupOptions(n);if(!o||!o||!r){const e=this._addPoint(t,a);o?e&&this._drawCurve(e,a):this._drawDot(t,a),i.push({time:t.time,x:t.x,y:t.y,pressure:t.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:e}))}_strokeEnd(e,t=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(t&&this._strokeUpdate(e),this._drawingStroke=!1,this._strokePointerId=void 0,this.dispatchEvent(new CustomEvent("endStroke",{detail:e})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown,{passive:!1})}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown,{passive:!1})}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart,{passive:!1})}_reset(e){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(e.minWidth+e.maxWidth)/2,this._ctx.fillStyle=e.penColor,this._ctx.globalCompositeOperation=e.compositeOperation}_createPoint(e,t,n){const i=this.canvas.getBoundingClientRect();return new zm(e-i.left,t-i.top,n,(new Date).getTime())}_addPoint(e,t){const{_lastPoints:n}=this;if(n.push(e),n.length>2){3===n.length&&n.unshift(n[0]);const e=this._calculateCurveWidths(n[1],n[2],t),i=Hm.fromPoints(n,e);return n.shift(),i}return null}_calculateCurveWidths(e,t,n){const i=n.velocityFilterWeight*t.velocityFrom(e)+(1-n.velocityFilterWeight)*this._lastVelocity,o=this._strokeWidth(i,n),r={end:o,start:this._lastWidth};return this._lastVelocity=i,this._lastWidth=o,r}_strokeWidth(e,t){return Math.max(t.maxWidth/(e+1),t.minWidth)}_drawCurveSegment(e,t,n){const i=this._ctx;i.moveTo(e,t),i.arc(e,t,n,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(e,t){const n=this._ctx,i=e.endWidth-e.startWidth,o=2*Math.ceil(e.length());n.beginPath(),n.fillStyle=t.penColor;for(let r=0;r<o;r+=1){const n=r/o,a=n*n,l=a*n,s=1-n,c=s*s,u=c*s;let d=u*e.startPoint.x;d+=3*c*n*e.control1.x,d+=3*s*a*e.control2.x,d+=l*e.endPoint.x;let f=u*e.startPoint.y;f+=3*c*n*e.control1.y,f+=3*s*a*e.control2.y,f+=l*e.endPoint.y;const p=Math.min(e.startWidth+l*i,t.maxWidth);this._drawCurveSegment(d,f,p)}n.closePath(),n.fill()}_drawDot(e,t){const n=this._ctx,i=t.dotSize>0?t.dotSize:(t.minWidth+t.maxWidth)/2;n.beginPath(),this._drawCurveSegment(e.x,e.y,i),n.closePath(),n.fillStyle=t.penColor,n.fill()}_fromData(e,t,n){for(const i of e){const{points:e}=i,o=this._getPointGroupOptions(i);if(e.length>1)for(let n=0;n<e.length;n+=1){const i=e[n],r=new zm(i.x,i.y,i.pressure,i.time);0===n&&this._reset(o);const a=this._addPoint(r,o);a&&t(a,o)}else this._reset(o),n(e[0],o)}}toSVG({includeBackgroundColor:e=!1}={}){const t=this._data,n=Math.max(window.devicePixelRatio||1,1),i=this.canvas.width/n,o=this.canvas.height/n,r=document.createElementNS("http://www.w3.org/2000/svg","svg");if(r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("viewBox","".concat(0," ").concat(0," ").concat(i," ").concat(o)),r.setAttribute("width",i.toString()),r.setAttribute("height",o.toString()),e&&this.backgroundColor){const e=document.createElement("rect");e.setAttribute("width","100%"),e.setAttribute("height","100%"),e.setAttribute("fill",this.backgroundColor),r.appendChild(e)}return this._fromData(t,(e,{penColor:t})=>{const n=document.createElement("path");if(!(isNaN(e.control1.x)||isNaN(e.control1.y)||isNaN(e.control2.x)||isNaN(e.control2.y))){const i="M ".concat(e.startPoint.x.toFixed(3),",").concat(e.startPoint.y.toFixed(3)," C ").concat(e.control1.x.toFixed(3),",").concat(e.control1.y.toFixed(3)," ").concat(e.control2.x.toFixed(3),",").concat(e.control2.y.toFixed(3)," ").concat(e.endPoint.x.toFixed(3),",").concat(e.endPoint.y.toFixed(3));n.setAttribute("d",i),n.setAttribute("stroke-width",(2.25*e.endWidth).toFixed(3)),n.setAttribute("stroke",t),n.setAttribute("fill","none"),n.setAttribute("stroke-linecap","round"),r.appendChild(n)}},(e,{penColor:t,dotSize:n,minWidth:i,maxWidth:o})=>{const a=document.createElement("circle"),l=n>0?n:(i+o)/2;a.setAttribute("r",l.toString()),a.setAttribute("cx",e.x.toString()),a.setAttribute("cy",e.y.toString()),a.setAttribute("fill",t),r.appendChild(a)}),r.outerHTML}}const Ym=e({name:"SignaturePad",emits:["update:modelValue","change","remove"],data:()=>({visible:!1,isEmpty:!0,signaturePad:null}),props:{modelValue:String,penColor:String,disabled:Boolean,formCreateInject:Object,beforeRemove:Function},watch:{visible(e){e?(this.isEmpty=!0,this.$nextTick(()=>{this.signaturePad=g(new Wm(this.$refs.pad,{penColor:this.penColor})),this.signaturePad.addEventListener("endStroke",()=>{this.isEmpty=this.signaturePad.isEmpty()})})):(this.signaturePad.off(),this.signaturePad=null)}},methods:{open(){this.disabled||(this.visible=!0)},clear(){this.signaturePad.clear(),this.isEmpty=!0},submit(){const e=this.signaturePad.toDataURL();this.updateValue(e),this.visible=!1},updateValue(e){this.$emit("update:modelValue",e),this.$emit("change",e)},async remove(){this.disabled||this.beforeRemove&&!1===await this.beforeRemove()||(this.updateValue(""),this.$emit("remove"))}}}),Gm={key:0,class:"_fc-signature-preview"},$m=["src"],qm={class:"_fc-signature-pad",ref:"pad",width:"600px",height:"270px"};const Qm=ls(Ym,[["render",function(e,n,a,l,s,c){const u=t("el-button"),d=t("el-dialog");return i(),r("div",{class:P(["_fc-signature",{disabled:e.disabled}])},[e.modelValue?(i(),r("div",Gm,[e.disabled?F("",!0):(i(),r("i",{key:0,class:"fc-icon icon-delete2",onClick:n[0]||(n[0]=(...t)=>e.remove&&e.remove(...t))})),M("img",{src:e.modelValue,alt:"signature"},null,8,$m)])):(i(),r("div",{key:1,class:"_fc-signature-btn",onClick:n[1]||(n[1]=(...t)=>e.open&&e.open(...t))},[n[4]||(n[4]=M("i",{class:"fc-icon icon-edit2"},null,-1)),V(" "+j(e.formCreateInject.t("signaturePadTip")||"点击添加手写签名"),1)])),_(d,{class:"_fc-signature-dialog",title:e.formCreateInject.t("signaturePadTitle")||"请在虚线框内书写",modelValue:e.visible,"onUpdate:modelValue":n[3]||(n[3]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"640px"},{footer:o(()=>[M("div",null,[_(u,{size:"default",onClick:n[2]||(n[2]=t=>e.clear())},{default:o(()=>[V(j(e.formCreateInject.t("reset")||"重置"),1)]),_:1}),_(u,{type:"primary",disabled:e.isEmpty,onClick:e.submit,size:"default"},{default:o(()=>[V(j(e.formCreateInject.t("ok")||"确定"),1)]),_:1},8,["disabled","onClick"])])]),default:o(()=>[M("canvas",qm,null,512)]),_:1},8,["title","modelValue"])],2)}]]);const Km=ls(e({name:"FcTitle",data:()=>({}),props:{title:String,size:String,align:String},computed:{textStyle(){return{textAlign:this.align||"left"}}}}),[["render",function(e,t,n,o,a,l){return i(),r("div",{class:P(["_fc-title",e.size||"h2"]),style:H(e.textStyle)},j(e.title),7)}]]),Xm=e({name:"TableFormColumnView",props:{label:String,align:String,width:[Number,String],color:String,required:Boolean},computed:{colStyle(){const e=this.width,t={width:ei.Number(e)?"".concat(e,"px"):e&&"auto"!==e?e:"180px"};return this.color&&(t.color=this.color),t}},data:()=>({})}),Jm={key:0,class:"_fd-tf-required"},Zm={class:"_fd-tf-con"};const eg=ls(Xm,[["render",function(e,t,n,o,l,s){return i(),r("div",{class:"_fd-tf-col",style:H(e.colStyle)},[M("div",{class:"_fd-tf-title",style:H({textAlign:e.align||"center"})},[e.required?(i(),r("span",Jm,"*")):F("",!0),V(j(e.label||""),1)],4),M("div",Zm,[a(e.$slots,"default")])],4)}]]),tg=e({name:"SizeInput",inject:["designer"],emits:["update:modelValue","change"],props:{modelValue:String,size:String,unit:{type:Array,default:()=>["auto","px","%","vh","vw","em","rem"]},defaultUnit:{type:String,default:"px"}},watch:{modelValue(){this.parseValue()}},data(){return{idx:1,num:0,oldValue:this.modelValue||""}},methods:{parseValue(){"auto"!==this.modelValue?(this.idx=Math.max(this.unit.indexOf(this.defaultUnit),0),this.unit.forEach((e,t)=>{(this.modelValue||"").indexOf(e)>-1&&(this.idx=t)}),this.num=Ii(this.modelValue)?null:parseFloat(this.modelValue||0)):(this.idx=0,this.num=0)},submit(){this.oldValue=Ii(this.num)?"":""+this.num+this.unit[this.idx],this.$emit("update:modelValue",this.oldValue),this.$emit("change",this.oldValue)},changeType(e){if(void 0!==e){if(this.idx===e)return;this.idx=e}else this.idx++,this.idx>4&&(this.idx=0);"auto"===this.unit[this.idx]?(this.oldValue="auto",this.$emit("update:modelValue","auto"),this.$emit("change","auto")):this.submit()}},created(){this.parseValue()}}),ng={class:"_fd-size-input"};const ig=ls(tg,[["render",function(e,a,c,u,d,f){const p=t("el-button"),h=t("el-inputNumber"),m=t("el-dropdown-item"),g=t("el-dropdown-menu"),v=t("el-dropdown");return i(),r("div",ng,["auto"===e.unit[e.idx]?(i(),n(p,{key:0,size:e.size,style:{width:"150px"},onClick:a[0]||(a[0]=t=>e.changeType())},{default:o(()=>[V(j(e.unit[e.idx]),1)]),_:1},8,["size"])):(i(),r(l,{key:1},[_(h,{size:e.size,modelValue:e.num,"onUpdate:modelValue":a[1]||(a[1]=t=>e.num=t),onChange:e.submit,"controls-position":"right"},null,8,["size","modelValue","onChange"]),_(v,{trigger:"click",size:"small"},{dropdown:o(()=>[_(g,null,{default:o(()=>[(i(!0),r(l,null,s(e.unit,(t,r)=>(i(),n(m,{key:t,onClick:t=>e.changeType(r)},{default:o(()=>[M("div",null,j(t),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:o(()=>[_(p,{size:e.size},{default:o(()=>[V(j(e.unit[e.idx]),1)]),_:1},8,["size"])]),_:1})],64))])}]]),og=e({name:"ColorInput",inject:["designer"],emits:["update:modelValue","change"],props:{modelValue:String},watch:{modelValue(){this.value=this.modelValue||""},value(e){this.$emit("update:modelValue",e),this.$emit("change",e)}},data(){return{value:this.modelValue||"",predefine:["#c9e6fc","#c3f2f2","#c2f1d2","#fef6c6","#ffe5c2","#fdcac2","#fadcce","#dec2fa","#ccd2f1","#2196f3","#08c9c9","#00c344","#fad714","#ff9300","#f52222","#eb2f96","#800080","#7500ea","#2d46c4","#000000","#333333","#5a5a5a","#757575","#9e9e9e","#bdbdbd","#dddddd","#f5f5f5","#ffffff"]}},methods:{},created(){}}),rg={class:"_fd-color-input"};const ag=ls(og,[["render",function(e,n,a,l,s,c){const u=t("el-color-picker"),d=t("el-input");return i(),r("div",rg,[_(d,{clearable:"",modelValue:e.value,"onUpdate:modelValue":n[1]||(n[1]=t=>e.value=t)},{append:o(()=>[_(u,{"show-alpha":"","color-format":"hex",predefine:e.predefine,modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=t=>e.value=t)},null,8,["predefine","modelValue"])]),_:1},8,["modelValue"])])}]]),lg=e({name:"BoxSizeInput",components:{SizeInput:ig,ConfigItem:Up},props:{modelValue:{type:Object,default:()=>({})}},inject:["designer"],emits:["update:modelValue","change"],data:()=>({overflow:[{value:"visible",icon:"icon-eye"},{value:"hidden",icon:"icon-eye-close"},{value:"scroll",icon:"icon-scroll"},{value:"auto",text:"Auto"}],keys:["width","height","minWidth","minHeight","maxWidth","maxHeight"],boxStyle:{width:"",minWidth:"",maxWidth:"",height:"",minHeight:"",maxHeight:"",overflow:""}}),watch:{modelValue(){this.tidyValue()}},computed:{t(){return this.designer.setupState.t}},methods:{tidyValue(){this.boxStyle={width:"",minWidth:"",maxWidth:"",height:"",minHeight:"",maxHeight:"",overflow:""},this.modelValue&&Object.keys(this.boxStyle).forEach(e=>{this.modelValue[e]&&(this.boxStyle[e]=this.modelValue[e])})},onInput(){const e=Object.keys(this.boxStyle).reduce((e,t)=>(""!==this.boxStyle[t]&&(e[t]=this.boxStyle[t]),e),{});this.$emit("update:modelValue",e),this.$emit("change",e)},changeOverflow(e){this.boxStyle.overflow=this.boxStyle.overflow===e?"":e,this.onInput()},change(e,t){this.boxStyle[e]=t.target.value}},created(){this.tidyValue()}}),sg={class:"_fd-box-size-input"},cg={key:0,style:{"font-size":"12px","line-height":"16px"}};const ug=ls(lg,[["render",function(e,a,c,u,d,f){const p=t("SizeInput"),h=t("el-form-item"),m=t("el-radio-button"),g=t("el-tooltip"),v=t("el-radio-group"),b=t("el-form"),y=t("ConfigItem");return i(),r("div",sg,[_(y,{label:e.t("props.size"),info:Object.keys(e.modelValue).length>0?e.t("struct.configured"):""},{append:o(()=>[_(b,{"label-position":"top",size:"small"},{default:o(()=>[(i(!0),r(l,null,s(e.keys,t=>(i(),n(h,{label:e.t("style."+t),key:t},{default:o(()=>[_(p,{modelValue:e.boxStyle[t],"onUpdate:modelValue":n=>e.boxStyle[t]=n,onChange:e.onInput},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["label"]))),128)),_(h,{label:e.t("style.overflow.name"),style:{"grid-column":"span 2"}},{default:o(()=>[_(v,{modelValue:e.boxStyle.overflow},{default:o(()=>[(i(!0),r(l,null,s(e.overflow,t=>(i(),n(g,{effect:"dark",content:e.t("style.overflow."+t.value),placement:"top",persistent:"","hide-after":0,key:t.value},{default:o(()=>[_(m,{label:t.value,value:t.value,onClick:n=>e.changeOverflow(t.value)},{default:o(()=>[t.text?(i(),r("span",cg,"Auto ")):(i(),r("i",{key:1,class:P(["fc-icon",t.icon])},null,2))]),_:2},1032,["label","value","onClick"])]),_:2},1032,["content"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1},8,["label","info"])])}]]),dg=e({name:"BoxSpaceInput",components:{ConfigItem:Up},props:{modelValue:{type:Object,default:()=>({})}},inject:["designer"],emits:["update:modelValue","change"],data:()=>({position:["Top","Right","Bottom","Left"],boxStyle:{margin:"",padding:"",marginLeft:"",marginRight:"",marginTop:"",marginBottom:"",paddingLeft:"",paddingRight:"",paddingTop:"",paddingBottom:""},marginLock:!1,paddingLock:!1}),watch:{modelValue(){this.tidyValue()}},computed:{t(){return this.designer.setupState.t}},methods:{tidyValue(){this.boxStyle={},["margin","padding"].forEach(e=>{this.boxStyle[e]=this.modelValue[e]||"",this.position.forEach(t=>{this.boxStyle[e+t]=this.tidySize(this.modelValue[e+t]||this.modelValue[e]||"")})})},onInput(){const e=Object.keys(this.boxStyle).reduce((e,t)=>(""!==this.boxStyle[t]&&(e[t]=this.boxStyle[t]),e),{});this.$emit("update:modelValue",e),this.$emit("change",e)},tidySize(e){if(!/^(\d*\.?\d+)(px|rem|%|vh|vw|em)$/.test(e)){if("auto"===e)return e;const t=parseInt(e);return isNaN(t)?"":t+"px"}return e},setValue(e,t,n){const i=this.tidySize(n.target.value);e?this[e+"Lock"]?this.position.forEach(t=>{this.boxStyle[e+t]=i}):this.boxStyle[e+t]=i:this.boxStyle[t]=i,this.onInput()},change(e,t){this.boxStyle[e]=t.target.value},clear(e){this.position.forEach(t=>{this.boxStyle[e+t]=""}),this.onInput()},lock(e){const t=e+"Lock";this[t]=!this[t]}},created(){this.tidyValue()}}),fg={class:"_fd-box-space-input"},pg={class:"_padding"},hg={class:"_padding-title"},mg=["value"],gg=["value"],vg=["value"],_g=["value"],bg={class:"_fd-help"},yg={class:"_margin"},xg={class:"_margin-title"},wg={class:"_fd-help"},Ag=["value"],kg=["value"],Cg=["value"],Sg=["value"];const Eg=ls(dg,[["render",function(e,t,n,o,a,l){return i(),r("div",fg,[M("div",pg,[M("span",hg,j(e.t("style.margin")),1),M("input",{class:"_fd-input _fd-top",placeholder:" ",value:e.boxStyle.marginTop,type:"text",onBlur:t[0]||(t[0]=t=>e.setValue("margin","Top",t)),onInput:t[1]||(t[1]=t=>e.change("marginTop",t))},null,40,mg),M("input",{class:"_fd-input _fd-right",placeholder:" ",value:e.boxStyle.marginRight,type:"text",onBlur:t[2]||(t[2]=t=>e.setValue("margin","Right",t)),onInput:t[3]||(t[3]=t=>e.change("marginRight",t))},null,40,gg),M("input",{class:"_fd-input _fd-bottom",placeholder:" ",value:e.boxStyle.marginBottom,type:"text",onBlur:t[4]||(t[4]=t=>e.setValue("margin","Bottom",t)),onInput:t[5]||(t[5]=t=>e.change("marginBottom",t))},null,40,vg),M("input",{class:"_fd-input _fd-left",placeholder:" ",value:e.boxStyle.marginLeft,type:"text",onBlur:t[6]||(t[6]=t=>e.setValue("margin","Left",t)),onInput:t[7]||(t[7]=t=>e.change("marginLeft",t))},null,40,_g),M("div",bg,[M("i",{class:P(["fc-icon icon-link2",e.marginLock?"active":""]),title:"lock",onClick:t[8]||(t[8]=t=>e.lock("margin"))},null,2),M("i",{class:"fc-icon icon-delete-circle",title:"clear",onClick:t[9]||(t[9]=t=>e.clear("margin"))})]),M("div",yg,[M("span",xg,j(e.t("style.padding")),1),M("div",wg,[M("i",{class:P(["fc-icon icon-link2",e.paddingLock?"active":""]),title:"lock",onClick:t[10]||(t[10]=t=>e.lock("padding"))},null,2),M("i",{class:"fc-icon icon-delete-circle",title:"clear",onClick:t[11]||(t[11]=t=>e.clear("padding"))})]),M("input",{class:"_fd-input _fd-top",placeholder:" ",value:e.boxStyle.paddingTop,type:"text",onBlur:t[12]||(t[12]=t=>e.setValue("padding","Top",t)),onInput:t[13]||(t[13]=t=>e.change("paddingTop",t))},null,40,Ag),M("input",{class:"_fd-input _fd-right",placeholder:" ",value:e.boxStyle.paddingRight,type:"text",onBlur:t[14]||(t[14]=t=>e.setValue("padding","Right",t)),onInput:t[15]||(t[15]=t=>e.change("paddingRight",t))},null,40,kg),M("input",{class:"_fd-input _fd-bottom",placeholder:" ",value:e.boxStyle.paddingBottom,type:"text",onBlur:t[16]||(t[16]=t=>e.setValue("padding","Bottom",t)),onInput:t[17]||(t[17]=t=>e.change("paddingBottom",t))},null,40,Cg),M("input",{class:"_fd-input _fd-left",placeholder:" ",value:e.boxStyle.paddingLeft,type:"text",onBlur:t[18]||(t[18]=t=>e.setValue("padding","Left",t)),onInput:t[19]||(t[19]=t=>e.change("paddingLeft",t))},null,40,Sg),t[20]||(t[20]=M("div",{class:"_box"},null,-1))])])])}]]);function Tg(e){let t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return 0===t.indexOf("-")&&(t=t.substr(1)),t}const Rg=e({name:"BorderInput",components:{ColorInput:ag,SizeInput:ig,ConfigItem:Up},inject:["designer"],emits:["update:modelValue","change"],props:{modelValue:{type:Object,default:()=>({})}},watch:{modelValue(){this.tidyValue(),this.initCur()},active(){this.initCur()}},computed:{borderStyleStr(){let e="";return Object.keys(this.borderStyle).forEach(t=>{""!==this.borderStyle[t]&&(e+=Tg(t)+": "+this.borderStyle[t]+";")},{}),e}},data(){const e=this.designer.setupState.t;return{t:e,active:"",borderStyle:{},curStyle:"",curColor:"",curWidth:"",lineType:["solid","dashed","dotted","double"].map(t=>({value:t,label:e("style."+t)})),position:["Top","Left","Bottom","Right"],type:["Style","Color","Width"],unwatch:null}},methods:{tidyValue(){const e=[];this.borderStyle={},["",...this.position].forEach(t=>{this.type.forEach(n=>{e.push("border"+t+n)})}),e.forEach(e=>{this.borderStyle[e]=this.modelValue[e]||""})},onInput(){const e=Object.keys(this.borderStyle).reduce((e,t)=>(""!==this.borderStyle[t]&&(e[t]=this.borderStyle[t]),e),{});this.$emit("update:modelValue",e),this.$emit("change",e)},pushCur(){this.borderStyle["border"+this.active+"Style"]=this.curStyle||"",this.borderStyle["border"+this.active+"Color"]=this.curColor||"",this.borderStyle["border"+this.active+"Width"]=this.curWidth||"",this.onInput()},initCur(){this.unwatch&&this.unwatch(),this.curStyle=this.borderStyle["border"+this.active+"Style"]||"",this.curColor=this.borderStyle["border"+this.active+"Color"]||"",this.curWidth=this.borderStyle["border"+this.active+"Width"]||"",this.unwatch=this.$watch(()=>[this.curStyle,this.curColor,this.curWidth],()=>{this.pushCur()})}},created(){this.tidyValue(),this.initCur()}}),Og={class:"_fd-border-input"},Mg={class:"_fd-bi-left"},Dg={class:"_fd-bil-row"},Ng={class:"_fd-bil-row"},Ig={class:"_fd-bil-row"},Lg={class:"_fd-bi-right"},Fg={class:"_fd-bi-opt"};const Pg=ls(Rg,[["render",function(e,a,c,u,d,f){const p=t("el-option"),h=t("el-select"),m=t("SizeInput"),g=t("ColorInput"),v=t("ConfigItem");return i(),n(v,{label:e.t("style.border")},{append:o(()=>[M("div",Og,[M("div",Mg,[M("div",Dg,[M("div",{class:P(["_fd-bil-col","Top"===e.active?"active":""]),onClick:a[0]||(a[0]=t=>e.active="Top")},"┳ ",2)]),M("div",Ng,[M("div",{class:P(["_fd-bil-col","Left"===e.active?"active":""]),onClick:a[1]||(a[1]=t=>e.active="Left")},"┣ ",2),M("div",{class:P(["_fd-bil-col",""===e.active?"active":""]),onClick:a[2]||(a[2]=t=>e.active="")},"╋",2),M("div",{class:P(["_fd-bil-col","Right"===e.active?"active":""]),onClick:a[3]||(a[3]=t=>e.active="Right")}," ┫ ",2)]),M("div",Ig,[M("div",{class:P(["_fd-bil-col","Bottom"===e.active?"active":""]),onClick:a[4]||(a[4]=t=>e.active="Bottom")},"┻ ",2)])]),M("div",Lg,[_(h,{modelValue:e.curStyle,"onUpdate:modelValue":a[5]||(a[5]=t=>e.curStyle=t),clearable:""},{default:o(()=>[(i(!0),r(l,null,s(e.lineType,e=>(i(),n(p,{key:e.value,label:e.label,value:e.value},{default:o(()=>[M("div",Fg,[M("div",{class:P(["_line",e.value])},null,2)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"]),_(m,{modelValue:e.curWidth,"onUpdate:modelValue":a[6]||(a[6]=t=>e.curWidth=t)},null,8,["modelValue"]),_(g,{modelValue:e.curColor,"onUpdate:modelValue":a[7]||(a[7]=t=>e.curColor=t)},null,8,["modelValue"])])])]),default:o(()=>[M("div",{class:"line-box",style:H(e.borderStyleStr)},a[8]||(a[8]=[M("div",{class:"line-box-con"},null,-1)]),4)]),_:1},8,["label"])}]]),Bg=e({name:"RadiusInput",components:{ConfigItem:Up,ColorInput:ag,SizeInput:ig},inject:["designer"],emits:["update:modelValue","change"],props:{modelValue:String},watch:{modelValue(e){e!==this.oldValue&&this.tidyValue()}},computed:{t(){return this.designer.setupState.t}},data:()=>({visit:!1,active:"",style:{com:"",left:"",right:"",top:"",bottom:""},unit:["px","%"],oldValue:""}),methods:{batch(){this.style.left=this.style.com,this.style.right=this.style.com,this.style.top=this.style.com,this.style.bottom=this.style.com,this.onInput()},tidyValue(){if(this.style={com:"",left:"",right:"",top:"",bottom:""},!this.modelValue)return;let e=(this.modelValue||"").split(" ").filter(e=>""!==e);1===e.length?e=[e[0],e[0],e[0],e[0]]:2===e.length?e=[e[0],e[1],e[0],e[1]]:3===e.length&&(e=[e[0],e[1],e[2],e[1]]),this.style.left=e[0],this.style.top=e[1],this.style.right=e[2],this.style.bottom=e[3],this.updateCom()},updateCom(){let e="".concat(this.style.left||"0px"," ").concat(this.style.top||"0px"," ").concat(this.style.right||"0px"," ").concat(this.style.bottom||"0px");this.style.com=""===e.replaceAll(this.style.left,"").trim()?this.style.left:""},onInput(){let e="".concat(this.style.left||"0px"," ").concat(this.style.top||"0px"," ").concat(this.style.right||"0px"," ").concat(this.style.bottom||"0px");""==="".concat(this.style.left).concat(this.style.top).concat(this.style.right).concat(this.style.bottom).trim()?e="":this.updateCom(),this.oldValue=e,this.$emit("update:modelValue",e),this.$emit("change",e)}},created(){this.tidyValue()}}),jg={class:"_fd-radius-input"},Vg={class:"_fd-radius-con"},zg={class:"_fd-radius-item"},Hg={class:"_fd-radius-item"},Ug={class:"_fd-radius-item"},Wg={class:"_fd-radius-item"};const Yg=ls(Bg,[["render",function(e,n,a,l,s,c){const u=t("SizeInput"),d=t("ConfigItem");return i(),r("div",jg,[_(d,{label:e.t("style.borderRadius")},{append:o(()=>[M("div",Vg,[M("div",zg,[n[5]||(n[5]=M("div",{class:"_fd-radius-icon",style:{transform:"rotate(180deg)"}},[M("i",{class:"fc-icon icon-radius"})],-1)),_(u,{unit:e.unit,modelValue:e.style.left,"onUpdate:modelValue":n[1]||(n[1]=t=>e.style.left=t),onChange:e.onInput},null,8,["unit","modelValue","onChange"])]),M("div",Hg,[n[6]||(n[6]=M("div",{class:"_fd-radius-icon",style:{transform:"rotate(-90deg)"}},[M("i",{class:"fc-icon icon-radius"})],-1)),_(u,{unit:e.unit,modelValue:e.style.top,"onUpdate:modelValue":n[2]||(n[2]=t=>e.style.top=t),onChange:e.onInput},null,8,["unit","modelValue","onChange"])]),M("div",Ug,[n[7]||(n[7]=M("div",{class:"_fd-radius-icon",style:{transform:"rotate(90deg)"}},[M("i",{class:"fc-icon icon-radius"})],-1)),_(u,{unit:e.unit,modelValue:e.style.bottom,"onUpdate:modelValue":n[3]||(n[3]=t=>e.style.bottom=t),onChange:e.onInput},null,8,["unit","modelValue","onChange"])]),M("div",Wg,[n[8]||(n[8]=M("div",{class:"_fd-radius-icon"},[M("i",{class:"fc-icon icon-radius"})],-1)),_(u,{unit:e.unit,modelValue:e.style.right,"onUpdate:modelValue":n[4]||(n[4]=t=>e.style.right=t),onChange:e.onInput},null,8,["unit","modelValue","onChange"])])])]),default:o(()=>[_(u,{unit:e.unit,modelValue:e.style.com,"onUpdate:modelValue":n[0]||(n[0]=t=>e.style.com=t),onChange:e.batch},null,8,["unit","modelValue","onChange"])]),_:1},8,["label"])])}]]),Gg=e({name:"BorderInput",components:{ColorInput:ag,SizeInput:ig,ConfigItem:Up},inject:["designer"],emits:["update:modelValue","change"],props:{modelValue:{type:Object,default:()=>({})}},watch:{modelValue(){this.tidyValue()}},computed:{borderStyleStr(){let e="";return Object.keys(this.borderStyle).forEach(t=>{""!==this.borderStyle[t]&&(e+=Tg(t)+": "+this.borderStyle[t]+";")},{}),e},alignType(){return["left","center","right"].map(e=>({label:this.t("props."+e),value:e}))},decorationType(){return["underline","line-through","overline"].map(e=>({label:this.t("style.decoration."+e),value:e}))},weightType(){return[300,400,500,700].map(e=>({label:this.t("style.weight."+e),value:e}))},familyType(){return(this.designer.setupState.getConfig("fontFamily")||["Microsoft YaHei","SimSun","SimHei","KaiTi","FangSong","Arial","sans-serif","monospace"]).map(e=>"string"==typeof e?{label:this.t("style.family."+e)||e,value:e}:e)}},data(){return{t:this.designer.setupState.t,fontStyle:{fontSize:"",fontFamily:"",fontWeight:"",fontStyle:"",textDecoration:"",textAlign:"",lineHeight:"",letterSpacing:""}}},methods:{tidyValue(){Object.keys(this.fontStyle).forEach(e=>{this.fontStyle[e]=this.modelValue[e]||""})},onInput(){const e=Object.keys(this.fontStyle).reduce((e,t)=>(""!==this.fontStyle[t]&&(e[t]=this.fontStyle[t]),e),{});this.$emit("update:modelValue",e),this.$emit("change",e)}},created(){this.tidyValue()}}),$g={class:"_fd-font-input"};const qg=ls(Gg,[["render",function(e,a,c,u,d,f){const p=t("el-option"),h=t("el-select"),m=t("el-form-item"),g=t("SizeInput"),v=t("el-form"),b=t("ConfigItem");return i(),n(b,{label:e.t("style.font.name")},{append:o(()=>[M("div",$g,[_(v,{"label-width":"50px","label-position":"top",inline:"",size:"small"},{default:o(()=>[_(m,{label:e.t("style.font.family")},{default:o(()=>[_(h,{modelValue:e.fontStyle.fontFamily,"onUpdate:modelValue":a[0]||(a[0]=t=>e.fontStyle.fontFamily=t),clearable:"",onChange:e.onInput},{default:o(()=>[(i(!0),r(l,null,s(e.familyType,e=>(i(),n(p,{key:e.value,label:e.label,value:e.value},{default:o(()=>[M("span",{style:H({fontFamily:e.value})},j(e.label),5)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),_(m,{label:e.t("style.font.size")},{default:o(()=>[_(g,{modelValue:e.fontStyle.fontSize,"onUpdate:modelValue":a[1]||(a[1]=t=>e.fontStyle.fontSize=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"]),_(m,{label:e.t("style.weight.name")},{default:o(()=>[_(h,{modelValue:e.fontStyle.fontWeight,"onUpdate:modelValue":a[2]||(a[2]=t=>e.fontStyle.fontWeight=t),clearable:"",onChange:e.onInput},{default:o(()=>[(i(!0),r(l,null,s(e.weightType,e=>(i(),n(p,{key:e.value,label:e.label,value:e.value},{default:o(()=>[M("span",{style:H({fontWeight:e.value})},j(e.label),5)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),_(m,{label:e.t("style.decoration.name")},{default:o(()=>[_(h,{modelValue:e.fontStyle.textDecoration,"onUpdate:modelValue":a[3]||(a[3]=t=>e.fontStyle.textDecoration=t),clearable:"",onChange:e.onInput},{default:o(()=>[(i(!0),r(l,null,s(e.decorationType,e=>(i(),n(p,{key:e.value,label:e.label,value:e.value},{default:o(()=>[M("span",{style:H({textDecoration:e.value})},j(e.label),5)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),_(m,{label:e.t("style.font.align")},{default:o(()=>[_(h,{modelValue:e.fontStyle.textAlign,"onUpdate:modelValue":a[4]||(a[4]=t=>e.fontStyle.textAlign=t),clearable:"",onChange:e.onInput},{default:o(()=>[(i(!0),r(l,null,s(e.alignType,e=>(i(),n(p,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),_(m,{label:e.t("style.font.height")},{default:o(()=>[_(g,{modelValue:e.fontStyle.lineHeight,"onUpdate:modelValue":a[5]||(a[5]=t=>e.fontStyle.lineHeight=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"]),_(m,{label:e.t("style.font.spacing")},{default:o(()=>[_(g,{modelValue:e.fontStyle.letterSpacing,"onUpdate:modelValue":a[6]||(a[6]=t=>e.fontStyle.letterSpacing=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"])]),_:1})])]),default:o(()=>[M("div",{class:"_fd-fi-box",style:H(e.fontStyle)},j(e.t("style.font.preview")),5)]),_:1},8,["label"])}]]),Qg=e({name:"ShadowContent",components:{ColorInput:ag},inject:["designer"],emits:["update:modelValue","change"],props:{modelValue:{default:"0px 0px 0px rgba(0, 0, 0, 0)",type:String}},data:()=>({max:24,boxSize:250,options:[{key:"external",icon:"shadow"},{key:"inset",icon:"shadow-inset"}],form:{color:"",type:"external",x:0,y:0,vague:0,extend:0,x_unit:"px",y_unit:"px",vague_unit:"px",extend_unit:"px"},units:["px","%","rem","em","vw","vh"],down:!1,position:{left:0,top:0}}),computed:{spotStyle(){return{left:this.position.left+"px",top:this.position.top+"px"}},t(){return this.designer.setupState.t}},watch:{position(e){this.form.x=parseInt(String((e.left-this.boxSize/2)/this.boxSize*this.max)),this.form.y=parseInt(String((e.top-this.boxSize/2)/this.boxSize*this.max));const t=this.max/2;this.form.x=this.form.x<0?Math.max(this.form.x,-1*t):Math.min(this.form.x,t),this.form.y=this.form.y<0?Math.max(this.form.y,-1*t):Math.min(this.form.y,t)},modelValue(e){this.initStyle(e)}},methods:{getMouseXY(e,t){if(this.down||t){const t=this.$refs.box.getBoundingClientRect();this.position={left:parseInt(String(e.clientX-t.x)),top:parseInt(String(e.clientY-t.y))}}},onMouseup(){this.down=!1,this.onInput()},onMousedown(e){this.getMouseXY(e,!0),this.down=!0},onInput(){const e=this.form;let t="".concat(e.x).concat(e.x_unit," ").concat(e.y).concat(e.y_unit," ").concat(e.vague).concat(e.vague_unit," ").concat(e.extend).concat(e.extend_unit," ").concat(e.color);""==="".concat(e.x).concat(e.y).concat(e.vague).concat(e.extend).replaceAll("0","")?t="":"inset"===e.type&&(t+=" inset"),this.$emit("update:modelValue",t),this.$emit("change",t)},initStyle(e){(this.modelValue||"").indexOf(" inset")>-1&&(this.form.type="inset",e=e.replace(" inset",""));const t=e.split("rgba");let n,i;t.length>1?(n="rgba"+t[1].trim(),i=t[0].trim().split(" ")):(i=t[0].trim().split(" "),n=i.pop()),this.form.color=n||"#000",this.form.x=parseInt(i[0])||0,this.form.y=parseInt(i[1])||0,this.form.vague=parseInt(i[2])||0,this.form.extend=parseInt(i[3])||0;const o=e=>(null==e?void 0:e.replace(/[-\d.]/g,""))||"px";this.form.x_unit=o(i[0]),this.form.y_unit=o(i[1]),this.form.vague_unit=o(i[2]),this.form.extend_unit=o(i[3]),this.position.left=this.boxSize/2+this.form.x/this.max*this.boxSize||0,this.position.top=this.boxSize/2+this.form.y/this.max*this.boxSize||0}},mounted(){this.initStyle(this.modelValue)}}),Kg={class:"_fd-shadow-content"},Xg={class:"_fd-sc-right"};const Jg=e({name:"ShadowInput",emits:["update:modelValue","change"],components:{ConfigItem:Up,ShadowContent:ls(Qg,[["render",function(e,a,c,u,d,f){const p=t("el-radio-button"),h=t("el-tooltip"),m=t("el-radio-group"),g=t("el-form-item"),v=t("ColorInput"),b=t("el-option"),y=t("el-select"),x=t("el-input"),w=t("el-form");return i(),r("div",Kg,[_(w,{"label-width":"50px","label-position":"top",inline:"",class:"_fd-sc-form",size:"small"},{default:o(()=>[_(g,{label:e.t("style.shadow.mode")},{default:o(()=>[_(m,{modelValue:e.form.type,"onUpdate:modelValue":a[0]||(a[0]=t=>e.form.type=t),onChange:e.onInput,size:"small",class:"_fd-sc-radio"},{default:o(()=>[(i(!0),r(l,null,s(e.options,t=>(i(),n(h,{key:t.key,effect:"dark",content:e.t("style.shadow."+t.key),placement:"top","hide-after":0,persistent:""},{default:o(()=>[_(p,{label:t.key,value:t.key},{default:o(()=>[M("i",{class:P(["fc-icon","icon-"+t.icon])},null,2)]),_:2},1032,["label","value"])]),_:2},1032,["content"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),_(g,{label:e.t("style.color")},{default:o(()=>[_(v,{modelValue:e.form.color,"onUpdate:modelValue":a[1]||(a[1]=t=>e.form.color=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"]),_(g,{label:e.t("style.shadow.x")},{default:o(()=>[_(x,{modelValue:e.form.x,"onUpdate:modelValue":a[3]||(a[3]=t=>e.form.x=t),type:"number",onChange:e.onInput},{append:o(()=>[_(y,{modelValue:e.form.x_unit,"onUpdate:modelValue":a[2]||(a[2]=t=>e.form.x_unit=t),onChange:e.onInput},{default:o(()=>[(i(!0),r(l,null,s(e.units,e=>(i(),n(b,{key:e,label:e,value:e},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),_(g,{label:e.t("style.shadow.y")},{default:o(()=>[_(x,{modelValue:e.form.y,"onUpdate:modelValue":a[5]||(a[5]=t=>e.form.y=t),type:"number",onChange:e.onInput},{append:o(()=>[_(y,{modelValue:e.form.y_unit,"onUpdate:modelValue":a[4]||(a[4]=t=>e.form.y_unit=t),onChange:e.onInput},{default:o(()=>[(i(!0),r(l,null,s(e.units,e=>(i(),n(b,{key:e,label:e,value:e},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),_(g,{label:e.t("style.shadow.vague")},{default:o(()=>[_(x,{modelValue:e.form.vague,"onUpdate:modelValue":a[7]||(a[7]=t=>e.form.vague=t),type:"number",onChange:e.onInput},{append:o(()=>[_(y,{modelValue:e.form.vague_unit,"onUpdate:modelValue":a[6]||(a[6]=t=>e.form.vague_unit=t),onChange:e.onInput},{default:o(()=>[(i(!0),r(l,null,s(e.units,e=>(i(),n(b,{key:e,label:e,value:e},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),_(g,{label:e.t("style.shadow.extend")},{default:o(()=>[_(x,{modelValue:e.form.extend,"onUpdate:modelValue":a[9]||(a[9]=t=>e.form.extend=t),type:"number",onChange:e.onInput},{append:o(()=>[_(y,{modelValue:e.form.extend_unit,"onUpdate:modelValue":a[8]||(a[8]=t=>e.form.extend_unit=t),onChange:e.onInput},{default:o(()=>[(i(!0),r(l,null,s(e.units,e=>(i(),n(b,{key:e,label:e,value:e},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"])]),_:1}),M("div",Xg,[M("div",{ref:"box",class:P(["_fd-sc-box",e.down?"down":""]),onClick:a[10]||(a[10]=t=>e.getMouseXY(t,1)),onMousedown:a[11]||(a[11]=(...t)=>e.onMousedown&&e.onMousedown(...t)),onMouseup:a[12]||(a[12]=(...t)=>e.onMouseup&&e.onMouseup(...t)),onMousemove:a[13]||(a[13]=t=>e.getMouseXY(t,0))},[M("span",{class:"spot",style:H(e.spotStyle)},a[14]||(a[14]=[M("i",{class:"spot-id"},null,-1)]),4),a[15]||(a[15]=M("span",{class:"center-spot"},null,-1)),a[16]||(a[16]=M("div",{class:"x-hr"},null,-1)),a[17]||(a[17]=M("div",{class:"y-hr"},null,-1))],34)])])}]])},inject:["designer"],props:{modelValue:String},watch:{modelValue(){this.value=this.modelValue||""},value(e){this.$emit("update:modelValue",e),this.$emit("change",e)}},data(){const e=this.designer.setupState.t;return{t:e,options:[{label:e("style.shadow.classic"),value:"3px 5px 7px 2px #CBCBCBFF"},{label:e("style.shadow.flat"),value:"4px 4px 3px -2px #E7E5E5FF"},{label:e("style.shadow.solid"),value:"1px 2px 4px 2px #979797FF"}],value:this.modelValue||""}},methods:{changeValue(e){this.value=e}},created(){}}),Zg={class:"_fd-shadow-input"};const ev=ls(Jg,[["render",function(e,a,c,u,d,f){const p=t("el-dropdown-item"),h=t("el-dropdown-menu"),m=t("el-dropdown"),g=t("el-input"),v=t("ShadowContent"),b=t("ConfigItem");return i(),r("div",Zg,[_(b,{label:e.t("style.shadow.name")},{append:o(()=>[_(v,{modelValue:e.value,"onUpdate:modelValue":a[1]||(a[1]=t=>e.value=t)},null,8,["modelValue"])]),default:o(()=>[_(g,{clearable:"",modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=t=>e.value=t),class:"_fd-si-input"},{append:o(()=>[_(m,null,{dropdown:o(()=>[_(h,null,{default:o(()=>[(i(!0),r(l,null,s(e.options,t=>(i(),n(p,{onClick:n=>e.changeValue(t.value)},{default:o(()=>[V(j(t.label),1)]),_:2},1032,["onClick"]))),256))]),_:1})]),default:o(()=>[a[2]||(a[2]=M("i",{class:"fc-icon icon-setting"},null,-1))]),_:1,__:[2]})]),_:1},8,["modelValue"])]),_:1},8,["label"])])}]]),tv=e({name:"PositionInput",components:{ConfigItem:Up,SizeInput:ig},inject:["designer"],emits:["update:modelValue","change"],props:{modelValue:Object},watch:{modelValue(){this.tidyValue()}},computed:{t(){return this.designer.setupState.t},positionType(){return["static","relative","absolute","fixed","sticky"].map(e=>({label:this.t("style.position."+e),value:e}))}},data:()=>({style:{position:"",left:"",right:"",top:"",bottom:""}}),methods:{tidyValue(){this.style={position:"",left:"",right:"",top:"",bottom:"",...this.modelValue}},onInput(){const e=Object.keys(this.style).reduce((e,t)=>(""!==this.style[t]&&(e[t]=this.style[t]),e),{});this.$emit("update:modelValue",e),this.$emit("change",e)}},created(){this.tidyValue()}}),nv={class:"_fd-pos-input"},iv={class:"_fd-pos-con"},ov={class:"_fd-pos-item"},rv={class:"_fd-pos-item"},av={class:"_fd-pos-item"},lv={class:"_fd-pos-item"};const sv=ls(tv,[["render",function(e,a,c,u,d,f){const p=t("el-option"),h=t("el-select"),m=t("SizeInput"),g=t("ConfigItem");return i(),r("div",nv,[_(g,{label:e.t("style.position.name")},{append:o(()=>[M("div",iv,[M("div",ov,[a[5]||(a[5]=M("div",{class:"_fd-pos-icon"},[M("i",{class:"fc-icon icon-position-left"})],-1)),_(m,{modelValue:e.style.left,"onUpdate:modelValue":a[1]||(a[1]=t=>e.style.left=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),M("div",rv,[a[6]||(a[6]=M("div",{class:"_fd-pos-icon",style:{transform:"rotate(90deg)"}},[M("i",{class:"fc-icon icon-position-left"})],-1)),_(m,{modelValue:e.style.top,"onUpdate:modelValue":a[2]||(a[2]=t=>e.style.top=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),M("div",av,[a[7]||(a[7]=M("div",{class:"_fd-pos-icon",style:{transform:"rotate(-90deg)"}},[M("i",{class:"fc-icon icon-position-left"})],-1)),_(m,{modelValue:e.style.bottom,"onUpdate:modelValue":a[3]||(a[3]=t=>e.style.bottom=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),M("div",lv,[a[8]||(a[8]=M("div",{class:"_fd-pos-icon",style:{transform:"rotate(180deg)"}},[M("i",{class:"fc-icon icon-position-left"})],-1)),_(m,{modelValue:e.style.right,"onUpdate:modelValue":a[4]||(a[4]=t=>e.style.right=t),onChange:e.onInput},null,8,["modelValue","onChange"])])])]),default:o(()=>[_(h,{modelValue:e.style.position,"onUpdate:modelValue":a[0]||(a[0]=t=>e.style.position=t),clearable:"",onChange:e.onInput},{default:o(()=>[(i(!0),r(l,null,s(e.positionType,e=>(i(),n(p,{key:e.value,label:e.label,value:e.value},{default:o(()=>[V(j(e.label),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"])])}]]),cv=["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","textAlign","lineHeight","letterSpacing"],uv=["position","top","left","bottom","right"],dv=["height","width","minWidth","minHeight","maxWidth","maxHeight","overflow"],fv=["color","backgroundColor","scale","borderRadius","boxShadow","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","padding","opacity","borderStyle","borderColor","borderWidth","borderTopStyle","borderTopColor","borderTopWidth","borderLeftStyle","borderLeftColor","borderLeftWidth","borderBottomStyle","borderBottomColor","borderBottomWidth","borderRightStyle","borderRightColor","borderRightWidth",...cv,...dv,...uv],pv=e({name:"StyleConfig",inject:["designer"],emits:["update:modelValue"],components:{PositionInput:sv,TableOptions:Sm,ColorInput:ag,ConfigItem:Up,RadiusInput:Yg,BoxSizeInput:ug,BoxSpaceInput:Eg,BorderInput:Pg,ShadowInput:ev,FontInput:qg},props:{modelValue:{type:Object,default:()=>({})}},watch:{modelValue(){this.tidyStyle()}},data(){return{t:this.designer.setupState.t,formData:{},size:{},space:{},border:{},font:{},position:{},radius:"",backgroundColor:"",color:"",boxShadow:"",opacity:100,scale:100}},methods:{tidyStyle(){const e={...this.modelValue||{}},t={};Object.keys(e).forEach(n=>{const i=ci(n);(["margin","padding"].indexOf(n)>-1||n.indexOf("margin")>-1||n.indexOf("padding")>-1)&&(t[i]=e[n])});const n={};dv.forEach(t=>{e[t]&&(n[t]=e[t])});const i={};uv.forEach(t=>{e[t]&&(i[t]=e[t])}),this.radius=e.borderRadius||"",delete e.borderRadius;const o={};Object.keys(e).forEach(t=>{0===t.indexOf("border")&&(o[t]=e[t])});let r=Ii(e.opacity)?100:parseFloat(e.opacity)||0;r&&r<1&&(r*=100);let a=e.scale;a=Ii(e.scale)?100:isNaN(Number(a))?parseFloat(a)||100:a>0?100*a:0;const l={};cv.forEach(t=>{e[t]&&(l[t]=e[t])}),this.opacity=r,this.scale=a,this.size=n,this.position=i,this.space=t,this.border=o,this.font=l,this.boxShadow=e.boxShadow||"",this.color=e.color||"",this.backgroundColor=e.backgroundColor||"",fv.forEach(t=>{delete e[t]}),this.formData=e},onInput(){let e={...this.formData},t={};fv.forEach(n=>{if(e[n])t[n]=e[n],delete e[n];else{const i=Tg(n);e[i]&&(t[n]=e[i],delete e[i])}});const n={...e,color:this.color||"",backgroundColor:this.backgroundColor||"",opacity:this.opacity>=0&&this.opacity<100?this.opacity+"%":"",borderRadius:this.radius||"",boxShadow:this.boxShadow||"",scale:this.scale>=0&&100!==this.scale?this.scale+"%":"",...this.space,...this.size,...this.border,...this.font,...this.position,...t};Object.keys(n).forEach(e=>{Ii(n[e])&&delete n[e]}),this.$emit("update:modelValue",n)}},created(){this.tidyStyle()}}),hv={class:"_fd-style-config"};const mv=ls(pv,[["render",function(e,n,a,l,s,u){const d=t("BoxSpaceInput"),f=t("BoxSizeInput"),p=t("ColorInput"),h=t("ConfigItem"),m=t("BorderInput"),g=t("RadiusInput"),v=t("FontInput"),b=t("ShadowInput"),y=t("PositionInput"),x=t("el-slider"),w=t("TableOptions");return i(),r("div",hv,[_(d,{modelValue:e.space,"onUpdate:modelValue":n[0]||(n[0]=t=>e.space=t),onChange:e.onInput,style:{"margin-bottom":"10px"}},null,8,["modelValue","onChange"]),_(f,{modelValue:e.size,"onUpdate:modelValue":n[1]||(n[1]=t=>e.size=t),onChange:e.onInput},null,8,["modelValue","onChange"]),_(h,{label:e.t("style.color")},{default:o(()=>[_(p,{modelValue:e.color,"onUpdate:modelValue":n[2]||(n[2]=t=>e.color=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"]),_(h,{label:e.t("style.backgroundColor")},{default:o(()=>[_(p,{modelValue:e.backgroundColor,"onUpdate:modelValue":n[3]||(n[3]=t=>e.backgroundColor=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"]),_(m,{modelValue:e.border,"onUpdate:modelValue":n[4]||(n[4]=t=>e.border=t),onChange:e.onInput},null,8,["modelValue","onChange"]),_(g,{modelValue:e.radius,"onUpdate:modelValue":n[5]||(n[5]=t=>e.radius=t),onChange:e.onInput},null,8,["modelValue","onChange"]),_(v,{modelValue:e.font,"onUpdate:modelValue":n[6]||(n[6]=t=>e.font=t),onChange:e.onInput},null,8,["modelValue","onChange"]),_(b,{modelValue:e.boxShadow,"onUpdate:modelValue":n[7]||(n[7]=t=>e.boxShadow=t),onChange:e.onInput},null,8,["modelValue","onChange"]),_(y,{modelValue:e.position,"onUpdate:modelValue":n[8]||(n[8]=t=>e.position=t),onChange:e.onInput},null,8,["modelValue","onChange"]),_(h,{label:e.t("style.opacity"),class:"_fd-opacity-input"},{default:o(()=>[_(x,{"show-tooltip":!1,modelValue:e.opacity,"onUpdate:modelValue":n[9]||(n[9]=t=>e.opacity=t),onChange:e.onInput},null,8,["modelValue","onChange"]),M("span",null,j(e.opacity)+"%",1)]),_:1},8,["label"]),_(h,{label:e.t("style.scale"),class:"_fd-opacity-input"},{default:o(()=>[_(x,{min:80,max:120,"show-tooltip":!1,modelValue:e.scale,"onUpdate:modelValue":n[10]||(n[10]=t=>e.scale=t),onChange:e.onInput},null,8,["modelValue","onChange"]),M("span",null,j(e.scale)+"%",1)]),_:1},8,["label"]),_(h,{label:e.t("props.custom"),info:Object.keys(e.formData).length>0?e.t("struct.configured"):""},{append:o(()=>[_(w,c({modelValue:e.formData,"onUpdate:modelValue":n[11]||(n[11]=t=>e.formData=t),onChange:e.onInput},{column:[{label:e.t("props.key"),key:"label"},{label:e.t("props.value"),key:"value"}],valueType:"object"}),null,16,["modelValue","onChange"])]),_:1},8,["label","info"])])}]]);
/*!
* @form-create/component-wangeditor v3.2.14
* (c) 2018-2024 xaboy
* Github https://github.com/xaboy/form-create with wangeditor
* Released under the MIT License.
*/function gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function vv(e){return(vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yv={exports:{}};window,yv.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&"object"===vv(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=141)}([function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}e.exports=n},function(e,t,n){e.exports=n(142)},function(e,t,n){n.r(t),n.d(t,"__extends",function(){return o}),n.d(t,"__assign",function(){return r}),n.d(t,"__rest",function(){return a}),n.d(t,"__decorate",function(){return l}),n.d(t,"__param",function(){return s}),n.d(t,"__metadata",function(){return c}),n.d(t,"__awaiter",function(){return u}),n.d(t,"__generator",function(){return d}),n.d(t,"__createBinding",function(){return f}),n.d(t,"__exportStar",function(){return p}),n.d(t,"__values",function(){return h}),n.d(t,"__read",function(){return m}),n.d(t,"__spread",function(){return g}),n.d(t,"__spreadArrays",function(){return v}),n.d(t,"__spreadArray",function(){return _}),n.d(t,"__await",function(){return b}),n.d(t,"__asyncGenerator",function(){return y}),n.d(t,"__asyncDelegator",function(){return x}),n.d(t,"__asyncValues",function(){return w}),n.d(t,"__makeTemplateObject",function(){return A}),n.d(t,"__importStar",function(){return C}),n.d(t,"__importDefault",function(){return S}),n.d(t,"__classPrivateFieldGet",function(){return E}),n.d(t,"__classPrivateFieldSet",function(){return T});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var i=function(e,t){return(i=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])})(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var r=function(){return r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function a(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function l(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===(typeof Reflect>"u"?"undefined":vv(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,i){t(n,i,e)}}function c(e,t){if("object"===(typeof Reflect>"u"?"undefined":vv(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,i){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,r){function a(e){try{s(i.next(e))}catch(t){r(t)}}function l(e){try{s(i.throw(e))}catch(t){r(t)}}function s(e){e.done?n(e.value):o(e.value).then(a,l)}s((i=i.apply(e,t||[])).next())})}function d(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return s([e,t])}}function s(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(l){r=[6,l],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}}var f=Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]};function p(e,t){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(t,n)&&f(t,e,n)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function v(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],a=0,l=r.length;a<l;a++,o++)i[o]=r[a];return i}function _(e,t){for(var n=0,i=t.length,o=e.length;n<i;n++,o++)e[o]=t[n];return e}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function y(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,o=n.apply(e,t||[]),r=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(e){o[e]&&(i[e]=function(t){return new Promise(function(n,i){r.push([e,t,n,i])>1||l(e,t)})})}function l(e,t){try{s(o[e](t))}catch(n){d(r[0][3],n)}}function s(e){e.value instanceof b?Promise.resolve(e.value.v).then(c,u):d(r[0][2],e)}function c(e){l("next",e)}function u(e){l("throw",e)}function d(e,t){e(t),r.shift(),r.length&&l(r[0][0],r[0][1])}}function x(e){var t,n;return t={},i("next"),i("throw",function(e){throw e}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,o){t[i]=e[i]?function(t){return(n=!n)?{value:b(e[i](t)),done:"return"===i}:o?o(t):t}:o}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof h?h(e):e[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise(function(i,r){o(i,r,(t=e[n](t)).done,t.value)})}}function o(e,t,n,i){Promise.resolve(i).then(function(t){e({value:t,done:n})},t)}}function A(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&f(t,e,n);return k(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function T(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(89)),a=i(n(4)),l=i(n(26)),s=i(n(17)),c=i(n(121)),u=i(n(27)),d=i(n(91)),f=i(n(70)),p=i(n(28)),h=i(n(57));(0,o.default)(t,"__esModule",{value:!0}),t.DomElement=void 0;var m=n(2),g=n(6),v=[];function _(e){var t=document.createElement("div");t.innerHTML=e;var n=t.children;return g.toArray(n)}function b(e){return!!e&&(e instanceof HTMLCollection||e instanceof NodeList)}function y(e){var t=document.querySelectorAll(e);return g.toArray(t)}function x(e){var t=[],n=[];return t=(0,r.default)(e)?e:e.split(";"),(0,a.default)(t).call(t,function(e){var t,i=(0,l.default)(t=e.split(":")).call(t,function(e){return(0,s.default)(e).call(e)});2===i.length&&n.push(i[0]+":"+i[1])}),n}var w=function(){function e(t){if(this.elems=[],this.length=this.elems.length,this.dataSource=new c.default,t){if(t instanceof e)return t;var n=[],i=t instanceof Node?t.nodeType:-1;if(this.selector=t,1===i||9===i)n=[t];else if(b(t))n=g.toArray(t);else if(t instanceof Array)n=t;else if("string"==typeof t){var o,r=(0,s.default)(o=t.replace("/\n/mg","")).call(o);n=0===(0,u.default)(r).call(r,"<")?_(r):y(r)}var a=n.length;if(!a)return this;for(var l=0;l<a;l++)this.elems.push(n[l]);this.length=a}}return(0,o.default)(e.prototype,"id",{get:function(){return this.elems[0].id},enumerable:!1,configurable:!0}),e.prototype.forEach=function(e){for(var t=0;t<this.length;t++){var n=this.elems[t];if(!1===e.call(n,n,t))break}return this},e.prototype.clone=function(e){var t;void 0===e&&(e=!1);var n=[];return(0,a.default)(t=this.elems).call(t,function(t){n.push(t.cloneNode(!!e))}),A(n)},e.prototype.get=function(e){void 0===e&&(e=0);var t=this.length;return e>=t&&(e%=t),A(this.elems[e])},e.prototype.first=function(){return this.get(0)},e.prototype.last=function(){var e=this.length;return this.get(e-1)},e.prototype.on=function(e,t,n){var i;return e?("function"==typeof t&&(n=t,t=""),(0,a.default)(i=this).call(i,function(i){if(t){var o=function(e){var i=e.target;i.matches(t)&&n.call(i,e)};i.addEventListener(e,o),v.push({elem:i,selector:t,fn:n,agentFn:o})}else i.addEventListener(e,n)})):this},e.prototype.off=function(e,t,n){var i;return e?("function"==typeof t&&(n=t,t=""),(0,a.default)(i=this).call(i,function(i){if(t){for(var o=-1,r=0;r<v.length;r++){var a=v[r];if(a.selector===t&&a.fn===n&&a.elem===i){o=r;break}}if(-1!==o){var l=(0,d.default)(v).call(v,o,1)[0].agentFn;i.removeEventListener(e,l)}}else i.removeEventListener(e,n)})):this},e.prototype.attr=function(e,t){var n;return null==t?this.elems[0].getAttribute(e)||"":(0,a.default)(n=this).call(n,function(n){n.setAttribute(e,t)})},e.prototype.removeAttr=function(e){var t;(0,a.default)(t=this).call(t,function(t){t.removeAttribute(e)})},e.prototype.addClass=function(e){var t;return e?(0,a.default)(t=this).call(t,function(t){if(t.className){var n=t.className.split(/\s/);n=(0,f.default)(n).call(n,function(e){return!!(0,s.default)(e).call(e)}),(0,u.default)(n).call(n,e)<0&&n.push(e),t.className=n.join(" ")}else t.className=e}):this},e.prototype.removeClass=function(e){var t;return e?(0,a.default)(t=this).call(t,function(t){if(t.className){var n=t.className.split(/\s/);n=(0,f.default)(n).call(n,function(t){return!(!(t=(0,s.default)(t).call(t))||t===e)}),t.className=n.join(" ")}}):this},e.prototype.hasClass=function(e){if(!e)return!1;var t=this.elems[0];if(!t.className)return!1;var n=t.className.split(/\s/);return(0,p.default)(n).call(n,e)},e.prototype.css=function(e,t){var n,i;return i=""==t?"":e+":"+t+";",(0,a.default)(n=this).call(n,function(t){var n,o=(0,s.default)(n=t.getAttribute("style")||"").call(n);if(o){var r=x(o);r=(0,l.default)(r).call(r,function(t){return 0===(0,u.default)(t).call(t,e)?i:t}),""!=i&&(0,u.default)(r).call(r,i)<0&&r.push(i),""==i&&(r=x(r)),t.setAttribute("style",r.join("; "))}else t.setAttribute("style",i)})},e.prototype.getBoundingClientRect=function(){return this.elems[0].getBoundingClientRect()},e.prototype.show=function(){return this.css("display","block")},e.prototype.hide=function(){return this.css("display","none")},e.prototype.children=function(){var e=this.elems[0];return e?A(e.children):null},e.prototype.childNodes=function(){var e=this.elems[0];return e?A(e.childNodes):null},e.prototype.replaceChildAll=function(e){for(var t=this.getNode(),n=this.elems[0];n.hasChildNodes();)t.firstChild&&n.removeChild(t.firstChild);this.append(e)},e.prototype.append=function(e){var t;return(0,a.default)(t=this).call(t,function(t){(0,a.default)(e).call(e,function(e){t.appendChild(e)})})},e.prototype.remove=function(){var e;return(0,a.default)(e=this).call(e,function(e){if(e.remove)e.remove();else{var t=e.parentElement;t&&t.removeChild(e)}})},e.prototype.isContain=function(e){var t=this.elems[0],n=e.elems[0];return t.contains(n)},e.prototype.getNodeName=function(){return this.elems[0].nodeName},e.prototype.getNode=function(e){return void 0===e&&(e=0),this.elems[e]},e.prototype.find=function(e){return A(this.elems[0].querySelectorAll(e))},e.prototype.text=function(e){var t;return e?(0,a.default)(t=this).call(t,function(t){t.innerHTML=e}):this.elems[0].innerHTML.replace(/<[^>]+>/g,function(){return""})},e.prototype.html=function(e){var t=this.elems[0];return e?(t.innerHTML=e,this):t.innerHTML},e.prototype.val=function(){var e,t=this.elems[0];return(0,s.default)(e=t.value).call(e)},e.prototype.focus=function(){var e;return(0,a.default)(e=this).call(e,function(e){e.focus()})},e.prototype.prev=function(){return A(this.elems[0].previousElementSibling)},e.prototype.next=function(){return A(this.elems[0].nextElementSibling)},e.prototype.getNextSibling=function(){return A(this.elems[0].nextSibling)},e.prototype.parent=function(){return A(this.elems[0].parentElement)},e.prototype.parentUntil=function(e,t){var n=t||this.elems[0];if("BODY"===n.nodeName)return null;var i=n.parentElement;return null===i?null:i.matches(e)?A(i):this.parentUntil(e,i)},e.prototype.parentUntilEditor=function(e,t,n){var i=n||this.elems[0];if(A(i).equal(t.$textContainerElem)||A(i).equal(t.$toolbarElem))return null;var o=i.parentElement;return null===o?null:o.matches(e)?A(o):this.parentUntilEditor(e,t,o)},e.prototype.equal=function(t){return t instanceof e?this.elems[0]===t.elems[0]:t instanceof HTMLElement&&this.elems[0]===t},e.prototype.insertBefore=function(e){var t,n=A(e).elems[0];return n?(0,a.default)(t=this).call(t,function(e){var t=n.parentNode;null==t||t.insertBefore(e,n)}):this},e.prototype.insertAfter=function(e){var t,n=A(e).elems[0],i=n&&n.nextSibling;return n?(0,a.default)(t=this).call(t,function(e){var t=n.parentNode;i?t.insertBefore(e,i):t.appendChild(e)}):this},e.prototype.data=function(e,t){if(null==t)return this.dataSource.get(e);this.dataSource.set(e,t)},e.prototype.getNodeTop=function(e){if(this.length<1)return this;var t=this.parent();return e.$textElem.equal(this)||e.$textElem.equal(t)?this:(t.prior=this,t.getNodeTop(e))},e.prototype.getOffsetData=function(){var e=this.elems[0];return{top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight,parent:e.offsetParent}},e.prototype.scrollTop=function(e){this.elems[0].scrollTo({top:e})},e}();function A(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new((0,h.default)(w).apply(w,m.__spreadArrays([void 0],e)))}t.DomElement=w,t.default=A},function(e,t,n){e.exports=n(180)},function(e,t,n){var i=n(8),o=n(71).f,r=n(101),a=n(9),l=n(40),s=n(19),c=n(16),u=function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,d,f,p,h,m,g,v,_=e.target,b=e.global,y=e.stat,x=e.proto,w=b?i:y?i[_]:(i[_]||{}).prototype,A=b?a:a[_]||(a[_]={}),k=A.prototype;for(f in t)n=!r(b?f:_+(y?".":"#")+f,e.forced)&&w&&c(w,f),h=A[f],n&&(m=e.noTargetGet?(v=o(w,f))&&v.value:w[f]),p=n&&m?m:t[f],(!n||vv(h)!==vv(p))&&(g=e.bind&&n?l(p,i):e.wrap&&n?u(p):x&&"function"==typeof p?l(Function.call,p):p,(e.sham||p&&p.sham||h&&h.sham)&&s(g,"sham",!0),A[f]=g,x&&(c(a,d=_+"Prototype")||s(a,d,{}),a[d][f]=p,e.real&&k&&!k[f]&&s(k,f,p)))}},function(e,t,n){var i=n(0),o=i(n(92)),r=i(n(1)),a=i(n(256)),l=i(n(45)),s=i(n(46)),c=i(n(89)),u=i(n(26));(0,r.default)(t,"__esModule",{value:!0}),t.hexToRgb=t.getRandomCode=t.toArray=t.deepClone=t.isFunction=t.debounce=t.throttle=t.arrForEach=t.forEach=t.replaceSpecialSymbol=t.replaceHtmlSymbol=t.getRandom=t.UA=void 0;var d=n(2),f=function(){function e(){this._ua=navigator.userAgent;var e=this._ua.match(/(Edge?)\/(\d+)/);this.isOldEdge=!!(e&&"Edge"==e[1]&&(0,a.default)(e[2])<19),this.isFirefox=!(!/Firefox\/\d+/.test(this._ua)||/Seamonkey\/\d+/.test(this._ua))}return e.prototype.isIE=function(){return"ActiveXObject"in window},e.prototype.isWebkit=function(){return/webkit/i.test(this._ua)},e}();function p(e){var t;return void 0===e&&(e=""),e+(0,l.default)(t=Math.random().toString()).call(t,2)}function h(e){return e.replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;").replace(/(\r\n|\r|\n)/g,"<br/>")}function m(e){return e.replace(/&lt;/gm,"<").replace(/&gt;/gm,">").replace(/&quot;/gm,'"')}function g(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!1===t(n,e[n]))break}function v(e,t){var n,i,o=e.length||0;for(n=0;n<o&&(i=e[n],!1!==t.call(e,i,n));n++);}function _(e,t){void 0===t&&(t=200);var n=!1;return function(){for(var i=this,o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];n||(n=!0,(0,s.default)(function(){n=!1,e.call.apply(e,d.__spreadArrays([i],o))},t))}}function b(e,t){void 0===t&&(t=200);var n=0;return function(){for(var i=this,o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];n&&window.clearTimeout(n),n=(0,s.default)(function(){n=0,e.call.apply(e,d.__spreadArrays([i],o))},t)}}function y(e){return"function"==typeof e}function x(e){if("object"!==(0,o.default)(e)||"function"==typeof e||null===e)return e;var t;for(var n in(0,c.default)(e)&&(t=[]),(0,c.default)(e)||(t={}),e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=x(e[n]));return t}function w(e){return(0,l.default)(Array.prototype).call(e)}function A(){var e;return(0,l.default)(e=Math.random().toString(36)).call(e,-5)}function k(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(null==t)return null;var n=(0,u.default)(t).call(t,function(e){return(0,a.default)(e,16)});return"rgb("+n[1]+", "+n[2]+", "+n[3]+")"}t.UA=new f,t.getRandom=p,t.replaceHtmlSymbol=h,t.replaceSpecialSymbol=m,t.forEach=g,t.arrForEach=v,t.throttle=_,t.debounce=b,t.isFunction=y,t.deepClone=x,t.toArray=w,t.getRandomCode=A,t.hexToRgb=k},function(e,t,n){function i(){}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.EMPTY_P_REGEX=t.EMPTY_P_LAST_REGEX=t.EMPTY_P=t.urlRegex=t.EMPTY_FN=void 0,t.EMPTY_FN=i,t.urlRegex=/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-.,@?^=%&amp;:/~+#]*[\w\-@?^=%&amp;/~+#])?/g,t.EMPTY_P='<p data-we-empty-p=""><br></p>',t.EMPTY_P_LAST_REGEX=/<p data-we-empty-p=""><br\/?><\/p>$/gim,t.EMPTY_P_REGEX=/<p data-we-empty-p="">/gim},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==(typeof globalThis>"u"?"undefined":vv(globalThis))&&globalThis)||n("object"==(typeof window>"u"?"undefined":vv(window))&&window)||n("object"==(typeof self>"u"?"undefined":vv(self))&&self)||n("object"==vv(t)&&t)||Function("return this")()}).call(this,n(145))},function(e,t){e.exports={}},function(e,t,n){var i=n(8),o=n(74),r=n(16),a=n(64),l=n(76),s=n(106),c=o("wks"),u=i.Symbol,d=s?u:u&&u.withoutSetter||a;e.exports=function(e){return r(c,e)||(l&&r(u,e)?c[e]=u[e]:c[e]=d("Symbol."+e)),c[e]}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var i=n(9),o=n(16),r=n(93),a=n(18).f;e.exports=function(e){var t=i.Symbol||(i.Symbol={});o(t,e)||a(t,e,{value:r.f(e)})}},function(e,t){e.exports=function(e){return"object"===vv(e)?null!==e:"function"==typeof e}},function(e,t,n){var i=n(11);e.exports=!i(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},function(e,t,n){var i=n(9);e.exports=function(e){return i[e+"Prototype"]}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){e.exports=n(192)},function(e,t,n){var i=n(14),o=n(100),r=n(25),a=n(60),l=Object.defineProperty;t.f=i?l:function(e,t,n){if(r(e),t=a(t,!0),r(n),o)try{return l(e,t,n)}catch(i){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(14),o=n(18),r=n(48);e.exports=i?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var i=function(){var e;return function(){return typeof e>"u"&&(e=Boolean(window&&document&&document.all&&!window.atob)),e}}(),o=function(){var e={};return function(t){if(typeof e[t]>"u"){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(i){n=null}e[t]=n}return e[t]}}(),r=[];function a(e){for(var t=-1,n=0;n<r.length;n++)if(r[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},i=[],o=0;o<e.length;o++){var l=e[o],s=t.base?l[0]+t.base:l[0],c=n[s]||0,u="".concat(s," ").concat(c);n[s]=c+1;var d=a(u),f={css:l[1],media:l[2],sourceMap:l[3]};-1!==d?(r[d].references++,r[d].updater(f)):r.push({identifier:u,updater:m(f,t),references:1}),i.push(u)}return i}function s(e){var t=document.createElement("style"),i=e.attributes||{};if(typeof i.nonce>"u"){var r=n.nc;r&&(i.nonce=r)}if(Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])}),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}function c(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}var u=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function d(e,t,n,i){var o=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var r=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}function f(e,t,n){var i=n.css,o=n.media,r=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),r&&typeof btoa<"u"&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var p=null,h=0;function m(e,t){var n,i,o;if(t.singleton){var r=h++;n=p||(p=s(t)),i=d.bind(null,n,r,!1),o=d.bind(null,n,r,!0)}else n=s(t),i=f.bind(null,n,t),o=function(){c(n)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}e.exports=function(e,t){!(t=t||{}).singleton&&"boolean"!=typeof t.singleton&&(t.singleton=i());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<n.length;i++){var o=a(n[i]);r[o].references--}for(var s=l(e,t),c=0;c<n.length;c++){var u=a(n[c]);0===r[u].references&&(r[u].updater(),r.splice(u,1))}n=s}}}},function(e,t,n){function i(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var r=o(i),a=i.sources.map(function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")});return[n].concat(a).concat([r]).join("\n")}return[n].join("\n")}function o(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(n," */")}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=i(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n}).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(i)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(o[a]=!0)}for(var l=0;l<e.length;l++){var s=[].concat(e[l]);i&&o[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),t.push(s))}},t}},function(e,t,n){var i=n(14),o=n(11),r=n(16),a=Object.defineProperty,l={},s=function(e){throw e};e.exports=function(e,t){if(r(l,e))return l[e];t||(t={});var n=[][e],c=!!r(t,"ACCESSORS")&&t.ACCESSORS,u=r(t,0)?t[0]:s,d=r(t,1)?t[1]:void 0;return l[e]=!!n&&!o(function(){if(c&&!i)return!0;var e={length:-1};c?a(e,1,{enumerable:!0,get:s}):e[1]=1,n.call(e,u,d)})}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=function(e){function t(t,n){return e.call(this,t,n)||this}return i.__extends(t,e),t}(i.__importDefault(n(95)).default);t.default=o},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4)),a=i(n(46));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(3)),c=l.__importDefault(n(95)),u=l.__importDefault(n(134)),d=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;i.title=n.i18next.t("menus.dropListMenu."+i.title);var l,c="zh-CN"===n.config.lang?"":"w-e-drop-list-tl";""!==c&&"list"===i.type&&(0,r.default)(l=i.list).call(l,function(e){var t=e.$elem,n=s.default(t.children());if(n.length>0){var i=null==n?void 0:n.getNodeName();i&&"I"===i&&t.addClass(c)}});var d=new u.default(o,i);return o.dropList=d,t.on("click",function(){var e;null!=n.selection.getRange()&&(t.css("z-index",n.zIndex.get("menu")),(0,r.default)(e=n.txt.eventHooks.dropListMenuHoverEvents).call(e,function(e){return e()}),d.show())}).on("mouseleave",function(){t.css("z-index","auto"),d.hideTimeoutId=(0,a.default)(function(){d.hide()})}),o}return l.__extends(t,e),t}(c.default);t.default=d},function(e,t,n){var i=n(13);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){e.exports=n(188)},function(e,t,n){e.exports=n(201)},function(e,t,n){e.exports=n(213)},function(e,t,n){e.exports=n(283)},function(e,t,n){var i=n(72),o=n(49);e.exports=function(e){return i(o(e))}},function(e,t,n){var i=n(49);e.exports=function(e){return Object(i(e))}},function(e,t,n){var i=n(40),o=n(72),r=n(31),a=n(35),l=n(88),s=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,u=4==e,d=6==e,f=5==e||d;return function(p,h,m,g){for(var v,_,b=r(p),y=o(b),x=i(h,m,3),w=a(y.length),A=0,k=g||l,C=t?k(p,w):n?k(p,0):void 0;w>A;A++)if((f||A in y)&&(_=x(v=y[A],A,b),e))if(t)C[A]=_;else if(_)switch(e){case 3:return!0;case 5:return v;case 6:return A;case 2:s.call(C,v)}else if(u)return!1;return d?-1:c||u?u:C}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4)),a=i(n(29)),l=i(n(132));(0,o.default)(t,"__esModule",{value:!0});var s=n(2),c=s.__importDefault(n(3)),u=n(7),d=function(){function e(t,n){this.menu=t,this.conf=n,this.$container=c.default('<div class="w-e-panel-container"></div>');var i=t.editor;i.txt.eventHooks.clickEvents.push(e.hideCurAllPanels),i.txt.eventHooks.toolbarClickEvents.push(e.hideCurAllPanels),i.txt.eventHooks.dropListMenuHoverEvents.push(e.hideCurAllPanels)}return e.prototype.create=function(){var t=this,n=this.menu;if(!e.createdMenus.has(n)){var i=this.conf,o=this.$container,l=i.width||300,d=n.editor.$toolbarElem.getBoundingClientRect(),f=n.$elem.getBoundingClientRect(),p=d.height+d.top-f.top,h=(d.width-l)/2+d.left-f.left,m=300;Math.abs(h)>m&&(h=f.left<document.documentElement.clientWidth/2?-f.width/2:-l+f.width/2),o.css("width",l+"px").css("margin-top",p+"px").css("margin-left",h+"px").css("z-index",n.editor.zIndex.get("panel"));var g=c.default('<i class="w-e-icon-close w-e-panel-close"></i>');o.append(g),g.on("click",function(){t.remove()});var v=c.default('<ul class="w-e-panel-tab-title"></ul>'),_=c.default('<div class="w-e-panel-tab-content"></div>');o.append(v).append(_);var b=i.height;b&&_.css("height",b+"px").css("overflow-y","auto");var y=i.tabs||[],x=[],w=[];(0,r.default)(y).call(y,function(e,t){if(e){var n=e.title||"",i=e.tpl||"",o=c.default('<li class="w-e-item">'+n+"</li>");v.append(o);var a=c.default(i);_.append(a),x.push(o),w.push(a),0===t?(o.data("active",!0),o.addClass("w-e-active")):a.hide(),o.on("click",function(){o.data("active")||((0,r.default)(x).call(x,function(e){e.data("active",!1),e.removeClass("w-e-active")}),(0,r.default)(w).call(w,function(e){e.hide()}),o.data("active",!0),o.addClass("w-e-active"),a.show())})}}),o.on("click",function(e){e.stopPropagation()}),n.$elem.append(o),i.setLinkValue&&i.setLinkValue(o,"text"),i.setLinkValue&&i.setLinkValue(o,"link"),(0,r.default)(y).call(y,function(e,n){if(e){var i=e.events||[];(0,r.default)(i).call(i,function(e){var i,o=e.selector,r=e.type,l=e.fn||u.EMPTY_FN,c=w[n],d=null!==(i=e.bindEnter)&&void 0!==i&&i,f=function(e){return s.__awaiter(t,void 0,void 0,function(){return s.__generator(this,function(t){switch(t.label){case 0:return e.stopPropagation(),[4,l(e)];case 1:return t.sent()&&this.remove(),[2]}})})};(0,a.default)(c).call(c,o).on(r,f),d&&"click"===r&&c.on("keyup",function(e){13==e.keyCode&&f(e)})})}});var A=(0,a.default)(o).call(o,"input[type=text],textarea");A.length&&A.get(0).focus(),e.hideCurAllPanels(),n.setPanel(this),e.createdMenus.add(n)}},e.prototype.remove=function(){var t=this.menu,n=this.$container;n&&n.remove(),e.createdMenus.delete(t)},e.hideCurAllPanels=function(){var t;0!==e.createdMenus.size&&(0,r.default)(t=e.createdMenus).call(t,function(e){var t=e.panel;t&&t.remove()})},e.createdMenus=new l.default,e}();t.default=d},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var i=n(62),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},function(e,t,n){var i=n(9),o=n(8),r=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?r(i[e])||r(o[e]):i[e]&&i[e][t]||o[e]&&o[e][t]}},function(e,t,n){var i=n(81),o=n(18).f,r=n(19),a=n(16),l=n(170),s=n(10)("toStringTag");e.exports=function(e,t,n,c){if(e){var u=n?e:e.prototype;a(u,s)||o(u,s,{configurable:!0,value:t}),c&&!i&&r(u,"toString",l)}}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=function(e){function t(t,n){return e.call(this,t,n)||this}return i.__extends(t,e),t.prototype.setPanel=function(e){this.panel=e},t}(i.__importDefault(n(95)).default);t.default=o},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4)),a=i(n(57));(0,o.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3)),s=function(){function e(e,t,n){this.editor=e,this.$targetElem=t,this.conf=n,this._show=!1,this._isInsertTextContainer=!1;var i=l.default("<div></div>");i.addClass("w-e-tooltip"),this.$container=i}return e.prototype.getPositionData=function(){var e=this.$container,t=0,n=0,i=20,o=document.documentElement.scrollTop,r=this.$targetElem.getBoundingClientRect(),a=this.editor.$textElem.getBoundingClientRect(),s=this.$targetElem.getOffsetData(),c=l.default(s.parent),u=this.editor.$textElem.elems[0].scrollTop;if(this._isInsertTextContainer=c.equal(this.editor.$textContainerElem),this._isInsertTextContainer){var d=c.getBoundingClientRect().height,f=s.top,p=s.left,h=s.height,m=f-u;m>i+5?(t=m-i-15,e.addClass("w-e-tooltip-up")):m+h+i<d?(t=m+h+10,e.addClass("w-e-tooltip-down")):(t=(m>0?m:0)+i+10,e.addClass("w-e-tooltip-down")),n=p<0?0:p}else r.top<i||r.top-a.top<i?(t=r.bottom+o+5,e.addClass("w-e-tooltip-down")):(t=r.top+o-i-15,e.addClass("w-e-tooltip-up")),n=r.left<0?0:r.left;return{top:t,left:n}},e.prototype.appendMenus=function(){var e=this,t=this.conf,n=this.editor,i=this.$targetElem,o=this.$container;(0,r.default)(t).call(t,function(t,r){var a=t.$elem,s=l.default("<div></div>");s.addClass("w-e-tooltip-item-wrapper "),s.append(a),o.append(s),a.on("click",function(o){o.preventDefault(),t.onClick(n,i)&&e.remove()})})},e.prototype.create=function(){var e,t,n=this.editor,i=this.$container;this.appendMenus();var o=this.getPositionData(),r=o.top,s=o.left;i.css("top",r+"px"),i.css("left",s+"px"),i.css("z-index",n.zIndex.get("tooltip")),this._isInsertTextContainer?this.editor.$textContainerElem.append(i):l.default("body").append(i),this._show=!0,n.beforeDestroy((0,a.default)(e=this.remove).call(e,this)),n.txt.eventHooks.onBlurEvents.push((0,a.default)(t=this.remove).call(t,this))},e.prototype.remove=function(){this.$container.remove(),this._show=!1},(0,o.default)(e.prototype,"isShow",{get:function(){return this._show},enumerable:!1,configurable:!0}),e}();t.default=s},function(e,t,n){var i=n(41);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var i,o,r,a=n(165),l=n(8),s=n(13),c=n(19),u=n(16),d=n(63),f=n(51),p=l.WeakMap,h=function(e){return r(e)?o(e):i(e,{})},m=function(e){return function(t){var n;if(!s(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(a){var g=new p,v=g.get,_=g.has,b=g.set;i=function(e,t){return b.call(g,e,t),t},o=function(e){return v.call(g,e)||{}},r=function(e){return _.call(g,e)}}else{var y=d("state");f[y]=!0,i=function(e,t){return c(e,y,t),t},o=function(e){return u(e,y)?e[y]:{}},r=function(e){return u(e,y)}}e.exports={set:i,get:o,has:r,enforce:h,getterFor:m}},function(e,t){e.exports=!0},function(e,t){e.exports={}},function(e,t,n){e.exports=n(261)},function(e,t,n){e.exports=n(265)},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0}),t.createElementFragment=t.createDocumentFragment=t.createElement=t.insertBefore=t.getEndPoint=t.getStartPoint=t.updateRange=t.filterSelectionNodes=void 0;var a=n(2),l=n(137),s=a.__importDefault(n(3));function c(e){var t=[];return(0,r.default)(e).call(e,function(e){var n=e.getNodeName();if(n!==l.ListType.OrderedList&&n!==l.ListType.UnorderedList)t.push(e);else if(e.prior)t.push(e.prior);else{var i=e.children();null==i||(0,r.default)(i).call(i,function(e){t.push(s.default(e))})}}),t}function u(e,t,n){var i=e.selection,o=document.createRange();t.length>1?(o.setStart(t.elems[0],0),o.setEnd(t.elems[t.length-1],t.elems[t.length-1].childNodes.length)):o.selectNodeContents(t.elems[0]),n&&o.collapse(!1),i.saveRange(o),i.restoreSelection()}function d(e){var t;return e.prior?e.prior:s.default(null===(t=e.children())||void 0===t?void 0:t.elems[0])}function f(e){var t;return e.prior?e.prior:s.default(null===(t=e.children())||void 0===t?void 0:t.last().elems[0])}function p(e,t,n){void 0===n&&(n=null),e.parent().elems[0].insertBefore(t,n)}function h(e){return document.createElement(e)}function m(){return document.createDocumentFragment()}function g(e,t,n){return void 0===n&&(n="li"),(0,r.default)(e).call(e,function(e){var i=h(n);i.innerHTML=e.html(),t.appendChild(i),e.remove()}),t}t.filterSelectionNodes=c,t.updateRange=u,t.getStartPoint=d,t.getEndPoint=f,t.insertBefore=p,t.createElement=h,t.createDocumentFragment=m,t.createElementFragment=g},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var i=n(164).charAt,o=n(42),r=n(75),a="String Iterator",l=o.set,s=o.getterFor(a);r(String,"String",function(e){l(this,{type:a,string:String(e),index:0})},function(){var e,t=s(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=i(n,o),t.index+=e.length,{value:e,done:!1})})},function(e,t){e.exports={}},function(e,t,n){var i=n(107),o=n(80);e.exports=Object.keys||function(e){return i(e,o)}},function(e,t,n){var i=n(19);e.exports=function(e,t,n,o){o&&o.enumerable?e[t]=n:i(e,t,n)}},function(e,t,n){n(173);var i=n(174),o=n(8),r=n(65),a=n(19),l=n(44),s=n(10)("toStringTag");for(var c in i){var u=o[c],d=u&&u.prototype;d&&r(d)!==s&&a(d,s,c),l[c]=l.Array}},function(e,t,n){var i=n(34);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(11),o=n(10),r=n(86),a=o("species");e.exports=function(e){return r>=51||!i(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},function(e,t,n){e.exports=n(222)},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.ListHandle=void 0;var i=n(2).__importDefault(n(373)),o=function(){function e(e){this.options=e,this.selectionRangeElem=new i.default}return e}();t.ListHandle=o},function(e,t,n){var i={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,r=o&&!i.call({1:2},1);t.f=r?function(e){var t=o(this,e);return!!t&&t.enumerable}:i},function(e,t,n){var i=n(13);e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e))||"function"==typeof(n=e.valueOf)&&!i(o=n.call(e))||!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,n){var i=n(74),o=n(64),r=i("keys");e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+i).toString(36)}},function(e,t,n){var i=n(81),o=n(34),r=n(10)("toStringTag"),a="Arguments"==o(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(n){}};e.exports=i?o:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=l(t=Object(e),r))?n:a?o(t):"Object"==(i=o(t))&&"function"==typeof t.callee?"Arguments":i}},function(e,t,n){var i=n(25),o=n(112),r=n(35),a=n(40),l=n(113),s=n(114),c=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,u,d){var f,p,h,m,g,v,_,b=a(t,n,u?2:1);if(d)f=e;else{if("function"!=typeof(p=l(e)))throw TypeError("Target is not iterable");if(o(p)){for(h=0,m=r(e.length);m>h;h++)if((g=u?b(i(_=e[h])[0],_[1]):b(e[h]))&&g instanceof c)return g;return new c(!1)}f=p.call(e)}for(v=f.next;!(_=v.call(f)).done;)if("object"==vv(g=s(f,b,_.value,u))&&g&&g instanceof c)return g;return new c(!1)}).stop=function(e){return new c(!0,e)}},function(e,t,n){var i=n(11);e.exports=function(e,t){var n=[][e];return!!n&&i(function(){n.call(null,t||function(){throw 1},1)})}},function(e,t){e.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},function(e,t,n){var i=n(60),o=n(18),r=n(48);e.exports=function(e,t,n){var a=i(t);a in e?o.f(e,a,r(0,n)):e[a]=n}},function(e,t,n){e.exports=n(209)},function(e,t,n){var i=n(14),o=n(59),r=n(48),a=n(30),l=n(60),s=n(16),c=n(100),u=Object.getOwnPropertyDescriptor;t.f=i?u:function(e,t){if(e=a(e),t=l(t,!0),c)try{return u(e,t)}catch(n){}if(s(e,t))return r(!o.f.call(e,t),e[t])}},function(e,t,n){var i=n(11),o=n(34),r="".split;e.exports=i(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==o(e)?r.call(e,""):Object(e)}:Object},function(e,t,n){var i=n(8),o=n(13),r=i.document,a=o(r)&&o(r.createElement);e.exports=function(e){return a?r.createElement(e):{}}},function(e,t,n){var i=n(43),o=n(103);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var i=n(5),o=n(167),r=n(105),a=n(171),l=n(37),s=n(19),c=n(53),u=n(10),d=n(43),f=n(44),p=n(104),h=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,g=u("iterator"),v="keys",_="values",b="entries",y=function(){return this};e.exports=function(e,t,n,u,p,x,w){o(n,t,u);var A,k,C,S=function(e){if(e===p&&M)return M;if(!m&&e in R)return R[e];switch(e){case v:case _:case b:return function(){return new n(this,e)}}return function(){return new n(this)}},E=t+" Iterator",T=!1,R=e.prototype,O=R[g]||R["@@iterator"]||p&&R[p],M=!m&&O||S(p),D="Array"==t&&R.entries||O;if(D&&(A=r(D.call(new e)),h!==Object.prototype&&A.next&&(!d&&r(A)!==h&&(a?a(A,h):"function"!=typeof A[g]&&s(A,g,y)),l(A,E,!0,!0),d&&(f[E]=y))),p==_&&O&&O.name!==_&&(T=!0,M=function(){return O.call(this)}),(!d||w)&&R[g]!==M&&s(R,g,M),f[t]=M,p)if(k={values:S(_),keys:x?M:S(v),entries:S(b)},w)for(C in k)(m||T||!(C in R))&&c(R,C,k[C]);else i({target:t,proto:!0,forced:m||T},k);return k}},function(e,t,n){var i=n(11);e.exports=!!Object.getOwnPropertySymbols&&!i(function(){return!String(Symbol())})},function(e,t,n){var i,o=n(25),r=n(169),a=n(80),l=n(51),s=n(108),c=n(73),u=n(63),d=">",f="<",p="prototype",h="script",m=u("IE_PROTO"),g=function(){},v=function(e){return f+h+d+e+f+"/"+h+d},_=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=c("iframe"),n="java"+h+":";return t.style.display="none",s.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F},y=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(t){}y=i?_(i):b();for(var e=a.length;e--;)delete y[p][a[e]];return y()};l[m]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(g[p]=o(e),n=new g,g[p]=null,n[m]=e):n=y(),void 0===t?n:r(n,t)}},function(e,t,n){var i=n(30),o=n(35),r=n(79),a=function(e){return function(t,n,a){var l,s=i(t),c=o(s.length),u=r(a,c);if(e&&n!=n){for(;c>u;)if((l=s[u++])!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var i=n(62),o=Math.max,r=Math.min;e.exports=function(e,t){var n=i(e);return n<0?o(n+t,0):r(n,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var i={};i[n(10)("toStringTag")]="z",e.exports="[object z]"===String(i)},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var i=n(36);e.exports=i("navigator","userAgent")||""},function(e,t,n){var i=n(41),o=function(e){var t,n;this.promise=new e(function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i}),this.resolve=i(t),this.reject=i(n)};e.exports.f=function(e){return new o(e)}},function(e,t,n){var i,o,r=n(8),a=n(84),l=r.process,s=l&&l.versions,c=s&&s.v8;c?o=(i=c.split("."))[0]+i[1]:a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=i[1]),e.exports=o&&+o},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(6),c=a.__importDefault(n(267)),u=a.__importDefault(n(280)),d=a.__importDefault(n(281)),f=a.__importDefault(n(282)),p=a.__importDefault(n(301)),h=a.__importStar(n(416)),m=a.__importDefault(n(417)),g=a.__importDefault(n(418)),v=a.__importDefault(n(419)),_=a.__importStar(n(420)),b=a.__importDefault(n(423)),y=a.__importDefault(n(424)),x=a.__importDefault(n(425)),w=a.__importDefault(n(427)),A=a.__importDefault(n(437)),k=a.__importDefault(n(440)),C=a.__importStar(n(441)),S=a.__importDefault(n(23)),E=a.__importDefault(n(134)),T=a.__importDefault(n(24)),R=a.__importDefault(n(33)),O=a.__importDefault(n(38)),M=a.__importDefault(n(39)),D=1,N=function(){function e(e,t){this.pluginsFunctionList={},this.beforeDestroyHooks=[],this.id="wangEditor-"+D++,this.toolbarSelector=e,this.textSelector=t,h.selectorValidator(this),this.config=s.deepClone(c.default),this.$toolbarElem=l.default("<div></div>"),this.$textContainerElem=l.default("<div></div>"),this.$textElem=l.default("<div></div>"),this.toolbarElemId="",this.textElemId="",this.isFocus=!1,this.isComposing=!1,this.isCompatibleMode=!1,this.selection=new u.default(this),this.cmd=new d.default(this),this.txt=new f.default(this),this.menus=new p.default(this),this.zIndex=new y.default,this.change=new x.default(this),this.history=new w.default(this),this.onSelectionChange=new k.default(this);var n=A.default(this),i=n.disable,o=n.enable;this.disable=i,this.enable=o,this.isEnable=!0}return e.prototype.initSelection=function(e){m.default(this,e)},e.prototype.create=function(){this.zIndex.init(this),this.isCompatibleMode=this.config.compatibleMode(),this.isCompatibleMode||(this.config.onchangeTimeout=30),v.default(this),h.default(this),this.txt.init(),this.menus.init(),_.default(this),this.initSelection(!0),g.default(this),this.change.observe(),this.history.observe(),C.default(this)},e.prototype.beforeDestroy=function(e){return this.beforeDestroyHooks.push(e),this},e.prototype.destroy=function(){var e,t=this;(0,r.default)(e=this.beforeDestroyHooks).call(e,function(e){return e.call(t)}),this.$toolbarElem.remove(),this.$textContainerElem.remove()},e.prototype.fullScreen=function(){_.setFullScreen(this)},e.prototype.unFullScreen=function(){_.setUnFullScreen(this)},e.prototype.scrollToHead=function(e){b.default(this,e)},e.registerMenu=function(t,n){!n||"function"!=typeof n||(e.globalCustomMenuConstructorList[t]=n)},e.prototype.registerPlugin=function(e,t){C.registerPlugin(e,t,this.pluginsFunctionList)},e.registerPlugin=function(t,n){C.registerPlugin(t,n,e.globalPluginsFunctionList)},e.$=l.default,e.BtnMenu=S.default,e.DropList=E.default,e.DropListMenu=T.default,e.Panel=R.default,e.PanelMenu=O.default,e.Tooltip=M.default,e.globalCustomMenuConstructorList={},e.globalPluginsFunctionList={},e}();t.default=N},function(e,t,n){var i=n(13),o=n(55),r=n(10)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[r])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){e.exports=n(185)},function(e,t,n){var i=n(49),o="["+n(68)+"]",r=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),l=function(e){return function(t){var n=String(i(t));return 1&e&&(n=n.replace(r,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:l(1),end:l(2),trim:l(3)}},function(e,t,n){e.exports=n(205)},function(e,t,n){var i=n(227),o=n(230);function r(t){return e.exports=r="function"==typeof o&&"symbol"==typeof i?function(e){return typeof e}:function(e){return e&&"function"==typeof o&&e.constructor===o&&e!==o.prototype?"symbol":typeof e},r(t)}e.exports=r},function(e,t,n){var i=n(10);t.f=i},function(e,t,n){e.exports=n(306)},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(33)),l=function(){function e(e,t){var n=this;this.$elem=e,this.editor=t,this._active=!1,e.on("click",function(e){var i;a.default.hideCurAllPanels(),(0,r.default)(i=t.txt.eventHooks.menuClickEvents).call(i,function(e){return e()}),e.stopPropagation(),null!=t.selection.getRange()&&n.clickHandler(e)})}return e.prototype.clickHandler=function(e){},e.prototype.active=function(){this._active=!0,this.$elem.addClass("w-e-active")},e.prototype.unActive=function(){this._active=!1,this.$elem.removeClass("w-e-active")},(0,o.default)(e.prototype,"isActive",{get:function(){return this._active},enumerable:!1,configurable:!0}),e}();t.default=l},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(28));function a(e){for(var n=e.elems[0];n&&(0,r.default)(i=t.EXTRA_TAG).call(i,n.nodeName);){var i;if("A"===(n=n.parentElement).nodeName)return n}}function l(e){var t,n=e.selection.getSelectionContainerElem();if(null===(t=null==n?void 0:n.elems)||void 0===t||!t.length)return!1;if("A"===n.getNodeName())return!0;var i=a(n);return!(!i||"A"!==i.nodeName)}(0,o.default)(t,"__esModule",{value:!0}),t.getParentNodeA=t.EXTRA_TAG=void 0,t.EXTRA_TAG=["B","FONT","I","STRIKE"],t.getParentNodeA=a,t.default=l},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(57)),a=i(n(4)),l=i(n(27));(0,o.default)(t,"__esModule",{value:!0});var s=n(2),c=n(6),u=s.__importDefault(n(135)),d=s.__importDefault(n(136)),f=function(){function e(e){this.editor=e}return e.prototype.insertImg=function(e,t,n){var i=this.editor,o=i.config,r="validate.",a=function(e,t){return void 0===t&&(t=r),i.i18next.t(t+e)},l=e.replace(/</g,"&lt;").replace(/>/g,"&gt;");l=l.replace("'",'"');var s="";n&&(s=n.replace("'",'"'),s="data-href='"+encodeURIComponent(s)+"' ");var c="";t&&(c="alt='"+(c=(c=t.replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace("'",'"'))+"' "),i.cmd.do("insertHTML","<img src='"+l+"' "+c+s+'style="max-width:100%;" contenteditable="false"/>'),o.linkImgCallback(e,t,n);var u=document.createElement("img");u.onload=function(){u=null},u.onerror=function(){o.customAlert(a("插入图片错误"),"error","wangEditor: "+a("插入图片错误")+""+a("图片链接")+' "'+e+'"'+a("下载链接失败")),u=null},u.onabort=function(){return u=null},u.src=e},e.prototype.uploadImg=function(e){var t=this;if(e.length){var n=this.editor,i=n.config,o="validate.",s=function(e){return n.i18next.t(o+e)},f=i.uploadImgServer,p=i.uploadImgShowBase64,h=i.uploadImgMaxSize,m=h/1024/1024,g=i.uploadImgMaxLength,v=i.uploadFileName,_=i.uploadImgParams,b=i.uploadImgParamsWithUrl,y=i.uploadImgHeaders,x=i.uploadImgHooks,w=i.uploadImgTimeout,A=i.withCredentials,k=i.customUploadImg;if(k||f||p){var C,S=[],E=[];if(c.arrForEach(e,function(e){if(e){var t=e.name||e.type.replace("/","."),i=e.size;if(t&&i){var o=n.config.uploadImgAccept.join("|");if(!1===new RegExp(".("+o+")$","i").test(t))return void E.push("【"+t+"】"+s("不是图片"));if(h<i)return void E.push("【"+t+"】"+s("大于")+" "+m+"M");S.push(e)}}}),E.length)return void i.customAlert(s("图片验证未通过")+": \n"+E.join("\n"),"warning");if(0===S.length)return void i.customAlert(s("传入的文件不合法"),"warning");if(S.length>g)return void i.customAlert(s("一次最多上传")+g+s("张图片"),"warning");if(k&&"function"==typeof k)return void k(S,(0,r.default)(C=this.insertImg).call(C,this));var T=new FormData;if((0,a.default)(S).call(S,function(e,t){var n=v||e.name;S.length>1&&(n+=t+1),T.append(n,e)}),f){var R=f.split("#");f=R[0];var O=R[1]||"";(0,a.default)(c).call(c,_,function(e,t){b&&((0,l.default)(f).call(f,"?")>0?f+="&":f+="?",f=f+e+"="+t),T.append(e,t)}),O&&(f+="#"+O);var M=u.default(f,{timeout:w,formData:T,headers:y,withCredentials:!!A,beforeSend:function(e){if(x.before)return x.before(e,n,S)},onTimeout:function(e){i.customAlert(s("上传图片超时"),"error"),x.timeout&&x.timeout(e,n)},onProgress:function(e,t){var i=new d.default(n);t.lengthComputable&&(e=t.loaded/t.total,i.show(e))},onError:function(e){i.customAlert(s("上传图片错误"),"error",s("上传图片错误")+""+s("服务器返回状态")+": "+e.status),x.error&&x.error(e,n)},onFail:function(e,t){i.customAlert(s("上传图片失败"),"error",s("上传图片返回结果错误")+""+s("返回结果")+": "+t),x.fail&&x.fail(e,n,t)},onSuccess:function(e,o){if(x.customInsert){var l;x.customInsert((0,r.default)(l=t.insertImg).call(l,t),o,n)}else{if("0"!=o.errno)return i.customAlert(s("上传图片失败"),"error",s("上传图片返回结果错误")+""+s("返回结果")+" errno="+o.errno),void(x.fail&&x.fail(e,n,o));var c=o.data;(0,a.default)(c).call(c,function(e){"string"==typeof e?t.insertImg(e):t.insertImg(e.url,e.alt,e.href)}),x.success&&x.success(e,n,o)}}});return void("string"==typeof M&&i.customAlert(M,"error"))}p&&c.arrForEach(e,function(e){var n=t,i=new FileReader;i.readAsDataURL(e),i.onload=function(){if(this.result){var e=this.result.toString();n.insertImg(e,e)}}})}}},e}();t.default=f},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(410)),a=i(n(4)),l=i(n(45));function s(e){return!!e.length&&"w-e-todo"===e.attr("class")}function c(e){var t=e.selection.getSelectionRangeTopNodes();if(0!==t.length)return(0,r.default)(t).call(t,function(e){return s(e)})}function u(e,t,n){var i;if(e.hasChildNodes()){var o=e.cloneNode(),r=!1;""===t.nodeValue&&(r=!0);var l=[];return(0,a.default)(i=e.childNodes).call(i,function(e){if(!d(e,t)&&r&&(o.appendChild(e.cloneNode(!0)),"BR"!==e.nodeName&&l.push(e)),d(e,t)){if(1===e.nodeType){var i=u(e,t,n);i&&""!==i.textContent&&(null==o||o.appendChild(i))}if(3===e.nodeType&&t.isEqualNode(e)){var a=f(e,n);o.textContent=a}r=!0}}),(0,a.default)(l).call(l,function(e){e.remove()}),o}}function d(e,t){return 3===e.nodeType?e.nodeValue===t.nodeValue:e.contains(t)}function f(e,t,n){void 0===n&&(n=!0);var i=e.nodeValue,o=null==i?void 0:(0,l.default)(i).call(i,0,t);if(i=null==i?void 0:(0,l.default)(i).call(i,t),!n){var r=i;i=o,o=r}return e.nodeValue=o,i}(0,o.default)(t,"__esModule",{value:!0}),t.dealTextNode=t.isAllTodo=t.isTodo=t.getCursorNextNode=void 0,t.isTodo=s,t.isAllTodo=c,t.getCursorNextNode=u,t.dealTextNode=f},function(e,t,n){var i=n(0)(n(1));(0,i.default)(t,"__esModule",{value:!0});var o=n(430),r=function(){function e(e){this.maxSize=e,this.isRe=!1,this.data=new o.CeilStack(e),this.revokeData=new o.CeilStack(e)}return(0,i.default)(e.prototype,"size",{get:function(){return[this.data.size,this.revokeData.size]},enumerable:!1,configurable:!0}),e.prototype.resetMaxSize=function(e){this.data.resetMax(e),this.revokeData.resetMax(e)},e.prototype.save=function(e){return this.isRe&&(this.revokeData.clear(),this.isRe=!1),this.data.instack(e),this},e.prototype.revoke=function(e){!this.isRe&&(this.isRe=!0);var t=this.data.outstack();return!!t&&(this.revokeData.instack(t),e(t),!0)},e.prototype.restore=function(e){!this.isRe&&(this.isRe=!0);var t=this.revokeData.outstack();return!!t&&(this.data.instack(t),e(t),!0)},e}();t.default=r},function(e,t,n){var i=n(14),o=n(11),r=n(73);e.exports=!i&&!o(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(11),o=/#|\.prototype\./,r=function(e,t){var n=l[a(e)];return n==c||n!=s&&("function"==typeof t?i(t):!!t)},a=r.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=r.data={},s=r.NATIVE="N",c=r.POLYFILL="P";e.exports=r},function(e,t,n){var i=n(103),o=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return o.call(e)}),e.exports=i.inspectSource},function(e,t,n){var i=n(8),o=n(166),r="__core-js_shared__",a=i[r]||o(r,{});e.exports=a},function(e,t,n){var i,o,r,a=n(105),l=n(19),s=n(16),c=n(10),u=n(43),d=c("iterator"),f=!1,p=function(){return this};[].keys&&("next"in(r=[].keys())?(o=a(a(r)))!==Object.prototype&&(i=o):f=!0),null==i&&(i={}),!u&&!s(i,d)&&l(i,d,p),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:f}},function(e,t,n){var i=n(16),o=n(31),r=n(63),a=n(168),l=r("IE_PROTO"),s=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=o(e),i(e,l)?e[l]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){var i=n(76);e.exports=i&&!Symbol.sham&&"symbol"==vv(Symbol.iterator)},function(e,t,n){var i=n(16),o=n(30),r=n(78).indexOf,a=n(51);e.exports=function(e,t){var n,l=o(e),s=0,c=[];for(n in l)!i(a,n)&&i(l,n)&&c.push(n);for(;t.length>s;)i(l,n=t[s++])&&(~r(c,n)||c.push(n));return c}},function(e,t,n){var i=n(36);e.exports=i("document","documentElement")},function(e,t,n){var i=n(8);e.exports=i.Promise},function(e,t,n){var i=n(53);e.exports=function(e,t,n){for(var o in t)n&&n.unsafe&&e[o]?e[o]=t[o]:i(e,o,t[o],n);return e}},function(e,t,n){var i=n(36),o=n(18),r=n(10),a=n(14),l=r("species");e.exports=function(e){var t=i(e),n=o.f;a&&t&&!t[l]&&n(t,l,{configurable:!0,get:function(){return this}})}},function(e,t,n){var i=n(10),o=n(44),r=i("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[r]===e)}},function(e,t,n){var i=n(65),o=n(44),r=n(10)("iterator");e.exports=function(e){if(null!=e)return e[r]||e["@@iterator"]||o[i(e)]}},function(e,t,n){var i=n(25);e.exports=function(e,t,n,o){try{return o?t(i(n)[0],n[1]):t(n)}catch(a){var r=e.return;throw void 0!==r&&i(r.call(e)),a}}},function(e,t,n){var i=n(10)("iterator"),o=!1;try{var r=0,a={next:function(){return{done:!!r++}},return:function(){o=!0}};a[i]=function(){return this},Array.from(a,function(){throw 2})}catch(l){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r={};r[i]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(l){}return n}},function(e,t,n){var i=n(25),o=n(41),r=n(10)("species");e.exports=function(e,t){var n,a=i(e).constructor;return void 0===a||null==(n=i(a)[r])?t:o(n)}},function(e,t,n){var i,o,r,a=n(8),l=n(11),s=n(34),c=n(40),u=n(108),d=n(73),f=n(118),p=a.location,h=a.setImmediate,m=a.clearImmediate,g=a.process,v=a.MessageChannel,_=a.Dispatch,b=0,y={},x="onreadystatechange",w=function(e){if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},A=function(e){return function(){w(e)}},k=function(e){w(e.data)},C=function(e){a.postMessage(e+"",p.protocol+"//"+p.host)};(!h||!m)&&(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},i(b),b},m=function(e){delete y[e]},"process"==s(g)?i=function(e){g.nextTick(A(e))}:_&&_.now?i=function(e){_.now(A(e))}:v&&!f?(r=(o=new v).port2,o.port1.onmessage=k,i=c(r.postMessage,r,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||l(C)||"file:"===p.protocol?i=x in d("script")?function(e){u.appendChild(d("script"))[x]=function(){u.removeChild(this),w(e)}}:function(e){setTimeout(A(e),0)}:(i=C,a.addEventListener("message",k,!1))),e.exports={set:h,clear:m}},function(e,t,n){var i=n(84);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(i)},function(e,t,n){var i=n(25),o=n(13),r=n(85);e.exports=function(e,t){if(i(e),o(t)&&t.constructor===e)return t;var n=r.f(e);return(0,n.resolve)(t),n.promise}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,n){e.exports=n(197)},function(e,t,n){var i=n(5),o=n(8),r=n(123),a=n(11),l=n(19),s=n(66),c=n(83),u=n(13),d=n(37),f=n(18).f,p=n(32).forEach,h=n(14),m=n(42),g=m.set,v=m.getterFor;e.exports=function(e,t,n){var m,_=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),y=_?"set":"add",x=o[e],w=x&&x.prototype,A={};if(h&&"function"==typeof x&&(b||w.forEach&&!a(function(){(new x).entries().next()}))){m=t(function(t,n){g(c(t,m,e),{type:e,collection:new x}),null!=n&&s(n,t[y],t,_)});var k=v(e);p(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(e){var t="add"==e||"set"==e;e in w&&(!b||"clear"!=e)&&l(m.prototype,e,function(n,i){var o=k(this).collection;if(!t&&b&&!u(n))return"get"==e&&void 0;var r=o[e](0===n?0:n,i);return t?this:r})}),b||f(m.prototype,"size",{configurable:!0,get:function(){return k(this).collection.size}})}else m=n.getConstructor(t,e,_,y),r.REQUIRED=!0;return d(m,e,!1,!0),A[e]=m,i({global:!0,forced:!0},A),b||n.setStrong(m,e,_),m}},function(e,t,n){var i=n(51),o=n(13),r=n(16),a=n(18).f,l=n(64),s=n(200),c=l("meta"),u=0,d=Object.isExtensible||function(){return!0},f=function(e){a(e,c,{value:{objectID:"O"+ ++u,weakData:{}}})},p=function(e,t){if(!o(e))return"symbol"==vv(e)?e:("string"==typeof e?"S":"P")+e;if(!r(e,c)){if(!d(e))return"F";if(!t)return"E";f(e)}return e[c].objectID},h=function(e,t){if(!r(e,c)){if(!d(e))return!0;if(!t)return!1;f(e)}return e[c].weakData},m=function(e){return s&&g.REQUIRED&&d(e)&&!r(e,c)&&f(e),e},g=e.exports={REQUIRED:!1,fastKey:p,getWeakData:h,onFreeze:m};i[c]=!0},function(e,t,n){var i=n(18).f,o=n(77),r=n(110),a=n(40),l=n(83),s=n(66),c=n(75),u=n(111),d=n(14),f=n(123).fastKey,p=n(42),h=p.set,m=p.getterFor;e.exports={getConstructor:function(e,t,n,c){var u=e(function(e,i){l(e,u,t),h(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),d||(e.size=0),null!=i&&s(i,e[c],e,n)}),p=m(t),g=function(e,t,n){var i,o,r=p(e),a=v(e,t);return a?a.value=n:(r.last=a={index:o=f(t,!0),key:t,value:n,previous:i=r.last,next:void 0,removed:!1},r.first||(r.first=a),i&&(i.next=a),d?r.size++:e.size++,"F"!==o&&(r.index[o]=a)),e},v=function(e,t){var n,i=p(e),o=f(t);if("F"!==o)return i.index[o];for(n=i.first;n;n=n.next)if(n.key==t)return n};return r(u.prototype,{clear:function(){for(var e=this,t=p(e),n=t.index,i=t.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete n[i.index],i=i.next;t.first=t.last=void 0,d?t.size=0:e.size=0},delete:function(e){var t=this,n=p(t),i=v(t,e);if(i){var o=i.next,r=i.previous;delete n.index[i.index],i.removed=!0,r&&(r.next=o),o&&(o.previous=r),n.first==i&&(n.first=o),n.last==i&&(n.last=r),d?n.size--:t.size--}return!!i},forEach:function(e){for(var t,n=p(this),i=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),r(u.prototype,n?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),d&&i(u.prototype,"size",{get:function(){return p(this).size}}),u},setStrong:function(e,t,n){var i=t+" Iterator",o=m(t),r=m(i);c(e,t,function(e,t){h(this,{type:i,target:e,state:o(e),kind:t,last:void 0})},function(){for(var e=r(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)?"keys"==t?{value:n.key,done:!1}:"values"==t?{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),u(t)}}},function(e,t,n){n(12)("iterator")},function(e,t,n){var i=n(107),o=n(80).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){e.exports=n(268)},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={zIndex:1e4}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={focus:!0,height:300,placeholder:"请输入正文",zIndexFullScreen:10002,showFullScreen:!0}},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0}),t.getPasteImgs=t.getPasteHtml=t.getPasteText=void 0;var a=n(2),l=n(6),s=a.__importDefault(n(292));function c(e){var t=e.clipboardData,n="";return n=null==t?window.clipboardData&&window.clipboardData.getData("text"):t.getData("text/plain"),l.replaceHtmlSymbol(n)}function u(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!1);var i=e.clipboardData,o="";if(i&&(o=i.getData("text/html")),!o){var r=c(e);if(!r)return"";o="<p>"+r+"</p>"}return o=(o=o.replace(/<(\d)/gm,function(e,t){return"&lt;"+t})).replace(/<(\/?meta.*?)>/gim,""),o=s.default(o,t,n)}function d(e){var t,n=[];if(c(e))return n;var i=null===(t=e.clipboardData)||void 0===t?void 0:t.items;return i&&(0,r.default)(l).call(l,i,function(e,t){var i=t.type;/image/i.test(i)&&n.push(t.getAsFile())}),n}t.getPasteText=c,t.getPasteHtml=u,t.getPasteImgs=d},function(e,t,n){e.exports=n(294)},function(e,t,n){e.exports=n(310)},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4)),a=i(n(46));(0,o.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3)),s=n(7),c=function(){function e(e,t){var n=this;this.hideTimeoutId=0,this.menu=e,this.conf=t;var i=l.default('<div class="w-e-droplist"></div>'),o=l.default("<p>"+t.title+"</p>");o.addClass("w-e-dp-title"),i.append(o);var c=t.list||[],u=t.type||"list",d=t.clickHandler||s.EMPTY_FN,f=l.default('<ul class="'+("list"===u?"w-e-list":"w-e-block")+'"></ul>');(0,r.default)(c).call(c,function(e){var t=e.$elem,i=e.value,o=l.default('<li class="w-e-item"></li>');t&&(o.append(t),f.append(o),o.on("click",function(e){d(i),e.stopPropagation(),n.hideTimeoutId=(0,a.default)(function(){n.hide()})}))}),i.append(f),i.on("mouseleave",function(){n.hideTimeoutId=(0,a.default)(function(){n.hide()})}),this.$container=i,this.rendered=!1,this._show=!1}return e.prototype.show=function(){this.hideTimeoutId&&clearTimeout(this.hideTimeoutId);var e=this.menu.$elem,t=this.$container;if(!this._show){if(this.rendered)t.show();else{var n=e.getBoundingClientRect().height||0,i=this.conf.width||100;t.css("margin-top",n+"px").css("width",i+"px"),e.append(t),this.rendered=!0}this._show=!0}},e.prototype.hide=function(){var e=this.$container;!this._show||(e.hide(),this._show=!1)},(0,o.default)(e.prototype,"isShow",{get:function(){return this._show},enumerable:!1,configurable:!0}),e}();t.default=c},function(e,t,n){var i=n(0),o=i(n(92)),r=i(n(1)),a=i(n(4));(0,r.default)(t,"__esModule",{value:!0});var l=n(6);function s(e,t){var n=new XMLHttpRequest;if(n.open("POST",e),n.timeout=t.timeout||1e4,n.ontimeout=function(){t.onTimeout&&t.onTimeout(n)},n.upload&&(n.upload.onprogress=function(e){var n=e.loaded/e.total;t.onProgress&&t.onProgress(n,e)}),t.headers&&(0,a.default)(l).call(l,t.headers,function(e,t){n.setRequestHeader(e,t)}),n.withCredentials=!!t.withCredentials,t.beforeSend){var i=t.beforeSend(n);if(i&&"object"===(0,o.default)(i)&&i.prevent)return i.msg}return n.onreadystatechange=function(){if(4===n.readyState){var e=n.status;if(!(e<200||e>=300&&e<400)){if(e>=400)return void(t.onError&&t.onError(n));var i,r=n.responseText;if("object"!==(0,o.default)(r))try{i=JSON.parse(r)}catch(a){return void(t.onFail&&t.onFail(n,r))}else i=r;t.onSuccess(n,i)}}},n.send(t.formData||null),n}t.default=s},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(342)),a=i(n(46));(0,o.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3)),s=function(){function e(e){this.editor=e,this.$textContainer=e.$textContainerElem,this.$bar=l.default('<div class="w-e-progress"></div>'),this.isShow=!1,this.time=0,this.timeoutId=0}return e.prototype.show=function(e){var t=this;if(!this.isShow){this.isShow=!0;var n=this.$bar;this.$textContainer.append(n),(0,r.default)()-this.time>100&&e<=1&&(n.css("width",100*e+"%"),this.time=(0,r.default)());var i=this.timeoutId;i&&clearTimeout(i),this.timeoutId=(0,a.default)(function(){t.hide()},500)}},e.prototype.hide=function(){this.$bar.remove(),this.isShow=!1,this.time=0,this.timeoutId=0},e}();t.default=s},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.ListType=void 0;var i,o,r=n(2),a=r.__importDefault(n(3)),l=r.__importDefault(n(24)),s=n(47),c=r.__importStar(n(371));(o=i=t.ListType||(t.ListType={})).OrderedList="OL",o.UnorderedList="UL";var u=function(e){function t(t){var n=this,o=a.default('<div class="w-e-menu" data-title="序列">\n <i class="w-e-icon-list2"></i>\n </div>'),r={width:130,title:"序列",type:"list",list:[{$elem:a.default('\n <p>\n <i class="w-e-icon-list2 w-e-drop-list-item"></i>\n '+t.i18next.t("menus.dropListMenu.list.无序列表")+"\n <p>"),value:i.UnorderedList},{$elem:a.default('<p>\n <i class="w-e-icon-list-numbered w-e-drop-list-item"></i>\n '+t.i18next.t("menus.dropListMenu.list.有序列表")+"\n <p>"),value:i.OrderedList}],clickHandler:function(e){n.command(e)}};return n=e.call(this,o,t,r)||this}return r.__extends(t,e),t.prototype.command=function(e){void 0!==this.editor.selection.getSelectionContainerElem()&&(this.handleSelectionRangeNodes(e),this.tryChangeActive())},t.prototype.validator=function(e,t,n){return!(!e.length||!t.length||n.equal(e)||n.equal(t))},t.prototype.handleSelectionRangeNodes=function(e){var t=this.editor,n=t.selection,i=e.toLowerCase(),o=n.getSelectionContainerElem(),r=n.getSelectionStartElem().getNodeTop(t),a=n.getSelectionEndElem().getNodeTop(t);if(this.validator(r,a,t.$textElem)){var l=n.getRange(),u=null==l?void 0:l.collapsed;t.$textElem.equal(o)||(o=o.getNodeTop(t));var d,f={editor:t,listType:e,listTarget:i,$selectionElem:o,$startElem:r,$endElem:a};d=this.isOrderElem(o)?c.ClassType.Wrap:this.isOrderElem(r)&&this.isOrderElem(a)?c.ClassType.Join:this.isOrderElem(r)?c.ClassType.StartJoin:this.isOrderElem(a)?c.ClassType.EndJoin:c.ClassType.Other;var p=new c.default(c.createListHandle(d,f,l));s.updateRange(t,p.getSelectionRangeElem(),!!u)}},t.prototype.isOrderElem=function(e){var t=e.getNodeName();return t===i.OrderedList||t===i.UnorderedList},t.prototype.tryChangeActive=function(){},t}(l.default);t.default=u},function(e,t,n){e.exports=n(395)},function(e,t,n){function i(e){var t=e.selection.getSelectionContainerElem();return!(null==t||!t.length||"CODE"!=t.getNodeName()&&"PRE"!=t.getNodeName()&&"CODE"!=t.parent().getNodeName()&&"PRE"!=t.parent().getNodeName()&&!/hljs/.test(t.parent().attr("class")))}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(29));(0,o.default)(t,"__esModule",{value:!0}),t.todo=void 0;var a=n(2).__importDefault(n(3)),l=function(){function e(e){var t;this.template='<ul class="w-e-todo"><li><span contenteditable="false"><input type="checkbox"></span></li></ul>',this.checked=!1,this.$todo=a.default(this.template),this.$child=null===(t=null==e?void 0:e.childNodes())||void 0===t?void 0:t.clone(!0)}return e.prototype.init=function(){var e=this.$child,t=this.getInputContainer();e&&e.insertAfter(t)},e.prototype.getInput=function(){var e=this.$todo;return(0,r.default)(e).call(e,"input")},e.prototype.getInputContainer=function(){return this.getInput().parent()},e.prototype.getTodo=function(){return this.$todo},e}();function s(e){var t=new l(e);return t.init(),t}t.todo=l,t.default=s},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2);n(146),n(148),n(152),n(154),n(156),n(158),n(160);var o=i.__importDefault(n(87));i.__exportStar(n(442),t),t.default=o.default},function(e,t,n){var i=n(143);e.exports=i},function(e,t,n){n(144);var i=n(9).Object,o=e.exports=function(e,t,n){return i.defineProperty(e,t,n)};i.defineProperty.sham&&(o.sham=!0)},function(e,t,n){var i=n(5),o=n(14);i({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(18).f})},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===(typeof window>"u"?"undefined":vv(window))&&(n=window)}e.exports=n},function(e,t,n){var i=n(20),o=n(147);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,'.w-e-toolbar,\n.w-e-text-container,\n.w-e-menu-panel {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n background-color: #fff;\n /*表情菜单样式*/\n /*分割线样式*/\n}\n.w-e-toolbar h1,\n.w-e-text-container h1,\n.w-e-menu-panel h1 {\n font-size: 32px !important;\n}\n.w-e-toolbar h2,\n.w-e-text-container h2,\n.w-e-menu-panel h2 {\n font-size: 24px !important;\n}\n.w-e-toolbar h3,\n.w-e-text-container h3,\n.w-e-menu-panel h3 {\n font-size: 18.72px !important;\n}\n.w-e-toolbar h4,\n.w-e-text-container h4,\n.w-e-menu-panel h4 {\n font-size: 16px !important;\n}\n.w-e-toolbar h5,\n.w-e-text-container h5,\n.w-e-menu-panel h5 {\n font-size: 13.28px !important;\n}\n.w-e-toolbar p,\n.w-e-text-container p,\n.w-e-menu-panel p {\n font-size: 16px !important;\n}\n.w-e-toolbar .eleImg,\n.w-e-text-container .eleImg,\n.w-e-menu-panel .eleImg {\n cursor: pointer;\n display: inline-block;\n font-size: 18px;\n padding: 0 3px;\n}\n.w-e-toolbar *,\n.w-e-text-container *,\n.w-e-menu-panel * {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n.w-e-toolbar hr,\n.w-e-text-container hr,\n.w-e-menu-panel hr {\n cursor: pointer;\n display: block;\n height: 0px;\n border: 0;\n border-top: 3px solid #ccc;\n margin: 20px 0;\n}\n.w-e-clear-fix:after {\n content: "";\n display: table;\n clear: both;\n}\n.w-e-drop-list-item {\n position: relative;\n top: 1px;\n padding-right: 7px;\n color: #333 !important;\n}\n.w-e-drop-list-tl {\n padding-left: 10px;\n text-align: left;\n}\n',""]),e.exports=t},function(e,t,n){var i=n(20),o=n(149);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r),e.exports=o.locals||{}},function(e,t,n){var i=n(21),o=n(150),r=n(151);t=i(!1);var a=o(r);t.push([e.i,"@font-face {\n font-family: 'w-e-icon';\n src: url("+a+') format(\'truetype\');\n font-weight: normal;\n font-style: normal;\n}\n[class^="w-e-icon-"],\n[class*=" w-e-icon-"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: \'w-e-icon\' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.w-e-icon-close:before {\n content: "\\f00d";\n}\n.w-e-icon-upload2:before {\n content: "\\e9c6";\n}\n.w-e-icon-trash-o:before {\n content: "\\f014";\n}\n.w-e-icon-header:before {\n content: "\\f1dc";\n}\n.w-e-icon-pencil2:before {\n content: "\\e906";\n}\n.w-e-icon-paint-brush:before {\n content: "\\f1fc";\n}\n.w-e-icon-image:before {\n content: "\\e90d";\n}\n.w-e-icon-play:before {\n content: "\\e912";\n}\n.w-e-icon-location:before {\n content: "\\e947";\n}\n.w-e-icon-undo:before {\n content: "\\e965";\n}\n.w-e-icon-redo:before {\n content: "\\e966";\n}\n.w-e-icon-quotes-left:before {\n content: "\\e977";\n}\n.w-e-icon-list-numbered:before {\n content: "\\e9b9";\n}\n.w-e-icon-list2:before {\n content: "\\e9bb";\n}\n.w-e-icon-link:before {\n content: "\\e9cb";\n}\n.w-e-icon-happy:before {\n content: "\\e9df";\n}\n.w-e-icon-bold:before {\n content: "\\ea62";\n}\n.w-e-icon-underline:before {\n content: "\\ea63";\n}\n.w-e-icon-italic:before {\n content: "\\ea64";\n}\n.w-e-icon-strikethrough:before {\n content: "\\ea65";\n}\n.w-e-icon-table2:before {\n content: "\\ea71";\n}\n.w-e-icon-paragraph-left:before {\n content: "\\ea77";\n}\n.w-e-icon-paragraph-center:before {\n content: "\\ea78";\n}\n.w-e-icon-paragraph-right:before {\n content: "\\ea79";\n}\n.w-e-icon-paragraph-justify:before {\n content: "\\ea7a";\n}\n.w-e-icon-terminal:before {\n content: "\\f120";\n}\n.w-e-icon-page-break:before {\n content: "\\ea68";\n}\n.w-e-icon-cancel-circle:before {\n content: "\\ea0d";\n}\n.w-e-icon-font:before {\n content: "\\ea5c";\n}\n.w-e-icon-text-heigh:before {\n content: "\\ea5f";\n}\n.w-e-icon-paint-format:before {\n content: "\\e90c";\n}\n.w-e-icon-indent-increase:before {\n content: "\\ea7b";\n}\n.w-e-icon-indent-decrease:before {\n content: "\\ea7c";\n}\n.w-e-icon-row-height:before {\n content: "\\e9be";\n}\n.w-e-icon-fullscreen_exit:before {\n content: "\\e900";\n}\n.w-e-icon-fullscreen:before {\n content: "\\e901";\n}\n.w-e-icon-split-line:before {\n content: "\\ea0b";\n}\n.w-e-icon-checkbox-checked:before {\n content: "\\ea52";\n}\n',""]),e.exports=t},function(e,t,n){e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},function(e,t,n){n.r(t),t.default="data:font/woff;base64,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"},function(e,t,n){var i=n(20),o=n(153);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,'.w-e-toolbar {\n display: flex;\n padding: 0 6px;\n flex-wrap: wrap;\n position: relative;\n /* 单个菜单 */\n}\n.w-e-toolbar .w-e-menu {\n position: relative;\n display: flex;\n width: 40px;\n height: 40px;\n align-items: center;\n justify-content: center;\n text-align: center;\n cursor: pointer;\n}\n.w-e-toolbar .w-e-menu i {\n color: #999;\n}\n.w-e-toolbar .w-e-menu:hover {\n background-color: #F6F6F6;\n}\n.w-e-toolbar .w-e-menu:hover i {\n color: #333;\n}\n.w-e-toolbar .w-e-active i {\n color: #1e88e5;\n}\n.w-e-toolbar .w-e-active:hover i {\n color: #1e88e5;\n}\n.w-e-menu-tooltip {\n position: absolute;\n display: flex;\n color: #f1f1f1;\n background-color: rgba(0, 0, 0, 0.75);\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n padding: 4px 5px 6px;\n justify-content: center;\n align-items: center;\n}\n.w-e-menu-tooltip-up::after {\n content: "";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -5px;\n border: 5px solid rgba(0, 0, 0, 0);\n border-top-color: rgba(0, 0, 0, 0.73);\n}\n.w-e-menu-tooltip-down::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border: 5px solid rgba(0, 0, 0, 0);\n border-bottom-color: rgba(0, 0, 0, 0.73);\n}\n.w-e-menu-tooltip-item-wrapper {\n font-size: 14px;\n margin: 0 5px;\n}\n',""]),e.exports=t},function(e,t,n){var i=n(20),o=n(155);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,'.w-e-text-container {\n position: relative;\n height: 100%;\n}\n.w-e-text-container .w-e-progress {\n position: absolute;\n background-color: #1e88e5;\n top: 0;\n left: 0;\n height: 1px;\n}\n.w-e-text-container .placeholder {\n color: #D4D4D4;\n position: absolute;\n font-size: 11pt;\n line-height: 22px;\n left: 10px;\n top: 10px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n z-index: -1;\n}\n.w-e-text {\n padding: 0 10px;\n overflow-y: auto;\n}\n.w-e-text p,\n.w-e-text h1,\n.w-e-text h2,\n.w-e-text h3,\n.w-e-text h4,\n.w-e-text h5,\n.w-e-text table,\n.w-e-text pre {\n margin: 10px 0;\n line-height: 1.5;\n}\n.w-e-text ul,\n.w-e-text ol {\n margin: 10px 0 10px 20px;\n}\n.w-e-text blockquote {\n display: block;\n border-left: 8px solid #d0e5f2;\n padding: 5px 10px;\n margin: 10px 0;\n line-height: 1.4;\n font-size: 100%;\n background-color: #f1f1f1;\n}\n.w-e-text code {\n display: inline-block;\n background-color: #f1f1f1;\n border-radius: 3px;\n padding: 3px 5px;\n margin: 0 3px;\n}\n.w-e-text pre code {\n display: block;\n}\n.w-e-text table {\n border-top: 1px solid #ccc;\n border-left: 1px solid #ccc;\n}\n.w-e-text table td,\n.w-e-text table th {\n border-bottom: 1px solid #ccc;\n border-right: 1px solid #ccc;\n padding: 3px 5px;\n min-height: 30px;\n height: 30px;\n}\n.w-e-text table th {\n border-bottom: 2px solid #ccc;\n text-align: center;\n background-color: #f1f1f1;\n}\n.w-e-text:focus {\n outline: none;\n}\n.w-e-text img {\n cursor: pointer;\n}\n.w-e-text img:hover {\n box-shadow: 0 0 5px #333;\n}\n.w-e-text .w-e-todo {\n margin: 0 0 0 20px;\n}\n.w-e-text .w-e-todo li {\n list-style: none;\n font-size: 1em;\n}\n.w-e-text .w-e-todo li span:nth-child(1) {\n position: relative;\n left: -18px;\n}\n.w-e-text .w-e-todo li span:nth-child(1) input {\n position: absolute;\n margin-right: 3px;\n}\n.w-e-text .w-e-todo li span:nth-child(1) input[type=checkbox] {\n top: 50%;\n margin-top: -6px;\n}\n.w-e-tooltip {\n position: absolute;\n display: flex;\n color: #f1f1f1;\n background-color: rgba(0, 0, 0, 0.75);\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n padding: 4px 5px 6px;\n justify-content: center;\n align-items: center;\n}\n.w-e-tooltip-up::after {\n content: "";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -5px;\n border: 5px solid rgba(0, 0, 0, 0);\n border-top-color: rgba(0, 0, 0, 0.73);\n}\n.w-e-tooltip-down::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border: 5px solid rgba(0, 0, 0, 0);\n border-bottom-color: rgba(0, 0, 0, 0.73);\n}\n.w-e-tooltip-item-wrapper {\n cursor: pointer;\n font-size: 14px;\n margin: 0 5px;\n}\n.w-e-tooltip-item-wrapper:hover {\n color: #ccc;\n text-decoration: underline;\n}\n',""]),e.exports=t},function(e,t,n){var i=n(20),o=n(157);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,'.w-e-menu .w-e-panel-container {\n position: absolute;\n top: 0;\n left: 50%;\n border: 1px solid #ccc;\n border-top: 0;\n box-shadow: 1px 1px 2px #ccc;\n color: #333;\n background-color: #fff;\n text-align: left;\n /* 为 emotion panel 定制的样式 */\n /* 上传图片、上传视频的 panel 定制样式 */\n}\n.w-e-menu .w-e-panel-container .w-e-panel-close {\n position: absolute;\n right: 0;\n top: 0;\n padding: 5px;\n margin: 2px 5px 0 0;\n cursor: pointer;\n color: #999;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-close:hover {\n color: #333;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-title {\n list-style: none;\n display: flex;\n font-size: 14px;\n margin: 2px 10px 0 10px;\n border-bottom: 1px solid #f1f1f1;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-item {\n padding: 3px 5px;\n color: #999;\n cursor: pointer;\n margin: 0 3px;\n position: relative;\n top: 1px;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-active {\n color: #333;\n border-bottom: 1px solid #333;\n cursor: default;\n font-weight: 700;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content {\n padding: 10px 15px 10px 15px;\n font-size: 16px;\n /* 输入框的样式 */\n /* 按钮的样式 */\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content input:focus,\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus,\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content button:focus {\n outline: none;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea {\n width: 100%;\n border: 1px solid #ccc;\n padding: 5px;\n margin-top: 10px;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus {\n border-color: #1e88e5;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text] {\n border: none;\n border-bottom: 1px solid #ccc;\n font-size: 14px;\n height: 20px;\n color: #333;\n text-align: left;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].small {\n width: 30px;\n text-align: center;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].block {\n display: block;\n width: 100%;\n margin: 10px 0;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus {\n border-bottom: 2px solid #1e88e5;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button {\n font-size: 14px;\n color: #1e88e5;\n border: none;\n padding: 5px 10px;\n background-color: #fff;\n cursor: pointer;\n border-radius: 3px;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left {\n float: left;\n margin-right: 10px;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right {\n float: right;\n margin-left: 10px;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray {\n color: #999;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red {\n color: #c24f4a;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover {\n background-color: #f1f1f1;\n}\n.w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after {\n content: "";\n display: table;\n clear: both;\n}\n.w-e-menu .w-e-panel-container .w-e-emoticon-container .w-e-item {\n cursor: pointer;\n font-size: 18px;\n padding: 0 3px;\n display: inline-block;\n}\n.w-e-menu .w-e-panel-container .w-e-up-img-container,\n.w-e-menu .w-e-panel-container .w-e-up-video-container {\n text-align: center;\n}\n.w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn,\n.w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn {\n display: inline-block;\n color: #999;\n cursor: pointer;\n font-size: 60px;\n line-height: 1;\n}\n.w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover,\n.w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn:hover {\n color: #333;\n}\n',""]),e.exports=t},function(e,t,n){var i=n(20),o=n(159);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,".w-e-toolbar .w-e-droplist {\n position: absolute;\n left: 0;\n top: 0;\n background-color: #fff;\n border: 1px solid #f1f1f1;\n border-right-color: #ccc;\n border-bottom-color: #ccc;\n}\n.w-e-toolbar .w-e-droplist .w-e-dp-title {\n text-align: center;\n color: #999;\n line-height: 2;\n border-bottom: 1px solid #f1f1f1;\n font-size: 13px;\n}\n.w-e-toolbar .w-e-droplist ul.w-e-list {\n list-style: none;\n line-height: 1;\n}\n.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item {\n color: #333;\n padding: 5px 0;\n}\n.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover {\n background-color: #f1f1f1;\n}\n.w-e-toolbar .w-e-droplist ul.w-e-block {\n list-style: none;\n text-align: left;\n padding: 5px;\n}\n.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item {\n display: inline-block;\n padding: 3px 5px;\n}\n.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover {\n background-color: #f1f1f1;\n}\n",""]),e.exports=t},function(e,t,n){var i=n(0)(n(161));Element.prototype.matches||(Element.prototype.matches=function(e){for(var t=this.ownerDocument.querySelectorAll(e),n=t.length;n>=0&&t.item(n)!==this;n--);return n>-1}),i.default||(window.Promise=i.default)},function(e,t,n){e.exports=n(162)},function(e,t,n){var i=n(163);e.exports=i},function(e,t,n){n(61),n(50),n(54),n(175),n(178),n(179);var i=n(9);e.exports=i.Promise},function(e,t,n){var i=n(62),o=n(49),r=function(e){return function(t,n){var r,a,l=String(o(t)),s=i(n),c=l.length;return s<0||s>=c?e?"":void 0:(r=l.charCodeAt(s))<55296||r>56319||s+1===c||(a=l.charCodeAt(s+1))<56320||a>57343?e?l.charAt(s):r:e?l.slice(s,s+2):a-56320+(r-55296<<10)+65536}};e.exports={codeAt:r(!1),charAt:r(!0)}},function(e,t,n){var i=n(8),o=n(102),r=i.WeakMap;e.exports="function"==typeof r&&/native code/.test(o(r))},function(e,t,n){var i=n(8),o=n(19);e.exports=function(e,t){try{o(i,e,t)}catch(n){i[e]=t}return t}},function(e,t,n){var i=n(104).IteratorPrototype,o=n(77),r=n(48),a=n(37),l=n(44),s=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=o(i,{next:r(1,n)}),a(e,c,!1,!0),l[c]=s,e}},function(e,t,n){var i=n(11);e.exports=!i(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},function(e,t,n){var i=n(14),o=n(18),r=n(25),a=n(52);e.exports=i?Object.defineProperties:function(e,t){r(e);for(var n,i=a(t),l=i.length,s=0;l>s;)o.f(e,n=i[s++],t[n]);return e}},function(e,t,n){var i=n(81),o=n(65);e.exports=i?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){var i=n(25),o=n(172);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return i(n),o(r),t?e.call(n,r):n.__proto__=r,n}}():void 0)},function(e,t,n){var i=n(13);e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){var i=n(30),o=n(82),r=n(44),a=n(42),l=n(75),s="Array Iterator",c=a.set,u=a.getterFor(s);e.exports=l(Array,"Array",function(e,t){c(this,{type:s,target:i(e),index:0,kind:t})},function(){var e=u(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}},"values"),r.Arguments=r.Array,o("keys"),o("values"),o("entries")},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var i,o,r,a,l=n(5),s=n(43),c=n(8),u=n(36),d=n(109),f=n(53),p=n(110),h=n(37),m=n(111),g=n(13),v=n(41),_=n(83),b=n(34),y=n(102),x=n(66),w=n(115),A=n(116),k=n(117).set,C=n(176),S=n(119),E=n(177),T=n(85),R=n(120),O=n(42),M=n(101),D=n(10),N=n(86),I=D("species"),L="Promise",F=O.get,P=O.set,B=O.getterFor(L),j=d,V=c.TypeError,z=c.document,H=c.process,U=u("fetch"),W=T.f,Y=W,G="process"==b(H),$=!!(z&&z.createEvent&&c.dispatchEvent),q="unhandledrejection",Q="rejectionhandled",K=0,X=1,J=2,Z=1,ee=2,te=M(L,function(){if(y(j)===String(j)&&(66===N||!G&&"function"!=typeof PromiseRejectionEvent)||s&&!j.prototype.finally)return!0;if(N>=51&&/native code/.test(j))return!1;var e=j.resolve(1),t=function(e){e(function(){},function(){})};return(e.constructor={})[I]=t,!(e.then(function(){})instanceof t)}),ne=te||!w(function(e){j.all(e).catch(function(){})}),ie=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},oe=function(e,t,n){if(!t.notified){t.notified=!0;var i=t.reactions;C(function(){for(var o=t.value,r=t.state==X,a=0;i.length>a;){var l,s,c,u=i[a++],d=r?u.ok:u.fail,f=u.resolve,p=u.reject,h=u.domain;try{d?(r||(t.rejection===ee&&se(e,t),t.rejection=Z),!0===d?l=o:(h&&h.enter(),l=d(o),h&&(h.exit(),c=!0)),l===u.promise?p(V("Promise-chain cycle")):(s=ie(l))?s.call(l,f,p):f(l)):p(o)}catch(m){h&&!c&&h.exit(),p(m)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&ae(e,t)})}},re=function(e,t,n){var i,o;$?((i=z.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),c.dispatchEvent(i)):i={promise:t,reason:n},(o=c["on"+e])?o(i):e===q&&E("Unhandled promise rejection",n)},ae=function(e,t){k.call(c,function(){var n,i=t.value;if(le(t)&&(n=R(function(){G?H.emit("unhandledRejection",i,e):re(q,e,i)}),t.rejection=G||le(t)?ee:Z,n.error))throw n.value})},le=function(e){return e.rejection!==Z&&!e.parent},se=function(e,t){k.call(c,function(){G?H.emit("rejectionHandled",e):re(Q,e,t.value)})},ce=function(e,t,n,i){return function(o){e(t,n,o,i)}},ue=function(e,t,n,i){t.done||(t.done=!0,i&&(t=i),t.value=n,t.state=J,oe(e,t,!0))},de=function e(t,n,i,o){if(!n.done){n.done=!0,o&&(n=o);try{if(t===i)throw V("Promise can't be resolved itself");var r=ie(i);r?C(function(){var o={done:!1};try{r.call(i,ce(e,t,o,n),ce(ue,t,o,n))}catch(a){ue(t,o,a,n)}}):(n.value=i,n.state=X,oe(t,n,!1))}catch(a){ue(t,{done:!1},a,n)}}};te&&(j=function(e){_(this,j,L),v(e),i.call(this);var t=F(this);try{e(ce(de,this,t),ce(ue,this,t))}catch(n){ue(this,t,n)}},(i=function(e){P(this,{type:L,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:K,value:void 0})}).prototype=p(j.prototype,{then:function(e,t){var n=B(this),i=W(A(this,j));return i.ok="function"!=typeof e||e,i.fail="function"==typeof t&&t,i.domain=G?H.domain:void 0,n.parent=!0,n.reactions.push(i),n.state!=K&&oe(this,n,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new i,t=F(e);this.promise=e,this.resolve=ce(de,e,t),this.reject=ce(ue,e,t)},T.f=W=function(e){return e===j||e===r?new o(e):Y(e)},!s&&"function"==typeof d&&(a=d.prototype.then,f(d.prototype,"then",function(e,t){var n=this;return new j(function(e,t){a.call(n,e,t)}).then(e,t)},{unsafe:!0}),"function"==typeof U&&l({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return S(j,U.apply(c,arguments))}}))),l({global:!0,wrap:!0,forced:te},{Promise:j}),h(j,L,!1,!0),m(L),r=u(L),l({target:L,stat:!0,forced:te},{reject:function(e){var t=W(this);return t.reject.call(void 0,e),t.promise}}),l({target:L,stat:!0,forced:s||te},{resolve:function(e){return S(s&&this===r?j:this,e)}}),l({target:L,stat:!0,forced:ne},{all:function(e){var t=this,n=W(t),i=n.resolve,o=n.reject,r=R(function(){var n=v(t.resolve),r=[],a=0,l=1;x(e,function(e){var s=a++,c=!1;r.push(void 0),l++,n.call(t,e).then(function(e){c||(c=!0,r[s]=e,--l||i(r))},o)}),--l||i(r)});return r.error&&o(r.value),n.promise},race:function(e){var t=this,n=W(t),i=n.reject,o=R(function(){var o=v(t.resolve);x(e,function(e){o.call(t,e).then(n.resolve,i)})});return o.error&&i(o.value),n.promise}})},function(e,t,n){var i,o,r,a,l,s,c,u,d=n(8),f=n(71).f,p=n(34),h=n(117).set,m=n(118),g=d.MutationObserver||d.WebKitMutationObserver,v=d.process,_=d.Promise,b="process"==p(v),y=f(d,"queueMicrotask"),x=y&&y.value;x||(i=function(){var e,t;for(b&&(e=v.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(n){throw o?a():r=void 0,n}}r=void 0,e&&e.enter()},b?a=function(){v.nextTick(i)}:g&&!m?(l=!0,s=document.createTextNode(""),new g(i).observe(s,{characterData:!0}),a=function(){s.data=l=!l}):_&&_.resolve?(c=_.resolve(void 0),u=c.then,a=function(){u.call(c,i)}):a=function(){h.call(d,i)}),e.exports=x||function(e){var t={fn:e,next:void 0};r&&(r.next=t),o||(o=t,a()),r=t}},function(e,t,n){var i=n(8);e.exports=function(e,t){var n=i.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){var i=n(5),o=n(41),r=n(85),a=n(120),l=n(66);i({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=r.f(t),i=n.resolve,s=n.reject,c=a(function(){var n=o(t.resolve),r=[],a=0,s=1;l(e,function(e){var o=a++,l=!1;r.push(void 0),s++,n.call(t,e).then(function(e){l||(l=!0,r[o]={status:"fulfilled",value:e},--s||i(r))},function(e){l||(l=!0,r[o]={status:"rejected",reason:e},--s||i(r))})}),--s||i(r)});return c.error&&s(c.value),n.promise}})},function(e,t,n){var i=n(5),o=n(43),r=n(109),a=n(11),l=n(36),s=n(116),c=n(119),u=n(53);i({target:"Promise",proto:!0,real:!0,forced:!!r&&a(function(){r.prototype.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=s(this,l("Promise")),n="function"==typeof e;return this.then(n?function(n){return c(t,e()).then(function(){return n})}:e,n?function(n){return c(t,e()).then(function(){throw n})}:e)}}),!o&&"function"==typeof r&&!r.prototype.finally&&u(r.prototype,"finally",l("Promise").prototype.finally)},function(e,t,n){n(54);var i=n(181),o=n(65),r=Array.prototype,a={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.forEach;return e===r||e instanceof Array&&t===r.forEach||a.hasOwnProperty(o(e))?i:t}},function(e,t,n){var i=n(182);e.exports=i},function(e,t,n){n(183);var i=n(15);e.exports=i("Array").forEach},function(e,t,n){var i=n(5),o=n(184);i({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(e,t,n){var i=n(32).forEach,o=n(67),r=n(22),a=o("forEach"),l=r("forEach");e.exports=a&&l?[].forEach:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){var i=n(186);e.exports=i},function(e,t,n){n(187);var i=n(9);e.exports=i.Array.isArray},function(e,t,n){n(5)({target:"Array",stat:!0},{isArray:n(55)})},function(e,t,n){var i=n(189);e.exports=i},function(e,t,n){var i=n(190),o=Array.prototype;e.exports=function(e){var t=e.map;return e===o||e instanceof Array&&t===o.map?i:t}},function(e,t,n){n(191);var i=n(15);e.exports=i("Array").map},function(e,t,n){var i=n(5),o=n(32).map,r=n(56),a=n(22),l=r("map"),s=a("map");i({target:"Array",proto:!0,forced:!l||!s},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(193);e.exports=i},function(e,t,n){var i=n(194),o=String.prototype;e.exports=function(e){var t=e.trim;return"string"==typeof e||e===o||e instanceof String&&t===o.trim?i:t}},function(e,t,n){n(195);var i=n(15);e.exports=i("String").trim},function(e,t,n){var i=n(5),o=n(90).trim;i({target:"String",proto:!0,forced:n(196)("trim")},{trim:function(){return o(this)}})},function(e,t,n){var i=n(11),o=n(68),r="…";e.exports=function(e){return i(function(){return!!o[e]()||r[e]()!=r||o[e].name!==e})}},function(e,t,n){var i=n(198);e.exports=i},function(e,t,n){n(199),n(61),n(50),n(54);var i=n(9);e.exports=i.Map},function(e,t,n){var i=n(122),o=n(124);e.exports=i("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},o)},function(e,t,n){var i=n(11);e.exports=!i(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(e,t,n){var i=n(202);e.exports=i},function(e,t,n){var i=n(203),o=Array.prototype;e.exports=function(e){var t=e.indexOf;return e===o||e instanceof Array&&t===o.indexOf?i:t}},function(e,t,n){n(204);var i=n(15);e.exports=i("Array").indexOf},function(e,t,n){var i=n(5),o=n(78).indexOf,r=n(67),a=n(22),l=[].indexOf,s=!!l&&1/[1].indexOf(1,-0)<0,c=r("indexOf"),u=a("indexOf",{ACCESSORS:!0,1:0});i({target:"Array",proto:!0,forced:s||!c||!u},{indexOf:function(e){return s?l.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(206);e.exports=i},function(e,t,n){var i=n(207),o=Array.prototype;e.exports=function(e){var t=e.splice;return e===o||e instanceof Array&&t===o.splice?i:t}},function(e,t,n){n(208);var i=n(15);e.exports=i("Array").splice},function(e,t,n){var i=n(5),o=n(79),r=n(62),a=n(35),l=n(31),s=n(88),c=n(69),u=n(56),d=n(22),f=u("splice"),p=d("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,m=Math.min,g=9007199254740991,v="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!f||!p},{splice:function(e,t){var n,i,u,d,f,p,_=l(this),b=a(_.length),y=o(e,b),x=arguments.length;if(0===x?n=i=0:1===x?(n=0,i=b-y):(n=x-2,i=m(h(r(t),0),b-y)),b+n-i>g)throw TypeError(v);for(u=s(_,i),d=0;d<i;d++)(f=y+d)in _&&c(u,d,_[f]);if(u.length=i,n<i){for(d=y;d<b-i;d++)p=d+n,(f=d+i)in _?_[p]=_[f]:delete _[p];for(d=b;d>b-i+n;d--)delete _[d-1]}else if(n>i)for(d=b-i;d>y;d--)p=d+n-1,(f=d+i-1)in _?_[p]=_[f]:delete _[p];for(d=0;d<n;d++)_[d+y]=arguments[d+2];return _.length=b-i+n,u}})},function(e,t,n){var i=n(210);e.exports=i},function(e,t,n){var i=n(211),o=Array.prototype;e.exports=function(e){var t=e.filter;return e===o||e instanceof Array&&t===o.filter?i:t}},function(e,t,n){n(212);var i=n(15);e.exports=i("Array").filter},function(e,t,n){var i=n(5),o=n(32).filter,r=n(56),a=n(22),l=r("filter"),s=a("filter");i({target:"Array",proto:!0,forced:!l||!s},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(214);e.exports=i},function(e,t,n){var i=n(215),o=n(217),r=Array.prototype,a=String.prototype;e.exports=function(e){var t=e.includes;return e===r||e instanceof Array&&t===r.includes?i:"string"==typeof e||e===a||e instanceof String&&t===a.includes?o:t}},function(e,t,n){n(216);var i=n(15);e.exports=i("Array").includes},function(e,t,n){var i=n(5),o=n(78).includes,r=n(82);i({target:"Array",proto:!0,forced:!n(22)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")},function(e,t,n){n(218);var i=n(15);e.exports=i("String").includes},function(e,t,n){var i=n(5),o=n(219),r=n(49);i({target:"String",proto:!0,forced:!n(221)("includes")},{includes:function(e){return!!~String(r(this)).indexOf(o(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(220);e.exports=function(e){if(i(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var i=n(13),o=n(34),r=n(10)("match");e.exports=function(e){var t;return i(e)&&(void 0!==(t=e[r])?!!t:"RegExp"==o(e))}},function(e,t,n){var i=n(10)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[i]=!1,"/./"[e](t)}catch(o){}}return!1}},function(e,t,n){var i=n(223);e.exports=i},function(e,t,n){var i=n(224),o=Function.prototype;e.exports=function(e){var t=e.bind;return e===o||e instanceof Function&&t===o.bind?i:t}},function(e,t,n){n(225);var i=n(15);e.exports=i("Function").bind},function(e,t,n){n(5)({target:"Function",proto:!0},{bind:n(226)})},function(e,t,n){var i=n(41),o=n(13),r=[].slice,a={},l=function(e,t,n){if(!(t in a)){for(var i=[],o=0;o<t;o++)i[o]="a["+o+"]";a[t]=Function("C,a","return new C("+i.join(",")+")")}return a[t](e,n)};e.exports=Function.bind||function(e){var t=i(this),n=r.call(arguments,1),a=function(){var i=n.concat(r.call(arguments));return this instanceof a?l(t,i.length,i):t.apply(e,i)};return o(t.prototype)&&(a.prototype=t.prototype),a}},function(e,t,n){e.exports=n(228)},function(e,t,n){var i=n(229);e.exports=i},function(e,t,n){n(125),n(50),n(54);var i=n(93);e.exports=i.f("iterator")},function(e,t,n){e.exports=n(231)},function(e,t,n){var i=n(232);n(251),n(252),n(253),n(254),n(255),e.exports=i},function(e,t,n){n(233),n(61),n(234),n(236),n(237),n(238),n(239),n(125),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250);var i=n(9);e.exports=i.Symbol},function(e,t,n){var i=n(5),o=n(11),r=n(55),a=n(13),l=n(31),s=n(35),c=n(69),u=n(88),d=n(56),f=n(10),p=n(86),h=f("isConcatSpreadable"),m=9007199254740991,g="Maximum allowed index exceeded",v=p>=51||!o(function(){var e=[];return e[h]=!1,e.concat()[0]!==e}),_=d("concat"),b=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:r(e)};i({target:"Array",proto:!0,forced:!v||!_},{concat:function(e){var t,n,i,o,r,a=l(this),d=u(a,0),f=0;for(t=-1,i=arguments.length;t<i;t++)if(b(r=-1===t?a:arguments[t])){if(f+(o=s(r.length))>m)throw TypeError(g);for(n=0;n<o;n++,f++)n in r&&c(d,f,r[n])}else{if(f>=m)throw TypeError(g);c(d,f++,r)}return d.length=f,d}})},function(e,t,n){var i=n(5),o=n(8),r=n(36),a=n(43),l=n(14),s=n(76),c=n(106),u=n(11),d=n(16),f=n(55),p=n(13),h=n(25),m=n(31),g=n(30),v=n(60),_=n(48),b=n(77),y=n(52),x=n(126),w=n(235),A=n(127),k=n(71),C=n(18),S=n(59),E=n(19),T=n(53),R=n(74),O=n(63),M=n(51),D=n(64),N=n(10),I=n(93),L=n(12),F=n(37),P=n(42),B=n(32).forEach,j=O("hidden"),V="Symbol",z="prototype",H=N("toPrimitive"),U=P.set,W=P.getterFor(V),Y=Object[z],G=o.Symbol,$=r("JSON","stringify"),q=k.f,Q=C.f,K=w.f,X=S.f,J=R("symbols"),Z=R("op-symbols"),ee=R("string-to-symbol-registry"),te=R("symbol-to-string-registry"),ne=R("wks"),ie=o.QObject,oe=!ie||!ie[z]||!ie[z].findChild,re=l&&u(function(){return 7!=b(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=q(Y,t);i&&delete Y[t],Q(e,t,n),i&&e!==Y&&Q(Y,t,i)}:Q,ae=function(e,t){var n=J[e]=b(G[z]);return U(n,{type:V,tag:e,description:t}),l||(n.description=t),n},le=c?function(e){return"symbol"==vv(e)}:function(e){return Object(e)instanceof G},se=function(e,t,n){e===Y&&se(Z,t,n),h(e);var i=v(t,!0);return h(n),d(J,i)?(n.enumerable?(d(e,j)&&e[j][i]&&(e[j][i]=!1),n=b(n,{enumerable:_(0,!1)})):(d(e,j)||Q(e,j,_(1,{})),e[j][i]=!0),re(e,i,n)):Q(e,i,n)},ce=function(e,t){h(e);var n=g(t),i=y(n).concat(he(n));return B(i,function(t){(!l||de.call(n,t))&&se(e,t,n[t])}),e},ue=function(e,t){return void 0===t?b(e):ce(b(e),t)},de=function(e){var t=v(e,!0),n=X.call(this,t);return!(this===Y&&d(J,t)&&!d(Z,t))&&(!(n||!d(this,t)||!d(J,t)||d(this,j)&&this[j][t])||n)},fe=function(e,t){var n=g(e),i=v(t,!0);if(n!==Y||!d(J,i)||d(Z,i)){var o=q(n,i);return o&&d(J,i)&&!(d(n,j)&&n[j][i])&&(o.enumerable=!0),o}},pe=function(e){var t=K(g(e)),n=[];return B(t,function(e){!d(J,e)&&!d(M,e)&&n.push(e)}),n},he=function(e){var t=e===Y,n=K(t?Z:g(e)),i=[];return B(n,function(e){d(J,e)&&(!t||d(Y,e))&&i.push(J[e])}),i};s||(G=function(){if(this instanceof G)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=D(e),n=function e(n){this===Y&&e.call(Z,n),d(this,j)&&d(this[j],t)&&(this[j][t]=!1),re(this,t,_(1,n))};return l&&oe&&re(Y,t,{configurable:!0,set:n}),ae(t,e)},T(G[z],"toString",function(){return W(this).tag}),T(G,"withoutSetter",function(e){return ae(D(e),e)}),S.f=de,C.f=se,k.f=fe,x.f=w.f=pe,A.f=he,I.f=function(e){return ae(N(e),e)},l&&(Q(G[z],"description",{configurable:!0,get:function(){return W(this).description}}),a||T(Y,"propertyIsEnumerable",de,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:G}),B(y(ne),function(e){L(e)}),i({target:V,stat:!0,forced:!s},{for:function(e){var t=String(e);if(d(ee,t))return ee[t];var n=G(t);return ee[t]=n,te[n]=t,n},keyFor:function(e){if(!le(e))throw TypeError(e+" is not a symbol");if(d(te,e))return te[e]},useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),i({target:"Object",stat:!0,forced:!s,sham:!l},{create:ue,defineProperty:se,defineProperties:ce,getOwnPropertyDescriptor:fe}),i({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:pe,getOwnPropertySymbols:he}),i({target:"Object",stat:!0,forced:u(function(){A.f(1)})},{getOwnPropertySymbols:function(e){return A.f(m(e))}}),$&&i({target:"JSON",stat:!0,forced:!s||u(function(){var e=G();return"[null]"!=$([e])||"{}"!=$({a:e})||"{}"!=$(Object(e))})},{stringify:function(e,t,n){for(var i,o=[e],r=1;arguments.length>r;)o.push(arguments[r++]);if(i=t,(p(t)||void 0!==e)&&!le(e))return f(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!le(t))return t}),o[1]=t,$.apply(null,o)}}),G[z][H]||E(G[z],H,G[z].valueOf),F(G,V),M[j]=!0},function(e,t,n){var i=n(30),o=n(126).f,r={}.toString,a="object"==(typeof window>"u"?"undefined":vv(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(e){try{return o(e)}catch(t){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==r.call(e)?l(e):o(i(e))}},function(e,t,n){n(12)("asyncIterator")},function(e,t){},function(e,t,n){n(12)("hasInstance")},function(e,t,n){n(12)("isConcatSpreadable")},function(e,t,n){n(12)("match")},function(e,t,n){n(12)("matchAll")},function(e,t,n){n(12)("replace")},function(e,t,n){n(12)("search")},function(e,t,n){n(12)("species")},function(e,t,n){n(12)("split")},function(e,t,n){n(12)("toPrimitive")},function(e,t,n){n(12)("toStringTag")},function(e,t,n){n(12)("unscopables")},function(e,t,n){n(37)(Math,"Math",!0)},function(e,t,n){var i=n(8);n(37)(i.JSON,"JSON",!0)},function(e,t,n){n(12)("asyncDispose")},function(e,t,n){n(12)("dispose")},function(e,t,n){n(12)("observable")},function(e,t,n){n(12)("patternMatch")},function(e,t,n){n(12)("replaceAll")},function(e,t,n){e.exports=n(257)},function(e,t,n){var i=n(258);e.exports=i},function(e,t,n){n(259);var i=n(9);e.exports=i.parseInt},function(e,t,n){var i=n(5),o=n(260);i({global:!0,forced:parseInt!=o},{parseInt:o})},function(e,t,n){var i=n(8),o=n(90).trim,r=n(68),a=i.parseInt,l=/^[+-]?0[Xx]/,s=8!==a(r+"08")||22!==a(r+"0x16");e.exports=s?function(e,t){var n=o(String(e));return a(n,t>>>0||(l.test(n)?16:10))}:a},function(e,t,n){var i=n(262);e.exports=i},function(e,t,n){var i=n(263),o=Array.prototype;e.exports=function(e){var t=e.slice;return e===o||e instanceof Array&&t===o.slice?i:t}},function(e,t,n){n(264);var i=n(15);e.exports=i("Array").slice},function(e,t,n){var i=n(5),o=n(13),r=n(55),a=n(79),l=n(35),s=n(30),c=n(69),u=n(10),d=n(56),f=n(22),p=d("slice"),h=f("slice",{ACCESSORS:!0,0:0,1:2}),m=u("species"),g=[].slice,v=Math.max;i({target:"Array",proto:!0,forced:!p||!h},{slice:function(e,t){var n,i,u,d=s(this),f=l(d.length),p=a(e,f),h=a(void 0===t?f:t,f);if(r(d)&&("function"!=typeof(n=d.constructor)||n!==Array&&!r(n.prototype)?o(n)&&null===(n=n[m])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(d,p,h);for(i=new(void 0===n?Array:n)(v(h-p,0)),u=0;p<h;p++,u++)p in d&&c(i,u,d[p]);return i.length=u,i}})},function(e,t,n){n(266);var i=n(9);e.exports=i.setTimeout},function(e,t,n){var i=n(5),o=n(8),r=n(84),a=[].slice,l=function(e){return function(t,n){var i=arguments.length>2,o=i?a.call(arguments,2):void 0;return e(i?function(){("function"==typeof t?t:Function(t)).apply(this,o)}:t,n)}};i({global:!0,bind:!0,forced:/MSIE .\./.test(r)},{setTimeout:l(o.setTimeout),setInterval:l(o.setInterval)})},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(128));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(272)),s=a.__importDefault(n(273)),c=a.__importDefault(n(129)),u=a.__importDefault(n(274)),d=a.__importDefault(n(275)),f=a.__importDefault(n(276)),p=a.__importDefault(n(130)),h=a.__importDefault(n(277)),m=a.__importDefault(n(278)),g=a.__importDefault(n(279)),v=(0,r.default)({},l.default,s.default,c.default,d.default,u.default,f.default,p.default,h.default,m.default,g.default,{linkCheck:function(e,t){return!0}});t.default=v},function(e,t,n){var i=n(269);e.exports=i},function(e,t,n){n(270);var i=n(9);e.exports=i.Object.assign},function(e,t,n){var i=n(5),o=n(271);i({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){var i=n(14),o=n(11),r=n(52),a=n(127),l=n(59),s=n(31),c=n(72),u=Object.assign,d=Object.defineProperty;e.exports=!u||o(function(){if(i&&1!==u({b:1},u(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||r(u({},t)).join("")!=o})?function(e,t){for(var n=s(e),o=arguments.length,u=1,d=a.f,f=l.f;o>u;)for(var p,h=c(arguments[u++]),m=d?r(h).concat(d(h)):r(h),g=m.length,v=0;g>v;)p=m[v++],(!i||f.call(h,p))&&(n[p]=h[p]);return n}:u},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={menus:["head","bold","fontSize","fontName","italic","underline","strikeThrough","indent","lineHeight","foreColor","backColor","link","list","todo","justify","quote","emoticon","image","video","table","code","splitLine","undo","redo"],fontNames:["黑体","仿宋","楷体","标楷体","华文仿宋","华文楷体","宋体","微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"],fontSizes:{"x-small":{name:"10px",value:"1"},small:{name:"13px",value:"2"},normal:{name:"16px",value:"3"},large:{name:"18px",value:"4"},"x-large":{name:"24px",value:"5"},"xx-large":{name:"32px",value:"6"},"xxx-large":{name:"48px",value:"7"}},colors:["#000000","#ffffff","#eeece0","#1c487f","#4d80bf","#c24f4a","#8baa4a","#7b5ba1","#46acc8","#f9963b"],languageType:["Bash","C","C#","C++","CSS","Java","JavaScript","JSON","TypeScript","Plain text","Html","XML","SQL","Go","Kotlin","Lua","Markdown","PHP","Python","Shell Session","Ruby"],languageTab:"    ",emotions:[{title:"表情",type:"emoji",content:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣".split(/\s/)},{title:"手势",type:"emoji",content:"👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(/\s/)}],lineHeights:["1","1.15","1.6","2","2.5","3"],undoLimit:20,indentation:"2em",showMenuTooltips:!0,menuTooltipPosition:"up"}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(7);function o(e,t,n){window.alert(e)}t.default={onchangeTimeout:200,onchange:null,onfocus:i.EMPTY_FN,onblur:i.EMPTY_FN,onCatalogChange:null,customAlert:o}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={pasteFilterStyle:!0,pasteIgnoreImg:!1,pasteTextHandle:function(e){return e}}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={styleWithCSS:!1}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(7);t.default={linkImgCheck:function(e,t,n){return!0},showLinkImg:!0,showLinkImgAlt:!0,showLinkImgHref:!0,linkImgCallback:i.EMPTY_FN,uploadImgAccept:["jpg","jpeg","png","gif","bmp"],uploadImgServer:"",uploadImgShowBase64:!1,uploadImgMaxSize:5242880,uploadImgMaxLength:100,uploadFileName:"",uploadImgParams:{},uploadImgParamsWithUrl:!1,uploadImgHeaders:{},uploadImgHooks:{},uploadImgTimeout:1e4,withCredentials:!1,customUploadImg:null,uploadImgFromMedia:null}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default={lang:"zh-CN",languages:{"zh-CN":{wangEditor:{"重置":"重置","插入":"插入","默认":"默认","创建":"创建","修改":"修改","如":"如","请输入正文":"请输入正文",menus:{title:{"标题":"标题","加粗":"加粗","字号":"字号","字体":"字体","斜体":"斜体","下划线":"下划线","删除线":"删除线","缩进":"缩进","行高":"行高","文字颜色":"文字颜色","背景色":"背景色","链接":"链接","序列":"序列","对齐":"对齐","引用":"引用","表情":"表情","图片":"图片","视频":"视频","表格":"表格","代码":"代码","分割线":"分割线","恢复":"恢复","撤销":"撤销","全屏":"全屏","取消全屏":"取消全屏","待办事项":"待办事项"},dropListMenu:{"设置标题":"设置标题","背景颜色":"背景颜色","文字颜色":"文字颜色","设置字号":"设置字号","设置字体":"设置字体","设置缩进":"设置缩进","对齐方式":"对齐方式","设置行高":"设置行高","序列":"序列",head:{"正文":"正文"},indent:{"增加缩进":"增加缩进","减少缩进":"减少缩进"},justify:{"靠左":"靠左","居中":"居中","靠右":"靠右","两端":"两端"},list:{"无序列表":"无序列表","有序列表":"有序列表"}},panelMenus:{emoticon:{"默认":"默认","新浪":"新浪",emoji:"emoji","手势":"手势"},image:{"上传图片":"上传图片","网络图片":"网络图片","图片地址":"图片地址","图片文字说明":"图片文字说明","跳转链接":"跳转链接"},link:{"链接":"链接","链接文字":"链接文字","取消链接":"取消链接","查看链接":"查看链接"},video:{"插入视频":"插入视频","上传视频":"上传视频"},table:{"行":"行","列":"列","的":"的","表格":"表格","添加行":"添加行","删除行":"删除行","添加列":"添加列","删除列":"删除列","设置表头":"设置表头","取消表头":"取消表头","插入表格":"插入表格","删除表格":"删除表格"},code:{"删除代码":"删除代码","修改代码":"修改代码","插入代码":"插入代码"}}},validate:{"张图片":"张图片","大于":"大于","图片链接":"图片链接","不是图片":"不是图片","返回结果":"返回结果","上传图片超时":"上传图片超时","上传图片错误":"上传图片错误","上传图片失败":"上传图片失败","插入图片错误":"插入图片错误","一次最多上传":"一次最多上传","下载链接失败":"下载链接失败","图片验证未通过":"图片验证未通过","服务器返回状态":"服务器返回状态","上传图片返回结果错误":"上传图片返回结果错误","请替换为支持的图片类型":"请替换为支持的图片类型","您插入的网络图片无法识别":"您插入的网络图片无法识别","您刚才插入的图片链接未通过编辑器校验":"您刚才插入的图片链接未通过编辑器校验","插入视频错误":"插入视频错误","视频链接":"视频链接","不是视频":"不是视频","视频验证未通过":"视频验证未通过","个视频":"个视频","上传视频超时":"上传视频超时","上传视频错误":"上传视频错误","上传视频失败":"上传视频失败","上传视频返回结果错误":"上传视频返回结果错误"}}},en:{wangEditor:{"重置":"reset","插入":"insert","默认":"default","创建":"create","修改":"edit","如":"like","请输入正文":"please enter the text",menus:{title:{"标题":"head","加粗":"bold","字号":"font size","字体":"font family","斜体":"italic","下划线":"underline","删除线":"strikethrough","缩进":"indent","行高":"line heihgt","文字颜色":"font color","背景色":"background","链接":"link","序列":"numbered list","对齐":"align","引用":"quote","表情":"emoticons","图片":"image","视频":"media","表格":"table","代码":"code","分割线":"split line","恢复":"redo","撤销":"undo","全屏":"fullscreen","取消全屏":"cancel fullscreen","待办事项":"todo"},dropListMenu:{"设置标题":"title","背景颜色":"background","文字颜色":"font color","设置字号":"font size","设置字体":"font family","设置缩进":"indent","对齐方式":"align","设置行高":"line heihgt","序列":"list",head:{"正文":"text"},indent:{"增加缩进":"indent","减少缩进":"outdent"},justify:{"靠左":"left","居中":"center","靠右":"right","两端":"justify"},list:{"无序列表":"unordered","有序列表":"ordered"}},panelMenus:{emoticon:{"表情":"emoji","手势":"gesture"},image:{"上传图片":"upload image","网络图片":"network image","图片地址":"image link","图片文字说明":"image alt","跳转链接":"hyperlink"},link:{"链接":"link","链接文字":"link text","取消链接":"unlink","查看链接":"view links"},video:{"插入视频":"insert video","上传视频":"upload local video"},table:{"行":"rows","列":"columns","的":" ","表格":"table","添加行":"insert row","删除行":"delete row","添加列":"insert column","删除列":"delete column","设置表头":"set header","取消表头":"cancel header","插入表格":"insert table","删除表格":"delete table"},code:{"删除代码":"delete code","修改代码":"edit code","插入代码":"insert code"}}},validate:{"张图片":"images","大于":"greater than","图片链接":"image link","不是图片":"is not image","返回结果":"return results","上传图片超时":"upload image timeout","上传图片错误":"upload image error","上传图片失败":"upload image failed","插入图片错误":"insert image error","一次最多上传":"once most at upload","下载链接失败":"download link failed","图片验证未通过":"image validate failed","服务器返回状态":"server return status","上传图片返回结果错误":"upload image return results error","请替换为支持的图片类型":"please replace with a supported image type","您插入的网络图片无法识别":"the network picture you inserted is not recognized","您刚才插入的图片链接未通过编辑器校验":"the image link you just inserted did not pass the editor verification","插入视频错误":"insert video error","视频链接":"video link","不是视频":"is not video","视频验证未通过":"video validate failed","个视频":"videos","上传视频超时":"upload video timeout","上传视频错误":"upload video error","上传视频失败":"upload video failed","上传视频返回结果错误":"upload video return results error"}}}}}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(6);function o(){return!(!i.UA.isIE()&&!i.UA.isOldEdge)}t.default={compatibleMode:o,historyMaxSize:30}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(7);t.default={onlineVideoCheck:function(e){return!0},onlineVideoCallback:i.EMPTY_FN,showLinkVideo:!0,uploadVideoAccept:["mp4"],uploadVideoServer:"",uploadVideoMaxSize:1073741824,uploadVideoName:"",uploadVideoParams:{},uploadVideoParamsWithUrl:!1,uploadVideoHeaders:{},uploadVideoHooks:{},uploadVideoTimeout:72e5,withVideoCredentials:!1,customUploadVideo:null,customInsertVideo:null}},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(17));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3)),l=n(6),s=n(7),c=function(){function e(e){this._currentRange=null,this.editor=e}return e.prototype.getRange=function(){return this._currentRange},e.prototype.saveRange=function(e){if(e)this._currentRange=e;else{var t=window.getSelection();if(0!==t.rangeCount){var n=t.getRangeAt(0),i=this.getSelectionContainerElem(n);if(null!=i&&i.length&&"false"!==i.attr("contenteditable")&&!i.parentUntil("[contenteditable=false]")){var o=this.editor,a=o.$textElem;if(a.isContain(i)){var l;if(a.elems[0]===i.elems[0]&&(0,r.default)(l=a.html()).call(l)===s.EMPTY_P){var c=a.children(),u=null==c?void 0:c.last();o.selection.createRangeByElem(u,!0,!0),o.selection.restoreSelection()}this._currentRange=n}}}}},e.prototype.collapseRange=function(e){void 0===e&&(e=!1);var t=this._currentRange;t&&t.collapse(e)},e.prototype.getSelectionText=function(){var e=this._currentRange;return e?e.toString():""},e.prototype.getSelectionContainerElem=function(e){var t,n;if(t=e||this._currentRange)return n=t.commonAncestorContainer,a.default(1===n.nodeType?n:n.parentNode)},e.prototype.getSelectionStartElem=function(e){var t,n;if(t=e||this._currentRange)return n=t.startContainer,a.default(1===n.nodeType?n:n.parentNode)},e.prototype.getSelectionEndElem=function(e){var t,n;if(t=e||this._currentRange)return n=t.endContainer,a.default(1===n.nodeType?n:n.parentNode)},e.prototype.isSelectionEmpty=function(){var e=this._currentRange;return!(!e||!e.startContainer||e.startContainer!==e.endContainer||e.startOffset!==e.endOffset)},e.prototype.restoreSelection=function(){var e=window.getSelection(),t=this._currentRange;e&&t&&(e.removeAllRanges(),e.addRange(t))},e.prototype.createEmptyRange=function(){var e,t=this.editor,n=this.getRange();if(n&&this.isSelectionEmpty())try{l.UA.isWebkit()?(t.cmd.do("insertHTML","&#8203;"),n.setEnd(n.endContainer,n.endOffset+1),this.saveRange(n)):(e=a.default("<strong>&#8203;</strong>"),t.cmd.do("insertElem",e),this.createRangeByElem(e,!0))}catch(i){}},e.prototype.createRangeByElems=function(e,t){var n=window.getSelection?window.getSelection():document.getSelection();null==n||n.removeAllRanges();var i=document.createRange();i.setStart(e,0),i.setEnd(t,t.childNodes.length||1),this.saveRange(i),this.restoreSelection()},e.prototype.createRangeByElem=function(e,t,n){if(e.length){var i=e.elems[0],o=document.createRange();n?o.selectNodeContents(i):o.selectNode(i),null!=t&&(o.collapse(t),t||(this.saveRange(o),this.editor.selection.moveCursor(i))),this.saveRange(o)}},e.prototype.getSelectionRangeTopNodes=function(){var e,t,n=null===(e=this.getSelectionStartElem())||void 0===e?void 0:e.getNodeTop(this.editor),i=null===(t=this.getSelectionEndElem())||void 0===t?void 0:t.getNodeTop(this.editor);return this.recordSelectionNodes(a.default(n),a.default(i))},e.prototype.moveCursor=function(e,t){var n,i=this.getRange(),o=3===e.nodeType?null===(n=e.nodeValue)||void 0===n?void 0:n.length:e.childNodes.length;(l.UA.isFirefox||l.UA.isIE())&&0!==o&&(3===e.nodeType||"BR"===e.childNodes[o-1].nodeName)&&(o-=1);var r=null!=t?t:o;!i||e&&(i.setStart(e,r),i.setEnd(e,r),this.restoreSelection())},e.prototype.getCursorPos=function(){var e=window.getSelection();return null==e?void 0:e.anchorOffset},e.prototype.clearWindowSelectionRange=function(){var e=window.getSelection();e&&e.removeAllRanges()},e.prototype.recordSelectionNodes=function(e,t){var n=[],i=!0;try{for(var o=e,r=this.editor.$textElem;i;){var l=null==o?void 0:o.getNodeTop(this.editor);"BODY"===l.getNodeName()&&(i=!1),l.length>0&&(n.push(a.default(o)),(null==t?void 0:t.equal(l))||r.equal(l)?i=!1:o=l.getNextSibling())}}catch(s){i=!1}return n},e.prototype.setRangeToElem=function(e){var t=this.getRange();null==t||t.setStart(e,0),null==t||t.setEnd(e,0)},e}();t.default=c},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2).__importDefault(n(3)),o=function(){function e(e){this.editor=e}return e.prototype.do=function(e,t){var n=this.editor;n.config.styleWithCSS&&document.execCommand("styleWithCSS",!1,"true");var i=n.selection;if(i.getRange()){switch(i.restoreSelection(),e){case"insertHTML":this.insertHTML(t);break;case"insertElem":this.insertElem(t);break;default:this.execCommand(e,t)}n.menus.changeActive(),i.saveRange(),i.restoreSelection()}},e.prototype.insertHTML=function(e){var t=this.editor,n=t.selection.getRange();if(null!=n)if(this.queryCommandSupported("insertHTML"))this.execCommand("insertHTML",e);else if(n.insertNode){if(n.deleteContents(),i.default(e).elems.length>0)n.insertNode(i.default(e).elems[0]);else{var o=document.createElement("p");o.appendChild(document.createTextNode(e)),n.insertNode(o)}t.selection.collapseRange()}},e.prototype.insertElem=function(e){var t=this.editor.selection.getRange();null!=t&&t.insertNode&&(t.deleteContents(),t.insertNode(e.elems[0]))},e.prototype.execCommand=function(e,t){document.execCommand(e,!1,t)},e.prototype.queryCommandValue=function(e){return document.queryCommandValue(e)},e.prototype.queryCommandState=function(e){return document.queryCommandState(e)},e.prototype.queryCommandSupported=function(e){return document.queryCommandSupported(e)},e}();t.default=o},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(29)),a=i(n(4)),l=i(n(17)),s=i(n(27)),c=i(n(46));(0,o.default)(t,"__esModule",{value:!0});var u=n(2),d=u.__importDefault(n(3)),f=u.__importDefault(n(287)),p=n(6),h=u.__importDefault(n(299)),m=u.__importDefault(n(300)),g=n(7),v=function(){function e(e){this.editor=e,this.eventHooks={onBlurEvents:[],changeEvents:[],dropEvents:[],clickEvents:[],keydownEvents:[],keyupEvents:[],tabUpEvents:[],tabDownEvents:[],enterUpEvents:[],enterDownEvents:[],deleteUpEvents:[],deleteDownEvents:[],pasteEvents:[],linkClickEvents:[],codeClickEvents:[],textScrollEvents:[],toolbarClickEvents:[],imgClickEvents:[],imgDragBarMouseDownEvents:[],tableClickEvents:[],menuClickEvents:[],dropListMenuHoverEvents:[],splitLineEvents:[],videoClickEvents:[]}}return e.prototype.init=function(){this._saveRange(),this._bindEventHooks(),f.default(this)},e.prototype.togglePlaceholder=function(){var e,t=this.html(),n=(0,r.default)(e=this.editor.$textContainerElem).call(e,".placeholder");n.hide(),!this.editor.isComposing&&(!t||" "===t)&&n.show()},e.prototype.clear=function(){this.html(g.EMPTY_P)},e.prototype.html=function(e){var t=this.editor,n=t.$textElem;if(null==e){var i=n.html(),o=(i=(i=(i=(i=i.replace(/\u200b/gm,"")).replace(/<p><\/p>/gim,"")).replace(g.EMPTY_P_LAST_REGEX,"")).replace(g.EMPTY_P_REGEX,"<p>")).match(/<(img|br|hr|input)[^>]*>/gi);return null!==o&&(0,a.default)(o).call(o,function(e){e.match(/\/>/)||(i=i.replace(e,e.substring(0,e.length-1)+"/>"))}),i}""===(e=(0,l.default)(e).call(e))&&(e=g.EMPTY_P),0!==(0,s.default)(e).call(e,"<")&&(e="<p>"+e+"</p>"),n.html(e),t.initSelection()},e.prototype.setJSON=function(e){var t=m.default(e).children(),n=this.editor.$textElem;!t||n.replaceChildAll(t)},e.prototype.getJSON=function(){var e=this.editor.$textElem;return h.default(e)},e.prototype.text=function(e){var t=this.editor,n=t.$textElem;if(null==e){var i=n.text();return i=i.replace(/\u200b/gm,"")}n.text("<p>"+e+"</p>"),t.initSelection()},e.prototype.append=function(e){var t=this.editor;0!==(0,s.default)(e).call(e,"<")&&(e="<p>"+e+"</p>"),this.html(this.html()+e),t.initSelection()},e.prototype._saveRange=function(){var e=this.editor,t=e.$textElem,n=d.default(document);function i(){e.selection.saveRange(),e.menus.changeActive()}function o(){i(),t.off("click",o)}function r(){i(),n.off("mouseup",r)}function a(){n.on("mouseup",r),t.off("mouseleave",a)}t.on("keyup",i),t.on("click",o),t.on("mousedown",function(){t.on("mouseleave",a)}),t.on("mouseup",function(n){t.off("mouseleave",a),(0,c.default)(function(){null!==e.selection.getRange()&&i()},0)})},e.prototype._bindEventHooks=function(){var e=this.editor,t=e.$textElem,n=this.eventHooks;function i(e){e.preventDefault()}t.on("click",function(e){var t=n.clickEvents;(0,a.default)(t).call(t,function(t){return t(e)})}),t.on("keyup",function(e){if(13===e.keyCode){var t=n.enterUpEvents;(0,a.default)(t).call(t,function(t){return t(e)})}}),t.on("keyup",function(e){var t=n.keyupEvents;(0,a.default)(t).call(t,function(t){return t(e)})}),t.on("keydown",function(e){var t=n.keydownEvents;(0,a.default)(t).call(t,function(t){return t(e)})}),t.on("keyup",function(e){if(8===e.keyCode||46===e.keyCode){var t=n.deleteUpEvents;(0,a.default)(t).call(t,function(t){return t(e)})}}),t.on("keydown",function(e){if(8===e.keyCode||46===e.keyCode){var t=n.deleteDownEvents;(0,a.default)(t).call(t,function(t){return t(e)})}}),t.on("paste",function(e){if(!p.UA.isIE()){e.preventDefault();var t=n.pasteEvents;(0,a.default)(t).call(t,function(t){return t(e)})}}),t.on("keydown",function(t){(e.isFocus||e.isCompatibleMode)&&(t.ctrlKey||t.metaKey)&&90===t.keyCode&&(t.preventDefault(),t.shiftKey?e.history.restore():e.history.revoke())}),t.on("keyup",function(e){if(9===e.keyCode){e.preventDefault();var t=n.tabUpEvents;(0,a.default)(t).call(t,function(t){return t(e)})}}),t.on("keydown",function(e){if(9===e.keyCode){e.preventDefault();var t=n.tabDownEvents;(0,a.default)(t).call(t,function(t){return t(e)})}}),t.on("scroll",p.throttle(function(e){var t=n.textScrollEvents;(0,a.default)(t).call(t,function(t){return t(e)})},100)),d.default(document).on("dragleave",i).on("drop",i).on("dragenter",i).on("dragover",i),e.beforeDestroy(function(){d.default(document).off("dragleave",i).off("drop",i).off("dragenter",i).off("dragover",i)}),t.on("drop",function(e){e.preventDefault();var t=n.dropEvents;(0,a.default)(t).call(t,function(t){return t(e)})}),t.on("click",function(e){var t=null,i=e.target,o=d.default(i);if("A"===o.getNodeName())t=o;else{var r=o.parentUntil("a");null!=r&&(t=r)}if(t){var l=n.linkClickEvents;(0,a.default)(l).call(l,function(e){return e(t)})}}),t.on("click",function(e){var t=null,i=e.target,o=d.default(i);if("IMG"===o.getNodeName()&&!o.elems[0].getAttribute("data-emoji")&&(e.stopPropagation(),t=o),t){var r=n.imgClickEvents;(0,a.default)(r).call(r,function(e){return e(t)})}}),t.on("click",function(e){var t=null,i=e.target,o=d.default(i);if("PRE"===o.getNodeName())t=o;else{var r=o.parentUntil("pre");null!==r&&(t=r)}if(t){var l=n.codeClickEvents;(0,a.default)(l).call(l,function(e){return e(t)})}}),t.on("click",function(t){var i=null,o=t.target,r=d.default(o);if("HR"===r.getNodeName()&&(i=r),i){e.selection.createRangeByElem(i),e.selection.restoreSelection();var l=n.splitLineEvents;(0,a.default)(l).call(l,function(e){return e(i)})}}),e.$toolbarElem.on("click",function(e){var t=n.toolbarClickEvents;(0,a.default)(t).call(t,function(t){return t(e)})}),e.$textContainerElem.on("mousedown",function(e){var t=e.target;if(d.default(t).hasClass("w-e-img-drag-rb")){var i=n.imgDragBarMouseDownEvents;(0,a.default)(i).call(i,function(e){return e()})}}),t.on("click",function(t){var i=null,o=t.target;if(i=d.default(o).parentUntilEditor("TABLE",e,o)){var r=n.tableClickEvents;(0,a.default)(r).call(r,function(e){return e(i,t)})}}),t.on("keydown",function(e){if(13===e.keyCode){var t=n.enterDownEvents;(0,a.default)(t).call(t,function(t){return t(e)})}}),t.on("click",function(e){var t=null,i=e.target,o=d.default(i);if("VIDEO"===o.getNodeName()&&(e.stopPropagation(),t=o),t){var r=n.videoClickEvents;(0,a.default)(r).call(r,function(e){return e(t)})}})},e}();t.default=v},function(e,t,n){var i=n(284);e.exports=i},function(e,t,n){var i=n(285),o=Array.prototype;e.exports=function(e){var t=e.find;return e===o||e instanceof Array&&t===o.find?i:t}},function(e,t,n){n(286);var i=n(15);e.exports=i("Array").find},function(e,t,n){var i=n(5),o=n(32).find,r=n(82),a=n(22),l="find",s=!0,c=a(l);l in[]&&Array(1)[l](function(){s=!1}),i({target:"Array",proto:!0,forced:s||!c},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),r(l)},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(288)),r=i.__importStar(n(289)),a=i.__importDefault(n(290)),l=i.__importDefault(n(291)),s=i.__importDefault(n(298));function c(e){var t=e.editor,n=e.eventHooks;o.default(t,n.enterUpEvents,n.enterDownEvents),r.default(t,n.deleteUpEvents,n.deleteDownEvents),r.cutToKeepP(t,n.keyupEvents),a.default(t,n.tabDownEvents),l.default(t,n.pasteEvents),s.default(t,n.imgClickEvents)}t.default=c},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(27));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(7),s=a.__importDefault(n(3));function c(e,t,n){function i(t){var n,i=s.default(l.EMPTY_P);i.insertBefore(t),(0,r.default)(n=t.html()).call(n,"<img")>=0?i.remove():(e.selection.createRangeByElem(i,!0,!0),e.selection.restoreSelection(),t.remove())}function o(){var t=e.$textElem,n=e.selection.getSelectionContainerElem(),o=n.parent();"<code><br></code>"===o.html()||"FONT"===n.getNodeName()&&""===n.text()&&"monospace"===n.attr("face")?i(o):o.equal(t)&&("P"===n.getNodeName()&&null===n.attr("data-we-empty-p")||n.text()||i(n))}function a(t){var n;e.selection.saveRange(null===(n=getSelection())||void 0===n?void 0:n.getRangeAt(0)),e.selection.getSelectionContainerElem().id===e.textElemId&&(t.preventDefault(),e.cmd.do("insertHTML","<p><br></p>"))}t.push(o),n.push(a)}t.default=c},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(17)),a=i(n(28));(0,o.default)(t,"__esModule",{value:!0}),t.cutToKeepP=void 0;var l=n(2),s=n(7),c=l.__importDefault(n(3));function u(e,t,n){function i(){var t=e.$textElem,n=e.$textElem.html(),i=e.$textElem.text(),o=(0,r.default)(n).call(n),l=["<p><br></p>","<br>",'<p data-we-empty-p=""></p>',s.EMPTY_P];if(/^\s*$/.test(i)&&(!o||(0,a.default)(l).call(l,o))){t.html(s.EMPTY_P);var c=t.getNode();e.selection.createRangeByElems(c.childNodes[0],c.childNodes[0]);var u=e.selection.getSelectionContainerElem();e.selection.restoreSelection(),e.selection.moveCursor(u.getNode(),0)}}function o(t){var n,i=e.$textElem;(0,r.default)(n=i.html().toLowerCase()).call(n)!==s.EMPTY_P||t.preventDefault()}t.push(i),n.push(o)}function d(e,t){function n(t){var n;if(88===t.keyCode){var i=e.$textElem,o=(0,r.default)(n=i.html().toLowerCase()).call(n);if(!o||"<br>"===o){var a=c.default(s.EMPTY_P);i.html(" "),i.append(a),e.selection.createRangeByElem(a,!1,!0),e.selection.restoreSelection(),e.selection.moveCursor(a.getNode(),0)}}}t.push(n)}t.cutToKeepP=d,t.default=u},function(e,t,n){function i(e,t){function n(){if(e.cmd.queryCommandSupported("insertHTML")){var t=e.selection.getSelectionContainerElem();if(t){var n=t.parent(),i=t.getNodeName(),o=n.getNodeName();"CODE"==i||"CODE"===o||"PRE"===o||/hljs/.test(o)?e.cmd.do("insertHTML",e.config.languageTab):e.cmd.do("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;")}}}t.push(n)}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(17)),a=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var l=n(131),s=n(6),c=n(7);function u(e){var t,n=(0,r.default)(t=e.replace(/<div>/gim,"<p>").replace(/<\/div>/gim,"</p>")).call(t),i=document.createElement("div");return i.innerHTML=n,i.innerHTML.replace(/<p><\/p>/gim,"")}function d(e){return e.replace(/<br>|<br\/>/gm,"\n").replace(/<[^>]+>/gm,"")}function f(e){var t;if(""===e)return!1;var n=document.createElement("div");return n.innerHTML=e,"P"===(null===(t=n.firstChild)||void 0===t?void 0:t.nodeName)}function p(e){if(null==e||!e.length)return!1;var t=e.elems[0];return"P"===t.nodeName&&"<br>"===t.innerHTML}function h(e,t){function n(t){var n=e.config,i=n.pasteFilterStyle,o=n.pasteIgnoreImg,r=n.pasteTextHandle,h=l.getPasteHtml(t,i,o),m=l.getPasteText(t);m=m.replace(/\n/gm,"<br>");var g=e.selection.getSelectionContainerElem();if(g){var v=null==g?void 0:g.getNodeName(),_=null==g?void 0:g.getNodeTop(e),b="";if(_.elems[0]&&(b=null==_?void 0:_.getNodeName()),"CODE"===v||"PRE"===b)return r&&s.isFunction(r)&&(m=""+(r(m)||"")),void e.cmd.do("insertHTML",d(m));if(c.urlRegex.test(m)&&i){r&&s.isFunction(r)&&(m=""+(r(m)||""));var y=m.replace(c.urlRegex,function(e){return'<a href="'+e+'" target="_blank">'+e+"</a>"}),x=e.selection.getRange(),w=document.createElement("div"),A=document.createDocumentFragment();if(w.innerHTML=y,null==x)return;for(;w.childNodes.length;)A.append(w.childNodes[0]);var k=A.querySelectorAll("a");return(0,a.default)(k).call(k,function(e){e.innerText=e.href}),x.insertNode&&(x.deleteContents(),x.insertNode(A)),void e.selection.clearWindowSelectionRange()}if(h)try{if(r&&s.isFunction(r)&&(h=""+(r(h)||"")),/[\.\#\@]?\w+[ ]+\{[^}]*\}/.test(h)&&i)e.cmd.do("insertHTML",""+u(m));else{var C=u(h);if(f(C)){var S=e.$textElem;if(e.cmd.do("insertHTML",C),S.equal(g))return void e.selection.createEmptyRange();p(_)&&_.remove()}else e.cmd.do("insertHTML",C)}}catch(E){r&&s.isFunction(r)&&(m=""+(r(m)||"")),e.cmd.do("insertHTML",""+u(m))}}}t.push(n)}t.default=h},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(17)),a=i(n(4)),l=i(n(28));(0,o.default)(t,"__esModule",{value:!0});var s=n(2),c=n(293),u=s.__importDefault(n(297));function d(e){var t=/<span>.*?<\/span>/gi,n=/<span>(.*?)<\/span>/;return e.replace(t,function(e){var t=e.match(n);return null==t?"":t[1]})}function f(e,t){var n;return e=(0,r.default)(n=e.toLowerCase()).call(n),!!(c.IGNORE_TAGS.has(e)||t&&"img"===e)}function p(e,t){var n="";n="<"+e;var i=[];return(0,a.default)(t).call(t,function(e){i.push(e.name+'="'+e.value+'"')}),i.length>0&&(n=n+" "+i.join(" ")),n=n+(c.EMPTY_TAGS.has(e)?"/":"")+">"}function h(e){return"</"+e+">"}function m(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!1);var i=[],o="";function s(e){(e=(0,r.default)(e).call(e))&&(c.EMPTY_TAGS.has(e)||(o=e))}function m(){o=""}(new u.default).parse(e,{startElement:function(e,o){if(s(e),!f(e,n)){var r=c.NECESSARY_ATTRS.get(e)||[],u=[];(0,a.default)(o).call(o,function(e){var n=e.name;"style"!==n?!1!==(0,l.default)(r).call(r,n)&&u.push(e):t||u.push(e)});var d=p(e,u);i.push(d)}},characters:function(e){!e||f(o,n)||i.push(e)},endElement:function(e){if(!f(e,n)){var t=h(e);i.push(t),m()}},comment:function(e){s(e)}});var g=i.join("");return g=d(g)}t.default=m},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(132)),a=i(n(121));(0,o.default)(t,"__esModule",{value:!0}),t.TOP_LEVEL_TAGS=t.EMPTY_TAGS=t.NECESSARY_ATTRS=t.IGNORE_TAGS=void 0,t.IGNORE_TAGS=new r.default(["doctype","!doctype","html","head","meta","body","script","style","link","frame","iframe","title","svg","center","o:p"]),t.NECESSARY_ATTRS=new a.default([["img",["src","alt"]],["a",["href","target"]],["td",["colspan","rowspan"]],["th",["colspan","rowspan"]]]),t.EMPTY_TAGS=new r.default(["area","base","basefont","br","col","hr","img","input","isindex","embed"]),t.TOP_LEVEL_TAGS=new r.default(["h1","h2","h3","h4","h5","p","ul","ol","table","blockquote","pre","hr","form"])},function(e,t,n){var i=n(295);e.exports=i},function(e,t,n){n(296),n(61),n(50),n(54);var i=n(9);e.exports=i.Set},function(e,t,n){var i=n(122),o=n(124);e.exports=i("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},o)},function(e,t){function n(){}n.prototype={handler:null,startTagRe:/^<([^>\s\/]+)((\s+[^=>\s]+(\s*=\s*((\"[^"]*\")|(\'[^']*\')|[^>\s]+))?)*)\s*\/?\s*>/m,endTagRe:/^<\/([^>\s]+)[^>]*>/m,attrRe:/([^=\s]+)(\s*=\s*((\"([^"]*)\")|(\'([^']*)\')|[^>\s]+))?/gm,parse:function(e,t){t&&(this.contentHandler=t);for(var n,i,o,r=!1,a=this;e.length>0;)"\x3c!--"==e.substring(0,4)?-1!=(o=e.indexOf("--\x3e"))?(this.contentHandler.comment(e.substring(4,o)),e=e.substring(o+3),r=!1):r=!0:"</"==e.substring(0,2)?this.endTagRe.test(e)?(n=RegExp.lastMatch,i=RegExp.rightContext,n.replace(this.endTagRe,function(){return a.parseEndTag.apply(a,arguments)}),e=i,r=!1):r=!0:"<"==e.charAt(0)&&(this.startTagRe.test(e)?(n=RegExp.lastMatch,i=RegExp.rightContext,n.replace(this.startTagRe,function(){return a.parseStartTag.apply(a,arguments)}),e=i,r=!1):r=!0),r&&(-1==(o=e.indexOf("<"))?(this.contentHandler.characters(e),e=""):(this.contentHandler.characters(e.substring(0,o)),e=e.substring(o))),r=!0},parseStartTag:function(e,t,n){var i=this.parseAttributes(t,n);this.contentHandler.startElement(t,i)},parseEndTag:function(e,t){this.contentHandler.endElement(t)},parseAttributes:function(e,t){var n=this,i=[];return t.replace(this.attrRe,function(t,o,r,a,l,s,c,u){i.push(n.parseAttribute(e,t,o,r,a,l,s,c,u))}),i},parseAttribute:function(e,t,n){var i="";return arguments[7]?i=arguments[8]:arguments[5]?i=arguments[6]:arguments[3]&&(i=arguments[4]),{name:n,value:i||arguments[3]?i:null}}},e.exports=n},function(e,t,n){function i(e,t){function n(t){e.selection.createRangeByElem(t),e.selection.restoreSelection()}t.push(n)}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(6),s=a.__importDefault(n(3));function c(e){var t=[],n=e.childNodes()||[];return(0,r.default)(n).call(n,function(e){var n,i=e.nodeType;if(3===i&&(n=e.textContent||"",n=l.replaceHtmlSymbol(n)),1===i){(n={}).tag=e.nodeName.toLowerCase();for(var o=[],r=e.attributes,a=r.length||0,u=0;u<a;u++){var d=r[u];o.push({name:d.name,value:d.value})}n.attrs=o,n.children=c(s.default(e))}n&&t.push(n)}),t}t.default=c},function(e,t,n){var i=n(0),o=i(n(92)),r=i(n(1)),a=i(n(4));(0,r.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3));function s(e,t){void 0===t&&(t=document.createElement("div"));var n=t;return(0,a.default)(e).call(e,function(e){var t,i;"string"==typeof e&&(t=document.createTextNode(e)),"object"===(0,o.default)(e)&&(t=document.createElement(e.tag),(0,a.default)(i=e.attrs).call(i,function(e){l.default(t).attr(e.name,e.value)}),e.children&&e.children.length>0&&s(e.children,t.getRootNode())),t&&n.appendChild(t)}),l.default(n)}t.default=s},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(89)),a=i(n(70)),l=i(n(28)),s=i(n(302)),c=i(n(4)),u=i(n(94)),d=i(n(133)),f=i(n(46)),p=i(n(57));(0,o.default)(t,"__esModule",{value:!0});var h=n(2),m=h.__importDefault(n(87)),g=h.__importDefault(n(314)),v=h.__importDefault(n(3)),_=function(){function e(e){this.editor=e,this.menuList=[],this.constructorList=g.default}return e.prototype.extend=function(e,t){!t||"function"!=typeof t||(this.constructorList[e]=t)},e.prototype.init=function(){var e,t,n=this,i=this.editor.config,o=i.excludeMenus;!1===(0,r.default)(o)&&(o=[]),i.menus=(0,a.default)(e=i.menus).call(e,function(e){return!1===(0,l.default)(o).call(o,e)});var d=(0,s.default)(m.default.globalCustomMenuConstructorList);d=(0,a.default)(d).call(d,function(e){return(0,l.default)(o).call(o,e)}),(0,c.default)(d).call(d,function(e){delete m.default.globalCustomMenuConstructorList[e]}),(0,c.default)(t=i.menus).call(t,function(e){var t=n.constructorList[e];n._initMenuList(e,t)});for(var f=0,p=(0,u.default)(m.default.globalCustomMenuConstructorList);f<p.length;f++){var h=p[f],g=h[0],v=h[1];this._initMenuList(g,v)}this._addToToolbar(),i.showMenuTooltips&&this._bindMenuTooltips()},e.prototype._initMenuList=function(e,t){var n;if(null!=t&&"function"==typeof t)if((0,d.default)(n=this.menuList).call(n,function(t){return t.key===e}));else{var i=new t(this.editor);i.key=e,this.menuList.push(i)}},e.prototype._bindMenuTooltips=function(){var e=this.editor,t=e.$toolbarElem,n=e.config.menuTooltipPosition,i=v.default('<div class="w-e-menu-tooltip w-e-menu-tooltip-'+n+'">\n <div class="w-e-menu-tooltip-item-wrapper">\n <div></div>\n </div>\n </div>');i.css("visibility","hidden"),t.append(i),i.css("z-index",e.zIndex.get("tooltip"));var o=0;function r(){o&&clearTimeout(o)}function a(){r(),i.css("visibility","hidden")}t.on("mouseover",function(l){var s,c,u=l.target,d=v.default(u);if(d.isContain(t))a();else{if(null!=d.parentUntil(".w-e-droplist"))a();else if(d.attr("data-title"))s=d.attr("data-title"),c=d;else{var p=d.parentUntil(".w-e-menu");null!=p&&(s=p.attr("data-title"),c=p)}if(s&&c){r();var h=c.getOffsetData();i.text(e.i18next.t("menus.title."+s));var m=i.getOffsetData(),g=h.left+h.width/2-m.width/2;i.css("left",g+"px"),"up"===n?i.css("top",h.top-m.height-8+"px"):"down"===n&&i.css("top",h.top+h.height+8+"px"),o=(0,f.default)(function(){i.css("visibility","visible")},200)}else a()}}).on("mouseleave",function(){a()})},e.prototype._addToToolbar=function(){var e,t=this.editor.$toolbarElem;(0,c.default)(e=this.menuList).call(e,function(e){var n=e.$elem;n&&t.append(n)})},e.prototype.menuFind=function(e){for(var t=this.menuList,n=0,i=t.length;n<i;n++)if(t[n].key===e)return t[n];return t[0]},e.prototype.changeActive=function(){var e;(0,c.default)(e=this.menuList).call(e,function(e){var t;(0,f.default)((0,p.default)(t=e.tryChangeActive).call(t,e),100)})},e}();t.default=_},function(e,t,n){e.exports=n(303)},function(e,t,n){var i=n(304);e.exports=i},function(e,t,n){n(305);var i=n(9);e.exports=i.Object.keys},function(e,t,n){var i=n(5),o=n(31),r=n(52);i({target:"Object",stat:!0,forced:n(11)(function(){r(1)})},{keys:function(e){return r(o(e))}})},function(e,t,n){var i=n(307);e.exports=i},function(e,t,n){n(308);var i=n(9);e.exports=i.Object.entries},function(e,t,n){var i=n(5),o=n(309).entries;i({target:"Object",stat:!0},{entries:function(e){return o(e)}})},function(e,t,n){var i=n(14),o=n(52),r=n(30),a=n(59).f,l=function(e){return function(t){for(var n,l=r(t),s=o(l),c=s.length,u=0,d=[];c>u;)n=s[u++],(!i||a.call(l,n))&&d.push(e?[n,l[n]]:l[n]);return d}};e.exports={entries:l(!0),values:l(!1)}},function(e,t,n){var i=n(311);e.exports=i},function(e,t,n){var i=n(312),o=Array.prototype;e.exports=function(e){var t=e.some;return e===o||e instanceof Array&&t===o.some?i:t}},function(e,t,n){n(313);var i=n(15);e.exports=i("Array").some},function(e,t,n){var i=n(5),o=n(32).some,r=n(67),a=n(22),l=r("some"),s=a("some");i({target:"Array",proto:!0,forced:!l||!s},{some:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(315)),r=i.__importDefault(n(316)),a=i.__importDefault(n(321)),l=i.__importDefault(n(326)),s=i.__importDefault(n(327)),c=i.__importDefault(n(328)),u=i.__importDefault(n(329)),d=i.__importDefault(n(331)),f=i.__importDefault(n(333)),p=i.__importDefault(n(334)),h=i.__importDefault(n(337)),m=i.__importDefault(n(338)),g=i.__importDefault(n(339)),v=i.__importDefault(n(350)),_=i.__importDefault(n(365)),b=i.__importDefault(n(369)),y=i.__importDefault(n(137)),x=i.__importDefault(n(378)),w=i.__importDefault(n(380)),A=i.__importDefault(n(381)),k=i.__importDefault(n(382)),C=i.__importDefault(n(401)),S=i.__importDefault(n(406)),E=i.__importDefault(n(409));t.default={bold:o.default,head:r.default,italic:l.default,link:a.default,underline:s.default,strikeThrough:c.default,fontName:u.default,fontSize:d.default,justify:f.default,quote:p.default,backColor:h.default,foreColor:m.default,video:g.default,image:v.default,indent:_.default,emoticon:b.default,list:y.default,lineHeight:x.default,undo:w.default,redo:A.default,table:k.default,code:C.default,splitLine:S.default,todo:E.default}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(23)),r=i.__importDefault(n(3)),a=function(e){function t(t){var n=r.default('<div class="w-e-menu" data-title="加粗">\n <i class="w-e-icon-bold"></i>\n </div>');return e.call(this,n,t)||this}return i.__extends(t,e),t.prototype.clickHandler=function(){var e=this.editor,t=e.selection.isSelectionEmpty();t&&e.selection.createEmptyRange(),e.cmd.do("bold"),t&&(e.selection.collapseRange(),e.selection.restoreSelection())},t.prototype.tryChangeActive=function(){this.editor.cmd.queryCommandState("bold")?this.active():this.unActive()},t}(o.default);t.default=a},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(27)),a=i(n(29)),l=i(n(4)),s=i(n(317)),c=i(n(28));(0,o.default)(t,"__esModule",{value:!0});var u=n(2),d=u.__importDefault(n(24)),f=u.__importDefault(n(3)),p=n(6),h=n(7),m=function(e){function t(t){var n=this,i=f.default('<div class="w-e-menu" data-title="标题"><i class="w-e-icon-header"></i></div>'),o={width:100,title:"设置标题",type:"list",list:[{$elem:f.default("<h1>H1</h1>"),value:"<h1>"},{$elem:f.default("<h2>H2</h2>"),value:"<h2>"},{$elem:f.default("<h3>H3</h3>"),value:"<h3>"},{$elem:f.default("<h4>H4</h4>"),value:"<h4>"},{$elem:f.default("<h5>H5</h5>"),value:"<h5>"},{$elem:f.default("<p>"+t.i18next.t("menus.dropListMenu.head.正文")+"</p>"),value:"<p>"}],clickHandler:function(e){n.command(e)}};return n=e.call(this,i,t,o)||this,t.config.onCatalogChange&&(n.oldCatalogs=[],n.addListenerCatalog(),n.getCatalogs()),n}return u.__extends(t,e),t.prototype.command=function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();if(n&&t.$textElem.equal(n))this.setMultilineHead(e);else{var i;if((0,r.default)(i=["OL","UL","LI","TABLE","TH","TR","CODE","HR"]).call(i,f.default(n).getNodeName())>-1)return;t.cmd.do("formatBlock",e)}"<p>"!==e&&this.addUidForSelectionElem()},t.prototype.addUidForSelectionElem=function(){var e=this.editor.selection.getSelectionContainerElem(),t=p.getRandomCode();f.default(e).attr("id",t)},t.prototype.addListenerCatalog=function(){var e=this;this.editor.txt.eventHooks.changeEvents.push(function(){e.getCatalogs()})},t.prototype.getCatalogs=function(){var e=this.editor,t=this.editor.$textElem,n=e.config.onCatalogChange,i=(0,a.default)(t).call(t,"h1,h2,h3,h4,h5"),o=[];(0,l.default)(i).call(i,function(e,t){var n=f.default(e),i=n.attr("id"),r=n.getNodeName(),a=n.text();i||(i=p.getRandomCode(),n.attr("id",i)),a&&o.push({tag:r,id:i,text:a})}),(0,s.default)(this.oldCatalogs)!==(0,s.default)(o)&&(this.oldCatalogs=o,n&&n(o))},t.prototype.setMultilineHead=function(e){var t,n,i=this,o=this.editor,r=o.selection,a=null===(t=r.getSelectionContainerElem())||void 0===t?void 0:t.elems[0],s=["IMG","VIDEO","TABLE","TH","TR","UL","OL","PRE","HR","BLOCKQUOTE"],c=f.default(r.getSelectionStartElem()),u=f.default(r.getSelectionEndElem());u.elems[0].outerHTML===f.default(h.EMPTY_P).elems[0].outerHTML&&!u.elems[0].nextSibling&&(u=u.prev());var d=[];d.push(c.getNodeTop(o));var p=[],m=null===(n=r.getRange())||void 0===n?void 0:n.commonAncestorContainer.childNodes;null==m||(0,l.default)(m).call(m,function(e,t){e===d[0].getNode()&&p.push(t),e===u.getNodeTop(o).getNode()&&p.push(t)});for(var g=0;d[g].getNode()!==u.getNodeTop(o).getNode();){if(!d[g].elems[0])return;var v=f.default(d[g].next().getNode());d.push(v),g++}null==d||(0,l.default)(d).call(d,function(t,n){if(!i.hasTag(t,s)){var o=f.default(e),r=t.parent().getNode();o.html(""+t.html()),r.insertBefore(o.getNode(),t.getNode()),t.remove()}}),r.createRangeByElems(a.children[p[0]],a.children[p[1]])},t.prototype.hasTag=function(e,t){var n,i=this;if(!e)return!1;if((0,c.default)(t).call(t,null==e?void 0:e.getNodeName()))return!0;var o=!1;return null===(n=e.children())||void 0===n||(0,l.default)(n).call(n,function(e){o=i.hasTag(f.default(e),t)}),o},t.prototype.tryChangeActive=function(){var e=/^h/i,t=this.editor.cmd.queryCommandValue("formatBlock");e.test(t)?this.active():this.unActive()},t}(d.default);t.default=m},function(e,t,n){e.exports=n(318)},function(e,t,n){var i=n(319);e.exports=i},function(e,t,n){n(320);var i=n(9);i.JSON||(i.JSON={stringify:JSON.stringify}),e.exports=function(e,t,n){return i.JSON.stringify.apply(null,arguments)}},function(e,t,n){var i=n(5),o=n(36),r=n(11),a=o("JSON","stringify"),l=/[\uD800-\uDFFF]/g,s=/^[\uD800-\uDBFF]$/,c=/^[\uDC00-\uDFFF]$/,u=function(e,t,n){var i=n.charAt(t-1),o=n.charAt(t+1);return s.test(e)&&!c.test(o)||c.test(e)&&!s.test(i)?"\\u"+e.charCodeAt(0).toString(16):e},d=r(function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")});a&&i({target:"JSON",stat:!0,forced:d},{stringify:function(e,t,n){var i=a.apply(null,arguments);return"string"==typeof i?i.replace(l,u):i}})},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(17));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(38)),s=a.__importDefault(n(3)),c=a.__importDefault(n(322)),u=a.__importStar(n(96)),d=a.__importDefault(n(33)),f=a.__importDefault(n(324)),p=n(7),h=function(e){function t(t){var n=this,i=s.default('<div class="w-e-menu" data-title="链接"><i class="w-e-icon-link"></i></div>');return n=e.call(this,i,t)||this,f.default(t),n}return a.__extends(t,e),t.prototype.clickHandler=function(){var e,t=this.editor,n=t.selection.getSelectionContainerElem(),i=t.$textElem,o=i.html();if((0,r.default)(o).call(o)===p.EMPTY_P){var a=i.children();t.selection.createRangeByElem(a,!0,!0),n=t.selection.getSelectionContainerElem()}if(!n||!t.$textElem.equal(n))if(this.isActive){var l="",c="";if(!(e=t.selection.getSelectionContainerElem()))return;if("A"!==e.getNodeName()){var d=u.getParentNodeA(e);e=s.default(d)}l=e.elems[0].innerText,c=e.attr("href"),this.createPanel(l,c)}else t.selection.isSelectionEmpty()?this.createPanel("",""):this.createPanel(t.selection.getSelectionText(),"")},t.prototype.createPanel=function(e,t){var n=c.default(this.editor,e,t);new d.default(this,n).create()},t.prototype.tryChangeActive=function(){var e=this.editor;u.default(e)?this.active():this.unActive()},t}(l.default);t.default=h},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(28)),a=i(n(17)),l=i(n(29));(0,o.default)(t,"__esModule",{value:!0});var s=n(2),c=n(6),u=s.__importDefault(n(3)),d=s.__importStar(n(96)),f=n(323);function p(e,t,n){var i,o=c.getRandom("input-link"),s=c.getRandom("input-text"),p=c.getRandom("btn-ok"),h=c.getRandom("btn-del"),m=d.default(e)?"inline-block":"none";function g(){if(d.default(e)){var t=e.selection.getSelectionContainerElem();!t||(e.selection.createRangeByElem(t),e.selection.restoreSelection(),i=t)}}function v(t,n){var i=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),o=u.default('<a target="_blank">'+i+"</a>"),r=o.elems[0];r.innerText=t,r.href=n,d.default(e)&&g(),e.cmd.do("insertElem",o)}function _(){if(d.default(e))if(g(),"A"===i.getNodeName()){var t,n=i.elems[0],o=n.parentElement;o&&(0,r.default)(t=d.EXTRA_TAG).call(t,o.nodeName)?o.innerHTML=n.innerHTML:e.cmd.do("insertHTML","<span>"+n.innerHTML+"</span>")}else{var a=d.getParentNodeA(i).innerHTML;e.cmd.do("insertHTML","<span>"+a+"</span>")}}function b(t,n){var i=e.config.linkCheck(t,n);if(void 0!==i){if(!0===i)return!0;e.config.customAlert(i,"warning")}return!1}return{width:300,height:0,tabs:[{title:e.i18next.t("menus.panelMenus.link.链接"),tpl:'<div>\n <input\n id="'+s+'"\n type="text"\n class="block"\n placeholder="'+e.i18next.t("menus.panelMenus.link.链接文字")+'"/>\n </td>\n <input\n id="'+o+'"\n type="text"\n class="block"\n placeholder="'+e.i18next.t("如")+' https://..."/>\n </td>\n <div class="w-e-button-container">\n <button type="button" id="'+p+'" class="right">\n '+e.i18next.t("插入")+'\n </button>\n <button type="button" id="'+h+'" class="gray right" style="display:'+m+'">\n '+e.i18next.t("menus.panelMenus.link.取消链接")+"\n </button>\n </div>\n </div>",events:[{selector:"#"+p,type:"click",fn:function(){var t,n,i,l,c,p=e.selection.getSelectionContainerElem(),h=null==p?void 0:p.elems[0];e.selection.restoreSelection();var m=e.selection.getSelectionRangeTopNodes()[0].getNode(),g=window.getSelection(),_=u.default("#"+o),y=u.default("#"+s),x=(0,a.default)(t=_.val()).call(t),w=(0,a.default)(n=y.val()).call(n),A="";g&&(null==g||!g.isCollapsed)&&(A=null===(l=f.insertHtml(g,m))||void 0===l?void 0:(0,a.default)(l).call(l));var k=null==A?void 0:A.replace(/<.*?>/g,""),C=null!==(c=null==k?void 0:k.length)&&void 0!==c?c:0;if(C<=w.length){var S=w.substring(0,C),E=w.substring(C);k===S&&(w=k+E)}if(x&&(w||(w=x),b(w,x))){if("A"===(null==h?void 0:h.nodeName))return h.setAttribute("href",x),h.innerText=w,!0;if("A"!==(null==h?void 0:h.nodeName)&&(0,r.default)(i=d.EXTRA_TAG).call(i,h.nodeName)){var T=d.getParentNodeA(p);if(T)return T.setAttribute("href",x),h.innerText=w,!0}return v(w,x),!0}},bindEnter:!0},{selector:"#"+h,type:"click",fn:function(){return _(),!0}}]}],setLinkValue:function(e,i){var r="",a="";"text"===i&&(r="#"+s,a=t),"link"===i&&(r="#"+o,a=n),(0,l.default)(e).call(e,r).elems[0].value=a}}}t.default=p},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));function a(e,t){var n=e,i=e;do{if(n.textContent===t)break;i=n,n.parentNode&&(n=null==n?void 0:n.parentNode)}while("P"!==(null==n?void 0:n.nodeName));return i}function l(e,t){var n=e.nodeName,i="";if(3===e.nodeType||/^(h|H)[1-6]$/.test(n))return t;if(1===e.nodeType){var o=e.getAttribute("style"),r=e.getAttribute("face"),a=e.getAttribute("color");o&&(i=i+' style="'+o+'"'),r&&(i=i+' face="'+r+'"'),a&&(i=i+' color="'+a+'"')}return"<"+(n=n.toLowerCase())+i+">"+t+"</"+n+">"}function s(e,t,n,i){var o,r=null===(o=t.textContent)||void 0===o?void 0:o.substring(n,i),a=t,s="";do{r=s=l(a,null!=r?r:""),a=null==a?void 0:a.parentElement}while(a&&a.textContent!==e);return s}function c(e,t){var n,i,o,r,c,f=e.anchorNode,p=e.focusNode,h=e.anchorOffset,m=e.focusOffset,g=null!==(n=t.textContent)&&void 0!==n?n:"",v=u(t),_="",b="",y="",x=f,w=p,A=f;if(null!=f&&f.isEqualNode(null!=p?p:null)){var k=s(g,f,h,m);return k=d(v,k)}for(f&&(_=s(g,f,null!=h?h:0)),p&&(y=s(g,p,0,m)),f&&(x=a(f,g)),p&&(w=a(p,g)),A=null!==(i=null==x?void 0:x.nextSibling)&&void 0!==i?i:f;null==A||!A.isEqualNode(null!=w?w:null);){if("#text"===(null==A?void 0:A.nodeName))b+=null==A?void 0:A.textContent;else{var C=null===(r=null===(o=null==A?void 0:A.firstChild)||void 0===o?void 0:o.parentElement)||void 0===r?void 0:r.innerHTML;A&&(b+=l(A,null!=C?C:""))}var S=null!==(c=null==A?void 0:A.nextSibling)&&void 0!==c?c:A;if(S===A)break;A=S}return d(v,""+_+b+y)}function u(e){for(var t,n=null!==(t=e.textContent)&&void 0!==t?t:"",i=[];(null==e?void 0:e.textContent)===n;)"P"!==e.nodeName&&"TABLE"!==e.nodeName&&i.push(e),e=e.childNodes[0];return i}function d(e,t){return(0,r.default)(e).call(e,function(e){t=l(e,t)}),t}(0,o.default)(t,"__esModule",{value:!0}),t.insertHtml=t.createPartHtml=t.makeHtmlString=t.getTopNode=void 0,t.getTopNode=a,t.makeHtmlString=l,t.createPartHtml=s,t.insertHtml=c},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2).__importDefault(n(325));function o(e){i.default(e)}t.default=o},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(28));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=a.__importDefault(n(39)),c=n(96);function u(e){var t;function n(n){var i=[{$elem:l.default("<span>"+e.i18next.t("menus.panelMenus.link.查看链接")+"</span>"),onClick:function(e,t){var n=t.attr("href");return window.open(n,"_target"),!0}},{$elem:l.default("<span>"+e.i18next.t("menus.panelMenus.link.取消链接")+"</span>"),onClick:function(e,t){var n,i;e.selection.createRangeByElem(t),e.selection.restoreSelection();var o=t.childNodes();if("IMG"===(null==o?void 0:o.getNodeName())){var a=null===(i=null===(n=e.selection.getSelectionContainerElem())||void 0===n?void 0:n.children())||void 0===i?void 0:i.elems[0].children[0];e.cmd.do("insertHTML","<img \n src="+(null==a?void 0:a.getAttribute("src"))+" \n style="+(null==a?void 0:a.getAttribute("style"))+">")}else{var l,s=t.elems[0],u=s.innerHTML,d=s.parentElement;d&&(0,r.default)(l=c.EXTRA_TAG).call(l,d.nodeName)?d.innerHTML=u:e.cmd.do("insertHTML","<span>"+u+"</span>")}return!0}}];(t=new s.default(e,n,i)).create()}function i(){t&&(t.remove(),t=null)}return{showLinkTooltip:n,hideLinkTooltip:i}}function d(e){var t=u(e),n=t.showLinkTooltip,i=t.hideLinkTooltip;e.txt.eventHooks.linkClickEvents.push(n),e.txt.eventHooks.clickEvents.push(i),e.txt.eventHooks.keyupEvents.push(i),e.txt.eventHooks.toolbarClickEvents.push(i),e.txt.eventHooks.menuClickEvents.push(i),e.txt.eventHooks.textScrollEvents.push(i)}t.default=d},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(23)),r=i.__importDefault(n(3)),a=function(e){function t(t){var n=r.default('<div class="w-e-menu" data-title="斜体">\n <i class="w-e-icon-italic"></i>\n </div>');return e.call(this,n,t)||this}return i.__extends(t,e),t.prototype.clickHandler=function(){var e=this.editor,t=e.selection.isSelectionEmpty();t&&e.selection.createEmptyRange(),e.cmd.do("italic"),t&&(e.selection.collapseRange(),e.selection.restoreSelection())},t.prototype.tryChangeActive=function(){this.editor.cmd.queryCommandState("italic")?this.active():this.unActive()},t}(o.default);t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(23)),r=i.__importDefault(n(3)),a=function(e){function t(t){var n=r.default('<div class="w-e-menu" data-title="下划线">\n <i class="w-e-icon-underline"></i>\n </div>');return e.call(this,n,t)||this}return i.__extends(t,e),t.prototype.clickHandler=function(){var e=this.editor,t=e.selection.isSelectionEmpty();t&&e.selection.createEmptyRange(),e.cmd.do("underline"),t&&(e.selection.collapseRange(),e.selection.restoreSelection())},t.prototype.tryChangeActive=function(){this.editor.cmd.queryCommandState("underline")?this.active():this.unActive()},t}(o.default);t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(23)),r=i.__importDefault(n(3)),a=function(e){function t(t){var n=r.default('<div class="w-e-menu" data-title="删除线">\n <i class="w-e-icon-strikethrough"></i>\n </div>');return e.call(this,n,t)||this}return i.__extends(t,e),t.prototype.clickHandler=function(){var e=this.editor,t=e.selection.isSelectionEmpty();t&&e.selection.createEmptyRange(),e.cmd.do("strikeThrough"),t&&(e.selection.collapseRange(),e.selection.restoreSelection())},t.prototype.tryChangeActive=function(){this.editor.cmd.queryCommandState("strikeThrough")?this.active():this.unActive()},t}(o.default);t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(24)),r=i.__importDefault(n(3)),a=i.__importDefault(n(330)),l=function(e){function t(t){var n=this,i=r.default('<div class="w-e-menu" data-title="字体">\n <i class="w-e-icon-font"></i>\n </div>'),o={width:100,title:"设置字体",type:"list",list:new a.default(t.config.fontNames).getItemList(),clickHandler:function(e){n.command(e)}};return n=e.call(this,i,t,o)||this}return i.__extends(t,e),t.prototype.command=function(e){var t,n=this.editor,i=n.selection.isSelectionEmpty(),o=null===(t=n.selection.getSelectionContainerElem())||void 0===t?void 0:t.elems[0];if(null!=o){var r="p"!==(null==o?void 0:o.nodeName.toLowerCase()),a=(null==o?void 0:o.getAttribute("face"))===e;if(i){if(r&&!a){var l=n.selection.getSelectionRangeTopNodes();n.selection.createRangeByElem(l[0]),n.selection.moveCursor(l[0].elems[0])}n.selection.setRangeToElem(o),n.selection.createEmptyRange()}n.cmd.do("fontName",e),i&&(n.selection.collapseRange(),n.selection.restoreSelection())}},t.prototype.tryChangeActive=function(){},t}(o.default);t.default=l},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3)),l=function(){function e(e){var t=this;this.itemList=[],(0,r.default)(e).call(e,function(e){var n="string"==typeof e?e:e.value,i="string"==typeof e?e:e.name;t.itemList.push({$elem:a.default("<p style=\"font-family:'"+n+"'\">"+i+"</p>"),value:i})})}return e.prototype.getItemList=function(){return this.itemList},e}();t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(24)),r=i.__importDefault(n(3)),a=i.__importDefault(n(332)),l=function(e){function t(t){var n=this,i=r.default('<div class="w-e-menu" data-title="字号">\n <i class="w-e-icon-text-heigh"></i>\n </div>'),o={width:160,title:"设置字号",type:"list",list:new a.default(t.config.fontSizes).getItemList(),clickHandler:function(e){n.command(e)}};return n=e.call(this,i,t,o)||this}return i.__extends(t,e),t.prototype.command=function(e){var t,n=this.editor,i=n.selection.isSelectionEmpty();null!=(null===(t=n.selection.getSelectionContainerElem())||void 0===t?void 0:t.elems[0])&&(n.cmd.do("fontSize",e),i&&(n.selection.collapseRange(),n.selection.restoreSelection()))},t.prototype.tryChangeActive=function(){},t}(o.default);t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2).__importDefault(n(3)),o=function(){function e(e){for(var t in this.itemList=[],e){var n=e[t];this.itemList.push({$elem:i.default('<p style="font-size:'+t+'">'+n.name+"</p>"),value:n.value})}}return e.prototype.getItemList=function(){return this.itemList},e}();t.default=o},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4)),a=i(n(27));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(24)),c=l.__importDefault(n(3)),u=["LI"],d=["BLOCKQUOTE"],f=function(e){function t(t){var n=this,i=c.default('<div class="w-e-menu" data-title="对齐"><i class="w-e-icon-paragraph-left"></i></div>'),o={width:100,title:"对齐方式",type:"list",list:[{$elem:c.default('<p>\n <i class="w-e-icon-paragraph-left w-e-drop-list-item"></i>\n '+t.i18next.t("menus.dropListMenu.justify.靠左")+"\n </p>"),value:"left"},{$elem:c.default('<p>\n <i class="w-e-icon-paragraph-center w-e-drop-list-item"></i>\n '+t.i18next.t("menus.dropListMenu.justify.居中")+"\n </p>"),value:"center"},{$elem:c.default('<p>\n <i class="w-e-icon-paragraph-right w-e-drop-list-item"></i>\n '+t.i18next.t("menus.dropListMenu.justify.靠右")+"\n </p>"),value:"right"},{$elem:c.default('<p>\n <i class="w-e-icon-paragraph-justify w-e-drop-list-item"></i>\n '+t.i18next.t("menus.dropListMenu.justify.两端")+"\n </p>"),value:"justify"}],clickHandler:function(e){n.command(e)}};return n=e.call(this,i,t,o)||this}return l.__extends(t,e),t.prototype.command=function(e){var t=this.editor,n=t.selection,i=n.getSelectionContainerElem();n.saveRange();var o=t.selection.getSelectionRangeTopNodes();if(null!=i&&i.length)if(this.isSpecialNode(i,o[0])||this.isSpecialTopNode(o[0])){var a=this.getSpecialNodeUntilTop(i,o[0]);if(null==a)return;c.default(a).css("text-align",e)}else(0,r.default)(o).call(o,function(t){t.css("text-align",e)});n.restoreSelection()},t.prototype.getSpecialNodeUntilTop=function(e,t){for(var n=e.elems[0],i=t.elems[0];null!=n;){if(-1!==(0,a.default)(u).call(u,null==n?void 0:n.nodeName)||n.parentNode===i)return n;n=n.parentNode}return n},t.prototype.isSpecialNode=function(e,t){var n=this.getSpecialNodeUntilTop(e,t);return null!=n&&-1!==(0,a.default)(u).call(u,n.nodeName)},t.prototype.isSpecialTopNode=function(e){var t;return null!=e&&-1!==(0,a.default)(d).call(d,null===(t=e.elems[0])||void 0===t?void 0:t.nodeName)},t.prototype.tryChangeActive=function(){},t}(s.default);t.default=f},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=a.__importDefault(n(23)),c=a.__importDefault(n(335)),u=a.__importDefault(n(336)),d=n(7),f=function(e){function t(t){var n=this,i=l.default('<div class="w-e-menu" data-title="引用">\n <i class="w-e-icon-quotes-left"></i>\n </div>');return n=e.call(this,i,t)||this,c.default(t),n}return a.__extends(t,e),t.prototype.clickHandler=function(){var e,t,n=this.editor,i=n.selection.isSelectionEmpty(),o=n.selection.getSelectionRangeTopNodes(),a=o[o.length-1];if("BLOCKQUOTE"!==this.getTopNodeName()){var s=u.default(o);if(n.$textElem.equal(a)){var c=null===(e=n.selection.getSelectionContainerElem())||void 0===e?void 0:e.elems[0];n.selection.createRangeByElems(c.children[0],c.children[0]),o=n.selection.getSelectionRangeTopNodes(),s=u.default(o),a.append(s)}else s.insertAfter(a);this.delSelectNode(o);var f=null===(t=s.childNodes())||void 0===t?void 0:t.last().getNode();if(null==f)return;return f.textContent?n.selection.moveCursor(f):n.selection.moveCursor(f,0),this.tryChangeActive(),void l.default(d.EMPTY_P).insertAfter(s)}var p=l.default(a.childNodes()),h=p.length,m=a;(0,r.default)(p).call(p,function(e){var t=l.default(e);t.insertAfter(m),m=t}),a.remove(),n.selection.moveCursor(p.elems[h-1]),this.tryChangeActive(),i&&(n.selection.collapseRange(),n.selection.restoreSelection())},t.prototype.tryChangeActive=function(){var e;"BLOCKQUOTE"===(null===(e=this.editor.selection.getSelectionRangeTopNodes()[0])||void 0===e?void 0:e.getNodeName())?this.active():this.unActive()},t.prototype.getTopNodeName=function(){var e=this.editor.selection.getSelectionRangeTopNodes()[0];return null==e?void 0:e.getNodeName()},t.prototype.delSelectNode=function(e){(0,r.default)(e).call(e,function(e){e.remove()})},t}(s.default);t.default=f},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=n(7),r=i.__importDefault(n(3));function a(e){function t(t){var n,i=e.selection.getSelectionContainerElem(),a=e.selection.getSelectionRangeTopNodes()[0];if("BLOCKQUOTE"===(null==a?void 0:a.getNodeName())){if("BLOCKQUOTE"===i.getNodeName()){var l=null===(n=i.childNodes())||void 0===n?void 0:n.getNode();e.selection.moveCursor(l)}if(""===i.text()){t.preventDefault(),i.remove();var s=r.default(o.EMPTY_P);s.insertAfter(a),e.selection.moveCursor(s.getNode(),0)}""===a.text()&&a.remove()}}e.txt.eventHooks.enterDownEvents.push(t)}t.default=a},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));function l(e){var t=a.default("<blockquote></blockquote>");return(0,r.default)(e).call(e,function(e){t.append(e.clone(!0))}),t}t.default=l},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(26));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(24)),s=a.__importDefault(n(3)),c=n(6),u=function(e){function t(t){var n,i=this,o=s.default('<div class="w-e-menu" data-title="背景色">\n <i class="w-e-icon-paint-brush"></i>\n </div>'),a={width:120,title:"背景颜色",type:"inline-block",list:(0,r.default)(n=t.config.colors).call(n,function(e){return{$elem:s.default('<i style="color:'+e+';" class="w-e-icon-paint-brush"></i>'),value:e}}),clickHandler:function(e){i.command(e)}};return i=e.call(this,o,t,a)||this}return a.__extends(t,e),t.prototype.command=function(e){var t,n=this.editor,i=n.selection.isSelectionEmpty(),o=null===(t=n.selection.getSelectionContainerElem())||void 0===t?void 0:t.elems[0];if(null!=o){var r="p"!==(null==o?void 0:o.nodeName.toLowerCase()),a=null==o?void 0:o.style.backgroundColor,l=c.hexToRgb(e)===a;if(i){if(r&&!l){var s=n.selection.getSelectionRangeTopNodes();n.selection.createRangeByElem(s[0]),n.selection.moveCursor(s[0].elems[0])}n.selection.createEmptyRange()}n.cmd.do("backColor",e),i&&(n.selection.collapseRange(),n.selection.restoreSelection())}},t.prototype.tryChangeActive=function(){},t}(l.default);t.default=u},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(26));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(24)),s=a.__importDefault(n(3)),c=function(e){function t(t){var n,i=this,o=s.default('<div class="w-e-menu" data-title="文字颜色">\n <i class="w-e-icon-pencil2"></i>\n </div>'),a={width:120,title:"文字颜色",type:"inline-block",list:(0,r.default)(n=t.config.colors).call(n,function(e){return{$elem:s.default('<i style="color:'+e+';" class="w-e-icon-pencil2"></i>'),value:e}}),clickHandler:function(e){i.command(e)}};return i=e.call(this,o,t,a)||this}return a.__extends(t,e),t.prototype.command=function(e){var t,n=this.editor,i=n.selection.isSelectionEmpty(),o=null===(t=n.selection.getSelectionContainerElem())||void 0===t?void 0:t.elems[0];if(null!=o){var r=n.selection.getSelectionText();if("A"===o.nodeName&&o.textContent===r){var a=s.default("<span>&#8203;</span>").getNode();o.appendChild(a)}n.cmd.do("foreColor",e),i&&(n.selection.collapseRange(),n.selection.restoreSelection())}},t.prototype.tryChangeActive=function(){},t}(l.default);t.default=c},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(3)),r=i.__importDefault(n(33)),a=i.__importDefault(n(38)),l=i.__importDefault(n(340)),s=i.__importDefault(n(346)),c=function(e){function t(t){var n=this,i=o.default('<div class="w-e-menu" data-title="视频">\n <i class="w-e-icon-play"></i>\n </div>');return n=e.call(this,i,t)||this,s.default(t),n}return i.__extends(t,e),t.prototype.clickHandler=function(){this.createPanel("")},t.prototype.createPanel=function(e){var t=l.default(this.editor,e);new r.default(this,t).create()},t.prototype.tryChangeActive=function(){},t}(a.default);t.default=c},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(17));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(6),s=a.__importDefault(n(3)),c=a.__importDefault(n(341)),u=n(7);function d(e,t){var n=e.config,i=new c.default(e),o=l.getRandom("input-iframe"),a=l.getRandom("btn-ok"),d=l.getRandom("input-upload"),f=l.getRandom("btn-local-ok");function p(t){e.cmd.do("insertHTML",t+u.EMPTY_P),e.config.onlineVideoCallback(t)}function h(t){var n=e.config.onlineVideoCheck(t);return!0===n||("string"==typeof n&&e.config.customAlert(n,"error"),!1)}var m=[{title:e.i18next.t("menus.panelMenus.video.上传视频"),tpl:'<div class="w-e-up-video-container">\n <div id="'+f+'" class="w-e-up-btn">\n <i class="w-e-icon-upload2"></i>\n </div>\n <div style="display:none;">\n <input id="'+d+'" type="file" accept="video/*"/>\n </div>\n </div>',events:[{selector:"#"+f,type:"click",fn:function(){var e=s.default("#"+d).elems[0];if(!e)return!0;e.click()}},{selector:"#"+d,type:"change",fn:function(){var e=s.default("#"+d).elems[0];if(!e)return!0;var t=e.files;return t.length&&i.uploadVideo(t),!0}}]},{title:e.i18next.t("menus.panelMenus.video.插入视频"),tpl:'<div>\n <input \n id="'+o+'" \n type="text" \n class="block" \n placeholder="'+e.i18next.t("如")+'<iframe src=... ></iframe>"/>\n </td>\n <div class="w-e-button-container">\n <button type="button" id="'+a+'" class="right">\n '+e.i18next.t("插入")+"\n </button>\n </div>\n </div>",events:[{selector:"#"+a,type:"click",fn:function(){var e,t=s.default("#"+o),n=(0,r.default)(e=t.val()).call(e);if(n&&h(n))return p(n),!0},bindEnter:!0}]}],g={width:300,height:0,tabs:[]};return window.FileReader&&(n.uploadVideoServer||n.customUploadVideo)&&g.tabs.push(m[0]),n.showLinkVideo&&g.tabs.push(m[1]),g}t.default=d},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(133)),a=i(n(57)),l=i(n(4)),s=i(n(27));(0,o.default)(t,"__esModule",{value:!0});var c=n(2),u=n(6),d=c.__importDefault(n(135)),f=c.__importDefault(n(136)),p=n(7),h=n(6),m=function(){function e(e){this.editor=e}return e.prototype.uploadVideo=function(e){var t=this;if(e.length){var n,i=this.editor,o=i.config,c="validate.",p=function(e){return i.i18next.t(c+e)},h=o.uploadVideoServer,m=o.uploadVideoMaxSize/1024,g=o.uploadVideoName,v=o.uploadVideoParams,_=o.uploadVideoParamsWithUrl,b=o.uploadVideoHeaders,y=o.uploadVideoHooks,x=o.uploadVideoTimeout,w=o.withVideoCredentials,A=o.customUploadVideo,k=o.uploadVideoAccept,C=[],S=[];if(u.arrForEach(e,function(e){var t=e.name,n=e.size/1024/1024;if(t&&n){if(!(k instanceof Array))return void S.push("【"+k+"】"+p("uploadVideoAccept 不是Array"));if(!(0,r.default)(k).call(k,function(e){return e===t.split(".")[t.split(".").length-1]}))return void S.push("【"+t+"】"+p("不是视频"));if(m<n)return void S.push("【"+t+"】"+p("大于")+" "+m+"M");C.push(e)}}),S.length)return void o.customAlert(p("视频验证未通过")+": \n"+S.join("\n"),"warning");if(0===C.length)return void o.customAlert(p("传入的文件不合法"),"warning");if(A&&"function"==typeof A)return void A(C,(0,a.default)(n=this.insertVideo).call(n,this));var E=new FormData;if((0,l.default)(C).call(C,function(e,t){var n=g||e.name;C.length>1&&(n+=t+1),E.append(n,e)}),h){var T=h.split("#");h=T[0];var R=T[1]||"";(0,l.default)(u).call(u,v,function(e,t){_&&((0,s.default)(h).call(h,"?")>0?h+="&":h+="?",h=h+e+"="+t),E.append(e,t)}),R&&(h+="#"+R);var O=d.default(h,{timeout:x,formData:E,headers:b,withCredentials:!!w,beforeSend:function(e){if(y.before)return y.before(e,i,C)},onTimeout:function(e){o.customAlert(p("上传视频超时"),"error"),y.timeout&&y.timeout(e,i)},onProgress:function(e,t){var n=new f.default(i);t.lengthComputable&&(e=t.loaded/t.total,n.show(e))},onError:function(e){o.customAlert(p("上传视频错误"),"error",p("上传视频错误")+""+p("服务器返回状态")+": "+e.status),y.error&&y.error(e,i)},onFail:function(e,t){o.customAlert(p("上传视频失败"),"error",p("上传视频返回结果错误")+""+p("返回结果")+": "+t),y.fail&&y.fail(e,i,t)},onSuccess:function(e,n){if(y.customInsert){var r;y.customInsert((0,a.default)(r=t.insertVideo).call(r,t),n,i)}else{if("0"!=n.errno)return o.customAlert(p("上传视频失败"),"error",p("上传视频返回结果错误")+""+p("返回结果")+" errno="+n.errno),void(y.fail&&y.fail(e,i,n));var l=n.data;t.insertVideo(l.url),y.success&&y.success(e,i,n)}}});"string"==typeof O&&o.customAlert(O,"error")}}},e.prototype.insertVideo=function(e){var t=this.editor,n=t.config,i="validate.",o=function(e,n){return void 0===n&&(n=i),t.i18next.t(n+e)};if(n.customInsertVideo)n.customInsertVideo(e);else{h.UA.isFirefox?t.cmd.do("insertHTML",'<p data-we-video-p="true"><video src="'+e+'" controls="controls" style="max-width:100%"></video></p><p>&#8203</p>'):t.cmd.do("insertHTML",'<video src="'+e+'" controls="controls" style="max-width:100%"></video>'+p.EMPTY_P);var r=document.createElement("video");r.onload=function(){r=null},r.onerror=function(){n.customAlert(o("插入视频错误"),"error","wangEditor: "+o("插入视频错误")+""+o("视频链接")+' "'+e+'"'+o("下载链接失败")),r=null},r.onabort=function(){return r=null},r.src=e}},e}();t.default=m},function(e,t,n){e.exports=n(343)},function(e,t,n){var i=n(344);e.exports=i},function(e,t,n){n(345);var i=n(9);e.exports=i.Date.now},function(e,t,n){n(5)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(347)),r=i.__importDefault(n(349));function a(e){o.default(e),r.default(e)}t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.createShowHideFn=void 0;var i=n(2),o=i.__importDefault(n(3)),r=i.__importDefault(n(39)),a=i.__importDefault(n(348));function l(e){var t,n=function(t,n){return void 0===n&&(n=""),e.i18next.t(n+t)};function i(i){var l=[{$elem:o.default("<span class='w-e-icon-trash-o'></span>"),onClick:function(e,t){return t.remove(),!0}},{$elem:o.default("<span>100%</span>"),onClick:function(e,t){return t.attr("width","100%"),t.removeAttr("height"),!0}},{$elem:o.default("<span>50%</span>"),onClick:function(e,t){return t.attr("width","50%"),t.removeAttr("height"),!0}},{$elem:o.default("<span>30%</span>"),onClick:function(e,t){return t.attr("width","30%"),t.removeAttr("height"),!0}},{$elem:o.default("<span>"+n("重置")+"</span>"),onClick:function(e,t){return t.removeAttr("width"),t.removeAttr("height"),!0}},{$elem:o.default("<span>"+n("menus.justify.靠左")+"</span>"),onClick:function(e,t){return a.default(t,"left"),!0}},{$elem:o.default("<span>"+n("menus.justify.居中")+"</span>"),onClick:function(e,t){return a.default(t,"center"),!0}},{$elem:o.default("<span>"+n("menus.justify.靠右")+"</span>"),onClick:function(e,t){return a.default(t,"right"),!0}}];(t=new r.default(e,i,l)).create()}function l(){t&&(t.remove(),t=null)}return{showVideoTooltip:i,hideVideoTooltip:l}}function s(e){var t=l(e),n=t.showVideoTooltip,i=t.hideVideoTooltip;e.txt.eventHooks.videoClickEvents.push(n),e.txt.eventHooks.clickEvents.push(i),e.txt.eventHooks.keyupEvents.push(i),e.txt.eventHooks.toolbarClickEvents.push(i),e.txt.eventHooks.menuClickEvents.push(i),e.txt.eventHooks.textScrollEvents.push(i),e.txt.eventHooks.changeEvents.push(i)}t.createShowHideFn=l,t.default=s},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(28));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));function l(e,t){var n=s(e,["P"]);n&&a.default(n).css("text-align",t)}function s(e,t){for(var n,i=e.elems[0];null!=i;){if((0,r.default)(t).call(t,null==i?void 0:i.nodeName))return i;if("BODY"===(null===(n=null==i?void 0:i.parentNode)||void 0===n?void 0:n.nodeName))return null;i=i.parentNode}return i}t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(6);function o(e){if(i.UA.isFirefox){var t=e.txt,n=e.selection;t.eventHooks.keydownEvents.push(function(t){var i=n.getSelectionContainerElem();if(i){var o=i.getNodeTop(e),r=o.length&&o.prev().length?o.prev():null;r&&r.attr("data-we-video-p")&&0===n.getCursorPos()&&8===t.keyCode&&r.remove()}})}}t.default=o},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(26));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(7),s=a.__importDefault(n(3)),c=a.__importDefault(n(33)),u=a.__importDefault(n(38)),d=a.__importDefault(n(351)),f=a.__importDefault(n(364)),p=function(e){function t(t){var n,i=this,o=s.default('<div class="w-e-menu" data-title="图片"><i class="w-e-icon-image"></i></div>'),a=f.default(t);return a.onlyUploadConf&&(o=a.onlyUploadConf.$elem,(0,r.default)(n=a.onlyUploadConf.events).call(n,function(e){var t=e.type,n=e.fn||l.EMPTY_FN;o.on(t,function(e){e.stopPropagation(),n(e)})})),(i=e.call(this,o,t)||this).imgPanelConfig=a,d.default(t),i}return a.__extends(t,e),t.prototype.clickHandler=function(){this.imgPanelConfig.onlyUploadConf||this.createPanel()},t.prototype.createPanel=function(){var e=this.imgPanelConfig,t=new c.default(this,e);this.setPanel(t),t.create()},t.prototype.tryChangeActive=function(){},t}(u.default);t.default=p},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(352)),r=i.__importDefault(n(353)),a=i.__importDefault(n(354)),l=i.__importDefault(n(362)),s=i.__importDefault(n(363));function c(e){o.default(e),r.default(e),a.default(e),l.default(e),s.default(e)}t.default=c},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=n(131),r=i.__importDefault(n(97));function a(e,t){var n=e.config,i=n.pasteFilterStyle,r=n.pasteIgnoreImg;return!!o.getPasteHtml(t,i,r)||!!o.getPasteText(t)}function l(e,t){for(var n,i=(null===(n=t.clipboardData)||void 0===n?void 0:n.types)||[],o=0;o<i.length;o++)if("Files"===i[o])return!0;return!1}function s(e,t){if(l(t,e)||!a(t,e)){var n=o.getPasteImgs(e);n.length&&new r.default(t).uploadImg(n)}}function c(e){e.txt.eventHooks.pasteEvents.unshift(function(t){s(t,e)})}t.default=c},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2).__importDefault(n(97));function o(e){function t(t){var n=t.dataTransfer&&t.dataTransfer.files;n&&n.length&&new i.default(e).uploadImg(n)}e.txt.eventHooks.dropEvents.push(t)}t.default=o},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(29)),a=i(n(355));(0,o.default)(t,"__esModule",{value:!0}),t.createShowHideFn=void 0;var l=n(2).__importDefault(n(3));n(360);var s=n(6);function c(e,t,n,i,o){e.attr("style","width:"+t+"px; height:"+n+"px; left:"+i+"px; top:"+o+"px;")}function u(e,t){var n=l.default('<div class="w-e-img-drag-mask">\n <div class="w-e-img-drag-show-size"></div>\n <div class="w-e-img-drag-rb"></div>\n </div>');return n.hide(),t.append(n),n}function d(e,t,n){var i=e.getBoundingClientRect(),o=n.getBoundingClientRect(),l=o.width.toFixed(2),s=o.height.toFixed(2);(0,r.default)(t).call(t,".w-e-img-drag-show-size").text(l+"px * "+s+"px"),c(t,(0,a.default)(l),(0,a.default)(s),o.left-i.left,o.top-i.top),t.show()}function f(e){var t,n=e.$textContainerElem,i=u(e,n);function o(e,n){e.on("click",function(e){e.stopPropagation()}),e.on("mousedown",".w-e-img-drag-rb",function(i){if(i.preventDefault(),t){var o=i.clientX,s=i.clientY,u=n.getBoundingClientRect(),d=t.getBoundingClientRect(),f=d.width,p=d.height,h=d.left-u.left,m=d.top-u.top,g=f/p,v=f,_=p,b=l.default(document);b.on("mousemove",x),b.on("mouseup",w),b.on("mouseleave",y)}function y(){b.off("mousemove",x),b.off("mouseup",w)}function x(t){t.stopPropagation(),t.preventDefault(),v=f+(t.clientX-o),_=p+(t.clientY-s),v/_!=g&&(_=v/g),v=(0,a.default)(v.toFixed(2)),_=(0,a.default)(_.toFixed(2)),(0,r.default)(e).call(e,".w-e-img-drag-show-size").text(v.toFixed(2).replace(".00","")+"px * "+_.toFixed(2).replace(".00","")+"px"),c(e,v,_,h,m)}function w(){t.attr("width",v+""),t.attr("height",_+"");var n=t.getBoundingClientRect();c(e,v,_,n.left-u.left,n.top-u.top),y()}})}function f(e){if(s.UA.isIE())return!1;e&&d(n,i,t=e)}function p(){(0,r.default)(n).call(n,".w-e-img-drag-mask").hide()}return o(i,n),l.default(document).on("click",p),e.beforeDestroy(function(){l.default(document).off("click",p)}),{showDrag:f,hideDrag:p}}function p(e){var t=f(e),n=t.showDrag,i=t.hideDrag;e.txt.eventHooks.imgClickEvents.push(n),e.txt.eventHooks.textScrollEvents.push(i),e.txt.eventHooks.keyupEvents.push(i),e.txt.eventHooks.toolbarClickEvents.push(i),e.txt.eventHooks.menuClickEvents.push(i),e.txt.eventHooks.changeEvents.push(i)}t.createShowHideFn=f,t.default=p},function(e,t,n){e.exports=n(356)},function(e,t,n){var i=n(357);e.exports=i},function(e,t,n){n(358);var i=n(9);e.exports=i.parseFloat},function(e,t,n){var i=n(5),o=n(359);i({global:!0,forced:parseFloat!=o},{parseFloat:o})},function(e,t,n){var i=n(8),o=n(90).trim,r=n(68),a=i.parseFloat,l=1/a(r+"-0")!=-1/0;e.exports=l?function(e){var t=o(String(e)),n=a(t);return 0===n&&"-"==t.charAt(0)?-0:n}:a},function(e,t,n){var i=n(20),o=n(361);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,".w-e-text-container {\n overflow: hidden;\n}\n.w-e-img-drag-mask {\n position: absolute;\n z-index: 1;\n border: 1px dashed #ccc;\n box-sizing: border-box;\n}\n.w-e-img-drag-mask .w-e-img-drag-rb {\n position: absolute;\n right: -5px;\n bottom: -5px;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #ccc;\n cursor: se-resize;\n}\n.w-e-img-drag-mask .w-e-img-drag-show-size {\n min-width: 110px;\n height: 22px;\n line-height: 22px;\n font-size: 14px;\n color: #999;\n position: absolute;\n left: 0;\n top: 0;\n background-color: #999;\n color: #fff;\n border-radius: 2px;\n padding: 0 5px;\n}\n",""]),e.exports=t},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.createShowHideFn=void 0;var i=n(2),o=i.__importDefault(n(3)),r=i.__importDefault(n(39));function a(e){var t,n=function(t,n){return void 0===n&&(n=""),e.i18next.t(n+t)};function i(i){var a=[{$elem:o.default("<span class='w-e-icon-trash-o'></span>"),onClick:function(e,t){return e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("delete"),!0}},{$elem:o.default("<span>30%</span>"),onClick:function(e,t){return t.attr("width","30%"),t.removeAttr("height"),!0}},{$elem:o.default("<span>50%</span>"),onClick:function(e,t){return t.attr("width","50%"),t.removeAttr("height"),!0}},{$elem:o.default("<span>100%</span>"),onClick:function(e,t){return t.attr("width","100%"),t.removeAttr("height"),!0}}];a.push({$elem:o.default("<span>"+n("重置")+"</span>"),onClick:function(e,t){return t.removeAttr("width"),t.removeAttr("height"),!0}}),i.attr("data-href")&&a.push({$elem:o.default("<span>"+n("查看链接")+"</span>"),onClick:function(e,t){var n=t.attr("data-href");return n&&(n=decodeURIComponent(n),window.open(n,"_target")),!0}}),(t=new r.default(e,i,a)).create()}function a(){t&&(t.remove(),t=null)}return{showImgTooltip:i,hideImgTooltip:a}}function l(e){var t=a(e),n=t.showImgTooltip,i=t.hideImgTooltip;e.txt.eventHooks.imgClickEvents.push(n),e.txt.eventHooks.clickEvents.push(i),e.txt.eventHooks.keyupEvents.push(i),e.txt.eventHooks.toolbarClickEvents.push(i),e.txt.eventHooks.menuClickEvents.push(i),e.txt.eventHooks.textScrollEvents.push(i),e.txt.eventHooks.imgDragBarMouseDownEvents.push(i),e.txt.eventHooks.changeEvents.push(i)}t.createShowHideFn=a,t.default=l},function(e,t,n){function i(e){var t=e.txt,n=e.selection;t.eventHooks.keydownEvents.push(function(e){var t=n.getSelectionContainerElem(),i=n.getRange();if(i&&t&&8===e.keyCode&&n.isSelectionEmpty()){var o=i.startContainer,r=i.startOffset,a=null;if(0===r)for(;o!==t.elems[0]&&t.elems[0].contains(o)&&o.parentNode&&!a;){if(o.previousSibling){a=o.previousSibling;break}o=o.parentNode}else 3!==o.nodeType&&(a=o.childNodes[r-1]);if(a){for(var l=a;l.childNodes.length;)l=l.childNodes[l.childNodes.length-1];l instanceof HTMLElement&&"IMG"===l.tagName&&(l.remove(),e.preventDefault())}}})}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(26)),a=i(n(17));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(3)),c=n(6),u=l.__importDefault(n(97));function d(e){var t,n=e.config,i=new u.default(e),o=c.getRandom("up-trigger-id"),l=c.getRandom("up-file-id"),d=c.getRandom("input-link-url"),f=c.getRandom("input-link-url-alt"),p=c.getRandom("input-link-url-href"),h=c.getRandom("btn-link"),m="menus.panelMenus.image.",g=function(t,n){return void 0===n&&(n=m),e.i18next.t(n+t)};function v(e,t,i){var o=n.linkImgCheck(e);return!0===o||("string"==typeof o&&n.customAlert(o,"error"),!1)}var _=1===n.uploadImgMaxLength?"":'multiple="multiple"',b=(0,r.default)(t=n.uploadImgAccept).call(t,function(e){return"image/"+e}).join(","),y=function(e,t,n){return'<div class="'+e+'" data-title="'+n+'">\n <div id="'+o+'" class="w-e-up-btn">\n <i class="'+t+'"></i>\n </div>\n <div style="display:none;">\n <input id="'+l+'" type="file" '+_+' accept="'+b+'"/>\n </div>\n </div>'},x=[{selector:"#"+o,type:"click",fn:function(){var e=n.uploadImgFromMedia;if(e&&"function"==typeof e)return e(),!0;var t=s.default("#"+l).elems[0];if(!t)return!0;t.click()}},{selector:"#"+l,type:"change",fn:function(){var e=s.default("#"+l).elems[0];if(!e)return!0;var t=e.files;return null!=t&&t.length&&i.uploadImg(t),e&&(e.value=""),!0}}],w=['<input\n id="'+d+'"\n type="text"\n class="block"\n placeholder="'+g("图片地址")+'"/>'];n.showLinkImgAlt&&w.push('\n <input\n id="'+f+'"\n type="text"\n class="block"\n placeholder="'+g("图片文字说明")+'"/>'),n.showLinkImgHref&&w.push('\n <input\n id="'+p+'"\n type="text"\n class="block"\n placeholder="'+g("跳转链接")+'"/>');var A=[{title:g("上传图片"),tpl:y("w-e-up-img-container","w-e-icon-upload2",""),events:x},{title:g("网络图片"),tpl:"<div>\n "+w.join("")+'\n <div class="w-e-button-container">\n <button type="button" id="'+h+'" class="right">'+g("插入","")+"</button>\n </div>\n </div>",events:[{selector:"#"+h,type:"click",fn:function(){var e,t,o,r,l,c=s.default("#"+d),u=(0,a.default)(e=c.val()).call(e);if(u&&(n.showLinkImgAlt&&(t=(0,a.default)(o=s.default("#"+f).val()).call(o)),n.showLinkImgHref&&(r=(0,a.default)(l=s.default("#"+p).val()).call(l)),v(u)))return i.insertImg(u,t,r),!0},bindEnter:!0}]}],k={width:300,height:0,tabs:[],onlyUploadConf:{$elem:s.default(y("w-e-menu","w-e-icon-image","图片")),events:x}};return window.FileReader&&(n.uploadImgShowBase64||n.uploadImgServer||n.customUploadImg||n.uploadImgFromMedia)&&k.tabs.push(A[0]),n.showLinkImg&&(k.tabs.push(A[1]),k.onlyUploadConf=void 0),k}t.default=d},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=a.__importDefault(n(24)),c=a.__importDefault(n(366)),u=function(e){function t(t){var n=this,i=l.default('<div class="w-e-menu" data-title="缩进">\n <i class="w-e-icon-indent-increase"></i>\n </div>'),o={width:130,title:"设置缩进",type:"list",list:[{$elem:l.default('<p>\n <i class="w-e-icon-indent-increase w-e-drop-list-item"></i>\n '+t.i18next.t("menus.dropListMenu.indent.增加缩进")+"\n <p>"),value:"increase"},{$elem:l.default('<p>\n <i class="w-e-icon-indent-decrease w-e-drop-list-item"></i>\n '+t.i18next.t("menus.dropListMenu.indent.减少缩进")+"\n <p>"),value:"decrease"}],clickHandler:function(e){n.command(e)}};return n=e.call(this,i,t,o)||this}return a.__extends(t,e),t.prototype.command=function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();if(n&&t.$textElem.equal(n)){var i=t.selection.getSelectionRangeTopNodes();i.length>0&&(0,r.default)(i).call(i,function(n){c.default(l.default(n),e,t)})}else n&&n.length>0&&(0,r.default)(n).call(n,function(n){c.default(l.default(n),e,t)});t.selection.restoreSelection(),this.tryChangeActive()},t.prototype.tryChangeActive=function(){var e=this.editor,t=e.selection.getSelectionStartElem(),n=l.default(t).getNodeTop(e);n.length<=0||(""!=n.elems[0].style.paddingLeft?this.active():this.unActive())},t}(s.default);t.default=u},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(45)),a=i(n(17));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(367)),c=l.__importDefault(n(368)),u=/^(\d+)(\w+)$/,d=/^(\d+)%$/;function f(e){var t=e.config.indentation;if("string"==typeof t){if(u.test(t)){var n,i=(0,r.default)(n=(0,a.default)(t).call(t).match(u)).call(n,1,3),o=i[0],l=i[1];return{value:Number(o),unit:l}}if(d.test(t))return{value:Number((0,a.default)(t).call(t).match(d)[1]),unit:"%"}}else if(void 0!==t.value&&t.unit)return t;return{value:2,unit:"em"}}function p(e,t,n){var i=e.getNodeTop(n);/^(P|H[0-9]*)$/.test(i.getNodeName())&&("increase"===t?s.default(i,f(n)):"decrease"===t&&c.default(i,f(n)))}t.default=p},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(45));function a(e,t){var n=e.elems[0];if(""===n.style.paddingLeft)e.css("padding-left",t.value+t.unit);else{var i=n.style.paddingLeft,o=(0,r.default)(i).call(i,0,i.length-t.unit.length),a=Number(o)+t.value;e.css("padding-left",""+a+t.unit)}}(0,o.default)(t,"__esModule",{value:!0}),t.default=a},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(45));function a(e,t){var n=e.elems[0];if(""!==n.style.paddingLeft){var i=n.style.paddingLeft,o=(0,r.default)(i).call(i,0,i.length-t.unit.length),a=Number(o)-t.value;a>0?e.css("padding-left",""+a+t.unit):e.css("padding-left","")}}(0,o.default)(t,"__esModule",{value:!0}),t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(3)),r=i.__importDefault(n(38)),a=i.__importDefault(n(33)),l=i.__importDefault(n(370)),s=function(e){function t(t){var n=o.default('<div class="w-e-menu" data-title="表情">\n <i class="w-e-icon-happy"></i>\n </div>');return e.call(this,n,t)||this}return i.__extends(t,e),t.prototype.createPanel=function(){var e=l.default(this.editor);new a.default(this,e).create()},t.prototype.clickHandler=function(){this.createPanel()},t.prototype.tryChangeActive=function(){},t}(r.default);t.default=s},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(26)),a=i(n(70)),l=i(n(17));(0,o.default)(t,"__esModule",{value:!0});var s=n(2).__importDefault(n(3));function c(e){var t=e.config.emotions;function n(e){var t,n,i=[];return"image"==e.type?(i=(0,r.default)(t=e.content).call(t,function(e){return"string"==typeof e?"":'<span title="'+e.alt+'">\n <img class="eleImg" data-emoji="'+e.alt+'" style src="'+e.src+'" alt="['+e.alt+']">\n </span>'}),i=(0,a.default)(i).call(i,function(e){return""!==e})):i=(0,r.default)(n=e.content).call(n,function(e){return'<span class="eleImg" title="'+e+'">'+e+"</span>"}),i.join("").replace(/&nbsp;/g,"")}return{width:300,height:230,tabs:(0,r.default)(t).call(t,function(t){return{title:e.i18next.t("menus.panelMenus.emoticon."+t.title),tpl:"<div>"+n(t)+"</div>",events:[{selector:".eleImg",type:"click",fn:function(t){var n,i,o=s.default(t.target);return n="IMG"===o.getNodeName()?(0,l.default)(i=o.parent().html()).call(i):"<span>"+o.html()+"</span>",e.cmd.do("insertHTML",n),!0}}]}})}}t.default=c},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.createListHandle=t.ClassType=void 0;var i,o,r=n(2),a=r.__importDefault(n(3)),l=r.__importDefault(n(372)),s=r.__importDefault(n(374)),c=r.__importDefault(n(375)),u=r.__importDefault(n(376)),d=r.__importDefault(n(377));(o=i=t.ClassType||(t.ClassType={})).Wrap="WrapListHandle",o.Join="JoinListHandle",o.StartJoin="StartJoinListHandle",o.EndJoin="EndJoinListHandle",o.Other="OtherListHandle";var f={WrapListHandle:l.default,JoinListHandle:s.default,StartJoinListHandle:c.default,EndJoinListHandle:u.default,OtherListHandle:d.default};function p(e,t,n){if(e===i.Other&&void 0===n)throw new Error("other 类需要传入 range");return e!==i.Other?new f[e](t):new f[e](t,n)}t.createListHandle=p;var h=function(){function e(e){this.handle=e,this.handle.exec()}return e.prototype.getSelectionRangeElem=function(){return a.default(this.handle.selectionRangeElem.get())},e}();t.default=h},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(58),c=n(47),u=function(e){function t(t){return e.call(this,t)||this}return a.__extends(t,e),t.prototype.exec=function(){var e,t=this.options,n=t.listType,i=t.listTarget,o=t.$selectionElem,a=t.$startElem,s=t.$endElem,u=[],d=null==o?void 0:o.getNodeName(),f=a.prior,p=s.prior;if((a.prior||s.prior)&&(null!=f&&f.prev().length||null!=p&&p.next().length)){for(var h=f;h.length;)u.push(h),h=null!=p&&p.equal(h)?l.default(void 0):h.next();var m=f.prev(),g=p.next();if(d===n?e=c.createElementFragment(u,c.createDocumentFragment(),"p"):(e=c.createElement(i),(0,r.default)(u).call(u,function(t){e.append(t.elems[0])})),m.length&&g.length){for(var v=[];g.length;)v.push(g),g=g.next();var _=c.createElement(d);(0,r.default)(v).call(v,function(e){_.append(e.elems[0])}),l.default(_).insertAfter(o),this.selectionRangeElem.set(e),(b=o.next()).length?c.insertBefore(o,e,b.elems[0]):o.parent().elems[0].append(e)}else if(m.length){var b;this.selectionRangeElem.set(e),(b=o.next()).length?c.insertBefore(o,e,b.elems[0]):o.parent().elems[0].append(e)}else this.selectionRangeElem.set(e),c.insertBefore(o,e,o.elems[0])}else{var y;(0,r.default)(y=null==o?void 0:o.children()).call(y,function(e){u.push(l.default(e))}),d===n?e=c.createElementFragment(u,c.createDocumentFragment(),"p"):(e=c.createElement(i),(0,r.default)(u).call(u,function(t){e.appendChild(t.elems[0])})),this.selectionRangeElem.set(e),c.insertBefore(o,e,o.elems[0]),o.remove()}},t}(s.ListHandle);t.default=u},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=function(){function e(){this._element=null}return e.prototype.set=function(e){if(e instanceof DocumentFragment){var t,n=[];(0,r.default)(t=e.childNodes).call(t,function(e){n.push(e)}),e=n}this._element=e},e.prototype.get=function(){return this._element},e.prototype.clear=function(){this._element=null},e}();t.default=a},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(58),c=n(47),u=function(e){function t(t){return e.call(this,t)||this}return a.__extends(t,e),t.prototype.exec=function(){var e,t,n,i,o,a,s,u,d=this.options,f=d.editor,p=d.listType,h=d.listTarget,m=d.$startElem,g=d.$endElem,v=f.selection.getSelectionRangeTopNodes(),_=null==m?void 0:m.getNodeName();if(_===(null==g?void 0:g.getNodeName()))if(v.length>2)if(v.shift(),v.pop(),u=c.createElementFragment(c.filterSelectionNodes(v),c.createDocumentFragment()),_===p)null===(e=g.children())||void 0===e||(0,r.default)(e).call(e,function(e){u.append(e)}),g.remove(),this.selectionRangeElem.set(u),m.elems[0].append(u);else{for(var b=document.createDocumentFragment(),y=document.createDocumentFragment(),x=c.getStartPoint(m);x.length;){var w=x.elems[0];x=x.next(),b.append(w)}for(var A=c.getEndPoint(g),k=[];A.length;)k.unshift(A.elems[0]),A=A.prev();(0,r.default)(k).call(k,function(e){y.append(e)});var C=c.createElement(h);C.append(b),C.append(u),C.append(y),u=C,this.selectionRangeElem.set(u),l.default(C).insertAfter(m),!(null!==(t=m.children())&&void 0!==t&&t.length)&&m.remove(),(null===(n=g.children())||void 0===n||!n.length)&&g.remove()}else{for(v.length=0,x=c.getStartPoint(m);x.length;)v.push(x),x=x.next();for(A=c.getEndPoint(g),k=[];A.length;)k.unshift(A),A=A.prev();v.push.apply(v,k),_===p?(u=c.createElementFragment(v,c.createDocumentFragment(),"p"),this.selectionRangeElem.set(u),c.insertBefore(m,u,g.elems[0])):(u=c.createElement(h),(0,r.default)(v).call(v,function(e){u.append(e.elems[0])}),this.selectionRangeElem.set(u),l.default(u).insertAfter(m)),!(null!==(i=m.children())&&void 0!==i&&i.length)&&g.remove(),(null===(o=g.children())||void 0===o||!o.length)&&g.remove()}else{var S=[];for(A=c.getEndPoint(g);A.length;)S.unshift(A),A=A.prev();var E=[];for(x=c.getStartPoint(m);x.length;)E.push(x),x=x.next();if(u=c.createDocumentFragment(),v.shift(),v.pop(),(0,r.default)(E).call(E,function(e){return u.append(e.elems[0])}),u=c.createElementFragment(c.filterSelectionNodes(v),u),(0,r.default)(S).call(S,function(e){return u.append(e.elems[0])}),this.selectionRangeElem.set(u),_===p)m.elems[0].append(u),(null===(a=g.children())||void 0===a||!a.length)&&g.remove();else if(null!==(s=g.children())&&void 0!==s&&s.length){var T=g.children();c.insertBefore(T,u,T.elems[0])}else g.elems[0].append(u)}},t}(s.ListHandle);t.default=u},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(58),c=n(47),u=function(e){function t(t){return e.call(this,t)||this}return a.__extends(t,e),t.prototype.exec=function(){var e,t,n=this.options,i=n.editor,o=n.listType,a=n.listTarget,s=n.$startElem,u=i.selection.getSelectionRangeTopNodes(),d=null==s?void 0:s.getNodeName();u.shift();for(var f=[],p=c.getStartPoint(s);p.length;)f.push(p),p=p.next();d===o?(t=c.createDocumentFragment(),(0,r.default)(f).call(f,function(e){return t.append(e.elems[0])}),t=c.createElementFragment(c.filterSelectionNodes(u),t),this.selectionRangeElem.set(t),s.elems[0].append(t)):(t=c.createElement(a),(0,r.default)(f).call(f,function(e){return t.append(e.elems[0])}),t=c.createElementFragment(c.filterSelectionNodes(u),t),this.selectionRangeElem.set(t),l.default(t).insertAfter(s),(null===(e=s.children())||void 0===e||!e.length)&&s.remove())},t}(s.ListHandle);t.default=u},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(58),c=n(47),u=function(e){function t(t){return e.call(this,t)||this}return a.__extends(t,e),t.prototype.exec=function(){var e,t,n,i=this.options,o=i.editor,a=i.listType,s=i.listTarget,u=i.$endElem,d=o.selection.getSelectionRangeTopNodes(),f=null==u?void 0:u.getNodeName();d.pop();for(var p=[],h=c.getEndPoint(u);h.length;)p.unshift(h),h=h.prev();if(f===a)if(n=c.createElementFragment(c.filterSelectionNodes(d),c.createDocumentFragment()),(0,r.default)(p).call(p,function(e){return n.append(e.elems[0])}),this.selectionRangeElem.set(n),null!==(e=u.children())&&void 0!==e&&e.length){var m=u.children();c.insertBefore(m,n,m.elems[0])}else u.elems[0].append(n);else{var g=c.filterSelectionNodes(d);g.push.apply(g,p),n=c.createElementFragment(g,c.createElement(s)),this.selectionRangeElem.set(n),l.default(n).insertBefore(u),(null===(t=u.children())||void 0===t||!t.length)&&u.remove()}},t}(s.ListHandle);t.default=u},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=n(58),r=n(47),a=function(e){function t(t,n){var i=e.call(this,t)||this;return i.range=n,i}return i.__extends(t,e),t.prototype.exec=function(){var e=this.options,t=e.editor,n=e.listTarget,i=t.selection.getSelectionRangeTopNodes(),o=r.createElementFragment(r.filterSelectionNodes(i),r.createElement(n));this.selectionRangeElem.set(o),this.range.insertNode(o)},t}(o.ListHandle);t.default=a},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4)),a=i(n(27));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(24)),c=l.__importDefault(n(3)),u=l.__importDefault(n(379)),d=function(e){function t(t){var n=this,i=c.default('<div class="w-e-menu" data-title="行高">\n <i class="w-e-icon-row-height"></i>\n </div>'),o={width:100,title:"设置行高",type:"list",list:new u.default(t,t.config.lineHeights).getItemList(),clickHandler:function(e){t.selection.saveRange(),n.command(e)}};return n=e.call(this,i,t,o)||this}return l.__extends(t,e),t.prototype.command=function(e){var t=this.editor;t.selection.restoreSelection();var n=c.default(t.selection.getSelectionContainerElem());if(n.elems.length){if(n&&t.$textElem.equal(n)){for(var i=!1,o=c.default(t.selection.getSelectionStartElem()).elems[0],r=c.default(t.selection.getSelectionEndElem()).elems[0],a=this.getDom(o),l=this.getDom(r),s=n.elems[0].children,u=0;u<s.length;u++){var d=s[u];if("P"===c.default(d).getNodeName()&&(d===a&&(i=!0),i&&(c.default(d).css("line-height",e),d===l)))return void(i=!1)}return void t.selection.createRangeByElems(o,r)}var f=n.elems[0],p=this.getDom(f);"P"===c.default(p).getNodeName()&&(c.default(p).css("line-height",e),t.selection.createRangeByElems(p,p))}},t.prototype.getDom=function(e){var t=c.default(e).elems[0];if(!t.parentNode)return t;function n(e,t){var i=c.default(e.parentNode);return t.$textElem.equal(i)?e:n(i.elems[0],t)}return t=n(t,this.editor)},t.prototype.styleProcessing=function(e){var t="";return(0,r.default)(e).call(e,function(e){""!==e&&-1===(0,a.default)(e).call(e,"line-height")&&(t=t+e+";")}),t},t.prototype.setRange=function(e,t){var n=this.editor,i=window.getSelection?window.getSelection():document.getSelection();null==i||i.removeAllRanges();var o=document.createRange(),r=e,a=t;o.setStart(r,0),o.setEnd(a,1),null==i||i.addRange(o),n.selection.saveRange(),null==i||i.removeAllRanges(),n.selection.restoreSelection()},t.prototype.tryChangeActive=function(){var e=this.editor,t=e.selection.getSelectionContainerElem();if(!t||!e.$textElem.equal(t)){var n=c.default(e.selection.getSelectionStartElem());if(0!==n.length){var i=(n=this.getDom(n.elems[0])).getAttribute("style")?n.getAttribute("style"):"";i&&-1!==(0,a.default)(i).call(i,"line-height")?this.active():this.unActive()}}},t}(s.default);t.default=d},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3)),l=function(){function e(e,t){var n=this;this.itemList=[{$elem:a.default("<span>"+e.i18next.t("默认")+"</span>"),value:""}],(0,r.default)(t).call(t,function(e){n.itemList.push({$elem:a.default("<span>"+e+"</span>"),value:e})})}return e.prototype.getItemList=function(){return this.itemList},e}();t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(3)),r=function(e){function t(t){var n=o.default('<div class="w-e-menu" data-title="撤销">\n <i class="w-e-icon-undo"></i>\n </div>');return e.call(this,n,t)||this}return i.__extends(t,e),t.prototype.clickHandler=function(){var e=this.editor;e.history.revoke();var t=e.$textElem.children();if(null!=t&&t.length){var n=t.last();e.selection.createRangeByElem(n,!1,!0),e.selection.restoreSelection()}},t.prototype.tryChangeActive=function(){this.editor.isCompatibleMode||(this.editor.history.size[0]?this.active():this.unActive())},t}(i.__importDefault(n(23)).default);t.default=r},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(3)),r=function(e){function t(t){var n=o.default('<div class="w-e-menu" data-title="恢复">\n <i class="w-e-icon-redo"></i>\n </div>');return e.call(this,n,t)||this}return i.__extends(t,e),t.prototype.clickHandler=function(){var e=this.editor;e.history.restore();var t=e.$textElem.children();if(null!=t&&t.length){var n=t.last();e.selection.createRangeByElem(n,!1,!0),e.selection.restoreSelection()}},t.prototype.tryChangeActive=function(){this.editor.isCompatibleMode||(this.editor.history.size[1]?this.active():this.unActive())},t}(i.__importDefault(n(23)).default);t.default=r},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(38)),r=i.__importDefault(n(3)),a=i.__importDefault(n(383)),l=i.__importDefault(n(33)),s=i.__importDefault(n(392)),c=function(e){function t(t){var n=this,i=r.default('<div class="w-e-menu" data-title="表格"><i class="w-e-icon-table2"></i></div>');return n=e.call(this,i,t)||this,s.default(t),n}return i.__extends(t,e),t.prototype.clickHandler=function(){this.createPanel()},t.prototype.createPanel=function(){var e=a.default(this.editor);new l.default(this,e).create()},t.prototype.tryChangeActive=function(){},t}(o.default);t.default=c},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(384));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(6),s=a.__importDefault(n(3));n(389);var c=a.__importDefault(n(391));function u(e){return e>0&&(0,r.default)(e)}function d(e){var t=new c.default(e),n=l.getRandom("w-col-id"),i=l.getRandom("w-row-id"),o=l.getRandom("btn-link"),r="menus.panelMenus.table.",a=function(t){return e.i18next.t(t)},d=[{title:a(r+"插入表格"),tpl:'<div>\n <div class="w-e-table">\n <span>'+a("创建")+'</span>\n <input id="'+i+'" type="text" class="w-e-table-input" value="5"/></td>\n <span>'+a(r+"行")+'</span>\n <input id="'+n+'" type="text" class="w-e-table-input" value="5"/></td>\n <span>'+(a(r+"列")+a(r+"的")+a(r+"表格"))+'</span>\n </div>\n <div class="w-e-button-container">\n <button type="button" id="'+o+'" class="right">'+a("插入")+"</button>\n </div>\n </div>",events:[{selector:"#"+o,type:"click",fn:function(){var o=Number(s.default("#"+n).val()),r=Number(s.default("#"+i).val());return u(r)&&u(o)?(t.createAction(r,o),!0):(e.config.customAlert("表格行列请输入正整数","warning"),!1)},bindEnter:!0}]}],f={width:330,height:0,tabs:[]};return f.tabs.push(d[0]),f}t.default=d},function(e,t,n){e.exports=n(385)},function(e,t,n){var i=n(386);e.exports=i},function(e,t,n){n(387);var i=n(9);e.exports=i.Number.isInteger},function(e,t,n){n(5)({target:"Number",stat:!0},{isInteger:n(388)})},function(e,t,n){var i=n(13),o=Math.floor;e.exports=function(e){return!i(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){var i=n(20),o=n(390);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,".w-e-table {\n display: flex;\n}\n.w-e-table .w-e-table-input {\n width: 40px;\n text-align: center!important;\n margin: 0 5px;\n}\n",""]),e.exports=t},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=n(7),r=i.__importDefault(n(3)),a=function(){function e(e){this.editor=e}return e.prototype.createAction=function(e,t){var n=this.editor,i=r.default(n.selection.getSelectionContainerElem()),o=r.default(i.elems[0]).parentUntilEditor("UL",n),a=r.default(i.elems[0]).parentUntilEditor("OL",n);if(!o&&!a){var l=this.createTableHtml(e,t);n.cmd.do("insertHTML",l)}},e.prototype.createTableHtml=function(e,t){for(var n="",i="",r=0;r<e;r++){i="";for(var a=0;a<t;a++)i+=0===r?"<th></th>":"<td></td>";n=n+"<tr>"+i+"</tr>"}return'<table border="0" width="100%" cellpadding="0" cellspacing="0"><tbody>'+n+"</tbody></table>"+o.EMPTY_P},e}();t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2).__importDefault(n(393)),o=n(400);function r(e){i.default(e),o.bindEventKeyboardEvent(e),o.bindClickEvent(e)}t.default=r},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(3)),r=i.__importDefault(n(39)),a=i.__importDefault(n(394)),l=i.__importDefault(n(399)),s=n(7);function c(e){var t;function n(n){var i=new l.default(e),c="menus.panelMenus.table.",d=function(t,n){return void 0===n&&(n=c),e.i18next.t(n+t)},p=[{$elem:o.default("<span>"+d("删除表格")+"</span>"),onClick:function(e,t){return e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("insertHTML",s.EMPTY_P),!0}},{$elem:o.default("<span>"+d("添加行")+"</span>"),onClick:function(e,t){if(u(e))return!0;var n=o.default(e.selection.getSelectionStartElem()),r=i.getRowNode(n.elems[0]);if(!r)return!0;var l=Number(i.getCurrentRowIndex(t.elems[0],r)),s=i.getTableHtml(t.elems[0]),c=i.getTableHtml(a.default.ProcessingRow(o.default(s),l).elems[0]);return c=f(t,c),e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("insertHTML",c),!0}},{$elem:o.default("<span>"+d("删除行")+"</span>"),onClick:function(e,t){if(u(e))return!0;var n=o.default(e.selection.getSelectionStartElem()),r=i.getRowNode(n.elems[0]);if(!r)return!0;var l=Number(i.getCurrentRowIndex(t.elems[0],r)),c=i.getTableHtml(t.elems[0]),d=a.default.DeleteRow(o.default(c),l).elems[0].children[0].children.length,p="";return e.selection.createRangeByElem(t),e.selection.restoreSelection(),p=f(t,p=0===d?s.EMPTY_P:i.getTableHtml(a.default.DeleteRow(o.default(c),l).elems[0])),e.cmd.do("insertHTML",p),!0}},{$elem:o.default("<span>"+d("添加列")+"</span>"),onClick:function(e,t){if(u(e))return!0;var n=o.default(e.selection.getSelectionStartElem()),r=i.getCurrentColIndex(n.elems[0]),l=i.getTableHtml(t.elems[0]),s=i.getTableHtml(a.default.ProcessingCol(o.default(l),r).elems[0]);return s=f(t,s),e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("insertHTML",s),!0}},{$elem:o.default("<span>"+d("删除列")+"</span>"),onClick:function(e,t){if(u(e))return!0;var n=o.default(e.selection.getSelectionStartElem()),r=i.getCurrentColIndex(n.elems[0]),l=i.getTableHtml(t.elems[0]),c=a.default.DeleteCol(o.default(l),r),d=c.elems[0].children[0].children[0].children.length,p="";return e.selection.createRangeByElem(t),e.selection.restoreSelection(),p=f(t,p=0===d?s.EMPTY_P:i.getTableHtml(c.elems[0])),e.cmd.do("insertHTML",p),!0}},{$elem:o.default("<span>"+d("设置表头")+"</span>"),onClick:function(e,t){if(u(e))return!0;var n=o.default(e.selection.getSelectionStartElem()),r=i.getRowNode(n.elems[0]);if(!r)return!0;var l=Number(i.getCurrentRowIndex(t.elems[0],r));0!==l&&(l=0);var s=i.getTableHtml(t.elems[0]),c=i.getTableHtml(a.default.setTheHeader(o.default(s),l,"th").elems[0]);return c=f(t,c),e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("insertHTML",c),!0}},{$elem:o.default("<span>"+d("取消表头")+"</span>"),onClick:function(e,t){var n=o.default(e.selection.getSelectionStartElem()),r=i.getRowNode(n.elems[0]);if(!r)return!0;var l=Number(i.getCurrentRowIndex(t.elems[0],r));0!==l&&(l=0);var s=i.getTableHtml(t.elems[0]),c=i.getTableHtml(a.default.setTheHeader(o.default(s),l,"td").elems[0]);return c=f(t,c),e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("insertHTML",c),!0}}];(t=new r.default(e,n,p)).create()}function i(){t&&(t.remove(),t=null)}return{showTableTooltip:n,hideTableTooltip:i}}function u(e){var t=e.selection.getSelectionStartElem(),n=e.selection.getSelectionEndElem();return(null==t?void 0:t.elems[0])!==(null==n?void 0:n.elems[0])}function d(e){var t=c(e),n=t.showTableTooltip,i=t.hideTableTooltip;e.txt.eventHooks.tableClickEvents.push(n),e.txt.eventHooks.clickEvents.push(i),e.txt.eventHooks.keyupEvents.push(i),e.txt.eventHooks.toolbarClickEvents.push(i),e.txt.eventHooks.menuClickEvents.push(i),e.txt.eventHooks.textScrollEvents.push(i)}function f(e,t){var n=e.elems[0].nextSibling;return(!n||"<br>"===n.innerHTML)&&(t+=""+s.EMPTY_P),t}t.default=d},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(45)),a=i(n(91)),l=i(n(4)),s=i(n(138));(0,o.default)(t,"__esModule",{value:!0});var c=n(2).__importDefault(n(3));function u(e,t){for(var n=g(e),i=(0,r.default)(Array.prototype).apply(n.children),o=i[0].children.length,l=document.createElement("tr"),s=0;s<o;s++){var u=document.createElement("td");l.appendChild(u)}return(0,a.default)(i).call(i,t+1,0,l),m(n,i),c.default(n.parentNode)}function d(e,t){for(var n=g(e),i=(0,r.default)(Array.prototype).apply(n.children),o=function(e){var n,o=[];for((0,l.default)(n=(0,s.default)(i[e].children)).call(n,function(e){o.push(e)});0!==i[e].children.length;)i[e].removeChild(i[e].children[0]);var r="TH"!==c.default(o[0]).getNodeName()?document.createElement("td"):document.createElement("th");(0,a.default)(o).call(o,t+1,0,r);for(var u=0;u<o.length;u++)i[e].appendChild(o[u])},u=0;u<i.length;u++)o(u);return m(n,i),c.default(n.parentNode)}function f(e,t){var n=g(e),i=(0,r.default)(Array.prototype).apply(n.children);return(0,a.default)(i).call(i,t,1),m(n,i),c.default(n.parentNode)}function p(e,t){for(var n=g(e),i=(0,r.default)(Array.prototype).apply(n.children),o=function(e){var n,o=[];for((0,l.default)(n=(0,s.default)(i[e].children)).call(n,function(e){o.push(e)});0!==i[e].children.length;)i[e].removeChild(i[e].children[0]);(0,a.default)(o).call(o,t,1);for(var r=0;r<o.length;r++)i[e].appendChild(o[r])},u=0;u<i.length;u++)o(u);return m(n,i),c.default(n.parentNode)}function h(e,t,n){for(var i=g(e),o=(0,r.default)(Array.prototype).apply(i.children),u=o[t].children,d=document.createElement("tr"),f=function(e){var t,i=document.createElement(n),o=u[e];(0,l.default)(t=(0,s.default)(o.childNodes)).call(t,function(e){i.appendChild(e)}),d.appendChild(i)},p=0;p<u.length;p++)f(p);return(0,a.default)(o).call(o,t,1,d),m(i,o),c.default(i.parentNode)}function m(e,t){for(;0!==e.children.length;)e.removeChild(e.children[0]);for(var n=0;n<t.length;n++)e.appendChild(t[n])}function g(e){var t=e.elems[0].children[0];return"COLGROUP"===t.nodeName&&(t=e.elems[0].children[e.elems[0].children.length-1]),t}t.default={ProcessingRow:u,ProcessingCol:d,DeleteRow:f,DeleteCol:p,setTheHeader:h}},function(e,t,n){var i=n(396);e.exports=i},function(e,t,n){n(50),n(397);var i=n(9);e.exports=i.Array.from},function(e,t,n){var i=n(5),o=n(398);i({target:"Array",stat:!0,forced:!n(115)(function(e){Array.from(e)})},{from:o})},function(e,t,n){var i=n(40),o=n(31),r=n(114),a=n(112),l=n(35),s=n(69),c=n(113);e.exports=function(e){var t,n,u,d,f,p,h=o(e),m="function"==typeof this?this:Array,g=arguments.length,v=g>1?arguments[1]:void 0,_=void 0!==v,b=c(h),y=0;if(_&&(v=i(v,g>2?arguments[2]:void 0,2)),null==b||m==Array&&a(b))for(n=new m(t=l(h.length));t>y;y++)p=_?v(h[y],y):h[y],s(n,y,p);else for(f=(d=b.call(h)).next,n=new m;!(u=f.call(d)).done;y++)p=_?r(d,v,[u.value,y],!0):u.value,s(n,y,p);return n.length=y,n}},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4)),a=i(n(138));(0,o.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3)),s=function(){function e(e){this.editor=e}return e.prototype.getRowNode=function(e){var t,n=l.default(e).elems[0];return n.parentNode&&(n=null===(t=l.default(n).parentUntil("TR",n))||void 0===t?void 0:t.elems[0]),n},e.prototype.getCurrentRowIndex=function(e,t){var n,i=0,o=e.children[0];return"COLGROUP"===o.nodeName&&(o=e.children[e.children.length-1]),(0,r.default)(n=(0,a.default)(o.children)).call(n,function(e,n){e===t&&(i=n)}),i},e.prototype.getCurrentColIndex=function(e){var t,n,i=0,o="TD"===l.default(e).getNodeName()||"TH"===l.default(e).getNodeName()?e:null===(n=l.default(e).parentUntil("TD",e))||void 0===n?void 0:n.elems[0],s=l.default(o).parent();return(0,r.default)(t=(0,a.default)(s.elems[0].children)).call(t,function(e,t){e===o&&(i=t)}),i},e.prototype.getTableHtml=function(e){return'<table border="0" width="100%" cellpadding="0" cellspacing="0">'+l.default(e).html()+"</table>"},e}();t.default=s},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.bindEventKeyboardEvent=t.bindClickEvent=void 0;var i=n(2).__importDefault(n(3));function o(e){if(!e.length)return!1;var t=e.elems[0];return"P"===t.nodeName&&"<br>"===t.innerHTML}function r(e){function t(t,n){if(n.detail>=3){var o=window.getSelection();if(o){var r=o.focusNode,a=o.anchorNode,l=i.default(null==a?void 0:a.parentElement);if(!t.isContain(i.default(r))){var s="TD"===l.elems[0].tagName?l:l.parentUntilEditor("td",e);if(s){var c=e.selection.getRange();null==c||c.setEnd(s.elems[0],s.elems[0].childNodes.length),e.selection.restoreSelection()}}}}}e.txt.eventHooks.tableClickEvents.push(t)}function a(e){var t=e.txt,n=e.selection;t.eventHooks.keydownEvents.push(function(t){e.selection.saveRange();var i=n.getSelectionContainerElem();if(i){var r=i.getNodeTop(e),a=r.length&&r.prev().length?r.prev():null;if(a&&"TABLE"===a.getNodeName()&&n.isSelectionEmpty()&&0===n.getCursorPos()&&8===t.keyCode){var l=r.next();!!l.length&&o(r)&&(r.remove(),e.selection.setRangeToElem(l.elems[0])),t.preventDefault()}}})}t.bindClickEvent=r,t.bindEventKeyboardEvent=a},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(26));(0,o.default)(t,"__esModule",{value:!0}),t.formatCodeHtml=void 0;var a=n(2),l=a.__importDefault(n(38)),s=a.__importDefault(n(3)),c=n(6),u=a.__importDefault(n(402)),d=a.__importDefault(n(139)),f=a.__importDefault(n(33)),p=a.__importDefault(n(403));function h(e,t){return t?(t=n(t=i(t)),t=c.replaceSpecialSymbol(t)):t;function n(e){var t=e.match(/<pre[\s|\S]+?\/pre>/g);return null===t||(0,r.default)(t).call(t,function(t){e=e.replace(t,t.replace(/<\/code><code>/g,"\n").replace(/<br>/g,""))}),e}function i(e){var t,n=e.match(/<span\sclass="hljs[\s|\S]+?\/span>/gm);if(!n||!n.length)return e;for(var o=(0,r.default)(t=c.deepClone(n)).call(t,function(e){return(e=e.replace(/<span\sclass="hljs[^>]+>/,"")).replace(/<\/span>/,"")}),a=0;a<n.length;a++)e=e.replace(n[a],o[a]);return i(e)}}t.formatCodeHtml=h;var m=function(e){function t(t){var n=this,i=s.default('<div class="w-e-menu" data-title="代码"><i class="w-e-icon-terminal"></i></div>');return n=e.call(this,i,t)||this,p.default(t),n}return a.__extends(t,e),t.prototype.insertLineCode=function(e){var t=this.editor,n=s.default("<code>"+e+"</code>");t.cmd.do("insertElem",n),t.selection.createRangeByElem(n,!1),t.selection.restoreSelection()},t.prototype.clickHandler=function(){var e=this.editor,t=e.selection.getSelectionText();this.isActive||(e.selection.isSelectionEmpty()?this.createPanel("",""):this.insertLineCode(t))},t.prototype.createPanel=function(e,t){var n=u.default(this.editor,e,t);new f.default(this,n).create()},t.prototype.tryChangeActive=function(){var e=this.editor;d.default(e)?this.active():this.unActive()},t}(l.default);t.default=m},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(26));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=n(6),s=a.__importDefault(n(3)),c=a.__importDefault(n(139)),u=n(7);function d(e,t,n){var i,o=l.getRandom("input-iframe"),a=l.getRandom("select"),d=l.getRandom("btn-ok");function f(t,n){var i;c.default(e)&&p(),(null===(i=e.selection.getSelectionStartElem())||void 0===i?void 0:i.elems[0].innerHTML)&&e.cmd.do("insertHTML",u.EMPTY_P);var o=n.replace(/</g,"&lt;").replace(/>/g,"&gt;");e.highlight&&(o=e.highlight.highlightAuto(o).value),e.cmd.do("insertHTML",'<pre><code class="'+t+'">'+o+"</code></pre>");var r=e.selection.getSelectionStartElem(),a=null==r?void 0:r.getNodeTop(e);0===(null==a?void 0:a.getNextSibling().elems.length)&&s.default(u.EMPTY_P).insertAfter(a)}function p(){if(c.default(e)){var t=e.selection.getSelectionStartElem(),n=null==t?void 0:t.getNodeTop(e);!n||(e.selection.createRangeByElem(n),e.selection.restoreSelection())}}var h=function(t){return e.i18next.t(t)};return{width:500,height:0,tabs:[{title:h("menus.panelMenus.code.插入代码"),tpl:'<div>\n <select name="" id="'+a+'">\n '+(0,r.default)(i=e.config.languageType).call(i,function(e){return"<option "+(n==e?"selected":"")+' value ="'+e+'">'+e+"</option>"})+'\n </select>\n <textarea id="'+o+'" type="text" class="wang-code-textarea" placeholder="" style="height: 160px">'+t.replace(/&quot;/g,'"')+'</textarea>\n <div class="w-e-button-container">\n <button type="button" id="'+d+'" class="right">'+(c.default(e)?h("修改"):h("插入"))+"</button>\n </div>\n </div>",events:[{selector:"#"+d,type:"click",fn:function(){var t=document.getElementById(o),n=s.default("#"+a).val(),i=t.value;if(i)return!c.default(e)&&(f(n,i),!0)}}]}]}}t.default=d},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(404)),r=i.__importDefault(n(405));function a(e){o.default(e),r.default(e)}t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.createShowHideFn=void 0;var i=n(2),o=i.__importDefault(n(3)),r=i.__importDefault(n(39));function a(e){var t;function n(n){var i="menus.panelMenus.code.",a=function(t,n){return void 0===n&&(n=i),e.i18next.t(n+t)},l=[{$elem:o.default("<span>"+a("删除代码")+"</span>"),onClick:function(e,t){return t.remove(),!0}}];(t=new r.default(e,n,l)).create()}function i(){t&&(t.remove(),t=null)}return{showCodeTooltip:n,hideCodeTooltip:i}}function l(e){var t=a(e),n=t.showCodeTooltip,i=t.hideCodeTooltip;e.txt.eventHooks.codeClickEvents.push(n),e.txt.eventHooks.clickEvents.push(i),e.txt.eventHooks.toolbarClickEvents.push(i),e.txt.eventHooks.menuClickEvents.push(i),e.txt.eventHooks.textScrollEvents.push(i)}t.createShowHideFn=a,t.default=l},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=n(7),r=i.__importDefault(n(3));function a(e){var t=e.$textElem,n=e.selection,i=e.txt.eventHooks.keydownEvents;i.push(function(e){var i;if(40===e.keyCode){var a=n.getSelectionContainerElem(),l=null===(i=t.children())||void 0===i?void 0:i.last();if("XMP"===(null==a?void 0:a.elems[0].tagName)&&"PRE"===(null==l?void 0:l.elems[0].tagName)){var s=r.default(o.EMPTY_P);t.append(s)}}}),i.push(function(i){e.selection.saveRange();var a=n.getSelectionContainerElem();if(a){var l=a.getNodeTop(e),s=null==l?void 0:l.prev(),c=null==l?void 0:l.getNextSibling();if(s.length&&"PRE"===(null==s?void 0:s.getNodeName())&&0===c.length&&0===n.getCursorPos()&&8===i.keyCode){var u=r.default(o.EMPTY_P);t.append(u)}}})}t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(23)),r=i.__importDefault(n(3)),a=i.__importDefault(n(407)),l=n(6),s=n(7),c=function(e){function t(t){var n=this,i=r.default('<div class="w-e-menu" data-title="分割线"><i class="w-e-icon-split-line"></i></div>');return n=e.call(this,i,t)||this,a.default(t),n}return i.__extends(t,e),t.prototype.clickHandler=function(){var e=this.editor,t=e.selection.getRange(),n=e.selection.getSelectionContainerElem();if(null!=n&&n.length){var i=r.default(n.elems[0]),o=i.parentUntil("TABLE",n.elems[0]),a=i.children();"CODE"!==i.getNodeName()&&(o&&"TABLE"===r.default(o.elems[0]).getNodeName()||a&&0!==a.length&&"IMG"===r.default(a.elems[0]).getNodeName()&&(null==t||!t.collapsed)||this.createSplitLine())}},t.prototype.createSplitLine=function(){var e="<hr/>"+s.EMPTY_P;l.UA.isFirefox&&(e="<hr/><p></p>"),this.editor.cmd.do("insertHTML",e)},t.prototype.tryChangeActive=function(){},t}(o.default);t.default=c},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2).__importDefault(n(408));function o(e){i.default(e)}t.default=o},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(3)),r=i.__importDefault(n(39));function a(e){var t;function n(n){var i=[{$elem:o.default("<span>"+e.i18next.t("menus.panelMenus.删除")+"</span>"),onClick:function(e,t){return e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("delete"),!0}}];(t=new r.default(e,n,i)).create()}function i(){t&&(t.remove(),t=null)}return{showSplitLineTooltip:n,hideSplitLineTooltip:i}}function l(e){var t=a(e),n=t.showSplitLineTooltip,i=t.hideSplitLineTooltip;e.txt.eventHooks.splitLineEvents.push(n),e.txt.eventHooks.clickEvents.push(i),e.txt.eventHooks.keyupEvents.push(i),e.txt.eventHooks.toolbarClickEvents.push(i),e.txt.eventHooks.menuClickEvents.push(i),e.txt.eventHooks.textScrollEvents.push(i)}t.default=l},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=a.__importDefault(n(23)),c=n(98),u=a.__importDefault(n(415)),d=a.__importDefault(n(140)),f=function(e){function t(t){var n=this,i=l.default('<div class="w-e-menu" data-title="待办事项">\n <i class="w-e-icon-checkbox-checked"></i>\n </div>');return n=e.call(this,i,t)||this,u.default(t),n}return a.__extends(t,e),t.prototype.clickHandler=function(){var e=this.editor;c.isAllTodo(e)?(this.cancelTodo(),this.tryChangeActive()):this.setTodo()},t.prototype.tryChangeActive=function(){c.isAllTodo(this.editor)?this.active():this.unActive()},t.prototype.setTodo=function(){var e=this.editor,t=e.selection.getSelectionRangeTopNodes();(0,r.default)(t).call(t,function(t){var n;if("P"===(null==t?void 0:t.getNodeName())){var i=d.default(t).getTodo(),o=null===(n=i.children())||void 0===n?void 0:n.getNode();i.insertAfter(t),e.selection.moveCursor(o),t.remove()}}),this.tryChangeActive()},t.prototype.cancelTodo=function(){var e=this.editor,t=e.selection.getSelectionRangeTopNodes();(0,r.default)(t).call(t,function(t){var n,i,o,r=null===(i=null===(n=t.childNodes())||void 0===n?void 0:n.childNodes())||void 0===i?void 0:i.clone(!0),a=l.default("<p></p>");a.append(r),a.insertAfter(t),null===(o=a.childNodes())||void 0===o||o.get(0).remove(),e.selection.moveCursor(a.getNode()),t.remove()})},t}(s.default);t.default=f},function(e,t,n){e.exports=n(411)},function(e,t,n){var i=n(412);e.exports=i},function(e,t,n){var i=n(413),o=Array.prototype;e.exports=function(e){var t=e.every;return e===o||e instanceof Array&&t===o.every?i:t}},function(e,t,n){n(414);var i=n(15);e.exports=i("Array").every},function(e,t,n){var i=n(5),o=n(32).every,r=n(67),a=n(22),l=r("every"),s=a("every");i({target:"Array",proto:!0,forced:!l||!s},{every:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),s=n(98),c=a.__importDefault(n(140)),u=n(98),d=n(7);function f(e){function t(t){var n,i;if(s.isAllTodo(e)){t.preventDefault();var o=e.selection,a=o.getSelectionRangeTopNodes()[0],f=null===(n=a.childNodes())||void 0===n?void 0:n.get(0),p=null===(i=window.getSelection())||void 0===i?void 0:i.anchorNode,h=o.getRange();if(null==h||!h.collapsed){var m=null==h?void 0:h.commonAncestorContainer.childNodes,g=null==h?void 0:h.startContainer,v=null==h?void 0:h.endContainer,_=null==h?void 0:h.startOffset,b=null==h?void 0:h.endOffset,y=0,x=0,w=[];null==m||(0,r.default)(m).call(m,function(e,t){e.contains(g)&&(y=t),e.contains(v)&&(x=t)}),x-y>1&&(null==m||(0,r.default)(m).call(m,function(e,t){t<=y||t>=x||w.push(e)}),(0,r.default)(w).call(w,function(e){e.remove()})),u.dealTextNode(g,_),u.dealTextNode(v,b,!1),e.selection.moveCursor(v,0)}if(""===a.text()){var A=l.default(d.EMPTY_P);return A.insertAfter(a),o.moveCursor(A.getNode()),void a.remove()}var k=o.getCursorPos(),C=s.getCursorNextNode(null==f?void 0:f.getNode(),p,k),S=c.default(l.default(C)),E=S.getInputContainer(),T=E.parent().getNode(),R=S.getTodo(),O=E.getNode().nextSibling;""===(null==f?void 0:f.text())&&(null==f||f.append(l.default("<br>"))),R.insertAfter(a),O&&""!==(null==O?void 0:O.textContent)?o.moveCursor(T):("BR"!==(null==O?void 0:O.nodeName)&&l.default("<br>").insertAfter(E),o.moveCursor(T,1))}}function n(t){var n,i;if(s.isAllTodo(e)){var o,a=e.selection,c=a.getSelectionRangeTopNodes()[0],u=null===(n=c.childNodes())||void 0===n?void 0:n.getNode(),f=l.default("<p></p>"),p=f.getNode(),h=null===(i=window.getSelection())||void 0===i?void 0:i.anchorNode,m=a.getCursorPos(),g=h.previousSibling;if(""===c.text()){t.preventDefault();var v=l.default(d.EMPTY_P);return v.insertAfter(c),c.remove(),void a.moveCursor(v.getNode(),0)}"SPAN"===(null==g?void 0:g.nodeName)&&"INPUT"===g.childNodes[0].nodeName&&0===m&&(t.preventDefault(),null==u||(0,r.default)(o=u.childNodes).call(o,function(e,t){0!==t&&p.appendChild(e.cloneNode(!0))}),f.insertAfter(c),c.remove())}}function i(){var t=e.selection.getSelectionRangeTopNodes()[0];t&&u.isTodo(t)&&""===t.text()&&(l.default(d.EMPTY_P).insertAfter(t),t.remove())}function o(e){e&&e.target instanceof HTMLInputElement&&"checkbox"===e.target.type&&(e.target.checked?e.target.setAttribute("checked","true"):e.target.removeAttribute("checked"))}e.txt.eventHooks.enterDownEvents.push(t),e.txt.eventHooks.deleteUpEvents.push(i),e.txt.eventHooks.deleteDownEvents.push(n),e.txt.eventHooks.clickEvents.push(o)}t.default=f},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.selectorValidator=void 0;var i=n(2),o=i.__importDefault(n(3)),r=n(6),a=n(7),l=i.__importDefault(n(130)),s={border:"1px solid #c9d8db",toolbarBgColor:"#FFF",toolbarBottomBorder:"1px solid #EEE"};function c(e){var t,n,i=e.toolbarSelector,c=o.default(i),u=e.textSelector,d=e.config.height,f=e.i18next,p=o.default("<div></div>"),h=o.default("<div></div>"),m=null;null==u?(n=c.children(),c.append(p).append(h),p.css("background-color",s.toolbarBgColor).css("border",s.border).css("border-bottom",s.toolbarBottomBorder),h.css("border",s.border).css("border-top","none").css("height",d+"px")):(c.append(p),m=o.default(u).children(),o.default(u).append(h),n=h.children()),(t=o.default("<div></div>")).attr("contenteditable","true").css("width","100%").css("height","100%");var g,v=e.config.placeholder;(g=v!==l.default.placeholder?o.default("<div>"+v+"</div>"):o.default("<div>"+f.t(v)+"</div>")).addClass("placeholder"),n&&n.length?(t.append(n),g.hide()):t.append(o.default(a.EMPTY_P)),m&&m.length&&(t.append(m),g.hide()),h.append(t),h.append(g),p.addClass("w-e-toolbar").css("z-index",e.zIndex.get("toolbar")),h.addClass("w-e-text-container"),h.css("z-index",e.zIndex.get()),t.addClass("w-e-text");var _=r.getRandom("toolbar-elem");p.attr("id",_);var b=r.getRandom("text-elem");t.attr("id",b);var y=h.getBoundingClientRect().height;y!==t.getBoundingClientRect().height&&t.css("min-height",y+"px"),e.$toolbarElem=p,e.$textContainerElem=h,e.$textElem=t,e.toolbarElemId=_,e.textElemId=b}function u(e){var t="data-we-id",n=/^wangEditor-\d+$/,i=e.textSelector,r=e.toolbarSelector,a={bar:o.default("<div></div>"),text:o.default("<div></div>")};if(null==r)throw new Error("错误:初始化编辑器时候未传入任何参数,请查阅文档");if(a.bar=o.default(r),!a.bar.elems.length)throw new Error("无效的节点选择器:"+r);if(n.test(a.bar.attr(t)))throw new Error("初始化节点已存在编辑器实例,无法重复创建编辑器");if(i){if(a.text=o.default(i),!a.text.elems.length)throw new Error("无效的节点选择器:"+i);if(n.test(a.text.attr(t)))throw new Error("初始化节点已存在编辑器实例,无法重复创建编辑器")}a.bar.attr(t,e.id),a.text.attr(t,e.id),e.beforeDestroy(function(){a.bar.removeAttr(t),a.text.removeAttr(t)})}t.default=c,t.selectorValidator=u},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2).__importDefault(n(3)),o=n(7);function r(e,t){var n=e.$textElem,a=n.children();if(!a||!a.length)return n.append(i.default(o.EMPTY_P)),void r(e);var l=a.last();if(t){var s=l.html().toLowerCase(),c=l.getNodeName();if("<br>"!==s&&"<br/>"!==s||"P"!==c)return n.append(i.default(o.EMPTY_P)),void r(e)}e.selection.createRangeByElem(l,!1,!0),e.config.focus?e.selection.restoreSelection():e.selection.clearWindowSelectionRange()}t.default=r},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));function l(e){s(e),c(e),u(e)}function s(e){e.txt.eventHooks.changeEvents.push(function(){var t=e.config.onchange;if(t){var n=e.txt.html()||"";e.isFocus=!0,t(n)}e.txt.togglePlaceholder()})}function c(e){function t(t){var n=t.target,i=a.default(n),o=e.$textElem,r=e.$toolbarElem,l=o.isContain(i),s=r.isContain(i),c=r.elems[0]==t.target;if(l)e.isFocus||f(e),e.isFocus=!0;else{if(s&&!c||!e.isFocus)return;d(e),e.isFocus=!1}}e.isFocus=!1,document.activeElement===e.$textElem.elems[0]&&e.config.focus&&(f(e),e.isFocus=!0),a.default(document).on("click",t),e.beforeDestroy(function(){a.default(document).off("click",t)})}function u(e){e.$textElem.on("compositionstart",function(){e.isComposing=!0,e.txt.togglePlaceholder()}).on("compositionend",function(){e.isComposing=!1,e.txt.togglePlaceholder()})}function d(e){var t,n=e.config.onblur,i=e.txt.html()||"";(0,r.default)(t=e.txt.eventHooks.onBlurEvents).call(t,function(e){return e()}),n(i)}function f(e){(0,e.config.onfocus)(e.txt.html()||"")}t.default=l},function(e,t,n){function i(e){var t=e.config,n=t.lang,i=t.languages;if(null==e.i18next)e.i18next={t:function(e){var t=e.split(".");return t[t.length-1]}};else try{e.i18next.init({ns:"wangEditor",lng:n,defaultNS:"wangEditor",resources:i})}catch(o){throw new Error("i18next:"+o)}}(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(29));(0,o.default)(t,"__esModule",{value:!0}),t.setUnFullScreen=t.setFullScreen=void 0;var a=n(2).__importDefault(n(3));n(421);var l="w-e-icon-fullscreen",s="w-e-icon-fullscreen_exit",c="w-e-full-screen-editor";t.setFullScreen=function(e){var t=a.default(e.toolbarSelector),n=e.$textContainerElem,i=e.$toolbarElem,o=(0,r.default)(i).call(i,"i."+l),u=e.config;o.removeClass(l),o.addClass(s),t.addClass(c),t.css("z-index",u.zIndexFullScreen);var d=i.getBoundingClientRect();n.css("height","calc(100% - "+d.height+"px)")},t.setUnFullScreen=function(e){var t=a.default(e.toolbarSelector),n=e.$textContainerElem,i=e.$toolbarElem,o=(0,r.default)(i).call(i,"i."+s),u=e.config;o.removeClass(s),o.addClass(l),t.removeClass(c),t.css("z-index","auto"),n.css("height",u.height+"px")};var u=function(e){if(!e.textSelector&&e.config.showFullScreen){var n=e.$toolbarElem,i=a.default('<div class="w-e-menu" data-title="全屏">\n <i class="'+l+'"></i>\n </div>');i.on("click",function(n){var o;(0,r.default)(o=a.default(n.currentTarget)).call(o,"i").hasClass(l)?(i.attr("data-title","取消全屏"),t.setFullScreen(e)):(i.attr("data-title","全屏"),t.setUnFullScreen(e))}),n.append(i)}};t.default=u},function(e,t,n){var i=n(20),o=n(422);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,".w-e-full-screen-editor {\n position: fixed;\n width: 100%!important;\n height: 100%!important;\n left: 0;\n top: 0;\n}\n",""]),e.exports=t},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(29));(0,o.default)(t,"__esModule",{value:!0});var a=function(e,t){var n,i=e.isEnable?e.$textElem:(0,r.default)(n=e.$textContainerElem).call(n,".w-e-content-mantle"),o=(0,r.default)(i).call(i,"[id='"+t+"']").getOffsetData().top;i.scrollTop(o)};t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2).__importDefault(n(129)),o={menu:2,panel:2,toolbar:1,tooltip:1,textContainer:1},r=function(){function e(){this.tier=o,this.baseZIndex=i.default.zIndex}return e.prototype.get=function(e){return e&&this.tier[e]?this.baseZIndex+this.tier[e]:this.baseZIndex},e.prototype.init=function(e){this.baseZIndex==i.default.zIndex&&(this.baseZIndex=e.config.zIndex)},e}();t.default=r},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(70)),a=i(n(4));(0,o.default)(t,"__esModule",{value:!0});var l=n(2),s=l.__importDefault(n(426)),c=n(6),u=n(7);function d(e,t){return(0,r.default)(e).call(e,function(e){var n=e.type,i=e.target,o=e.attributeName;return"attributes"!=n||"attributes"==n&&("contenteditable"==o||i!=t)})}var f=function(e){function t(t){var n=e.call(this,function(e,i){var o;if(e=d(e,i.target),(o=n.data).push.apply(o,e),t.isCompatibleMode)n.asyncSave();else if(!t.isComposing)return n.asyncSave()})||this;return n.editor=t,n.data=[],n.asyncSave=u.EMPTY_FN,n}return l.__extends(t,e),t.prototype.save=function(){this.data.length&&(this.editor.history.save(this.data),this.data.length=0,this.emit())},t.prototype.emit=function(){var e;(0,a.default)(e=this.editor.txt.eventHooks.changeEvents).call(e,function(e){return e()})},t.prototype.observe=function(){var t=this;e.prototype.observe.call(this,this.editor.$textElem.elems[0]);var n=this.editor.config.onchangeTimeout;this.asyncSave=c.debounce(function(){t.save()},n),this.editor.isCompatibleMode||this.editor.$textElem.on("compositionend",function(){t.asyncSave()})},t}(s.default);t.default=f},function(e,t,n){var i=n(0)(n(1));(0,i.default)(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=this;this.options={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0},this.callback=function(t){e(t,n)},this.observer=new MutationObserver(this.callback),t&&(this.options=t)}return(0,i.default)(e.prototype,"target",{get:function(){return this.node},enumerable:!1,configurable:!0}),e.prototype.observe=function(e){this.node instanceof Node||(this.node=e,this.connect())},e.prototype.connect=function(){if(this.node)return this.observer.observe(this.node,this.options),this;throw new Error("还未初始化绑定,请您先绑定有效的 Node 节点")},e.prototype.disconnect=function(){var e=this.observer.takeRecords();e.length&&this.callback(e),this.observer.disconnect()},e}();t.default=o},function(e,t,n){var i=n(0)(n(1));(0,i.default)(t,"__esModule",{value:!0});var o=n(2),r=o.__importDefault(n(428)),a=o.__importDefault(n(435)),l=o.__importDefault(n(436)),s=function(){function e(e){this.editor=e,this.content=new r.default(e),this.scroll=new a.default(e),this.range=new l.default(e)}return(0,i.default)(e.prototype,"size",{get:function(){return this.scroll.size},enumerable:!1,configurable:!0}),e.prototype.observe=function(){this.content.observe(),this.scroll.observe(),!this.editor.isCompatibleMode&&this.range.observe()},e.prototype.save=function(e){e.length&&(this.content.save(e),this.scroll.save(),!this.editor.isCompatibleMode&&this.range.save())},e.prototype.revoke=function(){this.editor.change.disconnect();var e=this.content.revoke();e&&(this.scroll.revoke(),this.editor.isCompatibleMode||(this.range.revoke(),this.editor.$textElem.focus())),this.editor.change.connect(),e&&this.editor.change.emit()},e.prototype.restore=function(){this.editor.change.disconnect();var e=this.content.restore();e&&(this.scroll.restore(),this.editor.isCompatibleMode||(this.range.restore(),this.editor.$textElem.focus())),this.editor.change.connect(),e&&this.editor.change.emit()},e}();t.default=s},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(429)),r=i.__importDefault(n(433)),a=function(){function e(e){this.editor=e}return e.prototype.observe=function(){this.editor.isCompatibleMode?this.cache=new r.default(this.editor):this.cache=new o.default(this.editor),this.cache.observe()},e.prototype.save=function(e){this.editor.isCompatibleMode?this.cache.save():this.cache.compile(e)},e.prototype.revoke=function(){var e;return null===(e=this.cache)||void 0===e?void 0:e.revoke()},e.prototype.restore=function(){var e;return null===(e=this.cache)||void 0===e?void 0:e.restore()},e}();t.default=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=i.__importDefault(n(99)),r=i.__importDefault(n(431)),a=n(432),l=function(e){function t(t){var n=e.call(this,t.config.historyMaxSize)||this;return n.editor=t,n}return i.__extends(t,e),t.prototype.observe=function(){this.resetMaxSize(this.editor.config.historyMaxSize)},t.prototype.compile=function(e){return this.save(r.default(e)),this},t.prototype.revoke=function(){return e.prototype.revoke.call(this,function(e){a.revoke(e)})},t.prototype.restore=function(){return e.prototype.restore.call(this,function(e){a.restore(e)})},t}(o.default);t.default=l},function(e,t,n){var i=n(0)(n(1));(0,i.default)(t,"__esModule",{value:!0}),t.CeilStack=void 0;var o=function(){function e(e){void 0===e&&(e=0),this.data=[],this.max=0,this.reset=!1,(e=Math.abs(e))&&(this.max=e)}return e.prototype.resetMax=function(e){e=Math.abs(e),!this.reset&&!isNaN(e)&&(this.max=e,this.reset=!0)},(0,i.default)(e.prototype,"size",{get:function(){return this.data.length},enumerable:!1,configurable:!0}),e.prototype.instack=function(e){return this.data.unshift(e),this.max&&this.size>this.max&&(this.data.length=this.max),this},e.prototype.outstack=function(){return this.data.shift()},e.prototype.clear=function(){return this.data.length=0,this},e}();t.CeilStack=o},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4)),a=i(n(27));(0,o.default)(t,"__esModule",{value:!0}),t.compliePosition=t.complieNodes=t.compileValue=t.compileType=void 0;var l=n(6);function s(e){switch(e){case"childList":return"node";case"attributes":return"attr";default:return"text"}}function c(e){switch(e.type){case"attributes":return e.target.getAttribute(e.attributeName)||"";case"characterData":return e.target.textContent;default:return""}}function u(e){var t={};return e.addedNodes.length&&(t.add=l.toArray(e.addedNodes)),e.removedNodes.length&&(t.remove=l.toArray(e.removedNodes)),t}function d(e){return e.previousSibling?{type:"before",target:e.previousSibling}:e.nextSibling?{type:"after",target:e.nextSibling}:{type:"parent",target:e.target}}t.compileType=s,t.compileValue=c,t.complieNodes=u,t.compliePosition=d;var f=["UL","OL","H1","H2","H3","H4","H5","H6"];function p(e){var t=[],n=!1,i=[];return(0,r.default)(e).call(e,function(e,o){var r={type:s(e.type),target:e.target,attr:e.attributeName||"",value:c(e)||"",oldValue:e.oldValue||"",nodes:u(e),position:d(e)};if(t.push(r),l.UA.isFirefox){if(n&&e.addedNodes.length&&1==e.addedNodes[0].nodeType){var p=e.addedNodes[0],m={type:"node",target:p,attr:"",value:"",oldValue:"",nodes:{add:[n]},position:{type:"parent",target:p}};-1!=(0,a.default)(f).call(f,p.nodeName)?(m.nodes.add=l.toArray(p.childNodes),t.push(m)):3==n.nodeType?(h(p,i)&&(m.nodes.add=l.toArray(p.childNodes)),t.push(m)):-1==(0,a.default)(f).call(f,e.target.nodeName)&&h(p,i)&&(m.nodes.add=l.toArray(p.childNodes),t.push(m))}"node"==r.type&&1==e.removedNodes.length?(n=e.removedNodes[0],i.push(n)):(n=!1,i.length=0)}}),t}function h(e,t){for(var n=0,i=t.length-1;i>0&&e.contains(t[i]);i--)n++;return n}t.default=p},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(4)),a=i(n(94));function l(e,t){var n=e.position.target;switch(e.position.type){case"before":n.nextSibling?(n=n.nextSibling,(0,r.default)(t).call(t,function(t){e.target.insertBefore(t,n)})):(0,r.default)(t).call(t,function(t){e.target.appendChild(t)});break;case"after":(0,r.default)(t).call(t,function(t){e.target.insertBefore(t,n)});break;default:(0,r.default)(t).call(t,function(e){n.appendChild(e)})}}function s(e){for(var t=0,n=(0,a.default)(e.nodes);t<n.length;t++){var i=n[t],o=i[0],s=i[1];"add"===o?(0,r.default)(s).call(s,function(t){e.target.removeChild(t)}):l(e,s)}}function c(e){var t=e.target;null==e.oldValue?t.removeAttribute(e.attr):t.setAttribute(e.attr,e.oldValue)}function u(e){e.target.textContent=e.oldValue}(0,o.default)(t,"__esModule",{value:!0}),t.restore=t.revoke=void 0;var d={node:s,text:u,attr:c};function f(e){for(var t=e.length-1;t>-1;t--){var n=e[t];d[n.type](n)}}function p(e){for(var t=0,n=(0,a.default)(e.nodes);t<n.length;t++){var i=n[t],o=i[0],s=i[1];"add"===o?l(e,s):(0,r.default)(s).call(s,function(e){e.parentNode.removeChild(e)})}}function h(e){e.target.textContent=e.value}function m(e){e.target.setAttribute(e.attr,e.value)}t.revoke=f;var g={node:p,text:h,attr:m};function v(e){for(var t=0,n=e;t<n.length;t++){var i=n[t];g[i.type](i)}}t.restore=v},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(434),o=function(){function e(e){this.editor=e,this.data=new i.TailChain}return e.prototype.observe=function(){this.data.resetMax(this.editor.config.historyMaxSize),this.data.insertLast(this.editor.$textElem.html())},e.prototype.save=function(){return this.data.insertLast(this.editor.$textElem.html()),this},e.prototype.revoke=function(){var e=this.data.prev();return!!e&&(this.editor.$textElem.html(e),!0)},e.prototype.restore=function(){var e=this.data.next();return!!e&&(this.editor.$textElem.html(e),!0)},e}();t.default=o},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(91));(0,o.default)(t,"__esModule",{value:!0}),t.TailChain=void 0;var a=function(){function e(){this.data=[],this.max=0,this.point=0,this.isRe=!1}return e.prototype.resetMax=function(e){(e=Math.abs(e))&&(this.max=e)},(0,o.default)(e.prototype,"size",{get:function(){return this.data.length},enumerable:!1,configurable:!0}),e.prototype.insertLast=function(e){var t;for(this.isRe&&((0,r.default)(t=this.data).call(t,this.point+1),this.isRe=!1),this.data.push(e);this.max&&this.size>this.max;)this.data.shift();return this.point=this.size-1,this},e.prototype.current=function(){return this.data[this.point]},e.prototype.prev=function(){if(!this.isRe&&(this.isRe=!0),this.point--,!(this.point<0))return this.current();this.point=0},e.prototype.next=function(){if(!this.isRe&&(this.isRe=!0),this.point++,!(this.point>=this.size))return this.current();this.point=this.size-1},e}();t.TailChain=a},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(2),o=function(e){function t(t){var n=e.call(this,t.config.historyMaxSize)||this;return n.editor=t,n.last=0,n.target=t.$textElem.elems[0],n}return i.__extends(t,e),t.prototype.observe=function(){var e=this;this.target=this.editor.$textElem.elems[0],this.editor.$textElem.on("scroll",function(){e.last=e.target.scrollTop}),this.resetMaxSize(this.editor.config.historyMaxSize)},t.prototype.save=function(){return e.prototype.save.call(this,[this.last,this.target.scrollTop]),this},t.prototype.revoke=function(){var t=this;return e.prototype.revoke.call(this,function(e){t.target.scrollTop=e[0]})},t.prototype.restore=function(){var t=this;return e.prototype.restore.call(this,function(e){t.target.scrollTop=e[1]})},t}(i.__importDefault(n(99)).default);t.default=o},function(e,t,n){var i=n(0)(n(1));(0,i.default)(t,"__esModule",{value:!0});var o=n(2),r=o.__importDefault(n(99)),a=o.__importDefault(n(3)),l=n(6);function s(e){return{start:[e.startContainer,e.startOffset],end:[e.endContainer,e.endOffset],root:e.commonAncestorContainer,collapsed:e.collapsed}}var c=function(e){function t(t){var n=e.call(this,t.config.historyMaxSize)||this;return n.editor=t,n.lastRange=s(document.createRange()),n.root=t.$textElem.elems[0],n.updateLastRange=l.debounce(function(){n.lastRange=s(n.rangeHandle)},t.config.onchangeTimeout),n}return o.__extends(t,e),(0,i.default)(t.prototype,"rangeHandle",{get:function(){var e=document.getSelection();return e&&e.rangeCount?e.getRangeAt(0):document.createRange()},enumerable:!1,configurable:!0}),t.prototype.observe=function(){var e=this;function t(){var t=e.rangeHandle;(e.root===t.commonAncestorContainer||e.root.contains(t.commonAncestorContainer))&&(e.editor.isComposing||e.updateLastRange())}function n(t){("Backspace"==t.key||"Delete"==t.key)&&e.updateLastRange()}this.root=this.editor.$textElem.elems[0],this.resetMaxSize(this.editor.config.historyMaxSize),a.default(document).on("selectionchange",t),this.editor.beforeDestroy(function(){a.default(document).off("selectionchange",t)}),e.editor.$textElem.on("keydown",n)},t.prototype.save=function(){var t=s(this.rangeHandle);return e.prototype.save.call(this,[this.lastRange,t]),this.lastRange=t,this},t.prototype.set=function(e){try{if(e){var t=this.rangeHandle;return t.setStart.apply(t,e.start),t.setEnd.apply(t,e.end),this.editor.menus.changeActive(),!0}}catch(n){return!1}return!1},t.prototype.revoke=function(){var t=this;return e.prototype.revoke.call(this,function(e){t.set(e[0])})},t.prototype.restore=function(){var t=this;return e.prototype.restore.call(this,function(e){t.set(e[1])})},t}(r.default);t.default=c},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(29));(0,o.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));function l(e){var t,n,i=!1;function o(){if(!i){e.$textElem.hide();var o=e.zIndex.get("textContainer"),r=e.txt.html();t=a.default('<div class="w-e-content-mantle" style="z-index:'+o+'">\n <div class="w-e-content-preview w-e-text">'+r+"</div>\n </div>"),e.$textContainerElem.append(t);var l=e.zIndex.get("menu");n=a.default('<div class="w-e-menue-mantle" style="z-index:'+l+'"></div>'),e.$toolbarElem.append(n),i=!0,e.isEnable=!1}}function l(){!i||(t.remove(),n.remove(),e.$textElem.show(),i=!1,e.isEnable=!0)}return e.txt.eventHooks.changeEvents.push(function(){i&&(0,r.default)(t).call(t,".w-e-content-preview").html(e.$textElem.html())}),{disable:o,enable:l}}n(438),t.default=l},function(e,t,n){var i=n(20),o=n(439);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var r={insert:"head",singleton:!1};i(o,r),e.exports=o.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,".w-e-content-mantle {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n}\n.w-e-content-mantle .w-e-content-preview {\n width: 100%;\n min-height: 100%;\n padding: 0 10px;\n line-height: 1.5;\n}\n.w-e-content-mantle .w-e-content-preview img {\n cursor: default;\n}\n.w-e-content-mantle .w-e-content-preview img:hover {\n box-shadow: none;\n}\n.w-e-menue-mantle {\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n}\n",""]),e.exports=t},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=function(){function e(e){var t=this;this.editor=e;var n=function(){document.activeElement===e.$textElem.elems[0]&&t.emit()};window.document.addEventListener("selectionchange",n),this.editor.beforeDestroy(function(){window.document.removeEventListener("selectionchange",n)})}return e.prototype.emit=function(){var e,t=this.editor.config.onSelectionChange;if(t){var n=this.editor.selection;n.saveRange(),n.isSelectionEmpty()||t({text:n.getSelectionText(),html:null===(e=n.getSelectionContainerElem())||void 0===e?void 0:e.elems[0].innerHTML,selection:n})}},e}();t.default=i},function(e,t,n){var i=n(0),o=i(n(1)),r=i(n(128)),a=i(n(94)),l=i(n(4));(0,o.default)(t,"__esModule",{value:!0}),t.registerPlugin=void 0;var s=n(2).__importDefault(n(87)),c=n(6);function u(e,t,n){if(!e)throw new TypeError("name is not define");if(!t)throw new TypeError("options is not define");if(!t.intention)throw new TypeError("options.intention is not define");if(t.intention&&"function"!=typeof t.intention)throw new TypeError("options.intention is not function");n[e],n[e]=t}function d(e){var t=(0,r.default)({},c.deepClone(s.default.globalPluginsFunctionList),c.deepClone(e.pluginsFunctionList)),n=(0,a.default)(t);(0,l.default)(n).call(n,function(t){t[0];var n=t[1],i=n.intention,o=n.config;i(e,o)})}t.registerPlugin=u,t.default=d},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0})}]).default;var xv=bv(yv.exports),wv=1,Av=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kv=e({name:"fcEditor",props:{modelValue:String,init:Function,disabled:Boolean,config:Object},inheritAttrs:!1,emits:["update:modelValue"],data:function(){return{editor:{},uni:wv++}},watch:{disabled:function(){this.enable()},modelValue:function(e){e!==this.editor.txt.html()&&this.editor.txt.html(e||"")}},methods:{enable:function(){this.disabled?this.editor.disable():this.editor.enable()},result:function(){this.$emit("update:modelValue",this.editor.txt.html())}},mounted:function(){var e=this;this.$nextTick(function(){e.editor=new xv("#editor".concat(e.uni)),e.editor.config.zIndex=2,e.editor.config.focus=!1,e.editor.config.autoFocus=!1,e.config&&Av(e.editor.config,e.config),e.init&&e.init(e.editor),e.editor.create(),e.enable(),e.editor.txt.html(e.modelValue)})},render:function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gv(Object(n),!0).forEach(function(t){_v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},this.$attrs);return delete e.id,_("div",c(e,{onInput:this.result,id:"editor".concat(this.uni),style:"line-height: normal;"}),null)},beforeDestroy:function(){this.editor&&this.editor.destroy(),this.editor=null}});const Cv=(e,t,n)=>{Xl.component(e,n||t),Kl.component(e,t)};Xl.component("draggable",ql),Xl.component("DragTool",bh),Xl.component("DragBox",Qh),Xl.component("Validate",vm),Xl.component("Struct",id),Xl.component("HtmlEditor",kh),Xl.component("FetchConfig",jh),Xl.component("FnEditor",gs),Xl.component("FnInput",Eh),Xl.component("Required",ym),Xl.component("TableOptions",Sm),Xl.component("TreeOptions",Nm),Xl.component("TableFormColumn",eg),Xl.component("EventConfig",Ls),Xl.component("ColorInput",ag),Xl.component("SizeInput",ig),Xl.component("StyleConfig",mv),Xl.component("LanguageInput",dm),Xl.component("ConfigItem",Up),Xl.component("FieldInput",Hh),Xl.component("FnConfig",qh),Xl.component("FcRow",yh),Xl.component("ValueInput",xm),Cv("FcEditor",kv),Cv("FcTitle",Km),Cv("SignaturePad",Qm),Cv("TableForm",Vm,Bm),Cv("FcTable",om,nm);ph.install=function(e){e.component("FcDesigner",ph)},ph.makeOptionsRule=bi,ph.copyTextToClipboard=Li,ph.getInjectArg=Ni,ph.localeOptions=Ti,ph.localeProps=Ri,ph.makeRequiredRule=vi,ph.makeTreeOptions=_i,ph.makeTreeOptionsRule=yi,ph.toJSON=wi,ph.formCreate=Kl,ph.designerForm=Xl,ph.component=Cv,ph.useLocale=ts,ph.addMenu=function(e,t){Array.isArray(e)||(e=[e]),t?Ql.unshift(...e):Ql.push(...e)},ph.addDragRule=function(e,t){Array.isArray(e)||(e=[e]),t?yr.unshift(...e):yr.push(...e)},ph.t=es,ph.utils={copyTextToClipboard:Li,getInjectArg:Ni,localeOptions:Ti,localeProps:Ri,makeOptionsRule:bi,makeRequiredRule:vi,makeTreeOptions:_i,makeTreeOptionsRule:yi,toJSON:wi};(function(e,t){const n=e.split("."),i=t.split("."),o=Math.min(n.length,i.length);for(var r=0;r<o;r++){var a=parseInt(n[r],10)-parseInt(i[r],10);if(a>0)return 1;if(a<0)return-1}n.length===i.length||(n.length,i.length)})("3.2.24",Kl.version),ph.version="3.4.0",typeof window<"u"&&(window.FcDesigner=ph);const Sv=Object.assign({name:"FormGenerator"},{__name:"index",setup(e){const t=b(null),o={fieldReadonly:!1};return(e,r)=>(i(),n(I(ph),{ref_key:"designer",ref:t,config:o,height:"calc(100vh - 160px)"},null,512))}});export{Sv as default};