index.BPqjdiUU.js 1.1 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*!
  2. Build based on gin-vue-admin
  3. Time : 1757946830000 */
  4. import{X as e,O as t,r as n,c_ as i,U as o,ct as r,P as a,cu as l,t as s,f as u,g as c,a as d,ab as f,bT as p,Q as h,S as m,T as g,aw as v,V as _,q as b,W as y,cG as x,ag as w,c as A,o as k,b as C,cw as S,al as E,E as T,v as O,Y as R,i as M,w as D,d as N,n as I,ac as F,C as L,F as P,I as V,h as j,ay as B,L as z,a0 as H,bY as U,cx as W,cd as G,m as $,bL as Q,a1 as Y}from"./index.DlqNVRUO.js";
  5. /*!
  6. * @form-create/element-ui v3.2.30
  7. * (c) 2018-2025 xaboy
  8. * Github https://github.com/xaboy/form-create
  9. * Released under the MIT License.
  10. */function q(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 K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach(function(t){J(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function X(e){return(X="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 J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ee(e,t){return(ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function te(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 ne(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=Z(e);if(t){var o=Z(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return te(this,n)}}function ie(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)||re(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 oe(e){return function(e){if(Array.isArray(e))return ae(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||re(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 re(e,t){if(e){if("string"==typeof e)return ae(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)?ae(e,t):void 0}}function ae(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 le(e,t){return Object.keys(e).reduce(function(n,i){return t&&-1!==t.indexOf(i)||(n[i]=e[i]),n},{})}function se(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}var ue=a({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 r=i(e.formCreateInject,"options",[]),a=i(e,"options"),l=i(e,"modelValue"),s=i(e,"inputValue",""),f=d(s.value),p=i(e,"input",!1),h=function(e){var t=oe(se(l.value)),n=t.indexOf(f.value);f.value=e,n>-1&&(t.splice(n,1),t.push(e),g(t))};o(s,function(e){p.value?h(e):f.value=e});var m=t(function(){var e=r.value||[];return a.value&&(e=a.value||[]),Array.isArray(e)?e:[]});o(l,function(e){var t=null;if(!s.value&&null!=e&&Array.isArray(e)&&e.length>0&&p.value){var n=m.value.map(function(e){return e.value});e.forEach(function(e){-1===n.indexOf(e)&&(t=e)})}null!=t&&(f.value=t)},{immediate:!0});var g=function(e){n.emit("update:modelValue",e)};return{options:m,value:l,onInput:g,updateCustomValue:h,makeInput:function(e){if(p.value)return u(e,{value:f.value||void 0,label:f.value||void 0},{default:function(){return[u(c("ElInput"),{size:"small",modelValue:f.value,"onUpdate:modelValue":h},null)]}})}}},render:function(){var e,t,n=this,i="button"===this.type?"ElCheckboxButton":"ElCheckbox",o=c(i);return u(c("ElCheckboxGroup"),S(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),K({default:function(){return[n.options.map(function(e,t){var n=K({},e),r=n.value,a=n.label;return delete n.value,delete n.label,u(o,S(n,{label:r,value:r,key:i+t+"-"+r}),{default:function(){return[a||r||""]}})}),null===(e=(t=n.$slots).default)||void 0===e?void 0:e.call(t),n.makeInput(o)]}},le(this.$slots,["default"])))},mounted:function(){this.$emit("fc.el",this.$refs.el)}});function ce(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 de(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))}}de("._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 fe={name:"IconCircleClose"},pe={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},he=[C("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),C("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)];fe.render=function(e,t,n,i,o,r){return k(),A("svg",pe,he)};var me={name:"IconDocument"},ge={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},ve=[C("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)];me.render=function(e,t,n,i,o,r){return k(),A("svg",ge,ve)};var _e={name:"IconDelete"},be={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},ye=[C("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)];_e.render=function(e,t,n,i,o,r){return k(),A("svg",be,ye)};var xe={name:"IconView"},we={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Ae=[C("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)];xe.render=function(e,t,n,i,o,r){return k(),A("svg",we,Ae)};var ke={name:"IconFolderOpened"},Ce={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Se=[C("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)];ke.render=function(e,t,n,i,o,r){return k(),A("svg",Ce,Se)};var Ee=a({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:ke,IconView:xe},data:function(){return{fileList:se(this.modelValue),previewVisible:!1,frameVisible:!1,previewImage:"",bus:new ce}},watch:{modelValue:function(e){this.fileList=se(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 u(c("ElInput"),S({type:"text",modelValue:this.fileList.map(function(t){return e.getSrc(t)}).toString(),readonly:!0},{key:1}),{append:function(){return u(c("ElButton"),{icon:c(e.icon),onClick:function(){return e.showModel()}},null)},suffix:function(){return e.fileList.length&&!e.disabled?u(c("ElIcon"),{class:"el-input__icon _fc-upload-icon",onClick:function(){e.fileList=[],e.input()}},{default:function(){return[u(fe,null,null)]}}):null}})},makeGroup:function(e){return(!this.maxLength||this.fileList.length<this.maxLength)&&e.push(this.makeBtn()),u("div",{key:2},[e])},makeItem:function(e,t){return u("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)),u("div",{class:"_fc-upload-cover",key:4},[n])}},makeHandleIcon:function(e,t){var n=this,i=c(!0===this.handleIcon||void 0===this.handleIcon?"icon-view":this.handleIcon);return u(c("ElIcon"),{onClick:function(){return n.handleClick(e)},key:"5"+t},{default:function(){return[u(i,null,null)]}})},makeRemoveIcon:function(e,t){var n=this;return u(c("ElIcon"),{onClick:function(){return n.handleRemove(e)},key:"6"+t},{default:function(){return[u(_e,null,null)]}})},makeFiles:function(){var e=this;return this.makeGroup(this.fileList.map(function(t,n){return e.makeItem(n,[u(c("ElIcon"),{onClick:function(){return e.handleClick(t)}},{default:function(){return[u(me,null,null)]}}),e.makeIcons(t,n)])}))},makeImages:function(){var e=this;return this.makeGroup(this.fileList.map(function(t,n){return e.makeItem(n,[u("img",{src:e.getSrc(t)},null),e.makeIcons(t,n)])}))},makeBtn:function(){var e=this,t=c(this.icon);return u("div",{class:"_fc-upload-btn",onClick:function(){return e.showModel()},key:7},[u(c("ElIcon"),null,{default:function(){return[u(t,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,t=this.$props,n=t.okBtnText,i=t.closeBtnText,o=t.closeBtn,r=t.okBtn;if(t.footer)return u("div",null,[o?u(c("ElButton"),{onClick:function(){return!1!==e.onCancel()&&(e.frameVisible=!1)}},{default:function(){return[i||e.formCreateInject.t("close")||"关闭"]}}):null,r?u(c("ElButton"),{type:"primary",onClick:function(){return!1!==e.onOk()&&e.closeModel()}},{default:function(){return[n||e.formCreateInject.t("ok")||"确定"]}}):null])}},render:function(){var t,n=this,i=this.type;t="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,d=o.title,f=o.modalTitle;return e(function(){n.$refs.frame&&n.frameLoad(n.$refs.frame.contentWindow||{})}),u("div",{class:{"_fc-frame":!0,"_fc-disabled":this.disabled}},[t,u(c("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:f,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[u("img",{style:"width: 100%",src:n.previewImage},null)]}}),u(c("ElDialog"),S({appendToBody:!0},K({width:a,title:d},this.modal),{modelValue:this.frameVisible,onClose:function(){return n.closeModel(!0)}}),{default:function(){return[n.frameVisible||!n.reload?u("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)}}),Te=a({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 r=i(e.formCreateInject,"options",[]),a=i(e,"options"),l=i(e,"modelValue"),s=i(e,"inputValue",""),f=d(s.value),p=i(e,"input",!1);o(s,function(e){p.value?g(e):f.value=e});var h=t(function(){var e=r.value||[];return a.value&&(e=a.value||[]),Array.isArray(e)?e:[]});o(l,function(e){var t=!1;!s.value&&null!=e&&p.value&&(t=-1===h.value.map(function(e){return e.value}).indexOf(e)),t&&(f.value=e)},{immediate:!0});var m=function(e){n.emit("update:modelValue",e)},g=function(e){var t=f.value;f.value=e,l.value===t&&m(e)};return{options:h,value:l,onInput:m,updateCustomValue:g,customValue:f,makeInput:function(e){if(p.value)return u(e,{checked:!1,value:f.value||void 0,label:f.value||void 0},{default:function(){return[u(c("ElInput"),{size:"small",modelValue:f.value,"onUpdate:modelValue":g},null)]}})}}},render:function(){var e,t,n=this,i="button"===this.type?"ElRadioButton":"ElRadio",o=c(i);return u(c("ElRadioGroup"),S(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),K({default:function(){return[n.options.map(function(e,t){var n=K({},e),r=n.value,a=n.label;return delete n.value,delete n.label,u(o,S(n,{label:r,value:r,key:i+t+"-"+r}),{default:function(){return[a||r||""]}})}),null===(e=(t=n.$slots).default)||void 0===e?void 0:e.call(t),n.makeInput(o)]}},le(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"===X(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 Re(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 Me=a({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){var t=i(e.formCreateInject,"options",[]);return{options:function(){return Array.isArray(t.value)?t.value:[]},value:i(e,"modelValue")}},render:function(){var e,t,n=this,i=function(e,t){return u(c("ElOption"),S(e,{key:t+"-"+e.value}),null)},o=this.options();return u(c("ElSelect"),S(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":function(e){return n.$emit("update:modelValue",e)},ref:"el"}),K({default:function(){return[o.map(function(e,t){return Re(e||"","options")?function(e,t){return u(c("ElOptionGroup"),{label:e.label,key:t+"-"+e.label},{default:function(){return[Oe.trueArray(e.options)&&e.options.map(function(e,t){return i(e,t)})]}})}(e,t):i(e,t)}),null===(e=(t=n.$slots).default)||void 0===e?void 0:e.call(t)]}},le(this.$slots,["default"])))},mounted:function(){this.$emit("fc.el",this.$refs.el)}}),De=a({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(se(this.modelValue)))}},render:function(){return u(c("ElTree"),S(this.$attrs,{ref:"tree",onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted:function(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}});de("._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}");var Ne={name:"IconUpload"},Ie={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Fe=[C("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 Le(e,t){return"object"===X(e)?e:{url:e,is_string:!0,name:Ve(e),uid:t}}function Pe(e){return K(K({},e),{},{file:e,value:e})}function Ve(e){return(""+e).split("/").pop()}Ne.render=function(e,t,n,i,o,r){return k(),A("svg",Ie,Fe)};var je=a({name:"fcUpload",inheritAttrs:!1,formCreateParser:{toFormValue:function(e){return se(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=se(this.modelValue).map(Le).map(Pe)},watch:{modelValue:function(e){this.fileList=se(e).map(Le).map(Pe)}},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,t,n=this,i=se(this.modelValue).length;return u("div",{class:"_fc-upload"},[u(c("ElUpload"),S({key:i},this.$attrs,{listType:this.listType||"picture-card",class:{"_fc-exceed":!!this.$attrs.limit&&this.$attrs.limit<=i},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,httpRequest:this.doHttpRequest,fileList:this.fileList,ref:"upload"}),K({default:function(){return[(null===(e=(t=n.$slots).default)||void 0===e?void 0:e.call(t))||(-1===["text","picture"].indexOf(n.listType)?u(c("ElIcon"),null,{default:function(){return[u(Ne,null,null)]}}):u(c("ElButton"),{type:"primary"},{default:function(){return[n.formCreateInject.t("clickToUpload")||n.uploadText||"点击上传"]}}))]}},le(this.$slots,["default"]))),u(c("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[u("img",{style:"width: 100%",src:n.previewImage},null)]}})])},mounted:function(){this.$emit("fc.el",this.$refs.upload)}});function Be(e,t,n){e[t]=n}function ze(e,t){delete e[t]}function He(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&&Be(e,o,[]);else if(r._clone&&void 0!==n){if(!n){Be(e,o,r._clone());continue}r=r.getRule(),a&&Be(e,o,{})}else a&&Be(e,o,{});e[o]=He(e[o],r,n)}else Be(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 Ue(e){return He({},{value:e}).value}var We=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)&&Be(e,i,t[i]);return e};function Ge(){return We.apply(this,arguments)}function $e(e){return"object"!==X(e)||null===e?e:e instanceof Array?oe(e):K({},e)}de('._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%}');var Qe=a({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},onBeforeRemove:{type:Function,default:function(){}},onBeforeAdd:{type:Function,default:function(){}},formCreateInject:Object,parse:Function},data:function(){return{len:0,cacheRule:{},cacheValue:{},sort:[],form:l(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(){He(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=Ue(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&&Re(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:K({},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=J({},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(t,n){var i=this,o=this.formCreateInject.form.copyRules(this.rule||[]),r=this.options?K({},this.options):{submitBtn:!1,resetBtn:!1};if(this.defaultValue){r.formData||(r.formData={});var a=Ue(this.defaultValue);Ge(r.formData,this.field?J({},this.field,a):a)}this.parse&&this.parse({rule:o,options:r,index:this.sort.length}),this.cacheRule[++this.len]={rule:o,options:r},this.sort=Object.keys(this.cacheRule),n&&e(function(){return i.$emit("add",o,Object.keys(i.cacheRule).length-1)})},add$f:function(t,n,i){var o=this;this.cacheRule[n].$f=i,e(function(){o.$emit("itemMounted",i,Object.keys(o.cacheRule).indexOf(n))})},removeRule:function(t,n){var i=this,o=Object.keys(this.cacheRule).indexOf(t);delete this.cacheRule[t],delete this.cacheValue[t],this.sort=Object.keys(this.cacheRule),n&&e(function(){return i.$emit("remove",o)})},add:function(e){if(!this.disabled&&!1!==this.onBeforeAdd(this.modelValue)){var t=oe(this.modelValue);t.push(this.defaultValue?Ue(this.defaultValue):this.field?null:{}),this.input(t)}},del:function(e,t){if(!this.disabled&&!1!==this.onBeforeRemove(this.modelValue,e)){this.removeRule(t,!0);var n=oe(this.modelValue);n.splice(e,1),this.input(n)}},addIcon:function(e){return u("div",{class:"_fc-group-btn _fc-group-plus-minus",onClick:this.add},null)},delIcon:function(e,t){var n=this;return u("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 u("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 u("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)},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=[];return(!this.max||e<this.max)&&e===t+1&&o.push(this.addIcon(n)),e>this.min&&o.push(this.delIcon(t,n)),this.sortBtn&&t&&o.push(this.sortUpIcon(t)),this.sortBtn&&t!==e-1&&o.push(this.sortDownIcon(t)),o},emitEvent:function(e,t,n,i){this.$emit.apply(this,[e].concat(oe(t),[this.cacheRule[i].$f,n]))},expandRule:function(e){for(var t=0;t<e;t++)this.addRule(t)}},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=0===t.length?this.$slots.default?this.$slots.default({vm:this,add:this.add}):u("div",{key:"a_def",class:"_fc-group-plus-minus _fc-group-add fc-clock",onClick:this.add},null):t.map(function(r,a){var l=e.cacheRule[r],s=l.rule,c=l.options,d=n&&!o?e.makeIcon(t.length,a,r):[];return u("div",{class:"_fc-group-container",key:r},[u(i,S({key:r},{disabled:o,"onUpdate:modelValue":function(t){return e.formData(r,t)},"onEmit-event":function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return e.emitEvent(t,i,a,r)},"onUpdate:api":function(t){return e.add$f(a,r,t)},inFor:!0,modelValue:e.field?J({},e.field,e._value(e.modelValue[a])):e.modelValue[a],rule:s,option:c,extendOption:!0}),null),u("div",{class:"_fc-group-idx"},[a+1]),d.length?u("div",{class:"_fc-group-handle fc-clock"},[d]):null])});return u("div",{key:"con",class:"_fc-group "+(o?"_fc-group-disabled":"")},[r])}}),Ye=a({name:"fcSubForm",props:{rule:Array,options:{type:Object,default:function(){return n({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:l(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(t){var n=this;this.subApi=t,e(function(){n.$emit("itemMounted",t)})}},render:function(){var e=this.form;return u(e,{disabled:this.disabled,"onUpdate:modelValue":this.formData,modelValue:this.modelValue,"onEmit-event":this.$emit,"onUpdate:api":this.add$f,rule:this.rule,option:this.options,extendOption:!0},null)}}),qe={name:"IconWarning"},Ke={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Xe=[C("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)];qe.render=function(e,t,n,i,o,r){return k(),A("svg",Ke,Xe)};var Je=[ue,Ee,Te,Me,De,je,Qe,Ye,qe];function Ze(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 et(e){var t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return 0===t.indexOf("-")&&(t=t.substr(1)),t}function tt(e){return e.replace(e[0],e[0].toLocaleUpperCase())}var nt=["props"],it=["class","style","directives"],ot=["on","hook"],rt=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(nt,oe(i.normal||[])),r=[].concat(it,oe(i.array||[])),a=[].concat(ot,oe(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]=K(K({},t[i]),n[i]);else if(r.indexOf(i)>-1){var s=t[i]instanceof Array?t[i]:[t[i]],u=n[i]instanceof Array?n[i]:[n[i]];t[i]=[].concat(oe(s),oe(u))}else if(a.indexOf(i)>-1)for(var c in n[i])if(t[i][c]){var d=t[i][c]instanceof Array?t[i][c]:[t[i][c]],f=n[i][c]instanceof Array?n[i][c]:[n[i][c]];t[i][c]=[].concat(oe(d),oe(f))}else t[i][c]=n[i][c];else if("hook"===i)for(var p in n[i])t[i][p]?t[i][p]=at(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]=K({},n[i]):r.indexOf(i)>-1?t[i]=n[i]instanceof Array?oe(n[i]):"object"===X(n[i])?K({},n[i]):n[i]:t[i]=n[i];return t},n)},at=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},lt=["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"],st=["validate","children","control"],ut=["effect","deep","renderSlots"];function ct(){return[].concat(lt,oe(nt),oe(it),oe(ot),st,ut)}function dt(e){return ft(e.replace(/(-[a-z])/g,function(e){return e.replace("-","").toLocaleUpperCase()}))}function ft(e){return e.replace(e[0],e[0].toLowerCase())}var pt="[[FORM-CREATE-PREFIX-",ht="-FORM-CREATE-SUFFIX]]";function mt(e,t){return JSON.stringify(He(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 pt+t+ht}},t)}function gt(e){return new Function("return "+e)()}function vt(e,t){if(e&&Oe.String(e)&&e.length>4){var n=e.trim(),i=!1;try{if(n.indexOf(ht)>0&&0===n.indexOf(pt))n=n.replace(ht,"").replace(pt,""),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=gt("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=gt(n)}catch(a){r=gt("function "+n)}return r.__json=e,r}catch(a){return void"解析失败:".concat(n,"\n\nerr: ").concat(a)}}return e}function _t(e,t){return JSON.parse(e,function(e,n){return Oe.Undef(n)||!n.indexOf?n:vt(n,t)})}function bt(e,t){return{value:e,enumerable:!1,configurable:!1,writable:!0}}function yt(e,t){return xt([e],t||!1)[0]}function xt(e,t){return He([],oe(e),t||!1)}function wt(e,t){return rt(Array.isArray(t)?t:[t],e,{array:st,normal:ut}),e}function At(e){var t=Oe.Function(e.getRule)?e.getRule():e;return t.type||(t.type="input"),t}function kt(e,t){Object.defineProperties(e,Object.keys(t).reduce(function(e,n){return e[n]={get:function(){return t[n]()}},e},{}))}function Ct(e){return e.__fc__||(e.__origin__?e.__origin__.__fc__:null)}function St(e,t){try{t=e()}catch(n){!function(e){e.toString()}(n)}return t}function Et(){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,oe(e));else if(Oe.Function(e)){var t=e.apply(void 0,oe(i||[]));Array.isArray(t)?o.push.apply(o,oe(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)||r(e)?this.setSlot(void 0,function(){return e}):Object.keys(n).forEach(function(e){t.setSlot(e,n[e])}),this}}}function Tt(e){var t=K({},e.props||{});return Object.keys(e.on||{}).forEach(function(n){n.indexOf("-")>0&&(n=dt(n));var i="on".concat(tt(n));Array.isArray(t[i])?t[i]=[].concat(oe(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 Ot(e,t){return Object.setPrototypeOf(e,t),e}var Rt=function(e,t){return"string"==typeof e?String(t):"number"==typeof e?Number(t):t},Mt={"==":function(e,t){return JSON.stringify(e)===JSON.stringify(Rt(e,t))},"!=":function(e,t){return!Mt["=="](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(Rt(e[0],t))>-1},notOn:function(e,t){return!Mt.on(e,t)},in:function(e,t){return t&&t.indexOf&&t.indexOf(e)>-1},notIn:function(e,t){return!Mt.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 Dt(e,t){return(Array.isArray(t)?t:(t||"").split(".")).forEach(function(t){null!=e&&(e=e[t])}),e}function Nt(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 It(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:It(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 Ft=function(e,t){if(e&&e!==t)return e.props.formCreateInject?e.props.formCreateInject:e.parent?Ft(e.parent,t):void 0};function Lt(t,i,r){return a({name:"FormCreate"+(t.isMobile?"Mobile":""),components:i,directives:r,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(i){var r=s();E("parentFC",r);var a=m("parentFC",null),u=a;if(a)for(;u.setupState.parent;)u=u.setupState.parent;else u=r;var c=g(i),d=c.rule,f=c.modelValue,p=c.subForm,h=c.inFor,w=n({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:oe(d.value||[]),updateValue:JSON.stringify(f.value||{})}),A=new t(r),k=A.api(),C=h.value,S=null;v(function(){_(function(){var e="",t=i.option&&i.option.globalClass||{};Object.keys(t).forEach(function(n){var i="";t[n].style&&Object.keys(t[n].style).forEach(function(e){i+=et(e)+":"+t[n].style[e]+";"}),t[n].content&&(i+=t[n].content+";"),i&&(e+=".".concat(n,"{").concat(i,"}"))}),i.option&&i.option.style&&(e+=i.option.style),S||((S=document.createElement("style")).type="text/css",document.head.appendChild(S)),S.innerHTML=e||""})});var T=Ze(function(){A.bus.$emit("$loadData.$topForm")},100),O=Ze(function(){A.bus.$emit("$loadData.$scopeForm")},100),R=Ze(function(){A.bus.$emit("$loadData.$form")},100),M=function(e){A.bus.$emit("change-$form."+e)};return b(function(){a&&(k.top.bus.$on("$loadData.$form",T),k.top.bus.$on("change",M)),k!==k.scope&&k.scope.bus.$on("$loadData.$scopeForm",O),A.mounted()}),y(function(){a&&(k.top.bus.$off("$loadData.$form",T),k.top.bus.$off("change",M)),k!==k.scope&&k.scope.bus.$off("$loadData.$scopeForm",O),function(){var e=Ft(r,a);if(e)if(C){var t=se(e.getSubForm()),n=t.indexOf(k);n>-1&&t.splice(n,1)}else e.subForm()}(),w.destroyed=!0,A.unmount(),S&&(S.parentNode||S.parentElement)&&document.head.removeChild(S)}),x(function(){A.updated()}),function(){if(a){var e,t=Ft(r,a);if(t)C?(e=se(t.getSubForm())).push(k):e=k,t.subForm(e)}}(),o(function(){return i.option},function(){A.initOptions(),k.refresh()},{deep:!0,flush:"sync"}),o(function(){return oe(d.value)},function(e){A.$handle.isBreakWatch()||e.length===w.renderRule.length&&e.every(function(e){return w.renderRule.indexOf(e)>-1})||(A.$handle.updateAppendData(),A.$handle.reloadRule(d.value),r.setupState.renderRule())}),o(function(){return[i.disabled,i.preview]},function(){k.refresh()}),o(f,function(e){mt(e||{})!==w.updateValue&&(k.config.forceCoverValue?k.coverValue(e||{}):k.setValue(e||{}))},{deep:!0,flush:"post"}),o(function(){return i.index},function(){k.coverValue({}),A.$handle.updateAppendData(),e(function(){e(function(){k.clearValidateState()})})},{flush:"sync"}),K(K({fc:l(A),parent:a?l(a):a,top:l(u),fapi:l(k)},g(w)),{},{getGroupInject:function(){return Ft(r,a)},refresh:function(){++w.unique},renderRule:function(){w.renderRule=oe(d.value||[])},updateValue:function(t){if(!w.destroyed){var n=mt(t);w.updateValue!==n&&(w.updateValue=n,r.emit("update:modelValue",t),e(function(){R(),a?p.value||O():(T(),O())}))}}})},created:function(){var e=s();e.emit("update:api",e.setupState.fapi),e.setupState.fc.init()}})}function Pt(e,t){return function(n,i,o){var r=new Vt(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 Vt(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 jt(e){e.forEach(function(e){Vt.prototype[e]=function(t){return wt(this._data,J({},e,arguments.length<2?t:J({},t,arguments[1]))),this}})}Ge(Vt.prototype,{getRule:function(){return this._data},setProp:function(e,t){return Be(this._data,e,t),this},modelField:function(e){return this._data.modelField=e,this},_clone:function(){var e=new this.constructor;return e._data=yt(this._data),e}}),jt(ct());var Bt=Pt("");function zt(e,t,n){var i=Bt("",t);return i._data.type=e,i._data.title=n,i}function Ht(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(n){return t}}function Ut(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=new URLSearchParams(e.query).toString();o&&(i.includes("?")?i+="&".concat(o):i+="?".concat(o))}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),Ht(n));e.onSuccess(Ht(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 r=e.headers||{};Object.keys(r).forEach(function(e){null!=r[e]&&n.setRequestHeader(e,r[e])}),n.send(t)}}function Wt(e,t,n){return new Promise(function(i,o){(t||Ut)(K(K({},e),{},{onSuccess:function(t){var o=function(e){return e},r=vt(e.parse);Oe.Function(r)?o=r:r&&Oe.String(r)&&(o=function(e){return Dt(e,r)}),i(o(t,e.targetRule,n))},onError:function(e){o(e)}}))})}function Gt(e){return Ue(e)}function $t(e){return null==e?"":"object"===X(e)?JSON.stringify(e,null,2):String(e)}var Qt=0;function Yt(){var e=370+ ++Qt;return"F"+Math.random().toString(36).substr(3,3)+Number("".concat(Date.now())).toString(36)+e.toString(36)+"c"}function qt(e,t,n){var i,o=e;return(t||"").split(".").forEach(function(e){i&&(o[i]&&"object"==X(o[i])||(o[i]={}),o=o[i]),i=e}),o[i]=n,o}var Kt=1;function Xt(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:Kt++}),kt(this,{options:function(){return e.options},sort:function(){return e.sort}}),this.initCache(),this.initRender()}Ge(Xt.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(n){Ge(n.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-"+et(e.rule.field)]||n.slots["field-"+e.rule.field]),i||(i=n.slots["type-"+et(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=Et();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 n=this;this.$handle.options.global&&(this.cacheConfig[e.trueType]||(this.cacheConfig[e.trueType]=t(function(){var t=n.$handle.options.global;return wt({},[t["*"]||t.default||{},t[e.originType]||t[e.type]||t[e.type]||{}])})),e.prop=wt({},[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&&qt(e.prop,e.prop.optionsTo,t)},deepSet:function(e){var t=e.rule.deep;t&&Object.keys(t).sort(function(e,t){return e.length<t.length?-1:1}).forEach(function(n){qt(e.prop,n,t[n])})},parseSide:function(e,t){return Oe.Object(e)?wt({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),u=0;u<o;u++)s[u]=arguments[u];var c={rule:i,prop:r,preview:l,api:n.$handle.api,model:r.model||{},slotValue:s};s.length&&i.slotUpdate&&St(function(){return i.slotUpdate(c)});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 St(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?(c.children=d,p=h(c)):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"===X(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:K(J({},"update:".concat(l),s.callback),e.prop.modelEmit?J({},e.prop.modelEmit,function(){return t.onEmitInput(e)}):{}),props:J({},l,s.value)}),e.prop.model=s}return rt(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(t,n){var i=this;if(!Oe.trueArray(t))return{};var o=Et();return t.map(function(r){if(r)return Oe.String(r)?o.setSlot(null,r):r.__fc__?i.renderSlot(o,r.__fc__,n):void(r.type&&e(function(){i.$handle.loadChildren(t,n),i.$handle.refresh()}))}),o.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(ft(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=Et();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))return e;var o;if(n)o=e.type;else if(o=e.is,e.type){o=dt(e.type);var r=this.vNode.aliasMap[o];r&&(o=dt(r))}if(o){var a=Et();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=K({},e);return delete l.type,delete l.is,this.vNode.make(o,l,a.mergeBag(t).getSlots())}}}})}(Xt);var Jt=["hook:updated","hook:mounted"];function Zt(e,t,n){var i,o=Yt(),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:K({},t),computed:{},payload:{},refRule:{},input:r,el:void 0,exportEl:void 0,defaultValue:r?Ue(n):void 0,field:t.field||void 0}),this.updateKey(),i=this,Object.defineProperties(i.origin,{__fc__:bt(l(i))}),i.rule!==i.origin&&Object.defineProperties(i.rule,{__fc__:bt(l(i))}),this.update(e,!0)}function en(e,t){for(var n=0;n<e.ctrlRule.length;n++){var i=e.ctrlRule[n];if(i.children===t)return i}}function tn(e){return!!e.rule.__ctrl}function nn(e,t){return"function"==typeof t?""+t:t}Ge(Zt.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 u=St(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)}})});u&&Oe.Function(u.then)?(u.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=u||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,i){this.pending[e]={origin:t,value:n(i)}},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=Yt(),e&&this.parent&&this.parent.updateKey(e)},updateType:function(){this.originType=this.rule.type,this.type=dt(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=K({},this.rule);delete i.children,delete i.validate,this.prop=wt({},[i].concat(oe(Object.keys(this.payload).map(function(e){return n.payload[e]})),[this.computed])),this.prop.validate=[].concat(oe((null===(e=this.refRule)||void 0===e||null===(t=e.__$validate)||void 0===t?void 0:t.value)||[]),oe(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(){this.watch.forEach(function(e){return e()}),this.watch=[],this.refRule={}},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 on={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){}},rn=["field","value","vm","template","name","config","control","inject","sync","payload","optionsTo","update","slotUpdate","computed","component","cache"],an=Symbol("oldValue");function ln(t){var i=this;kt(this,{options:function(){return t.options.value||{}},bus:function(){return t.bus},preview:function(){return null!=t.vm.props.preview?t.vm.props.preview:t.vm.setupState.parent&&null!=t.vm.setupState.parent.props.preview?t.vm.setupState.parent.props.preview:t.options.value.preview||!1}}),Ge(this,{fc:t,vm:t.vm,watching:!1,loading:!1,reloading:!1,noWatchFn:null,deferSyncFn:null,isMounted:!1,formData:n({}),subRuleData:n({}),subForm:{},form:n({}),appendData:{},ignoreFields:[],providers:{},cycleLoad:null,loadedId:1,nextTick:null,changeStatus:!1,pageEnd:!0,nextReload:function(){i.lifecycle("reload")}}),this.initData(t.rules),this.$manager=new t.manager(this),this.$render=new Xt(this),this.api=t.extendApiFn.reduce(function(e,t){var n=St(function(){return t(e,i)});return n&&n!==e&&Ge(e,n),e},function(t){function n(e){return Oe.Undef(e)?e=t.fields():Array.isArray(e)||(e=[e]),e}function i(e,n,i){Oe.Undef(e)?e=Object.keys(K(K({},t.fieldCtx),t.nameCtx)):Array.isArray(e)||(e=[e]),e.forEach(function(e){var o=t.fieldCtx[e]||t.nameCtx[e];o&&o.forEach(function(e){Be(e.rule,n,i),t.$render.clearCache(e)})})}function o(){var e=t.subForm;return Object.keys(e).reduce(function(t,n){var i=e[n];return i?(Array.isArray(i)?t.push.apply(t,oe(i)):t.push(i),t):t},[])}var r={get isScope(){return!1===t.vm.props.subForm},get isPreview(){return t.preview},get config(){return t.options},set config(e){t.fc.options.value=e},get options(){return t.options},set options(e){t.fc.options.value=e},get form(){return t.form},get rule(){return t.rules},get parent(){return t.vm.setupState.parent&&t.vm.setupState.parent.setupState.fapi},get top(){return r.parent?r.parent.top:r},get scope(){for(var e=t.vm;e&&e.setupState.fapi;){if(!e.props.subForm)return e.setupState.fapi;e=e.setupState.parent}return r.top},get children(){return o()},get siblings(){var e=t.vm.setupState.getGroupInject();if(e){var n=e.getSubForm();if(Array.isArray(n))return oe(n)}},get index(){var e=r.siblings;if(e){var t=e.indexOf(r);return t>-1?t:void 0}},get formulas(){return K({},t.fc.formulas)},formData:function(e){if(null==e||"boolean"==typeof e){var i={};return Object.keys(t.form).forEach(function(n){!0!==e&&-1!==t.ignoreFields.indexOf(n)||(i[n]=Gt(t.form[n]))}),i}return n(e).reduce(function(e,t){return e[t]=r.getValue(t),e},{})},getValue:function(e){var n=t.getFieldCtx(e);return n?Gt(n.rule.value):!1!==t.options.appendValue&&Re(t.appendData,e)?Gt(t.appendData[e]):void 0},coverValue:function(e){var n=K({},e||{});t.deferSyncValue(function(){t.appendData={},r.fields().forEach(function(i){var o=t.fieldCtx[i];if(o){var r=Re(e,i);o.forEach(function(t){t.rule.value=r?e[i]:void 0}),delete n[i]}}),Ge(t.appendData,n)},!0)},setValue:function(e){var n=e;arguments.length>=2&&(n=J({},e,arguments[1])),t.deferSyncValue(function(){Object.keys(n).forEach(function(e){var i=t.fieldCtx[e];if(!i)return t.appendData[e]=n[e];i.forEach(function(t){t.rule.value=n[e]})})},!0)},removeField:function(e){var n=t.getCtx(e);return t.deferSyncValue(function(){t.getCtxs(e).forEach(function(e){e.rm()})},!0),n?n.origin:void 0},removeRule:function(e){var t=e&&Ct(e);if(t)return t.rm(),t.origin},fields:function(){return t.fields()},append:function(e,n,i){var o,r=t.sort.length-1,a=t.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=t.rules;o.splice(r+1,0,e)},prepend:function(e,n,i){var o,r=0,a=t.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=t.rules;o.splice(r,0,e)},hidden:function(e,n){i(n,"hidden",!!e),t.refresh()},hiddenStatus:function(e){var n=t.getCtx(e);if(n)return!!n.rule.hidden},display:function(e,n){i(n,"display",!!e),t.refresh()},displayStatus:function(e){var n=t.getCtx(e);if(n)return!!n.rule.display},disabled:function(e,i){n(i).forEach(function(n){t.getCtxs(n).forEach(function(t){Be(t.rule.props,"disabled",!!e)})}),t.refresh()},all:function(e){return Object.keys(t.ctxs).map(function(n){var i=t.ctxs[n];return e?i.origin:i.rule})},model:function(e){return t.fields().reduce(function(n,i){var o=t.fieldCtx[i][0];return n[i]=e?o.origin:o.rule,n},{})},component:function(e){return Object.keys(t.nameCtx).reduce(function(n,i){var o=t.nameCtx[i].map(function(t){return e?t.origin:t.rule});return n[i]=1===o.length?o[0]:o,n},{})},bind:function(){return r.form},reload:function(e){t.reloadRule(e)},updateOptions:function(e){t.fc.updateOptions(e),r.refresh()},onSubmit:function(e){r.updateOptions({onSubmit:e})},sync:function(e){if(Array.isArray(e))e.forEach(function(e){return r.sync(e)});else{var n=Oe.Object(e)?Ct(e):t.getCtxs(e);n&&((n=Array.isArray(n)?n:[n]).forEach(function(e){if(!e.deleted){var n=t.subForm[e.id];n&&(Array.isArray(n)?n.forEach(function(e){e.refresh()}):n&&n.refresh()),t.$render.clearCache(e)}}),t.refresh())}},refresh:function(){o().forEach(function(e){e.refresh()}),t.$render.clearCacheAll(),t.refresh()},refreshOptions:function(){t.$manager.updateOptions(t.options),r.refresh()},hideForm:function(e){t.vm.setupState.isShow=!e},changeStatus:function(){return t.changeStatus},clearChangeStatus:function(){t.changeStatus=!1},updateRule:function(e,n){t.getCtxs(e).forEach(function(e){Ge(e.rule,n)})},updateRules:function(e){Object.keys(e).forEach(function(t){r.updateRule(t,e[t])})},mergeRule:function(e,n){t.getCtxs(e).forEach(function(e){wt(e.rule,n)})},mergeRules:function(e){Object.keys(e).forEach(function(t){r.mergeRule(t,e[t])})},getRule:function(e,n){var i=t.getCtx(e);if(i)return n?i.origin:i.rule},findType:function(e,n){var i=void 0;return Object.keys(t.ctxs).forEach(function(o){var r=t.ctxs[o];r.rule.type===e&&(i=n?r.origin:r.rule)}),i},findTypes:function(e,n){var i=[];return Object.keys(t.ctxs).forEach(function(o){var r=t.ctxs[o];r.rule.type===e&&i.push(n?r.origin:r.rule)}),i},getRenderRule:function(e){var n=t.getCtx(e);if(n)return n.prop},getRefRule:function(e){var n=t.getCtxs(e);if(n){var i=n.map(function(e){return e.rule});return 1===i.length?i[0]:i}},setEffect:function(e,n,i){var o=t.getCtx(e);o&&n&&("$"===n[0]&&(n=n.substr(1)),Re(o.rule,"$"+n)&&Be(o.rule,"$"+n,i),Re(o.rule,"effect")||(o.rule.effect={}),Be(o.rule.effect,n,i))},clearEffectData:function(e,n){var i=t.getCtx(e);i&&(n&&"$"===n[0]&&(n=n.substr(1)),i.clearEffectData(n),r.sync(e))},updateValidate:function(e,t,n){n?r.mergeRule(e,{validate:t}):i(e,"validate",t)},updateValidates:function(e,t){Object.keys(e).forEach(function(n){r.updateValidate(n,e[n],t)})},refreshValidate:function(){r.refresh()},resetFields:function(i){n(i).forEach(function(e){t.getCtxs(e).forEach(function(e){t.$render.clearCache(e),e.rule.value=Gt(e.defaultValue)})}),e(function(){e(function(){e(function(){r.clearValidateState(i)})})}),null==i&&(Oe.Function(t.options.onReset)&&St(function(){return t.options.onReset(r)}),t.vm.emit("reset",r))},method:function(e,t){var n,i,o=r.el(e);if(!o||!o[t])throw new Error((n="err",i="".concat(t," 方法不存在"),"[form-create ".concat(n,"]: ").concat(i)+""));return function(){return o[t].apply(o,arguments)}},exec:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return St(function(){return r.method(e,t).apply(void 0,i)})},toJson:function(e){return mt(r.rule,e)},trigger:function(e,t){for(var n=r.el(e),i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];n&&n.$emit.apply(n,[t].concat(o))},el:function(e){var n=t.getCtx(e);if(n)return n.el||t.vm.refs[n.ref]},closeModal:function(e){t.bus.$emit("fc:closeModal:"+e)},getSubForm:function(e){var n=t.getCtx(e);return n?t.subForm[n.id]:void 0},getChildrenRuleList:function(e){var n="object"===X(e),i=n?Ct(e):t.getCtx(e),o=i?i.rule:n?e:r.getRule(e);if(!o)return[];var a,l=[];return(a=i?i.loadChildrenPending():o.children)&&a.forEach(function(e){"object"===X(e)&&(e.field&&l.push(e),l.push.apply(l,oe(r.getChildrenRuleList(e))))}),l},getParentRule:function(e){return("object"===X(e)?Ct(e):t.getCtx(e)).parent.rule},getParentSubRule:function(e){var n="object"===X(e)?Ct(e):t.getCtx(e);if(n){var i=n.getParentGroup();if(i)return i.rule}},getChildrenFormData:function(e,t){return r.getChildrenRuleList(e).reduce(function(e,n){return!0===n.ignore&&!0!==t||(e[n.field]=Gt(n.value)),e},{})},setChildrenFormData:function(e,n,i){var o=r.getChildrenRuleList(e);t.deferSyncValue(function(){o.forEach(function(e){Re(n,e.field)?e.value=n[e.field]:i&&(e.value=void 0)})})},getGlobalEvent:function(e){var t=r.options.globalEvent[e];if(t)return"object"===X(t)&&(t=t.handle),vt(t)},getGlobalData:function(e){return new Promise(function(n,i){var o=r.options.globalData[e];o?"fetch"===o.type?r.fetch(o).then(function(e){n(e)}).catch(i):n(o.data):n(t.fc.loadData[e])})},setGlobalData:function(e,t){r.setData("$globalData."+e,t)},setGlobalVar:function(e,t){r.setData("$var."+e,t)},renderRule:function(e,n,i){var o="object"===X(e)?Ct(e):t.getCtx(e);return o?t.$render.createRuleVnode(o,n,i):void 0},renderChildren:function(e,n,i){var o="object"===X(e)?Ct(e):t.getCtx(e);return o?t.$render.createChildrenVnodes(o,n,i):void 0},nextTick:function(e){t.bus.$once("next-tick",e),t.refresh()},nextRefresh:function(e){t.nextRefresh(),e&&St(e)},deferSyncValue:function(e,n){t.deferSyncValue(e,n)},emit:function(e){for(var n,i=arguments.length,o=new Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];(n=t.vm).emit.apply(n,[e].concat(o))},bus:t.bus,getCurrentFormRule:function(){var e;return null===(e=t.vm.setupState.getGroupInject())||void 0===e?void 0:e.rule},fetch:function(e){return new Promise(function(n,i){e=Ue(e),e=t.loadFetchVar(e),t.beforeFetch(e).then(function(){return Wt(e,t.fc.create.fetch,r).then(function(t){St(function(){return e.onSuccess&&e.onSuccess(t)}),n(t)}).catch(function(t){St(function(){return e.onError&&e.onError(t)}),i(t)})}).catch(function(e){})})},watchFetch:function(e,n,i,o){return t.fc.watchLoadData(function(a,l){var s=Ue(e);s=t.loadFetchVar(s,a),o&&!1===o(s,l)||t.beforeFetch(s).then(function(){return Wt(s,t.fc.create.fetch,r).then(function(e){St(function(){return s.onSuccess&&s.onSuccess(e)}),n&&n(e,l)}).catch(function(e){St(function(){return s.onError&&s.onError(e)}),i&&i(e)})}).catch(function(e){})},null==e.wait?1e3:e.wait)},getData:function(e,n){return t.fc.get?t.fc.get(e,n):t.fc.getLoadData(e,n)},watchData:function(e){return t.fc.watchLoadData(function(t,n){St(function(){return e(t,n)})})},setData:function(e,n,i){return t.fc.setData(e,n,i)},refreshData:function(e){return t.fc.refreshData(e)},t:function(e,n){return t.fc.t(e,n)},getLocale:function(){return t.fc.getLocale()},helper:{tidyFields:n,props:i}};return["on","once","off"].forEach(function(e){r[e]=function(){var n;(n=t.bus)["$".concat(e)].apply(n,arguments)}}),r.changeValue=r.changeField=r.setValue,r}(this))}Ge(ln.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=K(K(K({},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&&St(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&&St(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&&St(function(){return t.options.beforeSubmit(e,{api:t.api})});o&&Oe.Function(o.then)?o.then(n).catch(i):!1===o?i():n()})}}),Ge(ln.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=vt(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,u=o||r||a;if(Oe.Object(e)&&(s=e.inject,u=(e=e.name).prefix||u),u){var c=et("".concat(u,"-").concat(e)),d=function(){var e,n,i;t.vm.emitsOptions&&(t.vm.emitsOptions[c]=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,[c].concat(r)),(n=t.vm).emit.apply(n,["emit-event",c].concat(r)),(i=t.bus).$emit.apply(i,[c].concat(r))};if(d.__emit=!0,s||!1!==l){var f=s||l||t.options.injectEvent;n[e]=Oe.Undef(f)?d:t.inject(i,d,f)}else n[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(),Re(n.value,a[0])&&(r=!0,o=t?t({id:"$form."+a[0]+"_"+n.rule.__fc__.id,getValue:function(){return Dt(n.value,a)}}):Dt(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=It(i),s=St(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={};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(Jt,function t(){e.pageEnd?(e.bus.$off(Jt,t),e.bus.$emit("page-end")):(e.first+=e.limit,e.pageEnd=e.rules.length<=e.first,e.loadRule(),e.refresh())})}})}(ln),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,[])}})}(ln),function(t){Ge(t.prototype,{nextRefresh:function(t){var n=this,i=this.loadedId;e(function(){i===n.loadedId&&(t?t():n.refresh())})},parseRule:function(e){var t=this,n=At(e);return Object.defineProperties(n,{__origin__:bt(e)}),function(e){var t={props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0};Object.keys(t).forEach(function(n){Re(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=vt(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=vt(e.handle))})},syncProp:function(e){var t=this,n=e.rule;Oe.trueArray(n.sync)&&rt([{on:n.sync.reduce(function(e,i){return e["object"===X(i)&&i.event||"update:".concat(i)]=function(e){n.props["object"===X(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=At(r),u=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:u()}),u()&&n.vm.emit("repeat-field",r,n.api);var c=!1,d=!!r.__fc__,f=s.value;if(d)if(f=(l=r.__fc__).defaultValue,l.deleted){if(tn(l))return;l.update(n)}else if(!l.check(n)){if(tn(l))return;e[a]=r=r._clone?r._clone():_t(mt(r)),l=null,c=!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 Zt(n,p,f),n.bindParser(l)}n.parseEmit(l),n.syncProp(l),l.parent=t||null,l.root=e,n.setCtx(l),c||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(t){var n=this,i=function(e){var t=e.rule.control||[];return Oe.Object(t)?[t]:t}(t),o=[],r=this.api;if(!i.length)return!1;for(var a=function(e){var n=i[e],a=n.handle||function(e){return(Mt[n.condition||"=="]||Mt["=="])(e,n.value)};if(!Oe.trueArray(n.rule))return"continue";var l=K(K({},n),{},{valid:St(function(){return a(t.rule.value,r)}),ctrl:en(t,n.rule),isHidden:Oe.String(n.rule[0])});if(l.valid&&l.ctrl||!l.valid&&!l.ctrl&&!l.isHidden)return"continue";o.push(l)},l=0;l<i.length;l++)a(l);if(!o.length)return!1;var s=[],u=!1;return this.deferSyncValue(function(){o.reverse().forEach(function(e){var i=e.isHidden,o=e.valid,a=e.rule,l=e.prepend,c=e.append,d=e.child,f=e.ctrl,p=e.method;if(i)return o?t.ctrlRule.push({__ctrl:!0,children:a,valid:o}):f&&t.ctrlRule.splice(t.ctrlRule.indexOf(f)>>>0,1),void s[o?"push":"unshift"](function(){"disabled"===p||"enabled"===p?n.api.disabled(!o,a):"display"===p||"show"===p?n.api.display(o,a):"required"===p?(a.forEach(function(e){n.api.setEffect(e,"required",o)}),o||n.api.clearValidateState(a)):n.api.hidden(!o,a)});if(o){u=!0;var h={type:"fragment",native:!0,__ctrl:!0,children:a};t.ctrlRule.push(h),n.bus.$once("load-start",function(){l?r.prepend(h,l,d):c||d?r.append(h,c||t.id,d):t.root.splice(t.root.indexOf(t.origin)+1,0,h)})}else{t.ctrlRule.splice(t.ctrlRule.indexOf(f),1);var m=Ct(f);m&&m.rm()}})}),s.length&&(this.loading?s.length&&this.bus.$once("load-end",function(){s.forEach(function(e){return e()})}):s.length&&e(function(){s.forEach(function(e){return e()})})),this.vm.emit("control",t.origin,this.api),this.effect(t,"control"),u},reloadRule:function(e){return this._reloadRule(e)},_reloadRule:function(e){var t=this;e||(e=this.rules);var n=K({},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()}})}(ln),function(t){Ge(t.prototype,{setValue:function(t,n,i,o){var r=this;t.deleted||(t.rule.value=n,this.changeStatus=!0,this.nextRefresh(),this.$render.clearCache(t),this.setFormData(t,i),this.syncValue(),this.valueChange(t,n),this.vm.emit("change",t.field,n,t.origin,this.api,o||!1),this.effect(t,"value"),this.targetHook(t,"value",{value:n}),this.emitEvent("change",t.field,n,{rule:t.origin,api:this.api,setFlag:o||!1}),o&&e(function(){e(function(){e(function(){r.api.clearValidateState(t.id)})})}),this.$manager.fieldChange(t,n,i,o))},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&&Re(o,e)?r[e]=t[e]:Re(n.api.form,e)?n.api.form[e]=t[e]:n.api.top!==n.api&&Re(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),Be(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=n({}),o=this.fields(),r=[];!1!==this.options.appendValue&&Object.keys(this.appendData).reduce(function(t,n){return-1===o.indexOf(n)&&(t[n]=i(e.appendData,n)),t},t),o.reduce(function(t,n){var o=(e.fieldCtx[n]||[]).filter(function(t){return!e.isIgnore(t)})[0];return o||(o=e.fieldCtx[n][0],r.push(n)),t[n]=i(o.rule,"value"),t},t),this.form=t,this.ignoreFields=r,this.syncValue()},isIgnore:function(e){return!0===e.rule.ignore||("hidden"===e.rule.ignore||this.options.ignoreHiddenFields)&&e.hasHidden()},appendValue:function(e){(e.field&&Re(this.appendData,e.field)||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),St(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),nn)!==JSON.stringify(t,nn)},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=St(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)}})}(ln),function(n){Ge(n.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))},getParser:function(e){var t=this.fc.parsers,n=this.fc.renderDriver;if(n){var i=n.parsers||{},o=i[e.originType]||i[dt(e.type)]||i[e.trueType];if(o)return o}return t[e.originType]||t[dt(e.type)]||t[e.trueType]||on},bindParser:function(e){e.setParser(this.getParser(e))},getType:function(e){var t=this.fc.CreateNode.aliasMap,n=t[e]||t[dt(e)]||e;return dt(n)},noWatch:function(e){this.noWatchFn||(this.noWatchFn=e),St(e),this.noWatchFn===e&&(this.noWatchFn=null)},watchCtx:function(n){var r=this;if(ct().filter(function(e){return"_"!==e[0]&&"$"!==e[0]&&-1===rn.indexOf(e)}).forEach(function(t){var a=i(n.rule,t),l="children"===t;n.refRule[t]=a,n.watch.push(o(l?function(){return Oe.Function(a.value)?a.value:oe(a.value||[])}:function(){return a.value},function(i,o){var s=a.value;if(!r.isBreakWatch()){if(l&&!1===n.parser.loadChildren)return r.$render.clearCache(n),void r.nextRefresh();if(r.watching=!0,e(function(){r.targetHook(n,"watch",{key:t,oldValue:o,newValue:s})}),"hidden"===t&&Boolean(s)!==Boolean(o)&&(r.$render.clearCacheAll(),e(function(){r.targetHook(n,"hidden",{value:s})})),"ignore"===t&&n.input||"hidden"===t&&n.input&&("hidden"===n.rule.ignore||r.options.ignoreHiddenFields))r.syncForm();else{if("link"===t)return void n.link();["props","on","deep"].indexOf(t)>-1?(r.parseInjectEvent(n.rule,s||{}),"props"===t&&n.input&&r.setFormData(n,n.parser.toFormValue(n.rule.value,n))):"emit"===t?r.parseEmit(n):["prefix","suffix"].indexOf(t)>-1?s&&r.loadFn(s,n.rule):"type"===t?(n.updateType(),r.bindParser(n)):l&&(Oe.Function(o)&&(o=n.getPending("children",[])),Oe.Function(s)&&(s=n.loadChildrenPending()),r.updateChildren(n,s,o))}r.$render.clearCache(n),r.refresh(),r.watching=!1}},{deep:!l,sync:l}))}),n.refRule.__$title=t(function(){var e=("object"===X(n.rule.title)?n.rule.title.title:n.rule.title)||"";if(e){var t=e.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);t&&(e=r.api.t(t[1]))}return e}),n.refRule.__$info=t(function(){var e=("object"===X(n.rule.info)?n.rule.info.info:n.rule.info)||"";if(e){var t=e.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);t&&(e=r.api.t(t[1]))}return e}),n.refRule.__$validate=t(function(){var e=function(e){var t,i,o=e.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);return o?r.api.t(o[1],{title:null===(t=n.refRule)||void 0===t||null===(i=t.__$title)||void 0===i?void 0:i.value}):e};return se(n.rule.validate).map(function(t){var i=K({},t);if(i.message&&(i.message=e(i.message)),Oe.Function(i.validator)){var o=n;i.validator=function(){for(var e,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=t.validator).call.apply(e,[{that:this,id:o.id,field:o.field,rule:o.rule,api:o.$handle.api}].concat(i))}}if(i.adapter){if("object"===X(i.error)){var a=K({},i.error);Object.keys(a).forEach(function(t){a[t]=e(a[t])}),i.error=a}return r.adapterValidate(i,n)}return i})}),n.input){var a=i(n.rule,"value");n.watch.push(o(function(){return a.value},function(){var e=n.parser.toFormValue(a.value,n);r.isChange(n,e)&&r.setValue(n,a.value,e,!0)}))}this.bus.$once("load-end",function(){var e=n.rule.computed;e&&("object"!==X(e)&&(e={value:e}),Object.keys(e).forEach(function(i){var a=t(function(){var t=e[i];if(t){var o=r.compute(n,t);return(t.linkage||t.linkageVariable)&&o===an?an:o}}),l=function(e){"value"===i?r.onInput(n,e):"$"===i[0]?r.api.setEffect(n.id,i,e):qt(n.rule,i,e)};("value"===i?[void 0,null,""].indexOf(n.rule.value)>-1:a.value!==Dt(n.rule,i))&&l(a.value),n.watch.push(o(a,function(e){e!==an&&setTimeout(function(){l(e)})},{deep:!0}))}))}),this.watchEffect(n)},adapterValidate:function(e,t){var n=this;return this.$manager.adapterValidate({required:e.required,message:e.message,target:e.trigger},function(i,o){if(!1===(e.beforeValidate&&St(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"===X(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&&St(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,(J(o={},t.key,r),J(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=ie(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"===X(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 u=Number(t);if(Number.isNaN(u))return{v:o};if("min"===o&&u<l)return{v:o};if("max"===o&&u>l)return{v:o};if("positive"===o&&u<=0)return{v:o};if("negative"===o&&u>=0)return{v:o};if("integer"===o&&!Number.isInteger(u))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"!==X(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"===X(l))return l.v}},compute:function(e,t){var n,i=this;if("object"===X(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],u=void 0,c=null;if(s.variable)c=JSON.stringify(i.fc.getLoadData(s.variable))||"";else if(s.field)c=Nt(s.field||"");else if(!s.mode)return{v:!0};var d=s.compare;if(d&&(d=Nt(d||"")),u=s.mode?t(s):!!Mt[s.condition]&&(Oe.Function(s.handler)?St(function(){return s.handler(i.api,e.rule)}):St(function(){return new Function("$condition","$val","$form","$scope","$group","$rule","with($form){with($scope){with(this){with($group){ return $condition['".concat(s.condition,"'](").concat(c,", ").concat(d||"$val","); }}}}")).call(i.api.form,Mt,s.value,i.api.top.form,i.api.top===i.api.scope?{}:i.api.scope.form,o&&i.subRuleData[o.id]||{},e.rule)})),r&&u)return{v:!0};r||(a=a&&u)},s=0;s<n.group.length;s++){var u=l(s);if("object"===X(u))return u.v}return!r&&a}(t);return r=!0===t.invert?!r:r,t.linkage?r?St(function(){return i.computeValue(t.linkage,e,o)},void 0):an:t.linkageVariable?r?St(function(){return i.fc.getLoadData(t.linkageVariable)},void 0):an:r}if(Oe.Function(t))n=function(){return t(i.api.form,i.api)};else{var a=e.getParentGroup();n=function(){return i.computeValue(t,e,a)}}return St(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 St(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;ze(this.ctxs,n),ze(this.formData,n),ze(this.subForm,n),ze(this.vm.setupState.ctxInject,n);var a=e.getParentGroup();a&&this.subRuleData[a.id]&&ze(this.subRuleData[a.id],i),e.group&&ze(this.subRuleData,n),o&&this.rmIdCtx(e,i,"field"),r&&this.rmIdCtx(e,r,"name"),o&&!Re(this.fieldCtx,i)&&ze(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}}})}(ln),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[dt("on-"+e)];if(r){var a=vt(r);Oe.Function(a)&&St(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){St(function(){return t(K(K({},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"+tt(t),s=e.parent;s;){var u,c;a(null===(u=s.prop)||void 0===u||null===(c=u.hook)||void 0===c?void 0:c[l],s),s=s.parent}}})}(ln),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,oe(n))}))}),e._used=i},watchEffect:function(e){var t=this,n={required:function(){var t,n;return(Re(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(o(n[i],function(n){t.effect(e,"watch",J({},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 Re(e,"$"+t)?e["$"+t]:Re(e,"effect")&&Re(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 u=s||Object.keys(r).reduce(function(e,t){return"$"===t[0]&&(e[t.substr(1)]=r[t]),e},K({},r.effect||{}));Object.keys(u).forEach(function(e){var s=i.providers[e];if(s&&(!s.input||a)){var c;if(s._c){if(!(s._used.indexOf(l)>-1))return;c=l}else c="*";var d=K({value:u[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 wt(d.getProp(),[e])},d.id=o.id),i.bus.$emit("p:".concat(e,":").concat(c,":").concat(s.input?1:0),t,[d,r,i.api])}})}}})}(ln);var sn=a({name:"fcFragment",inheritAttrs:!1,props:["vnode"],render:function(){return this.vnode}});function un(e,t){var n=e.directives;return n?(Array.isArray(n)||(n=[n]),f(t,n.reduce(function(e,t){return e.concat(function(e){return Object.keys(e).map(function(t){var n=e[t],i=w(t);if(i)return[i,n.value,n.arg,n.modifiers]}).filter(function(e){return!!e})}(t))},[]))):t}function cn(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&&ee(e,t)}(t,dn);var e=ne(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 dn(e){Ge(this,{$handle:e,vm:e.vm,options:{},ref:"fcForm",mergeOptionsRule:{normal:["form","row","info","submitBtn","resetBtn"]}}),this.updateKey(),this.init()}Ge(dn.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=Yt()},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 rt(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 fn={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=K(K({},i),{},{validator:function(){var i=Ct(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(){fn.load.apply(fn,arguments)}},pn={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():qt(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=Ue(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(Ze(function(u,c){if(c&&!1===r.watch)return n._fn[t.id]();if(r.key){e.targetRule=i;var d=u("$globalData."+r.key);if(delete e.targetRule,d){if(s())return;a(d)}}else{var f=e.$handle.loadFetchVar(Ue(r),u,i),p=K(K({headers:{}},f),{},{onSuccess:function(e,t){if(!s()){var n=function(e){return t?e:Re(e,"data")?e.data:e},r=vt(f.parse);Oe.Function(r)?n=r:r&&Oe.String(r)&&(n=function(e){return Dt(e,r)}),a(n(e,i,o))}},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)?f.action(i,o).then(function(e){p.onSuccess(e,!0)}).catch(function(e){p.onError(e)}):St(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(t){var n={name:"loadData",_fn:[],loaded:function(n,i,o){var r=this;this.deleted(n),e(function(){var e=se(n.getValue()),a=[];e.forEach(function(e){if(e&&(e.attr||e.template)){var r=function(r){var a,l;i&&i.__fc__&&(a=i.__fc__.getParentGroup()),null!=(l=e.template?t.$handle.loadStrVar(e.template,r,a?{rule:i,value:t.$handle.subRuleData[a.id]||{}}:null):e.handler&&Oe.Function(e.handler)?e.handler(r,i,o):t.$handle.loadStrVar("{{".concat(e.attr,"}}"),r,a?{rule:i,value:t.$handle.subRuleData[a.id]||{}}:null))&&""!==l||null==e.default||(l=e.default),!1!==e.copy&&(l=Ue(l));var s=e.modify?i:n.getProp();"child"===e.to?s.children?s.children[0]=l:s.children=[l]:qt(s,e.to||"options",l),o.sync(i)},l=t.watchLoadData(function(e){return r(e)});r=Ze(r,e.wait||300),!1!==e.watch?a.push(l):l()}}),r._fn[n.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 n.watch=n.loaded,n},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"===X(l),u=function(o){var r=e.t(s?l.attr:l,s?l.params:null,o),u=s&&l.modify?n:t.getProp();"child"===a?u.children?u.children[0]=r:u.children=[r]:qt(u,a,r),i.sync(n)},c=e.watchLoadData(function(e){return u(e)});u=Ze(u,l.wait||300),!1!==l.watch?r.push(c):c()}}),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:fn},hn={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 mn(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 gn(e){var t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(n){return t}return null}function vn(e){var t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(n){return t}return null}function _n(e,t){if(!t)return null;var n=t.split("."),i=e(n.shift());return n.length?null==i?null:Dt(i,n):i}function bn(e){return _n(mn,e)}function yn(e){return _n(gn,e)}function xn(e){return _n(vn,e)}var wn={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 An(e,t){var n;return 2===arguments.length?t=(n=arguments[1])[e]:n=arguments[2],{id:t,prop:n}}function kn(){return An.apply(void 0,["name"].concat(Array.prototype.slice.call(arguments)))}var Cn=1,Sn={},En=Symbol("defValue");function Tn(i){var r,a,l,f,m,g=J({},sn.name,sn),v={},_={},b={},y={},x=[],w=[],A=[i.extendApi],k=K({},pn),C={create:zt,factory:Pt},S={global:{}},E=!0===i.isMobile,T=n({$mobile:E}),O=function(){var e={};function t(e){this.vm=e.vm,this.handle=e}return Ge(t.prototype,{make:function(e,t,n){return un(t,this.h(e,Tt(t),n))},makeComponent:function(e,t,n){try{return un(t,u(e,Tt(t),n))}catch(i){return u("")}},h:function(e,t,n){var i=(this.vm||s()).appContext.config.isNativeTag(e),o=this.handle.fc.prop.components[e];!o&&i&&delete t.formCreateInject;try{return u(o||(i?e:c(e)),t,n)}catch(r){return u("")}},aliasMap:e}),Ge(t,{aliasMap:e,alias:function(t,n){e[t]=n},use:function(n){Object.keys(n).forEach(function(i){var o=et(i),r=$t(i).toLocaleLowerCase(),a=n[i];t.alias(i,a),[i,o,r].forEach(function(n){t.prototype[n]=function(t,o){return this.make(e[i]||n,t,o)}})})}}),t}(),R={},M={};function D(e){var t=Sn[e];return Array.isArray(t)?t.map(function(e){return e.api()}):t?t.api():void 0}function N(e){x.push(e)}function I(){var e=kn.apply(void 0,arguments);e.id&&e.prop&&(_[e.id]=e.prop)}function F(){var e=kn.apply(void 0,arguments);e.id&&e.prop&&(k[e.id]=Oe.Function(e.prop)?e.prop:K(K({},e.prop),{},{name:e.id}))}function L(e){O.use(e)}function P(){var e=kn.apply(void 0,arguments);if(!e.id||!e.prop)return on;var t=dt(e.id),n=e.prop,i=!0===n.merge?v[t]:void 0;v[t]=Ot(n,i||on),C[t]=Pt(t),n.maker&&Ge(C,n.maker)}function V(e,t){var n;if(Oe.String(e)){if(n=e,void 0===t)return g[n]}else n=e.displayName||e.name,t=e;if(n&&t){var i=dt(n);g[n]=t,g[i]=t,delete O.aliasMap[n],delete O.aliasMap[i],delete v[n],delete v[i],t.formCreateParser&&P(n,t.formCreateParser)}}function j(){return Lt(ie,g,_)}function B(){return sn}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 i=function(e,t){var i=j();return p({data:function(){return n({rule:e,option:t})},render:function(){return h(i,K({ref:"fc"},this.$data))}})}(e,t||{});x.forEach(function(e){St(function(){return e(H,i)})});var o=document.createElement("div");return((null==t?void 0:t.el)||document.body).appendChild(o),i.mount(o).$refs.fc.fapi}function U(e){var t=K({},i);return e?t.inherit={components:g,parsers:v,directives:_,modelFields:b,providers:k,useApps:x,maker:C,formulas:R,loadData:T}:delete t.inherit,Tn(t)}function W(e,t){b[e]=t}function G(e,t){R[e]=t}function $(e,t){var n=y[e]||{},i=n.parsers||{};t.parsers&&Object.keys(t.parsers).forEach(function(e){i[e]=Ot(t.parsers[e],on)}),t.name=e,y[e]=K(K(K({},n),t),{},{parsers:i})}function Q(e){e&&Object.keys(Sn).forEach(function(t){(Array.isArray(Sn[t])?Sn[t]:[Sn[t]]).forEach(function(t){t.bus.$emit("$loadData."+e)})})}function Y(e,t){qt(T,e,t),Q(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 St(function(){return t.apply(void 0,n)})};n._driver=!0,Y(e,n)}function Z(e,t){var n=(e||"").split(".");e=n.shift();var i=n.join(".");if(Re(T,e)||(T[e]=En),T[e]!==En){var o=T[e];return o&&o._driver?o=o(i):n.length&&(o=Dt(o,n)),null==o||""===o?t:o}return t}function ee(e){A.push(e)}function te(e){delete T[e],Q(e)}function ne(e,t){w.push({name:e,callback:t})}function ie(t){var r=this;Ge(this,{id:Cn++,create:H,vm:t,manager:cn(i.manager),parsers:v,providers:k,modelFields:b,formulas:R,isMobile:E,rules:t.props.rule,name:t.props.name||Yt(),inFor:t.props.inFor,prop:{components:g,directives:_},get:null,drivers:y,renderDriver:null,refreshData:Q,loadData:T,CreateNode:O,bus:new ce,unwatch:[],options:d({}),extendApiFn:A,fetchCache:new WeakMap,tmpData:n({})}),w.forEach(function(e){r.bus.$on(e.name,e.callback)}),e(function(){o(r.options,function(){r.$handle.$manager.updateOptions(r.options.value),r.api().refresh()},{deep:!0})}),Ge(t.appContext.components,g),Ge(t.appContext.directives,_),this.$handle=new ln(this),this.name&&(this.inFor?(Sn[this.name]||(Sn[this.name]=[]),Sn[this.name].push(this)):Sn[this.name]=this)}function re(e){Ge(e,{version:i.version,ui:i.ui,isMobile:E,extendApi:ee,getData:Z,setDataDriver:q,setData:Y,removeData:te,refreshData:Q,maker:C,component:V,directive:I,setModelField:W,setFormula:G,setDriver:$,register:F,$vnode:B,parser:P,use:z,factory:U,componentAlias:L,copyRule:yt,copyRules:xt,mergeRule:wt,fetch:Ut,$form:j,parseFn:vt,parseJson:_t,toJson:mt,useApp:N,getApi:D,on:ne})}if(r=i.attrs||{},a=r.key||[],l=r.array||[],f=r.normal||[],lt.push.apply(lt,oe(a)),st.push.apply(st,oe(l)),ut.push.apply(ut,oe(f)),jt([].concat(oe(a),oe(l),oe(f))),Ot(H,M),ie.isMobile=E,Ge(ie.prototype,{init:function(){var e=this;this.isSub()&&this.unwatch.push(o(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"===X(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 St(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 Dt(o.data,n);var r,a=this.fetchCache.get(o);if(a){if(a.status&&(r=Dt(a.data,n)),!a.loading)return r;a.loading=!1,this.fetchCache.set(o,a)}else this.fetchCache.set(o,{status:!1});var l=Ze(function(){u();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)},u=this.watchLoadData(function(e,n){if(n&&!1===o.watch)return u();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&&u(),this.unwatch.push(u),r}},getLocale:function(){var e=this.vm.setupState.top.props.locale;return e&&"object"===X(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=St(function(){return t(e)})),null==i&&n&&"object"===X(n)&&(i=Dt(n,e)),null==i){var o=this.options.value.language||{},r=this.getLocale();null==(i=Dt(o[r]||{},e))&&(i=Dt(wn[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:vt(o.handle);if(r){var a=r(function(){var e;return(e=t.$handle.api).getData.apply(e,arguments)},this.$handle.api);return Dt(a,n)}}},setData:function(e,t,n){n?Y(e,t):(qt(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=Dt(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=Z(e),i=[]}n&&i.length&&(n=Dt(n,i))}return null==n||""===n?t:n},watchLoadData:function(e,n){var i=this,r={},a=function(t){i.get||(i.get=l),St(function(){e(l,t)}),i.get===l&&(i.get=void 0)},l=function(e,l){var s;if("object"===X(e)&&(s=e.getValue,e=e.id),r[e])return r[e].val;var u=t(function(){return s?s():i.getLoadData(e,l)}),c=e.split("."),d=c.shift(),f=c.shift()||"",p=Ze(function(){var t=s?s():i.getLoadData(e,l);r[e]&&((t instanceof Function||Oe.Object(t)||Array.isArray(t))&&t===r[e].val||JSON.stringify(t)!==JSON.stringify(r[e].val))&&(r[e].val=t,a(!0))},n||0),h=o(u,function(e){p()});return i.bus.$on("$loadData."+d,p),f&&i.bus.$on("$loadData."+d+"."+f,p),r[e]={fn:function(){i.bus.$off("$loadData."+d,p),f&&i.bus.$off("$loadData."+d+"."+f,p),h()},val:u.value},u.value};a(!1);var s=function(){Object.keys(r).forEach(function(e){return r[e].fn()}),r={}};return this.unwatch.push(s),s},isSub:function(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions:function(){this.options.value={};var e=K({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},Ue(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=K({},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]=wt(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=Sn[this.name].indexOf(this);Sn[this.name].splice(t,1)}else delete Sn[this.name];w.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)})}}),re(M),Ge(m=M,{create:H,install:function(e,t){S=K(K({},S),t||{});var n="_installedFormCreate_"+i.ui;if(!0!==e[n]){e[n]=!0;var o=function(e){return H(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})};re(o),e.config.globalProperties.$formCreate=o;var r=j();e.component(r.name,r),x.forEach(function(t){St(function(){return t(m,e)})})}}}),q("$cookie",bn),q("$localStorage",yn),q("$sessionStorage",xn),O.use({fragment:"fcFragment"}),i.install&&H.use(i),N(function(e,t){t.mixin({props:["formCreateInject"]})}),P(hn),i.inherit){var ae=i.inherit;ae.components&&Ge(g,ae.components),ae.parsers&&Ge(v,ae.parsers),ae.directives&&Ge(_,ae.directives),ae.modelFields&&Ge(b,ae.modelFields),ae.providers&&Ge(k,ae.providers),ae.useApps&&Ge(x,ae.useApps),ae.maker&&Ge(C,ae.maker),ae.loadData&&Ge(T,ae.loadData),ae.formulas&&Ge(R,ae.formulas)}var le=j();return Ot(le,M),Object.defineProperties(le,{fetch:{get:function(){return M.fetch},set:function(e){M.fetch=e}}}),le.util=M,le}var On,Rn={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"},Mn="datePicker",Dn={name:Mn,maker:["year","month","date","dates","week","datetime","datetimeRange","dateRange","monthRange"].reduce(function(e,t){return e[t]=Pt(Mn,{type:t.toLowerCase()}),e},{}),mergeProp:function(e){var t=e.prop.props;t.valueFormat||(t.valueFormat=Rn[t.type]||Rn.date)}},Nn="hidden",In={name:Nn,maker:J({},Nn,function(e,t){return Pt(Nn)("",e,t)}),render:function(){return[]}},Fn="input",Ln="slider",Pn="timePicker",Vn=[Dn,In,{name:Fn,maker:(On=["password","url","email","text","textarea"].reduce(function(e,t){return e[t]=Pt(Fn,{type:t}),e},{}),On.idate=Pt(Fn,{type:"date"}),On),mergeProp:function(e){var t=e.prop.props;t&&t.autosize&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},{name:Ln,maker:{sliderRange:Pt(Ln,{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:Pn,maker:{time:Pt(Pn,function(e){return e.props.isRange=!1}),timeRange:Pt(Pn,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)?se(e):e}}],jn={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",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 Bn(e,t){var n;Re(e,t)&&(Oe.String(e[t])&&(e[t]=(J(n={},t,e[t]),J(n,"show",!0),n)))}function zn(e){return!1===e}function Hn(e){var t=K({},e);return delete t.children,t}var Un={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){Re(e,t)&&!Oe.Object(e[t])&&(e[t]={show:!!e[t]})}(e,t)}),e},tidyRule:function(e){var t=e.prop;return Bn(t,"title"),Bn(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]=rt([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:K({},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,zn(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,u=s.inline,c=s.col,d=i.wrap.class;delete i.wrap.class,delete i.wrap.title;var f=zn(i.wrap.show)?t:this.$r(rt([i.wrap,{props:K(K({labelWidth:void 0===l?l:$t(l),label:a?i.title.title:void 0},Hn(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"}]),K({default:function(){return t}},a?{label:function(){return n.makeInfo(i,o,e)}}:{}));return!0===u||zn(c)||zn(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||zn(t.show))},makeInfo:function(e,t,n){var i,o,r,a,l=this,s=K({},e.title),u=K({},e.info),c="tooltip"===u.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(!zn(u.show)&&(u.info||u.native)&&!zn(u.icon)){var h={type:u.type||"popover",props:Hn(u),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(u.info&&!Re(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"!==u.align?"unshift":"push"](this.$r(rt([u,h]),J({},s.slot||(c?"default":"reference"),function(){return l.$r({type:"ElIcon",style:"top:2px",key:"".concat(t,"i")},{default:function(){return l.$r({type:!0===u.icon?"icon-warning":u.icon})}},!0)})))}var _=rt([s,{props:Hn(s),key:"".concat(t,"tit"),class:"fc-form-title",type:s.type||"span"}]);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(zn(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),zn(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=K({},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=K({},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])}},Wn={};!function(e){["group","tree","switch","upload","autoComplete","checkbox","cascader","colorPicker","datePicker","frame","inputNumber","radio","rate"].forEach(function(t){e[t]=Pt(t)}),e.auto=e.autoComplete,e.number=e.inputNumber,e.color=e.colorPicker}(Wn),function(e){var t="select",n="multiple";e.selectMultiple=Pt(t,J({},n,!0)),e.selectOne=Pt(t,J({},n,!1))}(Wn),function(e){var t={treeSelected:"selected",treeChecked:"checked"};Object.keys(t).reduce(function(e,n){return e[n]=Pt("tree",{type:t[n]}),e},e)}(Wn),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]=Pt("upload",function(e){return e.props({uploadType:t[n][0],maxLength:t[n][1]})}),e},e),e.uploadImage=e.image,e.uploadFile=e.file}(Wn),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]=Pt("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}(Wn);function Gn(e,t){return Oe.Boolean(e)?e={show:e}:Oe.Undef(e)||Oe.Object(e)||(e={show:t}),e}function $n(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)];se(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=Gn(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=Gn(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)&&St(function(){return n(i,e)}),Oe.Function(t.options.onSubmit)&&St(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)&&St(function(){return i.apply(void 0,[e].concat(n))}),r.apply(void 0,n)})})}}}de(".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;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());if(!1===i.required)e.clearProp(),n.clearValidateState([t.field]);else{var o,r=K({required:!0,validator:function(e,t,n){Oe.empty(t)?n(r.message):n()}},i),a=null===(o=t.__fc__.refRule.__$title)||void 0===o?void 0:o.value;if(r.message){var l=r.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":"不能为空");e.getProp().validate=[r]}n.sync(t)},watch:function(){Qn.load.apply(Qn,arguments)}};function Yn(e){e.componentAlias(jn),Je.forEach(function(t){e.component(t.name,t)}),e.register(Qn),Vn.forEach(function(t){e.parser(t)}),Object.keys(Wn).forEach(function(t){e.maker[t]=Wn[t]}),"undefined"!=typeof window&&window.ElementPlus&&e.useApp(function(e,t){t.use(window.ElementPlus)})}var qn=Tn({ui:"element-ui",version:"3.2.30",manager:Un,extendApi:$n,install:Yn,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}});"undefined"!=typeof window&&(window.formCreate=qn),qn.maker,
  11. /*!
  12. * FormCreate 可视化表单设计器
  13. * @form-create/designer v3.3.1
  14. * (c) 2021-2025 xaboy
  15. * Github https://github.com/xaboy/form-create-designer
  16. * Site https://form-create.com/
  17. * Released under the MIT License.
  18. */
  19. 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-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-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-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-mask{bottom:0;left:0;position:absolute;right:0;top:0;z-index:2}._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,._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-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-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-cell>._fd-drag-tool>._fd-tableCell-drag{min-height:80px}._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-icon{color:#fff;display:flex;height:100%;justify-content:center;margin-top:1px;width:100%}._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}._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 .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,d09GRgABAAAAAFOoAAsAAAAApWAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAARAAAAGA8FUuJY21hcAAAAYgAAAQeAAAKdIfzZw1nbHlmAAAFqAAARj8AAIvcpZc9X2hlYWQAAEvoAAAALwAAADYs4uLZaGhlYQAATBgAAAAeAAAAJAghBRFobXR4AABMOAAAAGQAAAKQqEAAAGxvY2EAAEycAAABSgAAAUr05NDIbWF4cAAATegAAAAfAAAAIAHIAPxuYW1lAABOCAAAAUUAAAJb1Yvg7HBvc3QAAE9QAAAEVQAABukvWosjeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGFRY5zAwMrAwNTJdIaBgaEfQjO+ZjBi5ACKMrAyM2AFAWmuKQwHnjG8mMzc8L+BgYH5DgOQZGBEUcQEAIDyDRt4nO3WZXOVVxiF4TtAoQXq1N3d3VuguLu7u7u7W3CXugs1atTd3YWZNfwLujarH/ojmsyVyXtmMsmcPPezN3AEUNWutGpQZT8V/o6KfX614vDrVal5+PVqFSv8fAxHUoXqQrVUXw114GDloUNw+LmuGqhxnv/zUeGfKZ8nUKeikZ+P8itjGcd4JjCRSUymFlOYyjSmM4OZzGI2c5jLPOazgIUsYjFLWMoylrOClaziUlZzGWuoZC3rWM8GNrKJS7icK9jMFv/NF7OVq9jGdnawk13sZg83chM3cwsXcCu3cTW3cwd3chd3cw/3cg33UZd61Od+GtCQa2lEY5rQlGY0pwUtaUVr2tCWdrSnAx25jk505nq60JVudKcHPelFb/rQl370ZwADGcRghjCUYQxnBDcwklGMZgwXcSFncw7nch7ncxZncCZHcxqn+306luOozfF+v06kDidxMqdwqt/1mlT3/6Ka/2NVqOG3tTr/f9QuX2rs/fdpT5nD8JR5IqPMseqGJw/VC88gqh+eRtQgPJeoYXhCUePwrKIm4alFTYPye5qFJxk1D880ahGebtQyPOeoVXjiUevw7KM24QpQ23APqF24DNQ+3AjqEK4FdQx3gzqFC0Kdwy2hLuGqUNdwX6hbuDTUPdwc6hGuD/UMd4h6hYtEvcNtoj7hSlHfcK+oX7hc1D/cMBoQrhkNDHeNBoULR4PDraMh4erR0HD/aFh4E6Dh4Z2ARoS3AxoZ3hNoVHhjoNHh3YHGhLcIGhtlN2pceLOg8eEdgyaEtw2aGN47aFJ4A6HJ4V2EpoS3Epoa3k9oWnhToelxeJ5nhLcXmhneY2hWeKOh2eHdhuaEtxyaG953aF5486H54R2IFoS3IVoY3otoUXhDosXhXYmWhLcmWhren2hZeJOi5eGdilaEtytaGZQWVwWlxdVBaXFNeAujyqB0uTYoXa4L72i0Pryt0Yag9LoxKL1uCkqvm4PS65ag9Lo1KL1uC0qv24PS646g9LozKL3uCkqvu4PS656g9PpAUHp9MCi9PhQ+TdDDQWn3kaC0+2j4rEGPBaXjx4PS8RNB6fjJoHT8VFA6fjooHT8TlI6fDUrHzwWl4+eD0vHeoHT8QlA6fjEoHb8UlI5fDkrHrwSl431B6fjVoHT8WlA6fj0oHb8RlI7fDJ+jaH9Qmn4rKE2/HZSm3wlK0++GT170XvgMRu+HT2P0QfhcRh+GT2j0UfisRh+HT230Sfj8Rp+GT3L0WfhMR5+HT3f0RficR1+GT3z0VfjsR1+HbwHom/B9AH0b5cTTd+E7Avo+fFtAP4TvDejH8A0C/RS+S6Cfw7cK9Ev4foF+Dd800G/hOwf6PcodUH+E7yHozyh3R/0V5f6ov6PcK3UgfF/hYGVQ4x/aBF6zAAB4nL29B4AcZd04PM8zOzvb++zs3m2f292re7f9cj3JHcml3QVISCGdllBTJKE3RUWaQhBeJYBgAJUmBKICShH/Ypf64serFBHUV1BBEbPD9/s9M3u3e8klp3+/7+6ZZ56+M0/71ec3nIGDP/4S+k8uyWW5AW6c45KiUUlk6CAplcEVCxmixBMOIrl9EZKP5wZIPxGNJJ7z+4yQkSqUxEKpl2C0jSRSyXQqIRKjkxj9WgsFumStSbT5nQY+JLiIx+EN58LqeCQbDmcj5H6I7HGpD5IdVpfLql4JPty/Z9U8utXqyXvU/zXTEG83b7CZiddzYphafQHbWtlFvA5xBdQHV3lTu391j4u86/K7wH3dir5rldUDDZjsG8x2PkywgTy+soXjPn6fv5L+leM5kbNyTs7LyVwjF+UULs1xRFKKsiLlef2e1O8kLylxuJJ4xaU4Pf/DR84++2fo0Q3oq7uHhtT3hoZobGio8hu6vnIr/evf/z60U73/ww9nn/0IeuQH519//fVfHeKM8AwfGebSF+B5bFyAa+bauS6OK0MnS1kf9G0xWyBS3K0kUkV3oZQXcn4YBNbLLC4r7nwaHmRHPzm9v1+9rp//fKXbE2xqCtJX0P8req/97Gev/fWvO/r7+vrphrHKA5DZFGx6RGlQlwcVJUi+1qCMqee1ngPPAHPh41f4R/kI5+LCXIRrhX7IRYjPQRLpVDpVKJfKJRlmAswDmAUwL7zlbClK/GLW2ElS5Lsrblyx4sYHFi9o7+hoX7B45bydRx2186pdRx21a3UwEPgoEAgE/xHkIytuuv/GFR1tCxc9uAhKjmCRkZFdV+08Sm1jxZjHnuV9/gn6OoyLwjVhv+CzwPs7cDpmCPTAAMkL8YQR0vzQZSVISQkwESEOXQQxPtE22to62lb5c9toGzjqrPw5WSwmqRP8yo+j62KxdVH6GpRQx7US5H6oMVxMquNYjtyfLI7F1HNjMXJ5DPqHsrXyBVrhPPBMnJn4fTDTYQWUzSRDBqhfqE2BhZGjObLMalW/bov5raRHfUY0Gh0+n3q5lmqNySzVKsfoexjFknIM0kiP6PM5BcE0JRVqaOMEz3ElfZL1TQ83NsO+iZJBkpfdopIuOonSSSQIucvJnD8MyX5YsQkYRljKxUKJ/r15pBmc6tHu5E+qR8lmFfIn8NVh8dijxQ6TqUssis1wdZlM5EKHJ0AMfIkItER53u+lTzQPN6t7wQNHVoE3lFXUvayVVUp2mfD44/B+T5tMd5xrMJx7BzTRZ4IV/Q7hYUnQudT4jsPLcXZtnfI2zgez4ChuHncMdyy3ntvAnc6dwZ3Lncd9esrb00O/fToXoWGiFAspRc/phUWuF6d5L06cLJs42UKxNlLOZ9lyzGKkl0wX4VsaMo2NmQZ1rq8p5IQweUyd64RRJI/BkN+OiUM+pzoXIo5czptsdLkak95HY+/E0N2C7vp4LBY/PgZ/qzFEd0Ir6lzwsCR5DBqfaIE85vS9gMm5HEbxl4acoSYfeQxbrvwMG/kMenfGav70Na71Z3Xf47ywj+E/cSvsfwcfOPA2XnTDJXddQpeht0FL4QPVvfMV/go+BTtlkStxgzADJ0eFjUYYd402UsznSv1E63JI0rscAAiOkAyDUYLh8eOwxIni8+dKhVTCKGvbHMIWbduLu+NJGBFoAEYE6kq1ET4WzoZC2bCiuCTJVfke+oqipZ08HPWTa/3RYfVqsrcQaY9G2yNOfzTqV89Cn1wC6dvUpwIvByYcXRPKht6Ga9jvfNvpZ96wnjT4HNZ67in1T3CHxk6Ehp5mDfX5oyPqmy8HhAC4E7QbbBATfS0DdO2EPayP6+dGuQXccoQw0Ccim6BSfGIaQt9RnMlUibvxvbW5K9bOR2naCOXUl+xeCj3for5UnWH06GpI3UtWqW+RBpgw/xM7JTbFkTeG3Hb1lw7fbDbbWnDCkhYMV+7FFvjA7MoWeLCjHb5rcC59ecJjc+pl/my+GaCYxBVgjXKkFkyIiCQgfsAnHFTyyX74R1gy+Q9IBuVTCGSKMDNwNftEo2ikYbYtL2d7M2wcR8HeMXLhhsLKoZPyKadHCjXGI0ooJjfYnYUNFw0XsvNai/PO+8K580st87voGW3zj8P9/7j5bX/NjeTAkXuK6y8a+cxla8Zb/Gab0yeHIkqyrS2bK5Wh2WJFVDLDo+vWL7xwwYILF65fNzqc4RomxhAxBB8Xg1EswKyfzS3llsE4buQ2cWdyZ3Hncxdwn+Wu4G7gvsjdzt3B3c89wD2Ga6F+LiMOka6dvskjFThyC7Ugr5dOZtSGxdoaddW9tZHaKuRrvnDYpx6QwmHpg7feusFSsICjyzCuHsA8SN1tyVvAqe8fqiyJWdot4K6r3jos4K6zfM8C7jrLdy3g6vN4W7VtYpDCs6sNff6Qqepvqj9JDL7wUPVZPm9R77FYyDEW7Qc09wWt/S9ov6a+aSlbJhzDw7QxruIaPdzwDGEqAgc3AwHuQlxDltqIGzEzbe4fFpBWKhH4I7bSqhK4a69dtiw5lEwO8ba6CuDNBsg5Ue1TEfV+qDUeKa4+bXWRXNmn/jE5uGgwWbPfeBkW26zP1Dnckhm+DWxFMwR3h3+vc+nLleZVSfg7D73z0TvCW907tD9Z88fVwSp8n+6ZjokoG/1RIqbSooOmM3SA+GXRGIF7uZQhxsM++M/KljSgh4VYrzXTF0nlhOb5ixpuFMzBRCIgGBsLmSO8xA5HathKyo72V8MtDpOlb8ncqCs8x50Ims1Bd0PG0VClO3jcKZNcistxeYCfQ9wi2Em2HQqToQe9H5kWVamLEIbwsPkITVVBbhUOa3CZXg9IBcMyqkACsZYqguFTPxF7O4ZuD3Nr0VE3FoVqzyCEaOxofOYZhyQ5noFKUxGWOpwHG1QfRLzmvFg8HjsPIQdpx4LPQCOIuzwDFWf7HNXmuJq+qq7LLMDPAYCfx3Gr/431ySZwNSJDDnQFRKAjZL/PyfB2IFlzApBUR1i24Ugk/HYkHI7cjqGcyTRoCrjRUz99zz0zXb7V++7wo5HIo2GTKWgaMrkD5kGzr6+K4/NJRhvGYK5MoQtLuahGbcCDa8S6mYhlsjVGfxWLVZIx8k+bYv+Uzaaeb7bdavE5jSRILeR29VrvOeTMUex9+jOb7XK7YlMvMPFxanR4rXc5zGRYvf6SIDkDf16A/v8L/zneziWg1xfDLnIcYIsIj8qlKC0DNCrnNegEz9BJRGMqjSCKTEJ5WIdTQXwNgE9PoHz/Zffe6XAY/vlTl02wey2md12uj37giPBe8om2pf1xv08JNTWG/HKoIRlSvHJ8YLy93DLUNrpiQdtQS/eCtoH29oE28obXrj68CtCGGzYTq81DPQ71NbNTOMdkvuE0k9MtkIvtXtKa6F/aVi5m2hIx2et0euVYor2jWIafSaitqdzYMR2L2tsXdRwzlvtOtA0b1vpBm4c4Fgqs2EVTR0NH2w63bIUBIvtz5QESoYDaJNKwF4kOoBvfi5HfxGIqjMcsfWVpCJeGvFXuxcWDWJev8n96rx7JrS4ZnC67kQrzbhxOdBdCoiwZi7ii6EsMyZsLDUxSArM12kCjQv6yiWycP2oUqdnpMm7YkI1GuqxGewDoAI2efFOHG22Aq+a58kxXmFvxTrkOv3r+cfbZN4+P78xmx3K5zIIF9E2kE7fodOINSCfmEuoWVv6GRG6tuoNcWX8dDBvS8LwzhnCC5EPWVAGI3cNDg8oqpHnIQMB6i8VyizVwpIU9++IX7XbTqcaA8VSTXV8/r/B7gU7ywfrNcb3cfHxKXBcMvT2Yq4LhAqaKOt8lg9u2nDBqC4Uv+WUlQ4BuUAYI5bZvXNfd09O9buNb1cD2dXesXXvHd48e7+zq6hw/ej3jfyxnTJB0d/eS7u70yY/0Ls1fccMV+aW9j/CpusosMLL2jsfvWIuVv4etdLeNLkPsG7yh8lgZnPorsv7Y7r6+7mPXcxM8kX76GFsbnBdXhZutCnfh6T2kb88e9ek99FH0McbG7XV6Eh/hkD6ycH7okUnKr3a3pqHRtr42cA34MvSFCIbbnu1Sg11d5HddUJ+w/l0H/dvA+pX4HbSTwHaEqDKuLYr8R8rJLtLiJJE218+Bavu5JRTyiSYL0DZ8yq2+5GqLEOcvKjcjHUc3/cJiEn2hEOS6tfZ/ycaPzS6gUzXmG7I7M8TBA05By0DDDkKe6OAB1eD9MsT59bhm/we9K/JX33T5sVLXadf81yXjotsuOCRiWvtf3773sv7ACbft/8agxKe0oiFfzyzr4ou/eN3pBc/Rly7mbT5C/M41e04K9F36wCNfWu+Ye9SVABR51t+30//DmaC/XfBcfL4cl/O8wnvzXuLOu8ll/9zeS7y92z86t/1kw8nEcRr9QWXbHV+l16qnk6j6GvlCZRu9mtPGC9raTr/PwnYuCP2YYmupABjJbNjxOW8tceGuQy/+jZyrOo/vBKfsUMAR//Qx+v1OdV0mQ27rrDyqwB8dPnycw544wrss4VYB1nDy4d7pP5tzVWcG/jqVEQXcDzMQ68wcMpLphKgW+Vdf/KCOME3bD/XvHa+N1GGU8fp3+F0nOGif3dV1yscKOHKbdp983PrH0MbEcNCz1O8P7loQelUn/UxnZ2VXp0JvVZTK+oO6ojpft9FfHX6+TlCw7jo6+t/IuSa7KZfblNV84shtzE04iFUzwKevZH+dBadepd3J9sPHGWyAd3mdPszgVwfgtcfNEII5iCiVylLenZwqDgC4kB9AQQwCFxF206KCRA/AjWWp2Slwld2p2cnk7BQ9tbIbttMIPRX8ytuulD/dkCH3BuLxwGtyPC5/It1Jmom/TXJZ/a32ILlrp2mBPdBB90Fd9V6tDXI03Oe2RdR7sSVydKTtRJds7LDKr5OG7risvoUNkQY5viDfEg57mz1WVwgQFMWTdTQMtuhz43f6+49zx88U2wBUU/LlIVZQECzmc2XZqCQQkDIWk5IoYhR24ZwsAkTx6RxIftVhukAdSnkJNbkiZxTmLyl3Son8rFi/nNv0yaVDMakh3NCUGbC1OIOkwRfwHKETvnqyycpbM5GTZp8x5GpslOXMJ49ffNJIJNgaaioHXGFvW9ptcLgZrf44/0d+LtCBLdwIt4xbw23lzucu4j6n8walCd6g3hfxif7JFrXeULJpTezmzlfFbwibUGAE84HXIBZyjqAHkHMk5st5OV9WpHypPECLhVSa8Sh0dAOmTBsppmWlnMtr0bRSpF9WV7B3u0tdofUgPVV7d0z1I4e0qQn9G52S5GxtRX8MJ5L6KE6AdemjUs5RV/Pq+QMJi12yeV02h9VtcclBp8liMnoTu4PZH3oFs8VmttsDdJ/el3OrfVvt67la7/5cikoVB3jg6F/AU38Xl1+Dn5Nfl+NLHm5tffhhQojTb3cGDYIU8NooPVmwuW2EdPXNHSNWF4RIS5WH/b/8NbyXawS6cgAw+hO4M2AEzoP+v4ZBexnQRDnO1piDpuNGhteXGAmNbFsgQkgZ5Qpx6EBAwkUFxSlFcOV4lIhKJ1GcREkPkniOoXtOgtSQtjbbCJRCRp4f6aJUWmRjkmO4n3fKqCHGSu70Rnh4i3zrLETtK3cgZd3T8tOf2jyQTE+weqnLpn4vkeVjgtAndMAlkB7DYiFrsI/ahU5hsUAMbR6LlTdQg9FgMFucIad7oyBsyHZZzTbpf6WWH7Z1WS1Gk+1Ktyy71RfRJ43q+8TGe0PSp+EHZrWquxhPmOAj0PUtPXPctsqXrV6eQK9eBSX4nPKUkBLuEcClBP5l0dDSYhBf5oPOVoeBJ7xBEBwt7oCRF14WLuskBqPbbu4bOi4lGPyQ/YDsXucKBFzr3HJ5NtvrAbd7AnCvg3lZYwDHT/+Pc7TqJEDJAQKDyFDIQQKkWhlliciFRlkiotP1ssQx3nzg7+ub0+nmT6abm9OXYWgsdlE0elFM/b25wXLjjaLbaeVF4+rVZoPAp9rmt1XeAw8cdYE3UkhW3ksWCknqSha+NfI0NlK91DOjsVh0uYU3nXuewIt2t9M4Oir6rRzSbTU00FxuGPbRpbCPzBSOMOLCLzOYgT4jOVJpBegOnJM1wFmqjRxeNrjNHI1JUixqni/KDbI4vz56R4ysB2L31lj1fgSa6qdOm6kx0WC2O212u81pNzckGk02p9XhsJ6BPIwrdLGWjhd/lb7DhbhZTL6C71RlyLI3imvUVB4WLmyNss6tVeJHzlS0zF4CVJfqjpjHTE6z2WkaM0cSEVPld1qMBk2R5z1hMylocfXH5rASwZvDDA6SI7+CujSmZVd+g7XN87TYPHOEvuN2mp1wOTweBws4gTxxO01OD1zuiYD68kT2RAVtLrzC/+Sg9fIfWCW8klnS0bEkoxozizPgiFr5uHnWrGZKwK8cw/MHKusnZv3M5zan893v1mWRJqCSJS6OOKJbIXhNi69+IZulv83lKvdo2Bdp13Ay3qbLLS/LqjuyWXJltnpndOrHH/Hfox/C/EDOBm7GEeKgqUmCUef/yYTtvAOaGDNerIaQy0W9gtV0hVEQ7G6POOYLSWOWsM9yhcWpXubwmV0el5k+ZXZ5nRag9OiHhIpXiB4ICsZx9dOMCXrOuMUXtnzWSiq8zwlFzeBuu027P2UHkk+fy9Ave3V+U2gK1iww8WAyLeQAhLuvuZ6suv56de/1vBwtj6bVswj5vNQcdfO23ZAImbufUXekR8tRspK4o80SuVLri1f478Fc6dRmSD1HojipzsN4eIx9x4RzMB9Q3QchlAydRzoJk+WWaMO2TRoTYdNvN67vnuVznIlvu9BcKhx97HeWLGptN2Y7x5audUiS0eHbbbdZGux3WR2+KQyI7YwMXrtoQXOLrZAbP/rRsSUdGV/Y9zWf4zclIdhoE/p5r/VDZA2zPnqF/wW8Q4BLwN7HeTV0KT8FXwqSNJM9wzimGEI0sSdIOOz9ZGJtw2s/291MrB+oBm2+k49gsu+Fud5Nn5zV6/DtsOAwWXbAM+7QRmyHj7yjXpMsjFTnOs79d8m2DwvJVauSBXWLz7EDZ4VlB3YH1IcJsoM9vj73H9PHGGmZMM796ed8sroqXDo5cr42+dVgLkffggWxc+qk362tBm28P+Cf5gn8So7jkvkSsr9SCSdxI9dFcqfB9wFyIkyZ+SUNFxEV6jdaxSssvpBlTAr5xi0hnPTqF5w+i9OLcx66xGUX/kxNV2DWGNmFPHz1M2NY4wrLAZ/jKa3vbr0VeZFP2XyMbeSdgF92TuYygIUNcgsBE1vBreRO5D7JfZ67mdvDfY37OvcIt597GvFiJhln4owWouFnpSJfFXToOVXmKwo6cIdD9F+oBWB1FG55QggAGyCvkRDpFHKzgdLQEOkcbhZp3BoSmIobB3SfTn4MwipIJWcmoOevnJSn05cqW9x2utzhSxyB7XtrkKwKBtW9QfJYcFMQ3KZgIBBsiqbSEU/Q7SS83SoGPNFUKuoJON1Gg9selEwOoyhaATrYbbdbbTYWEu3qPcF7AoF7grU+GXqn+rPvvMO0B+i+OqmMzkauimVODwTx54OBXHBTILApqF7Y3NfitNoJtYkGZ3N/MwAnweAwuzIW3iiYRDNx+hx2v91itxosC4PwtxBrL0AP5oBV42fxSS7CRbk2rp3rBvg9wt3Gvcq9xb1b1SY5WG9HX+T1aMq0PZ8sIfKN/HeY+wNsCBkhCThChMgS7H6SA1IcMKmgHA49TIEUqjIanfpGB+Ofwnu6mCqUiwME20F9qbIsSn7YTMSsiIsoy2QbElNwwI01Wy7ijlrOlpHjnIXnhtrprL7ZyjjhcJJN8Hjp11qQA66o2xEH2rdPw4zcMbIY8KUHY7FfMIeqazGy1Ra2AEJvtVuNBmoJ25odNoFQj506JcrzVHJSu4cSweZotoetRBBsdhsQBtawPYUFjR73ZEG3x4gF5zYZUiFCKQmlDHFiFOW0LIqKIRnGtHDSoBhNUtoviqVoe3t/e3vE4nBIDgff1Dzc8oMfKDl4bJeSnY2o3HvwGvehuO9+RNGYd4XIw+MaTCaDgZp5oyxGnFQw2n2USg7eHYen8VFCJLtgpM6IKIsGeGYsLRCLQfRjaVcY6Dd4WpfigkeHcNjJOyOmiI9YbaE2A7EF7MTQGrZZiZcYBbdbEL3VnKANSKAQ5hgFp1MwjrQPoHgn55CcTsmB+zHDH39Xj4sQfdeN106zOr4VST73HJGee049RqG/TCQqGaV6p1+pPEqHK48mFCVBP6skEsqE7t4v6fc5s65PAr+BRKYCxGVyIkTqfmLzFin6XJS0b/bDTQ0neFMiceDDBE1F/eo1ZKs/ugfI4veoS4rCr8HfBHz8ni57KM9U7sDEimXkpOjqgIV62F7u6SmvRzHDunWTYgb1GUvIsu01RIU+suCGPwPBgvqQxbLtdUSG/mGBGqGqTEd7ZsRhUQo1M+yVZ2wNKwEfyDQNCk9goJO4Z0G9+56xlsdbxu7ZNo+fdwRE9WK1b9s28rT6+2eeYbyC9/gH+CEms2/hWrkS9Ohcbh23k7t4ZjJ7xLC9tRLneG2Er+fcwS6ULyoM7Sqk8hqYKZXzEgNNip8xv1JidefgPTpl+m6spyMQ6OiJUXfl3VQBthK3RptaD3zwLE4/ksGp+G52FuxikXLIZ4sVXE7nL260ZDvckfKzHX2FDjlto8loxtxhW5Ef6Ck2JuKz4nHeCs2rChC+gfbeKHk12tseHCkmVYUpyb6aLF40QgaULYnEFkXz1U8O5pOphnzA5k963C3+lmAs6okvyfeumuXzCu197cesGR0ZTzX1KoneJOPFwIS9kLccxNedj5LWOu60PLMIYTQt8SM9a9U38DIqOtLFkfej0fcjg5F90ei+yLzIGdHoGZE5mm6guscANBZPvIJZloW//9PgsxpsZuFMcq56OX0qEo1G9qHCzkMTIXq0yWIxVZbZZLPFSk+u3GSxUCrIsMn0T8zn7+jz+UTuqhnqr7CV6qAIKgDLYIiIKOUZRwpwch4BFTLtkGCXcTYMEhHBEorjUQ+g5M0xuTuEcRlDY5If6lVxGiRyEMGBmROa1I8+iKfxWpMs8cTocAF9abHbrDZqFIpWF3XbhofEjpBBKZp4myyJot1tchj65lphV7YtdfJef6DL7IZ3MjmNdq8502mmxGs3uszJJjNLybabKPEcYfkNNAbTJqeFmBwmW8DvaxEliTisgs2jHginCOUzCZtktEpWn8v6ASEOi2Bzk1mW2aGY+rzZ1N5u5wnxNJpLZZPV6PDwjq4uPaUnz1I4zqPrV8SPKC86hduhU2CHxB/5aSFD3Xqvm8TlusVfh6fU5myNkwsB6F8ap6tjF8XjF8U+jpEL43H10lj1/msEq5XvQxYUuBUjt8bvisXuihOmRkyfrmr+qh/oPioKbIvtj4FTb8K04ycikHV8/JFY7JG4Pnff47/EWzmXrqd0qLMAuF0xTY8aCFLHKnJs2X/qqftfXLOqUCoVVq05bfXiRXg6YNHifdWA+maczIFHexy2mVP3v7B/S6m4cs3Lx68qlmZ3tC9csm/xwvZMpn3h4n1LFrZ3qM/jU07qIOPaqo5fskY/iKt7ijocMVmz+oQ4MnLZuiMTcmcYgXxthJyQIOFEQn0j8UGCFwHw/iNBX4f5qj6FM7egujsTJtIP1N6bCHqvQo9P4UZ7NQZJ5df6HI+PqE1Kni8kyTZsrNoo3rkq/+bbde+TY9T5jN5E1rYQbQPJswjTvmX6YhsVElIU9U3lA0V7AYW+gTv607Ds/wYEWdjnu0gn5XyHfvT7fA71DcbACDN18zc0+hdjup7Dy/xd+rOHAG+aNVXaeIiTK24CxGW8yu2GrQ2xDdyzdhd/VARHv4Ei+WfR+87Xv1Z5ldLPiGazWNllE75oMHzRYOJTRfXkQoHcVAQ06GQpGpXITaiH/WlyTuUNnl9gMSZF8wJR4E/nrfxpPNVlo4/Txw7SJ/vXz5b00kOH+eh0fGKAyJUHCkX4KzxXd6OPtuqDAXfSp59AeZoB175kcbCoflgsElNx6p3xyN+nf2A8BNSlQHwSz+0g9y/L9E1qdCuEiRA/wzSybkF7f1tbfzu5cgH4EP7wiAn0iQgjDKLaTb0Vdaja2qLaDaIa2aDduAl8uHZMZigHrOGIHanPya+gz5Iz7mcdbv8S5rMLsL1RbjPDnjWRGOptFdjeZ6xufrDQStXtL0NQX7tasFhmTPXaMiX5CPm0bfvG9Vu3rt/4203rtm1bt2nb4iuLzbLPJzcXr/wSBP2S5IcgKTl8eiFCpUZPTb7PMX0Wn2oIHnfKccEG/TbSIHskTwQuuaEmqD7hcxS0UgXB7qa+0GSJsO/tw2VqOkEfvw97sw160oy8ViDfiSymy/Sc+9X2++nJ9624bwWG275JT7r/uPuOm6BX7oJV2gqYP9IryGBU8srkuPeTAYpToyjVz42knPWLxJjOpsqkRF6xe4jHTp5BYpS8p2QJsshNKGRwtaCKWQs9SZZlFT2ZfMlP3yfeBo9Gt2aVH5icJrPLRH+gyyOQiHXoxQGd/JKs46r76O8PiTfU4wnuaSN15GS5FtrcHKMvAUhviU3cySKAjg/FyM9jRITQP2JPMyD+ewb6T0cKm4xWwfwnY+qHUMMUm7LXtXEZpmO8DHGZmawvoogKkFMK4IyCUsxrIkwR5qrIxMJMWFmECa8gidIG9EpO0MTuZcYukxXkFuMS8THUIG887BpVg8e4cktLSwuhUIQ4Tzmz1W21Gq1uj8XZ6PTM6naanE6rLWAOOnLdTuJqSOe6Y6G2WY1O0sWb7UGbX3TGsnZR6DQeYYmrP8m88cbylSuXvxFwttjgVRqbXQGBP6HfYJLcoqHNGDHndwUGu3tj4ZTkd1idVou0OOU2eZJsfr7E74A9oQ0ovxVMgoD/g+x8hqZwAch1mvHJO4kbeUx+XNGoUYwIPOTyjAeF61x0s4I87AHIXkJ2lMZeShlFGvEo7QPzmpIes5UIDnfD2od4h2Pf+qDbYSTEZnLHm48a6ErajC6Tdda8oflWYo2aj77pC0dnnMQ6f2heT/Nyg02QDcSw02Az/BLufsFm4GPupqBiEwmxmtSzDd5AOHLmAmowLDwzEg74DORKk4UQItqUhmabcbklGwoYifrNSMpy/NyB5V0thIwRIRjKqp84GRr0QsNXC8Twe7hDXYOmiwfzbT+dBzCI87LTkLKZaMquBDa7S8xGwe2XTWQFWWHy+11Go0m9wq7YyD9NftllFE3qXZBhNLr8fsyw6zxyaPM7NArYkQUgG0K1xQjTRMWb92pz0107Nx2kbnIeZm4mJiYmsZ8lzTlt/qkjyVSanPzZ68oBB9A7smw3R9ySvGih1+bzWW22hGfuQi/ZkijOXtjW1LNI8ZFBo8U93Nw622MWB0ykeYBk1F9u27lzG8nEvCW3VTQlC36nz2D41LhgCclmoUdssc69NXrs6FhbMhcKSTZv+aS83yZndRj4Cv0NF+A6uB52firHgILPWOXXaFCH4dwO6otoqsR0UnljUle05uAVLRyzdLR/1tzhWQOj43eMjw7MGp47q3906TGDc/pP7us/pW/O+bP7T+nvO7l/ziCT7R2/ONOxJNOIBxlL6NHfNMW6i+edfG6pO64o8e7SuSefV+yONY00Niw/YfkJxzWEQg3HQWB5Q+M2Vpt5I3pt8PR3+z7s6yHASEa1lYNsVo12hVeSjSJjuSM8LJSiRMtEjgeUY4xeeHOtOySfmEZFcoKbCwSTpZysSfHSgDuSZG54ObzO7IHu3nIu2zNn/ujR46P9PcPr/jvrkeClAq2OrsDcZMeSjuhnjx1f0NczJ5NthI6YM+Tx9XapBywhCz1HF+5VPmOhV+bazym2bYK3lKVULtMQbopDZ+QHdx/b5WgNQIOSJxuKQsel5v6d9VOhf35XJt2O3UF77AGLpfJpo8djFwSR7rKEdRn1d9g4pwFeHG6UUYV+4vxc7QBTSR/Tnn4Y06XzYUzn9PQtGD82MdDZoI3Bko7qCDZMO4KPNHQOJDKHGLCJdXclzej4vHbmjavTk1Mm1WF15SIpTw6V9qXsKVlwV+HxrVPwsNbKBQvoagycgkkY68h+mAUX9n2IKeANvUIaamMTesb306c5J9Mj1ISUsJ9qB0iFCdh1Y9Dzrse2gufJck/wwDtBD33CEyR/u90TtK+gQU+fol7tbmhwk20cwkjAU84+xPmSmeOghxY91NHAr2l4hzqgq7g/qQ4w9YYnAUVRyzGyEKD6vljs2Xj8WYDdQSDsf3cktYgzEQV4QGOsawRxVZf31xNjFoe9JAO7yQJuCbeW2zhFNzJ+iLHyTqsVOdPRvqpzQyazoZPc4W1s9G5E79ijjvoCpEC6+sfMxgy4T2LyBl9jo++Yo46iRQxs0EuSkzQ105D3bUx52xvq/zEx6yqo52h3lswK9P2YmGpjOt7+dcZvi8Lb9x56HEmcsVTjSOWkmRSvV19o5WoOi/F2jfxVo9qdnKY+z2jgdqCZN72MwZcZHXyxegtL38BiB3O2Kj9GEjvse9QXkpgMGAKatkCVj/EUH2NzMF+jxXM6d8FM+YVTB6L+kJdQOzXrNJSTR6jJNx0GaTst3tkZ3xPPZOJ79pjsdtMes92uxpQVyoQjr8Y6O2N7WDnMNWM5PoY98je9eyw64+9vjPFnSRa2ZuJFrFWMZ3ps5iI2XDTbbKgArH6I/jyWx0r1aHlYSqcffqnzWufOrOfQugeDQRjLsPPqksKYWpqxEz5/GAMSD/+v02czCQaz5HVi0Czwouw9Al+z8qTNJgpWk0JaFa/VDkirVVTUFxVP9bzI+/zTuq0DPCl+NHsPOiOOsZQhyBkGGAKvUCz55QGa1LWY6gSMfCra0xGYTkaybe5Ab2fLVTdfEIotaFqWaU4vvLE/uOFi9a2G9mCwvSHd3Z22e70NXi9vC7b3xNSUbjjjFfBQJpBiuPYryeIbwUD7aXPnOdYvOK47FLbN88Q7557YfX1De7492L2kexDbaPDqZ2S+WMP3Ch9RC2KouKcIjoxpdzU5MkIfLVTeKxSoq1C9bznwEMdVz+Dsrm9/ek34NLT/YAGbLZBXtOavnLZ1bb+5Fto269ZjgP6rcrpQaqhxu6qaG3/Zg7ysPeTRPRhQJWh3D1yfifrVVf4ojkLUT/b6o3sOPMQvwvaRjn6TfwD2hjDbyxjDX8xQJpKOoGaiXD3lwhBtTAbcqMyyAB/FlDTpVI7fuCyUdffNG27YHvFLvePj4dWdq9u2nrUsHG4h21u3bz82EmvdUVNsR1iSesfGIqs7yYtK3Jxr7oo2m+XgjvD4eI8kRY7vPL41HDl269ZWsr0tFj12+/aWHXXFxsZ7fT4oNgG3v0O+UnM+qAoZz2ymB5qbK4ZmchtTCPOw/vwZGys754D+DDFpW5nr5ka4o5iNiQ0AyfC8PeyNXmUCQwKkVzhMjPx/UPKXY1KyNSkxj+yti4z7m9qa/MyrfOU/WYy+JOnJku6mBtXr/+9L6Pjfz8nP68bhX+jv56Z/m9rIxUd8kiqOdiuzodEMe+Ji7iRuJ/c57kvazoh6P3TygHMvEaeAMCVZewx6wvJIfaGDW6KHbokcsaWbUEca9Wbu1Y9H30fuRc2Z+xiG8BXdNsy92rHre+9FdSj01CV19TBQX1GvMLUeb0Ndnfsm6mhHqFmd+3RTHvfBQ+Bz1Gepe1j5quoPa6G2pl4Dfg/r1+Rwmk2eV4CmQ90Chetk5xqXsXV5PvdZGJk7uQen0TfwitqhYKaGk045ia4WDwWSyCHRktNlRdIzoFJSkXRxJpZStFSW49W06mUpDzkCRvJFJuXES5Tyep24xpJJ6KUB4KfFieYHJ+5QikYnjlT+tqr0ULYSh8/roHaf5CTW3k9bk3GT0NXj4iUbsfM2n8HV0yWIiaaffpcXeUe+0yYMWivq47YBwZ7JOyCNkMcJFXj7vHl2XqAP2jrzDoOR/y6xDqo3QAJ5nIoUMp8VBmxQ0GiwlbrIYvxNO6/9ps/rS6fvc83KGuBnLLxN+r4B8qxNCRGe41CqFpWLCF9KKQaSTHUbiCnI2z0GIekTTK0ZsznTahJ8KYPBY/+JJ59zG9yNJnHsBKPxhDHR1AjRXN7jbW32EouZwp3ImBjo6PCLm8ZmY4Yr02GnZvMCcckmkz/TIfOecM2P8UTcKfiSAjTP40+ZUjmz/vOazuMr/Jkwb6q2VJBGOchGCtq9IdOyTvkyniupvIM+hTtcD+RpPJ+v/DpfvfMpKNHESvw/cry70sT78rlcvhLM5fM57Tlu5Rfx6/+vnsOJ5tPUGDOi9hs1Rn5TebNE/lgqqb5S9c6vV4IH9mMJfn5Q6Tuwn/9kCf4OfAP9Kv7wJMNZk4CzbpiQseraqfgYg0Q/1cPUMfEBRYWRXmUd5lcVAyjDDktJxOWrJxcAA0FBfy9luLCRfFGT270KhAhqKJtwG3lVU9488A+H70nRjdwK41P3MEXAjwW7W+IlTNe0mJ/8BqQTnxMyXD4+xTSdX2X7E4fHVQ88BEQOi38McUqGfY57nhQFwe7xGJ/Es68+6rMRzuF7ui7DZmQZH3O4ueCZ26f5/+b7GQ7vz8uouiDlGWeIKSWhyq6Uz+mxqsUyUfJpenqaCDEMOwG8O2JBtImQ8wWjuOIPduEGg+EGwf6HFZSnBv58g8UAGaYVf6CENxt2C8Juo/33x5mMwvm8hZ9FbjDa/rBChJhWDhogWE5r448EG+EJP5kLzfNE161+kvGJR5kUAwasXopRwIGT0nItTk/zAhpzqBnLSUVcUsqR3zo8Pjt5rkp8WaDnzYRUSTNUy6FftVjUXZMDx8S55DOWEJ8iUqOXVKmQ5yxQ0+w20+eq2D+SAxZLGGq72Bh57R9r2rrfgOqcxtv9WOUfpB8BBOaqqGac7e9IPjLiEY1EykypEoeknCqTAoyJC/r3THLu8gXzWtsDscDg6bPVK06zUDNvi1vvtVNqp380CYJTksQz21vnLVj+Op47en326YOnWiJWwWqF1/HaNb6ZgaP7AM+2c259pcaraxR1q/jNQeXA+0qQXl85jV5/4EX+eweG6D4lWDlADbDy1O7WPk3GpPJf4ykXAag1pJ0RQaShirM7AOgDAq1MSKm1YUPNItkNGXFWxF0q40kQJia5pfkoOTAv/TWUNj0Qy9sGbfnYNzHy9a9bnDaz4euzOiCF3Ps1MVawthQeFMw2J0+botGmQlPlL00FmopEUrTQRB1NhQGntfIXs5MqNAppkFN5LcZTp5k6rE59r3gc5pUH8LHMpEafpJQyFB98gAoSkq8wGpqORjHvY1Zv8g6aLCKhC6NF5e2oxDdCjjr/5i9f1LQwtvNL6vu33u+PkK9uQ8394aPO2/PlC5sWQTqxQnpUgy/bl157QkrZMDq2a/byu4Yj/v0VC8LGbZCcTGycP7ZzzvK7RqL+/UyfV9fLF5lGO+rLdXBZrsjNAuxtNseV8SHhcVCspJkGySPVrUlQRLS7WdavpH7Fp1zPDm5pIH2bd27dsL5/wM6P8MQ9f/7p2y5VPx7BP37RSGXjZpIAt0Xzd60cKW7eM8KXi6uPP2vzZsdFW07uG+DJcVu27N+8+VubNxe3bBkbmfir0iyv0l9yfsR7cRXKEeqgIur3QYcOUC8qz1e15nOoTZ+mhoEzx909awqGWRt61HBuxSx7Yn5WXHLeC9aI9ZxWS1SyzrVGLddZrfQX+eP7jLNP3LGxl8+Mn7Bmrn3e9jnqD6xQyuqPQCnrdZaodUIm+h2GZ4W5welwqlSVsAcMR8ozKYdfqp4Bxq2zaoAlRX3bcZBndTPpMAbWbTrDHQgkggHTgpbmkj9YaM9IBm/ZYSclu9Xfbm1YckgE45tEbsJq5LZM62gunOhqDgeN3mw0FHW5Qn6vN21XMv3zJ885PKHzNEqAKY4CrjgjrsbBuqhJvFXP6TAQUMfb4hOoATmtkHEu7HHr1uEBhZ2WkHWnhbRYQpgQxoQwXGpFuTqRuFo5EmtDPcGC9Xwhy06rZZcl9FB9tF9XwdXPeF/Nx5neaFmXfuh8KXoYW5WCprfn094a31XGmcakqbrlkkQadltAOJle4wCR6Yctw81ySzmiuiLlFrl5uIW8p7p0IXgup55pscybZ/E2mteZwTV+UB89AQA6LVF/A/PtfAz51a5IqVWWW0sRJgYfqsrIsb2XLA2W+fPNjV7LWgtrY0r8ZEIlu3qJ3cX77eQiaFvncz6r8+eqvPalgPN8gvtUnc3IaWkreVqh+Uxqz4h6u02zG/ntEN5C3/42Hmz+tkuSrkyQ+Yqi7k+8jWOrnj9NMXJfuCsM7tv6TcsAj09hVC8OwRHJVa20DjVz70iojyQSZDShztZL6OWHtYax9PC0OZPnH7U9K6PBtoN2LZQNOgFWoBnnAT5DOgHN4A9W+J5uI5tXWN1jFLo6S/bRLPl1ek6KVwZTWYf3zCctUUvrOdaIn21ccw+9wY1mlxVydvvRG4Zo85wlw+2C0Dn3GPUJqxVqSmxfnGuNaPT+K/wLjKeGsN7PNQC0TnApeCN3HCBF3K0UeVlMK3Al4coXwXPD5XVrJjP55ytrRmjDKZ87p+Urm89o+SK58eaW3fG7Wy7e0/IJvrKGrqu8RRvoBZU13ziZNgyr5l0tt53eckMWCv0RChE7FCMLodztI5W3qvvXTfwc3UJ0lEujXroXJY9an6XZEhVJmZRlJ482dtNePCQEd1m//87V5qLHOZ0nudqdlbtdrs+N0aHxyve3dp1V6t68uTt/5uY/JAYHE5G5g38KtLcHpM523ubEku1QBWu2O9vGK98dJ+edlT3rqs2zZp2ycXAWXTeYSAz2phIb2+VAe0tjQJfBf4FeiCervDiwNQJ4eMqttibbX8mdVfF7r02xq+/ayKM22/vkTrMgMNl7r91O3DY8qsBg+V/5W3nukDay29iIsC5Po3JPzQXj00m0K10tw99y4H36EzQ9s+sbiW/k9ybujO9J3JK6Rdlz1Z2JO6+6JXHL5Xcqe2m2ci3Nqg7yF5478D5vG6xsuwOKf3evcucv9ii3/ASKqY0QaYJADO50NZQ/a1B14PO6684PHHxm/HjuFG4z7Ddnc5fO/Fzs9Fr7dSq9qANYDYvTZZTroFX8cFpr43ii/FnUxSQdbM+5IrEgAe47h7p9WxlVwNE/o/ZLUpdW/UrXfkki1k9+xbT0+xOon687dRSbx+vCuoC+Br9+UD8u/0/0Gs9OjlbPW/cSZriDtx1GE72yVOsLVEltx+f0n2AymL1W9UGNmq20Wnzhf/Xdx08U/V4rYVK4NsAJuAkd3G/Ce8u6FbQRmDVbJ7GVSZh98AkPb7wIs7wYJ9kyOxdWgyDK+Zx8cCoSFYcqW+J9Ue0gR1RNVkPkVxPvUiicc+AdXsar8lKfQHhecBo7uwSXRegTRINRmGEan8KGK+9Vf0IjBOukVao6rH57mJT7DXbBIAhdXYLVKfQbSKU+Qaj0CTYjbzR2dhqtTiP8FtH1Pm6lu2DXiHLtqBFMqmfq9aP2QlzTVanKW5PT67HcNXfbnDnb5qovzd06FxzaN84emwVHWnJ4V786jBmfZrksZxN6dOecbZdjTfCGsseegGngDR0ytdbWeJt+CvEo7mjuGG4dt547jdvBXch9BrWP6sedGbk+aHr08m7tVZCQrDuZMv0ZxboIQcsvKLbTLMBgj0yEyM3PTJwOdbwzcXxz8vzoM5fFTGgYwLsqdnrskE69ncTVXyN1jXfNBsFEiP7I55g8gDq7vm3NnnTlZqgAhekch/dSTfOw6l3GVBLnDXkbPZfNZvYJLhkyOT0Oc40dRT/Ac7S5snySi3+407tizTrJEAf1awtFOPRx4JbDn6e9Y6NIjbw5aFq82Oh0WQ0G40bRKlgJOdTZXI2/Pt1Z2B9tFP1mgwlaEgSDzekSNpoI2T/1PO0UO6bD3CbuBO4s2FcugBl1xQz31ClH1x0aEqtMsAa9jGTQLRroJBLbWhl2V57ZpDu8ZY+1Dk9Omyk5NrsA9fM6st61ZrOiGA0Gu8ttVBSkARQFKQvwGzbGbo9NcUfQbBn3OLJMY7f6U55Gb9bhUX9iwRaNbpdNEIyTP+AF3/zfOO1eRu9sZg5k0p6zi4sD7qidKp7+WxaTVhfrLBFOgCzKbdm/Zcv+F9asxFMsK9ecuvKmlStvenDxQjzBsnDxqmy4OQzOjT/O27bsf/6RLVjsxTUri6XZK/7rmzetxGIPYflbpXC4JRzeppn9n5D5P15ns3nmULYOn4gd5uhjZYw3Hfjw0sRDCXAIbduQvGVasoy8LaSq5G2qcPWI+gY7rarxH36k4wGlGWqjoJRaZOenmRZolPAdh3mws8xhiZrVly1xy+VGanR63MbTjqBDscdCPSGreqeN2O4RvW4rNZo+p9OXh8b91s7syVFO753h7swMBjuITkj6D4vLqZtHRi5OPJWY4tSP+o3GfsFuFUWr/Qiv3HbgbboIEaA9Ex45qd/oMfYbeMFqPFe0CLTKL9oHfRAGCnBzlarWmcpKMoFDUiqjajLqVOKZId6hyQgyBLEPfbttI8a0kmCqQ4f5fENcJ6gpQEDyWKgz9FqyzJeb1XPsjhs9drsnvAS2nmabtZEYnaLFI3Sbgg5xN9kuer3ix5SnoQC5GGngyjXoJxIaaUu3hrtCrnBa+h+6BHbdJ7vTn23rM9nv8OYL3jDfSH6QnsWPAJnyf0TeJBZNvCMu3hI0X2IOEtL8K7O03u/8E1LFf0J6uSv8J41Q/5OUDruGp9h5r9q5nfFqw/+k/o2MGdiNZZZoWmbvn32EHe+joQuH/kedi4a3yWO67ZeqffCpTzcN7llmCIiCFuHixSPY9L58wizwEc11v6AZFEbTwbP1M3dML/SHMzn7MK1JybpInXxtR5y+GI9XWuPxT8Vin4qTltjlMXBw/xQmVe6t5tMfstOML9V+20R9GfEOnXb5qS5jxFEuc73cQu0bOVPle7CDHiKNHHRYTcof/E0SKPcGnjlT2UdBSFj9K7HfzRJ6WMLD6iqyl7Rj+FPonX3SSdqnR15jJ9VcHwO5TjZGIM6KR/2R4Y95EfP9kQjGoyMfk+H6+MX1xXE4HOx9v6vTLPUU7/HcGm4Ldyq3a2YUTL0+67QRvk7VQz5MjI/FetoDgfaeWOXP1VAdZaduSxCPoqh/Sky9by46AuGAg3nFacIzIGDuQDh2y+Se2eDAuqGgwxH8hgP9qUFdRo02fyV2DmkQevJYjktOnDnqJ3mpipnydbZJWAj2DtQqhClTzMMlo5cvKkK+jCFFTLOcMoaL/N7qpj+iPe7KyX0fTQo5lhcKywuBWcVZd5KG/hSfWx2NrM7xb169andYgxThML5pmH5+Mow56k+XLXt1zZpX2775zbZXH3741a985dWH06+2PgjzRa7ZA5NA40za2zmJ28Zt5y7iLuau5K49hO0dzSLUBOqJkum4pjwrIdaEcKKTkBw7c1HUJgDCDIAqNfJrzYxWsnY+FevOtM7s2waoppeuQ35qI9la5A1NmU2ybBqQ5DmRUSWASdKlLOpt9EKkct9h8q6pGmmv3kn/wajtK7Nnd8bWxuNrY/nY92PoYrrP26CdEzWS6VM2DyUYxfZZ5MDbh8t9BBs4dcLY3SkTnl99SWFfUTCiDnisedJx3JRvgdTqth/7b2i3C9NiQpN07uFB4rsx0gAd91aMNGu7u+avZrj+kQyr4/s9w3qA0Zay+ozWWaRn4lto18J71mDP1a9Psa0IQqKi4fo6BqOpitVp6Z8/esGCBReMLlzYva4b3MKNC8sbyuAWLtQzdldP4tFrRy+4/oLRoe71Z63vHtJvLOk9zRqhuQaGazr4vdw8WGmrqjgZ63vt61g6C0GsM/iqb9DxOiBaF5FRp1Quy+V0OS2WFTktRmltTK5+jmzTJoTmm55RX2JQvebDUFXwqrmRoSH1R2GvNxxqtjUZmwTF1nx6fZTeDfiYulf7ChlZBTgBYhF7qx8eW+VNhpyVK7UvEeAw5SqLSKekKFJYTLjTaXdCDNfFqvov35qwjz+dhPNI1vFrOUWeSQlnNbBtLVqrefwYzVrNMevnnzNv3jnXoDevsKpYXLUZvRmYrFk575xrsRZ4I4XVp6wuFFZtWVXgar9FgDJO/IrjjL5Ih7hkUscl02lcAChwO4jsvmqI5CY/CZT2o0DuoCUydOD3vJ8gT3DiLMhe+hf9TEGZzb7VjI+1GTCC7f8Cz2HKAQ/pEGkHnyKQ8pPnyeXJM+amw9nmuRbRnG8hcvPgvfeyG3r33n03WVQbu17/jNuDRfwCW3tU4/uu0mnZvTrfdxWjZfcmi+WofwviW1v80Z51Z0b9m7GZzRi5qTZCytoX3fzaTT/D/N/83/k2/cwhMxcZrWpZR7VPDSBDSvv4ikbtMptgeDmZKj7qw1Akt2g6VRqk6QxJ02NcpvWCZH/RKZtF65fMJpqk1kDE8V1rg+1xRyRghbjJ8l9W0Sw7X7RJxvXmVsNSR1dk32U+L0+iXwmWgubbo4LTI172cGPGwcdE9xM2J41SbzhsvcEctD/vDHmoeIIIDqhk5/P2oPkGazjshSJO2xM+x5o7GhWh4WJvodG8b5mdWg3L9jUWfeLFDYZooMoDf53/Hd8C2M9xbL5s487jPslxQiKtpNIT/2W0LF79xovkZ8eCU6ID3xlCeX8ZD2Di2s3L/jJbuemiXpUd05Q1e2yyn4e1W8pQY9nnhxUM0wQCsJZx5tQG2AyipqTEZ7PNyVDAzc8xm9JNVxy3ds0pq47qCnpocKRjrC0d9lsEwUJMTbcZtoeNJos7OgAgyhvyN3q6vHZ/a//C5UuWzN8aUYzGWU6fPxJvvj3cBlhca6Qn0hIBdyNcJNIWvlu7R5ZFW8Lh1nDEYGz0J4Ihn/GE0zasXnZhKOp0j3Yv68gb+WtH2mBuC35byBrocC4Z9c61QMsFb7NAeSKa3V1nkHR6YVevw9YQOGnuwqVrVnplX8gjk1549UgrXJcD7Q2/ER70RSJwm4O3SORmuMFvV+n6x3Xexky/y8JYf7qylibZPTyH6C1L2PLoo7qm3/MQecFyBK7EGxbLY4/heUmPW3zeYoE6Vd1gxJ9RaqvUfPVwLeCVN3Ff4R6qPr9Grx7Kpt/MjTbzMmq64MZTzstShMnx8Ui2LCpp3UQjm2dMmxKK+LVDpzg5mX0//Wypj4GbQnnylEw5SrC8JOrfSS2W2fY18f5JXdR0LvLVjq+3/Hy90eIcDxmTAjH6BePnYxkipIyS1eG0eeJ+m7dtcUZICdRgkuwmh9FmkyI2f/Pv2uRIRF6OXpuvoaElGLxKmCMkBaHZMIw3NhRIY+KPVwkE7XTZyJN15qIvET7Z4GpoVQRBMEgOq/1TgpCIC4LDYnGKBpNgcXYnm2JGwWo0U8Em8kbeIJqc0VATCYRODQcC4VNDgfZYXwxcit++VRAeF+jZ2/FWw7+vUtYzPGcluPNuWVLcQPTgiSs30kAA+YAwEpE4Kh4edfxZ94vX/azvOLjIzvt3wN8R0MWT1Dz5SfYG9W9rEzcQy9pEt9rUdw/pP6+Pm+C33lYDq6daHJkGWpuJTHgimyncbPqJTk+43OrHI51TPn73cEdl4WJyf0YdIza8jR8JfFe2032ZykKykDwApdX3yf0d6jij7SflJbW2qU7gdnCf4C7hLuWunpkEZYb2T71Vnt6/1dSRJC/TWDLN6RyoGdfShDK7mVAG7jpDazfWAO9YzTwptKuVBpS1o3F3tendiKbWlq6aM4W54ZtRf1/DfYn7MncXdze37///vp9Ws6C2JVL7GSX3f3CE1L3VgyZkFWL+Gh3gU/cErw+C+5/gSBDcGHZn5R60jxfZj+4/OV4rq+PVrP0Y4SLqb8Nh0gg3/CBfVedQ01/w1Xxjcaa0Rd13ASc7m+So4Yi0xQ3Ib3o7cbui3J6YAUVxYuLDBLgPdYVB4SCaveffoNXlmVHk6qwqRf4TZlgetijc0TRShPwJdri6HeoSJOlm1RDe3NTvD1R5DItnaGGmjgdUxxNmZg6hIjvFGDnCJ1TfjZEL4DUui8XQdF2MijbTUqPFQA1LDTareARQoX6MFPv5SLSq1yw12USrDepRg4XRdH/hf8ojlxttaQ3UvlVaxKMGiLCk696NWSQoo3r4Id6RXxYvx8H9cNDZ5przTKwUp7HuOF1V2esPR6SfeRw9A1an8TkpElFNTOlHfS7B2+PdcbUZPDLg5B2zo4UY+TXEjopKarMUtff3W2lUIi/7I6qqGZidxL+iU/g+Z3MXcp/mruXu098kSP4jCJiGa2nmfnyakQ7dtpWGbfkBB9Vte5RlDZM62Ogx5DBcS/LJeXgUWWKmdPoJls7/K6jX55syvKHLQHjR7bBYAYluW+G3Wg1ZAzGY/FazkVjbYo2tLxigjOHhbFfXxmw262UnDu82BAUhSAixmwWD3GS3SAaDpH+q411iJqaDEK8PR55qrvlTzwk3GQxGo8lkMZrFsBxu8pobHILBKpiIwFtFiykoN6Z7DX83gOvpP6a395j+bGOhEdzxhk5DwnC8CDOvyYDmLL2nQbzTMGGL4wWg5avyjEHtS1EHG9Q7dFrNsRmNPmecWB4pV9Q3ArCSr0r9ijBjdyK1zMjwu2+6ic7CwLcwCWLqL3gyQOkAFW80iKLhRn4jRAiZjNM/R6XKp9mH9M6RosOVO+nNUxNkKG6g/TzPNxkNMYOoUF69n6UNUD3N2ER5jafya/45Pg57eIbxzzgzmZitMmEmcUmpkGSMMrT1yk7aaF/6IDj9DsEjyjM1+W+oz3Zk1Up5sc8LhHu5sctL+HRFFL0+O+EdPjMpWUTRolbMvkafWX3WIv630pNI9Iygl3AiWHIGEgnyNCmlF5fVCtRXn01DW3zqzI/tPi/WfVarW8GGSMnsc7yh1wdv2NUYbXQmuhL62H6CfgCrtgHobdQ4OobjvJNUW6owqZsL8GrCoJJ26rvGvlKqkCRYUAvXZXx+l9HttsPM3GVp9NFe9C3gec2Vn5LrtSxRPV0PEH9NGhRSPyARrKC+Zg55yfUkIrrdqIGhvo6Nbd0F1J/N7THuMnsbKy/vsngboWlfowWauU40GOxut1E9zagH3qlJg/I2EsWi0JI3RK4jUdaUW2RxTsd9b9e/u14rxxtnci3kY51d91XGqfyoui8oyTNMq0edpjf6HUPbNJuYOZuxMbqaff18B/tC+aXqZwj0ASa8xBKi6h+IdFBCZTPDj0g/bPdPTdzx++eb9Kb7xj5XG9kTljbi74HXO75H/3HI7h2jQxFVABTon3BDFIi0YMsTeNCzNfqM1a+6HlEWiHzJOFxE12rk26rGpSt/npC3oSgPWQFMyWHHCJk3TOZptgv4RTMQzo1Uy6rfQjVDTff7Nf5V3lcnX+5B/Y062XKdkoa7dsQOhXjITDKXMIqSLquS2YaH+0dR3/XSK7tpbtasyk+7L83vz+X25/G0KP18NB8Fp94XLUQihehdLvkUp5/KrlO8TsFdDfscvA9RQdWPZ0vJ7/OqnM+Td/IfczVVyVKInHRQTaPWos4H/1GNjYr6962zTXvRhNGEnyDUI3ch7CEXYgrmcDrv8j3+Rma7t+OQek9aj9TI7vJVuV2KWrd8a8uWbzHlJTTFe5rDcwl+kehib6P3EhRKXeKdaqj3x5jY6L24ppgul3mCfszeyccFpn4xucZo+yeaYOtvOlBpIltf2pT/Q2HjS9esNKxYmGxqStKHKj+56iqaV/f+7W/6fnkjwARXPV7/L9slrjs9Un1jfJVScdXxp61aotkcXvLQEk3Fa4n625hmpDj2GhPnxbZ86/lvbcHCrAOG6gpjIKM+hwVvwypYVX/29+jDdXO73tJJsu6bnHW9lere2g2ONGt3NdLE9yaTB77fRDd0q/d2d5Oju4/tVo0Q+KhbfQ9QpCTH/b9FXBCNAHicY2BkYGAA4hlWXw7G89t8ZeBmYQCBJwf88xD0/wUszswJQC4HAxNIFABLOAtNAHicY2BkYGBu+N/AEMPyhgEIWJwZGBlQwRIAY68EPAAAeJxjYWBgYIHhN1DaBUkMHTvgkcOHYfrsCahxQFLrgEUcF8ZmBro4uhp7HHbYoKmxIeA+Qm40JtIP9kSoweYOEDbA4S9c4YseD/Z44gbZrHosdtvjUIvuXgYGTH+iqQMAQcQa0QAAAAAAfAC+AQYBTAGWAdoCUAL4AxoDrgQiBJAFggXmBk4GuAdOB8wIDgiSCQIJXAmuCiAKOApeCo4K2Ar+C2QL6AwuDFYMvA08DbwOfA9MD94QZBDkET4RdBHKEfoSXBK8EvITPhRAFYQVuBXsFkYWkhdCF64YfBkMGVwZxBoiGnYa3htAG4ocKhxEHJgc7B2UHiQeTh7CHzAftiAKIFQgfiDkIWYhwCJkIsYjQCNwI54jziQwJEYlCiVQJhonNid6J74oSCioKRIpUil2KdQqKCqKKs4rMCuuLDQs5C1ILZAt5i4OLmYvCi+GMCwwhjE2MbIyajLAMw4zZDPmNHY0yDUWNWg14DaINvg37DhgOKo5PjmiOeo6jDsIO9I8KD0WPXg9zj6GP2o/xkAeQIxA6EHQQkxCvkNMQ+5ERkTCROpFLEVWRbRF7gAAeJxjYGRgYFjC8IFBigEEmICYCwgZGP6D+QwAM1wCxQB4nF2RzU7CQBSFz8iPERIXmrhwNW6IiaEFluwMCexZ4LqUKT9pO810IGHl0/gEPoFP4BPoS/gCHsrVBNrMne+cuffOTQvgBt9QOD63XEdWuKQ68gX5XrhGfhCukx+FG2gjFG7SHwq38IRn4TY7puyg6ldUHbwKK1zjTfiC/C5cI38I18mfwg3c4Uu4Sf9HuIWZUsJtdNTLyJnIm4We7/U6tnlic5/E3QNOzXKbRk6UbDPjyrXNdT/oiTMxuXF/LcrdcuB9ohNnMz1mL5OmVhfObkzsg5X3xTAME/GD2GYYwcEggmdcQGOOPeMaMSxyJFX03GN0/90pc5fY8kNFrD49O1UzZjqU1Ael0UeA3lnOhDl5lXc+RYkd7xnQPUyguRwrMtJY5jKcISVrFNXZhk5MP8Cqqir4k0O+yVl+UN2d/QI8XWjpAAAAeJxtVId22zYU9bVIipJsp4nTvfdk2yjp3nvvvQsRTxJikGAAULK699577/5nHyipdc6pzhFBAA/AxR1cWV2Z/7or///7C6toIUKMBG2k6KCLHtawjg3swhHYjT3YxF4ciaNwNI7BsTgOx+MEnIiTcDJOwak4DafjDJyJs3A2zsG5OA/n4wJkuBAX4WLsQx/7cQCX4FJchstxBa7EVbga1+BaXIfrcQNuxE24GbfgVtyG23EH7sRduBv34F7ch/vxAB7EQ3gYj+BRPIbH8QSexFN4Gs/gWTyH5yEwQA4JwhAjjKFwEFvQKFDCoMIhWDh41Jhgim3M8AJexEt4Ga/gVbyG1/EG3sRbeBvv4F28h/fxAT7ER/gYn+BTfIbP8QW+xFf4Gt/gW3yH7/EDfsRP+Bm/4Ff8ht/xB/7EX/h7JZ5a5SkZWFHm40TSROWUOBI2H69XximvTJlpGvqEtitRyrQQdkuaadmTwovMkabcd0ZWyUyrkuLKqtJHufKzVJtchOXJIZsbSakqq9pnSiZqaEVBsailMt2hsUVW8LyOvfKaIqdGZVtIacm5jvO8hfMqbw9Es0s8UZJMIiZ8um272lVUyvZU2FKVo8hxJ7U05LXj/qpQ7dzouij3L9oDi7a/aPclWsxM7TuORgWVnmQ7NIy5MwfrxajlxWAtN+VQjTKa8CxjoioLsBOnGYxNpBLajDYP1gx0OMtcJXIm0NSlTOpKGyGj3FSzrlcFZczziFIv3FbGd9x72JoB+SlRmaiiMtb3+GBNzUH7ewsAA+Foj9DMEItWuMx5Sz4f7xwaatpmFuJ8TPlWJGpv0lxoHhF2eQ3nZ5p2LTpCTlh6ksvJyprKbbAc5CnLlc019dcP6ybz3l6pLGsf/GHN1DI31tGaVK5iUhsYkbRitL4cGbAftqLgmpik8v0oPIPQGYuxuaxSZbBRU7tEOOHb8TKKgu02Di9s0Yw6/M9ybRy1K4ahaNoLp2cloxJVMjSaReo1PptfoNNMh8kojHaaqcBepPjIWBViRLuXyoRadqH1G8uRPDjF7vpXurkGMcPZ6seFKmsXs4vqflQYS1F4TTWrXvOurUrIpDADpSmtuJ8VYpvLJsueKlO+QhYctlrlURhsL+ycWCFV7XpOTNgUSmuS6aGaXJMwl1ujdWhU5duOvG/SwKWJGwvmLZ0Iq4KfWjNya/MxppArgyLUDY+FN1kNLSrHK6eK78UZGwSCenxNWuQ9ZklqDrAmy1kXVqaN2wZmm73mchFCMai9N2W3+Uo0To5HHImqLVVIsI0Cr2uS5pD5Di4a+0InwRTGxk38okApM+Pc1FgZBwJMi72WzLWPLIOOGa6xyRxXdNAxGWVdDMjGTaS6/4VoR576UchixBVl6mmb1SXR9sZor6rIaeNTz1y4IVlO/6gz5XNs+O5FgYO42afTGHestIz4rd/ix+aOFIagBozdpqxx3e4d03MLraz8Aw7bNJ4AAAA=) 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-write:before{content:"\\e60b"}.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(t){}}();const Kn={type:(e,t)=>Object.prototype.toString.call(e)==="[object "+t+"]",Undef:e=>null==e,Element:e=>"object"==typeof e&&null!==e&&1===e.nodeType&&!Kn.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 Xn(e,t){return{}.hasOwnProperty.call(e,t)}function Jn(e,t,n){e[t]=n}function Zn(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))||Kn.Object(r)){let t=void 0===e[o];i?(i=!1,t&&Jn(e,o,[])):r._clone&&void 0!==n||t&&Jn(e,o,{}),e[o]=Zn(e[o],r,n)}else Jn(e,o,r),Kn.Undef(r)||(Kn.Undef(r.__json)||(e[o].__json=r.__json),Kn.Undef(r.__origin)||(e[o].__origin=r.__origin))}return void 0!==n&&Array.isArray(e)?e.filter(e=>!e||!e.__ctrl):e}function ei(e){return Zn({},{value:e}).value}["Date","Object","String","Boolean","Array","Number"].forEach(e=>{Kn[e]=function(t){return Kn.type(t,e)}});const ti="[[FORM-CREATE-PREFIX-",ni="-FORM-CREATE-SUFFIX]]";function ii(e){return new Function("return "+e)()}function oi(e,t){if(e&&Kn.String(e)&&e.length>4){let o=e.trim(),r=!1;try{if(o.indexOf(ni)>0&&0===o.indexOf(ti))o=o.replace(ni,"").replace(ti,""),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=ii("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=ii(o)}catch(n){i=ii("function "+o)}return i.__json=e,i}catch(i){return void"解析失败:".concat(o,"\n\nerr: ").concat(i)}}return e}function ri(e){return ai(e.replace(/(-[a-z])/g,function(e){return e.replace("-","").toLocaleUpperCase()}))}function ai(e){return e.replace(e[0],e[0].toLowerCase())}const li={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:"远程数据请求发送前触发"},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:"长度"},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:"组件显示状态发生变化后触发"},fetch:{title:"设置数据源",create:"创建数据源",config:"请求配置",action:"请求链接",actionRequired:"请输入正确的链接",placeholder:"请输入数据源的名称",method:"请求方式",data:"附带数据",dataType:"数据类型",headers:"请求头部",query:"请求参数",parse:"数据处理",response:"接口返回的数据",onError:"错误处理",beforeFetch:"前置处理",remote:"远程数据",static:"静态数据",optionsType:{fetch:"远程数据",struct:"静态数据"}},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:{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:"复制",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:"样式",_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:"手写签名",props:{penColor:"线条的颜色",disabled:"禁用"}},group:{name:"子表单",props:{disabled:"是否禁用",syncDisabled:"是否与子表单强制同步禁用状态",expand:"设置默认展开几项",button:"是否显示操作按钮",sortBtn:"是否显示排序按钮",min:"设置最小添加几项",max:"设置最多添加几项"}},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:"最大允许上传个数"}}}},si=(e,t)=>T({message:e,type:t||"info",customClass:"_fc-message-tip"}),ui=e=>si(e,"error"),ci=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)&&Jn(e,i,t[i]);return e};function di(e){return"object"!=typeof e||null===e?e:e instanceof Array?[...e]:{...e}}function fi(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 pi(){return{type:"Required",field:"formCreate$required",title:"是否必填"}}function hi(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&&hi(e,t,n,r.children=[]),i.push(r)}return i}function mi(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"+vi(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 gi(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"+vi(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 vi(e){return e.replace(e[0],e[0].toLocaleUpperCase())}const _i=function(e){const t=/object ([a-zA-Z]*)/.exec(Object.prototype.toString.call(e));return t&&bi[t[1].toLowerCase()]?bi[t[1].toLowerCase()](e):e},bi={object:function(e){var t=[];for(var n in e)!Xn(e,n)||t.push(_i(n)+": "+(null!=e[n]?_i(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]?_i(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("")+'"'}},yi=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)||Kn.Object(n))&&yi(n),Kn.String(n)&&(e[t]=oi(n))}return e};const xi=e=>(t,n)=>wi(t,n,O(e)),wi=(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,"}"))}),Ai=e=>(e=>{const n=t(()=>O(e).name),i=t(()=>vi(ri(n.value||""))),o=R(e)?e:d(e);return{lang:n,name:i,locale:o,t:xi(e)}})(t(()=>e.value||li)),ki=(e,t,n)=>t.map(t=>(t.label=e((n||"props")+"."+t.label||t.value)||t.label,t)),Ci=(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&&Kn.trueArray(n.children)&&(n.children=Ci(e,t,n.children)),n)),Si=e=>{const t=[];return e&&e.forEach(e=>{if(e._fc_drag_tag){const n={id:e.__fc__.id,rule:e,children:Si(e.children)};n.children.length||delete n.children,t.push(n)}else t.push(...Si(e.children))}),t},Ei=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)},Ti=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:di(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 Oi(e){return{name:"$inject",columns:[{label:"$inject.api",info:e("event.inject.api"),type:"Api"},{label:"$inject.rule",info:e("event.inject.rule"),type:"Rule[]"},{label:"$inject.self",info:e("event.inject.self"),type:"Rule"},{label:"$inject.option",info:e("event.inject.option"),type:"Object"},{label:"$inject.args",info:e("event.inject.args"),type:"Array"}]}}function Ri(e){return-1!==["",null,void 0].indexOf(e)}function Mi(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){}si("已复制!","success"),document.body.removeChild(t)}function Di(e){return e.filter((t,n)=>e.indexOf(t)===n)}function Ni({t:e}){return[{type:"input",field:"formCreateFormName",value:"",title:e("form.formName")},{type:"radio",field:"labelPosition",value:"left",title:e("form.labelPosition"),options:ki(e,[{value:"left",label:"left"},{value:"right",label:"right"},{value:"top",label:"top"}])},{type:"radio",field:"size",value:"small",title:e("form.size"),options:ki(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 Ii({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 Fi({t:e}){return[{type:"Required",field:"$required",title:e("validate.required")},{type:"validate",field:"validate",title:e("validate.rule"),value:[]}]}function Li(e){return Array.isArray(e)?e:[null,void 0,""].indexOf(e)>-1?[]:[e]}function Pi(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 Vi=0;function ji(){const e=370+ ++Vi;return"F"+Math.random().toString(36).substr(3,3)+Number("".concat(Date.now())).toString(36)+e.toString(36)+"c"}const Bi="radio",zi={menu:"main",icon:"icon-radio",label:"单选框",name:Bi,input:!0,event:["change"],validate:["string","number"],rule:({t:e})=>({type:Bi,field:ji(),title:e("com.radio.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:hi(e("props.option"),{label:"label",value:"value"},1)}),props:(e,{t:t})=>Ci(t,Bi+".props",[mi(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"}])},Hi="checkbox",Ui={menu:"main",icon:"icon-checkbox",label:"多选框",name:Hi,input:!0,event:["change"],validate:["array"],rule:({t:e})=>({type:Hi,field:ji(),title:e("com.checkbox.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:hi(e("props.option"),{label:"label",value:"value"},1)}),props:(e,{t:t})=>Ci(t,Hi+".props",[mi(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"}])},Wi="input",Gi={menu:"main",icon:"icon-input",label:"输入框",name:Wi,input:!0,event:["blur","focus","change","input","clear"],validate:["string","url","email"],rule:({t:e})=>({type:Wi,field:ji(),title:e("com.input.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ci(t,Wi+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"select",field:"type",options:ki(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"}])},$i="textarea",Qi={menu:"main",icon:"icon-textarea",label:"多行输入框",name:$i,input:!0,event:["blur","focus","change","input"],validate:["string"],rule:({t:e})=>({type:"input",field:ji(),title:e("com.textarea.name"),info:"",$required:!1,props:{type:"textarea"}}),props:(e,{t:t})=>Ci(t,$i+".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"}])},Yi="password",qi={menu:"main",icon:"icon-password",label:"密码输入框",name:Yi,input:!0,event:["blur","focus","change","input","clear"],validate:["string"],rule:({t:e})=>({type:"input",field:ji(),title:e("com.password.name"),info:"",$required:!1,props:{type:"password"}}),props:(e,{t:t})=>Ci(t,Yi+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"readonly"},{type:"inputNumber",field:"maxlength",props:{min:0}},{type:"input",field:"placeholder"},{type:"switch",field:"clearable"}])},Ki="inputNumber",Xi={menu:"main",icon:"icon-number",label:"计数器",name:Ki,input:!0,event:["blur","focus","change"],validate:["number","integer","float"],rule:({t:e})=>({type:Ki,field:ji(),title:e("com.inputNumber.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ci(t,Ki+".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:ki(t,[{label:"default",value:""},{label:"right",value:"right"}])},{type:"input",field:"placeholder"}])},Ji="select",Zi={menu:"main",icon:"icon-select",label:"选择器",name:Ji,input:!0,event:["change","visibleChange","removeTag","clear","blur","focus"],validate:["string","number","array"],rule:({t:e})=>({type:Ji,field:ji(),title:e("com.select.name"),info:"",effect:{fetch:""},$required:!1,props:{},options:hi(e("props.option"),{label:"label",value:"value"},1)}),watch:{multiple({rule:e}){e.key=ji()}},props:(e,{t:t})=>Ci(t,Ji+".props",[mi(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:[Oi(t)]}},{type:"switch",field:"allowCreate"},{type:"input",field:"noMatchText"},{type:"input",field:"noDataText"},{type:"switch",field:"reserveKeyword"},{type:"switch",field:"defaultFirstOption"}])},eo="switch",to={menu:"main",icon:"icon-switch",label:"开关",name:eo,input:!0,event:["change"],rule:({t:e})=>({type:eo,field:ji(),title:e("com.switch.name"),info:"",$required:!1,props:{activeValue:!0,inactiveValue:!1}}),props:(e,{t:t})=>Ci(t,eo+".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"}])},no="slider",io={menu:"main",icon:"icon-slider",label:"滑块",name:no,input:!0,event:["change","input"],validate:["number","array"],rule:({t:e})=>({type:no,field:ji(),title:e("com.slider.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ci(t,no+".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"}])},oo="timePicker",ro={menu:"main",icon:"icon-time",label:"时间",name:oo,input:!0,event:["change","blur","focus","visibleChange"],rule:({t:e})=>({type:oo,field:ji(),title:e("com.timePicker.name"),info:"",$required:!1,props:{}}),watch:{isRange({rule:e}){e.key=ji()}},props:(e,{t:t})=>Ci(t,oo+".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:ki(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])},ao={menu:"main",icon:"icon-time-range",label:"时间区间",name:"timeRange",input:!0,event:["change","blur","focus","visibleChange"],rule:({t:e})=>({type:"timePicker",field:ji(),title:e("com.timeRange.name"),info:"",$required:!1,props:{isRange:!0}}),props:(e,{t:t})=>Ci(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:ki(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])},lo="datePicker",so={menu:"main",icon:"icon-date",label:"日期",name:lo,input:!0,event:["change","blur","focus","calendarChange","panelChange","visibleChange"],rule:({t:e})=>({type:lo,field:ji(),title:e("com.datePicker.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ci(t,lo+".props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"select",field:"type",options:ki(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:ki(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"input",field:"rangeSeparator"},{type:"switch",field:"unlinkPanels"}])},uo={menu:"main",icon:"icon-date-range",label:"日期区间",name:"dateRange",input:!0,event:["change","blur","focus","calendarChange","panelChange","visibleChange"],rule:({t:e})=>({type:"datePicker",field:ji(),title:e("com.dateRange.name"),info:"",$required:!1,props:{type:"datetimerange"}}),props:(e,{t:t})=>Ci(t,"datePicker.props",[{type:"switch",field:"readonly"},{type:"switch",field:"disabled"},{type:"select",field:"type",options:ki(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:ki(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])},{type:"input",field:"rangeSeparator"},{type:"switch",field:"unlinkPanels"}])},co="rate",fo={menu:"main",icon:"icon-rate",label:"评分",name:co,input:!0,event:["change"],validate:["number"],rule:({t:e})=>({type:co,field:ji(),title:e("com.rate.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ci(t,co+".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"}])},po="colorPicker",ho={menu:"main",icon:"icon-color",label:"颜色选择器",name:po,input:!0,event:["change","activeChange","focus","blur"],validate:["string"],rule:({t:e})=>({type:po,field:ji(),title:e("com.colorPicker.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ci(t,po+".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"}}])},mo="fcRow",go={menu:"layout",icon:"icon-row",label:"栅格布局",name:mo,mask:!1,children:"col",childrenLen:2,rule:()=>({type:mo,props:{},children:[]}),props:(e,{t:t})=>Ci(t,mo+".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"}]}])},vo="col",_o={xs:"<768px",sm:"≥768px",md:"≥992px",lg:"≥1200px",xl:"≥1920px"},bo={name:vo,label:"格子",drag:!0,dragBtn:!1,inside:!0,mask:!1,rule:()=>({type:vo,props:{span:12},children:[]}),props:(e,{t:t})=>Ci(t,vo+".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(_o).map(e=>({type:"elTabPane",props:{label:_o[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}}]}))}]}])},yo="elTabPane",xo={label:"选项卡",name:yo,inside:!0,drag:!0,dragBtn:!1,mask:!1,rule:({t:e})=>({type:yo,props:{label:e("com.elTabPane.name")},children:[]}),props:(e,{t:t})=>Ci(t,yo+".props",[{type:"input",field:"label"},{type:"switch",field:"disabled"},{type:"input",field:"name"},{type:"switch",field:"lazy"}])},wo="elDivider",Ao={menu:"aide",icon:"icon-divider",label:"分割线",name:wo,rule:({t:e})=>({type:wo,props:{},children:[e("com.elDivider.name")]}),props:(e,{t:t})=>Ci(t,wo+".props",[{type:"input",field:"formCreateChild"},{type:"select",field:"contentPosition",options:ki(t,[{label:"left",value:"left"},{label:"right",value:"right"},{label:"center",value:"center"}])}])},ko="cascader",Co={menu:"main",icon:"icon-cascader",label:"级联选择器",name:ko,input:!0,event:["change","expandChange","blur","focus","visibleChange","removeTag"],validate:["string","number","array"],rule:({t:e})=>({type:ko,field:ji(),title:e("com.cascader.name"),info:"",effect:{fetch:""},$required:!1,props:{options:hi(e("props.option"),{label:"label",value:"value"},3)}}),props:(e,{t:t})=>Ci(t,ko+".props",[gi(t,"props.options"),{type:"switch",field:"disabled"},{type:"switch",field:"clearable"},{type:"input",field:"placeholder"},{type:"Object",field:"props",props:{rule:Ci(t,ko+".propsOpt",[{type:"switch",field:"multiple"},{type:"select",field:"expandTrigger",options:ki(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"}]}])},So="upload",Eo={menu:"main",icon:"icon-upload",label:"上传",name:So,input:!0,event:["change","remove","preview","error","progress","exceed"],languageKey:["clickToUpload"],validate:["array"],rule:({t:e})=>({type:So,field:ji(),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})=>Ci(t,So+".props",[{type:"switch",field:"disabled"},{type:"select",field:"listType",options:ki(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:[Oi(t)],name:"beforeUpload"}},{type:"FnInput",field:"beforeRemove",props:{body:!0,button:!0,fnx:!0,args:[Oi(t)],name:"beforeRemove"}},{type:"FnInput",field:"onSuccess",warning:t("com.upload.info"),props:{body:!0,button:!0,fnx:!0,args:[Oi(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}}])},To="elTransfer",Oo={menu:"main",icon:"icon-transfer",label:"穿梭框",name:To,input:!0,event:["change","leftCheckChange","rightCheckChange"],validate:["string","number","array"],rule:({t:e})=>({type:To,field:ji(),title:e("com.elTransfer.name"),info:"",$required:!1,props:{data:hi(e("props.option"),{label:"label",value:"key"},1)}}),props:(e,{t:t})=>Ci(t,To+".props",[gi(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}}])},Ro="tree",Mo={menu:"main",icon:"icon-tree",label:"树形控件",name:Ro,input:!0,event:["nodeClick","nodeContextmenu","checkChange","check","currentChange","nodeExpand","nodeCollapse","nodeDragStart","nodeDragEnter","nodeDragLeave","nodeDragOver","nodeDragEnd","nodeDrop"],validate:["string","number","array"],rule:({t:e})=>({type:Ro,field:ji(),title:e("com.tree.name"),info:"",effect:{fetch:""},$required:!1,props:{props:{label:"label"},showCheckbox:!0,nodeKey:"id",data:hi(e("props.option"),{label:"label",value:"id"},3)}}),props:(e,{t:t})=>Ci(t,Ro+".props",[gi(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"}])},Do="elAlert",No={menu:"aide",icon:"icon-alert",label:"提示",name:Do,event:["close"],rule:({t:e})=>({type:Do,props:{title:e("com.elAlert.name"),description:e("com.elAlert.description"),type:"success",effect:"dark"},children:[]}),props:(e,{t:t})=>Ci(t,Do+".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"}]}])},Io="text",Fo={menu:"aide",icon:"icon-span",label:"文字",name:Io,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})=>Ci(t,Io+".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"}}])},Lo="space",Po={menu:"layout",icon:"icon-space",label:"间距",name:Lo,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:Ci(t,Lo+".props",[{type:"input",field:"height",title:"height"}])}}]},Vo="elTabs",jo={menu:"layout",icon:"icon-tab",label:"标签页",name:Vo,mask:!1,event:["tabClick","tabChange","tabRemove","tabAdd","edit"],children:"elTabPane",rule:()=>({type:Vo,style:{width:"100%"},children:[]}),props:(e,{t:t})=>Ci(t,Vo+".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:ki(t,[{label:"top",value:"top"},{label:"right",value:"right"},{label:"left",value:"left"}])},{type:"switch",field:"stretch"}])},Bo="elButton",zo={menu:"aide",icon:"icon-button",label:"按钮",name:Bo,mask:!0,event:["click"],rule:({t:e})=>({type:Bo,props:{},children:[e("com.elButton.name")]}),props:(e,{t:t})=>Ci(t,Bo+".props",[{type:"input",field:"formCreateChild"},{type:"select",field:"size",options:ki(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"}])},Ho="fcEditor",Uo={menu:"main",icon:"icon-editor",label:"富文本框",name:Ho,input:!0,event:["change"],validate:["string"],rule:({t:e})=>({type:Ho,field:ji(),title:e("com.fcEditor.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ci(t,Ho+".props",[{type:"switch",field:"disabled"}])},Wo="group",Go={menu:"subform",icon:"icon-subform",label:"子表单",name:Wo,inside:!1,drag:!0,dragBtn:!0,mask:!1,input:!0,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:ji(),title:e("com.group.name"),info:"",$required:!1,props:{},children:[]}),props:(e,{t:t})=>Ci(t,Wo+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"syncDisabled",value:!0},{type:"switch",field:"button",value:!0},{type:"switch",field:"sortBtn",value:!0},{type:"inputNumber",field:"expand"},{type:"inputNumber",field:"min"},{type:"inputNumber",field:"max"}])},$o="subForm",Qo={menu:"subform",icon:"icon-group",label:"分组",name:$o,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:ji(),title:e("com.subForm.name"),info:"",$required:!1,props:{},children:[]}),props:(e,{t:t})=>Ci(t,$o+".props",[{type:"switch",field:"disabled"},{type:"switch",field:"syncDisabled",value:!0}])},Yo="elCard",qo={menu:"layout",icon:"icon-card",label:"卡片",name:Yo,drag:!0,inside:!1,mask:!1,rule:({t:e})=>({type:Yo,props:{header:e("com.elCard.props.header")},style:{width:"100%"},children:[]}),props:(e,{t:t})=>Ci(t,Yo+".props",[{type:"input",field:"header"},{type:"select",field:"shadow",value:"always",options:ki(t,[{label:"always",value:"always"},{label:"never",value:"never"},{label:"hover",value:"hover"}])}])},Ko="elCollapse",Xo={menu:"layout",icon:"icon-collapse",label:"折叠面板",name:Ko,mask:!1,children:"elCollapseItem",event:["change"],rule:()=>({type:Ko,props:{},style:{width:"100%"},children:[]}),props:(e,{t:t})=>Ci(t,Ko+".props",[{type:"switch",field:"accordion"}])},Jo="elCollapseItem",Zo={icon:"icon-cell",label:"面板",name:Jo,drag:!0,dragBtn:!1,inside:!0,mask:!1,rule:({t:e})=>({type:Jo,props:{title:e("com.elCollapseItem.name")},style:{},children:[]}),props:(e,{t:t})=>Ci(t,Jo+".props",[{type:"input",field:"title"},{type:"input",field:"name"},{type:"switch",field:"disabled"}])},er="elTreeSelect",tr={menu:"main",icon:"icon-tree-select",label:"树形选择",name:er,input:!0,event:["change","visibleChange","removeTag","clear","blur","focus"],validate:["string","number","array"],rule:({t:e})=>({type:er,field:ji(),title:e("com.elTreeSelect.name"),info:"",effect:{fetch:""},$required:!1,props:{nodeKey:"value",showCheckbox:!0,data:hi(e("props.option"),{label:"label",value:"value"},3)}}),watch:{multiple({rule:e}){e.key=ji()}},props:(e,{t:t})=>Ci(t,er+".props",[gi(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"}])},nr="elTag",ir={menu:"aide",icon:"icon-tag",label:"标签",name:nr,mask:!0,event:["click","close"],rule:({t:e})=>({type:nr,title:"",native:!0,children:[e("com.elTag.name")]}),watch:{formCreateNative({value:e,rule:t}){e&&(t.title="")}},props:(e,{t:t})=>Ci(t,nr+".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:ki(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"}])},or="html",rr={menu:"aide",icon:"icon-html",label:"HTML",name:or,rule:()=>({type:or,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})=>Ci(t,or+".props",[{type:"switch",field:"formCreateNative",props:{activeValue:!1,inactiveValue:!0},control:[{value:!1,rule:["formCreateTitle"]}]},{type:"input",field:"formCreateTitle"},{type:"HtmlEditor",field:"formCreateChild"}])},ar="fcTable",lr={menu:"layout",icon:"icon-table",label:"表格布局",name:ar,inside:!1,mask:!1,rule:()=>({type:ar,props:{rule:{row:3,col:4,style:{},class:{},layout:[]}},children:[]}),props:(e,{t:t})=>Ci(t,ar+".props",[{type:"switch",field:"border",value:!0},{type:"ColorInput",field:"borderColor"},{type:"input",field:"borderWidth"}])},sr="tableForm",ur={menu:"subform",icon:"icon-table-form",label:"表格表单",name:sr,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:sr,field:ji(),title:e("com.tableForm.name"),info:"",props:{},children:[]}),props:(e,{t:t})=>Ci(t,sr+".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}}])},cr="tableFormColumn",dr="elImage",fr="signaturePad",pr="fcTitle",hr={menu:"aide",icon:"icon-title",label:"标题",name:pr,event:[],rule:({t:e})=>({type:"fcTitle",props:{title:e("props.title")}}),props:(e,{t:t})=>Ci(t,pr+".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:ki(t,[{label:"left",value:"left"},{label:"center",value:"center"},{label:"right",value:"right"}])}])},mr=[Gi,Qi,qi,Xi,zi,Ui,Zi,to,fo,ro,ao,io,so,uo,ho,Co,Eo,Oo,Mo,tr,Uo,{menu:"main",icon:"icon-sign",label:"手写签名",name:fr,input:!0,mask:!0,languageKey:["signaturePadTip","signaturePadTitle","reset","ok"],event:["change","remove"],rule:({t:e})=>({type:fr,field:ji(),title:e("com.signaturePad.name"),info:"",$required:!1,props:{}}),props:(e,{t:t})=>Ci(t,fr+".props",[{type:"ColorInput",field:"penColor"},{type:"switch",field:"disabled"}])},Go,Qo,ur,{icon:"icon-cell",name:cr,aide:!0,drag:!0,dragBtn:!1,mask:!1,style:!1,rule:({t:e})=>({type:cr,props:{label:e("com.tableFormColumn.label"),width:"auto"},children:[]}),props:(e,{t:t})=>Ci(t,cr+".props",[{type:"input",field:"label"},{type:"select",field:"align",options:ki(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"}])},No,zo,Fo,hr,rr,Ao,ir,{menu:"aide",icon:"icon-image",label:"图片",name:dr,rule:()=>({type:dr,title:"",style:{width:"100px",height:"100px"},props:{src:"https://static.form-create.com/example.png"}}),props:(e,{t:t})=>Ci(t,dr+".props",[{type:"input",field:"src"}])},go,lr,jo,Po,qo,Xo,bo,xo,Zo];
  20. /**!
  21. * Sortable 1.14.0
  22. * @author RubaXa <trash@rubaxa.org>
  23. * @author owenm <owen23355@gmail.com>
  24. * @license MIT
  25. */
  26. function gr(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 vr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(n),!0).forEach(function(t){br(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _r(e){return(_r="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 br(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yr(){return yr=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},yr.apply(this,arguments)}function xr(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 wr(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Ar=wr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),kr=wr(/Edge/i),Cr=wr(/firefox/i),Sr=wr(/safari/i)&&!wr(/chrome/i)&&!wr(/android/i),Er=wr(/iP(ad|od|hone)/i),Tr=wr(/chrome/i)&&wr(/android/i),Or={capture:!1,passive:!1};function Rr(e,t,n){e.addEventListener(t,n,!Ar&&Or)}function Mr(e,t,n){e.removeEventListener(t,n,!Ar&&Or)}function Dr(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 Nr(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Ir(e,t,n,i){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&Dr(e,t):Dr(e,t))||i&&e===n)return e;if(e===n)break}while(e=Nr(e))}return null}var Fr,Lr=/\s+/g;function Pr(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(Lr," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(Lr," ")}}function Vr(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 jr(e,t){var n="";if("string"==typeof e)n=e;else do{var i=Vr(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 Br(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 zr(){return document.scrollingElement||document.documentElement}function Hr(e,t,n,i,o){if(e.getBoundingClientRect||e===window){var r,a,l,s,u,c,d;if(e!==window&&e.parentNode&&e!==zr()?(a=(r=e.getBoundingClientRect()).top,l=r.left,s=r.bottom,u=r.right,c=r.height,d=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!Ar))do{if(o&&o.getBoundingClientRect&&("none"!==Vr(o,"transform")||n&&"static"!==Vr(o,"position"))){var f=o.getBoundingClientRect();a-=f.top+parseInt(Vr(o,"border-top-width")),l-=f.left+parseInt(Vr(o,"border-left-width")),s=a+r.height,u=l+r.width;break}}while(o=o.parentNode);if(i&&e!==window){var p=jr(o||e),h=p&&p.a,m=p&&p.d;p&&(s=(a/=m)+(c/=m),u=(l/=h)+(d/=h))}return{top:a,left:l,bottom:s,right:u,width:d,height:c}}}function Ur(e,t,n){for(var i=Yr(e,!0),o=Hr(e)[t];i;){if(!(o>=Hr(i)[n]))return i;if(i===zr())break;i=Yr(i,!1)}return!1}function Wr(e,t,n,i){for(var o=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Xa.ghost&&(i||a[r]!==Xa.dragged)&&Ir(a[r],n.draggable,e,!1)){if(o===t)return a[r];o++}r++}return null}function Gr(e,t){for(var n=e.lastElementChild;n&&(n===Xa.ghost||"none"===Vr(n,"display")||t&&!Dr(n,t));)n=n.previousElementSibling;return n||null}function $r(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"!==e.nodeName.toUpperCase()&&e!==Xa.clone&&(!t||Dr(e,t))&&n++;return n}function Qr(e){var t=0,n=0,i=zr();if(e)do{var o=jr(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 Yr(e,t){if(!e||!e.getBoundingClientRect)return zr();var n=e,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Vr(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 zr();if(i||t)return n;i=!0}}}while(n=n.parentNode);return zr()}function qr(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 Kr(e,t){return function(){if(!Fr){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),Fr=setTimeout(function(){Fr=void 0},t)}}}function Xr(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Jr(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 Zr="Sortable"+(new Date).getTime();function ea(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach(function(e){if("none"!==Vr(e,"display")&&e!==Xa.ghost){t.push({target:e,rect:Hr(e)});var n=vr({},t[t.length-1].rect);if(e.thisAnimationDuration){var i=jr(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=Hr(n),s=n.prevFromRect,u=n.prevToRect,c=e.rect,d=jr(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&qr(s,l)&&!qr(a,l)&&(c.top-l.top)/(c.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}(c,s,u,i.options)),qr(l,a)||(n.prevFromRect=a,n.prevToRect=l,t||(t=i.options.animation),i.animate(n,c,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){Vr(e,"transition",""),Vr(e,"transform","");var o=jr(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,Vr(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),Vr(e,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),Vr(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){Vr(e,"transition",""),Vr(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},i)}}}}var ta=[],na={initializeByDefault:!0},ia={mount:function(e){for(var t in na)na.hasOwnProperty(t)&&!(t in e)&&(e[t]=na[t]);ta.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),ta.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=e+"Global";ta.forEach(function(i){!t[i.pluginName]||(t[i.pluginName][o]&&t[i.pluginName][o](vr({sortable:t},n)),t.options[i.pluginName]&&t[i.pluginName][e]&&t[i.pluginName][e](vr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){for(var o in ta.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,yr(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 ta.forEach(function(i){"function"==typeof i.eventProperties&&yr(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return ta.forEach(function(o){!e[o.pluginName]||o.optionListeners&&"function"==typeof o.optionListeners[t]&&(i=o.optionListeners[t].call(e[o.pluginName],n))}),i}};var oa=["evt"],ra=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.evt,o=xr(n,oa);ia.pluginEvent.bind(Xa)(e,t,vr({dragEl:la,parentEl:sa,ghostEl:ua,rootEl:ca,nextEl:da,lastDownEl:fa,cloneEl:pa,cloneHidden:ha,dragStarted:Ea,putSortable:ya,activeSortable:Xa.active,originalEvent:i,oldIndex:ma,oldDraggableIndex:va,newIndex:ga,newDraggableIndex:_a,hideGhostForTarget:Qa,unhideGhostForTarget:Ya,cloneNowHidden:function(){ha=!0},cloneNowShown:function(){ha=!1},dispatchSortableEvent:function(e){aa({sortable:t,name:e,originalEvent:i})}},o))};function aa(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,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,f=e.originalEvent,p=e.putSortable,h=e.extraEventProperties;if(t=t||n&&n[Zr]){var m,g=t.options,v="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||Ar||kr?(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=u,m.oldDraggableIndex=c,m.newDraggableIndex=d,m.originalEvent=f,m.pullMode=p?p.lastPutMode:void 0;var _=vr(vr({},h),ia.getEventProperties(i,t));for(var b in _)m[b]=_[b];n&&n.dispatchEvent(m),g[v]&&g[v].call(t,m)}}(vr({putSortable:ya,cloneEl:pa,targetEl:la,rootEl:ca,oldIndex:ma,oldDraggableIndex:va,newIndex:ga,newDraggableIndex:_a},e))}var la,sa,ua,ca,da,fa,pa,ha,ma,ga,va,_a,ba,ya,xa,wa,Aa,ka,Ca,Sa,Ea,Ta,Oa,Ra,Ma,Da=!1,Na=!1,Ia=[],Fa=!1,La=!1,Pa=[],Va=!1,ja=[],Ba=typeof document<"u",za=Er,Ha=kr||Ar?"cssFloat":"float",Ua=Ba&&!Tr&&!Er&&"draggable"in document.createElement("div"),Wa=function(){if(Ba){if(Ar)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ga=function(e,t){var n=Vr(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Wr(e,0,t),r=Wr(e,1,t),a=o&&Vr(o),l=r&&Vr(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Hr(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Hr(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 c="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==c?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=i&&"none"===n[Ha]||r&&"none"===n[Ha]&&s+u>i)?"vertical":"horizontal"},$a=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"!=_r(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},Qa=function(){!Wa&&ua&&Vr(ua,"display","none")},Ya=function(){!Wa&&ua&&Vr(ua,"display","")};Ba&&document.addEventListener("click",function(e){if(Na)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Na=!1,!1},!0);var qa=function(e){if(la){var t=function(e,t){var n;return Ia.some(function(i){var o=i[Zr].options.emptyInsertThreshold;if(o&&!Gr(i)){var r=Hr(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[Zr]._onDragOver(n)}}},Ka=function(e){la&&la.parentNode[Zr]._isOutsideThisEl(e.target)};function Xa(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=yr({},t),e[Zr]=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 Ga(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!==Xa.supportPointer&&"PointerEvent"in window&&!Sr,emptyInsertThreshold:5};for(var i in ia.initializePlugins(this,e,n),n)!(i in t)&&(t[i]=n[i]);for(var o in $a(t),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&Ua,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Rr(e,"pointerdown",this._onTapStart):(Rr(e,"mousedown",this._onTapStart),Rr(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Rr(e,"dragover",this),Rr(e,"dragenter",this)),Ia.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),yr(this,ea())}function Ja(e,t,n,i,o,r,a,l){var s,u,c=e[Zr],d=c.options.onMove;return!window.CustomEvent||Ar||kr?(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||Hr(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),d&&(u=d.call(c,s,a)),u}function Za(e){e.draggable=!1}function el(){Va=!1}function tl(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 nl(e){return setTimeout(e,0)}function il(e){return clearTimeout(e)}Xa.prototype={constructor:Xa,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ta=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,la):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,u=i.filter;if(function(e){ja.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&ja.push(i)}}(n),!la&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||i.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!Sr||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=Ir(l,i.draggable,n,!1))&&l.animated||fa===l)){if(ma=$r(l),va=$r(l,i.draggable),"function"==typeof u){if(u.call(this,e,l,this))return aa({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),ra("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some(function(i){if(i=Ir(s,i.trim(),n,!1))return aa({sortable:t,rootEl:i,name:"filter",targetEl:l,fromEl:n,toEl:n}),ra("filter",t,{evt:e}),!0})))return void(o&&e.cancelable&&e.preventDefault());i.handle&&!Ir(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&&!la&&n.parentNode===r){var s=Hr(n);if(ca=r,sa=(la=n).parentNode,da=la.nextSibling,fa=n,ba=a.group,Xa.dragged=la,xa={target:la,clientX:(t||e).clientX,clientY:(t||e).clientY},Ca=xa.clientX-s.left,Sa=xa.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,la.style["will-change"]="all",i=function(){ra("delayEnded",o,{evt:e}),Xa.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!Cr&&o.nativeDraggable&&(la.draggable=!0),o._triggerDragStart(e,t),aa({sortable:o,name:"choose",originalEvent:e}),Pr(la,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){Br(la,e.trim(),Za)}),Rr(l,"dragover",qa),Rr(l,"mousemove",qa),Rr(l,"touchmove",qa),Rr(l,"mouseup",o._onDrop),Rr(l,"touchend",o._onDrop),Rr(l,"touchcancel",o._onDrop),Cr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,la.draggable=!0),ra("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(kr||Ar))i();else{if(Xa.eventCanceled)return void this._onDrop();Rr(l,"mouseup",o._disableDelayedDrag),Rr(l,"touchend",o._disableDelayedDrag),Rr(l,"touchcancel",o._disableDelayedDrag),Rr(l,"mousemove",o._delayedDragTouchMoveHandler),Rr(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&Rr(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(){la&&Za(la),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Mr(e,"mouseup",this._disableDelayedDrag),Mr(e,"touchend",this._disableDelayedDrag),Mr(e,"touchcancel",this._disableDelayedDrag),Mr(e,"mousemove",this._delayedDragTouchMoveHandler),Mr(e,"touchmove",this._delayedDragTouchMoveHandler),Mr(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?Rr(document,"pointermove",this._onTouchMove):Rr(document,t?"touchmove":"mousemove",this._onTouchMove):(Rr(la,"dragend",this),Rr(ca,"dragstart",this._onDragStart));try{document.selection?nl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(Da=!1,ca&&la){ra("dragStarted",this,{evt:t}),this.nativeDraggable&&Rr(document,"dragover",Ka);var n=this.options;!e&&Pr(la,n.dragClass,!1),Pr(la,n.ghostClass,!0),Xa.active=this,e&&this._appendGhost(),aa({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(wa){this._lastX=wa.clientX,this._lastY=wa.clientY,Qa();for(var e=document.elementFromPoint(wa.clientX,wa.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(wa.clientX,wa.clientY))!==t;)t=e;if(la.parentNode[Zr]._isOutsideThisEl(e),t)do{if(t[Zr]){if(t[Zr]._onDragOver({clientX:wa.clientX,clientY:wa.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Ya()}},_onTouchMove:function(e){if(xa){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,o=e.touches?e.touches[0]:e,r=ua&&jr(ua,!0),a=ua&&r&&r.a,l=ua&&r&&r.d,s=za&&Ma&&Qr(Ma),u=(o.clientX-xa.clientX+i.x)/(a||1)+(s?s[0]-Pa[0]:0)/(a||1),c=(o.clientY-xa.clientY+i.y)/(l||1)+(s?s[1]-Pa[1]:0)/(l||1);if(!Xa.active&&!Da){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(ua){r?(r.e+=u-(Aa||0),r.f+=c-(ka||0)):r={a:1,b:0,c:0,d:1,e:u,f:c};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Vr(ua,"webkitTransform",d),Vr(ua,"mozTransform",d),Vr(ua,"msTransform",d),Vr(ua,"transform",d),Aa=u,ka=c,wa=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!ua){var e=this.options.fallbackOnBody?document.body:ca,t=Hr(la,!0,za,!0,e),n=this.options;if(za){for(Ma=e;"static"===Vr(Ma,"position")&&"none"===Vr(Ma,"transform")&&Ma!==document;)Ma=Ma.parentNode;Ma!==document.body&&Ma!==document.documentElement?(Ma===document&&(Ma=zr()),t.top+=Ma.scrollTop,t.left+=Ma.scrollLeft):Ma=zr(),Pa=Qr(Ma)}Pr(ua=la.cloneNode(!0),n.ghostClass,!1),Pr(ua,n.fallbackClass,!0),Pr(ua,n.dragClass,!0),Vr(ua,"transition",""),Vr(ua,"transform",""),Vr(ua,"box-sizing","border-box"),Vr(ua,"margin",0),Vr(ua,"top",t.top),Vr(ua,"left",t.left),Vr(ua,"width",t.width),Vr(ua,"height",t.height),Vr(ua,"opacity","0.8"),Vr(ua,"position",za?"absolute":"fixed"),Vr(ua,"zIndex","100000"),Vr(ua,"pointerEvents","none"),Xa.ghost=ua,e.appendChild(ua),Vr(ua,"transform-origin",Ca/parseInt(ua.style.width)*100+"% "+Sa/parseInt(ua.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,o=n.options;ra("dragStart",this,{evt:e}),Xa.eventCanceled?this._onDrop():(ra("setupClone",this),Xa.eventCanceled||((pa=Jr(la)).draggable=!1,pa.style["will-change"]="",this._hideClone(),Pr(pa,this.options.chosenClass,!1),Xa.clone=pa),n.cloneId=nl(function(){ra("clone",n),!Xa.eventCanceled&&(n.options.removeCloneOnHide||ca.insertBefore(pa,la),n._hideClone(),aa({sortable:n,name:"clone"}))}),!t&&Pr(la,o.dragClass,!0),t?(Na=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Mr(document,"mouseup",n._onDrop),Mr(document,"touchend",n._onDrop),Mr(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,la)),Rr(document,"drop",n),Vr(la,"transform","translateZ(0)")),Da=!0,n._dragStartId=nl(n._dragStarted.bind(n,t,e)),Rr(document,"selectstart",n),Ea=!0,Sr&&Vr(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,u=Xa.active,c=ba===s,d=l.sort,f=ya||u,p=this,h=!1;if(!Va){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=Ir(a,l.draggable,r,!0),O("dragOver"),Xa.eventCanceled)return h;if(la.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return M(!1);if(Na=!1,u&&!l.disabled&&(c?d||(i=sa!==ca):ya===this||(this.lastPutMode=ba.checkPull(this,u,la,e))&&s.checkPut(this,u,la,e))){if(o="vertical"===this._getDirection(e,a),t=Hr(la),O("dragOverValid"),Xa.eventCanceled)return h;if(i)return sa=ca,R(),this._hideClone(),O("revert"),Xa.eventCanceled||(da?ca.insertBefore(la,da):ca.appendChild(la)),M(!0);var m=Gr(r,l.draggable);if(!m||function(e,t,n){var i=Hr(Gr(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===la)return M(!1);if(m&&r===e.target&&(a=m),a&&(n=Hr(a)),!1!==Ja(ca,r,la,t,a,n,e,!!a))return R(),r.appendChild(la),sa=r,D(),M(!0)}else if(m&&function(e,t,n){var i=Hr(Wr(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=Wr(r,0,l,!0);if(g===la)return M(!1);if(n=Hr(a=g),!1!==Ja(ca,r,la,t,a,n,e,!1))return R(),r.insertBefore(la,g),sa=r,D(),M(!0)}else if(a.parentNode===r){n=Hr(a);var v,_,b,y=la.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}(la.animated&&la.toRect||t,a.animated&&a.toRect||n,o),w=o?"top":"left",A=Ur(a,"top","top")||Ur(la,"top","top"),k=A?A.scrollTop:void 0;if(Ta!==a&&(_=n[w],Fa=!1,La=!x&&l.invertSwap||y),v=function(e,t,n,i,o,r,a,l){var s=i?e.clientY:e.clientX,u=i?n.height:n.width,c=i?n.top:n.left,d=i?n.bottom:n.right,f=!1;if(!a)if(l&&Ra<u*o){if(!Fa&&(1===Oa?s>c+u*r/2:s<d-u*r/2)&&(Fa=!0),Fa)f=!0;else if(1===Oa?s<c+Ra:s>d-Ra)return-Oa}else if(s>c+u*(1-o)/2&&s<d-u*(1-o)/2)return function(e){return $r(la)<$r(e)?1:-1}(t);return f=f||a,f&&(s<c+u*r/2||s>d-u*r/2)?s>c+u/2?1:-1:0}(e,a,n,o,x?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,La,Ta===a),0!==v){var C=$r(la);do{C-=v,b=sa.children[C]}while(b&&("none"===Vr(b,"display")||b===ua))}if(0===v||b===a)return M(!1);Ta=a,Oa=v;var S=a.nextElementSibling,E=!1,T=Ja(ca,r,la,t,a,n,e,E=1===v);if(!1!==T)return(1===T||-1===T)&&(E=1===T),Va=!0,setTimeout(el,30),R(),E&&!S?r.appendChild(la):a.parentNode.insertBefore(la,E?S:a),A&&Xr(A,0,k-A.scrollTop),sa=la.parentNode,void 0!==_&&!La&&(Ra=Math.abs(_-Hr(a)[w])),D(),M(!0)}if(r.contains(la))return M(!1)}return!1}function O(l,s){ra(l,p,vr({evt:e,isOwner:c,axis:o?"vertical":"horizontal",revert:i,dragRect:t,targetRect:n,canSort:d,fromSortable:f,target:a,completed:M,onMove:function(n,i){return Ja(ca,r,la,t,n,Hr(n),e,i)},changed:D},s))}function R(){O("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function M(t){return O("dragOverCompleted",{insertion:t}),t&&(c?u._hideClone():u._showClone(p),p!==f&&(Pr(la,ya?ya.options.ghostClass:u.options.ghostClass,!1),Pr(la,l.ghostClass,!0)),ya!==p&&p!==Xa.active?ya=p:p===Xa.active&&ya&&(ya=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll(function(){O("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===la&&!la.animated||a===r&&!a.animated)&&(Ta=null),!l.dragoverBubble&&!e.rootEl&&a!==document&&(la.parentNode[Zr]._isOutsideThisEl(e.target),!t&&qa(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function D(){ga=$r(la),_a=$r(la,l.draggable),aa({sortable:p,name:"change",toEl:r,newIndex:ga,newDraggableIndex:_a,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Mr(document,"mousemove",this._onTouchMove),Mr(document,"touchmove",this._onTouchMove),Mr(document,"pointermove",this._onTouchMove),Mr(document,"dragover",qa),Mr(document,"mousemove",qa),Mr(document,"touchmove",qa)},_offUpEvents:function(){var e=this.el.ownerDocument;Mr(e,"mouseup",this._onDrop),Mr(e,"touchend",this._onDrop),Mr(e,"pointerup",this._onDrop),Mr(e,"touchcancel",this._onDrop),Mr(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ga=$r(la),_a=$r(la,n.draggable),ra("drop",this,{evt:e}),sa=la&&la.parentNode,ga=$r(la),_a=$r(la,n.draggable),Xa.eventCanceled||(Da=!1,La=!1,Fa=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),il(this.cloneId),il(this._dragStartId),this.nativeDraggable&&(Mr(document,"drop",this),Mr(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sr&&Vr(document.body,"user-select",""),Vr(la,"transform",""),e&&(Ea&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),ua&&ua.parentNode&&ua.parentNode.removeChild(ua),(ca===sa||ya&&"clone"!==ya.lastPutMode)&&pa&&pa.parentNode&&pa.parentNode.removeChild(pa),la&&(this.nativeDraggable&&Mr(la,"dragend",this),Za(la),la.style["will-change"]="",Ea&&!Da&&Pr(la,ya?ya.options.ghostClass:this.options.ghostClass,!1),Pr(la,this.options.chosenClass,!1),aa({sortable:this,name:"unchoose",toEl:sa,newIndex:null,newDraggableIndex:null,originalEvent:e}),ca!==sa?(ga>=0&&(aa({rootEl:sa,name:"add",toEl:sa,fromEl:ca,originalEvent:e}),aa({sortable:this,name:"remove",toEl:sa,originalEvent:e}),aa({rootEl:sa,name:"sort",toEl:sa,fromEl:ca,originalEvent:e}),aa({sortable:this,name:"sort",toEl:sa,originalEvent:e})),ya&&ya.save()):ga!==ma&&ga>=0&&(aa({sortable:this,name:"update",toEl:sa,originalEvent:e}),aa({sortable:this,name:"sort",toEl:sa,originalEvent:e})),Xa.active&&((null==ga||-1===ga)&&(ga=ma,_a=va),aa({sortable:this,name:"end",toEl:sa,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){ra("nulling",this),ca=la=sa=ua=da=pa=fa=ha=xa=wa=Ea=ga=_a=ma=va=Ta=Oa=ya=ba=Xa.dragged=Xa.ghost=Xa.clone=Xa.active=null,ja.forEach(function(e){e.checked=!0}),ja.length=Aa=ka=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":la&&(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++)Ir(e=n[i],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||tl(e));return t},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(e,t){var o=i.children[t];Ir(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 Ir(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=ia.modifyOption(this,e,t);n[e]=typeof i<"u"?i:t,"group"===e&&$a(n)},destroy:function(){ra("destroy",this);var e=this.el;e[Zr]=null,Mr(e,"mousedown",this._onTapStart),Mr(e,"touchstart",this._onTapStart),Mr(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Mr(e,"dragover",this),Mr(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ia.splice(Ia.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ha){if(ra("hideClone",this),Xa.eventCanceled)return;Vr(pa,"display","none"),this.options.removeCloneOnHide&&pa.parentNode&&pa.parentNode.removeChild(pa),ha=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ha){if(ra("showClone",this),Xa.eventCanceled)return;la.parentNode!=ca||this.options.group.revertClone?da?ca.insertBefore(pa,da):ca.appendChild(pa):ca.insertBefore(pa,la),this.options.group.revertClone&&this.animate(la,pa),Vr(pa,"display",""),ha=!1}}else this._hideClone()}},Ba&&Rr(document,"touchmove",function(e){(Xa.active||Da)&&e.cancelable&&e.preventDefault()}),Xa.utils={on:Rr,off:Mr,css:Vr,find:Br,is:function(e,t){return!!Ir(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:Kr,closest:Ir,toggleClass:Pr,clone:Jr,index:$r,nextTick:nl,cancelNextTick:il,detectDirection:Ga,getChild:Wr},Xa.get=function(e){return e[Zr]},Xa.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&&(Xa.utils=vr(vr({},Xa.utils),e.utils)),ia.mount(e)})},Xa.create=function(e,t){return new Xa(e,t)},Xa.version="1.14.0";var ol,rl,al,ll,sl,ul,cl=[],dl=!1;function fl(){cl.forEach(function(e){clearInterval(e.pid)}),cl=[]}function pl(){clearInterval(ul)}var hl=Kr(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,u=zr(),c=!1;rl!==n&&(rl=n,fl(),ol=t.scroll,o=t.scrollFn,!0===ol&&(ol=Yr(n,!0)));var d=0,f=ol;do{var p=f,h=Hr(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=Vr(p),S=p.scrollLeft,E=p.scrollTop;p===u?(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),O=w&&(Math.abs(g-a)<=l&&E+y<k)-(Math.abs(m-a)<=l&&!!E);if(!cl[d])for(var R=0;R<=d;R++)cl[R]||(cl[R]={});(cl[d].vx!=T||cl[d].vy!=O||cl[d].el!==p)&&(cl[d].el=p,cl[d].vx=T,cl[d].vy=O,clearInterval(cl[d].pid),(0!=T||0!=O)&&(c=!0,cl[d].pid=setInterval(function(){i&&0===this.layer&&Xa.active._onTouchMove(sl);var t=cl[this.layer].vy?cl[this.layer].vy*s:0,n=cl[this.layer].vx?cl[this.layer].vx*s:0;"function"==typeof o&&"continue"!==o.call(Xa.dragged.parentNode[Zr],n,t,e,sl,cl[this.layer].el)||Xr(cl[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==u&&(f=Yr(f,!1)));dl=c}},30),ml=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 u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(u.clientX,u.clientY);l(),s&&!s.el.contains(c)&&(r("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function gl(){}function vl(){}function _l(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function bl(e,t,n){const i=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,i)}gl.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=Wr(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:ml},yr(gl,{pluginName:"revertOnSpill"}),vl.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:ml},yr(vl,{pluginName:"removeOnSpill"}),Xa.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?Rr(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Rr(document,"pointermove",this._handleFallbackAutoScroll):t.touches?Rr(document,"touchmove",this._handleFallbackAutoScroll):Rr(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?Mr(document,"dragover",this._handleAutoScroll):(Mr(document,"pointermove",this._handleFallbackAutoScroll),Mr(document,"touchmove",this._handleFallbackAutoScroll),Mr(document,"mousemove",this._handleFallbackAutoScroll)),pl(),fl(),clearTimeout(Fr),Fr=void 0},nulling:function(){sl=rl=ol=dl=ul=al=ll=null,cl.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(sl=e,t||this.options.forceAutoScrollFallback||kr||Ar||Sr){hl(e,this.options,r,t);var a=Yr(r,!0);dl&&(!ul||i!==al||o!==ll)&&(ul&&pl(),ul=setInterval(function(){var r=Yr(document.elementFromPoint(i,o),!0);r!==a&&(a=r,fl()),hl(e,n.options,r,t)},10),al=i,ll=o)}else{if(!this.options.bubbleScroll||Yr(r,!0)===zr())return void fl();hl(e,this.options,Yr(r,!1),!1)}}},yr(e,{pluginName:"scroll",initializeByDefault:!0})}),Xa.mount(vl,gl);const yl=typeof window<"u"?window.console:global.console;const xl=/-(\w)/g,wl=function(e){const t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}(e=>e.replace(xl,(e,t)=>t.toUpperCase())),Al=["Start","Add","Remove","Update","End"],kl=["Choose","Unchoose","Sort","Filter","Clone"],Cl=["Move"],Sl=[Cl,Al,kl].flatMap(e=>e).map(e=>"on".concat(e)),El={manage:Cl,manageAndEmit:Al,emit:kl};const Tl=["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 Ol(e){return["id","class","role","style"].includes(e)||e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("on")}function Rl(e){return e.reduce((e,[t,n])=>(e[t]=n,e),{})}function Ml(e){return Object.entries(e).filter(([e,t])=>!Ol(e)).map(([e,t])=>[wl(e),t]).filter(([e,t])=>!function(e){return-1!==Sl.indexOf(e)}(e))}const Dl=({el:e})=>e,Nl=e=>e.__draggable_context;class Il{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})(Dl(e),{element:t[n],index:n})})}getUnderlyingVm(e){return Nl(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=Nl(r);if(a)return a.index;if(0===i)return 0;const l=Dl(n[0]);return e<[...o].findIndex(e=>e===l)?0:i}}function Fl(e){const t=function(e){return["transition-group","TransitionGroup"].includes(e)}(e),n=!function(e){return Tl.includes(e)}(e)&&!t;return{transition:t,externalComponent:n,tag:n?c(e):t?Q:e}}function Ll({$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=Fl(t);return new Il({nodes:o,root:r,realList:n})}function Pl(t,n){e(()=>this.$emit(t.toLowerCase(),n))}function Vl(e){return(t,n)=>{if(null!==this.realList)return this["onDrag".concat(e)](t,n)}}function jl(e){const t=Vl.call(this,e);return(n,i)=>{t.call(this,n,i),Pl.call(this,e,n)}}let Bl=null;const zl={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}},Hl=["update:modelValue","change",...[...El.manageAndEmit,...El.emit].map(e=>e.toLowerCase())],Ul=a({name:"draggable",inheritAttrs:!1,props:zl,emits:Hl,data:()=>({error:!1}),render(){try{this.error=!1;const{$slots:e,$attrs:t,tag:n,componentData:i,realList:o,getKey:r}=this,a=Ll({$slots:e,tag:n,realList:o,getKey:r});this.componentStructure=a;const l=function({$attrs:e,componentData:t={}}){return{...Rl(Object.entries(e).filter(([e,t])=>Ol(e))),...t}}({$attrs:t,componentData:i});return a.render(h,l)}catch(e){return this.error=!0,h("pre",{style:{color:"red"}},e.stack)}},created(){null!==this.list&&null!==this.modelValue&&yl.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=Rl(Ml(e));Object.entries(t).forEach(([e,t])=>{El[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=>jl.call(this,e),emit:e=>Pl.bind(this,e),manage:e=>Vl.call(this,e)}}),o=1===t.nodeType?t:t.parentElement;this._sortable=new Xa(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||Ml(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(t){e(()=>this.$emit("change",t))},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),Bl=e.item},onDragAdd(e){const t=e.item._underlying_vm_;if(void 0===t)return;_l(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(bl(this.$el,e.item,e.oldIndex),"clone"===e.pullMode)return void _l(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){_l(e.item),bl(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(Bl)&&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(){Bl=null}}}),Wl=[{name:"main",title:"基础组件",list:[]},{name:"subform",title:"子表单组件",list:[]},{name:"aide",title:"辅助组件",list:[]},{name:"layout",title:"布局组件",list:[]}],Gl=qn,$l=qn.factory();let Ql=null,Yl=d(null);function ql(...e){return Ql(...e)}const Kl=e=>{Yl.value=e||li;const t=Ai(Yl);return Ql=t.t,t};Kl();typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"&&self;var Xl,Jl={exports:{}};function Zl(){return Xl||(Xl=1,Jl.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),u=s&&/Qt\/\d+\.\d+/.test(e),c=!r&&/Chrome\/(\d+)/.exec(e),d=c&&+c[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&&(u||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 O(e,t){return T(e).appendChild(t)}function R(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=R(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 F(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 L=function(e){e.select()};function P(e){return e.display.wrapper.ownerDocument}function V(e){return P(e).defaultView}function j(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function B(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?L=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(L=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,G={toString:function(){return"CodeMirror.Pass"}},$={scroll:!1},Q={origin:"*mouse"},Y={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&&B(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 ue(e,t,n){for(;(n<0?t>0:t<e.length)&&se(e.charAt(t));)t+=n;return t}function ce(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 u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!i.test(e))return!1;for(var c=e.length,d=[],f=0;f<c;++f)d.push(n(e.charCodeAt(f)));for(var p=0,h=u;p<c;++p){var m=d[p];"m"==m?d[p]=h:h=m}for(var g=0,v=u;g<c;++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<c-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<c;++w){var A=d[w];if(","==A)d[w]="N";else if("%"==A){var k=void 0;for(k=w+1;k<c&&"%"==d[k];++k);for(var C=w&&"!"==d[w-1]||k<c&&"1"==d[k]?"1":"N",S=w;S<k;++S)d[S]=C;w=k-1}}for(var E=0,T=u;E<c;++E){var O=d[E];"L"==T&&"1"==O?d[E]="L":r.test(O)&&(T=O)}for(var R=0;R<c;++R)if(o.test(d[R])){var M=void 0;for(M=R+1;M<c&&o.test(d[M]);++M);for(var D="L"==(R?d[R-1]:u),N=D==("L"==(M<c?d[M]:u))?D?"L":"R":u,I=R;I<M;++I)d[I]=N;R=M-1}for(var F,L=[],P=0;P<c;)if(a.test(d[P])){var V=P;for(++P;P<c&&a.test(d[P]);++P);L.push(new s(0,V,P))}else{var j=P,B=L.length,z="rtl"==t?1:0;for(++P;P<c&&"L"!=d[P];++P);for(var H=j;H<P;)if(l.test(d[H])){j<H&&(L.splice(B,0,new s(1,j,H)),B+=z);var U=H;for(++H;H<P&&l.test(d[H]);++H);L.splice(B,0,new s(2,U,H)),B+=z,j=H}else++H;j<P&&L.splice(B,0,new s(1,j,P))}return"ltr"==t&&(1==L[0].level&&(F=e.match(/^\s+/))&&(L[0].from=F[0].length,L.unshift(new s(0,0,F[0].length))),1==J(L).level&&(F=e.match(/\s+$/))&&(J(L).to-=F[0].length,L.push(new s(0,c-F[0].length,c)))),"rtl"==t?L.reverse():L}}();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 Oe(e){return e.target||e.srcElement}function Re(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=R("div");return"draggable"in e||"dragDrop"in e}();function Ie(e){if(null==Me){var t=R("span","​");O(e,R("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Me=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var n=Me?R("span","​"):R("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Fe(e){if(null!=De)return De;var t=O(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 Le,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/)},Ve=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(Le=R("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),Be=null;function ze(e){if(null!=Be)return Be;var t=O(e,R("span","x")),n=t.getBoundingClientRect(),i=S(t,0,1).getBoundingClientRect();return Be=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 Ge(e,t){Ue[e]=t}function $e(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 $e("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return $e("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Qe(e,t){t=$e(t);var n=He[t.name];if(!n)return Qe(e,"text/plain");var i=n(e,t);if(Ye.hasOwnProperty(t.name)){var o=Ye[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 Ye={};function qe(e,t){B(t,Ye.hasOwnProperty(e)?Ye[e]:Ye[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 ut(e,t){return e.line-t.line||e.ch-t.ch}function ct(e,t){return e.sticky==t.sticky&&0==ut(e,t)}function dt(e){return st(e.line,e.ch)}function ft(e,t){return ut(e,t)<0?t:e}function pt(e,t){return ut(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={};Ot(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,u=0;n.state=!0,Ot(e,t.text,l.mode,n,function(e,t){for(var n=s;u<e;){var i=o[s];i>e&&o.splice(s,1,e,o[s+1],i),s+=2,u=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=Rt(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),u=wt(e,t.line,n),c=new Ze(s.text,e.options.tabSize,u);for(i&&(r=[]);(i||c.pos<t.ch)&&!c.eol();)c.start=c.pos,o=Ct(l,c,u.state),i&&r.push(new St(c,o,Ke(a.mode,u.state)));return i?r:new St(c,o,u.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 Ot(e,t,n,i,o,r,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,u=0,c=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||c!=s){for(;u<d.start;)o(u=Math.min(d.start,u+5e3),c);c=s}d.start=d.pos}for(;u<d.pos;){var h=Math.min(d.pos,u+5e3);o(h,c),u=h}}function Rt(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),u=s.stateAfter;if(u&&(!n||l+(u instanceof _t?u.lookAhead:0)<=r.modeFrontier))return l;var c=z(s.text,null,e.options.tabSize);(null==o||i>c)&&(o=l-1,i=c)}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 Ft(){Nt=!0}function Lt(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 Vt(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 Bt(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 Lt(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 Lt(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==ut(t.from,t.to),l=Bt(n,o,a),s=zt(i,r,a),u=1==t.text.length,c=J(t.text).length+(u?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?u&&(f.to=null==p.to?null:p.to+c):f.to=o}}if(s)for(var h=0;h<s.length;++h){var m=s[h];null!=m.to&&(m.to+=c),null==m.from?Pt(l,m.marker)||(m.from=c,u&&(l||(l=[])).push(m)):(m.from+=c,u&&(l||(l=[])).push(m))}l&&(l=Ut(l)),s&&s!=l&&(s=Ut(s));var g=[l];if(!u){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 Lt(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 u=o[s];if(!(ut(u.to,l.from)<0||ut(u.from,l.to)>0)){var c=[s,1],d=ut(u.from,l.from),f=ut(u.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:l.from}),(f>0||!a.inclusiveRight&&!f)&&c.push({from:l.to,to:u.to}),o.splice.apply(o,c),s+=c.length-3}}return o}function Gt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function $t(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Qt(e){return e.inclusiveLeft?-1:0}function Yt(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=ut(i.from,o.from)||Qt(e)-Qt(t);return r?-r:ut(i.to,o.to)||Yt(e)-Yt(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 u=s.marker.find(0),c=ut(u.from,n)||Qt(s.marker)-Qt(o),d=ut(u.to,i)||Yt(s.marker)-Yt(o);if(!(c>=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?ut(u.to,n)>=0:ut(u.to,n)>0)||c>=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?ut(u.from,i)<=0:ut(u.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 un(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 cn(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=cn(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=cn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var fn=function(e,t,n){this.text=e,$t(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),Gt(e),$t(e,n);var o=i?i(e):1;o!=e.height&&it(e,o)}function hn(e){e.parent=null,Gt(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,Fe(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=F(r.styleClasses.bgClass,i.bgClass||"")),r.styleClasses.textClass&&(i.textClass=F(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=F(i.pre.className,i.textClass||"")),i}function bn(e){var t=R("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 u,c=e.splitSpaces?xn(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){u=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(c.slice(p,p+m));a&&l<9?u.appendChild(R("span",[g])):u.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=u.appendChild(R("span",X(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=u.appendChild(R("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?u.appendChild(R("span",[v])):u.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),a&&l<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||i||o||f||r||s){var y=n||"";i&&(y+=i),o&&(y+=o);var x=R("span",[u],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(u)}}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 u=n.pos,c=u+i.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>u&&d.from<=u);f++);if(d.to>=c)return e(n,i,o,r,a,l,s);e(n,i.slice(0,d.to-u),o,r,null,l,s),r=null,i=i.slice(d.to-u),u=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,u,c,d,f,p=o.length,h=0,m=1,g="",v=0;;){if(v==h){s=u=c=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,u=""),w.className&&(s+=" "+w.className),w.css&&(l=(l?l+";":"")+w.css),w.startStyle&&x.from==h&&(c+=" "+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&&(u+=" "+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,c,h+T.length==v?u:"",l,f)}if(E>=S){g=g.slice(S-h),h=S;break}h=E,c=""}g=o.slice(r,r=n[m++]),a=vn(n[m++],t.cm.options)}}else for(var O=1;O<n.length;O+=2)t.addToken(t,o.slice(r,r=n[O]),vn(n[O+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 On(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 Rn(e,t){var n=e.ownsGroup;if(n)try{On(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?Vn(e,t):"gutter"==r?Bn(e,t,n,i):"class"==r?jn(e,t):"widget"==r&&zn(e,t,i)}t.changes=null}function Fn(e){return e.node==e.text&&(e.node=R("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 Ln(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=Fn(t);t.background=i.insertBefore(R("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 Vn(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){Ln(e,t),t.line.wrapClass?Fn(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 Bn(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=Fn(t);t.gutterBackground=R("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=Fn(t),l=t.gutter=R("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(R("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 u=e.display.gutterSpecs[s].className,c=r.hasOwnProperty(u)&&r[u];c&&l.appendChild(R("div",[c],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"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),Bn(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=Fn(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=R("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Gn(s,u,n,i),e.display.input.setUneditable(u),o&&s.above?r.insertBefore(u,n.gutter||n.text):r.appendChild(u),Dn(s,"redraw")}}function Gn(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 $n(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;"),O(t.display.measure,R("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Qn(e,t){for(var n=Oe(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 Yn(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=O(e.measure,R("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],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&r.push((s.bottom+u.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,O(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 ui(e,t,n){for(var i,o,r,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(o=0,r=1,a="left"):t<s?r=1+(o=t-l):(u==e.length-3||t==s&&e[u+3]>t)&&(o=(r=s-l)-1,t>=s&&(a="right")),null!=o){if(i=e[u+2],l==s&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)i=e[2+(u-=3)],a="left";if("right"==n&&o==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)i=e[(u+=3)+2],a="right";break}return{node:i,start:o,end:r,collapse:a,coverStart:l,coverEnd:s}}function ci(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=ui(t.map,n,i),s=r.node,u=r.start,c=r.end,d=r.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){for(;u&&se(t.line.text.charAt(r.coverStart+u));)--u;for(;r.coverStart+c<r.coverEnd&&se(t.line.text.charAt(r.coverStart+c));)++c;if((o=a&&l<9&&0==u&&c==r.coverEnd-r.coverStart?s.parentNode.getBoundingClientRect():ci(S(s,u,c).getClientRects(),i)).left||o.right||0==u)break;c=u,u-=1,d="right"}a&&l<11&&(o=fi(e.display.measure,o))}else{var p;u>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&&!u&&(!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 c&&v?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function vi(e){return c&&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+=$n(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=un(t);if("local"==i?a+=Yn(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,u=t.sticky;if(s>=i.text.length?(s=i.text.length,u="before"):s<=0&&(s=0,u="after"),!l)return a("before"==u?s-1:s,"before"==u);function c(e,t,n){return a(n?e-1:e,1==l[t].level!=n)}var d=pe(l,s,u),f=fe,p=c(s,d,"before"==u);return null!=f&&(p.other=c(s,f,"before"!=u)),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=un(i)+Yn(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=Oi(e,a,o,t,n),s=Zt(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==o)return u;a=et(i,o=u.line)}}function Si(e,t,n,i){i-=_i(t);var o=t.text.length,r=ce(function(t){return ai(e,n,t-1).bottom<=i},o,0);return{begin:r,end:o=ce(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 Oi(e,t,n,i,o){o-=un(t);var r=ri(e,t),a=_i(t),l=0,s=t.text.length,u=!0,c=me(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?Mi:Ri)(e,t,n,r,c,i,o);l=(u=1!=d.level)?d.from:d.to-1,s=u?d.to:d.from-1}var f,p,h=null,m=null,g=ce(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=_==u;g=h+(b?0:1),p=b?"after":"before",f=_?m.left:m.right}else{!u&&(g==s||g==l)&&g++,p=0==g?"after":g==t.text.length?"before":ai(e,r,g-(u?1:0)).bottom+a<=o==u?"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=ue(t.text,g,1),p,v,i-f)}function Ri(e,t,n,i,o,r,a){var l=ce(function(l){var s=o[l],u=1!=s.level;return Ti(wi(e,st(n,u?s.to:s.from,u?"before":"after"),"line",t,i),r,a,!0)},0,o.length-1),s=o[l];if(l>0){var u=1!=s.level,c=wi(e,st(n,u?s.from:s.to,u?"after":"before"),"line",t,i);Ti(c,r,a,!0)&&c.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,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,f=0;f<o.length;f++){var p=o[f];if(!(p.from>=u||p.to<=s)){var h=ai(e,i,1!=p.level?Math.min(u,p.to)-1:Math.max(s,p.from)).right,m=h<r?r-h+1e9:h-r;(!c||d>m)&&(c=p,d=m)}}return c||(c=o[o.length-1]),c.from<s&&(c={from:s,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function Di(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==li){li=R("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)li.appendChild(document.createTextNode("x")),li.appendChild(R("br"));li.appendChild(document.createTextNode("x"))}O(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=R("span","xxxxxxxxxx"),n=R("pre",[t],"CodeMirror-line-like");O(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:Fi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function Fi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Li(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=Li(e);t.iter(function(e){var t=n(e);t!=e.height&&it(e,t)})}function Vi(e,t,n,i){var o=e.display;if(!n&&"true"==Oe(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,u=Ci(e,r,a);if(i&&u.xRel>0&&(s=et(e.doc,u.line).text).length==u.ch){var c=z(s,s.length,e.options.tabSize)-s.length;u=st(u.line,Math.max(0,Math.round((r-Kn(e.display).left)/Ni(e.display))-c))}return u}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 Bi(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 u=o.externalMeasured;u&&(n<u.lineN?u.lineN+=i:t<u.lineN+u.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 Gi(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 $i(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Qi(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 u=s.empty();if(a){var c=a(e,s);c&&Yi(e,c,o)}else(u||e.options.showCursorWhenSelecting)&&Yi(e,s.head,o);u||Ki(e,s,r)}}return i}function Yi(e,t,n){var i=wi(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(R("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(R("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,u="ltr"==o.direction;function c(e,t,n,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),r.appendChild(R("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=(u?y:b)&&w,k=(u?b:y)&&x?l:(g?v:_).left,C=A?s:(g?_:v).right;c(k,v.top,C-k,v.bottom)}else{var S,E,T,O;g?(S=u&&b&&x?l:v.left,E=u?s:h(e,o,"before"),T=u?l:h(t,o,"after"),O=u&&y&&w?s:_.right):(S=u?h(e,o,"before"):l,E=!u&&b&&x?s:v.right,T=!u&&y&&w?l:_.left,O=u?h(t,o,"after"):s),c(S,v.top,E-S,v.bottom),v.bottom<_.top&&c(l,v.bottom,null,_.top),c(T,_.top,O-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?(c(v.right,v.top,null,v.bottom),c(l,_.top,_.left,_.bottom)):c(v.right,v.top,_.left-v.right,v.bottom)),v.bottom<_.top&&c(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 u=t.view[s],c=e.options.lineWrapping,d=void 0,f=0;if(!u.hidden){if(o+=u.line.height,a&&l<8){var p=u.node.offsetTop+u.node.offsetHeight;d=p-n,n=p}else{var h=u.node.getBoundingClientRect();d=h.bottom-h.top,!c&&u.text.firstChild&&(f=u.text.firstChild.getBoundingClientRect().right-h.left-1)}var m=u.line.height-d;if((m>.005||m<-.005)&&(o<i&&(r-=m),it(u.line,d),io(u.line),u.rest))for(var g=0;g<u.rest.length;g++)io(u.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=u.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-Yn(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,un(et(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(r=rt(t,un(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=R("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Yn(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,u=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}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(go(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(_o(e,u.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,u=t.bottom>l-i;if(t.top<o)a.scrollTop=s?0:t.top;else if(t.bottom>o+r){var c=Math.min(t.top,(u?l:t.bottom)-r);c!=o&&(a.scrollTop=c)}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 uo(e,t){null!=t&&(ho(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function co(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||Qo(e,{top:t}),vo(e,t,!0),n&&Qo(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=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=R("div",[R("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&&Rn(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Oo(e)})}function Oo(e){for(var t=e.ops,n=0;n<t.length;n++)Ro(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 Ro(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&&Go(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&&$o(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 Fo(e,t){if(e.curOp)return t();Eo(e);try{return t()}finally{To(e)}}function Lo(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 Vo(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(Bo,e))}function Bo(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 u=r.styleClasses,c=s.classes;c?r.styleClasses=c:u&&(r.styleClasses=null);for(var d=!a||a.length!=r.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.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&&Fo(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=V(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 Go(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==Gi(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=un(et(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=Gi(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Uo(e);return s>4&&(n.lineDiv.style.display="none"),Yo(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Wo(u),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 $o(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(!Go(e,t))break;no(e);var o=bo(e);$i(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 Qo(e,t){var n=new zo(e,t);if(Go(e,n)){no(e),$o(e,n);var i=bo(e);$i(e),wo(e,i),Ko(e,i),n.finish()}}function Yo(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 u=i.view,c=i.viewFrom,d=0;d<u.length;d++){var f=u[d];if(!f.hidden)if(f.node&&f.node.parentNode==r){for(;a!=f.node;)a=l(a);var p=o&&null!=t&&t<=c&&f.lineNumber;f.changes&&(U(f.changes,"gutter")>-1&&(p=!1),In(e,f,c,n)),p&&(T(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(lt(e.options,c)))),a=f.node.nextSibling}else{var h=Hn(e,f,c,n);r.insertBefore(h,a)}c+=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=Fi(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(R("div",[R("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(R("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),Bi(e),Xo(e)}function nr(e,t,i,o){var r=this;this.input=i,r.scrollbarFiller=R("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=R("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=M("div",null,"CodeMirror-code"),r.selectionDiv=R("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=R("div",null,"CodeMirror-cursors"),r.measure=R("div",null,"CodeMirror-measure"),r.lineMeasure=R("div",null,"CodeMirror-measure"),r.lineSpace=M("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var u=M("div",[r.lineSpace],"CodeMirror-lines");r.mover=R("div",[u],null,"position: relative"),r.sizer=R("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=R("div",null,null,"position: absolute; height: "+W+"px; width: 1px;"),r.gutters=R("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=R("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=R("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){c&&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,u=l.scroller,p=u.scrollWidth>u.clientWidth,h=u.scrollHeight>u.clientHeight;if(o&&p||r&&h){if(r&&b&&s)e:for(var m=t.target,g=l.view;m!=u;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,u.scrollTop+r*a)),_o(e,Math.max(0,u.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),Qo(e,{top:y,bottom:x})}ir<20&&0!==t.deltaMode&&(null==l.wheelStartX?(l.wheelStartX=u.scrollLeft,l.wheelStartY=u.scrollTop,l.wheelDX=o,l.wheelDY=r,setTimeout(function(){if(null!=l.wheelStartX){var e=u.scrollLeft-l.wheelStartX,t=u.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:c?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(!ct(n.anchor,i.anchor)||!ct(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 ur(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(ut(t,i.from())>=0&&ut(e,i.to())<=0)return n}return-1};var ur=function(e,t){this.anchor=e,this.head=t};function cr(e,t,n){var i=e&&e.options.selectionsMayTouch,o=t[n];t.sort(function(e,t){return ut(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=ut(l.to(),a.from());if(i&&!a.empty()?s>0:s>=0){var u=pt(l.from(),a.from()),c=ft(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;r<=n&&--n,t.splice(--r,2,new ur(d?c:u,d?u:c))}}return new sr(t,n)}function dr(e,t){return new sr([new ur(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(ut(e,t.from)<0)return e;if(ut(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 ur(pr(o.anchor,t),pr(o.head,t)))}return cr(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),u=mr(fr(l),o,r);if(o=l.to,r=u,"around"==n){var c=e.sel.ranges[a],d=ut(c.head,c.anchor)<0;i[a]=new ur(d?u:s,d?s:u)}else i[a]=new ur(s,s)}return new sr(i,e.sel.primIndex)}function vr(e){e.doc.mode=Qe(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&&Bi(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(u[r],o(r),i));return n}var l=t.from,s=t.to,u=t.text,c=et(e,l.line),d=et(e,s.line),f=J(u),p=o(u.length-1),h=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(br(e,t)){var m=a(0,u.length-1);r(d,d.text,p),h&&e.remove(l.line,h),m.length&&e.insert(l.line,m)}else if(c==d)if(1==u.length)r(c,c.text.slice(0,l.ch)+f+c.text.slice(s.ch),p);else{var g=a(1,u.length-1);g.push(new fn(f+c.text.slice(s.ch),p,i)),r(c,c.text.slice(0,l.ch)+u[0],o(0)),e.insert(l.line+1,g)}else if(1==u.length)r(c,c.text.slice(0,l.ch)+u[0]+d.text.slice(s.ch),o(0)),e.remove(l.line+1,h);else{r(c,c.text.slice(0,l.ch)+u[0],o(0)),r(d,f+d.text.slice(s.ch),p);var v=a(1,u.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,Bi(e)}function Ar(e){("rtl"==e.doc.direction?I:E)(e.display.lineDiv,"CodeMirror-rtl")}function kr(e){Fo(e,function(){Ar(e),Bi(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 Or(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==ut(t.from,t.to)&&0==ut(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 Rr(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||Rr(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 Fr(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 Lr(e,t){var n=Fr(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],u=0;u<r.length;++u)if(r[u].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 u=a[s],c=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&U(t,Number(c[1]))>-1&&(J(l)[d]=u[d],delete u[d])}}}return i}function Vr(e,t,n,i){if(i){var o=e.anchor;if(n){var r=ut(t,o)<0;r!=ut(n,o)<0?(o=t,t=n):r!=ut(t,n)<0&&(t=n)}return new ur(o,t)}return new ur(n||t,t)}function jr(e,t,n,i,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Gr(e,new sr([Vr(e.sel.primary(),t,n,o)],0),i)}function Br(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]=Vr(e.sel.ranges[r],t[r],null,o);Gr(e,cr(e.cm,i,e.sel.primIndex),n)}function zr(e,t,n,i){var o=e.sel.ranges.slice(0);o[t]=n,Gr(e,cr(e.cm,o,e.sel.primIndex),i)}function Hr(e,t,n,i){Gr(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 ur(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?cr(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,$r(e,t,n)):Gr(e,t,n)}function Gr(e,t,n){$r(e,t,n),Mr(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function $r(e,t,n){(Ae(e,"beforeSelectionChange")||e.cm&&Ae(e.cm,"beforeSelectionChange"))&&(t=Ur(e,t,n));var i=n&&n.bias||(ut(t.primary().head,e.sel.primary().head)<0?-1:1);Qr(e,qr(e,t,i,!0)),(!n||!1!==n.scroll)&&e.cm&&"nocursor"!=e.cm.getOption("readOnly")&&co(e.cm)}function Qr(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 Yr(e){Qr(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),u=a.head==a.anchor?s:Xr(e,a.head,l&&l.head,n,i);(o||s!=a.anchor||u!=a.head)&&(o||(o=t.ranges.slice(0,r)),o[r]=new ur(s,u))}return o?cr(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,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,c="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(u?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(c?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?c:u)&&(d=Jr(e,d,-i,d&&d.line==t.line?r:null)),d&&d.line==t.line&&(f=ut(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?u:c)&&(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()),$)}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 Lo(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!=ut(t.from,t.to)){var n=hr(e,t);Or(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)&&(ca(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,u=0;u<l.length&&(o=l[u],!(n?o.ranges&&!o.equals(e.sel):!o.ranges));u++);if(u!=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 Gr(e,o,{clearRedo:!1});a=o}var c=[];Dr(a,s),s.push({changes:c,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,{};c.push(Sr(e,i));var r=n?hr(e,i):J(l);ra(e,i,r,Lr(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)&&(ca(e.history,i),a.push(e.history)),ra(e,i,null,Lr(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 ur(st(e.anchor.line+t,e.anchor.ch),st(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Bi(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 Lo(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),$r(e,n,$),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,Li(e)),e.options.lineWrapping||(i.iter(s,r.line+t.text.length,function(e){var t=cn(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 u=t.text.length-(a.line-r.line)-1;t.full?Bi(e):r.line!=a.line||1!=t.text.length||br(e.doc,t)?Bi(e,r.line,a.line+1,u):zi(e,r.line,"text");var c=Ae(e,"changes"),d=Ae(e,"change");if(d||c){var f={from:r,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Dn(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function la(e,t,n,i,o){var r;i||(i=n),ut(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 ua(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 u=r.changes[s];if(n<u.from.line)u.from=st(u.from.line+i,u.from.ch),u.to=st(u.to.line+i,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function ca(e,t){var n=t.from.line,i=t.to.line,o=t.text.length-(i-n)-1;ua(e.done,n,i,o),ua(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}ur.prototype.from=function(){return pt(this.anchor,this.head)},ur.prototype.to=function(){return ft(this.anchor,this.head)},ur.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){un(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&uo(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=un(t)<e.scrollTop;it(t,t.height+$n(o)),i&&uo(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=$n(this);it(n,Math.max(0,n.height-r)),e&&(Fo(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=$n(this)-t;!o||(ln(this.doc,i)||it(i,i.height+o),n&&Fo(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 Lo(e.cm,ba)(e,t,n,i,o);var r=new _a(e,o),a=ut(t,n);if(i&&B(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");Ft()}r.addToHistory&&Or(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,s=t.line,u=e.cm;if(e.iter(s,n.line+1,function(i){u&&r.collapsed&&!u.options.lineWrapping&&tn(i)==u.display.maxLine&&(l=!0),r.collapsed&&s!=t.line&&it(i,0),jt(i,new Lt(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),u){if(l&&(u.curOp.updateMaxLine=!0),r.collapsed)Bi(u,t.line,n.line+1);else if(r.className||r.startStyle||r.endStyle||r.css||r.attributes||r.title)for(var c=t.line;c<=n.line;c++)zi(u,c,"text");r.atomic&&Yr(u.doc),Dn(u,"markerAdded",u,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=Vt(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 u=tn(this.lines[s]),c=cn(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&Bi(e,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Yr(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||Fo(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=$n(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=B(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(ut(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}),Gr(this,dr(r),$)};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:Vo(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),Gr(this,dr(t),$)}),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:Vo(function(e,t,n){Hr(this,mt(this,"number"==typeof e?st(e,t||0):e),null,n)}),setSelection:Vo(function(e,t,n){Hr(this,mt(this,e),mt(this,t||e),n)}),extendSelection:Vo(function(e,t,n){jr(this,mt(this,e),t&&mt(this,t),n)}),extendSelections:Vo(function(e,t){Br(this,vt(this,e),t)}),extendSelectionsBy:Vo(function(e,t){Br(this,vt(this,Z(this.sel.ranges,e)),t)}),setSelections:Vo(function(e,t,n){if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new ur(mt(this,e[o].anchor),mt(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Gr(this,cr(this.cm,i,t),n)}}),addSelection:Vo(function(e,t,n){var i=this.sel.ranges.slice(0);i.push(new ur(mt(this,e),mt(this,t||e))),Gr(this,cr(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:Vo(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&&co(this.cm)}),undo:Vo(function(){ia(this,"undo")}),redo:Vo(function(){ia(this,"redo")}),undoSelection:Vo(function(){ia(this,"undo",!0)}),redoSelection:Vo(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:Vo(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:Vo(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:Vo(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:Vo(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:Vo(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 Bl&&(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:Vo(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)&&!Qn(t.display,e)){Ce(e),a&&(Ea=+new Date);var n=Vi(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&&Lo(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))))})()},u=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)}},c=0;c<i.length;c++)u(i[c],c);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()),$r(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 Oa(e,t){if(a&&(!e.state.draggingText||+new Date-Ea<100))Te(t);else if(!xe(e,t)&&!Qn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=R("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 Ra(e,t){var n=Vi(e,t);if(n){var i=document.createDocumentFragment();Yi(e,n,i),e.display.dragCursor||(e.display.dragCursor=R("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(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||(Fa(),Na=!0)}function Fa(){var e;ve(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Da(La)},100))}),ve(window,"blur",function(){return Da(to)})}function La(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"},Va=0;Va<10;Va++)Pa[Va+48]=Pa[Va+96]=String(Va);for(var ja=65;ja<=90;ja++)Pa[ja]=String.fromCharCode(ja);for(var Ba=1;Ba<=12;Ba++)Pa[Ba+111]=Pa[Ba+63235]="F"+Ba;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 u in t)e[u]=t[u];return e}function Wa(e,t,n,i){var o=(t=Ya(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 Ga(e){var t="string"==typeof e?e:Pa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function $a(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 Qa(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),$a(n,e,t))}function Ya(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&&ut(r.from,J(i).to)<=0;){var a=i.pop();if(ut(a.from,r.from)<0){r.from=a.from;break}}i.push(r)}Fo(e,function(){for(var t=i.length-1;t>=0;t--)la(e.doc,"",i[t].from,i[t].to,"+delete");co(e)})}function Ka(e,t,n){var i=ue(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 u=ri(t,n);a=o<0?n.text.length-1:0;var c=ai(t,u,a).top;a=ce(function(e){return ai(t,u,e).top==c},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)},u=function(n){return e.options.lineWrapping?(l=l||ri(e,t),Ei(e,t,l,n)):{begin:0,end:t.text.length}},c=u("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<=c.end:f>=a.from&&f>=c.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),u=l?i.begin:s(i.end,-1);if(a.from<=u&&u<a.to||(u=l?a.from:s(a.to,-1),i.begin<=u&&u<i.end))return r(u,l)}},m=h(r+i,i,c);if(m)return m;var g=i>0?c.end:s(c.begin,-1);return null==g||i>0&&g==t.text.length||!(m=h(i>0?0:o.length-1,i,u(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"),$)},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")},Y)},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")},Y)},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},Y)},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 Fo(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 ur(o,o))}e.setSelections(n)})},newlineAndIndent:function(e){return Fo(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);co(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)!=G}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(Ga(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 ul(e,t){var n=Qa(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 cl(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=ul(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()||Qn(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)||!ul(t,e)){var o=String.fromCharCode(null==i?n:i);"\b"!=o&&(cl(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,Qn(n,e))return void(s||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100)));if(!Rl(t,e)){var i=Vi(t,e),o=Re(e),r=i?yl(i,o):"single";V(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):Oe(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,$a(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)!=G}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&&(ut((o=l.ranges[o]).from(),t)<0||t.xRel>0)&&(ut(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,u=Lo(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",u),be(o.wrapper.ownerDocument,"mousemove",c),be(o.scroller,"dragstart",d),be(o.scroller,"drop",u),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())}),c=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=u,u.copy=!i.moveOnDrag,ve(o.wrapper.ownerDocument,"mouseup",u),ve(o.wrapper.ownerDocument,"mousemove",c),ve(o.scroller,"dragstart",d),ve(o.scroller,"drop",u),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 ur(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new ur(st(t.line,0),mt(e.doc,st(t.line+1,0)));var i=n(e,t);return new ur(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,u=r.sel,c=u.ranges;if(i.addNew&&!i.extend?(s=r.sel.contains(n),l=s>-1?c[s]:new ur(n,n)):(l=r.sel.primary(),s=r.sel.primIndex),"rectangle"==i.unit)i.addNew||(l=new ur(n,n)),n=Vi(e,t,!0,!0),s=-1;else{var d=Sl(e,n,i.unit);l=i.extend?Vr(l,d.anchor,d.head,i.extend):d}i.addNew?-1==s?(s=c.length,Gr(r,cr(e,c.concat([l]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==i.unit&&!i.extend?(Gr(r,cr(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=r.sel):zr(r,s,l,Q):(s=0,Gr(r,new sr([l],0),Q),u=r.sel);var f=n;function p(t){if(0!=ut(f,t))if(f=t,"rectangle"==i.unit){for(var o=[],a=e.options.tabSize,c=z(et(r,n.line).text,n.ch,a),d=z(et(r,t.line).text,t.ch,a),p=Math.min(c,d),h=Math.max(c,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 ur(st(m,_),st(m,_))):v.length>_&&o.push(new ur(st(m,_),st(m,q(v,h,a))))}o.length||o.push(new ur(n,n)),Gr(r,cr(e,u.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;ut(x.anchor,w)>0?(b=x.head,w=pt(y.from(),x.anchor)):(b=x.anchor,w=ft(y.to(),x.head));var A=u.ranges.slice(0);A[s]=Tl(e,new ur(mt(r,w),b)),Gr(r,cr(e,A,s),Q)}}var h=o.wrapper.getBoundingClientRect(),m=0;function g(t){var n=++m,a=Vi(e,t,!0,"rectangle"==i.unit);if(a)if(0!=ut(a,f)){e.curOp.focus=N(P(e)),p(a);var l=oo(o,r);(a.line>=l.to||a.line<l.from)&&setTimeout(Lo(e,function(){m==n&&g(t)}),150)}else{var s=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;s&&setTimeout(Lo(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 _=Lo(e,function(e){0!==e.buttons&&Re(e)?g(e):v(e)}),b=Lo(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==ut(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,u=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==u||u==r.length)return t;if(i.line!=n.line)s=(i.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=pe(r,i.ch,i.sticky),d=c-a||(i.ch-n.ch)*(1==l.level?-1:1);s=c==u-1||c==u?d<0:d>0}var f=r[u+(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 ur(new st(n.line,h,m),i)}function Ol(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(c){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 u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=o)return ye(e,n,e,rt(e.doc,r),e.display.gutterSpecs[s].className,t),Ee(t)}}function Rl(e,t){return Ol(e,t,"gutterClick",!0)}function Ml(e,t){Qn(e.display,t)||Dl(e,t)||xe(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Dl(e,t){return!!Ae(e,"gutterContextMenu")&&Ol(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==ut(t,this.pos)&&n==this.button};var Il={toString:function(){return"CodeMirror.Init"}},Fl={},Ll={};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),Bi(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=Ya(t),o=n!=Il&&Ya(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?Fi(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,$i,!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,Vl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,$i,!0),n("singleCursorHeightPerLine",!0,$i,!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 Vl(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),Bi(e),mi(e),setTimeout(function(){return wo(e)},100)}function Bl(e,t){var n=this;if(!(this instanceof Bl))return new Bl(e,t);this.options=t=t?B(t):{},B(Fl,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 Bl.inputStyles[t.inputStyle](this),r=this.display=new nr(e,i,o,t);for(var u 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),Ll)Ll.hasOwnProperty(u)&&Ll[u](this,t[u],Il);Jo(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Hl.length;++c)Hl[c](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",Lo(e,xl)),ve(t.scroller,"dblclick",a&&l<11?Lo(e,function(t){if(!xe(e,t)){var n=Vi(e,t);if(n&&!Rl(e,t)&&!Qn(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)&&!Rl(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&&!Qn(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 ur(a,a):!i.prev.prev||s(i,i.prev.prev)?e.findWordAt(a):new ur(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)||(Ra(e,t),Te(t))},start:function(t){return Oa(e,t)},drop:Lo(e,Ta),leave:function(t){xe(e,t)||Ma(e)}};var u=t.input.getField();ve(u,"keyup",function(t){return hl.call(e,t)}),ve(u,"keydown",Lo(e,fl)),ve(u,"keypress",Lo(e,ml)),ve(u,"focus",function(t){return eo(e,t)}),ve(u,"blur",function(t){return to(e,t)})}Bl.defaults=Fl,Bl.optionHandlers=Ll;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 u,c=l.text.match(/^\s*/)[0];if(i||/\S/.test(l.text)){if("smart"==n&&((u=r.mode.indent(o,l.text.slice(c.length),l.text))==G||u>150)){if(!i)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>r.first?z(et(r,t-1).text,null,a):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)f+=a,d+="\t";if(f<u&&(d+=X(u-f)),d!=c)return la(r,d,st(t,0),st(t,c.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<c.length){var g=st(t,c.length);zr(r,h,new ur(g,g));break}}}Bl.defineInitHook=function(e){return Hl.push(e)};var Wl=null;function Gl(e){Wl=e}function $l(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),u=null;if(l&&i.ranges.length>1)if(Wl&&Wl.text.join("\n")==t){if(i.ranges.length%Wl.text.length==0){u=[];for(var c=0;c<Wl.text.length;c++)u.push(r.splitLines(Wl.text[c]))}}else s.length==i.ranges.length&&e.options.pasteLinesPerSelection&&(u=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:u?u[f%u.length]:s,origin:o||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};ta(e.doc,g),Dn(e,"inputRead",e,g)}t&&!l&&Yl(e,t),co(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ql(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Fo(t,function(){return $l(t,n,0,null,"paste")}),!0}function Yl(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=R("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=R("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(){V(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)&&Lo(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"](Ya(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++,Bi(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 Bi(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&&co(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 u=this.doc.sel.ranges;0==r.ch&&t.length==u.length&&u[i].from().ch>0&&zr(this.doc,i,new ur(r,u[i].to()),$)}}}),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 u=o._global[s];u.pred(r,this)&&-1==U(i,u.val)&&i.push(u.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-un(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),u=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>u&&(l=u-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){Yl(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()},Y)}),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()&&uo(n,xi(n,s,"div").top-l.top),s},Y),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 ur(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 Fo(this,e)},startOperation:function(){return Eo(this)},endOperation:function(){return To(this)},refresh:Po(function(){var e=this.display.cachedTextHeight;Bi(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 u(){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 c(r){var a;if("codepoint"==i){var c=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))a=null;else{var d=n>0?c>=55296&&c<56320:c>=56320&&c<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||!u())return!1;t=Ja(o,e.cm,l,t.line,s)}else t=a;return!0}if("char"==i||"codepoint"==i)c();else if("column"==i)c(!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)||c(!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,c(),t.sticky="after");break}if(g&&(d=g),n>0&&!c(!h))break}var v=Xr(e,t,r,a,!0);return ct(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,V(e).innerHeight||a(e).documentElement.clientHeight),u=Math.max(s-.5*Di(e.display),3);o=(n>0?t.bottom:t.top)+n*u}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=ui(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 u(e){return function(t){return t.id==e}}function c(){a&&(r+=l,s&&(r+=l),a=s=!1)}function d(e){e&&(c(),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),u(+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&&c();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,u=s.maps;function c(t,n,i){for(var o=-1;o<(u?u.length:0);o++)for(var r=o<0?s.map:u[o],a=0;a<r.length;a+=3){var l=r[a+2];if(l==t||l==n){var c=ot(o<0?e.line:e.rest[o]),d=r[a]+i;return(i<0||l!=t)&&(d=r[a+(i?1:0)]),st(c,d)}}}var d=c(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=c(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=c(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())Gl({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=ql(i);Gl({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,$),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 u=N(o.ownerDocument);L(s),setTimeout(function(){i.display.lineSpace.removeChild(l),u.focus(),u==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)||Ql(e,i)||l<=11&&setTimeout(Lo(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=Qi(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!=ut(pt(a,l),o)||0!=ut(ft(a,l),r)){var s=t.display.view,u=o.line>=t.display.viewFrom&&ns(t,o)||{node:s[0].measure.map[2],offset:0},c=r.line<t.display.viewTo&&ns(t,r);if(!c){var d=s[s.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;c={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(!u||!c)return void e.removeAllRanges();var p,h=e.rangeCount&&e.getRangeAt(0);try{p=S(u.node,u.offset,c.offset,c.node)}catch(m){}p&&(!n&&t.state.focused?(e.collapse(u.node,u.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){O(this.cm.display.cursorDiv,e.cursors),O(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):Fo(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&&c&&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&&Fo(t,function(){Gr(t.doc,dr(n,i),$),(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,u,c=ji(i,l.line);if(c==o.view.length-1?(s=o.viewTo-1,u=o.lineDiv.lastChild):(s=ot(o.view[c+1].line)-1,u=o.view[c+1].node.previousSibling),!n)return!1;for(var d=i.doc.splitLines(rs(i,n,u,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]||ut(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())&&Fo(this.cm,function(){return Bi(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()||Lo(this.cm,$l)(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 us(e,t){if((t=t?B(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=Bl(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l}function cs(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=G,e.signal=ye,e.Line=fn,e.changeEnd=fr,e.scrollbarModel=ko,e.Pos=st,e.cmpPos=ut,e.modes=He,e.mimeModes=Ue,e.resolveMode=$e,e.getMode=Qe,e.modeExtensions=Ye,e.extendMode=qe,e.copyState=Ke,e.startState=Je,e.innerMode=Xe,e.commands=el,e.keyMap=za,e.keyName=Qa,e.isModifierKey=Ga,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())Gl({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=ql(i);Gl({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,$):(n.prevInput="",o.value=t.text.join("\n"),L(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)||Ql(e,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())}),ve(o,"cut",r),ve(o,"copy",r),ve(e.scroller,"paste",function(t){if(!Qn(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){Qn(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=Qi(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;O(t.cursorDiv,e.cursors),O(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&&L(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(Le){}},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||Ve(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,u=Math.min(i.length,o.length);s<u&&i.charCodeAt(s)==o.charCodeAt(s);)++s;return Fo(t,function(){$l(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=Vi(n,e),u=i.scroller.scrollTop;if(r&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(r)&&Lo(n,Gr)(n.doc,dr(r),$);var c,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&&(c=o.ownerDocument.defaultView.scrollY),i.input.focus(),s&&o.ownerDocument.defaultView.scrollTo(null,c),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=u),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?Lo(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(Bl),Jl(Bl);var ds="iter insert remove copy getEditor constructor".split(" ");for(var fs in Sa.prototype)Sa.prototype.hasOwnProperty(fs)&&U(ds,fs)<0&&(Bl.prototype[fs]=function(e){return function(){return e.apply(this.doc,arguments)}}(Sa.prototype[fs]));return ke(Sa),Bl.inputStyles={textarea:ss,contenteditable:ts},Bl.defineMode=function(e){!Bl.defaults.mode&&"null"!=e&&(Bl.defaults.mode=e),We.apply(this,arguments)},Bl.defineMIME=Ge,Bl.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Bl.defineMIME("text/plain","null"),Bl.defineExtension=function(e,t){Bl.prototype[e]=t},Bl.defineDocExtension=function(e,t){Sa.prototype[e]=t},Bl.fromTextArea=us,cs(Bl),Bl.version="6.65.7",Bl}()),Jl.exports}var es,ts=Zl();(es=Zl()).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,u=t.typescript,c=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(c))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(c.test(n)){e.eatWhile(c);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(u){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(c.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 O(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function R(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(!O(e,n.localVars))return void(n.localVars=new I(e,n.localVars));t.globalVars&&!O(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 O(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 F=new I("this",new I("arguments",null));function L(){S.state.context=new N(S.state.context,S.state.localVars,!1),S.state.localVars=F}function P(){S.state.context=new N(S.state.context,S.state.localVars,!0),S.state.localVars=null}function V(){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 B(){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(";"),B):"keyword a"==e?T(j("form"),$,H,B):"keyword b"==e?T(j("form"),H,B):"keyword d"==e?S.stream.match(/^\s*$/,!1)?T():T(j("stat"),Y,z(";"),B):"debugger"==e?T(z(";")):"{"==e?T(j("}"),P,de,B,V):";"==e?T():"if"==e?("else"==S.state.lexical.info&&S.state.cc[S.state.cc.length-1]==B&&S.state.cc.pop()(),T(j("form"),$,H,B,Ne)):"function"==e?T(Pe):"for"==e?T(j("form"),P,Ie,H,V,B):"class"==e||u&&"interface"==t?(S.marked="keyword",T(j("form","class"==e?e:t),He,B)):"variable"==e?u&&"declare"==t?(S.marked="keyword",T(H)):u&&("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,B,B)):u&&"namespace"==t?(S.marked="keyword",T(j("form"),W,H,B)):u&&"abstract"==t?(S.marked="keyword",T(H)):T(j("stat"),oe):"switch"==e?T(j("form"),$,z("{"),j("}","switch"),P,de,B,B,V):"case"==e?T(W,z(":")):"default"==e?T(z(":")):"catch"==e?T(j("form"),L,U,H,B,V):"export"==e?T(j("stat"),$e,B):"import"==e?T(j("stat"),Ye,B):"async"==e?T(H):"@"==t?T(W,H):E(j("stat"),W,z(";"),B)}function U(e){if("("==e)return T(Be,z(")"))}function W(e,t){return Q(e,t,!1)}function G(e,t){return Q(e,t,!0)}function $(e){return"("!=e?E():T(j(")"),Y,z(")"),B)}function Q(e,t,n){if(S.state.fatArrowAt==S.stream.start){var i=n?ee:Z;if("("==e)return T(L,j(")"),ue(Be,")"),B,z("=>"),i,V);if("variable"==e)return E(L,Te,z("=>"),i,V)}var o=n?K:q;return w.hasOwnProperty(e)?T(o):"function"==e?T(Pe,o):"class"==e||u&&"interface"==t?(S.marked="keyword",T(j("form"),ze,B)):"keyword c"==e||"async"==e?T(n?G:W):"("==e?T(j(")"),Y,z(")"),B,o):"operator"==e||"spread"==e?T(n?G:W):"["==e?T(j("]"),Ze,B,o):"{"==e?ce(ae,"}",null,o):"quasi"==e?E(X,o):"new"==e?T(te(n)):T()}function Y(e){return e.match(/[;\}\)\],]/)?E():E(W)}function q(e,t){return","==e?T(Y):K(e,t,!1)}function K(e,t,n){var i=0==n?q:K,o=0==n?W:G;if("=>"==e)return T(L,n?ee:Z,V);if("operator"==e)return/\+\+|--/.test(t)||u&&"!"==t?T(i):u&&"<"==t&&S.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?T(j(">"),ue(ge,">"),B,i):"?"==t?T(W,z(":"),o):T(o);if("quasi"==e)return E(X,i);if(";"!=e){if("("==e)return ce(G,")","call",i);if("."==e)return T(re,i);if("["==e)return T(j("]"),Y,z("]"),B,i);if(u&&"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(Y,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:G)}function te(e){return function(t){return"."==t?T(e?ie:ne):"variable"==t&&u?T(ke,e?K:q):E(e?G: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(B,H):E(q,z(";"),B)}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):(u&&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):u&&D(t)?(S.marked="keyword",T(ae)):"["==e?T(W,fe,z("]"),se):"spread"==e?T(G,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(G):"("==e?E(Pe):void 0}function ue(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 ce(e,t,n){for(var i=3;i<arguments.length;i++)S.cc.push(arguments[i]);return T(j(t,n),ue(e,t),B)}function de(e){return"}"==e?T():E(H,de)}function fe(e,t){if(u){if(":"==e)return T(ge);if("?"==t)return T(fe)}}function pe(e,t){if(u&&(":"==e||"in"==t))return T(ge)}function he(e){if(u&&":"==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?G: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("]"),ue(ge,"]",","),B,Ae):"{"==e?T(j("}"),_e,B,Ae):"("==e?T(ue(we,")"),ve,Ae):"<"==e?T(ue(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(Ve,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(">"),ue(ge,">"),B,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(">"),ue(ge,">"),B,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 u&&D(t)?(S.marked="keyword",T(Te)):"variable"==e?(R(t),T()):"spread"==e?T(Te):"["==e?ce(Re,"]"):"{"==e?ce(Oe,"}"):void 0}function Oe(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(":"),Oe):T(z(":"),Te,Me)):(R(t),T(Me))}function Re(){return E(Te,Me)}function Me(e,t){if("="==t)return T(G)}function De(e){if(","==e)return T(Ee)}function Ne(e,t){if("keyword b"==e&&"else"==t)return T(j("form","else"),H,B)}function Ie(e,t){return"await"==t?T(Ie):"("==e?T(j(")"),Fe,B):void 0}function Fe(e){return"var"==e?T(Ee,Le):"variable"==e?T(Le):E(Le)}function Le(e,t){return")"==e?T():";"==e?T(Le):"in"==t||"of"==t?(S.marked="keyword",T(W,Le)):E(W,Le)}function Pe(e,t){return"*"==t?(S.marked="keyword",T(Pe)):"variable"==e?(R(t),T(Pe)):"("==e?T(L,j(")"),ue(Be,")"),B,he,H,V):u&&"<"==t?T(j(">"),ue(Ce,">"),B,Pe):void 0}function Ve(e,t){return"*"==t?(S.marked="keyword",T(Ve)):"variable"==e?(R(t),T(Ve)):"("==e?T(L,j(")"),ue(Be,")"),B,he,V):u&&"<"==t?T(j(">"),ue(Ce,">"),B,Ve):void 0}function je(e,t){return"keyword"==e||"variable"==e?(S.marked="type",T(je)):"<"==t?T(j(">"),ue(Ce,">"),B):void 0}function Be(e,t){return"@"==t&&T(W,Be),"spread"==e?T(Be):u&&D(t)?(S.marked="keyword",T(Be)):u&&"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 R(t),T(Ue)}function Ue(e,t){return"<"==t?T(j(">"),ue(Ce,">"),B,Ue):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(S.marked="keyword"),T(u?ge:W,Ue)):"{"==e?T(j("}"),We,B):void 0}function We(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&D(t))&&S.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(S.marked="keyword",T(We)):"variable"==e||"keyword"==S.style?(S.marked="property",T(Ge,We)):"number"==e||"string"==e?T(Ge,We):"["==e?T(W,fe,z("]"),Ge,We):"*"==t?(S.marked="keyword",T(We)):u&&"("==e?E(Ve,We):";"==e||","==e?T(We):"}"==e?T():"@"==t?T(W,We):void 0}function Ge(e,t){if("!"==t||"?"==t)return T(Ge);if(":"==e)return T(ge,Me);if("="==t)return T(G);var n=S.state.lexical.prev;return E(n&&"interface"==n.info?Ve:Pe)}function $e(e,t){return"*"==t?(S.marked="keyword",T(Je,z(";"))):"default"==t?(S.marked="keyword",T(W,z(";"))):"{"==e?T(ue(Qe,"}"),Je,z(";")):E(H)}function Qe(e,t){return"as"==t?(S.marked="keyword",T(z("variable"))):"variable"==e?E(G,Qe):void 0}function Ye(e){return"string"==e?T():"("==e?E(W):"."==e?E(q):E(qe,Ke,Je)}function qe(e,t){return"{"==e?ce(qe,"}"):("variable"==e&&R(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(ue(G,"]"))}function et(){return E(j("form"),Te,z("{"),j("}"),ue(tt,"}"),B,B)}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 L.lex=P.lex=!0,V.lex=!0,B.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 es.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 u=e.cc[s];if(u==B)l=l.prev;else if(u!=Ne&&u!=V)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 c=l.type,d=a==c;return"vardef"==c?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==c&&"{"==a?l.indented:"form"==c?l.indented+o:"stat"==c?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 es.StringStream("",2,null))}}}),es.registerHelper("wordChars","javascript",/[\w$]/),es.defineMIME("text/javascript","javascript"),es.defineMIME("text/ecmascript","javascript"),es.defineMIME("application/javascript","javascript"),es.defineMIME("application/x-javascript","javascript"),es.defineMIME("application/ecmascript","javascript"),es.defineMIME("application/json",{name:"javascript",json:!0}),es.defineMIME("application/x-json",{name:"javascript",json:!0}),es.defineMIME("application/manifest+json",{name:"javascript",json:!0}),es.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),es.defineMIME("text/typescript",{name:"javascript",typescript:!0}),es.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 u(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function c(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,c=a.getInputField().ownerDocument,d=c.defaultView||c.parentWindow,f=this.hints=c.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(c.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(c.createTextNode(v.displayText||l(v))),g.hintId=m}var b=i.options.container||c.body,y=a.cursorCoords(i.options.alignWithWord?o.from:null),x=y.left,w=y.bottom,A=!0,k=0,C=0;if(b!==c.body){var S=-1!==["absolute","relative","fixed"].indexOf(d.getComputedStyle(b).position)?b:b.offsetParent,E=S.getBoundingClientRect(),T=c.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 O=d.innerWidth||Math.max(c.body.offsetWidth,c.documentElement.offsetWidth),R=d.innerHeight||Math.max(c.body.offsetHeight,c.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-R>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>R){f.style.height=R-5+"px",f.style.top=(w=y.bottom-D.top-C)+"px";var F=a.getCursor();o.from.ch!=F.ch&&(y=a.cursorCoords(F),f.style.left=(x=y.left-k)+"px",D=f.getBoundingClientRect())}}var L,P=D.right-O;if(N&&(P+=a.display.nativeBarWidth),P>0&&(D.right-D.left>O&&(f.style.width=O-5+"px",P-=D.right-D.left-O),f.style.left=(x=Math.max(y.left-P-k,0))+"px"),N)for(var V=f.firstChild;V;V=V.nextSibling)V.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(){L=setTimeout(function(){i.close()},100)}),a.on("focus",this.onFocus=function(){clearTimeout(L)})),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||(c.documentElement||c.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=u(f,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),r.pick())}),e.on(f,"click",function(e){var t=u(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 c(this,t),e.signal(t,"shown")))}},c.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=[],u=0;u<n.words.length;u++){var c=n.words[u];c.slice(0,i.length)==i&&s.push(c)}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)}(Zl()),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 u=l;"property"==u.type;){if("."!=(u=o(n,t(a.line,u.start))).string)return;if(u=o(n,t(a.line,u.start)),!c)var c=[];c.push(u)}return{list:h(l,c,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(" "),u="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),c="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(u,f):e instanceof Function&&n(c,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}}(Zl());const ns=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},is=a({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(es){return ui(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(_i(e)).trim():this.body||(e=this.trimString(e).trim()),this.value=e,e},load(){this.$nextTick(()=>{let e=this.tidyValue();this.editor=l(ts(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&&ts.showHint(e,ts.hint.javascript)}),this.editor.on("change",()=>{this.visible=!0}),this.editor})}}}),os={class:"_fd-fn"},rs={class:"_fd-fn-tip"},as={class:"cm-keyword"},ls={key:0},ss={class:"_fd-fn-arg"},us={ref:"editor",class:"_fd-fn-editor"};const cs=ns(is,[["render",function(e,t,n,i,o,r){const a=c("el-table-column"),l=c("el-table"),s=c("el-popover"),d=c("el-button");return k(),A("div",os,[C("div",rs,[t[2]||(t[2]=C("div",{class:"_fd-fn-ind"},null,-1)),C("div",as,[C("span",null,[j("function "+L(e.name)+"(",1),(k(!0),A(P,null,V(e.argList,(n,i)=>(k(),A(P,null,[j(L(i>0?", ":""),1),"string"===n.type?(k(),A("span",ls,L(n.name),1)):(k(),M(s,{key:1,placement:"top-start",width:400,"hide-after":0,trigger:"click",title:n.name,content:n.info||""},{reference:D(()=>[C("span",ss,[j(L(n.name),1),t[0]||(t[0]=C("i",{class:"fc-icon icon-question"},null,-1))])]),default:D(()=>[n.columns?(k(),M(l,{key:0,data:n.columns,border:""},{default:D(()=>[u(a,{width:"120",property:"label",label:e.t("event.label")},null,8,["label"]),u(a,{property:"info",label:e.t("event.info")},null,8,["label"]),u(a,{width:"80",property:"type",label:e.t("event.type")},null,8,["label"])]),_:2},1032,["data"])):N("",!0)]),_:2},1032,["title","content"]))],64))),256)),t[1]||(t[1]=j(") {"))])])]),C("div",us,null,512),t[3]||(t[3]=C("div",{class:"_fd-fn-tip"},[C("div",{class:"_fd-fn-ind"}),C("div",{class:"cm-keyword"},"}")],-1)),e.visible&&e.button?(k(),M(d,{key:0,type:"primary",size:"small",onClick:e.save},{default:D(()=>[j(L(e.t("props.save")),1)]),_:1},8,["onClick"])):N("",!0)])}]]),ds="$FNX:",fs=e=>Kn.String(e)&&0===e.indexOf(ds),ps=a({name:"EventConfig",emits:["update:modelValue"],props:{modelValue:[Object,void 0,null],componentName:String,eventName:{type:Array,default:()=>[]}},inject:["designer"],components:{FnEditor:cs},data:()=>({visible:!1,activeData:null,val:null,defActive:"no",hookList:["hook_load","hook_mounted","hook_deleted","hook_watch","hook_value","hook_hidden"],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[Oi(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=Zn({},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=>{fs(e)?i.push(e.replace(ds,"")):Kn.Function(e)&&fs(e.__json)?i.push(e.__json.replace(ds,"")):e&&0===e.indexOf("$GLOBAL:")&&i.push(e)}),n[t]=i}else if(fs(e[t]))n[t]=[e[t].replace(ds,"")];else if(Kn.Function(e[t])){const i=e[t].__json||"";i?fs(i)?n[t]=[i.replace(ds,"")]: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:")?ds+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=ji(),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 ui(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:[]}}}),hs={class:"_fd-event"},ms={class:"el-dropdown-link"},gs={class:"_fd-event-item"},vs={key:0,class:"_fd-label"},_s={class:"_fd-event-item"},bs={class:"_fd-label"},ys=["onClick"],xs={class:"_fd-event-method"},ws={key:0,class:"_fd-label"},As=["onClick"],ks=["onClick"],Cs={class:"_fd-event-method"},Ss={key:0,class:"_fd-label"},Es=["onClick"],Ts={target:"_blank",href:"https://form-create.com/v3/instance/"};const Os=ns(ps,[["render",function(e,t,n,i,o,r){const a=c("el-button"),l=c("el-badge"),s=c("el-dropdown-item"),d=c("el-dropdown-menu"),f=c("el-dropdown"),p=c("el-header"),h=c("el-menu-item"),m=c("el-input"),g=c("el-menu"),v=c("el-main"),_=c("el-container"),b=c("el-aside"),y=c("FnEditor"),x=c("el-dialog");return k(),A("div",hs,[u(l,{value:e.eventNum,type:"warning",hidden:e.eventNum<1},{default:D(()=>[u(a,{size:"small",onClick:t[0]||(t[0]=t=>e.visible=!0)},{default:D(()=>[j(L(e.t("event.title")),1)]),_:1})]),_:1},8,["value","hidden"]),u(x,{class:"_fd-event-dialog",title:e.t("event.title"),modelValue:e.visible,"onUpdate:modelValue":t[8]||(t[8]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"1080px"},{footer:D(()=>[C("div",null,[u(a,{size:"default",onClick:t[7]||(t[7]=t=>e.visible=!1)},{default:D(()=>[j(L(e.t("props.cancel")),1)]),_:1}),u(a,{type:"primary",size:"default",onClick:e.submit,color:"#2f73ff"},{default:D(()=>[j(L(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:D(()=>[u(_,{class:"_fd-event-con",style:{height:"600px"}},{default:D(()=>[u(b,{style:{width:"300px"}},{default:D(()=>[u(_,{class:"_fd-event-l"},{default:D(()=>[u(p,{class:"_fd-event-head",height:"40px"},{default:D(()=>[u(f,{"popper-class":"_fd-event-dropdown",trigger:"click",size:"default",placement:"bottom-start"},{dropdown:D(()=>[u(d,null,{default:D(()=>[(k(!0),A(P,null,V(e.eventList,t=>(k(),M(s,{key:t,onClick:n=>e.add(t),disabled:Object.keys(e.event).indexOf(t)>-1},{default:D(()=>[C("div",gs,[C("span",null,L(t),1),e.eventInfo[t]?(k(),A("span",vs,L(e.eventInfo[t]),1)):N("",!0)])]),_:2},1032,["onClick","disabled"]))),128)),(k(!0),A(P,null,V(e.hookList,(t,n)=>(k(),M(s,{divided:e.eventList.length>0&&!n,onClick:n=>e.add(t),disabled:Object.keys(e.event).indexOf(t)>-1},{default:D(()=>[C("div",_s,[C("div",null,L(t),1),C("span",bs,L(e.eventInfo[t]),1)])]),_:2},1032,["divided","onClick","disabled"]))),256)),u(s,{divided:e.eventList.length>0,onClick:e.cusEvent},{default:D(()=>[C("div",null,L(e.t("props.custom")),1)]),_:1},8,["divided","onClick"])]),_:1})]),default:D(()=>[C("span",ms,[u(a,{link:"",type:"primary",size:"default"},{default:D(()=>[j(L(e.t("event.create")),1),t[9]||(t[9]=C("i",{class:"el-icon-arrow-down el-icon--right"},null,-1))]),_:1,__:[9]})])]),_:1})]),_:1}),u(v,null,{default:D(()=>[u(g,{"default-active":e.defActive,modelValue:e.activeData,"onUpdate:modelValue":t[5]||(t[5]=t=>e.activeData=t)},{default:D(()=>[(k(!0),A(P,null,V(e.event,(n,i)=>(k(),A(P,null,[Array.isArray(n)?(k(!0),A(P,{key:0},V(n,(o,r)=>(k(),M(h,{key:i+r,index:i+r},{default:D(()=>[C("div",{class:"_fd-event-title",onClick:B(t=>e.edit({name:i,item:n,index:r}),["stop"])},[C("div",xs,[C("span",null,[t[10]||(t[10]=j("function")),C("span",null,L(i),1)]),e.eventInfo[i]?(k(),A("span",ws,L(e.eventInfo[i]),1)):N("",!0)]),C("i",{class:"fc-icon icon-delete",onClick:B(t=>e.rm({name:i,item:n,index:r}),["stop"])},null,8,As)],8,ys)]),_:2},1032,["index"]))),128)):(k(),M(h,{key:1,index:i+0},{default:D(()=>[C("div",{class:"_fd-event-title",onClick:B(t=>e.edit({name:i}),["stop"])},[C("div",Cs,[C("span",null,[t[11]||(t[11]=j("function")),C("span",null,L(i),1)]),e.eventInfo[i]?(k(),A("span",Ss,L(e.eventInfo[i]),1)):N("",!0)]),C("i",{class:"fc-icon icon-delete",onClick:B(t=>e.rm({name:i}),["stop"])},null,8,Es)],8,ks)]),_:2},1032,["index"]))],64))),256)),e.cus?(k(),M(h,{key:0,style:{"padding-left":"10px"},index:"custom"},{default:D(()=>[C("div",{class:"_fd-event-title",onClick:t[4]||(t[4]=B(()=>{},["stop"]))},[u(m,{type:"text",modelValue:e.cusValue,"onUpdate:modelValue":t[1]||(t[1]=t=>e.cusValue=t),size:"default",onKeydown:$(e.addCus,["enter"]),placeholder:e.t("event.placeholder")},null,8,["modelValue","onKeydown","placeholder"]),C("div",null,[C("i",{class:"fc-icon icon-add",onClick:t[2]||(t[2]=B((...t)=>e.addCus&&e.addCus(...t),["stop"]))}),C("i",{class:"fc-icon icon-delete",onClick:t[3]||(t[3]=B((...t)=>e.closeCus&&e.closeCus(...t),["stop"]))})])])]),_:1})):N("",!0)]),_:1},8,["default-active","modelValue"])]),_:1})]),_:1})]),_:1}),u(v,null,{default:D(()=>[u(_,{class:"_fd-event-r"},{default:D(()=>[e.activeData?(k(),M(p,{key:0,class:"_fd-event-head",height:"40px"},{default:D(()=>[C("div",null,[C("a",Ts,L(e.t("form.document")),1)]),C("div",null,[u(a,{size:"small",onClick:e.close},{default:D(()=>[j(L(e.t("props.cancel")),1)]),_:1},8,["onClick"]),u(a,{size:"small",type:"primary",onClick:e.save,color:"#2f73ff"},{default:D(()=>[j(L(e.t("props.save")),1)]),_:1},8,["onClick"])])]),_:1})):N("",!0),e.activeData?(k(),M(v,{key:1},{default:D(()=>[u(y,{ref:"fn",modelValue:e.eventStr,"onUpdate:modelValue":t[6]||(t[6]=t=>e.eventStr=t),body:"",name:e.activeData.name,args:e.fnArgs,style:{height:"519px"}},null,8,["modelValue","name","args"])]),_:1})):N("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["title","modelValue"])])}]]);function Rs(e,t){var n=null;return function(...i){null!==n&&clearTimeout(n),n=setTimeout(()=>e.call(this,...i),t)}}
  27. /*!
  28. Highlight.js v11.9.0 (git: b7ec4bfafc)
  29. (c) 2006-2024 undefined and other contributors
  30. License: BSD-3-Clause
  31. */function Ms(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)||Ms(n)}),e}class Ds{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Ns(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Is(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 Fs=e=>!!e.scope;class Ls{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Ns(e)}openNode(e){if(!Fs(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){Fs(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+='<span class="'.concat(e,'">')}}const Ps=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Vs{constructor(){this.rootNode=Ps(),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=Ps({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=>{Vs._collapse(e)}))}}class js extends Vs{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 Ls(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Bs(e){return e?"string"==typeof e?e:e.source:null}function zs(e){return Ws("(?=",e,")")}function Hs(e){return Ws("(?:",e,")*")}function Us(e){return Ws("(?:",e,")?")}function Ws(...e){return e.map(e=>Bs(e)).join("")}function Gs(...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=>Bs(e)).join("|")+")"}function $s(e){return RegExp(e.toString()+"|").exec("").length-1}const Qs=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ys(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;const t=n;let i=Bs(e),o="";for(;i.length>0;){const e=Qs.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 qs="[a-zA-Z]\\w*",Ks="[a-zA-Z_]\\w*",Xs="\\b\\d+(\\.\\d+)?",Js="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Zs="\\b(0b[01]+)",eu={begin:"\\\\[\\s\\S]",relevance:0},tu={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[eu]},nu={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[eu]},iu=(e,t,n={})=>{const i=Is({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=Gs("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:Ws(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},ou=iu("//","$"),ru=iu("/\\*","\\*/"),au=iu("#","$");var lu=Object.freeze({__proto__:null,APOS_STRING_MODE:tu,BACKSLASH_ESCAPE:eu,BINARY_NUMBER_MODE:{scope:"number",begin:Zs,relevance:0},BINARY_NUMBER_RE:Zs,COMMENT:iu,C_BLOCK_COMMENT_MODE:ru,C_LINE_COMMENT_MODE:ou,C_NUMBER_MODE:{scope:"number",begin:Js,relevance:0},C_NUMBER_RE:Js,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:au,IDENT_RE:qs,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:{begin:"\\.\\s*"+Ks,relevance:0},NUMBER_MODE:{scope:"number",begin:Xs,relevance:0},NUMBER_RE:Xs,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:nu,REGEXP_MODE:{scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[eu,{begin:/\[/,end:/\]/,relevance:0,contains:[eu]}]},RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Ws(t,/.*\b/,e.binary,/\b.*/)),Is({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:{scope:"title",begin:qs,relevance:0},UNDERSCORE_IDENT_RE:Ks,UNDERSCORE_TITLE_MODE:{scope:"title",begin:Ks,relevance:0}});function su(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function uu(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function cu(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=su,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function du(e,t){Array.isArray(e.illegal)&&(e.illegal=Gs(...e.illegal))}function fu(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 pu(e,t){void 0===e.relevance&&(e.relevance=1)}const hu=(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=Ws(n.beforeMatch,zs(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},mu=["of","and","for","in","not","or","if","then","parent","list","value"];function gu(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,gu(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,vu(n[0],n[1])]})}}function vu(e,t){return t?Number(t):(e=>mu.includes(e.toLowerCase()))(e)?0:1}const _u={},bu=(e,t)=>{_u["".concat(e,"/").concat(t)]||(_u["".concat(e,"/").concat(t)]=!0)},yu=Error();function xu(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+=$s(t[l-1]);e[n]=a,e[n]._emit=r,e[n]._multi=!0}function wu(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 yu;if("object"!=typeof e.beginScope||null===e.beginScope)throw yu;xu(e,e.begin,{key:"beginScope"}),e.begin=Ys(e.begin,{joinWith:""})}})(e),(e=>{if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw yu;if("object"!=typeof e.endScope||null===e.endScope)throw yu;xu(e,e.end,{key:"endScope"}),e.end=Ys(e.end,{joinWith:""})}})(e)}function Au(e){function t(t,n){return RegExp(Bs(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+=$s(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(Ys(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=Is(e.classNameAliases||{}),function n(o,r){const a=o;if(o.isCompiled)return a;[uu,fu,wu,hu].forEach(e=>e(o,r)),e.compilerExtensions.forEach(e=>e(o,r)),o.__beforeBegin=null,[cu,du,pu].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=gu(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=Bs(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=>Is(t,{variants:null},e))),t.cachedVariants?t.cachedVariants:ku(t)?Is(t,{starts:t.starts?Is(t.starts):null}):Object.isFrozen(t)?Is(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 ku(e){return!!e&&(e.endsWithParent||ku(e.starts))}class Cu extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Su=Ns,Eu=Is,Tu=Symbol("nomatch"),Ou=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:js};function s(e){return l.noHighlightRe.test(e)}function u(e,t,n){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language):(bu("10.7.0","highlight(lang, code, ...args) has been deprecated."),bu("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:c(r.language,r.code,n);return a.code=r.code,_("after:highlight",a),a}function c(e,n,i,a){const s=Object.create(null);function u(){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&&(O+=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=c(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&&(O+=e.relevance),E.__addSublanguage(e._emitter,e.language)})():u(),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,u(),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 Ds(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 Tu;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||(O+=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 Ds(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!==Tu)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=Au(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="",O=0,R=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=R;const e=C.matcher.exec(n);if(!e)break;const t=x(n.substring(R,e.index),e);R=e.index+t}x(n.substring(R))}return E.finalize(),k=E.toHTML(),{language:e,value:k,relevance:O,illegal:!1,_emitter:E,_top:C}}catch(N){if(N.message&&N.message.includes("Illegal"))return{language:e,value:Su(n),illegal:!0,relevance:0,_illegalBy:{message:N.message,index:R,context:n.slice(R-100,R+100),mode:N.mode,resultSoFar:k},_emitter:E};if(o)return{language:e,value:Su(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:Su(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=>c(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,u]=r,d=s;return d.secondBest=u,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 Cu("One of your code blocks includes unescaped HTML.",e.innerHTML);t=e;const o=t.textContent,a=i?u(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:u,highlightAuto:d,highlightAll:h,highlightElement:f,highlightBlock:e=>(bu("10.7.0","highlightBlock will be removed entirely in v12.0"),bu("10.7.0","Please use highlightElement now."),f(e)),configure:e=>{l=Eu(l,e)},initHighlighting:()=>{h(),bu("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:()=>{h(),bu("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:Eu,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:Ws,lookahead:zs,either:Gs,optional:Us,anyNumberOfTimes:Hs};for(const b in lu)"object"==typeof lu[b]&&Ms(lu[b]);return Object.assign(e,lu),e},Ru=Ou({});Ru.newInstance=()=>Ou({});
  32. /*! `xml` grammar compiled for Highlight.js 11.9.0 */
  33. var Mu=(()=>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}]}]}})(),Du=(()=>{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 u=s.regex,c=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:c+"(?=\\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+/,c,/\s+/,/extends/,/\s+/,u.concat(c,"(",u.concat(/\./,c),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,c],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:u.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]}},O={variants:[{match:[/function/,/\s+/,c,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},R={match:u.concat(/\b/,(M=[...r,"super","import"],u.concat("(?!",M.join("|"),")")),c,u.lookahead(/\(/)),className:"title.function",relevance:0};var M;const D={begin:u.concat(/\./,u.lookahead(u.concat(c,/(?![0-9A-Za-z$_(])/))),end:c,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},N={match:[/get|set/,/\s+/,c,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+s.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,c,/\s*/,/=\s*/,/(async\s*)?/,u.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:c+u.lookahead(":"),relevance:0},F,{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"]}]}]},O,{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:c,className:"title.function"})]},{match:/\.\.\./,relevance:0},D,{match:"\\$"+c,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},R,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},E,N,{match:/\$[(.]/}]}}})();
  34. /*! `javascript` grammar compiled for Highlight.js 11.9.0 */const Nu=a({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.triggerActive(a)})}}}),Iu={key:0,class:"fc-icon icon-down"};const Fu=ns(Nu,[["render",function(e,t,n,i,o,r){const a=c("el-tag"),l=c("el-dropdown-item"),s=c("el-dropdown-menu"),d=c("el-dropdown");return k(),M(d,{class:"_fd-type-select",trigger:"click",size:"default","popper-class":"_fd-type-select-pop",disabled:e.disabled||!e.menus.length,onCommand:e.handleCommand},{dropdown:D(()=>[u(s,null,{default:D(()=>[(k(!0),A(P,null,V(e.menus,t=>(k(),M(l,{command:t,key:t.name},{default:D(()=>[C("div",null,[C("i",{class:I(["fc-icon",t.icon||"icon-input"])},null,2),j(L(e.t("com."+t.name+".name")||t.label),1)])]),_:2},1032,["command"]))),128))]),_:1})]),default:D(()=>[u(a,{type:"success",effect:"plain","disable-transitions":""},{default:D(()=>[e.activeRule?(k(),A(P,{key:0},[j(L(e.t("com."+e.activeRule._menu.name+".name")||e.activeRule._menu.label)+" ",1),!e.disabled&&e.menus.length?(k(),A("i",Iu)):N("",!0)],64)):(k(),A(P,{key:1},[j(L(e.t("com."+e.customForm.config.name+".name")||e.customForm.config.label||e.customForm.config.name),1)],64))]),_:1})]),_:1},8,["disabled","onCommand"])}]]);var Lu,Pu={exports:{}},Vu={},ju={exports:{}},Bu={},zu={};function Hu(){if(Lu)return zu;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 Lu=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--}},zu.Output=n,zu}var Uu,Wu={};function Gu(){if(Uu)return Wu;return Uu=1,Wu.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},Wu}var $u,Qu={};function Yu(){return $u||($u=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")}(Qu)),Qu}var qu,Ku,Xu={},Ju={};function Zu(){if(qu)return Ju;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 qu=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)})},Ju.Options=e,Ju.normalizeOpts=n,Ju.mergeOpts=t,Ju}function ec(){if(Ku)return Xu;Ku=1;var e=Zu().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,Xu.Options=n,Xu}var tc,nc={},ic={};function oc(){if(tc)return ic;tc=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},ic.InputScanner=t,ic}var rc,ac={},lc={};var sc,uc,cc,dc={},fc={};function pc(){if(sc)return fc;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 sc=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(){},fc.Pattern=e,fc}function hc(){if(cc)return ac;cc=1;var e=oc().InputScanner,t=Gu().Token,n=function(){if(rc)return lc;function e(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return rc=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},lc.TokenStream=e,lc}().TokenStream,i=function(){if(uc)return dc;uc=1;var e=pc().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},dc.WhitespacePattern=t,dc}().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()},ac.Tokenizer=r,ac.TOKEN=o,ac}var mc,gc={};function vc(){if(mc)return gc;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 mc=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)},gc.Directives=e,gc}var _c,bc,yc,xc,wc={};function Ac(){if(_c)return wc;_c=1;var e=pc().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},wc.TemplatablePattern=n,wc}function kc(){if(bc)return nc;bc=1;var e=oc().InputScanner,t=hc().Tokenizer,n=hc().TOKEN,i=vc().Directives,o=Yu(),r=pc().Pattern,a=Ac().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},u=new i(/\/\*/,/\*\//),c=/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(c),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=u.get_directives(n);i&&"start"===i.ignore&&(n+=u.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 u=!!i[1],c=i[2];if(!(!!i[i.length-1]||"![CDATA["===c.slice(0,8))&&(c===r||a&&c.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(u?--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},nc.Tokenizer=y,nc.TOKEN=s,nc.positionable_operators=p.slice(),nc.line_starters=v.slice(),nc}function Cc(){if(yc)return Bu;yc=1;var e=Hu().Output,t=Gu().Token,n=Yu(),i=ec().Options,o=kc().Tokenizer,r=kc().line_starters,a=kc().positionable_operators,l=kc().TOKEN;function s(e,t){return-1!==t.indexOf(e)}function u(e){return e.replace(/^\s+/g,"")}function c(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&&c(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)||c(this._flags.last_token,"do"))||!(this._flags.parent.mode===v&&this._flags.mode===g)&&d(this._flags.last_token,S)&&!e.newlines)||c(this._flags.last_token,"else")&&!(c(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(c(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&&c(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),c(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)||c(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&&(c(e,"if")&&c(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&&c(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&&c(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,u=!0,c=!1;if(":"===e.text?0===this._flags.ternary_depth?o=!1:(this._flags.ternary_depth-=1,c=!0):"?"===e.text&&(this._flags.ternary_depth+=1),!n&&!t&&this._options.preserve_newlines&&s(e.text,a)){var v=":"===e.text,_=v&&c,b=v&&!c;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();u=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,u=!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,u=!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,["--","++"])&&(u=!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=u}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(u(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)},Bu.Beautifier=C,Bu}var Sc,Ec,Tc,Oc={exports:{}},Rc={},Mc={};function Dc(){if(Sc)return Mc;Sc=1;var e=Zu().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,Mc.Options=t,Mc}function Nc(){if(Tc)return Oc.exports;Tc=1;var e=function(){if(Ec)return Rc;Ec=1;var e=Dc().Options,t=Hu().Output,n=oc().InputScanner,i=new(0,vc().Directives)(/\/\*/,/\*\//),o=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,a=/\s/,l=/(?:\s|\n)+/g,s=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,u=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function c(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 c.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},c.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},c.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},c.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},c.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},c.prototype.indent=function(){this._indentLevel++},c.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},c.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,c=this._options.eol;"auto"===c&&(c="\n",e&&o.test(e||"")&&(c=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(u)),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 O='"'===p||"'"===p;this.preserveSingleSpace(O||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(c)},Rc.Beautifier=c,Rc}().Beautifier,t=Dc().Options;return Oc.exports=function(t,n){return new e(t,n).beautify()},Oc.exports.defaultOptions=function(){return new t},Oc.exports}var Ic,Fc={exports:{}},Lc={},Pc={};function Vc(){if(Ic)return Pc;Ic=1;var e=Zu().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,Pc.Options=t,Pc}var jc,Bc,zc,Hc,Uc={};function Wc(){if(jc)return Uc;jc=1;var e=hc().Tokenizer,t=hc().TOKEN,n=vc().Directives,i=Ac().TemplatablePattern,o=pc().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},Uc.Tokenizer=l,Uc.TOKEN=r,Uc}function Gc(){if(Bc)return Lc;Bc=1;var e=Vc().Options,t=Hu().Output,n=Wc().Tokenizer,i=Wc().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 u(e,t,n){this.parent=e||null,this.tag=t?t.tag_name:"",this.indent_level=n||0,this.parser_token=t||null}function c(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}c.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},c.prototype.record_tag=function(e){var t=new u(this._current_frame,e,this._printer.indent_level);this._current_frame=t},c.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},c.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},c.prototype.try_pop=function(e,t){var n=this._get_frame([e],t);return this._try_pop_frame(n)},c.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:""},u=new f(this._options),d=new a(this._options,l),p=new n(e,this._options).tokenize();this._tag_stack=new c(d);for(var h=null,m=p.next();m.type!==i.EOF;)m.type===i.TAG_OPEN||m.type===i.COMMENT?u=h=this._handle_tag_open(d,m,u,s,p):m.type===i.ATTRIBUTE||m.type===i.EQUALS||m.type===i.VALUE||m.type===i.TEXT&&!u.tag_complete?h=this._handle_inside_tag(d,m,u,s):m.type===i.TAG_CLOSE?h=this._handle_tag_close(d,m,u):m.type===i.TEXT?h=this._handle_text(d,m,u):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 u=e.get_full_indent(a);if(r=r.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===r[0]&&r.match(/^(<!--|<!\[CDATA\[)/)){var c=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(r);if(!c)return void e.add_raw_token(t);l=u+c[1]+"\n",r=c[4],c[5]&&(s=u+c[5]),r=r.replace(/\n[ \t]*$/,""),(c[2]||-1!==c[3].indexOf("\n"))&&((c=c[3].match(/[ \t]+$/))&&(t.whitespace_before=c[0]))}if(r)if(o){var f=function(){this.eol="\n"};f.prototype=this._options.raw_options,r=o(u+r,new f)}else{var p=t.whitespace_before;p&&(r=r.replace(new RegExp("\n("+p+")?","g"),"\n")),r=u+r.replace(/\n/g,"\n"+u)}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}},Lc.Beautifier=d,Lc}function $c(){if(Hc)return Vu;Hc=1;var e=function(){if(xc)return ju.exports;xc=1;var e=Cc().Beautifier,t=ec().Options;return ju.exports=function(t,n){return new e(t,n).beautify()},ju.exports.defaultOptions=function(){return new t},ju.exports}(),t=Nc(),n=function(){if(zc)return Fc.exports;zc=1;var e=Gc().Beautifier,t=Vc().Options;return Fc.exports=function(t,n,i,o){return new e(t,n,i,o).beautify()},Fc.exports.defaultOptions=function(){return new t},Fc.exports}();function i(i,o,r,a){return n(i,o,r=r||e,a=a||t)}return i.defaultOptions=n.defaultOptions,Vu.js=e,Vu.css=t,Vu.html=i,Vu}!function(e){var t=$c();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)}(Pu);const Qc=Pu.exports,Yc=a({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!Kn.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=_i(yi(this.modelValue?ei(this.modelValue):this.defaultValue));this.oldVal=e,this.$nextTick(()=>{this.editor=l(ts(this.$refs.editor,{lineNumbers:!0,mode:"javascript",lint:!0,line:!0,tabSize:2,lineWrapping:!0,value:e?Qc.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(es){return ui(this.t("struct.errorMsg")),!1}return this.validate&&!1===this.validate(t)?(ui(this.t("struct.errorMsg")),!1):(this.visible=!1,_i(t)!==this.oldVal&&this.$emit("update:modelValue",t),!0)}}}),qc={class:"_fd-struct"},Kc={key:0,ref:"editor"};const Xc=ns(Yc,[["render",function(e,t,n,i,o,r){const a=c("el-button"),l=c("el-badge"),s=c("el-dialog");return k(),A("div",qc,[u(l,{type:"warning","is-dot":"",hidden:!e.configured},{default:D(()=>[C("div",{onClick:t[0]||(t[0]=t=>e.visible=!0)},[z(e.$slots,"default",{},()=>[u(a,{class:"_fd-plain-button",plain:"",size:"small"},{default:D(()=>[j(L(e.title||e.t("struct.title")),1)]),_:1})])])]),_:3},8,["hidden"]),u(s,{class:"_fd-struct-con",title:e.title||e.t("struct.title"),modelValue:e.visible,"onUpdate:modelValue":t[2]||(t[2]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"800px"},{footer:D(()=>[C("div",null,[u(a,{onClick:t[1]||(t[1]=t=>e.visible=!1),size:"default"},{default:D(()=>[j(L(e.t("props.cancel")),1)]),_:1}),u(a,{type:"primary",onClick:e.onOk,size:"default",color:"#2f73ff"},{default:D(()=>[j(L(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:D(()=>[e.visible?(k(),A("div",Kc,null,512)):N("",!0)]),_:1},8,["title","modelValue"])])}]]),Jc=a({name:"PropsInput",components:{Struct:Xc},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(){ci.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 Zc=ns(Jc,[["render",function(e,t,n,i,o,r){const a=c("Struct");return k(),M(a,{class:"_fd-props-input",modelValue:e.props,"onUpdate:modelValue":e.onInput,title:e.t("designer.customProps")},{default:D(()=>t[0]||(t[0]=[C("i",{class:"fc-icon icon-edit"},null,-1)])),_:1,__:[0]},8,["modelValue","onUpdate:modelValue","title"])}]]),ed=a({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){Mi(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)}}),td={class:"_fd-language-config"},nd={class:"_fc-l-label"},id={class:"_fc-l-info"},od={class:"_fd-lc-header"},rd={class:"_fd-lc-body"},ad={class:"_fd-lc-handle"},ld=["onClick"],sd=["onClick"],ud=["onClick"],cd=["onClick"];const dd=ns(ed,[["render",function(e,t,n,i,o,r){const a=c("el-button"),l=c("el-table-column"),s=c("el-input"),d=c("el-table");return k(),A("div",td,[C("div",nd,L(e.t("language.name")),1),C("div",id,L(e.t("warning.language")),1),C("div",od,[u(a,{size:"small",onClick:e.addColumn},{default:D(()=>[j(L(e.t("language.add")),1)]),_:1},8,["onClick"]),u(a,{size:"small",type:"danger",plain:"",disabled:!e.selected.length,onClick:e.batchRmColumn},{default:D(()=>[j(L(e.t("language.batchRemove")),1)]),_:1},8,["disabled","onClick"])]),C("div",rd,[u(d,{data:e.column,size:"small",ref:"table",onSelectionChange:e.selectionChange,"row-key":"key"},{default:D(()=>[u(l,{type:"selection",width:"30px"}),u(l,{prop:"key",label:"Key",width:"90px"}),(k(!0),A(P,null,V(e.localeOptions,t=>(k(),M(l,{key:t.value,prop:t.value,label:t.label,"min-width":"100px"},{default:D(n=>[n.row.input?(k(),M(s,{key:0,size:"small",modelValue:n.row[t.value],"onUpdate:modelValue":e=>n.row[t.value]=e,onBlur:t=>e.saveColumn(n.row,!0)},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(k(),A(P,{key:1},[j(L(n.row[t.value]||"-"),1)],64))]),_:2},1032,["prop","label"]))),128)),u(l,{width:"75px",label:e.t("tableOptions.handle"),fixed:"right"},{default:D(t=>[C("div",ad,[t.row.input?(k(),A("i",{key:1,class:"fc-icon icon-check",onClick:n=>e.saveColumn(t.row)},null,8,sd)):(k(),A("i",{key:0,class:"fc-icon icon-edit",onClick:e=>t.row.input=!0},null,8,ld)),C("i",{class:"fc-icon icon-group",onClick:n=>e.copy(t.row.key)},null,8,ud),C("i",{class:"fc-icon icon-delete-circle",onClick:n=>e.rmColumn(t.$index)},null,8,cd)])]),_:1},8,["label"])]),_:1},8,["data","onSelectionChange"])])])}]]),fd=a({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?$l.toJson(e,2):_i(e)},load(){const e=this.modelValue?this.toJson(this.modelValue):"";this.oldVal=e,this.$nextTick(()=>{this.editor=l(ts(this.$refs.editor,{lineNumbers:!0,mode:"javascript",lint:!0,line:!0,tabSize:2,lineWrapping:!0,value:e?Qc.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(es){return ui(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)}}}),pd={class:"_fd-struct-editor"},hd={ref:"editor"};const md=ns(fd,[["render",function(e,t,n,i,o,r){return k(),A("div",pd,[C("div",hd,null,512)])}]]);const gd=ns(a({name:"JsonPreview",components:{StructEditor:md},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=$l.toJson(this.value)},handleBlur(){let e;this.$refs.editor.save()&&(e=$l.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,t,n,i,o,r){const a=c("el-header"),l=c("StructEditor"),s=c("el-main"),d=c("el-container");return k(),M(d,{class:"_fc-json-preview"},{default:D(()=>[u(a,{height:"40px",class:"_fc-l-tabs"},{default:D(()=>[C("div",{class:I(["_fc-l-tab",{active:"rule"===e.active}]),onClick:t[0]||(t[0]=t=>e.active="rule")},L(e.t("designer.json")),3),C("div",{class:I(["_fc-l-tab",{active:"options"===e.active}]),onClick:t[1]||(t[1]=t=>e.active="options")},L(e.t("designer.form")),3)]),_:1}),u(s,{style:{padding:"8px"}},{default:D(()=>[u(l,{ref:"editor",modelValue:e.value,"onUpdate:modelValue":t[2]||(t[2]=t=>e.value=t),onBlur:e.handleBlur,onFocus:e.handleFocus,format:"",style:{height:"100%"}},null,8,["modelValue","onBlur","onFocus"])]),_:1})]),_:1})}]]),vd=a({name:"Warning",props:{tooltip:String},data:()=>({})}),_d=["innerHTML"],bd={key:0,class:"_fd-warning-text"},yd={key:1,class:"fc-icon icon-question"};const xd=ns(vd,[["render",function(e,t,n,i,o,r){const a=c("el-tooltip");return k(),M(a,{effect:"dark",placement:"top-start","popper-class":"_fd-warning-pop"},{content:D(()=>[C("span",{innerHTML:e.tooltip},null,8,_d)]),default:D(()=>[e.$slots.default?(k(),A("span",bd,[z(e.$slots,"default")])):(k(),A("i",yd))]),_:3})}]]),wd=["props"],Ad=["class","style","directives"],kd=["on","hook"],Cd=(e,t={},n={})=>{const i=[...wd,...n.normal||[]],o=[...Ad,...n.array||[]],r=[...kd,...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]=Cd([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]=Sd(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)},Sd=(e,t)=>function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)};Ru.registerLanguage("javascript",Du),Ru.registerLanguage("xml",Mu);const Ed=a({name:"FcDesigner",components:{Warning:xd,JsonPreview:gd,LanguageConfig:dd,PropsInput:Zc,TypeSelect:Fu,fcDraggable:Ul,DragForm:$l.$form(),ViewForm:Gl.$form(),EventConfig:Os},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(r){var a,u,c,f,p,h;const{menu:m,height:v,mask:_,locale:b,handle:y}=g(r),x=s(),w=n({active:null});E("fcx",w),E("designer",x);const A=i(r,"config",{}),k=i(A.value,"baseRule",null),C=i(A.value,"componentRule",{}),S=i(A.value,"validateRule",null),T=i(A.value,"formRule",null),O=i(A.value,"updateDefaultRule",{}),R=t(()=>{const e=v.value;return e?Kn.Number(e)?"".concat(e,"px"):e:"100%"}),M=t(()=>!1!==A.value.fieldReadonly),D=t(()=>A.value.hiddenMenu||[]),N=t(()=>A.value.hiddenItem||[]),I=t(()=>!0===A.value.hiddenDragMenu),F=t(()=>!0===A.value.hiddenDragBtn),L=t(()=>{const e=["base","props","style","event","validate"];let t=A.value.configFormOrder?[...A.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=ql;b.value&&(P=Ai(b).t);const V=(...e)=>P(...e),j=(e,t,...n)=>{if(t){if(Kn.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)},B=d(ei(Wl)),z=n({cacheProps:{},operation:{idx:-1,list:[]},hiddenLeft:!1,hiddenRight:!1,moveRule:null,addRule:null,added:null,bus:Pi(),device:(null==(a=A.value)?void 0:a.device)||"pc",activeModule:"base",activeTab:"form",activeMenuTab:"menu",activeRule:null,activePermission:{},children:d([]),treeInfo:[],dragRuleList:{},eventShow:!1,unloadStatus:!1,previewStatus:"form",t:V,preview:{state:!1,rule:[],option:{},api:{}},inputForm:{state:!1,rule:[],option:{},api:{},data:{},key:""},dragForm:d({rule:[],api:{}}),formOptions:{},oldOptionsKeys:[],form:{rule:j(Ni,T.value,{t:V}),api:{},option:{global:{input:!1!==(null==(u=A.value)?void 0:u.updateConfigOnBlur)?{modelEmit:"blur"}:{},select:{props:{clearable:!0}}},form:{labelPosition:"top",size:"small"},submitBtn:!1},value:{form:{},submitBtn:!1}},baseForm:{isShow:!1,rule:j(Ii,k.value,{t:V}),api:{},value:{},options:{global:{input:!1!==(null==(c=A.value)?void 0:c.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(Fi,S.value,{t:V}),api:{},value:[],options:{global:{input:!1!==(null==(f=A.value)?void 0:f.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==(p=A.value)?void 0:p.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==(h=A.value)?void 0:h.updateConfigOnBlur)?{modelEmit:"blur"}:{}},form:{labelPosition:"top",size:"small"},submitBtn:!1}}});o(()=>z.preview.state,function(t){t||e(()=>{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=ai(e)}else e=e.replace("formCreate>","");const n=e.split(">"),i=n.pop();let o=z.activeRule;n.forEach((e,t)=>{t||(e=ai(e)),o[e]||(o[e]={}),o=o[e]}),t({source:o,field:i})};o(()=>b.value,t=>{P=t?Ai(b).t:ql,G.clearActiveRule();const n=z.form.api.formData&&z.form.api.formData(),i=z.baseForm.api.formData&&z.baseForm.api.formData(),o=z.validateForm.api.formData&&z.validateForm.api.formData();z.validateForm.rule=j(Fi,S.value,{t:V}),z.baseForm.rule=j(Ii,k.value,{t:V}),z.form.rule=j(Ni,T.value,{t:V}),z.cacheProps={};const r=z.activeRule;let a=null;r&&(a=z.propsForm.api.formData&&z.propsForm.api.formData(),z.propsForm.rule=z.cacheProps[r._fc_id]=G.getPropsRule(r)),e(()=>{n&&z.form.api.setValue(n),i&&z.baseForm.api.setValue(i),o&&z.validateForm.api.setValue(o),a&&z.propsForm.api.setValue(a)})});const W=t(()=>Array.isArray(m.value)?m.value:B.value),G={setDevice(e){z.device=e,x.emit("changeDevice",e)},unWatchActiveRule(){H&&H(),H=null},watchActiveRule(){G.unWatchActiveRule(),H=o(()=>z.activeRule,function(e){e&&G.updateRuleFormData()},{deep:!0,flush:"post"})},makeChildren:e=>n({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;Kn.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&&G.appendMenuItem(e.menu,e)}):(z.dragRuleList[e.name]=e,e.menu&&G.appendMenuItem(e.menu,e))},openInputData(e){z.inputForm.state=void 0===e?!z.inputForm.state:!!e,z.inputForm.state&&(z.inputForm.rule=$l.parseJson(G.getJson()),z.inputForm.option=$l.parseJson(G.getOptionsJson()),z.inputForm.option.formData=ei(z.inputForm.data),z.inputForm.option.appendValue=!1,z.inputForm.option.submitBtn.show=!1,z.inputForm.option.resetBtn.show=!1,G.clearActiveRule())},inputSave(){const e=z.inputForm.api.formData();Object.keys(e).forEach(t=>{Ri(e[t])&&delete e[t]});const t=JSON.stringify(z.inputForm.data)!==JSON.stringify(e);z.inputForm.data=e,z.inputForm.state=!1,x.emit("inputData",e),t&&G.addOperationRecord()},inputClear(){G.inputReset({})},inputReset(e){z.inputForm.rule=$l.parseJson(G.getJson()),z.inputForm.option.formData=e||ei(z.inputForm.data),z.inputForm.key=ji()},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(){Mi(z.activeRule.name)},updateName(){z.activeRule.name="ref_"+ji()},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)=>G.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(){G.setRule([]),G.addOperationRecord(),z.unloadStatus=!1,x.emit("clear")},makeDragRule:e=>G.makeChildren([G.makeDrag(!0,"draggable",e,{add:(t,n)=>G.dragAdd(e,n),end:(t,n)=>G.dragEnd(e,n),start:(t,n)=>G.dragStart(e,n),unchoose:(t,n)=>G.dragUnchoose(e,n)})]),handleSave(){x.emit("save",{rule:G.getJson(),options:G.getOptionsJson()})},previewSubmit(...e){x.emit("previewSubmit",...e)},previewReset(...e){x.emit("previewReset",...e)},openPreview(){z.preview.state=!0;const e=G.getJson(),t=G.getOptionsJson();z.preview.rule=$l.parseJson(e),z.preview.option=$l.parseJson(t);const n=G.getConfig("useTemplate",!1);z.preview.component=Ru.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=Ru.highlight(fi(e,t),{language:"xml"}).value},copyCode(){Mi(this.$refs.previewCode.innerText)},getHtml:()=>fi(G.getJson(),G.getOptionsJson()),getRule:()=>G.parseRule(ei(z.dragForm.rule[0].children)),getJson:()=>$l.toJson(G.getRule()),getOption(){const e=ei(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=V("props.reset"),e.submitBtn.innerText=V("props.submit");const t=ei(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=>{Kn.Object(e[t])&&!Object.keys(e[t]).length&&delete e[t]}),delete e._submitBtn,delete e._resetBtn,e},getOptions:()=>G.getOption(),getOptionsJson:()=>$l.toJson([G.getOption()]).slice(1).slice(0,-1),setRule(e){e||(e=[]),z.children=d(G.loadRule(Kn.String(e)?$l.parseJson(e):ei(e))),G.clearActiveRule(),z.dragForm.rule=G.makeDragRule(G.makeChildren(z.children)),G.updateTree()},setBaseRuleConfig(e,t){k.value={rule:e,append:t},z.baseForm.rule=j(Ii,k.value,{t:V})},setComponentRuleConfig(t,n,i){C.value[t]={rule:n,append:i},z.cacheProps={};const o=z.activeRule;if(o){const t=z.propsForm.api.formData&&z.propsForm.api.formData();z.propsForm.rule=z.cacheProps[o._fc_id]=j(o._menu.props,C.value&&C.value[o._menu.name],o,{t:V,api:z.dragForm.api}),e(()=>{t&&z.propsForm.api.setValue(t)})}},setValidateRuleConfig(e,t){S.value={rule:e,append:t},z.validateForm.rule=j(Ii,S.value,{t:V})},setFormRuleConfig(e,t){T.value={rule:e,append:t},z.form.rule=j(Ii,T.value,{t:V})},clearActiveRule(){z.activeRule=null,z.activePermission={},z.customForm.config=null,z.activeTab="form",w.active=""},setOption(e){const t=ei(G.getConfig("formOptions",{})),n=t.form||{};delete t.form;let i={...t,...Kn.String(e)?JSON.parse(e):ei(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||""},Xn(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,G.updateOptionsValue()},setOptions(e){G.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=G.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"+vi(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(Kn.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=G.loadRule(e.children||[],o,n),e.control&&(e._control=e.control,delete e.control),e.computed&&(e._computed=e.computed,delete e.computed),e.on&&(e._on=e.on,delete e.on),e.hook&&(e._hook=e.hook,delete e.hook),o){const n=e.slot;let i;t&&t.slot&&n&&"default"!==n&&(i=G.getSlotConfig(t,n,o)),delete e.slot,e=G.makeRule(i||o,e),n&&(e.slot=n)}i.push(e)}),i},parseRule:(e,t)=>[...e].reduce((e,n)=>{let i=t;if(Kn.String(n))return e.push(n),e;if("DragBox"===n.type)return e.push(...G.parseRule(n.children,i||n.slot)),e;if("DragTool"===n.type){if(i=n.slot||t,n=n.children[0],Kn.String(n))return e.push(n),e;if("DragBox"===n.type)return e.push(...G.parseRule(n.children,i||n.slot)),e}return n&&(n={...n},i&&"default"!==i&&(n.slot=i),n.children&&n.children.length&&(n.children=G.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,n._control&&(n.control=n._control,delete n._control),n._computed&&(n.computed=n._computed,delete n._computed),n.slot||delete n.slot,n._on&&(n.on=n._on,delete n._on),n._hook&&(n.hook=n._hook,delete n._hook),n.props&&Object.keys(n.props).forEach(e=>{Ri(n.props[e])&&delete n.props[e]}),Object.keys(n).filter(e=>0===e.indexOf("__")||Array.isArray(n[e])&&0===n[e].length||Kn.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,A.value.hiddenFormConfig||[]),z.form.api.disabled(!0,A.value.disabledFormConfig||[])},baseChange(e,t,n,i){G.handleChange("",e,t,n,i)},formOptChange(e,t){z.form.value[e]=t,0===e.indexOf("formCreate")&&(e=">"+ai(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){G.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]),G.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:x})}},propChange(e,t,n,i){G.handleChange("props",e,t,n,i)},styleChange(e,t,n,i){if(z.customForm.config)return z.customForm.config.style.change(e,t);G.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){G.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})=>{Ri(n)?delete e[t]:e[t]=n})):e&&Ri(n)?delete z.activeRule[e][t]:(e?z.activeRule[e]:z.activeRule)[t]=n),G.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:x})}},validateChange(e,t,n,i){!z.activeRule||z.validateForm.api[z.activeRule._fc_id]!==z.activeRule||(G.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(Kn.String(e)&&(e=G.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&&(w.active=n.id,x.emit("active",e),G.toolActive(e))}},customFormChange(e,t){z.customForm.config&&z.customForm.config.change(e,t)},customActive(t){z.baseForm.isShow=!1,z.propsForm.isShow=!1,z.eventShow=!1,z.validateForm.isShow=!1,z.styleForm.isShow=!!t.style&&!1!==G.getConfig("showStyleForm"),z.activeRule=null,z.activePermission={},w.active="",z.customForm.config=t,z.customForm.isShow=!0,z.customForm.propsShow=t.props&&!1!==G.getConfig("showPropsForm"),z.customForm.key=ji(),z.customForm.rule=z.customForm.propsShow?t.props({t:V}):[],z.customForm.options.formData=t.formData,t.style&&(z.styleForm.value=t.style.formData||{}),e(()=>{z.activeTab="props"})},getPropsRule(e){let t=j(e._menu.props,C.value&&C.value[e._menu.name],e,{t:V,api:z.dragForm.api});if(C.value&&C.value.default){const n=C.value.default;t=j(()=>t,Kn.Function(n)?{rule:n,append:!0}:n,e,{t:V,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(t){if(A.value.beforeActiveRule&&!1===A.value.beforeActiveRule({rule:t}))return;G.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 n=G.getPermission(t);z.activeRule=t,z.activePermission=n,z.dragForm.api.activeRule=t,e(()=>{z.activeTab="props",e(()=>{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[t._fc_id]||(z.cacheProps[t._fc_id]=G.getPropsRule(t));const i=G.getConfig("hiddenItemConfig",{}),o=G.getConfig("disabledItemConfig",{}),r=Di([...n.hiddenConfig||[],...(null==i?void 0:i.default)||[],...(null==i?void 0:i[t._menu.name])||[]]),a=[...r,...t._menu.hiddenBaseField||[]],l=Di([...n.disabledConfig||[],...(null==o?void 0:o.default)||[],...(null==o?void 0:o[t._menu.name])||[]]);z.baseForm.api.disabled(!1),z.baseForm.api.hidden(!1),e(()=>{z.baseForm.api.all().forEach(e=>{(e.name||e.field)&&(e.hidden=-1!==a.indexOf(e.name)||-1!==a.indexOf(e.field))}),z.propsForm.api.hidden(!0,r),G.getConfig("showControl",!0)||z.baseForm.api.hidden(!0,"_control")}),l.length&&(z.baseForm.api.disabled(!0,l),e(()=>{z.propsForm.api.disabled(!0,l)}));const s=Xn(t,"field");z.baseForm.isShow=!1!==n.base&&s&&!1!==t.input&&!1!==G.getConfig("showBaseForm"),z.propsForm.isShow=!1!==n.props&&z.cacheProps[t._fc_id].length>0&&!1!==G.getConfig("showPropsForm"),z.styleForm.isShow=!1!==n.style&&!1!==t._menu.style&&!1!==G.getConfig("showStyleForm"),z.eventShow=!1!==n.event&&!1!==t._menu.event&&!1!==G.getConfig("showEventForm");const u=G.getConfig("showValidateForm");z.validateForm.isShow=!1!==n.validate&&(z.baseForm.isShow&&!1!==u||!0===u)&&!1!==t._menu.validate,z.propsForm.rule=z.cacheProps[t._fc_id],z.validateForm.isShow&&e(()=>{z.validateForm.api.hidden(!0===G.getConfig("validateOnlyRequired")||"required"===t._menu.validate,["validate"])}),G.updateRuleFormData(),G.watchActiveRule()},getConfig:(e,t)=>A.value&&Xn(A.value,e)?A.value[e]:t,getPermission(e){var t;let n={};return((null==(t=A.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=A.value.appendConfigData;Kn.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"+vi(n)]=ei(e[n]))}),Object.keys(e.props).forEach(n=>{const i=e.props[n];t[n]=ei(i),Kn.Object(i)&&Object.keys(i).forEach(e=>{t[n+">"+e]=ei(i[e])})}),["props","effect","attrs","style","wrap"].forEach(n=>{e[n]&&"object"==typeof e[n]&&Object.keys(e[n]).forEach(i=>{t["formCreate"+vi(n)+">"+i]=ei(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)&&G.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&&ui(z.t("struct.only",{label:V("com."+e.name+".name")||e.label})),t},dragMenu({menu:t,children:n,index:i,slot:o}){if(z.inputForm.state||t.only&&G.checkOnly(t))return;G.handleAddBefore();const r=z.dragRuleList[t.name];x.emit("drag",{item:t,dragRule:r});const a=G.makeRule(z.dragRuleList[r.name]);o&&(a.slot=o),n.splice(i,0,a);const l="DragTool"===a.type?a.children[0]:a;G.handleAddAfter({rule:a}),l&&G.getConfig("autoActive",!0)&&e(()=>{G.triggerActive(l)})},replaceField(e){const t=["array","object"].indexOf(e._menu.subForm)>-1;let n=G.parseRule(ei([e]))[0];const i=!1!==G.getConfig("autoResetName");return t&&(n.field=ji(),i&&(n.name="ref_"+ji())),n=$l.toJson(n),t?n=G.batchReplaceUni(n):(n=G.batchReplaceField(n),i&&(n=G.batchReplaceName(n))),G.loadRule([$l.parseJson(n)])[0]},batchReplaceField:e=>(e=e.replace(/"field"\s*:\s*"(\w[\w\d]+)"/g,(e,t)=>'"field":"'.concat(ji(),'"')),G.batchReplaceUni(e)),batchReplaceUni:e=>e=e.replace(/"_fc_id"\s*:\s*"(\w[\w\d]+)"/g,()=>'"_fc_id":"id_'.concat(ji(),'"')),batchReplaceName:e=>e=e.replace(/"name"\s*:\s*"ref_(\w[\w\d]+)"/g,()=>'"name":"ref_'.concat(ji(),'"')),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=G.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=G.getTrueRule(n._underlying_vm_);a[i._fc_id]=!(o&&r&&!G.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!(!G.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:x})||t.checkDrag&&!1===t.checkDrag({menu:e,toMenu:t,rule:n,toRule:i,designer:x})||A.value.checkDrag&&!1===A.value.checkDrag({menu:e,toMenu:t,rule:n,toRule:i}))},checkAllowDrag(e,t){function n(t){return Array.isArray(t)&&(t={item:t}),Li(t.item).indexOf(e.name)>-1||Li(t.menu).indexOf(e.menu)>-1}const i=G.getConfig("allowDrag",{})[t.name],o=G.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){G.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),G.handleSortAfter({rule:t})}}else G.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)){G.handleSortBefore();const t=z.moveRule.splice(i,1);o&&(t.slot=o),e.splice(n,0,t[0]),G.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:V});const i=O.value&&O.value[e.name];if(!t&&i)if("function"==typeof i)try{i(n)}catch(u){}else{let e=ei(i);delete e.children,delete e.component,n=Cd([n,e])}n._menu=l({...e}),n._menu._get=()=>n,n._fc_id||(n._fc_id="id_"+ji()),n.name||(n.name="ref_"+ji()),e.component&&(n.component=l(e.component)),n._computed||(n._computed={}),n.effect||(n.effect={}),e.input&&!n.field&&(n.field=ji()),e.languageKey&&G.mergeOptions({languageKey:e.languageKey}),Xn(n,"display")||(n.display=!0),Xn(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=G.makeDrag(e.drag,n._menu?n._menu.name:n.type,a,{end:(e,t)=>G.dragEnd(e.self.children,t),add:(e,t)=>G.dragAdd(e.self.children,t),start:(e,t)=>G.dragStart(e.self.children,t),unchoose:(e,t)=>G.dragUnchoose(e.self.children,t)})],o._config=n._menu),e.children&&!t&&!a.length)for(let l=0;l<(e.childrenLen||1);l++){const t=G.makeRule(z.dragRuleList[e.children]);(o||n).children.push(t)}const s=void 0!==_.value?!1!==_.value:!1!==e.mask;return!1===e.tool?n:e.inside?(n.children=G.makeChildren([{type:"DragTool",props:{dragBtn:!1!==e.dragBtn,children:e.children,mask:s,handleBtn:e.handleBtn,only:r},inject:!0,on:{delete:({self:e})=>{const t=G.getParent(e).parent;!1!==G.handleRemoveBefore({parent:t,rule:t})&&(t.__fc__.rm(),x.emit("delete",t),z.activeRule===t&&G.clearActiveRule(),G.handleRemoveAfter({rule:t}))},create:({self:e})=>{G.handleAddBefore();const t=G.getParent(e);x.emit("create",t.parent);const n=G.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),G.handleAddAfter({rule:t.parent})},addChild:({self:e})=>{G.handleAddBefore();const t=G.getParent(e),n=t.parent._menu,i=z.dragRuleList[n.children];if(!i)return;const o=G.makeRule(i);(n.drag?t.parent.children[0]:t.parent).children[0].children.push(o),G.handleAddAfter({rule:o})},copy:({self:e})=>{G.handleCopyBefore();const t=G.getParent(e);x.emit("copy",t.parent);const n=G.replaceField(t.parent);t.root.children.splice(t.root.children.indexOf(t.parent)+1,0,n),G.handleCopyAfter({rule:t.parent})},active:({self:e})=>{const t=G.getParent(e);x.emit("active",t.parent),setTimeout(()=>{G.toolActive(t.parent)},10)}},_config:n._menu,children:n.children}]),n):{type:"DragTool",props:{dragBtn:!1!==e.dragBtn,children:e.children,mask:s,handleBtn:e.handleBtn,only:r},inject:!0,display:!!n.display,on:{delete:({self:e})=>{!1!==G.handleRemoveBefore({parent:e,rule:e.children[0]})&&(x.emit("delete",e.children[0]),e.__fc__.rm(),z.activeRule===e.children[0]&&G.clearActiveRule(),G.handleRemoveAfter({rule:e.children[0]}))},create:({self:e})=>{G.handleAddBefore(),x.emit("create",e.children[0]);const t=G.getParent(e),n=G.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),G.handleAddAfter({rule:n})},addChild:({self:e})=>{G.handleAddBefore();const t=e.children[0]._menu,n=z.dragRuleList[t.children];if(!n)return;const i=G.makeRule(n);(t.drag?e.children[0]:e).children[0].children.push(i),G.handleAddAfter({rule:i})},copy:({self:e})=>{G.handleCopyBefore(),x.emit("copy",e.children[0]);const t=G.getParent(e),n=G.replaceField(e.children[0]);e.slot&&(n.slot=e.slot),t.root.children.splice(t.root.children.indexOf(t.parent)+1,0,n),G.handleCopyAfter({rule:e.children[0]})},active:({self:e})=>{x.emit("active",e.children[0]),setTimeout(()=>{G.toolActive(e.children[0])},10)}},_config:n._menu,children:G.makeChildren([n])}},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(A.value.beforeRemoveRule&&!1===A.value.beforeRemoveRule({rule:e}))return!1},handleCopyBefore(){},handleSortBefore(){},addOperationRecord(){const e=G.getJson(),t=ei(z.inputForm.data),n=z.operation.list.slice(0,z.operation.idx+1);n.push({rule:e,formData:t}),z.operation.list=n,z.operation.idx=n.length-1,z.unloadStatus=1!==n.length},prevOperationRecord(){if(!z.operation.list[z.operation.idx-1])return;const e=z.operation.list[--z.operation.idx];G.useOperationRecord(e),G.clearActiveRule()},nextOperationRecord(){if(!z.operation.list[z.operation.idx+1])return;const e=z.operation.list[++z.operation.idx];G.useOperationRecord(e),G.clearActiveRule()},useOperationRecord(e){z.inputForm.data=e.formData,G.setRule(e.rule)},handleAddAfter(){G.addOperationRecord(),G.updateTree()},handleRemoveAfter(){G.addOperationRecord(),G.updateTree()},handleCopyAfter(){G.addOperationRecord(),G.updateTree()},handleSortAfter(){G.addOperationRecord(),G.updateTree()},treeChange(e){G.triggerActive(e.rule)},getFormDescription:()=>Ei(G.getDescription()),getDescription:()=>Ti(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 Ei(Ti(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:Rs(function(){e(()=>{z.treeInfo=Si(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;$[e.key]?$[e.key](e):"1234".indexOf(e.key)>-1&&$.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!==G.getConfig("autoResetField")&&(t=G.batchReplaceField(t)),!1!==G.getConfig("autoResetName")&&(t=G.batchReplaceName(t));const i=G.loadRule([$l.parseJson(t)])[0];let o=!0;if(z.activeRule&&z.activeRule._menu.drag){const e=G.getTrueRule(i);if(e&&!G.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),G.updateTree(),G.addOperationRecord(),x.emit("pasteRule",{event:e,copyRule:i})}}};G.addDragRule=G.addComponent;const $={z(e){e.shiftKey?G.nextOperationRecord():G.prevOperationRecord()},Backspace(){!z.activeRule||G.toolHandle(z.activeRule,"delete")},c(e){const t=z.activeRule;!t||(Mi("FormCreate:"+$l.toJson(G.parseRule([t])[0])),x.emit("copyRule",{event:e,rule:t}))},x(e){!z.activeRule||($.c(e),G.toolHandle(z.activeRule,"delete"))},p(){G.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),G.updateTree(),G.addOperationRecord(),x.emit("sort"+("ArrowUp"===e.key?"Up":"Down"),{event:e,rule:t}))}},ArrowDown(e){$.ArrowUp(e)}};z.dragForm.rule=G.makeDragRule(G.makeChildren(z.children)),G.setOption({}),m.value?mr.forEach(e=>{z.dragRuleList[e.name]=e}):G.addComponent(mr);const Q=t(()=>Object.keys(z.inputForm.data).length>0);return{...g(z),...G,dragHeight:R,t:V,handle:y,inputCheckStatus:Q,fieldReadonly:M,hiddenMenu:D,hiddenItem:N,hiddenDragMenu:I,hiddenDragBtn:F,menuList:W,configFormOrderStyle:L}},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)}}),Td=["onClick"],Od=["onClick"],Rd={class:"_fc-l-icon"},Md={class:"_fc-l-name"},Dd={class:"_fc-tree-label"},Nd={class:"_fc-m-tools-l"},Id={class:"devices"},Fd={class:"_fc-m-tools-r"},Ld={class:"_fd-input-btn"},Pd={key:0,class:"_fc-m-input"},Vd={key:0,class:"_fc-m-input-handle"},jd={class:"_fc-r-title"},Bd={class:"_fc-r-title"},zd={style:{"grid-area":"base"}},Hd={style:{"grid-area":"props"}},Ud={style:{"grid-area":"style"}},Wd={style:{"grid-area":"event"}},Gd={key:0,style:{"grid-area":"validate"}},$d={key:2,class:"_fd-preview-code",ref:"previewCode"},Qd=["innerHTML"],Yd={key:3,class:"_fd-preview-code",ref:"previewCode"},qd=["innerHTML"];const Kd=ns(Ed,[["render",function(e,t,n,i,o,r){const a=c("el-tooltip"),l=c("el-aside"),s=c("LanguageConfig"),d=c("JsonPreview"),p=c("el-header"),h=c("fcDraggable"),m=c("el-main"),g=c("el-dropdown-item"),v=c("el-dropdown-menu"),_=c("el-dropdown"),b=c("el-tree"),y=c("el-container"),x=c("el-button"),w=c("el-popconfirm"),S=c("el-switch"),E=c("ViewForm"),T=c("DragForm"),O=c("Warning"),R=c("TypeSelect"),$=c("el-input"),Q=c("el-divider"),Y=c("PropsInput"),q=c("EventConfig"),K=c("el-tab-pane"),X=c("el-tabs"),J=c("el-dialog");return k(),M(y,{class:"_fc-designer",style:H(e.height?"height:".concat(e.dragHeight,";flex:0;"):""),onDragenter:e.handleDragenter,onDragleave:e.handleDragleave,onDrop:e.handleDrop},{default:D(()=>[u(m,null,{default:D(()=>[(k(),M(y,{style:{height:"100%"},key:e.locale&&e.locale.name},{default:D(()=>[!1!==e.getConfig("showMenuBar")?f((k(),M(l,{key:0,class:"_fc-l-menu",width:"40px"},{default:D(()=>[u(a,{effect:"dark",content:e.t("designer.comList"),placement:"right","hide-after":0},{default:D(()=>[C("div",{class:I(["_fc-l-menu-item",{active:"base"===e.activeModule}]),onClick:t[0]||(t[0]=t=>e.activeModule="base")},t[36]||(t[36]=[C("i",{class:"fc-icon icon-menu"},null,-1)]),2)]),_:1},8,["content"]),e.getConfig("showLanguage",!0)?(k(),M(a,{key:0,effect:"dark",content:e.t("language.name"),placement:"right","hide-after":0},{default:D(()=>[C("div",{class:I(["_fc-l-menu-item",{active:"language"===e.activeModule}]),onClick:t[1]||(t[1]=t=>e.activeModule="language")},t[37]||(t[37]=[C("i",{class:"fc-icon icon-language"},null,-1)]),2)]),_:1},8,["content"])):N("",!0),e.getConfig("showJsonPreview",!0)?(k(),M(a,{key:1,effect:"dark",content:"JSON",placement:"right","hide-after":0},{default:D(()=>[C("div",{class:I(["_fc-l-menu-item",{active:"json"===e.activeModule}]),onClick:t[2]||(t[2]=t=>e.activeModule="json")},t[38]||(t[38]=[C("i",{class:"fc-icon icon-script"},null,-1)]),2)]),_:1})):N("",!0)]),_:1},512)),[[F,!e.hiddenLeft]]):N("",!0),e.hiddenLeft?N("",!0):(k(),M(l,{key:1,class:"_fc-l",width:"language"===e.activeModule?"450px":"266px"},{default:D(()=>[C("div",{class:"_fc-l-close",onClick:t[3]||(t[3]=t=>e.hiddenLeft=!0)},t[39]||(t[39]=[C("i",{class:"fc-icon icon-arrow"},null,-1)])),"language"===e.activeModule?(k(),M(s,{key:0})):N("",!0),"json"===e.activeModule?(k(),M(d,{key:1})):N("",!0),"base"===e.activeModule?(k(),M(y,{key:2,style:{height:"100%"}},{default:D(()=>[u(p,{height:"40px",class:"_fc-l-tabs"},{default:D(()=>[C("div",{class:I(["_fc-l-tab",{active:"menu"===e.activeMenuTab}]),onClick:t[4]||(t[4]=t=>e.activeMenuTab="menu")},L(e.t("menu.component")),3),C("div",{class:I(["_fc-l-tab",{active:"tree"===e.activeMenuTab}]),onClick:t[5]||(t[5]=t=>e.activeMenuTab="tree")},L(e.t("menu.tree")),3)]),_:1}),f(u(m,null,{default:D(()=>[(k(!0),A(P,null,V(e.menuList,(t,n)=>(k(),A(P,null,[-1===e.hiddenMenu.indexOf(t.name)?(k(),A("div",{class:"_fc-l-group",key:n},[C("h4",{class:"_fc-l-title",onClick:e=>t.hidden=!t.hidden},[j(L(e.t("menu."+t.name)||t.title)+" ",1),C("i",{class:I(["fc-icon icon-arrow",{down:!t.hidden}])},null,2)],8,Td),f(u(h,{group:{name:"default",pull:"clone",put:!1},sort:!1,itemKey:"name",class:"_fc-l-list",list:t.list},{item:D(({element:t})=>[-1===e.hiddenItem.indexOf(t.name)?(k(),A("div",{key:0,class:"_fc-l-item",onClick:n=>e.clickMenu(t)},[C("div",Rd,[C("i",{class:I(["fc-icon",t.icon||"icon-input"])},null,2)]),C("span",Md,L(e.t("com."+t.name+".name")||t.label),1)],8,Od)):N("",!0)]),_:2},1032,["list"]),[[F,!t.hidden]])])):N("",!0)],64))),256))]),_:1},512),[[F,"menu"===e.activeMenuTab]]),"tree"===e.activeMenuTab?(k(),M(m,{key:0},{default:D(()=>[u(b,{ref:"treeRef",data:e.treeInfo,"default-expand-all":"","expand-on-click-node":!1,onCurrentChange:e.treeChange},{default:D(({node:n,data:i})=>{var o,r,a,l;return[C("div",{class:I(["_fc-tree-node",{active:e.activeRule===i.rule}])},[C("div",Dd,[C("i",{class:I(["fc-icon",i.rule._menu&&i.rule._menu.icon||"icon-cell"])},null,2),C("span",null,L(((null==(l=null==(a=null==(r=null==(o=i.rule)?void 0:o.__fc__)?void 0:r.refRule)?void 0:a.__$title)?void 0:l.value)||i.rule.title||"").trim()||i.rule.props&&i.rule.props.label||e.t("com."+(i.rule._menu&&i.rule._menu.name)+".name")||i.rule._menu&&i.rule._menu.label||i.rule.type),1)]),i.slot?N("",!0):(k(),A("div",{key:0,class:"_fc-tree-more",onClick:t[6]||(t[6]=B(()=>{},["stop"]))},[u(_,{trigger:"click",size:"default"},{dropdown:D(()=>[u(v,null,{default:D(()=>["_"!==i.rule._fc_drag_tag?(k(),M(g,{key:"1",onClick:t=>e.toolHandle(i.rule,"copy")},{default:D(()=>[j(L(e.t("props.copy")),1)]),_:2},1032,["onClick"])):N("",!0),i.rule._menu&&i.rule._menu.children&&"_"!==i.rule._fc_drag_tag?(k(),M(g,{key:"2",onClick:t=>e.toolHandle(i.rule,"addChild")},{default:D(()=>[j(L(e.t("form.appendChild")),1)]),_:2},1032,["onClick"])):N("",!0),u(g,{key:"3",onClick:t=>e.toolHandle(i.rule,"delete")},{default:D(()=>[j(L(e.t("props.delete")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:D(()=>[t[40]||(t[40]=C("i",{class:"fc-icon icon-more"},null,-1))]),_:2,__:[40]},1024)]))],2)]}),_:1},8,["data","onCurrentChange"])]),_:1})):N("",!0)]),_:1})):N("",!0)]),_:1},8,["width"])),u(y,{class:"_fc-m"},{default:D(()=>[u(p,{class:"_fc-m-tools",height:"45"},{default:D(()=>[C("div",Nd,[e.inputForm.state?N("",!0):(k(),A(P,{key:0},[!1!==e.getConfig("showDevice")?(k(),A(P,{key:0},[C("div",Id,[C("i",{class:I(["fc-icon icon-pc",{active:"pc"===e.device}]),onClick:t[7]||(t[7]=t=>e.setDevice("pc"))},null,2),C("i",{class:I(["fc-icon icon-pad",{active:"pad"===e.device}]),onClick:t[8]||(t[8]=t=>e.setDevice("pad"))},null,2),C("i",{class:I(["fc-icon icon-mobile",{active:"mobile"===e.device}]),onClick:t[9]||(t[9]=t=>e.setDevice("mobile"))},null,2)]),t[41]||(t[41]=C("div",{class:"line"},null,-1))],64)):N("",!0),C("div",null,[C("i",{class:I(["fc-icon icon-pre-step",{disabled:!e.operation.list[e.operation.idx-1]}]),onClick:t[10]||(t[10]=(...t)=>e.prevOperationRecord&&e.prevOperationRecord(...t))},null,2),C("i",{class:I(["fc-icon icon-next-step",{disabled:!e.operation.list[e.operation.idx+1]}]),onClick:t[11]||(t[11]=(...t)=>e.nextOperationRecord&&e.nextOperationRecord(...t))},null,2)])],64))]),C("div",Fd,[e.inputForm.state?N("",!0):(k(),A(P,{key:0},[z(e.$slots,"handle"),e.getConfig("showSaveBtn",!1)?(k(),M(x,{key:0,type:"success",plain:"",size:"small",onClick:e.handleSave},{default:D(()=>[t[42]||(t[42]=C("i",{class:"fc-icon icon-save-online"},null,-1)),j(" "+L(e.t("props.save")),1)]),_:1,__:[42]},8,["onClick"])):N("",!0),!1!==e.getConfig("showPreviewBtn")?(k(),M(x,{key:1,type:"primary",plain:"",size:"small",onClick:e.openPreview},{default:D(()=>[t[43]||(t[43]=C("i",{class:"fc-icon icon-preview"},null,-1)),j(" "+L(e.t("props.preview")),1)]),_:1,__:[43]},8,["onClick"])):N("",!0),u(w,{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:D(()=>[u(x,{type:"danger",plain:"",size:"small"},{default:D(()=>[t[44]||(t[44]=C("i",{class:"fc-icon icon-delete"},null,-1)),j(L(e.t("props.clear")),1)]),_:1,__:[44]})]),_:1},8,["title","confirm-button-text","cancel-button-text","onConfirm"]),e.handle&&e.handle.length?(k(),M(_,{key:2,trigger:"click",size:"default"},{dropdown:D(()=>[u(v,null,{default:D(()=>[(k(!0),A(P,null,V(e.handle,t=>(k(),M(g,{onClick:B(n=>e.triggerHandle(t),["stop"])},{default:D(()=>[C("div",null,L(t.label),1)]),_:2},1032,["onClick"]))),256))]),_:1})]),default:D(()=>[u(x,{class:"_fd-m-extend",plain:"",size:"small"},{default:D(()=>t[45]||(t[45]=[C("i",{class:"fc-icon icon-more"},null,-1)])),_:1,__:[45]})]),_:1})):N("",!0)],64)),e.getConfig("showInputData",!0)?(k(),A(P,{key:1},[t[48]||(t[48]=C("div",{class:"line"},null,-1)),C("div",Ld,[u(S,{size:"default","model-value":e.inputForm.state,"inline-prompt":"","onUpdate:modelValue":e.openInputData},{"active-action":D(()=>t[46]||(t[46]=[C("i",{class:"fc-icon icon-edit2",style:{"font-size":"12px",color:"#fff"}},null,-1)])),"inactive-action":D(()=>t[47]||(t[47]=[C("i",{class:"fc-icon icon-edit2",style:{"font-size":"12px",color:"#333"}},null,-1)])),_:1},8,["model-value","onUpdate:modelValue"])])],64)):N("",!0)])]),_:3}),u(m,{class:"_fc-m-con"},{default:D(()=>{var n,i;return[(k(),A("a",{key:e.activeRule?e.activeRule._fc_id:"",style:{"background-image":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAAiCAYAAAAu2wBPAAABG2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+l1vpCgAAAAFzUkdCAK7OHOkAAAAEc0JJVAgICAh8CGSIAAAQoElEQVR4nO1dW3KbSBf+usGM335lBQMjKVV6imYFI6/Azgoir2CcFdhegZMVRF5BnBVYs4I4T1QJMMwKwrw5GLr/B53GRwhdLTuZDF9VKgj6crr79OlzAwMNGjRo0KBBgwYNGjRo0KBBgwYNGjT4mSHiOP4MoL+Dtg48zxsDQBzH1wAGqyoopc7b7fbZDvpu0KBBg40hi6J4v4N2bpjwG2AN4QcAUsqrHfTdoEGDBltBWpY1fmwjSqlP7HqwZrWx53k3j+27QYMGDbaF7XleEsfxCMCQ3R8DSNZtREr5jl3/yR4l1BYAuJjVDBvtr0GDBt8VNgDkeX5p2/bQ3CyK4rLT6Yw2bYzM3xa7dVzxCxqkAC63aL91d3fXWlam1+slm7bbYDnCMBxqrV0A6Ha7Z+vUieO4lef5CQAIIW46nc53PfB833c3Kf8z8ZHv++7e3l7fsqxf6VZ6d3f31880xm1hA0C32x3HcZxgqqXBsqw3AEZbtHfKrlMm/FqY1f5GnuelW7R/6DjOUrqiKIIQYqyU2kqIN6jFGynlgK7P1qlwd3fXchzH8MMI31njdxznGsTfayAB4D0ZMc8EEnwfhBADAFBKlc8cx8Ht7e24KIrzbrc7/k4kbgVzmO1CgEt2zRl0EMexu0lDVSGnlHrPrk8qxT/hCaG1HgghPkRR9OEp+2nQ4EdFEARnjuPERvjVQWs9kFJeB0Fw9nyUbY/JZNKPouij4zixbdvuLtq02fV7AKWgKopigA20QKXUiZQP8lRKOWbX3C9YaoaPxEgpNWNG27b9a57nHvXXAjAMw/CvRhNswKGUOvjeNDwlgiAYSCm5NTZSSl3atn0DTLVz27aHZp9IKU/DMEx+9H0ihDgCcLTLNksBSMGQMUiLsyzrIo7j0wX1AAB5nh8b9VlKecgejStpMaXfjmuGj4FS6u9FqnsQBGMppfE5bmvON/hJ8W8z+TZBHMctpVRp+Witj2sEWwrgbDKZXFmW9RkAhBCn+A/uE64BoiiKS8uyBvSzhdmARhWpOVFIyPFkam5Ov+GVeMT4qdDtdsdRFKUAWkKI2iTvMAyPhBB/aK37QogUQKKU+lTdHEEQDGzb/hUA6hzHYRgeWZb1v6Io/qk6+n3fd/f39/8AgDzPZwQ2+WcGQohDrXVLCJFIKW8AXFb9o+ReOASA+/v7L3t7e0me50MhxKEQIsmy7JzT5fu+6zjOn3jweaVKqctVGz8MwyHNiSuESNapswmofXNQ1tIUx3HJL57n1QbKVq3JU4CtF5+fv/M8H9X1z2n0PO+S+O0NAGitP3U6ndGCMoeY7ruZ+SFeOmRpZkmWZe+rfRdFMRBCuPRztEyre/ny5U0URSNMM0DcIAgGpj+zDoav+doppd5XeblCW7qIlzmozVda6z4ALNoDZp6UUq9Y9UEcx+Xc8XY5Pav21owA7HQ6oziOL7Bc8MFMQrvdNo1x7a+M8NLG5SrreMvgxzZIUSPESTiUDnEhRPlMSnlye3s7FkK8NnQKIVxzotq2fQ4WBKDT9qNSCiREZwSg4zinSqkh1R2a+5PJpG9Z1scqDeSkPgvD8C1nXAoojADAsqx3SqkjKaVrntu2fQlKWwqC4Kxi/pixDW9vb8ffvn07rm6aRXMipRwGQXBebWsbRFF0AeZi4TTx+aZNNKSx1Gr5UsqPSqkWgHR/f//JgxVkUn7A/PzAcZzTIAjedrvdmYNdCHFqBEIQBC+EEBfsWQpgVCnjkRZWQko5jKLoXZZl7x3HuVZKufy54zjDMAyP+cHLDhhUXUR1kFK+zfP8EgDyPE9Y3RFdjqMoOsRsmtwXUHqb4TceYKH6AHAymUxev3z5cibfd9kerKvH54nRzfssxxkEwYmU8sI8q+ytOXpmBCDhCvM5gXMwb3GQkJspz4TcGzABtKO3TlaCBJNLP5PKfR4NvFFKfZJS/g/TMbS01gMAHwEcAMD9/f3YcRwAgBDiD94PnbbmZ4ufoAQj/FNQ4Mf3fdeyrGs8zMuVUuqLlPJXKt8SQnwIwzBdkDoyxIIDqiJkEpBAFkL0tdYDrfWAGK8UGjVzkiilLmlOqr6kbTEEAK31WGv9V3W+tdYXAI6B6aaVUg4BQEr5BhX+C4JggIfxb5tNsDZI+PEULrNe5RiklBdBELQWpQitM4dUJgEwFkK4xIcAcOI4zhDTMV8BSMx6YsorF77v37BDzdRL19Heaf4WliMLalD3jDRWM7YUwJjm5hWmvOxalnXt+/7v/NDlws/wBABYlvUHjcslBcEjGlKaG67QpPSvSs8Fu3W1ip45AbhFTuCMkMM0mGLAtb90F2+dLAPlnvW5D4SfgnmenzDN6V273X7L6p5TvSOt9SAMw2Gn0xn1er0kDMOxEGIghBjEcdxi2uGMQLRt+xWImShU36JyN6bOL7/88kFr3SLaDiqmxLlhDlrIOgHYwlRIHZsTe39/PyXBYITfTZZlrznTmZMRgGvGRo/e4EH4jdrt9jGfTzMnNXRsBKXUORcQNN+fqe9hEASX3W53TO6LxNz3fX/GvOcBNf4G0iaIokgvey6lHBqzijQ/APP+NN/335v1klKe+r5faw4DaCmlzvM8H9U8AwAIIca//fZbGZxh62Xqz2iZlOEwBODu7e0N8OC/4wJiF2gBSLTW55ZlXZk83IqvMc2ybEbIkZXzGYBJhzqmem+YcvKu0+mUe7A6LqNQtNvt18CsdaOUes33zrb08DQYAKWDuKxIOYHLMCPkWPCjenLs9LSWUp5GUaT5P6XUVzqtXSqW2LZd95ZKKqWcMe08z0uzLCsXQwjBI9elEKXouIEZ+4ielXOxv79/yOqcA9NFMCe7EGJcPaF7vV7CfKQuCbUq0izLDrrd7rjX6yW9Xi/xPC/lQSil1NvqRqTNk1THprUuaZZSzjBjdU4egbSqHXmelyqlSmHL6ddal2tDmxvAbKpV3fztGjT/rumvqgj0er2E00p+1zq863a7Z2a96oRknucz82zbNu8rqZrY/GAXQnDf2K4FIJRSx51OZ+R5XsroN75KKKXmfJFkZpoDfEhrBwCfsizzlFIHWZbNWYRa6/JQI4ViXaxDz6hKT50JjKIozi3LMtJ0EMex63leUi1HuYID87uS+3fE02LwxLl/NRhRcCAFpsIHzOysE8Zc2wPQN9pexQw+BHBFGp4LIC2K4r1lWUOuITLBUgaL9vb2XnFfSV3+lVLKZOvPaJQMVwu0DC7IDhcIT4M+o9OUS9aYk20xqrtp2/aNmQ/jCAdm3Q6YjeKX1oYQYuvEamNiL8Ld3d1fdDkw94QQo7qylmVdGc2Dj6HS30o/atVP5nleGkWR+Tm3Llprfq/OJbLSj78mkrqDhvvkpJSv6nhZCNHSeqps53nex4N7LAWQTCaTfhzHf+Z5/oJcQCDz39R5sS6RSqly7pfQ41bpqRWANaZqqTJWOh1Wcv/qtC2ApcXsEFd1X5PJ8/xv27ZvqptZCFEyhFLq70WNkr8BwDT4ACCtCIEBMNXwKPhxQ9G0GwB9M7FsM5TClnIUAZRJqINlA+SLug7tDCeVw2cO9/f3bhzHCRNAyaKyfE62gVLqn7r7tMlTTH1Zrrnf6/USE50UQgx833dJ2+I+1Y1fpWT9rlXXbEpgylcL2qodQ7XMFmSWqAg7AEBRFKllWXXFbzDNyKilZYu+kwWPuIA9klLOuUmMsAGmObrmmgdBlFLgvMrrbIit6KkVgJQTeIUHrWJQV65GyKVA7TvBW5/Wi6CU+tJut7faBOTA3hSXmM6D6/u+a4QT00RuAPRJ+wIe1PFFNF4ppb4s61AIcbPs+SIopVZqHEVRpC9fvuRaxkJQKsE2pABYOd+1mgoPhjiO8yf5DAf0+LmyCdbtY+dm5yOQgFLSaoJyc+BBnqqfdgOMVh3M5jn54uaCgLZtx0CpJDw28LY2PbUCEChzAo0ArDrOVwm5mXeC8YjTelfI8zxhZpW7pOiA/k+5qcnNMvJLHVG7X4Cp70IIMaT6RuMpzV9gTqAlWzJbLbTWidFAtNZXVZNqCRJMgy615hswNR0eSV5t/coHCmborQRDjsD80rtKpl8FrfUXI/gXuCOMa8UgeQ66loH48Aioj6JXYVnWKdOMlpatIOF9drvdtZQcy7LMW1q1SdoUJNmAjBLl4aO1/qvb7Y4WF33AQjuJUjAS87smGFIr5Mi5yJniOXP/FoKEWUI/j+q+DsJTLKraF5lgY3p2SuXKVAPmNugzh/6Mr/H+/p63WRtZjaLowgR1VvjxquBO8bm24zhuRVH0ldr+zB4Zult1/fFAwCNQO98824C/OmnAAgyuUuqMrmt9Uk+B+/v7sp+a99kBlBsaQP0YnhskUBL6OVz2ni995WcAbB5U4hF4nnvIcXt7e214mQVBBhVaZ6C1Hq5Lwy7oWe4omj0Ryg8k1Ag5HuFdlhbzXVGJ2F3zDR+G4VBK+dH8NpHbCoyQcen/8tSjgMKYfvaBefOXhPDItBFF0UfGGAiC4AQslWUThqTNmgLTCHkQBCembTLZS7OD05VlWTlOKeUHPieTyaTP00AeA8dxPnIhSPNdRuVRYyXwMdXR/tRYtl5xHLdIuAzpeYIfwNIBAK11GVGWUp7e3t5ex3H8ZjKZ9CeTST8Mw6Moij4IIcq0kW/fvs35+Jehki0yjKLogvNbEARnLMBWygfuU+S85vu+G0XRB1ZnDrZtf2XjOgyCYGB4qkLP0TJ6hBClUrZKAFaFgJGsVSHHI7xc+9jVhw92gk6nM2L+MVdKeU1a0VdiBrPJ3tYJH64RAPMnvmVZ3AyYMX9ZnbdgC6WU+mo0M5b3lWZZ9nqTsZGGytNKLkzbjuPEeDiwRjylotfrJYvmhPKmXDzet5UC6DuOE0dRFFfnW2v9dlEEGhX/MU9reg7Qepl1NOsVU8qVsYKSoihe/wiWDjC13ogXjNAZKKVGlmV9tizrsxDiI5jgLoriYJvXCbMsO8ADL59wfuNzU0mvKg8J4rXPURR9Jh4dYokb4e7ujsuZEynlNfvk2tr0CCHKvbVUAFLqy5h3Sv9zIZcs+nsgz+Wr2QTdbvdMKfUWs5qFEeaJ1vp1NefKgJvBhJnUHuMPJNSm2lDO3u8kdGa0G8KomsS5LjqdzpVS6kAIwWksx6amf4Rq7qRfNidE56OCWFLKMzBNCpX5XpZoz98e4if3c4HW66CyXi4rMsqy7GADn+uzoNPpjLIs+x3TtVs0Z4+ivdfrJVmWLeK3sn2+ZqSEcF7r078UwLuiKBYe/HRYcwXi0fSsDO2FYThkOYFQSp3zKI1if9mN3iPmvpIXP8qpWAcy8VytdZrneW2C6lMijuPW/f29u7e392pR+s62MF8BBqZpFOua05PJpP8U9ADT8RZFMdBap1rrdJ2NV8n+P3gu/18dzHp9T57ZFobXgc34YV2Yt7Ao9y9dxTvV8t+LnpUCkOzor0uKvPA8L6VyMR4k7tjzvIMl9Ro0WIkoir6CAk7tdnvtxNgGDdbBKh+gSeIcLXjMTZI+njj3r8F/Czwq/yO6Uxr8+7FSAALTDyTU3a983eWHy/1r8O+GZVklTz138KPBfwNrCcDqBxII5ddddvhHjxo0AFCm7oCCTg0/NXgSLHwTpAp6NWnm7wywj1hW3z197g8fNPjJQMGFxofcoEGDBg0aNGjQoEGDHeL/8DGxPwUCk/oAAAAASUVORK5CYII=) !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/"})),C("div",{class:I(["_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?(k(),A("div",Pd,[(k(),M(E,{key:e.inputForm.key,rule:e.inputForm.rule,option:e.inputForm.option,locale:null==(n=e.locale)?void 0:n.name,api:e.inputForm.api,"onUpdate:api":t[12]||(t[12]=t=>e.inputForm.api=t),disabled:!1},null,8,["rule","option","locale","api"]))])):(k(),M(T,{key:1,rule:e.dragForm.rule,option:e.formOptions,locale:null==(i=e.locale)?void 0:i.name,api:e.dragForm.api,"onUpdate:api":t[13]||(t[13]=t=>e.dragForm.api=t)},null,8,["rule","option","locale","api"]))],6),e.inputForm.state?(k(),A("div",Vd,[u(x,{plain:"",onClick:t[14]||(t[14]=t=>e.inputClear())},{default:D(()=>[j(L(e.t("props.clear")),1)]),_:1}),u(x,{plain:"",onClick:t[15]||(t[15]=t=>e.inputReset())},{default:D(()=>[j(L(e.t("props.reset")),1)]),_:1}),u(x,{type:"primary",plain:"",onClick:t[16]||(t[16]=t=>e.inputSave())},{default:D(()=>[j(L(e.t("props.save")),1)]),_:1})])):N("",!0)]}),_:1})]),_:3}),e.config&&!1===e.config.showConfig?N("",!0):f((k(),M(l,{key:2,class:"_fc-r",width:"320px"},{default:D(()=>[C("div",{class:"_fc-r-close",onClick:t[17]||(t[17]=t=>e.hiddenRight=!0)},t[49]||(t[49]=[C("i",{class:"fc-icon icon-arrow"},null,-1)])),u(y,{style:{height:"100%"}},{default:D(()=>[u(p,{height:"40px",class:"_fc-r-tabs"},{default:D(()=>[e.activeRule||e.customForm.isShow||e.config&&!1===e.config.showFormConfig?(k(),A("div",{key:0,class:I(["_fc-r-tab",{active:"props"===e.activeTab}]),onClick:t[18]||(t[18]=t=>e.activeTab="props")},L(e.t("designer.component")),3)):N("",!0),e.config&&!1===e.config.showFormConfig?N("",!0):(k(),A("div",{key:1,class:I(["_fc-r-tab",{active:"form"===e.activeTab&&(!!e.activeRule||e.customForm.isShow)}]),onClick:t[19]||(t[19]=t=>e.activeTab="form")},L(e.t("designer.form")),3))]),_:1}),e.config&&!1===e.config.showFormConfig?N("",!0):f((k(),M(m,{key:0,class:"_fc-r-tab-form"},{default:D(()=>[u(T,{rule:e.form.rule,option:e.form.option,modelValue:e.form.value,onChange:e.formOptChange,api:e.form.api,"onUpdate:api":t[20]||(t[20]=t=>e.form.api=t),onMounted:e.formMounted},{title:D(e=>[e.rule.warning?(k(),M(O,{key:0,tooltip:e.rule.warning},{default:D(()=>[j(L(e.rule.title),1)]),_:2},1032,["tooltip"])):(k(),A(P,{key:1},[j(L(e.rule.title),1)],64))]),_:1},8,["rule","option","modelValue","onChange","api","onMounted"])]),_:1},512)),[[F,"form"===e.activeTab]]),f((k(),M(m,{class:"_fc-r-tab-props",key:e.activeRule?e.activeRule._fc_id:e.customForm.config?e.customForm.key:""},{default:D(()=>[C("div",{class:"_fc-r-tools-close",onClick:t[21]||(t[21]=(...t)=>e.clearActiveRule&&e.clearActiveRule(...t))},t[50]||(t[50]=[C("i",{class:"fc-icon icon-add2"},null,-1)])),e.activeRule||e.customForm.config&&(e.customForm.config.name||e.customForm.config.label)?(k(),A(P,{key:0},[C("p",jd,L(e.t("designer.type")),1),u(R,{disabled:!1===e.activePermission.switchType},null,8,["disabled"]),!1!==e.activePermission.name&&e.activeRule&&e.activeRule.name&&!1!==e.config.showComponentName?(k(),A(P,{key:0},[C("p",Bd,[u(O,{tooltip:e.t("warning.name")},{default:D(()=>[j(L(e.t("designer.name")),1)]),_:1},8,["tooltip"])]),u($,{size:"small",class:"_fc-r-name-input",modelValue:e.activeRule.name,"onUpdate:modelValue":t[24]||(t[24]=t=>e.activeRule.name=t),modelModifiers:{trim:!0},readonly:!1!==e.getConfig("nameReadonly")},{suffix:D(()=>[C("i",{class:"fc-icon icon-group",onClick:t[22]||(t[22]=(...t)=>e.copyName&&e.copyName(...t))})]),append:D(()=>[C("i",{class:"fc-icon icon-auto",onClick:t[23]||(t[23]=(...t)=>e.updateName&&e.updateName(...t))})]),_:1},8,["modelValue","readonly"])],64)):N("",!0)],64)):N("",!0),C("div",{class:"_fc-r-config",style:H({"grid-template-areas":e.configFormOrderStyle})},[C("div",zd,[e.baseForm.isShow?(k(),M(Q,{key:0},{default:D(()=>[j(L(e.t("designer.rule")),1)]),_:1})):N("",!0),f(u(T,{api:e.baseForm.api,"onUpdate:api":t[25]||(t[25]=t=>e.baseForm.api=t),rule:e.baseForm.rule,option:e.baseForm.options,modelValue:e.baseForm.value,onChange:e.baseChange},{title:D(e=>[e.rule.warning?(k(),M(O,{key:0,tooltip:e.rule.warning},{default:D(()=>[j(L(e.rule.title),1)]),_:2},1032,["tooltip"])):(k(),A(P,{key:1},[j(L(e.rule.title),1)],64))]),_:1},8,["api","rule","option","modelValue","onChange"]),[[F,e.baseForm.isShow]])]),C("div",Hd,[e.propsForm.isShow?(k(),M(Q,{key:0},{default:D(()=>[j(L(e.t("designer.props"))+" ",1),e.activeRule&&e.getConfig("showCustomProps",!0)?(k(),M(Y,{key:0})):N("",!0)]),_:1})):N("",!0),f(u(T,{api:e.propsForm.api,"onUpdate:api":t[26]||(t[26]=t=>e.propsForm.api=t),rule:e.propsForm.rule,option:e.propsForm.options,modelValue:e.propsForm.value,onChange:e.propChange,onRemoveField:e.propRemoveField},{title:D(e=>[e.rule.warning?(k(),M(O,{key:0,tooltip:e.rule.warning},{default:D(()=>[j(L(e.rule.title),1)]),_:2},1032,["tooltip"])):(k(),A(P,{key:1},[j(L(e.rule.title),1)],64))]),_:1},8,["api","rule","option","modelValue","onChange","onRemoveField"]),[[F,e.propsForm.isShow]]),e.customForm.isShow&&e.customForm.propsShow?(k(),M(Q,{key:1},{default:D(()=>[j(L(e.t("designer.props")),1)]),_:1})):N("",!0),e.customForm.isShow&&e.customForm.propsShow?(k(),M(T,{api:e.customForm.api,"onUpdate:api":t[27]||(t[27]=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"])):N("",!0)]),C("div",Ud,[e.styleForm.isShow?(k(),M(Q,{key:0,id:"_fd-config-style"},{default:D(()=>[j(L(e.t("designer.style")),1)]),_:1})):N("",!0),f(u(T,{rule:e.styleForm.rule,option:e.styleForm.options,modelValue:e.styleForm.value,onChange:e.styleChange,api:e.styleForm.api,"onUpdate:api":t[28]||(t[28]=t=>e.styleForm.api=t)},null,8,["rule","option","modelValue","onChange","api"]),[[F,e.styleForm.isShow]])]),C("div",Wd,[e.eventShow?(k(),M(Q,{key:0},{default:D(()=>[j(L(e.t("designer.event")),1)]),_:1})):N("",!0),e.eventShow?(k(),M(q,{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"])):N("",!0)]),e.activeRule?(k(),A("div",Gd,[e.validateForm.isShow?(k(),M(Q,{key:0},{default:D(()=>[j(L(e.t("designer.validate")),1)]),_:1})):N("",!0),e.validateForm.isShow?(k(),M(T,{api:e.validateForm.api,"onUpdate:api":t[29]||(t[29]=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"])):N("",!0)])):N("",!0)],4)]),_:1})),[[F,"props"===e.activeTab]])]),_:1})]),_:1},512)),[[F,!e.hiddenRight]]),e.hiddenLeft?(k(),A("div",{key:3,class:"_fc-l-open",onClick:t[30]||(t[30]=t=>e.hiddenLeft=!1)},t[51]||(t[51]=[C("i",{class:"fc-icon icon-arrow"},null,-1)]))):N("",!0),e.hiddenRight?(k(),A("div",{key:4,class:"_fc-r-open",onClick:t[31]||(t[31]=t=>e.hiddenRight=!1)},t[52]||(t[52]=[C("i",{class:"fc-icon icon-arrow"},null,-1)]))):N("",!0),u(J,{modelValue:e.preview.state,"onUpdate:modelValue":t[35]||(t[35]=t=>e.preview.state=t),width:"80%",class:"_fd-preview-dialog","append-to-body":""},{default:D(()=>{var n;return[u(X,{class:"_fd-preview-tabs",modelValue:e.previewStatus,"onUpdate:modelValue":t[32]||(t[32]=t=>e.previewStatus=t)},{default:D(()=>[u(K,{label:e.t("form.formMode"),name:"form"},null,8,["label"]),u(K,{label:e.t("form.componentMode"),name:"component"},null,8,["label"]),u(K,{label:e.t("form.htmlMode"),name:"html"},null,8,["label"])]),_:1},8,["modelValue"]),["component","html"].indexOf(e.previewStatus)>-1?(k(),A("div",{key:0,class:"_fd-preview-copy",onClick:t[33]||(t[33]=(...t)=>e.copyCode&&e.copyCode(...t))},t[53]||(t[53]=[C("i",{class:"fc-icon icon-copy"},null,-1)]))):N("",!0),"form"===e.previewStatus?(k(),A(P,{key:1},[e.preview.state?(k(),M(E,{key:0,rule:e.preview.rule,option:e.preview.option,api:e.preview.api,"onUpdate:api":t[34]||(t[34]=t=>e.preview.api=t),onSubmit:e.previewSubmit,onReset:e.previewReset,locale:null==(n=e.locale)?void 0:n.name},U({_:2},[V(e.$slots,(t,n)=>({name:n,fn:D(t=>[z(e.$slots,n,W(G(null!=t?t:{})))])}))]),1032,["rule","option","api","onSubmit","onReset","locale"])):N("",!0)],64)):"component"===e.previewStatus?(k(),A("pre",$d,[C("code",{innerHTML:e.preview.component},null,8,Qd)],512)):(k(),A("pre",Yd,[C("code",{innerHTML:e.preview.html},null,8,qd)],512))]}),_:3},8,["modelValue"])]),_:3}))]),_:3})]),_:3},8,["style","onDragenter","onDragleave","onDrop"])}]]),Xd=a({name:"DragTool",emits:["create","copy","addChild","delete","active","fc.el"],props:{dragBtn:Boolean,children:String,mask: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()},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)}}),Jd={key:0,class:"_fd-drag-mask"},Zd={key:0,class:"_fd-drag-btn",style:{cursor:"move"}},ef={key:2,class:"_fd-drag-r"};const tf=ns(Xd,[["render",function(e,t,n,i,o,r){return k(),A("div",{class:I(["_fd-drag-tool",{active:e.fcx.active===e.id}]),onClick:t[5]||(t[5]=B((...t)=>e.active&&e.active(...t),["stop"]))},[e.mask?(k(),A("div",Jd)):N("",!0),e.hiddenBtn||!1===e.permission.move?N("",!0):(k(),A("div",{key:1,class:"_fd-drag-l",onClick:t[0]||(t[0]=B(()=>{},["stop"]))},[!1!==e.dragBtn?f((k(),A("div",Zd,t[6]||(t[6]=[C("i",{class:"fc-icon icon-move"},null,-1)]),512)),[[F,e.fcx.active===e.id]]):N("",!0)])),!1===e.btns||e.hiddenMenu||!1===e.permission.dragMenu?N("",!0):(k(),A("div",ef,[z(e.$slots,"handle",{},()=>[!1!==e.permission.create&&e.isCreate&&(!0===e.btns||e.btns.indexOf("create")>-1)?(k(),A("div",{key:0,class:"_fd-drag-btn",onClick:t[1]||(t[1]=B(t=>e.$emit("create"),["stop"]))},t[7]||(t[7]=[C("i",{class:"fc-icon icon-add"},null,-1)]))):N("",!0),!1!==e.permission.copy&&!e.only&&(!0===e.btns||e.btns.indexOf("copy")>-1)?(k(),A("div",{key:1,class:"_fd-drag-btn",onClick:t[2]||(t[2]=B(t=>e.$emit("copy"),["stop"]))},t[8]||(t[8]=[C("i",{class:"fc-icon icon-copy"},null,-1)]))):N("",!0),!1!==e.permission.addChild&&e.children&&(!0===e.btns||e.btns.indexOf("addChild")>-1)?(k(),A("div",{key:2,class:"_fd-drag-btn",onClick:t[3]||(t[3]=B(t=>e.$emit("addChild"),["stop"]))},t[9]||(t[9]=[C("i",{class:"fc-icon icon-add-child"},null,-1)]))):N("",!0),!1!==e.permission.delete&&(!0===e.btns||e.btns.indexOf("delete")>-1)?(k(),A("div",{key:3,class:"_fd-drag-btn _fd-drag-danger",onClick:t[4]||(t[4]=B(t=>e.$emit("delete"),["stop"]))},t[10]||(t[10]=[C("i",{class:"fc-icon icon-delete"},null,-1)]))):N("",!0)])])),z(e.$slots,"default")],2)}]]);const nf=ns(a({name:"fcRow",mounted(){}}),[["render",function(e,t,n,i,o,r){const a=c("el-col");return k(),M(a,{span:24},{default:D(()=>[C("div",S({class:["_fd-row el-row",{"_fc-child-empty":!e.$slots.default}]},e.$attrs),[z(e.$slots,"default")],16)]),_:3})}]]),of=a({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=l(ts(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)?(ui(this.t("struct.errorMsg")),!1):(this.visible=!1,e!==this.oldVal&&this.$emit("update:modelValue",e),!0)}}}),rf={class:"_fd-html-editor"},af={key:0,ref:"editor"};const lf=ns(of,[["render",function(e,t,n,i,o,r){const a=c("el-button"),l=c("el-dialog");return k(),A("div",rf,[u(a,{onClick:t[0]||(t[0]=t=>e.visible=!0),style:{width:"100%"}},{default:D(()=>[j(L(e.title||e.t("struct.title")),1)]),_:1}),u(l,{class:"_fd-html-editor-con",title:e.title||e.t("struct.title"),modelValue:e.visible,"onUpdate:modelValue":t[2]||(t[2]=t=>e.visible=t),"close-on-click-modal":!1,"append-to-body":""},{footer:D(()=>[C("div",null,[u(a,{onClick:t[1]||(t[1]=t=>e.visible=!1),size:"default"},{default:D(()=>[j(L(e.t("props.cancel")),1)]),_:1}),u(a,{type:"primary",onClick:e.onOk,size:"default"},{default:D(()=>[j(L(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:D(()=>[e.visible?(k(),A("div",af,null,512)):N("",!0)]),_:1},8,["title","modelValue"])])}]]),sf=a({name:"FnInput",components:{FnEditor:cs},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)}}}),uf={class:"_fd-fn-input"};const cf=ns(sf,[["render",function(e,t,n,i,o,r){const a=c("el-button"),l=c("el-badge"),s=c("FnEditor"),d=c("el-dialog");return k(),A("div",uf,[u(l,{type:"warning","is-dot":"",hidden:!e.configured},{default:D(()=>[u(a,{onClick:t[0]||(t[0]=t=>e.visible=!0),size:"small"},{default:D(()=>[z(e.$slots,"default",{},()=>[j(L(e.t("event.title")),1)])]),_:3})]),_:3},8,["hidden"]),u(d,{class:"_fd-fn-input-dialog _fd-config-dialog",title:e.title||e.t("struct.title"),modelValue:e.visible,"onUpdate:modelValue":t[3]||(t[3]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"800px"},{footer:D(()=>[C("div",null,[u(a,{onClick:t[2]||(t[2]=t=>e.visible=!1),size:"default"},{default:D(()=>[j(L(e.t("props.cancel")),1)]),_:1}),u(a,{type:"primary",onClick:e.onOk,size:"default"},{default:D(()=>[j(L(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:D(()=>[u(s,{ref:"editor",modelValue:e.value,"onUpdate:modelValue":t[1]||(t[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"])])}]]),df=a({name:"FetchConfig",emits:["update:modelValue"],props:{modelValue:[Object,String],to:String},components:{Warning:xd,DragForm:$l.$form(),FnEditor:cs,StructEditor:md},inject:["designer"],data(){return{visible:!1,value:ei(this.modelValue||{}),form:{api:{},formData:{},rule:[],options:{form:{labelWidth:"90px",size:"default"},submitBtn:!1,resetBtn:!1}}}},computed:{t(){return this.designer.setupState.t},configured(){return!Kn.empty(this.modelValue)}},watch:{visible(e){e&&(this.value=ei(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=$l.parseFn(this.form.parse),e.beforeFetch=$l.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=>{ui(e[Object.keys(e)[0]][0].message)})}},created(){this.active()}}),ff={class:"_fd-gfc"};const pf=ns(df,[["render",function(e,t,n,i,o,r){const a=c("el-button"),l=c("el-badge"),s=c("Warning"),d=c("DragForm"),f=c("el-tab-pane"),p=c("FnEditor"),h=c("el-tabs"),m=c("el-container"),g=c("el-dialog");return k(),A("div",ff,[u(l,{type:"warning","is-dot":"",hidden:!e.configured},{default:D(()=>[u(a,{onClick:t[0]||(t[0]=t=>e.visible=!0),size:"small"},{default:D(()=>[j(L(e.t("struct.title")),1)]),_:1})]),_:1},8,["hidden"]),u(g,{class:"_fd-gfc-dialog",modelValue:e.visible,"onUpdate:modelValue":t[7]||(t[7]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"1080px"},{header:D(()=>[j(L(e.t("fetch.optionsType.fetch"))+" ",1),u(s,{tooltip:e.t("warning.fetch")},null,8,["tooltip"])]),footer:D(()=>[C("div",null,[u(a,{size:"default",onClick:t[6]||(t[6]=t=>e.visible=!1)},{default:D(()=>[j(L(e.t("props.cancel")),1)]),_:1}),u(a,{type:"primary",size:"default",onClick:e.save,color:"#2f73ff"},{default:D(()=>[j(L(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:D(()=>[u(m,{class:"_fd-gfc-con",style:{height:"450px"}},{default:D(()=>[u(h,{"model-value":"first",class:"_fc-tabs",style:{width:"100%"}},{default:D(()=>[u(f,{label:e.t("fetch.config"),name:"first"},{default:D(()=>[u(d,{api:e.form.api,"onUpdate:api":t[1]||(t[1]=t=>e.form.api=t),modelValue:e.form.formData,"onUpdate:modelValue":t[2]||(t[2]=t=>e.form.formData=t),rule:e.form.rule,option:e.form.options},{title:D(e=>[e.rule.warning?(k(),M(s,{key:0,tooltip:e.rule.warning},{default:D(()=>[j(L(e.rule.title),1)]),_:2},1032,["tooltip"])):(k(),A(P,{key:1},[j(L(e.rule.title),1)],64))]),_:1},8,["api","modelValue","rule","option"])]),_:1},8,["label"]),u(f,{lazy:"",label:e.t("fetch.beforeFetch"),name:"second"},{label:D(()=>[j(L(e.t("fetch.beforeFetch"))+" ",1),u(s,{tooltip:e.t("warning.beforeFetch")},null,8,["tooltip"])]),default:D(()=>[u(p,{style:{height:"415px"},modelValue:e.form.beforeFetch,"onUpdate:modelValue":t[3]||(t[3]=t=>e.form.beforeFetch=t),name:"beforeFetch",args:["config","data"],ref:"beforeFetch"},null,8,["modelValue"])]),_:1},8,["label"]),u(f,{lazy:"",name:"third"},{label:D(()=>[j(L(e.t("fetch.parse"))+" ",1),u(s,{tooltip:e.t("warning.fetchParse")},null,8,["tooltip"])]),default:D(()=>[u(p,{style:{height:"415px"},modelValue:e.form.parse,"onUpdate:modelValue":t[4]||(t[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}),u(f,{lazy:"",label:e.t("fetch.onError"),name:"fourth"},{default:D(()=>[u(p,{style:{height:"415px"},modelValue:e.form.onError,"onUpdate:modelValue":t[5]||(t[5]=t=>e.form.onError=t),name:"onError",args:["e"],ref:"error"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}]]),hf=a({name:"ConfigItem",components:{Warning:xd},props:{label:String,info:String,warning:String,appendBackground:String,arrow:{type:Boolean,default:!0},showAppend:Boolean},data:()=>({visit:!1})}),mf={class:"_fd-config-item"},gf={class:"_fd-ci-head"},vf={key:0,class:"_fd-ci-con"},_f={key:1,class:"_fd-ci-info"};const bf=ns(hf,[["render",function(e,t,n,i,o,r){const a=c("Warning");return k(),A("div",mf,[C("div",gf,[C("div",{class:I(["_fd-ci-label",e.$slots.append&&!1!==e.arrow?"is-arrow":""]),onClick:t[0]||(t[0]=t=>e.visit=e.$slots.append&&!1!==e.arrow&&!e.visit)},[e.warning?(k(),M(a,{key:0,tooltip:e.warning},{default:D(()=>[z(e.$slots,"label",{},()=>[C("span",null,L(e.label),1)])]),_:3},8,["tooltip"])):z(e.$slots,"label",{key:1},()=>[C("span",null,L(e.label),1)]),e.$slots.append&&!1!==e.arrow?(k(),A("i",{key:2,class:I(["fc-icon icon-down",e.showAppend||e.visit?"down":""])},null,2)):N("",!0)],2),e.$slots.default||e.info?(k(),A("div",vf,[e.$slots.default?z(e.$slots,"default",{key:0}):(k(),A("span",_f,L(e.info),1))])):N("",!0)]),e.showAppend||e.visit?(k(),A("div",{key:0,class:"_fd-ci-append",style:H("background:"+e.appendBackground)},[z(e.$slots,"append")],4)):N("",!0)])}]]),yf=a({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(){Mi(this.modelValue)},getSubChildren(){let e=this.designer.setupState.getSubFormChildren(this.activeRule)||[];return e=Kn.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 ui(this.t("computed.fieldEmpty")),e;if(!/^[a-zA-Z]/.test(t))return ui(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 ui(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=ji(),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)))}}}),xf={class:"_fd-field-input"};const wf=ns(yf,[["render",function(e,t,n,i,o,r){const a=c("el-input");return k(),A("div",xf,[C("i",{class:"fc-icon icon-group",onClick:t[0]||(t[0]=B((...t)=>e.copy&&e.copy(...t),["stop"]))}),u(a,{modelValue:e.value,"onUpdate:modelValue":t[2]||(t[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:D(()=>[C("i",{class:"fc-icon icon-auto",onClick:t[1]||(t[1]=(...t)=>e.makeField&&e.makeField(...t))})]),key:"0"}]),1032,["modelValue","readonly","disabled","onFocus","onBlur"])])}]]),Af=a({name:"FnConfig",emits:["update:modelValue"],props:{modelValue:[Object,void 0,null],eventConfig:{type:Array,default:()=>[]}},inject:["designer"],components:{FnEditor:cs},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(Zn({},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=ji(),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())}}}),kf={class:"_fd-fn-list"},Cf=["onClick"],Sf={key:0,class:"_fd-label"},Ef={key:1,class:"_fd-dot"};const Tf=ns(Af,[["render",function(e,t,n,i,o,r){const a=c("el-button"),l=c("el-badge"),s=c("el-text"),d=c("el-header"),f=c("el-menu-item"),p=c("el-menu"),h=c("el-main"),m=c("el-container"),g=c("el-aside"),v=c("FnEditor"),_=c("el-dialog");return k(),A("div",kf,[u(l,{value:e.eventNum,type:"warning",hidden:e.eventNum<1},{default:D(()=>[u(a,{onClick:t[0]||(t[0]=t=>e.visible=!0),size:"small"},{default:D(()=>[j(L(e.t("event.title")),1)]),_:1})]),_:1},8,["value","hidden"]),u(_,{class:"_fd-fn-list-dialog",title:e.t("event.title"),modelValue:e.visible,"onUpdate:modelValue":t[4]||(t[4]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"1080px"},{footer:D(()=>[C("div",null,[u(a,{size:"default",onClick:t[3]||(t[3]=t=>e.visible=!1)},{default:D(()=>[j(L(e.t("props.cancel")),1)]),_:1}),u(a,{type:"primary",size:"default",onClick:e.submit,color:"#2f73ff"},{default:D(()=>[j(L(e.t("props.ok")),1)]),_:1},8,["onClick"])])]),default:D(()=>[u(m,{class:"_fd-fn-list-con",style:{height:"600px"}},{default:D(()=>[u(g,{style:{width:"300px"}},{default:D(()=>[u(m,{class:"_fd-fn-list-l"},{default:D(()=>[u(d,{class:"_fd-fn-list-head",height:"40px"},{default:D(()=>[u(s,{type:"primary",size:"default"},{default:D(()=>[j(L(e.t("event.list")),1)]),_:1})]),_:1}),u(h,null,{default:D(()=>[u(p,{"default-active":e.defActive,modelValue:e.activeData,"onUpdate:modelValue":t[1]||(t[1]=t=>e.activeData=t)},{default:D(()=>[(k(!0),A(P,null,V(e.event,(n,i)=>(k(),M(f,{index:i},{default:D(()=>[C("div",{class:"_fd-fn-list-method",onClick:B(t=>e.edit(n),["stop"])},[C("span",null,[t[5]||(t[5]=j("function")),C("span",null,L(i),1)]),e.eventInfo[i]?(k(),A("span",Sf,L(e.eventInfo[i]),1)):N("",!0),n.fn?(k(),A("span",Ef)):N("",!0)],8,Cf)]),_:2},1032,["index"]))),256))]),_:1},8,["default-active","modelValue"])]),_:1})]),_:1})]),_:1}),u(h,null,{default:D(()=>[u(m,{class:"_fd-fn-list-r"},{default:D(()=>[e.activeData?(k(),M(d,{key:0,class:"_fd-fn-list-head",height:"40px"},{default:D(()=>[u(a,{size:"small",onClick:e.close},{default:D(()=>[j(L(e.t("props.cancel")),1)]),_:1},8,["onClick"]),u(a,{size:"small",type:"primary",onClick:e.save,color:"#2f73ff"},{default:D(()=>[j(L(e.t("props.save")),1)]),_:1},8,["onClick"])]),_:1})):N("",!0),e.activeData?(k(),M(h,{key:1},{default:D(()=>[u(v,{ref:"fn",modelValue:e.eventStr,"onUpdate:modelValue":t[2]||(t[2]=t=>e.eventStr=t),name:e.activeData.item.name,args:e.activeData.item.args},null,8,["modelValue","name","args"])]),_:1})):N("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["title","modelValue"])])}]]),Of=a({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)}),h(Ul,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 h("div",{class:"_fc-"+e.$props.tag+"-item _fd-drag-item",key:r},n)}return h("div",{class:"_fc-"+e.$props.tag+"-item _fd-drag-item",key:n},null)}})}}),Rf=a({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:tf,DragBox:Of},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),u=Math.min(o,a),c=Math.max(o,a),d=[];for(let f=l;f<=s;f++)for(let e=u;e<=c;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]=ji()),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]}}})},command(e){this[e[0]](...e[1])},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()},rmRow(e){this.clearSelection(),this.rule.row--;const t={},n=[];for(let r=e.pid;r<this.rule.row+1;r++)for(let i=0;i<this.rule.col;i++)r===e.pid?n.push("".concat(e.pid,":").concat(i)):t["".concat(r,":").concat(i)]="".concat(r-1,":").concat(i);let i=0;const o=this.rule.layout;[...o].forEach((t,n)=>{t.top===e.pid&&(o.splice(n-i,1),i++)}),o.forEach(t=>{t.top>e.pid&&t.top--}),this.rmSlot(t,n)},rmCol(e){this.clearSelection(),this.rule.col--;const t={},n=[];for(let r=0;r<this.rule.row;r++){for(let n=e.idx+1;n<this.rule.col+1;n++)t["".concat(r,":").concat(n)]="".concat(r,":").concat(n-1);n.push("".concat(r,":").concat(e.idx))}let i=0;const o=this.rule.layout;[...o].forEach((t,n)=>{t.left===e.idx&&(o.splice(n-i,1),i++)}),o.forEach(t=>{t.left>e.idx&&t.left--}),this.rmSlot(t,n)},splitRow(e){this.clearSelection();const t=e.data.layout,n=t.row;if(t.row=0,n>1)for(let i=1;i<n;i++)this.rule.layout.push({...t,top:t.top+i});this.loadRule()},splitCol(e){this.clearSelection();const t=e.data.layout,n=t.col;if(t.col=0,n>1)for(let i=1;i<n;i++)this.rule.layout.push({...t,left:t.left+i});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()},mergeRight(e){let t;if(this.clearSelection(),e.data.layout){const n=(e.data.layout.col||1)+1;e.data.layout.col=n+e.idx>this.rule.col?this.rule.col-e.idx:n,t=e.data.layout}else t={top:e.pid,left:e.idx,col:2},this.rule.layout.push(t);const n=this.makeMap(t);this.formCreateInject.children.forEach(t=>{!t.slot||n.indexOf(t.slot)>-1&&(t.slot="".concat(e.pid,":").concat(e.idx))}),this.loadRule()},mergeBottom(e){let t;if(this.clearSelection(),e.data.layout){const n=(e.data.layout.row||1)+1;e.data.layout.row=n+n.pid>this.rule.col?this.rule.col-e.pid:n,t=e.data.layout}else t={top:e.pid,left:e.idx,row:2},this.rule.layout.push(t);const n=this.makeMap(t);this.formCreateInject.children.forEach(t=>{!t.slot||n.indexOf(t.slot)>-1&&(t.slot="".concat(e.pid,":").concat(e.idx))}),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)}}),Mf=["onContextmenu","onMousedown","onMousemove","onDblclick"],Df=["onMousedown"],Nf=["onMousedown"],If=["onClick"],Ff=["onClick"];const Lf=ns(Rf,[["render",function(e,t,n,i,o,r){const a=c("DragBox"),l=c("el-dropdown-item"),s=c("el-dropdown-menu"),d=c("el-dropdown"),f=c("DragTool");return k(),A("div",{class:I(["_fd-table-view",{"is-mini":e.mini}])},[C("table",{border:"1",cellspacing:"0",cellpadding:"0",style:H(e.tableColor),onMouseleave:t[3]||(t[3]=(...t)=>e.mouseup&&e.mouseup(...t)),onMouseup:t[4]||(t[4]=(...t)=>e.mouseup&&e.mouseup(...t))},[(k(!0),A(P,null,V(e.rule.row,(n,i)=>(k(),A("tr",{key:i},[(k(!0),A(P,null,V(e.rule.col,(n,o)=>(k(),A(P,null,[e.lattice[i][o].show?(k(),A("td",S({key:"".concat(i).concat(o),ref_for:!0,ref:"td_".concat(i,":").concat(o),class:"_fd-table-view-cell"},{ref_for:!0},e.lattice[i][o]?{colspan:e.lattice[i][o].colspan,rowspan:e.lattice[i][o].rowspan}:{},{style:[e.tableColor,e.style&&e.style["".concat(i,":").concat(o)]||{}],class:[e.rule.class&&e.rule.class["".concat(i,":").concat(o)]||"",{selected:e.selection.indexOf("".concat(i,":").concat(o))>-1}],onContextmenu:t=>e.contextmenu(t,{pid:i,idx:o}),onMousedown:t=>e.mousedown(t,{pid:i,idx:o}),onMousemove:t=>e.mousemove(t,{pid:i,idx:o}),onDblclick:t=>e.dblclick(t,{pid:i,idx:o})}),[i!==e.rule.row-1?(k(),A("div",{key:0,class:"_fd-table-row-handle",onMousedown:t=>e.rowResize(t,{pid:i,idx:o})},null,40,Df)):N("",!0),o!==e.rule.col-1?(k(),A("div",{key:1,class:"_fd-table-col-handle",onMousedown:t=>e.colResize(t,{pid:i,idx:o})},null,40,Nf)):N("",!0),u(f,{"drag-btn":!1,"handle-btn":!0,onActive:t=>e.active({pid:i,idx:o}),unique:e.lattice[i][o].id},{handle:D(()=>[C("div",{class:"_fd-drag-btn _fd-table-view-btn",onClick:B(t=>e.addRow({pid:i,idx:o,data:e.lattice[i][o]},0),["stop"])},t[15]||(t[15]=[C("i",{class:"fc-icon icon-add-col"},null,-1)]),8,If),C("div",{class:"_fd-drag-btn _fd-table-view-btn",onClick:B(t=>e.addCol({pid:i,idx:o,data:e.lattice[i][o]},0),["stop"])},t[16]||(t[16]=[C("i",{class:"fc-icon icon-add-col",style:{transform:"rotate(90deg)"}},null,-1)]),8,Ff),C("div",{class:"_fd-drag-btn _fd-table-view-btn",onClick:t[2]||(t[2]=B(()=>{},["stop"]))},[u(d,{trigger:"click",onCommand:e.command},{dropdown:D(()=>[u(s,null,{default:D(()=>[u(l,{command:["addCol",[{pid:i,idx:o,data:e.lattice[i][o]},1]]},{default:D(()=>[j(L(e.t("tableOptions.addLeft")),1)]),_:2},1032,["command"]),u(l,{command:["addCol",[{pid:i,idx:o,data:e.lattice[i][o]},0]]},{default:D(()=>[j(L(e.t("tableOptions.addRight")),1)]),_:2},1032,["command"]),u(l,{command:["addRow",[{pid:i,idx:o,data:e.lattice[i][o]},1]]},{default:D(()=>[j(L(e.t("tableOptions.addTop")),1)]),_:2},1032,["command"]),u(l,{command:["addRow",[{pid:i,idx:o,data:e.lattice[i][o]},0]]},{default:D(()=>[j(L(e.t("tableOptions.addBottom")),1)]),_:2},1032,["command"]),u(l,{divided:"",disabled:e.lattice[i][o].right,command:["mergeRight",[{pid:i,idx:o,data:e.lattice[i][o]}]]},{default:D(()=>[j(L(e.t("tableOptions.mergeRight")),1)]),_:2},1032,["disabled","command"]),u(l,{disabled:e.lattice[i][o].bottom,command:["mergeBottom",[{pid:i,idx:o,data:e.lattice[i][o]}]]},{default:D(()=>[j(L(e.t("tableOptions.mergeBottom")),1)]),_:2},1032,["disabled","command"]),u(l,{divided:"",disabled:!(e.lattice[i][o].layout&&e.lattice[i][o].layout.col>1),command:["splitCol",[{pid:i,idx:o,data:e.lattice[i][o]}]]},{default:D(()=>[j(L(e.t("tableOptions.splitCol")),1)]),_:2},1032,["disabled","command"]),u(l,{disabled:!(e.lattice[i][o].layout&&e.lattice[i][o].layout.row>1),command:["splitRow",[{pid:i,idx:o,data:e.lattice[i][o]}]]},{default:D(()=>[j(L(e.t("tableOptions.splitRow")),1)]),_:2},1032,["disabled","command"]),u(l,{divided:"",disabled:e.rule.col<2,command:["rmCol",[{pid:i,idx:o,data:e.lattice[i][o]}]]},{default:D(()=>[j(L(e.t("tableOptions.rmCol")),1)]),_:2},1032,["disabled","command"]),u(l,{disabled:e.rule.row<2,command:["rmRow",[{pid:i,idx:o,data:e.lattice[i][o]}]]},{default:D(()=>[j(L(e.t("tableOptions.rmRow")),1)]),_:2},1032,["disabled","command"])]),_:2},1024)]),default:D(()=>[t[17]||(t[17]=C("i",{class:"fc-icon icon-setting"},null,-1))]),_:2,__:[17]},1032,["onCommand"])])]),default:D(()=>[u(a,S({ref_for:!0},e.dragProp,{onAdd:t=>e.dragAdd(t,{pid:i,idx:o}),ref_for:!0,ref:"drag"+i+o,onEnd:t=>e.dragEnd(t,{pid:i,idx:o}),onStart:t[0]||(t[0]=t=>e.dragStart(t)),onUnchoose:t[1]||(t[1]=t=>e.dragUnchoose(t)),list:e.getSlotChildren(["".concat(i,":").concat(o),...e.lattice[i][o].slot])}),{default:D(()=>[z(e.$slots,"".concat(i,":").concat(o))]),_:2},1040,["onAdd","onEnd","list"])]),_:2},1032,["onActive","unique"])],16,Mf)):N("",!0)],64))),256))]))),128))],36),e.visible?(k(),A("div",{key:0,class:"_fd-table-context-menu",style:H(e.menuPos)},[C("div",{class:"_fd-table-context-menuitem",onClick:t[5]||(t[5]=B((...t)=>e.selectionStyle&&e.selectionStyle(...t),["stop"]))},L(e.t("props.style")),1),C("div",{class:"_fd-table-context-menuitem",onClick:t[6]||(t[6]=B((...t)=>e.rmSelectionContent&&e.rmSelectionContent(...t),["stop"]))},L(e.t("props.clear")),1),t[18]||(t[18]=C("div",{class:"_fd-table-context-menu-separator"},null,-1)),C("div",{class:"_fd-table-context-menuitem",onClick:t[7]||(t[7]=B(t=>e.mergeSelection(!1),["stop"]))},L(e.t("tableOptions.batchMerge")),1),C("div",{class:"_fd-table-context-menuitem",onClick:t[8]||(t[8]=B(t=>e.mergeSelection(!0),["stop"]))},L(e.t("tableOptions.batchSplit")),1),C("div",{class:"_fd-table-context-menuitem",onClick:t[9]||(t[9]=B(t=>e.addCol({pid:e.selectionPos.startRow,idx:e.selectionPos.startCol},1),["stop"]))},L(e.t("tableOptions.addLeft")),1),C("div",{class:"_fd-table-context-menuitem",onClick:t[10]||(t[10]=B(t=>e.addCol({pid:e.selectionPos.startRow,idx:e.selectionPos.endCol},0),["stop"]))},L(e.t("tableOptions.addRight")),1),C("div",{class:"_fd-table-context-menuitem",onClick:t[11]||(t[11]=B(t=>e.addRow({pid:e.selectionPos.startRow,idx:e.selectionPos.startCol},1),["stop"]))},L(e.t("tableOptions.addTop")),1),C("div",{class:"_fd-table-context-menuitem",onClick:t[12]||(t[12]=B(t=>e.addRow({pid:e.selectionPos.startRow,idx:e.selectionPos.endCol},0),["stop"]))},L(e.t("tableOptions.addBottom")),1),t[19]||(t[19]=C("div",{class:"_fd-table-context-menu-separator"},null,-1)),C("div",{class:"_fd-table-context-menuitem",onClick:t[13]||(t[13]=B((...t)=>e.rmSelectionRow&&e.rmSelectionRow(...t),["stop"]))},L(e.t("tableOptions.batchRmRow")),1),C("div",{class:"_fd-table-context-menuitem",onClick:t[14]||(t[14]=B((...t)=>e.rmSelectionCol&&e.rmSelectionCol(...t),["stop"]))},L(e.t("tableOptions.batchRmCol")),1)],4)):N("",!0)],2)}]]),Pf={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 Vf=ns(Pf,[["render",function(e,t,n,i,o,r){const a=c("el-col");return k(),M(a,{span:24},{default:D(()=>[C("div",{class:I(["_fc-table",{"is-mini":n.mini}])},[C("table",{border:"1",cellspacing:"0",cellpadding:"0",style:H(r.tableColor)},[(k(!0),A(P,null,V(n.rule.row,(t,i)=>(k(),A("tr",{key:i},[(k(!0),A(P,null,V(n.rule.col,(t,n)=>(k(),A(P,{key:"".concat(i).concat(n)},[o.lattice[i][n].show?(k(),A("td",S({key:0,ref_for:!0},o.lattice[i][n]?{colspan:o.lattice[i][n].colspan,rowspan:o.lattice[i][n].rowspan}:{},{valign:"top",class:o.tdClass&&o.tdClass["".concat(i,":").concat(n)]||"",style:[r.tableColor,o.tdStyle&&o.tdStyle["".concat(i,":").concat(n)]||{}]}),[z(e.$slots,"".concat(i,":").concat(n)),(k(!0),A(P,null,V(o.lattice[i][n].slot,t=>z(e.$slots,"".concat(t))),256))],16)):N("",!0)],64))),128))]))),128))],4)],2)]),_:3})}]]),jf=a({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(){}}),Bf={class:"_fd-language-list"},zf={class:"_fd-language-header"},Hf={class:"_fd-language-title"},Uf={class:"_fd-language-name"},Wf=["onClick"];const Gf=ns(jf,[["render",function(e,t,n,i,o,r){const a=c("el-popover"),l=c("el-input");return k(),M(l,{class:I(["_fd-language-input",{"is-variable":e.isVar}]),placeholder:e.placeholder,disabled:e.disabled,modelValue:e.modelValue,"onUpdate:modelValue":e.onInput,onBlur:t[1]||(t[1]=t=>e.$emit("blur")),size:e.size||"small"},U({_:2},[!1!==e.showLanguage?{name:"append",fn:D(()=>[u(a,{placement:"bottom-end",width:300,"hide-after":0,trigger:"click",ref:"pop","popper-class":"_fd-language-popover"},{reference:D(()=>t[2]||(t[2]=[C("i",{class:"fc-icon icon-language"},null,-1)])),default:D(()=>[C("div",Bf,[C("div",zf,[C("div",Hf,[j(L(e.t("language.select")),1),C("i",{class:"fc-icon icon-setting",onClick:t[0]||(t[0]=(...t)=>e.openConfig&&e.openConfig(...t))})]),C("div",Uf,[(k(!0),A(P,null,V(e.localeList,e=>(k(),A("div",{key:e.value},L(e.label),1))),128))])]),(k(!0),A(P,null,V(e.language,t=>(k(),A("div",{key:t.key,class:"_fd-language-item",onClick:n=>e.clickLang(t.key)},[(k(!0),A(P,null,V(e.localeList,e=>(k(),A("div",{key:e.value},L(t[e.value]||"-"),1))),128))],8,Wf))),128))])]),_:1},512)]),key:"0"}:void 0]),1032,["class","placeholder","disabled","modelValue","onUpdate:modelValue","size"])}]]),$f=a({name:"Validate",inject:["designer"],emits:["update:modelValue"],props:{modelValue:Array},components:{LanguageInput:Gf,FnInput:cf},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")}:{min:this.t("validate.modes.min"),max:this.t("validate.modes.max"),len:this.t("validate.modes.len"),pattern:this.t("validate.modes.pattern"),validator:this.t("validate.modes.validator")}},triggers(){return ki(this.t,[{label:"blur",value:"blur"},{label:"change",value:"change"},{label:"submit",value:"submit"}])}},methods:{handleCommand(e){this.validate.push({transform:new Function("val","this.type = val == null ? 'string' : (Array.isArray(val) ? 'array' : (typeof val)); return val;"),mode:e,trigger:"blur"})},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"].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=>ei(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)))}}),Qf={class:"_fd-validate"},Yf={class:"_fd-validate-item"},qf={class:"_fd-validate-title"},Kf=["onClick"];const Xf=ns($f,[["render",function(e,t,n,i,o,r){const a=c("el-option"),l=c("el-select"),s=c("el-form-item"),d=c("el-col"),f=c("elInput"),p=c("FnInput"),h=c("el-input-number"),m=c("LanguageInput"),g=c("el-row"),v=c("el-button"),_=c("el-dropdown-item"),b=c("el-dropdown-menu"),y=c("el-dropdown");return k(),A("div",Qf,[(k(!0),A(P,null,V(e.validate,(t,n)=>(k(),A("div",Yf,[C("div",qf,[C("div",null,[C("span",null,L(n+1),1),j(" "+L(e.modes[t.mode]),1)]),C("i",{class:"fc-icon icon-delete2",onClick:t=>e.remove(n)},null,8,Kf)]),u(g,null,{default:D(()=>[u(d,{span:e.getSpan(t)},{default:D(()=>[u(s,{label:e.t("validate.mode")},{default:D(()=>[u(l,{modelValue:t.trigger,"onUpdate:modelValue":e=>t.trigger=e,onChange:e.onInput},{default:D(()=>[(k(!0),A(P,null,V(e.triggers,e=>(k(),M(a,{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"]),u(d,{span:e.getSpan(t)},{default:D(()=>[u(s,{label:e.modes[t.mode]},{default:D(()=>["pattern"===t.mode?(k(),M(f,{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?(k(),M(p,{key:1,modelValue:t[t.mode],"onUpdate:modelValue":e=>t[t.mode]=e,name:"name",args:["rule","value","callback"],onChange:e.onInput},{default:D(()=>[j(L(e.t("validate.modes.validator")),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(k(),M(h,{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"]),u(d,{span:24},{default:D(()=>[u(s,{label:e.t("validate.message")},{default:D(()=>[u(m,{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)),u(y,{trigger:"click",size:"default","popper-class":"_fd-validate-pop",onCommand:e.handleCommand},{dropdown:D(()=>[u(b,null,{default:D(()=>[(k(!0),A(P,null,V(e.modes,(e,t)=>(k(),M(_,{command:t,key:t},{default:D(()=>[C("div",null,L(e),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:D(()=>[u(v,{class:"_fd-validate-btn",size:"small"},{default:D(()=>[j(L(e.t("validate.rule"))+" +",1)]),_:1})]),_:1},8,["onCommand"])])}]]),Jf=a({name:"Required",components:{LanguageInput:Gf},emits:["update:modelValue"],props:{modelValue:{}},inject:["designer"],watch:{required(){this.update()},requiredMsg(){this.update()},modelValue(e){const t=Kn.String(e);this.required=void 0!==e&&(!!t||!!e),this.requiredMsg=t?e:""}},computed:{t(){return this.designer.setupState.t}},data(){const e=Kn.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)}}}),Zf={class:"_fd-required"};const ep=ns(Jf,[["render",function(e,t,n,i,o,r){const a=c("el-switch"),l=c("LanguageInput");return k(),A("div",Zf,[u(a,{modelValue:e.required,"onUpdate:modelValue":t[0]||(t[0]=t=>e.required=t)},null,8,["modelValue"]),e.required?(k(),M(l,{key:0,modelValue:e.requiredMsg,"onUpdate:modelValue":t[1]||(t[1]=t=>e.requiredMsg=t),placeholder:e.t("validate.requiredPlaceholder")},null,8,["modelValue","placeholder"])):N("",!0)])}]]);const tp=ns(a({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,t,n,i,o,r){const a=c("el-option"),l=c("el-select"),s=c("el-input");return k(),M(s,S({class:"_fd-value-input",disabled:e.disabled,modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=t=>e.value=t),onBlur:e.onBlur},e.$attrs),U({prepend:D(()=>[u(l,{modelValue:e.type,"onUpdate:modelValue":t[0]||(t[0]=t=>e.type=t),style:{width:"60px"},disabled:e.disabled},{default:D(()=>[u(a,{label:e.t("validate.types.string"),value:"1"},null,8,["label"]),u(a,{label:e.t("validate.types.number"),value:"2"},null,8,["label"]),u(a,{label:e.t("validate.types.boolean"),value:"3"},null,8,["label"])]),_:1},8,["modelValue","disabled"])]),_:2},[e.$slots.append?{name:"append",fn:D(()=>[z(e.$slots,"append")]),key:"0"}:void 0]),1040,["disabled","modelValue","onBlur"])}]]),np=a({name:"TableOptions",emits:["update:modelValue","change"],components:{ValueInput:tp},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=>di(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()}}}),ip={class:"_td-table-opt"},op=["onClick"],rp={class:"_td-table-opt-handle"};const ap=ns(np,[["render",function(e,t,n,i,o,r){const a=c("ValueInput"),l=c("el-input"),s=c("el-table-column"),d=c("el-table"),f=c("el-button");return k(),A("div",ip,[u(d,{data:e.value,border:"",size:e.size||"small",style:{width:"100%"}},{default:D(()=>[(k(!0),A(P,null,V(e.column,(t,n)=>(k(),M(s,{key:t.label+n,label:t.label},{default:D(n=>[t.value?(k(),M(a,{key:0,size:e.size||"small",modelValue:n.row[t.key],disabled:e.disabled,"onUpdate:modelValue":e=>n.row[t.key]=e,onBlur:t=>e.onInput(n.row),onChangeType:t=>e.onInput(n.row)},null,8,["size","modelValue","disabled","onUpdate:modelValue","onBlur","onChangeType"])):(k(),M(l,{key:1,size:e.size||"small",disabled:e.disabled,modelValue:n.row[t.key]||"","onUpdate:modelValue":e=>n.row[t.key]=e,onBlur:t=>e.onInput(n.row)},null,8,["size","disabled","modelValue","onUpdate:modelValue","onBlur"]))]),_:2},1032,["label"]))),128)),e.disabled?N("",!0):(k(),M(s,{key:0,width:"45",align:"center",fixed:"right"},{default:D(t=>[C("i",{class:"fc-icon icon-delete",onClick:n=>e.del(t.$index)},null,8,op)]),_:1}))]),_:1},8,["data","size"]),C("div",rp,[!e.max||e.max>e.value.length?(k(),M(f,{key:0,link:"",type:"primary",onClick:e.add},{default:D(()=>[t[0]||(t[0]=C("i",{class:"fc-icon icon-add"},null,-1)),j(" "+L(e.t("tableOptions.add")),1)]),_:1,__:[0]},8,["onClick"])):N("",!0)])])}],["__scopeId","data-v-91131f26"]]),lp=a({name:"TreeOptions",emits:["update:modelValue"],components:{ValueInput:tp},props:{modelValue:Array,columns:Object,disabled:Boolean},inject:["designer"],data(){return{value:[...ei(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 ei(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()}}}),sp={class:"_fd-tree-opt"},up={class:"_fd-tree-opt-node"},cp=["onClick"],dp=["onClick"],fp=["onClick"];const pp=ns(lp,[["render",function(e,t,n,i,o,r){const a=c("el-input"),l=c("ValueInput"),s=c("el-tree");return k(),A("div",sp,[u(s,{data:e.value,"node-key":"index","expand-on-click-node":!1},{default:D(({node:n,data:i})=>[C("div",up,[u(a,{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"]),u(l,{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:D(()=>[C("div",{class:"_fd-tree-opt-btn",onClick:t=>e.add(n,i)},t[0]||(t[0]=[C("i",{class:"fc-icon icon-add"},null,-1)]),8,cp),C("div",{class:"_fd-tree-opt-btn",onClick:t=>e.append(i)},t[1]||(t[1]=[C("i",{class:"fc-icon icon-add-child"},null,-1)]),8,dp),C("div",{class:"_fd-tree-opt-btn _fd-tree-opt-danger",onClick:t=>e.remove(n,i)},t[2]||(t[2]=[C("i",{class:"fc-icon icon-delete"},null,-1)]),8,fp)]),key:"0"}]),1032,["modelValue","onUpdate:modelValue","onBlur","disabled","onChangeType"])])]),_:1},8,["data"])])}]]),hp=a({name:"TableFormView",data:()=>({})}),mp={class:"_fd-table-form"},gp={key:0,class:"_fd-tf-wrap"},vp={key:1,class:"_fc-child-empty"};const _p=ns(hp,[["render",function(e,t,n,i,o,r){return k(),A("div",mp,[e.$slots.default?(k(),A("div",gp,[z(e.$slots,"default")])):(k(),A("div",vp))])}]]),bp={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:()=>n({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:l(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",props:{innerText:"#"}}];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 yp=ns(bp,[["render",function(e,t,n,i,o,r){const a=c("el-button");return k(),A("div",{class:I(["_fc-table-form",{"_fc-disabled":n.disabled}])},[(k(),M(Y(o.Form),{option:n.options,rule:o.rule,extendOption:!0,disabled:n.disabled,onChange:r.formChange,api:o.fapi,"onUpdate:api":t[0]||(t[0]=e=>o.fapi=e),onEmitEvent:e.$emit},null,40,["option","rule","disabled","onChange","api","onEmitEvent"])),n.addable&&(!n.max||n.max>this.trs.length)?(k(),M(a,{key:0,link:"",type:"primary",class:"fc-clock",onClick:t[1]||(t[1]=e=>r.addRaw(!0))},{default:D(()=>[t[2]||(t[2]=C("i",{class:"fc-icon icon-add-circle",style:{"font-weight":"700"}},null,-1)),j(" "+L(n.formCreateInject.t("add")||"添加"),1)]),_:1,__:[2]})):N("",!0)],2)}]]);
  35. /*!
  36. * Signature Pad v5.0.10 | https://github.com/szimek/signature_pad
  37. * (c) 2025 Szymon Nowak | Released under the MIT license
  38. */class xp{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 wp{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 wp(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,u=(t.x+n.x)/2,c=(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=u+(l-u)*p,m=c+(s-c)*p,g=t.x-h,v=t.y-m;return{c1:new xp(l+g,s+v),c2:new xp(u+g,c+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 Ap{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 kp extends Ap{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 u=Date.now(),c=t-(u-r);return i=this,o=s,c<=0||c>t?(a&&(clearTimeout(a),a=null),r=u,n=e.apply(i,o),a||(i=null,o=[])):a||(a=window.setTimeout(l,c)),n}}(kp.prototype._strokeUpdate,this.throttle):kp.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,u=t.yOffset||0;this._reset(this._getPointGroupOptions()),o.onload=()=>{this._ctx.drawImage(o,s,u,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 xp(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=wp.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,u=s*s,c=u*s;let d=c*e.startPoint.x;d+=3*u*n*e.control1.x,d+=3*s*a*e.control2.x,d+=l*e.endPoint.x;let f=c*e.startPoint.y;f+=3*u*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 xp(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 Cp=a({name:"SignaturePad",emits:["update:modelValue","change","remove"],data:()=>({visible:!1,isEmpty:!0,signaturePad:null}),props:{modelValue:String,penColor:String,disabled:Boolean,formCreateInject:Object},watch:{visible(e){e?(this.isEmpty=!0,this.$nextTick(()=>{this.signaturePad=l(new kp(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)},remove(){this.disabled||(this.updateValue(""),this.$emit("remove"))}}}),Sp={key:0,class:"_fc-signature-preview"},Ep=["src"],Tp={class:"_fc-signature-pad",ref:"pad",width:"600px",height:"270px"};const Op=ns(Cp,[["render",function(e,t,n,i,o,r){const a=c("el-button"),l=c("el-dialog");return k(),A("div",{class:I(["_fc-signature",{disabled:e.disabled}])},[e.modelValue?(k(),A("div",Sp,[e.disabled?N("",!0):(k(),A("i",{key:0,class:"fc-icon icon-delete2",onClick:t[0]||(t[0]=(...t)=>e.remove&&e.remove(...t))})),C("img",{src:e.modelValue,alt:"signature"},null,8,Ep)])):(k(),A("div",{key:1,class:"_fc-signature-btn",onClick:t[1]||(t[1]=(...t)=>e.open&&e.open(...t))},[t[4]||(t[4]=C("i",{class:"fc-icon icon-edit2"},null,-1)),j(" "+L(e.formCreateInject.t("signaturePadTip")||"点击添加手写签名"),1)])),u(l,{class:"_fc-signature-dialog",title:e.formCreateInject.t("signaturePadTitle")||"请在虚线框内书写",modelValue:e.visible,"onUpdate:modelValue":t[3]||(t[3]=t=>e.visible=t),"destroy-on-close":"","close-on-click-modal":!1,"append-to-body":"",width:"640px"},{footer:D(()=>[C("div",null,[u(a,{size:"default",onClick:t[2]||(t[2]=t=>e.clear())},{default:D(()=>[j(L(e.formCreateInject.t("reset")||"重置"),1)]),_:1}),u(a,{type:"primary",disabled:e.isEmpty,onClick:e.submit,size:"default"},{default:D(()=>[j(L(e.formCreateInject.t("ok")||"确定"),1)]),_:1},8,["disabled","onClick"])])]),default:D(()=>[C("canvas",Tp,null,512)]),_:1},8,["title","modelValue"])],2)}]]);const Rp=ns(a({name:"FcTitle",data:()=>({}),props:{title:String,size:String,align:String},computed:{textStyle(){return{textAlign:this.align||"left"}}}}),[["render",function(e,t,n,i,o,r){return k(),A("div",{class:I(["_fc-title",e.size||"h2"]),style:H(e.textStyle)},L(e.title),7)}]]),Mp=a({name:"TableFormColumnView",props:{label:String,align:String,width:[Number,String],color:String,required:Boolean},computed:{colStyle(){const e=this.width,t={width:Kn.Number(e)?"".concat(e,"px"):e&&"auto"!==e?e:"180px"};return this.color&&(t.color=this.color),t}},data:()=>({})}),Dp={key:0,class:"_fd-tf-required"},Np={class:"_fd-tf-con"};const Ip=ns(Mp,[["render",function(e,t,n,i,o,r){return k(),A("div",{class:"_fd-tf-col",style:H(e.colStyle)},[C("div",{class:"_fd-tf-title",style:H({textAlign:e.align||"center"})},[e.required?(k(),A("span",Dp,"*")):N("",!0),j(L(e.label||""),1)],4),C("div",Np,[z(e.$slots,"default")])],4)}]]),Fp=a({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=Ri(this.modelValue)?null:parseFloat(this.modelValue||0)):(this.idx=0,this.num=0)},submit(){this.oldValue=Ri(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()}}),Lp={class:"_fd-size-input"};const Pp=ns(Fp,[["render",function(e,t,n,i,o,r){const a=c("el-button"),l=c("el-inputNumber"),s=c("el-dropdown-item"),d=c("el-dropdown-menu"),f=c("el-dropdown");return k(),A("div",Lp,["auto"===e.unit[e.idx]?(k(),M(a,{key:0,size:e.size,style:{width:"150px"},onClick:t[0]||(t[0]=t=>e.changeType())},{default:D(()=>[j(L(e.unit[e.idx]),1)]),_:1},8,["size"])):(k(),A(P,{key:1},[u(l,{size:e.size,modelValue:e.num,"onUpdate:modelValue":t[1]||(t[1]=t=>e.num=t),onChange:e.submit,"controls-position":"right"},null,8,["size","modelValue","onChange"]),u(f,{trigger:"click",size:"small"},{dropdown:D(()=>[u(d,null,{default:D(()=>[(k(!0),A(P,null,V(e.unit,(t,n)=>(k(),M(s,{key:t,onClick:t=>e.changeType(n)},{default:D(()=>[C("div",null,L(t),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:D(()=>[u(a,{size:e.size},{default:D(()=>[j(L(e.unit[e.idx]),1)]),_:1},8,["size"])]),_:1})],64))])}]]),Vp=a({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(){}}),jp={class:"_fd-color-input"};const Bp=ns(Vp,[["render",function(e,t,n,i,o,r){const a=c("el-color-picker"),l=c("el-input");return k(),A("div",jp,[u(l,{clearable:"",modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=t=>e.value=t)},{append:D(()=>[u(a,{"show-alpha":"","color-format":"hex",predefine:e.predefine,modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=t=>e.value=t)},null,8,["predefine","modelValue"])]),_:1},8,["modelValue"])])}]]),zp=a({name:"BoxSizeInput",components:{SizeInput:Pp,ConfigItem:bf},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()}}),Hp={class:"_fd-box-size-input"},Up={key:0,style:{"font-size":"12px","line-height":"16px"}};const Wp=ns(zp,[["render",function(e,t,n,i,o,r){const a=c("SizeInput"),l=c("el-form-item"),s=c("el-radio-button"),d=c("el-tooltip"),f=c("el-radio-group"),p=c("el-form"),h=c("ConfigItem");return k(),A("div",Hp,[u(h,{label:e.t("props.size"),info:Object.keys(e.modelValue).length>0?e.t("struct.configured"):""},{append:D(()=>[u(p,{"label-position":"top",size:"small"},{default:D(()=>[(k(!0),A(P,null,V(e.keys,t=>(k(),M(l,{label:e.t("style."+t),key:t},{default:D(()=>[u(a,{modelValue:e.boxStyle[t],"onUpdate:modelValue":n=>e.boxStyle[t]=n,onChange:e.onInput},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["label"]))),128)),u(l,{label:e.t("style.overflow.name"),style:{"grid-column":"span 2"}},{default:D(()=>[u(f,{modelValue:e.boxStyle.overflow},{default:D(()=>[(k(!0),A(P,null,V(e.overflow,t=>(k(),M(d,{effect:"dark",content:e.t("style.overflow."+t.value),placement:"top",persistent:"","hide-after":0,key:t.value},{default:D(()=>[u(s,{label:t.value,value:t.value,onClick:n=>e.changeOverflow(t.value)},{default:D(()=>[t.text?(k(),A("span",Up,"Auto ")):(k(),A("i",{key:1,class:I(["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"])])}]]),Gp=a({name:"BoxSpaceInput",components:{ConfigItem:bf},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()}}),$p={class:"_fd-box-space-input"},Qp={class:"_padding"},Yp={class:"_padding-title"},qp=["value"],Kp=["value"],Xp=["value"],Jp=["value"],Zp={class:"_fd-help"},eh={class:"_margin"},th={class:"_margin-title"},nh={class:"_fd-help"},ih=["value"],oh=["value"],rh=["value"],ah=["value"];const lh=ns(Gp,[["render",function(e,t,n,i,o,r){return k(),A("div",$p,[C("div",Qp,[C("span",Yp,L(e.t("style.margin")),1),C("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,qp),C("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,Kp),C("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,Xp),C("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,Jp),C("div",Zp,[C("i",{class:I(["fc-icon icon-link2",e.marginLock?"active":""]),title:"lock",onClick:t[8]||(t[8]=t=>e.lock("margin"))},null,2),C("i",{class:"fc-icon icon-delete-circle",title:"clear",onClick:t[9]||(t[9]=t=>e.clear("margin"))})]),C("div",eh,[C("span",th,L(e.t("style.padding")),1),C("div",nh,[C("i",{class:I(["fc-icon icon-link2",e.paddingLock?"active":""]),title:"lock",onClick:t[10]||(t[10]=t=>e.lock("padding"))},null,2),C("i",{class:"fc-icon icon-delete-circle",title:"clear",onClick:t[11]||(t[11]=t=>e.clear("padding"))})]),C("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,ih),C("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,oh),C("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,rh),C("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,ah),t[20]||(t[20]=C("div",{class:"_box"},null,-1))])])])}]]);function sh(e){let t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return 0===t.indexOf("-")&&(t=t.substr(1)),t}const uh=a({name:"BorderInput",components:{ColorInput:Bp,SizeInput:Pp,ConfigItem:bf},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+=sh(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()}}),ch={class:"_fd-border-input"},dh={class:"_fd-bi-left"},fh={class:"_fd-bil-row"},ph={class:"_fd-bil-row"},hh={class:"_fd-bil-row"},mh={class:"_fd-bi-right"},gh={class:"_fd-bi-opt"};const vh=ns(uh,[["render",function(e,t,n,i,o,r){const a=c("el-option"),l=c("el-select"),s=c("SizeInput"),d=c("ColorInput"),f=c("ConfigItem");return k(),M(f,{label:e.t("style.border")},{append:D(()=>[C("div",ch,[C("div",dh,[C("div",fh,[C("div",{class:I(["_fd-bil-col","Top"===e.active?"active":""]),onClick:t[0]||(t[0]=t=>e.active="Top")},"┳ ",2)]),C("div",ph,[C("div",{class:I(["_fd-bil-col","Left"===e.active?"active":""]),onClick:t[1]||(t[1]=t=>e.active="Left")},"┣ ",2),C("div",{class:I(["_fd-bil-col",""===e.active?"active":""]),onClick:t[2]||(t[2]=t=>e.active="")},"╋",2),C("div",{class:I(["_fd-bil-col","Right"===e.active?"active":""]),onClick:t[3]||(t[3]=t=>e.active="Right")}," ┫ ",2)]),C("div",hh,[C("div",{class:I(["_fd-bil-col","Bottom"===e.active?"active":""]),onClick:t[4]||(t[4]=t=>e.active="Bottom")},"┻ ",2)])]),C("div",mh,[u(l,{modelValue:e.curStyle,"onUpdate:modelValue":t[5]||(t[5]=t=>e.curStyle=t),clearable:""},{default:D(()=>[(k(!0),A(P,null,V(e.lineType,e=>(k(),M(a,{key:e.value,label:e.label,value:e.value},{default:D(()=>[C("div",gh,[C("div",{class:I(["_line",e.value])},null,2)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"]),u(s,{modelValue:e.curWidth,"onUpdate:modelValue":t[6]||(t[6]=t=>e.curWidth=t)},null,8,["modelValue"]),u(d,{modelValue:e.curColor,"onUpdate:modelValue":t[7]||(t[7]=t=>e.curColor=t)},null,8,["modelValue"])])])]),default:D(()=>[C("div",{class:"line-box",style:H(e.borderStyleStr)},t[8]||(t[8]=[C("div",{class:"line-box-con"},null,-1)]),4)]),_:1},8,["label"])}]]),_h=a({name:"RadiusInput",components:{ConfigItem:bf,ColorInput:Bp,SizeInput:Pp},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()}}),bh={class:"_fd-radius-input"},yh={class:"_fd-radius-con"},xh={class:"_fd-radius-item"},wh={class:"_fd-radius-item"},Ah={class:"_fd-radius-item"},kh={class:"_fd-radius-item"};const Ch=ns(_h,[["render",function(e,t,n,i,o,r){const a=c("SizeInput"),l=c("ConfigItem");return k(),A("div",bh,[u(l,{label:e.t("style.borderRadius")},{append:D(()=>[C("div",yh,[C("div",xh,[t[5]||(t[5]=C("div",{class:"_fd-radius-icon",style:{transform:"rotate(180deg)"}},[C("i",{class:"fc-icon icon-radius"})],-1)),u(a,{unit:e.unit,modelValue:e.style.left,"onUpdate:modelValue":t[1]||(t[1]=t=>e.style.left=t),onChange:e.onInput},null,8,["unit","modelValue","onChange"])]),C("div",wh,[t[6]||(t[6]=C("div",{class:"_fd-radius-icon",style:{transform:"rotate(-90deg)"}},[C("i",{class:"fc-icon icon-radius"})],-1)),u(a,{unit:e.unit,modelValue:e.style.top,"onUpdate:modelValue":t[2]||(t[2]=t=>e.style.top=t),onChange:e.onInput},null,8,["unit","modelValue","onChange"])]),C("div",Ah,[t[7]||(t[7]=C("div",{class:"_fd-radius-icon",style:{transform:"rotate(90deg)"}},[C("i",{class:"fc-icon icon-radius"})],-1)),u(a,{unit:e.unit,modelValue:e.style.bottom,"onUpdate:modelValue":t[3]||(t[3]=t=>e.style.bottom=t),onChange:e.onInput},null,8,["unit","modelValue","onChange"])]),C("div",kh,[t[8]||(t[8]=C("div",{class:"_fd-radius-icon"},[C("i",{class:"fc-icon icon-radius"})],-1)),u(a,{unit:e.unit,modelValue:e.style.right,"onUpdate:modelValue":t[4]||(t[4]=t=>e.style.right=t),onChange:e.onInput},null,8,["unit","modelValue","onChange"])])])]),default:D(()=>[u(a,{unit:e.unit,modelValue:e.style.com,"onUpdate:modelValue":t[0]||(t[0]=t=>e.style.com=t),onChange:e.batch},null,8,["unit","modelValue","onChange"])]),_:1},8,["label"])])}]]),Sh=a({name:"BorderInput",components:{ColorInput:Bp,SizeInput:Pp,ConfigItem:bf},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+=sh(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()}}),Eh={class:"_fd-font-input"};const Th=ns(Sh,[["render",function(e,t,n,i,o,r){const a=c("el-option"),l=c("el-select"),s=c("el-form-item"),d=c("SizeInput"),f=c("el-form"),p=c("ConfigItem");return k(),M(p,{label:e.t("style.font.name")},{append:D(()=>[C("div",Eh,[u(f,{"label-width":"50px","label-position":"top",inline:"",size:"small"},{default:D(()=>[u(s,{label:e.t("style.font.family")},{default:D(()=>[u(l,{modelValue:e.fontStyle.fontFamily,"onUpdate:modelValue":t[0]||(t[0]=t=>e.fontStyle.fontFamily=t),clearable:"",onChange:e.onInput},{default:D(()=>[(k(!0),A(P,null,V(e.familyType,e=>(k(),M(a,{key:e.value,label:e.label,value:e.value},{default:D(()=>[C("span",{style:H({fontFamily:e.value})},L(e.label),5)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),u(s,{label:e.t("style.font.size")},{default:D(()=>[u(d,{modelValue:e.fontStyle.fontSize,"onUpdate:modelValue":t[1]||(t[1]=t=>e.fontStyle.fontSize=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"]),u(s,{label:e.t("style.weight.name")},{default:D(()=>[u(l,{modelValue:e.fontStyle.fontWeight,"onUpdate:modelValue":t[2]||(t[2]=t=>e.fontStyle.fontWeight=t),clearable:"",onChange:e.onInput},{default:D(()=>[(k(!0),A(P,null,V(e.weightType,e=>(k(),M(a,{key:e.value,label:e.label,value:e.value},{default:D(()=>[C("span",{style:H({fontWeight:e.value})},L(e.label),5)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),u(s,{label:e.t("style.decoration.name")},{default:D(()=>[u(l,{modelValue:e.fontStyle.textDecoration,"onUpdate:modelValue":t[3]||(t[3]=t=>e.fontStyle.textDecoration=t),clearable:"",onChange:e.onInput},{default:D(()=>[(k(!0),A(P,null,V(e.decorationType,e=>(k(),M(a,{key:e.value,label:e.label,value:e.value},{default:D(()=>[C("span",{style:H({textDecoration:e.value})},L(e.label),5)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),u(s,{label:e.t("style.font.align")},{default:D(()=>[u(l,{modelValue:e.fontStyle.textAlign,"onUpdate:modelValue":t[4]||(t[4]=t=>e.fontStyle.textAlign=t),clearable:"",onChange:e.onInput},{default:D(()=>[(k(!0),A(P,null,V(e.alignType,e=>(k(),M(a,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),u(s,{label:e.t("style.font.height")},{default:D(()=>[u(d,{modelValue:e.fontStyle.lineHeight,"onUpdate:modelValue":t[5]||(t[5]=t=>e.fontStyle.lineHeight=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"]),u(s,{label:e.t("style.font.spacing")},{default:D(()=>[u(d,{modelValue:e.fontStyle.letterSpacing,"onUpdate:modelValue":t[6]||(t[6]=t=>e.fontStyle.letterSpacing=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"])]),_:1})])]),default:D(()=>[C("div",{class:"_fd-fi-box",style:H(e.fontStyle)},L(e.t("style.font.preview")),5)]),_:1},8,["label"])}]]),Oh=a({name:"ShadowContent",components:{ColorInput:Bp},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)}}),Rh={class:"_fd-shadow-content"},Mh={class:"_fd-sc-right"};const Dh=a({name:"ShadowInput",emits:["update:modelValue","change"],components:{ConfigItem:bf,ShadowContent:ns(Oh,[["render",function(e,t,n,i,o,r){const a=c("el-radio-button"),l=c("el-tooltip"),s=c("el-radio-group"),d=c("el-form-item"),f=c("ColorInput"),p=c("el-option"),h=c("el-select"),m=c("el-input"),g=c("el-form");return k(),A("div",Rh,[u(g,{"label-width":"50px","label-position":"top",inline:"",class:"_fd-sc-form",size:"small"},{default:D(()=>[u(d,{label:e.t("style.shadow.mode")},{default:D(()=>[u(s,{modelValue:e.form.type,"onUpdate:modelValue":t[0]||(t[0]=t=>e.form.type=t),onChange:e.onInput,size:"small",class:"_fd-sc-radio"},{default:D(()=>[(k(!0),A(P,null,V(e.options,t=>(k(),M(l,{key:t.key,effect:"dark",content:e.t("style.shadow."+t.key),placement:"top","hide-after":0,persistent:""},{default:D(()=>[u(a,{label:t.key,value:t.key},{default:D(()=>[C("i",{class:I(["fc-icon","icon-"+t.icon])},null,2)]),_:2},1032,["label","value"])]),_:2},1032,["content"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),u(d,{label:e.t("style.color")},{default:D(()=>[u(f,{modelValue:e.form.color,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.color=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"]),u(d,{label:e.t("style.shadow.x")},{default:D(()=>[u(m,{modelValue:e.form.x,"onUpdate:modelValue":t[3]||(t[3]=t=>e.form.x=t),type:"number",onChange:e.onInput},{append:D(()=>[u(h,{modelValue:e.form.x_unit,"onUpdate:modelValue":t[2]||(t[2]=t=>e.form.x_unit=t),onChange:e.onInput},{default:D(()=>[(k(!0),A(P,null,V(e.units,e=>(k(),M(p,{key:e,label:e,value:e},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),u(d,{label:e.t("style.shadow.y")},{default:D(()=>[u(m,{modelValue:e.form.y,"onUpdate:modelValue":t[5]||(t[5]=t=>e.form.y=t),type:"number",onChange:e.onInput},{append:D(()=>[u(h,{modelValue:e.form.y_unit,"onUpdate:modelValue":t[4]||(t[4]=t=>e.form.y_unit=t),onChange:e.onInput},{default:D(()=>[(k(!0),A(P,null,V(e.units,e=>(k(),M(p,{key:e,label:e,value:e},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),u(d,{label:e.t("style.shadow.vague")},{default:D(()=>[u(m,{modelValue:e.form.vague,"onUpdate:modelValue":t[7]||(t[7]=t=>e.form.vague=t),type:"number",onChange:e.onInput},{append:D(()=>[u(h,{modelValue:e.form.vague_unit,"onUpdate:modelValue":t[6]||(t[6]=t=>e.form.vague_unit=t),onChange:e.onInput},{default:D(()=>[(k(!0),A(P,null,V(e.units,e=>(k(),M(p,{key:e,label:e,value:e},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"]),u(d,{label:e.t("style.shadow.extend")},{default:D(()=>[u(m,{modelValue:e.form.extend,"onUpdate:modelValue":t[9]||(t[9]=t=>e.form.extend=t),type:"number",onChange:e.onInput},{append:D(()=>[u(h,{modelValue:e.form.extend_unit,"onUpdate:modelValue":t[8]||(t[8]=t=>e.form.extend_unit=t),onChange:e.onInput},{default:D(()=>[(k(!0),A(P,null,V(e.units,e=>(k(),M(p,{key:e,label:e,value:e},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"])]),_:1}),C("div",Mh,[C("div",{ref:"box",class:I(["_fd-sc-box",e.down?"down":""]),onClick:t[10]||(t[10]=t=>e.getMouseXY(t,1)),onMousedown:t[11]||(t[11]=(...t)=>e.onMousedown&&e.onMousedown(...t)),onMouseup:t[12]||(t[12]=(...t)=>e.onMouseup&&e.onMouseup(...t)),onMousemove:t[13]||(t[13]=t=>e.getMouseXY(t,0))},[C("span",{class:"spot",style:H(e.spotStyle)},t[14]||(t[14]=[C("i",{class:"spot-id"},null,-1)]),4),t[15]||(t[15]=C("span",{class:"center-spot"},null,-1)),t[16]||(t[16]=C("div",{class:"x-hr"},null,-1)),t[17]||(t[17]=C("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(){}}),Nh={class:"_fd-shadow-input"};const Ih=ns(Dh,[["render",function(e,t,n,i,o,r){const a=c("el-dropdown-item"),l=c("el-dropdown-menu"),s=c("el-dropdown"),d=c("el-input"),f=c("ShadowContent"),p=c("ConfigItem");return k(),A("div",Nh,[u(p,{label:e.t("style.shadow.name")},{append:D(()=>[u(f,{modelValue:e.value,"onUpdate:modelValue":t[1]||(t[1]=t=>e.value=t)},null,8,["modelValue"])]),default:D(()=>[u(d,{clearable:"",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=t=>e.value=t),class:"_fd-si-input"},{append:D(()=>[u(s,null,{dropdown:D(()=>[u(l,null,{default:D(()=>[(k(!0),A(P,null,V(e.options,t=>(k(),M(a,{onClick:n=>e.changeValue(t.value)},{default:D(()=>[j(L(t.label),1)]),_:2},1032,["onClick"]))),256))]),_:1})]),default:D(()=>[t[2]||(t[2]=C("i",{class:"fc-icon icon-setting"},null,-1))]),_:1,__:[2]})]),_:1},8,["modelValue"])]),_:1},8,["label"])])}]]),Fh=a({name:"PositionInput",components:{ConfigItem:bf,SizeInput:Pp},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()}}),Lh={class:"_fd-pos-input"},Ph={class:"_fd-pos-con"},Vh={class:"_fd-pos-item"},jh={class:"_fd-pos-item"},Bh={class:"_fd-pos-item"},zh={class:"_fd-pos-item"};const Hh=ns(Fh,[["render",function(e,t,n,i,o,r){const a=c("el-option"),l=c("el-select"),s=c("SizeInput"),d=c("ConfigItem");return k(),A("div",Lh,[u(d,{label:e.t("style.position.name")},{append:D(()=>[C("div",Ph,[C("div",Vh,[t[5]||(t[5]=C("div",{class:"_fd-pos-icon"},[C("i",{class:"fc-icon icon-position-left"})],-1)),u(s,{modelValue:e.style.left,"onUpdate:modelValue":t[1]||(t[1]=t=>e.style.left=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),C("div",jh,[t[6]||(t[6]=C("div",{class:"_fd-pos-icon",style:{transform:"rotate(90deg)"}},[C("i",{class:"fc-icon icon-position-left"})],-1)),u(s,{modelValue:e.style.top,"onUpdate:modelValue":t[2]||(t[2]=t=>e.style.top=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),C("div",Bh,[t[7]||(t[7]=C("div",{class:"_fd-pos-icon",style:{transform:"rotate(-90deg)"}},[C("i",{class:"fc-icon icon-position-left"})],-1)),u(s,{modelValue:e.style.bottom,"onUpdate:modelValue":t[3]||(t[3]=t=>e.style.bottom=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),C("div",zh,[t[8]||(t[8]=C("div",{class:"_fd-pos-icon",style:{transform:"rotate(180deg)"}},[C("i",{class:"fc-icon icon-position-left"})],-1)),u(s,{modelValue:e.style.right,"onUpdate:modelValue":t[4]||(t[4]=t=>e.style.right=t),onChange:e.onInput},null,8,["modelValue","onChange"])])])]),default:D(()=>[u(l,{modelValue:e.style.position,"onUpdate:modelValue":t[0]||(t[0]=t=>e.style.position=t),clearable:"",onChange:e.onInput},{default:D(()=>[(k(!0),A(P,null,V(e.positionType,e=>(k(),M(a,{key:e.value,label:e.label,value:e.value},{default:D(()=>[j(L(e.label),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["label"])])}]]),Uh=["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","textAlign","lineHeight","letterSpacing"],Wh=["position","top","left","bottom","right"],Gh=["height","width","minWidth","minHeight","maxWidth","maxHeight","overflow"],$h=["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",...Uh,...Gh,...Wh],Qh=a({name:"StyleConfig",inject:["designer"],emits:["update:modelValue"],components:{PositionInput:Hh,TableOptions:ap,ColorInput:Bp,ConfigItem:bf,RadiusInput:Ch,BoxSizeInput:Wp,BoxSpaceInput:lh,BorderInput:vh,ShadowInput:Ih,FontInput:Th},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=ri(n);(["margin","padding"].indexOf(n)>-1||n.indexOf("margin")>-1||n.indexOf("padding")>-1)&&(t[i]=e[n])});const n={};Gh.forEach(t=>{e[t]&&(n[t]=e[t])});const i={};Wh.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=Ri(e.opacity)?100:parseFloat(e.opacity)||0;r&&r<1&&(r*=100);let a=e.scale;a=Ri(e.scale)?100:isNaN(Number(a))?parseFloat(a)||100:a>0?100*a:0;const l={};Uh.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||"",$h.forEach(t=>{delete e[t]}),this.formData=e},onInput(){let e={...this.formData},t={};$h.forEach(n=>{if(e[n])t[n]=e[n],delete e[n];else{const i=sh(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=>{Ri(n[e])&&delete n[e]}),this.$emit("update:modelValue",n)}},created(){this.tidyStyle()}}),Yh={class:"_fd-style-config"};const qh=ns(Qh,[["render",function(e,t,n,i,o,r){const a=c("BoxSpaceInput"),l=c("BoxSizeInput"),s=c("ColorInput"),d=c("ConfigItem"),f=c("BorderInput"),p=c("RadiusInput"),h=c("FontInput"),m=c("ShadowInput"),g=c("PositionInput"),v=c("el-slider"),_=c("TableOptions");return k(),A("div",Yh,[u(a,{modelValue:e.space,"onUpdate:modelValue":t[0]||(t[0]=t=>e.space=t),onChange:e.onInput,style:{"margin-bottom":"10px"}},null,8,["modelValue","onChange"]),u(l,{modelValue:e.size,"onUpdate:modelValue":t[1]||(t[1]=t=>e.size=t),onChange:e.onInput},null,8,["modelValue","onChange"]),u(d,{label:e.t("style.color")},{default:D(()=>[u(s,{modelValue:e.color,"onUpdate:modelValue":t[2]||(t[2]=t=>e.color=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"]),u(d,{label:e.t("style.backgroundColor")},{default:D(()=>[u(s,{modelValue:e.backgroundColor,"onUpdate:modelValue":t[3]||(t[3]=t=>e.backgroundColor=t),onChange:e.onInput},null,8,["modelValue","onChange"])]),_:1},8,["label"]),u(f,{modelValue:e.border,"onUpdate:modelValue":t[4]||(t[4]=t=>e.border=t),onChange:e.onInput},null,8,["modelValue","onChange"]),u(p,{modelValue:e.radius,"onUpdate:modelValue":t[5]||(t[5]=t=>e.radius=t),onChange:e.onInput},null,8,["modelValue","onChange"]),u(h,{modelValue:e.font,"onUpdate:modelValue":t[6]||(t[6]=t=>e.font=t),onChange:e.onInput},null,8,["modelValue","onChange"]),u(m,{modelValue:e.boxShadow,"onUpdate:modelValue":t[7]||(t[7]=t=>e.boxShadow=t),onChange:e.onInput},null,8,["modelValue","onChange"]),u(g,{modelValue:e.position,"onUpdate:modelValue":t[8]||(t[8]=t=>e.position=t),onChange:e.onInput},null,8,["modelValue","onChange"]),u(d,{label:e.t("style.opacity"),class:"_fd-opacity-input"},{default:D(()=>[u(v,{"show-tooltip":!1,modelValue:e.opacity,"onUpdate:modelValue":t[9]||(t[9]=t=>e.opacity=t),onChange:e.onInput},null,8,["modelValue","onChange"]),C("span",null,L(e.opacity)+"%",1)]),_:1},8,["label"]),u(d,{label:e.t("style.scale"),class:"_fd-opacity-input"},{default:D(()=>[u(v,{min:80,max:120,"show-tooltip":!1,modelValue:e.scale,"onUpdate:modelValue":t[10]||(t[10]=t=>e.scale=t),onChange:e.onInput},null,8,["modelValue","onChange"]),C("span",null,L(e.scale)+"%",1)]),_:1},8,["label"]),u(d,{label:e.t("props.custom"),info:Object.keys(e.formData).length>0?e.t("struct.configured"):""},{append:D(()=>[u(_,S({modelValue:e.formData,"onUpdate:modelValue":t[11]||(t[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"])])}]]);
  39. /*!
  40. * @form-create/component-wangeditor v3.2.14
  41. * (c) 2018-2024 xaboy
  42. * Github https://github.com/xaboy/form-create with wangeditor
  43. * Released under the MIT License.
  44. */function Kh(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 Xh(e){return(Xh="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 Jh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var em={exports:{}};window,em.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"===Xh(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 u}),n.d(t,"__awaiter",function(){return c}),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});
  45. /*! *****************************************************************************
  46. Copyright (c) Microsoft Corporation.
  47. Permission to use, copy, modify, and/or distribute this software for any
  48. purpose with or without fee is hereby granted.
  49. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  50. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  51. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  52. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  53. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  54. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  55. PERFORMANCE OF THIS SOFTWARE.
  56. ***************************************************************************** */
  57. 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":Xh(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 u(e,t){if("object"===(typeof Reflect>"u"?"undefined":Xh(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(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(u,c):d(r[0][2],e)}function u(e){l("next",e)}function c(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)),u=i(n(121)),c=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 u.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,c.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,c.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,c.default)(t).call(t,e)?i:t}),""!=i&&(0,c.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),u=n(16),c=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&&u(w,f),h=A[f],n&&(m=e.noTargetGet?(v=o(w,f))&&v.value:w[f]),p=n&&m?m:t[f],(!n||Xh(h)!==Xh(p))&&(g=e.bind&&n?l(p,i):e.wrap&&n?c(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&&(u(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)),u=i(n(89)),c=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,u.default)(e)&&(t=[]),(0,u.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,c.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":Xh(globalThis))&&globalThis)||n("object"==(typeof window>"u"?"undefined":Xh(window))&&window)||n("object"==(typeof self>"u"?"undefined":Xh(self))&&self)||n("object"==Xh(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),u=o("wks"),c=i.Symbol,d=s?c:c&&c.withoutSetter||a;e.exports=function(e){return r(u,e)||(l&&r(c,e)?u[e]=c[e]:u[e]=d("Symbol."+e)),u[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"===Xh(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],u=n[s]||0,c="".concat(s," ").concat(u);n[s]=u+1;var d=a(c),f={css:l[1],media:l[2],sourceMap:l[3]};-1!==d?(r[d].references++,r[d].updater(f)):r.push({identifier:c,updater:m(f,t),references:1}),i.push(c)}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 u(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}var c=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=c(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(){u(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),u=0;u<n.length;u++){var c=a(n[u]);0===r[c].references&&(r[c].updater(),r.splice(c,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],u=!!r(t,"ACCESSORS")&&t.ACCESSORS,c=r(t,0)?t[0]:s,d=r(t,1)?t[1]:void 0;return l[e]=!!n&&!o(function(){if(u&&!i)return!0;var e={length:-1};u?a(e,1,{enumerable:!0,get:s}):e[1]=1,n.call(e,c,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)),u=l.__importDefault(n(95)),c=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,u="zh-CN"===n.config.lang?"":"w-e-drop-list-tl";""!==u&&"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(u)}});var d=new c.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}(u.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,u=function(e){var t=1==e,n=2==e,u=3==e,c=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(c)return!1;return d?-1:u||c?c:C}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(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),u=s.__importDefault(n(3)),c=n(7),d=function(){function e(t,n){this.menu=t,this.conf=n,this.$container=u.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=u.default('<i class="w-e-icon-close w-e-panel-close"></i>');o.append(g),g.on("click",function(){t.remove()});var v=u.default('<ul class="w-e-panel-tab-title"></ul>'),_=u.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=u.default('<li class="w-e-item">'+n+"</li>");v.append(o);var a=u.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||c.EMPTY_FN,u=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)(u).call(u,o).on(r,f),d&&"click"===r&&u.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,u){if(e){var c=n?e:e.prototype;a(c,s)||o(c,s,{configurable:!0,value:t}),u&&!i&&r(c,"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(),u=l.default(s.parent),c=this.editor.$textElem.elems[0].scrollTop;if(this._isInsertTextContainer=u.equal(this.editor.$textContainerElem),this._isInsertTextContainer){var d=u.getBoundingClientRect().height,f=s.top,p=s.left,h=s.height,m=f-c;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),u=n(19),c=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 u(e,y,t),t},o=function(e){return c(e,y)?e[y]:{}},r=function(e){return c(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 u(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 c(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=u,t.updateRange=c,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 u in i){var c=o[u],d=c&&c.prototype;d&&r(d)!==s&&a(d,s,u),l[u]=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),u=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,d){var f,p,h,m,g,v,_,b=a(t,n,c?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=c?b(i(_=e[h])[0],_[1]):b(e[h]))&&g instanceof u)return g;return new u(!1)}f=p.call(e)}for(v=f.next;!(_=v.call(f)).done;)if("object"==Xh(g=s(f,b,_.value,c))&&g&&g instanceof u)return g;return new u(!1)}).stop=function(e){return new u(!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),u=n(100),c=Object.getOwnPropertyDescriptor;t.f=i?c:function(e,t){if(e=a(e),t=l(t,!0),u)try{return c(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),u=n(53),c=n(10),d=n(43),f=n(44),p=n(104),h=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,g=c("iterator"),v="keys",_="values",b="entries",y=function(){return this};e.exports=function(e,t,n,c,p,x,w){o(n,t,c);var A,k,C,S=function(e){if(e===p&&M)return M;if(!m&&e in O)return O[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,O=e.prototype,R=O[g]||O["@@iterator"]||p&&O[p],M=!m&&R||S(p),D="Array"==t&&O.entries||R;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==_&&R&&R.name!==_&&(T=!0,M=function(){return R.call(this)}),(!d||w)&&O[g]!==M&&s(O,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 O))&&u(O,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),u=n(73),c=n(63),d=">",f="<",p="prototype",h="script",m=c("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=u("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),u=o(s.length),c=r(a,u);if(e&&n!=n){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((e||c in s)&&s[c]===n)return e||c||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,u=s&&s.v8;u?o=(i=u.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),u=a.__importDefault(n(267)),c=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)),O=a.__importDefault(n(33)),R=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(u.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 c.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=O.default,e.PanelMenu=R.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),u=n(6),c=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 u="";t&&(u="alt='"+(u=(u=t.replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace("'",'"'))+"' "),i.cmd.do("insertHTML","<img src='"+l+"' "+u+s+'style="max-width:100%;" contenteditable="false"/>'),o.linkImgCallback(e,t,n);var c=document.createElement("img");c.onload=function(){c=null},c.onerror=function(){o.customAlert(a("插入图片错误"),"error","wangEditor: "+a("插入图片错误")+","+a("图片链接")+' "'+e+'",'+a("下载链接失败")),c=null},c.onabort=function(){return c=null},c.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(u.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 O=f.split("#");f=O[0];var R=O[1]||"";(0,a.default)(u).call(u,_,function(e,t){b&&((0,l.default)(f).call(f,"?")>0?f+="&":f+="?",f=f+e+"="+t),T.append(e,t)}),R&&(f+="#"+R);var M=c.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 u=o.data;(0,a.default)(u).call(u,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&&u.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 u(e){var t=e.selection.getSelectionRangeTopNodes();if(0!==t.length)return(0,r.default)(t).call(t,function(e){return s(e)})}function c(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=c(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=u,t.getCursorNextNode=c,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==u||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",u=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),u=n(10),c=n(43),d=u("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={}),!c&&!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"==Xh(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,u=[];for(n in l)!i(a,n)&&i(l,n)&&u.push(n);for(;t.length>s;)i(l,n=t[s++])&&(~r(u,n)||u.push(n));return u}},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),u=n(40),c=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=u(r.postMessage,r,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||l(C)||"file:"===p.protocol?i=x in d("script")?function(e){c.appendChild(d("script"))[x]=function(){c.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),u=n(83),c=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(u(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&&!c(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),u=l("meta"),c=0,d=Object.isExtensible||function(){return!0},f=function(e){a(e,u,{value:{objectID:"O"+ ++c,weakData:{}}})},p=function(e,t){if(!o(e))return"symbol"==Xh(e)?e:("string"==typeof e?"S":"P")+e;if(!r(e,u)){if(!d(e))return"F";if(!t)return"E";f(e)}return e[u].objectID},h=function(e,t){if(!r(e,u)){if(!d(e))return!0;if(!t)return!1;f(e)}return e[u].weakData},m=function(e){return s&&g.REQUIRED&&d(e)&&!r(e,u)&&f(e),e},g=e.exports={REQUIRED:!1,fastKey:p,getWeakData:h,onFreeze:m};i[u]=!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),u=n(75),c=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,u){var c=e(function(e,i){l(e,c,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[u],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(c.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(c.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(c.prototype,"size",{get:function(){return p(this).size}}),c},setStrong:function(e,t,n){var i=t+" Iterator",o=m(t),r=m(i);u(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),c(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 u(e){var t=e.clipboardData,n="";return n=null==t?window.clipboardData&&window.clipboardData.getData("text"):t.getData("text/plain"),l.replaceHtmlSymbol(n)}function c(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=u(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(u(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=u,t.getPasteHtml=c,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),u=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 u=t.list||[],c=t.type||"list",d=t.clickHandler||s.EMPTY_FN,f=l.default('<ul class="'+("list"===c?"w-e-list":"w-e-block")+'"></ul>');(0,r.default)(u).call(u,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=u},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),u=r.__importStar(n(371));(o=i=t.ListType||(t.ListType={})).OrderedList="OL",o.UnorderedList="UL";var c=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(),c=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)?u.ClassType.Wrap:this.isOrderElem(r)&&this.isOrderElem(a)?u.ClassType.Join:this.isOrderElem(r)?u.ClassType.StartJoin:this.isOrderElem(a)?u.ClassType.EndJoin:u.ClassType.Other;var p=new u.default(u.createListHandle(d,f,l));s.updateRange(t,p.getSelectionRangeElem(),!!c)}},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=c},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":Xh(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,d09GRgABAAAAABskAAsAAAAAGtgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIPFWNtYXAAAAFoAAABHAAAARz2mfAgZ2FzcAAAAoQAAAAIAAAACAAAABBnbHlmAAACjAAAFXwAABV8IH7+mGhlYWQAABgIAAAANgAAADYb6gumaGhlYQAAGEAAAAAkAAAAJAkjBWlobXR4AAAYZAAAAKQAAACkmYcEbmxvY2EAABkIAAAAVAAAAFReAmKYbWF4cAAAGVwAAAAgAAAAIAA0ALZuYW1lAAAZfAAAAYYAAAGGmUoJ+3Bvc3QAABsEAAAAIAAAACAAAwAAAAMD7wGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8fwDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAQAAAAA8ACAABAAcAAEAIOkB6QbpDekS6UfpZul36bnpu+m+6cbpy+nf6gvqDepS6lzqX+pl6nHqfPAN8BTxIPHc8fz//f//AAAAAAAg6QDpBukM6RLpR+ll6Xfpuem76b7pxunL6d/qC+oN6lLqXOpf6mLqcep38A3wFPEg8dzx/P/9//8AAf/jFwQXABb7FvcWwxamFpYWVRZUFlIWSxZHFjQWCRYIFcQVuxW5FbcVrBWnEBcQEQ8GDksOLAADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAAEAEEAAQO/A38ABQALABEAFwAAATMVIREzAxEhFSMVATUzESE1ETUhESM1Av/A/sJ+fgE+wP4Cfv7CAT5+Ar9+AT78ggE+fsACvsD+wn7+An7+wsAAAAAABABBAAEDvwN/AAUACwARABcAAAEhESM1IxM1MxEhNQERIRUjFREVMxUhEQKBAT5+wMB+/sL9wAE+wMD+wgN//sLA/X7A/sJ+AcIBPn7A/v7AfgE+AAAAAAIAAP/ABAADwAAEABMAAAE3AScBAy4BJxM3ASMBAyUBNQEHAYCAAcBA/kCfFzsyY4ABgMD+gMACgAGA/oBOAUBAAcBA/kD+nTI7FwERTgGA/oD9gMABgMD+gIAAAgAA/8AEAAOAACkALQAAAREjNTQmIyEiBh0BFBYzITI2PQEzESEVIyIGFREUFjsBMjY1ETQmKwE1ASE1IQQAwCYa/UAaJiYaAsAaJoD9wCANExMNgA0TEw0gAUD9QALAAYABgEAaJiYawBomJhpA/wCAEw3+wA0TEw0BQA0TQAGAQAAABAAAAAAEAAOAABAAIQAtADQAAAE4ATEROAExITgBMRE4ATEhNSEiBhURFBYzITI2NRE0JiMHFAYjIiY1NDYzMhYTITUTATM3A8D8gAOA/IAaJiYaA4AaJiYagDgoKDg4KCg4QP0A4AEAQOADQP0AAwBAJhr9ABomJhoDABom4Cg4OCgoODj9uIABgP7AwAAAAgAAAEAEAANAADgAPAAAASYnLgEnJiMiBw4BBwYHBgcOAQcGFRQXHgEXFhcWFx4BFxYzMjc+ATc2NzY3PgE3NjU0Jy4BJyYnARENAQPVNjg5djw9Pz89PHY5ODYLBwgLAwMDAwsIBws2ODl2PD0/Pz08djk4NgsHCAsDAwMDCwgHC/2rAUD+wAMgCAYGCAICAgIIBgYIKSoqWS0uLy8uLVkqKikIBgYIAgICAggGBggpKipZLS4vLy4tWSoqKf3gAYDAwAAAAAACAMD/wANAA8AAGwAnAAABIgcOAQcGFRQXHgEXFjEwNz4BNzY1NCcuAScmAyImNTQ2MzIWFRQGAgBCOzpXGRkyMngyMjIyeDIyGRlXOjtCUHBwUFBwcAPAGRlXOjtCeH19zEFBQUHMfX14Qjs6VxkZ/gBwUFBwcFBQcAAAAQAAAAAEAAOAACsAAAEiBw4BBwYHJxEhJz4BMzIXHgEXFhUUBw4BBwYHFzY3PgE3NjU0Jy4BJyYjAgA1MjJcKSkjlgGAkDWLUFBFRmkeHgkJIhgYHlUoICAtDAwoKIteXWoDgAoLJxscI5b+gJA0PB4eaUZFUCsoKUkgIRpgIysrYjY2OWpdXosoKAABAAAAAAQAA4AAKgAAExQXHgEXFhc3JicuAScmNTQ3PgE3NjMyFhcHIREHJicuAScmIyIHDgEHBgAMDC0gIChVHhgYIgkJHh5pRkVQUIs1kAGAliMpKVwyMjVqXV6LKCgBgDk2NmIrKyNgGiEgSSkoK1BFRmkeHjw0kAGAliMcGycLCigoi15dAAAAAAIAAABABAEDAAAmAE0AABMyFx4BFxYVFAcOAQcGIyInLgEnJjUnNDc+ATc2MxUiBgcOAQc+ASEyFx4BFxYVFAcOAQcGIyInLgEnJjUnNDc+ATc2MxUiBgcOAQc+AeEuKSk9ERISET0pKS4uKSk9ERIBIyN6UlFdQHUtCRAHCBICSS4pKT0REhIRPSkpLi4pKT0REgEjI3pSUV1AdS0JEAcIEgIAEhE9KSkuLikpPRESEhE9KSkuIF1RUnojI4AwLggTCgIBEhE9KSkuLikpPRESEhE9KSkuIF1RUnojI4AwLggTCgIBAAAGAED/wAQAA8AAAwAHAAsAEQAdACkAACUhFSERIRUhESEVIScRIzUjNRMVMxUjNTc1IzUzFRURIzUzNSM1MzUjNQGAAoD9gAKA/YACgP2AwEBAQIDAgIDAwICAgICAgAIAgAIAgMD/AMBA/fIyQJI8MkCS7v7AQEBAQEAABgAA/8AEAAPAAAMABwALABcAIwAvAAABIRUhESEVIREhFSEBNDYzMhYVFAYjIiYRNDYzMhYVFAYjIiYRNDYzMhYVFAYjIiYBgAKA/YACgP2AAoD9gP6ASzU1S0s1NUtLNTVLSzU1S0s1NUtLNTVLA4CA/wCA/wCAA0A1S0s1NUtL/rU1S0s1NUtL/rU1S0s1NUtLAAUAAABABWADAAADAAcACwAOABEAABMhFSEVIRUhFSEVIQEXNzUnBwADgPyAA4D8gAOA/IAD4MDAwMADAMBAwEDAAUDAwEDAwAAAAAADAAAAAAQAA6AAAwANABQAADchFSElFSE1EyEVITUhJQkBIxEjEQAEAPwABAD8AIABAAEAAQD9YAEgASDggEBAwEBAAQCAgMABIP7g/wABAAAAAAACAB7/zAPiA7QAMwBkAAABIiYnJicmNDc2PwE+ATMyFhcWFxYUBwYPAQYiJyY0PwE2NCcuASMiBg8BBhQXFhQHDgEjAyImJyYnJjQ3Nj8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFxYUBwYPAQ4BIwG4ChMIIxISEhIjwCNZMTFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PCBMKuDFZIyMSEhISI1gPLA8PD1gpKRQzHBwzFMApKQ8PDysQIxISEhIjwCNZMQFECAckLS1eLS0kwCIlJSIkLS1eLS0kVxAQDysPWCl0KRQVFRTAKXQpDysQBwj+iCUiJC0tXi0tJFcQEA8rD1gpdCkUFRUUwCl0KQ8rEA8PJC0tXi0tJMAiJQAAAAAFAAD/wAQAA8AAGwA3AFMAXwBrAAAFMjc+ATc2NTQnLgEnJiMiBw4BBwYVFBceARcWEzIXHgEXFhUUBw4BBwYjIicuAScmNTQ3PgE3NhMyNz4BNzY3BgcOAQcGIyInLgEnJicWFx4BFxYnNDYzMhYVFAYjIiYlNDYzMhYVFAYjIiYCAGpdXosoKCgoi15dampdXosoKCgoi15dalZMTHEgISEgcUxMVlZMTHEgISEgcUxMVisrKlEmJiMFHBtWODc/Pzc4VhscBSMmJlEqK9UlGxslJRsbJQGAJRsbJSUbGyVAKCiLXl1qal1eiygoKCiLXl1qal1eiygoA6AhIHFMTFZWTExxICEhIHFMTFZWTExxICH+CQYGFRAQFEM6OlYYGRkYVjo6QxQQEBUGBvcoODgoKDg4KCg4OCgoODgAAAEAAAFABAACQAAPAAATFRQWMyEyNj0BNCYjISIGABMNA8ANExMN/EANEwIgwA0TEw3ADRMTAAAAAwAA/8AEAAPAABsANwBDAAABIgcOAQcGFRQXHgEXFjMyNz4BNzY1NCcuAScmAyInLgEnJjU0Nz4BNzYzMhceARcWFRQHDgEHBhMHJwcXBxc3FzcnNwIAal1eiygoKCiLXl1qal1eiygoKCiLXl1qVkxMcSAhISBxTExWVkxMcSAhISBxTExKoKBgoKBgoKBgoKADwCgoi15dampdXosoKCgoi15dampdXosoKPxgISBxTExWVkxMcSAhISBxTExWVkxMcSAhAqCgoGCgoGCgoGCgoAACAAD/wAQAA8AADwAVAAABISIGFREUFjMhMjY1ETQmASc3FwEXA4D9ADVLSzUDADVLS/4L7VqTATNaA8BLNf0ANUtLNQMANUv85e5akgEyWgAAAAABAGX/wAObA8AAKQAAASImIyIHDgEHBhUUFjMuATU0NjcwBwYCBwYHFSETMzcjNx4BMzI2Nw4BAyBEaEZxU1RtGhtJSAYNZUoQEEs8PFkBPWzGLNc0LVUmLlAYHT0DsBAeHWE+P0FNOwsmN5lvA31+/sWPkCMZAgCA9gkPN2sJBwAAAAACAAAAAAQAA4AACQAXAAAlMwcnMxEjNxcjJREnIxEzFSE1MxEjBxEDgICgoICAoKCA/wBAwID+gIDAQMDAwAIAwMDA/wCA/UBAQALAgAEAAAMAwAAAA0ADgAAWAB8AKAAAAT4BNTQnLgEnJiMhESEyNz4BNzY1NCYBMzIWFRQGKwETIxEzMhYVFAYCxBwgFBRGLi81/sABgDUvLkYUFET+hGUqPDwpZp+fnyw+PgHbIlQvNS8uRhQU/IAUFEYuLzVGdAFGSzU1S/6AAQBLNTVLAAAAAAIAwAAAA0ADgAAfACMAAAEzERQHDgEHBiMiJy4BJyY1ETMRFBYXHgEzMjY3PgE1ASEVIQLAgBkZVzo7QkI7OlcZGYAbGBxJKChJHBgb/gACgP2AA4D+YDw0NU4WFxcWTjU0PAGg/mAeOBcYGxsYFzge/qCAAAAAAAEAgAAAA4ADgAALAAABFSMBMxUhNTMBIzUDgID+wID+QIABQIADgED9AEBAAwBAAAEAAAAABAADgAA9AAABFSMeARUUBgcOASMiJicuATUzFBYzMjY1NCYjITUhLgEnLgE1NDY3PgEzMhYXHgEVIzQmIyIGFRQWMzIWFwQA6xUWNTAscT4+cSwwNYByTk5yck7+AAEsAgQBMDU1MCxxPj5xLDA1gHJOTnJyTjtuKwHAQB1BIjViJCEkJCEkYjU0TEw0NExAAQMBJGI1NWIkISQkISRiNTRMTDQ0TCEfAAAACgAAAAAEAAOAAAMABwALAA8AEwAXABsAHwAjACcAABMRIREBNSEVHQEhNQEVITUjFSE1ESEVISUhFSERNSEVASEVISE1IRUABAD9gAEA/wABAP8AQP8AAQD/AAKAAQD/AAEA/IABAP8AAoABAAOA/IADgP3AwMBAwMACAMDAwMD/AMDAwAEAwMD+wMDAwAAABQAAAAAEAAOAAAMABwALAA8AEwAAEyEVIRUhFSERIRUhESEVIREhFSEABAD8AAKA/YACgP2ABAD8AAQA/AADgIBAgP8AgAFAgP8AgAAAAAAFAAAAAAQAA4AAAwAHAAsADwATAAATIRUhFyEVIREhFSEDIRUhESEVIQAEAPwAwAKA/YACgP2AwAQA/AAEAPwAA4CAQID/AIABQID/AIAAAAUAAAAABAADgAADAAcACwAPABMAABMhFSEFIRUhESEVIQEhFSERIRUhAAQA/AABgAKA/YACgP2A/oAEAPwABAD8AAOAgECA/wCAAUCA/wCAAAAAAAUAAAAABAADgAADAAcACwAPABMAABMhFSEVIRUhFSEVIRUhFSEVIRUhAAQA/AAEAPwABAD8AAQA/AAEAPwAA4CAQIBAgECAQIAAAAAGAAAAAAQAA4AAAwAHAAsADwATABYAABMhFSEFIRUhFSEVIRUhFSEFIRUhGQEFAAQA/AABgAKA/YACgP2AAoD9gP6ABAD8AAEAA4CAQIBAgECAQIABAAGAwAAAAAYAAAAABAADgAADAAcACwAPABMAFgAAEyEVIQUhFSEVIRUhFSEVIQUhFSEBESUABAD8AAGAAoD9gAKA/YACgP2A/oAEAPwAAQD/AAOAgECAQIBAgECAAoD+gMAAAQA/AD8C5gLmACwAACUUDwEGIyIvAQcGIyIvASY1ND8BJyY1ND8BNjMyHwE3NjMyHwEWFRQPARcWFQLmEE4QFxcQqKgQFxYQThAQqKgQEE4QFhcQqKgQFxcQThAQqKgQwxYQThAQqKgQEE4QFhcQqKgQFxcQThAQqKgQEE4QFxcQqKgQFwAAAAYAAAAAAyUDbgAUACgAPABNAFUAggAAAREUBwYrASInJjURNDc2OwEyFxYVMxEUBwYrASInJjURNDc2OwEyFxYXERQHBisBIicmNRE0NzY7ATIXFhMRIREUFxYXFjMhMjc2NzY1ASEnJicjBgcFFRQHBisBERQHBiMhIicmNREjIicmPQE0NzY7ATc2NzY7ATIXFh8BMzIXFhUBJQYFCCQIBQYGBQgkCAUGkgUFCCUIBQUFBQglCAUFkgUFCCUIBQUFBQglCAUFSf4ABAQFBAIB2wIEBAQE/oABABsEBrUGBAH3BgUINxobJv4lJhsbNwgFBQUFCLEoCBcWF7cXFhYJKLAIBQYCEv63CAUFBQUIAUkIBQYGBQj+twgFBQUFCAFJCAUGBgUI/rcIBQUFBQgBSQgFBgYF/lsCHf3jDQsKBQUFBQoLDQJmQwUCAgVVJAgGBf3jMCIjISIvAiAFBggkCAUFYBUPDw8PFWAFBQgAAgAHAEkDtwKvABoALgAACQEGIyIvASY1ND8BJyY1ND8BNjMyFwEWFRQHARUUBwYjISInJj0BNDc2MyEyFxYBTv72BgcIBR0GBuHhBgYdBQgHBgEKBgYCaQUFCP3bCAUFBQUIAiUIBQUBhf72BgYcBggHBuDhBgcHBh0FBf71BQgHBv77JQgFBQUFCCUIBQUFBQAAAAEAIwAAA90DbgCzAAAlIicmIyIHBiMiJyY1NDc2NzY3Njc2PQE0JyYjISIHBh0BFBcWFxYzFhcWFRQHBiMiJyYjIgcGIyInJjU0NzY3Njc2NzY9ARE0NTQ1NCc0JyYnJicmJyYnJiMiJyY1NDc2MzIXFjMyNzYzMhcWFRQHBiMGBwYHBh0BFBcWMyEyNzY9ATQnJicmJyY1NDc2MzIXFjMyNzYzMhcWFRQHBgciBwYHBhURFBcWFxYXMhcWFRQHBiMDwRkzMhoZMjMZDQgHCQoNDBEQChIBBxX+fhYHARUJEhMODgwLBwcOGzU1GhgxMRgNBwcJCQsMEA8JEgECAQIDBAQFCBIRDQ0KCwcHDho1NRoYMDEYDgcHCQoMDRAQCBQBBw8BkA4HARQKFxcPDgcHDhkzMhkZMTEZDgcHCgoNDRARCBQUCRERDg0KCwcHDgACAgICDAsPEQkJAQEDAwUMROAMBQMDBQzUUQ0GAQIBCAgSDwwNAgICAgwMDhEICQECAwMFDUUhAdACDQ0ICA4OCgoLCwcHAwYBAQgIEg8MDQICAgINDA8RCAgBAgEGDFC2DAcBAQcMtlAMBgEBBgcWDwwNAgICAg0MDxEICAEBAgYNT/3mRAwGAgIBCQgRDwwNAAACAAD/twP/A7cAEwA5AAABMhcWFRQHAgcGIyInJjU0NwE2MwEWFxYfARYHBiMiJyYnJicmNRYXFhcWFxYzMjc2NzY3Njc2NzY3A5soHh4avkw3RUg0NDUBbSEp/fgXJicvAQJMTHtHNjYhIRARBBMUEBASEQkXCA8SExUVHR0eHikDtxsaKCQz/plGNDU0SUkwAUsf/bErHx8NKHpNTBobLi86OkQDDw4LCwoKFiUbGhERCgsEBAIAAQAAAAAAAIWwaoFfDzz1AAsEAAAAAADbteOZAAAAANu145kAAP+3BWADwAAAAAgAAgAAAAAAAAABAAADwP/AAAAFgAAA//8FYAABAAAAAAAAAAAAAAAAAAAAKQQAAAAAAAAAAAAAAAIAAAAEAABBBAAAQQQAAAAEAAAABAAAAAQAAAAEAADABAAAAAQAAAAEAAAABAAAQAQAAAAFgAAABAAAAAQAAB4EAAAABAAAAAQAAAAEAAAABAAAZQQAAAAEAADABAAAwAQAAIAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAMlAD8DJQAAA74ABwQAACMD/wAAAAAAAAAKABQAHgBKAHYApADmAS4BkgHQAhYCXALQAw4DWAN+A6gEPgTeBPoFZAWOBdAF+AY6BnYGjgbmBy4HVgd+B6gHzgf8CCoIbgkmCXAKYgq+AAEAAAApALQACgAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAHAAAAAQAAAAAAAgAHAGAAAQAAAAAAAwAHADYAAQAAAAAABAAHAHUAAQAAAAAABQALABUAAQAAAAAABgAHAEsAAQAAAAAACgAaAIoAAwABBAkAAQAOAAcAAwABBAkAAgAOAGcAAwABBAkAAwAOAD0AAwABBAkABAAOAHwAAwABBAkABQAWACAAAwABBAkABgAOAFIAAwABBAkACgA0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},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),u=l.length;return s<0||s>=u?e?"":void 0:(r=l.charCodeAt(s))<55296||r>56319||s+1===u||(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 u=t+" Iterator";return e.prototype=o(i,{next:r(1,n)}),a(e,u,!1,!0),l[u]=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",u=a.set,c=a.getterFor(s);e.exports=l(Array,"Array",function(e,t){u(this,{type:s,target:i(e),index:0,kind:t})},function(){var e=c(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),u=n(8),c=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),O=n(120),R=n(42),M=n(101),D=n(10),N=n(86),I=D("species"),F="Promise",L=R.get,P=R.set,V=R.getterFor(F),j=d,B=u.TypeError,z=u.document,H=u.process,U=c("fetch"),W=T.f,G=W,$="process"==b(H),Q=!!(z&&z.createEvent&&u.dispatchEvent),Y="unhandledrejection",q="rejectionhandled",K=0,X=1,J=2,Z=1,ee=2,te=M(F,function(){if(y(j)===String(j)&&(66===N||!$&&"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,u,c=i[a++],d=r?c.ok:c.fail,f=c.resolve,p=c.reject,h=c.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(),u=!0)),l===c.promise?p(B("Promise-chain cycle")):(s=ie(l))?s.call(l,f,p):f(l)):p(o)}catch(m){h&&!u&&h.exit(),p(m)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&ae(e,t)})}},re=function(e,t,n){var i,o;Q?((i=z.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),u.dispatchEvent(i)):i={promise:t,reason:n},(o=u["on"+e])?o(i):e===Y&&E("Unhandled promise rejection",n)},ae=function(e,t){k.call(u,function(){var n,i=t.value;if(le(t)&&(n=O(function(){$?H.emit("unhandledRejection",i,e):re(Y,e,i)}),t.rejection=$||le(t)?ee:Z,n.error))throw n.value})},le=function(e){return e.rejection!==Z&&!e.parent},se=function(e,t){k.call(u,function(){$?H.emit("rejectionHandled",e):re(q,e,t.value)})},ue=function(e,t,n,i){return function(o){e(t,n,o,i)}},ce=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 B("Promise can't be resolved itself");var r=ie(i);r?C(function(){var o={done:!1};try{r.call(i,ue(e,t,o,n),ue(ce,t,o,n))}catch(a){ce(t,o,a,n)}}):(n.value=i,n.state=X,oe(t,n,!1))}catch(a){ce(t,{done:!1},a,n)}}};te&&(j=function(e){_(this,j,F),v(e),i.call(this);var t=L(this);try{e(ue(de,this,t),ue(ce,this,t))}catch(n){ce(this,t,n)}},(i=function(e){P(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:K,value:void 0})}).prototype=p(j.prototype,{then:function(e,t){var n=V(this),i=W(A(this,j));return i.ok="function"!=typeof e||e,i.fail="function"==typeof t&&t,i.domain=$?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=L(e);this.promise=e,this.resolve=ue(de,e,t),this.reject=ue(ce,e,t)},T.f=W=function(e){return e===j||e===r?new o(e):G(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(u,arguments))}}))),l({global:!0,wrap:!0,forced:te},{Promise:j}),h(j,F,!1,!0),m(F),r=c(F),l({target:F,stat:!0,forced:te},{reject:function(e){var t=W(this);return t.reject.call(void 0,e),t.promise}}),l({target:F,stat:!0,forced:s||te},{resolve:function(e){return S(s&&this===r?j:this,e)}}),l({target:F,stat:!0,forced:ne},{all:function(e){var t=this,n=W(t),i=n.resolve,o=n.reject,r=O(function(){var n=v(t.resolve),r=[],a=0,l=1;x(e,function(e){var s=a++,u=!1;r.push(void 0),l++,n.call(t,e).then(function(e){u||(u=!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=O(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,u,c,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?(u=_.resolve(void 0),c=u.then,a=function(){c.call(u,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,u=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 u.error&&s(u.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),u=n(119),c=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 u(t,e()).then(function(){return n})}:e,n?function(n){return u(t,e()).then(function(){throw n})}:e)}}),!o&&"function"==typeof r&&!r.prototype.finally&&c(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,u=r("indexOf"),c=a("indexOf",{ACCESSORS:!0,1:0});i({target:"Array",proto:!0,forced:s||!u||!c},{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),u=n(69),c=n(56),d=n(22),f=c("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,c,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(c=s(_,i),d=0;d<i;d++)(f=y+d)in _&&u(c,d,_[f]);if(c.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,c}})},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),u=n(69),c=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=c(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&&u(d,f,r[n])}else{if(f>=m)throw TypeError(g);u(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),u=n(106),c=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),O=n(74),R=n(63),M=n(51),D=n(64),N=n(10),I=n(93),F=n(12),L=n(37),P=n(42),V=n(32).forEach,j=R("hidden"),B="Symbol",z="prototype",H=N("toPrimitive"),U=P.set,W=P.getterFor(B),G=Object[z],$=o.Symbol,Q=r("JSON","stringify"),Y=k.f,q=C.f,K=w.f,X=S.f,J=O("symbols"),Z=O("op-symbols"),ee=O("string-to-symbol-registry"),te=O("symbol-to-string-registry"),ne=O("wks"),ie=o.QObject,oe=!ie||!ie[z]||!ie[z].findChild,re=l&&c(function(){return 7!=b(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=Y(G,t);i&&delete G[t],q(e,t,n),i&&e!==G&&q(G,t,i)}:q,ae=function(e,t){var n=J[e]=b($[z]);return U(n,{type:B,tag:e,description:t}),l||(n.description=t),n},le=u?function(e){return"symbol"==Xh(e)}:function(e){return Object(e)instanceof $},se=function(e,t,n){e===G&&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)},ue=function(e,t){h(e);var n=g(t),i=y(n).concat(he(n));return V(i,function(t){(!l||de.call(n,t))&&se(e,t,n[t])}),e},ce=function(e,t){return void 0===t?b(e):ue(b(e),t)},de=function(e){var t=v(e,!0),n=X.call(this,t);return!(this===G&&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!==G||!d(J,i)||d(Z,i)){var o=Y(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 V(t,function(e){!d(J,e)&&!d(M,e)&&n.push(e)}),n},he=function(e){var t=e===G,n=K(t?Z:g(e)),i=[];return V(n,function(e){d(J,e)&&(!t||d(G,e))&&i.push(J[e])}),i};s||($=function(){if(this instanceof $)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===G&&e.call(Z,n),d(this,j)&&d(this[j],t)&&(this[j][t]=!1),re(this,t,_(1,n))};return l&&oe&&re(G,t,{configurable:!0,set:n}),ae(t,e)},T($[z],"toString",function(){return W(this).tag}),T($,"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($[z],"description",{configurable:!0,get:function(){return W(this).description}}),a||T(G,"propertyIsEnumerable",de,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:$}),V(y(ne),function(e){F(e)}),i({target:B,stat:!0,forced:!s},{for:function(e){var t=String(e);if(d(ee,t))return ee[t];var n=$(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:ce,defineProperty:se,defineProperties:ue,getOwnPropertyDescriptor:fe}),i({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:pe,getOwnPropertySymbols:he}),i({target:"Object",stat:!0,forced:c(function(){A.f(1)})},{getOwnPropertySymbols:function(e){return A.f(m(e))}}),Q&&i({target:"JSON",stat:!0,forced:!s||c(function(){var e=$();return"[null]"!=Q([e])||"{}"!=Q({a:e})||"{}"!=Q(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,Q.apply(null,o)}}),$[z][H]||E($[z],H,$[z].valueOf),L($,B),M[j]=!0},function(e,t,n){var i=n(30),o=n(126).f,r={}.toString,a="object"==(typeof window>"u"?"undefined":Xh(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),u=n(69),c=n(10),d=n(56),f=n(22),p=d("slice"),h=f("slice",{ACCESSORS:!0,0:0,1:2}),m=c("species"),g=[].slice,v=Math.max;i({target:"Array",proto:!0,forced:!p||!h},{slice:function(e,t){var n,i,c,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)),c=0;p<h;p++,c++)p in d&&u(i,c,d[p]);return i.length=c,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)),u=a.__importDefault(n(129)),c=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,u.default,d.default,c.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),u=n(72),c=Object.assign,d=Object.defineProperty;e.exports=!c||o(function(){if(i&&1!==c({b:1},c(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!=c({},e)[n]||r(c({},t)).join("")!=o})?function(e,t){for(var n=s(e),o=arguments.length,c=1,d=a.f,f=l.f;o>c;)for(var p,h=u(arguments[c++]),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}:c},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),u=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 u=a.children(),c=null==u?void 0:u.last();o.selection.createRangeByElem(c,!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=u},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)),u=i(n(46));(0,o.default)(t,"__esModule",{value:!0});var c=n(2),d=c.__importDefault(n(3)),f=c.__importDefault(n(287)),p=n(6),h=c.__importDefault(n(299)),m=c.__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,u.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,u=a(l);l in[]&&Array(1)[l](function(){s=!1}),i({target:"Array",proto:!0,forced:s||!u},{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 u(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=u},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 u(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=u},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),u=l.__importDefault(n(3));function c(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 u=t.getNode();e.selection.createRangeByElems(u.childNodes[0],u.childNodes[0]);var c=e.selection.getSelectionContainerElem();e.selection.restoreSelection(),e.selection.moveCursor(c.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=u.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=c},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),u=n(7);function c(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(u.urlRegex.test(m)&&i){r&&s.isFunction(r)&&(m=""+(r(m)||""));var y=m.replace(u.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",""+c(m));else{var C=c(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",""+c(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),u=n(293),c=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),!!(u.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+(u.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))&&(u.EMPTY_TAGS.has(e)||(o=e))}function m(){o=""}(new c.default).parse(e,{startElement:function(e,o){if(s(e),!f(e,n)){var r=u.NECESSARY_ATTRS.get(e)||[],c=[];(0,a.default)(o).call(o,function(e){var n=e.name;"style"!==n?!1!==(0,l.default)(r).call(r,n)&&c.push(e):t||c.push(e)});var d=p(e,c);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,u,c){i.push(n.parseAttribute(e,t,o,r,a,l,s,u,c))}),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 u(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,c=0;c<a;c++){var d=r[c];o.push({name:d.name,value:d.value})}n.attrs=o,n.children=u(s.default(e))}n&&t.push(n)}),t}t.default=u},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)),u=i(n(4)),c=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,u.default)(d).call(d,function(e){delete m.default.globalCustomMenuConstructorList[e]}),(0,u.default)(t=i.menus).call(t,function(e){var t=n.constructorList[e];n._initMenuList(e,t)});for(var f=0,p=(0,c.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,u,c=l.target,d=v.default(c);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"),u=d;else{var p=d.parentUntil(".w-e-menu");null!=p&&(s=p.attr("data-title"),u=p)}if(s&&u){r();var h=u.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,u.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,u.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),u=s.length,c=0,d=[];u>c;)n=s[c++],(!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)),u=i.__importDefault(n(328)),c=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:u.default,fontName:c.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)),u=i(n(28));(0,o.default)(t,"__esModule",{value:!0});var c=n(2),d=c.__importDefault(n(24)),f=c.__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 c.__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"],u=f.default(r.getSelectionStartElem()),c=f.default(r.getSelectionEndElem());c.elems[0].outerHTML===f.default(h.EMPTY_P).elems[0].outerHTML&&!c.elems[0].nextSibling&&(c=c.prev());var d=[];d.push(u.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===c.getNodeTop(o).getNode()&&p.push(t)});for(var g=0;d[g].getNode()!==c.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,u.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]$/,u=/^[\uDC00-\uDFFF]$/,c=function(e,t,n){var i=n.charAt(t-1),o=n.charAt(t+1);return s.test(e)&&!u.test(o)||u.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,c):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)),u=a.__importDefault(n(322)),c=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="",u="";if(!(e=t.selection.getSelectionContainerElem()))return;if("A"!==e.getNodeName()){var d=c.getParentNodeA(e);e=s.default(d)}l=e.elems[0].innerText,u=e.attr("href"),this.createPanel(l,u)}else t.selection.isSelectionEmpty()?this.createPanel("",""):this.createPanel(t.selection.getSelectionText(),"")},t.prototype.createPanel=function(e,t){var n=u.default(this.editor,e,t);new d.default(this,n).create()},t.prototype.tryChangeActive=function(){var e=this.editor;c.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),u=n(6),c=s.__importDefault(n(3)),d=s.__importStar(n(96)),f=n(323);function p(e,t,n){var i,o=u.getRandom("input-link"),s=u.getRandom("input-text"),p=u.getRandom("btn-ok"),h=u.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=c.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,u,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(),_=c.default("#"+o),y=c.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!==(u=null==k?void 0:k.length)&&void 0!==u?u: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 u(e,t){var n,i,o,r,u,f=e.anchorNode,p=e.focusNode,h=e.anchorOffset,m=e.focusOffset,g=null!==(n=t.textContent)&&void 0!==n?n:"",v=c(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!==(u=null==A?void 0:A.nextSibling)&&void 0!==u?u:A;if(S===A)break;A=S}return d(v,""+_+b+y)}function c(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=u},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)),u=n(96);function c(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],c=s.innerHTML,d=s.parentElement;d&&(0,r.default)(l=u.EXTRA_TAG).call(l,d.nodeName)?d.innerHTML=c:e.cmd.do("insertHTML","<span>"+c+"</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=c(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)),u=l.__importDefault(n(3)),c=["LI"],d=["BLOCKQUOTE"],f=function(e){function t(t){var n=this,i=u.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:u.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:u.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:u.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:u.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;u.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)(c).call(c,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)(c).call(c,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)),u=a.__importDefault(n(335)),c=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,u.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=c.default(o);if(n.$textElem.equal(a)){var u=null===(e=n.selection.getSelectionContainerElem())||void 0===e?void 0:e.elems[0];n.selection.createRangeByElems(u.children[0],u.children[0]),o=n.selection.getSelectionRangeTopNodes(),s=c.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)),u=n(6),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-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=u.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=c},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)),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-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=u},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)),u=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=u},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)),u=a.__importDefault(n(341)),c=n(7);function d(e,t){var n=e.config,i=new u.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+c.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 u=n(2),c=n(6),d=u.__importDefault(n(135)),f=u.__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,u="validate.",p=function(e){return i.i18next.t(u+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(c.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 O=T[1]||"";(0,l.default)(c).call(c,v,function(e,t){_&&((0,s.default)(h).call(h,"?")>0?h+="&":h+="?",h=h+e+"="+t),E.append(e,t)}),O&&(h+="#"+O);var R=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 R&&o.customAlert(R,"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)),u=a.__importDefault(n(33)),c=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 u.default(this,e);this.setPanel(t),t.create()},t.prototype.tryChangeActive=function(){},t}(c.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 u(e){o.default(e),r.default(e),a.default(e),l.default(e),s.default(e)}t.default=u},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 u(e){e.txt.eventHooks.pasteEvents.unshift(function(t){s(t,e)})}t.default=u},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 u(e,t,n,i,o){e.attr("style","width:"+t+"px; height:"+n+"px; left:"+i+"px; top:"+o+"px;")}function c(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"),u(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=c(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,c=n.getBoundingClientRect(),d=t.getBoundingClientRect(),f=d.width,p=d.height,h=d.left-c.left,m=d.top-c.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"),u(e,v,_,h,m)}function w(){t.attr("width",v+""),t.attr("height",_+"");var n=t.getBoundingClientRect();u(e,v,_,n.left-c.left,n.top-c.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)),u=n(6),c=l.__importDefault(n(97));function d(e){var t,n=e.config,i=new c.default(e),o=u.getRandom("up-trigger-id"),l=u.getRandom("up-file-id"),d=u.getRandom("input-link-url"),f=u.getRandom("input-link-url-alt"),p=u.getRandom("input-link-url-href"),h=u.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,u=s.default("#"+d),c=(0,a.default)(e=u.val()).call(e);if(c&&(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(c)))return i.insertImg(c,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)),u=a.__importDefault(n(366)),c=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){u.default(l.default(n),e,t)})}else n&&n.length>0&&(0,r.default)(n).call(n,function(n){u.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=c},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)),u=l.__importDefault(n(368)),c=/^(\d+)(\w+)$/,d=/^(\d+)%$/;function f(e){var t=e.config.indentation;if("string"==typeof t){if(c.test(t)){var n,i=(0,r.default)(n=(0,a.default)(t).call(t).match(c)).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&&u.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 u(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=u},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)),u=r.__importDefault(n(375)),c=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:u.default,EndJoinListHandle:c.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),u=n(47),c=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,c=[],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;)c.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=u.createElementFragment(c,u.createDocumentFragment(),"p"):(e=u.createElement(i),(0,r.default)(c).call(c,function(t){e.append(t.elems[0])})),m.length&&g.length){for(var v=[];g.length;)v.push(g),g=g.next();var _=u.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?u.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?u.insertBefore(o,e,b.elems[0]):o.parent().elems[0].append(e)}else this.selectionRangeElem.set(e),u.insertBefore(o,e,o.elems[0])}else{var y;(0,r.default)(y=null==o?void 0:o.children()).call(y,function(e){c.push(l.default(e))}),d===n?e=u.createElementFragment(c,u.createDocumentFragment(),"p"):(e=u.createElement(i),(0,r.default)(c).call(c,function(t){e.appendChild(t.elems[0])})),this.selectionRangeElem.set(e),u.insertBefore(o,e,o.elems[0]),o.remove()}},t}(s.ListHandle);t.default=c},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),u=n(47),c=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,c,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(),c=u.createElementFragment(u.filterSelectionNodes(v),u.createDocumentFragment()),_===p)null===(e=g.children())||void 0===e||(0,r.default)(e).call(e,function(e){c.append(e)}),g.remove(),this.selectionRangeElem.set(c),m.elems[0].append(c);else{for(var b=document.createDocumentFragment(),y=document.createDocumentFragment(),x=u.getStartPoint(m);x.length;){var w=x.elems[0];x=x.next(),b.append(w)}for(var A=u.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=u.createElement(h);C.append(b),C.append(c),C.append(y),c=C,this.selectionRangeElem.set(c),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=u.getStartPoint(m);x.length;)v.push(x),x=x.next();for(A=u.getEndPoint(g),k=[];A.length;)k.unshift(A),A=A.prev();v.push.apply(v,k),_===p?(c=u.createElementFragment(v,u.createDocumentFragment(),"p"),this.selectionRangeElem.set(c),u.insertBefore(m,c,g.elems[0])):(c=u.createElement(h),(0,r.default)(v).call(v,function(e){c.append(e.elems[0])}),this.selectionRangeElem.set(c),l.default(c).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=u.getEndPoint(g);A.length;)S.unshift(A),A=A.prev();var E=[];for(x=u.getStartPoint(m);x.length;)E.push(x),x=x.next();if(c=u.createDocumentFragment(),v.shift(),v.pop(),(0,r.default)(E).call(E,function(e){return c.append(e.elems[0])}),c=u.createElementFragment(u.filterSelectionNodes(v),c),(0,r.default)(S).call(S,function(e){return c.append(e.elems[0])}),this.selectionRangeElem.set(c),_===p)m.elems[0].append(c),(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();u.insertBefore(T,c,T.elems[0])}else g.elems[0].append(c)}},t}(s.ListHandle);t.default=c},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),u=n(47),c=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,c=i.selection.getSelectionRangeTopNodes(),d=null==s?void 0:s.getNodeName();c.shift();for(var f=[],p=u.getStartPoint(s);p.length;)f.push(p),p=p.next();d===o?(t=u.createDocumentFragment(),(0,r.default)(f).call(f,function(e){return t.append(e.elems[0])}),t=u.createElementFragment(u.filterSelectionNodes(c),t),this.selectionRangeElem.set(t),s.elems[0].append(t)):(t=u.createElement(a),(0,r.default)(f).call(f,function(e){return t.append(e.elems[0])}),t=u.createElementFragment(u.filterSelectionNodes(c),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=c},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),u=n(47),c=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,c=i.$endElem,d=o.selection.getSelectionRangeTopNodes(),f=null==c?void 0:c.getNodeName();d.pop();for(var p=[],h=u.getEndPoint(c);h.length;)p.unshift(h),h=h.prev();if(f===a)if(n=u.createElementFragment(u.filterSelectionNodes(d),u.createDocumentFragment()),(0,r.default)(p).call(p,function(e){return n.append(e.elems[0])}),this.selectionRangeElem.set(n),null!==(e=c.children())&&void 0!==e&&e.length){var m=c.children();u.insertBefore(m,n,m.elems[0])}else c.elems[0].append(n);else{var g=u.filterSelectionNodes(d);g.push.apply(g,p),n=u.createElementFragment(g,u.createElement(s)),this.selectionRangeElem.set(n),l.default(n).insertBefore(c),(null===(t=c.children())||void 0===t||!t.length)&&c.remove()}},t}(s.ListHandle);t.default=c},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)),u=l.__importDefault(n(3)),c=l.__importDefault(n(379)),d=function(e){function t(t){var n=this,i=u.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 c.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=u.default(t.selection.getSelectionContainerElem());if(n.elems.length){if(n&&t.$textElem.equal(n)){for(var i=!1,o=u.default(t.selection.getSelectionStartElem()).elems[0],r=u.default(t.selection.getSelectionEndElem()).elems[0],a=this.getDom(o),l=this.getDom(r),s=n.elems[0].children,c=0;c<s.length;c++){var d=s[c];if("P"===u.default(d).getNodeName()&&(d===a&&(i=!0),i&&(u.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"===u.default(p).getNodeName()&&(u.default(p).css("line-height",e),t.selection.createRangeByElems(p,p))}},t.prototype.getDom=function(e){var t=u.default(e).elems[0];if(!t.parentNode)return t;function n(e,t){var i=u.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=u.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)),u=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=u},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 u=a.__importDefault(n(391));function c(e){return e>0&&(0,r.default)(e)}function d(e){var t=new u.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 c(r)&&c(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 u(e){var t;function n(n){var i=new l.default(e),u="menus.panelMenus.table.",d=function(t,n){return void 0===n&&(n=u),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(c(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]),u=i.getTableHtml(a.default.ProcessingRow(o.default(s),l).elems[0]);return u=f(t,u),e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("insertHTML",u),!0}},{$elem:o.default("<span>"+d("删除行")+"</span>"),onClick:function(e,t){if(c(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)),u=i.getTableHtml(t.elems[0]),d=a.default.DeleteRow(o.default(u),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(u),l).elems[0])),e.cmd.do("insertHTML",p),!0}},{$elem:o.default("<span>"+d("添加列")+"</span>"),onClick:function(e,t){if(c(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(c(e))return!0;var n=o.default(e.selection.getSelectionStartElem()),r=i.getCurrentColIndex(n.elems[0]),l=i.getTableHtml(t.elems[0]),u=a.default.DeleteCol(o.default(l),r),d=u.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(u.elems[0])),e.cmd.do("insertHTML",p),!0}},{$elem:o.default("<span>"+d("设置表头")+"</span>"),onClick:function(e,t){if(c(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]),u=i.getTableHtml(a.default.setTheHeader(o.default(s),l,"th").elems[0]);return u=f(t,u),e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("insertHTML",u),!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]),u=i.getTableHtml(a.default.setTheHeader(o.default(s),l,"td").elems[0]);return u=f(t,u),e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("insertHTML",u),!0}}];(t=new r.default(e,n,p)).create()}function i(){t&&(t.remove(),t=null)}return{showTableTooltip:n,hideTableTooltip:i}}function c(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=u(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 u=n(2).__importDefault(n(3));function c(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 c=document.createElement("td");l.appendChild(c)}return(0,a.default)(i).call(i,t+1,0,l),m(n,i),u.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"!==u.default(o[0]).getNodeName()?document.createElement("td"):document.createElement("th");(0,a.default)(o).call(o,t+1,0,r);for(var c=0;c<o.length;c++)i[e].appendChild(o[c])},c=0;c<i.length;c++)o(c);return m(n,i),u.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),u.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])},c=0;c<i.length;c++)o(c);return m(n,i),u.default(n.parentNode)}function h(e,t,n){for(var i=g(e),o=(0,r.default)(Array.prototype).apply(i.children),c=o[t].children,d=document.createElement("tr"),f=function(e){var t,i=document.createElement(n),o=c[e];(0,l.default)(t=(0,s.default)(o.childNodes)).call(t,function(e){i.appendChild(e)}),d.appendChild(i)},p=0;p<c.length;p++)f(p);return(0,a.default)(o).call(o,t,1,d),m(i,o),u.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:c,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),u=n(113);e.exports=function(e){var t,n,c,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=u(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;!(c=f.call(d)).done;y++)p=_?r(d,v,[c.value,y],!0):c.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 u=e.selection.getRange();null==u||u.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)),u=n(6),c=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=u.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=u.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=c.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)),u=a.__importDefault(n(139)),c=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;u.default(e)&&p(),(null===(i=e.selection.getSelectionStartElem())||void 0===i?void 0:i.elems[0].innerHTML)&&e.cmd.do("insertHTML",c.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(c.EMPTY_P).insertAfter(a)}function p(){if(u.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">'+(u.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!u.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(),u=null==l?void 0:l.getNextSibling();if(s.length&&"PRE"===(null==s?void 0:s.getNodeName())&&0===u.length&&0===n.getCursorPos()&&8===i.keyCode){var c=r.default(o.EMPTY_P);t.append(c)}}})}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),u=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=u},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)),u=n(98),c=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,c.default(t),n}return a.__extends(t,e),t.prototype.clickHandler=function(){var e=this.editor;u.isAllTodo(e)?(this.cancelTodo(),this.tryChangeActive()):this.setTodo()},t.prototype.tryChangeActive=function(){u.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),u=a.__importDefault(n(140)),c=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()})),c.dealTextNode(g,_),c.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=u.default(l.default(C)),E=S.getInputContainer(),T=E.parent().getNode(),O=S.getTodo(),R=E.getNode().nextSibling;""===(null==f?void 0:f.text())&&(null==f||f.append(l.default("<br>"))),O.insertAfter(a),R&&""!==(null==R?void 0:R.textContent)?o.moveCursor(T):("BR"!==(null==R?void 0:R.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,u=a.getSelectionRangeTopNodes()[0],c=null===(n=u.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(""===u.text()){t.preventDefault();var v=l.default(d.EMPTY_P);return v.insertAfter(u),u.remove(),void a.moveCursor(v.getNode(),0)}"SPAN"===(null==g?void 0:g.nodeName)&&"INPUT"===g.childNodes[0].nodeName&&0===m&&(t.preventDefault(),null==c||(0,r.default)(o=c.childNodes).call(o,function(e,t){0!==t&&p.appendChild(e.cloneNode(!0))}),f.insertAfter(u),u.remove())}}function i(){var t=e.selection.getSelectionRangeTopNodes()[0];t&&c.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 u(e){var t,n,i=e.toolbarSelector,u=o.default(i),c=e.textSelector,d=e.config.height,f=e.i18next,p=o.default("<div></div>"),h=o.default("<div></div>"),m=null;null==c?(n=u.children(),u.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")):(u.append(p),m=o.default(c).children(),o.default(c).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 c(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=u,t.selectorValidator=c},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(),u=l.getNodeName();if("<br>"!==s&&"<br/>"!==s||"P"!==u)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),u(e),c(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 u(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),u=r.elems[0]==t.target;if(l)e.isFocus||f(e),e.isFocus=!0;else{if(s&&!u||!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 c(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",u="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),c=e.config;o.removeClass(l),o.addClass(s),t.addClass(u),t.css("z-index",c.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),c=e.config;o.removeClass(s),o.addClass(l),t.removeClass(u),t.css("z-index","auto"),n.css("height",c.height+"px")};var c=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=c},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)),u=n(6),c=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=c.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=u.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 u(e){switch(e.type){case"attributes":return e.target.getAttribute(e.attributeName)||"";case"characterData":return e.target.textContent;default:return""}}function c(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=u,t.complieNodes=c,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:u(e)||"",oldValue:e.oldValue||"",nodes:c(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 u(e){var t=e.target;null==e.oldValue?t.removeAttribute(e.attr):t.setAttribute(e.attr,e.oldValue)}function c(e){e.target.textContent=e.oldValue}(0,o.default)(t,"__esModule",{value:!0}),t.restore=t.revoke=void 0;var d={node:s,text:c,attr:u};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 u=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=u},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)),u=n(6);function c(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)({},u.deepClone(s.default.globalPluginsFunctionList),u.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=c,t.default=d},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0})}]).default;var tm=Zh(em.exports),nm=1,im=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},om=a({name:"fcEditor",props:{modelValue:String,init:Function,disabled:Boolean,config:Object},inheritAttrs:!1,emits:["update:modelValue"],data:function(){return{editor:{},uni:nm++}},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 tm("#editor".concat(e.uni)),e.editor.config.zIndex=2,e.editor.config.focus=!1,e.editor.config.autoFocus=!1,e.config&&im(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?Kh(Object(n),!0).forEach(function(t){Jh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},this.$attrs);return delete e.id,u("div",S(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 rm=(e,t,n)=>{$l.component(e,n||t),Gl.component(e,t)};$l.component("draggable",Ul),$l.component("DragTool",tf),$l.component("DragBox",Of),$l.component("Validate",Xf),$l.component("Struct",Xc),$l.component("HtmlEditor",lf),$l.component("FetchConfig",pf),$l.component("FnEditor",cs),$l.component("FnInput",cf),$l.component("Required",ep),$l.component("TableOptions",ap),$l.component("TreeOptions",pp),$l.component("TableFormColumn",Ip),$l.component("EventConfig",Os),$l.component("ColorInput",Bp),$l.component("SizeInput",Pp),$l.component("StyleConfig",qh),$l.component("LanguageInput",Gf),$l.component("ConfigItem",bf),$l.component("FieldInput",wf),$l.component("FnConfig",Tf),$l.component("FcRow",nf),$l.component("ValueInput",tp),rm("FcEditor",om),rm("FcTitle",Rp),rm("SignaturePad",Op),rm("TableForm",yp,_p),rm("FcTable",Vf,Lf);Kd.install=function(e){e.component("FcDesigner",Kd)},Kd.makeOptionsRule=mi,Kd.copyTextToClipboard=Mi,Kd.getInjectArg=Oi,Kd.localeOptions=ki,Kd.localeProps=Ci,Kd.makeRequiredRule=pi,Kd.makeTreeOptions=hi,Kd.makeTreeOptionsRule=gi,Kd.toJSON=_i,Kd.formCreate=Gl,Kd.designerForm=$l,Kd.component=rm,Kd.useLocale=Kl,Kd.addMenu=function(e,t){Array.isArray(e)||(e=[e]),t?Wl.unshift(...e):Wl.push(...e)},Kd.addDragRule=function(e,t){Array.isArray(e)||(e=[e]),t?mr.unshift(...e):mr.push(...e)},Kd.t=ql,Kd.utils={copyTextToClipboard:Mi,getInjectArg:Oi,localeOptions:ki,localeProps:Ci,makeOptionsRule:mi,makeRequiredRule:pi,makeTreeOptions:hi,makeTreeOptionsRule:gi,toJSON:_i};(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",Gl.version),Kd.version="3.3.1",typeof window<"u"&&(window.FcDesigner=Kd);const am=Object.assign({name:"FormGenerator"},{__name:"index",setup(e){const t=d(null),n={fieldReadonly:!1};return(e,i)=>(k(),M(O(Kd),{ref_key:"designer",ref:t,config:n,height:"calc(100vh - 160px)"},null,512))}});export{am as default};