/*! * form-create 可视化表单设计器 * @form-create/designer v3.0.1-beta.1 * (c) 2021-2022 xaboy * Github https://github.com/xaboy/form-create-designer * Released under the MIT License. */ (function() { "use strict"; try { if (typeof document != "undefined") { var o = document.createElement("style"); o.appendChild(document.createTextNode( '._fc-designer{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-m .form-create ._fc-l-item{background:#2e73ff;height:10px;overflow:hidden;transition:all .3s ease;width:100%}._fc-l,._fc-m,._fc-r{border-top:1px solid #ececec;box-sizing:border-box}._fc-l-group{padding:0 12px}._fc-l-title{font-size:14px;font-weight:600;margin:18px 0 5px}._fc-l-item{background:#fff;color:#000;cursor:pointer;display:inline-block;height:70px;line-height:1;min-width:70px;text-align:center;transition:all .2s ease;width:33.33%}._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{align-items:center;border:1px solid #ececec;border-top:0;display:flex;height:40px;justify-content:flex-end}._fc-m-tools button.el-button{align-items:center;display:flex;padding:5px 14px}._fc-m-tools .fc-icon{font-size:14px;margin-right:2px}._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 ._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}.drag-box{min-height:60px;width:100%}._fc-m-drag{box-sizing:border-box;overflow:auto;padding:2px}._fc-m-drag,.draggable-drag{background:#fff;height:100%;position:relative}._fc-m-drag>form,._fc-m-drag>form>.el-row{height:100%}.drag-tool{word-wrap:break-word;box-sizing:border-box;min-height:20px;outline:1px dashed #2e73ff;overflow:hidden;padding:2px;position:relative;word-break:break-all}.drag-tool .drag-tool{margin:5px}.drag-tool+.drag-tool{margin-top:5px}.drag-tool.active{outline:2px solid #2e73ff}.drag-tool.active>div>.drag-btn{display:flex}.drag-tool .drag-btn{display:none}.drag-r{bottom:2px;right:2px}.drag-l,.drag-r{position:absolute;z-index:2}.drag-l{left:0;top:0}.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}.drag-btn+.drag-btn{margin-left:2px}.drag-btn-danger{background-color:#ff2e2e}.drag-btn i{font-size:13px}.drag-mask{bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.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}._fc_struct{width:100%}._fc_struct .CodeMirror{height:450px}._fc_struct .CodeMirror-line{font-size:13px!important;line-height:16px!important}.CodeMirror-lint-tooltip{z-index:1!important}._fc_struct .el-dialog__body{padding:0 20px}._fc_err{color:red;float:left;text-align:left;width:65%}._fc_fetch .el-form-item__label{display:inline-block;float:left;padding-right:5px;text-align:right}._fc_fetch{background-color:#bfdaf7;padding:10px}._fc-validate .form-create .el-form-item{margin-bottom:22px!important}._fc-validate .append-msg{cursor:pointer}._fc-validate .el-input-group__append{padding:0 10px}._fc-required{align-items:center;display:flex}._fc-required .el-input{margin-left:15px}._fc-required .el-switch{height:28px}._fc_table_opt[data-v-0238cdc7]{width:100%}@font-face{font-family:fc-icon;src:url(data:font/woff;base64,d09GRgABAAAAABVIAAsAAAAAIgwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY95kmJY21hcAAAAYAAAAEVAAADLrSidCRnbHlmAAACmAAAD74AABiY14gyPGhlYWQAABJYAAAALgAAADYcO5CZaGhlYQAAEogAAAAeAAAAJAfeBAJobXR4AAASqAAAABIAAAB8fGIAAGxvY2EAABK8AAAAQAAAAEBgbGZebWF4cAAAEvwAAAAdAAAAIAEzALZuYW1lAAATHAAAAUUAAAJtPlT+fXBvc3QAABRkAAAA4gAAAULN3M8heJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWacwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeFzyfwtzwv4EhhrmBoQEozAiSAwDydAzseJzt0kdOQ0EQhOH/OZFMTib5BCw4GpYRRgKZHC0yB2HFleoYUONiwSEY6bM0I3U/ubuAJlC3XWtA9UVFOZ9+rcbvdabH7w2ufJ9jkhot9XSggU400sf3N2hffR3qWEM9lvufU7lmgSVWWGPP9w022WKbHbruXXPfJi0m3HfKX5qhzawrKuZdtei6ZVeuunadjpu1+D/t8lMd/d66Zfrh2aJeeMqoH543OghPHh2Gd4AGMe5zHCUROglvCA2jJESnUZKjs/D+0Hl4k+givFN0Gd4uuoqSKF2HN45uovwz3YZTgO7CeUD3UVKph3BG0CicFvQYzg16CicIPYezhF7CqUKv4Xyht3DS0Hs4c+gj6PwAdVJxugAAAHicdTgLkBTlmf/3/9OP7Z7u6d7pnp6Z3ZnZmWZ7WJbdHXdeHggcLN4JaBFQHhE5SFCIRDfokSzxcWpSxGARAaGwSKQOAz7iXa4K75LgA59V1J13VrBMQsRIikqZWPjgEqty5yXd3Pd3z8wuSmp3vu/r7//+R3/vvwkQcuE8+w5TiEsIzIXmMJSLOkh5cGz85WF2i+kicxjmAD2z6EZKb1wULEQMM8vwufnWtfVnF62ndP2iZ2vLLMOCk3T12NhqgNVjM69M/ftVtzpDdeAcCpcNaDMyTxNCGOHgGfoA0UieDOLerV2L4XbCXBjNU0unpWFaa4A7F2peuYrDOtCng59u2cfYvi1wWYj91/OLr118RV/fFRGCs3sq9Xplz/VbKZ2gO+i+LVv2MrZ3y5Z9t+f7+uYsXr54TqHAUfCCd8udt3jsa6s+v5UfRwnPtI3+iThkJplD5pNFZBm5jmwiW8l9eEKuEyvlFPNgm5YoFVErJp7W4aoxW0c3uf7w15+HHFiiWyx5c1CD1aKNf4Lt2m7drRcdt+xKbtMpS81GShLxD6enbEsSB6HuVBvNuVD3ysMwCHZ1lD/h23tlF/4p4TDbgIH+SqXfPzatAlCZ9sYbyATboEsjHLxeGGBwpDuVNoLT3Q6kDfCC0/j72/n5+WAuKZnLzdKSkXzhvXwOQOxKqDpTLLOwslCxRYGCKMSVSlOJC7IoiIrVpH/CRe8zUgwq/cH2aE96NeKZyPePRpvCP6BAbEbuadxuRTKVMZZ3p6av/GPPE0/0vFKpvDKxYsUE5JKmqopUkhU7l1BeWQ4ii4sJgcV2xhjTDI2J6Iyx0Abj9CP0iavIF8hdqHe35NUaoR/WW95pc79soDMMAnLqOFLkxtEBuGi1iDqrc+2VGuhLsyEak/rrtcZoCm0ocqPUvJIomTpf3SmNgFdrNkYLkNLpCK4pWgWcpQNLP6/phvq8ZgIkVf9khHt6AAy1p38EYKSfVkIcXMkFYbncDdAtv6emKLW63isMAwyWgp2VxSNgpGUnlQFBFTQzryjbHSe7oGdIFCElN+W0IW0XRVmDm4y0ilucjXY6q5uQ0XTc5ky021l3OPghX0ndojqqohrIuw2NcfITd3jYfVHTTeVFNZlUg48Fqj+v7MqMpbPZalcPFaWqzIyCvFM0jS5ChI6eE6SA3v5X5JpWDE7xZIaPbS/nCmZuSbRSs2G0Ua95Erp954FxF0Vnx2GnalopZJrM9M+UawC1Mi2FGLjDnDFsjmkJ8ea9qmGoexXTVDrUIcUwlOB9/nibkTLohzh/6jr+N6cswN39PZQyVE3/Nhg2LqQl0HCcQqcMTvClYVYn32wO3zdJhvBd0RPM6P3qJvqMUDSL/RhpeUgAS0DJdqsuegXmoQJtsmo6D5BP+/udQsGhm/39dHOw/1SXbTCZfcAouKokbUT9pmS24hT9sOD4+6MZdLNTaPj7X/8EB5NKLDjPgEnfkG1DZhs/IaG/XwjYNxglKmYdl4ygaVDjqPAw2ZWj5BumxuZf4FPy2Fux2FuPRfDB47HY8QcjOL6X0r3jCIXd46swG25dxeHtNBIWTh9+7K2RjvCDx5ewh8a/8hBjD31ly57LWsIcctXRUH/3M4a6W0ZIP0aMJGLoYJKaBwhQc/Mo5jnUah4KNE/FBGY0UcKjpqpOqtkYQbmGN0K9UoKWdEgVUM/oJ/Mg5dCXTefAAdPRs2rSoMVthirI0zJPXq0OZNS0rBp00ZOZkq6Z23JiMimmbRaLCaIa60/cr6jKyTViWlxzUhaBCQfUafE4HE8sSyvXXKPIoj6UOXKbMZTKFFjuQCojyYKlHsix4tCQddvhzKAB4iwGIAjmf+n3KrYw7QVVfbm/S1WFB7t/HFdj6+QZRAzfexM9F8aJS6pkNplHSLJVBHh+5+HhRIHDMw96k1cWzKrpYLav1nnG57BaBwQm/iR8PEtn9Q0O9vknCoOYIAqKBqApdJaqaar/bvXV7c81luIPCpsffXTz5u3b6TkU8k/wKXRWYXAUhf0TXJjOwqnbghvgyMwdf1iR//YfVhSCY014uvlEs22zzfQYetZ09PimaY02TQeDs4aeLZXQRKLlpAQxB8W6V5JsrG2YOD04eM0oXCNZCWmiSxFU9jVZTsBrGX83jAJk6KEMxChZH/wwk4Fr10sJS9odA8Z2y5akHoPM449nMi9lUPClDG4vtfLM70g36SUeuYwsIMvJF3n8OVyFUzOM0Mo+VRPaldRkKTykx1N8AXj7wQsBz+E89dthGm80q1F+d6XouS3gMmmgkEjA5TP88zMuB8RU988n+dGSz8HnIyJ4+x5RnCPIALLwR1GWxbMRffYv0PS3ec2zfb+1IENcxWX8/8Pl6Hr/ENJURNo/CG8KQoXGhBvEGFuOM3v4KnlR3imLPdFayNklC72CHIJ2Tr6OngpzFO+KLg/zVNvRJvMU1j6MLRDLngCNPFgS15FXYxc99KVyuZR/nEM65h8Pf24+0RVL+O/kE0kwYHGXkewKftxldkkXYJGCCSr4iWJ0yfQXkxNTuap/PEfdXFKxdf+dXDIRx3kUi0jwTBcWcxPz+t8o+KwEzypU7jJDm1/4X3aYpUkO68oCsgR7qLVkI76gWHbRql53Y5rDbZbi6cFDgE+SWK6mmpWaN5c6aNBmo8wlxWiQ8YoyTEVMfui8WLg7hPMZAt7J5NnGe2LrGq9C9wMrFkJ6QfMuA48vCArIfYdif5/TleJIjgmbBitJOm/Rtv9esby5kt7yhezMLPRM721w0Du9ZxfH2ZmZf2zhpS2+CLHU3drDkDza96Ule5TYt8aGqBCz4lklPZBYVE2O2cPVAYOymFu5NX7v3OvzV191frc4DsNWT8/0HsjezXFv7xURmmP19pZ7e/dGqFWnxlt1auDS9meuyXuYuum22p08iO4oq2RdN+sf4pBu8L9LNx680+wx79RMU4Oq1o02EuiHHYn1WXeW/134l+BkKFBBUfwnF9UkEy1YJjU8hc6sPB2dS2s845fDGiSF9QgJTIFYJlNSFHalMFopGbtjbW103R3f4qgycsdYu+Jgkfo5pPuSDIE9wtscM8sB/Sm0xTkaqYzW2vJYrY4Ztm3g72ZT+5ifF0GrV9xMX0CtdWO8zMC8bBbN/uJkaS+bNYc3fXaksGTYAJr8kPUTdMIfp0/JcYC47K9EfEYz4nFD+yBucJ4Rpw/6p6k3gqNHIil6g5Xnm/vHOKRXTdKt2F1BnyJdaDeutct4lUhZUtFr1hrJKlIup4odyu1QEsqhgZF6jd5cLPoPF8FMIHEzYtomft/GHRH6VJiQ9fgFEhJx/WLkwyjCdu+zqdXrNSarV6Qhr/GZ6uU0eb5NWTz3hq0x2tmzphYtOliaWrSCgWeOiUmRyfLrsim8hhktqVDs3WZ0ShxtlgbrF9etH504IYHAZEd5W6LCKcQKSJS2au4O+jJSGupyALPIleiDksMrabJZ5oWVtW5d4b3AbHjMwnYfT4/Z3+7HMXy/1OxWHZk6BueXLFm/3rr66nXrXtyf8wD6e/bnXKBut7pfUfar8MnDvdO8LAIAz1AeVvCfzmvM6veCQ7MQwhlwc76fm4YTKcu5/jOKQiVFmQ9e9hLsyXsl7z0NUsIO4krsoNaSm8lX8Vb5A7RGGDTtyoVW6e/cUTBbcm6K91UW3g0jMXRhQZRat6LwTpMDkXt9lCawIk6h+ztTeaW8NC1hf9K6FIVn4DfXcHt7ihDeSl8FzUbj7dJ0tKAngm5rE9yau0T/yxOKriu78MnWgB4SVU6qExq+m38cjvLBYClnTaFhaFd7knoJ6mQl3O0VvqZeSfOxDYqGHqfQ4xP8CA9Fuw2I0ZwJfjrw1/JZym7OOTL1iAd0S8f/dXzY1u6M0PqLmKde7eGyIx2QfhW3xiUocBNGfvll+ptWjHvYrV/Oo2m0HeWT8d7h9Q+HFrNE9hniR3Sv6/q3utBtXIKi0zFN11z3dxE6FyF6vA6QTWj+WeAE3na0iPEcengJ/4OPPk20zv3P9J0w/m8gt5C7yXf4bW8ub6jCaxs6UKoZlpJU+7NFXQj5xXo1unijF+Bj635XLdpRvmgvINnFetHmA5zX8KZ4EnefeqssTPKESX/mTBt+DU8mbDsRrE7Y1OqVBZjgjVGwA3ul7wW/TNjBe45hAVjGF7mYE5dxMUxQ08NJv0xYELwLaTtkUCt4Uxb+h89HENyLrRL2F7P582y6Z3KEDuMKG/gCGxLW7Zx5OQf7LMPZx0e6bbt7A195oRTHzXFrDpxfOOGUuBW80pkDfovAXT7ucAmRO/W8gJHfJGNkKVlDvoSxT8BFrUaa431LDj71HUmwedczB4otXEVBwOov8EtWGP/1MIrtkC5PoWsNoRO49amhjnWaVTaEBTf4WXfWXJkuAhTTdANi1uf/FhsAGDKz3Rv9nXTcf4jeFphV1QDo4fDfOMhyIP5rmzSCn1V5oCCpP1HlMcdHmE5/kuZlMR1BKDn+ydZWlWyhYemmqVsR3LjR/w84uFHXeiChZeEinNUPmjZGOl4/Wvii+3IOK36D9ybhh8PwRpzU6TCtzaWjeYpFDaZ2JMlWwuS6CK/M7e5i8cjX7//639VG1yNaWwM2Gvxmsis5tJe/AYIkm3pt9vcO1yCcEU4cm38HPG4q73LZdxUzOIO6RTWSsKe/8Ge2lcWITfpJncwJv7OUvUHA2xe/EEZh1DTxfshtFH2NCCMiGX3eaj875SZaEu/Nn+bTY0sTzo60/rnnroNiBv4TFb0yyMhCXpRCsBt9P8cvHzmMg90ztfRCR585ayqT7rrRBOPGIf/nmWIxQweH/I9EGQVggksEO6Y8fK/JtdK8SKD1feCCz+5j/I278A1NTAdmGbsxdp9/GM43/cN0j3/LOPXGkVobyf+ZPYJ6sXjf1s+/BDS4Wkz8lSTsbEVHcMPg8Moct9ONB58wmd2F1hCWgbxAhmWCwKiNhL8lfAZLp7/HoP0VY48IMQG2dnUFO5XYV0F+6il+7TqdsKzEabl15l+zR1kf+tL0T/kRt0VYE8v1qYXW4RWRkqPnBOHc0aPvx2IfKEl9WzLXDRN6skN1s77W8PtHj54LbtKT26LR3jbR6snupS+F3336oq/LU3rqzkmQ4MeoNSg5jN769qOH3hZib31//iqAVfMXrKR01V8XBwcXDA7Sl+Q3Nt30piy/edOmNx6m1y9cuAZgzcKF1y+FoYVD+E/4t/4j7FfsBjI79EGecurV0QZ2eCXs9LBdsl1MRYnw62cqzDiYkpDktkEr1KtoBSRr7NRBUb+wWhaFe2Jq7B5BklcFmvSIIDwiaciWkB1vsUETD8bggbbMwVjs4KVlYgdFDYJV0QD5fyJtOt8AAHicY2BkYGAAYu+uxoJ4fpuvDNwsDCBwp0/ND0H/X8LCwBwD5HIwMIFEAQ3oCUMAAHicY2BkYGBu+N/AEMOSxAAELAwMjAyoQB4AULcC6gAAeJxjYWBgYKEFTiKsBgAs4gDfAAAAAAAAADwAhgFIAfwCdALAAxQDkAPuBDAExgUqBcgGCgZeBqQG8gdKB7IIlgjyCbAKWAqwCyQLPAt+C7wL9gxMeJxjYGRgYJBnWMXAxQACTEDMBWb/B/MZAB0PAeoAAAB4nGWPTU7DMBCFX/oHpBKqqGCH5AViASj9EatuWFRq911036ZOmyqJI8et1ANwHo7ACTgC3IA78EgnmzaWx9+8eWNPANzgBx6O3y33kT1cMjtyDRe4F65TfxBukF+Em2jjVbhF/U3YxzOmwm10YXmD17hi9oR3YQ8dfAjXcI1P4Tr1L+EG+Vu4iTv8CrfQ8erCPuZeV7iNRy/2x1YvnF6p5UHFockikzm/gple75KFrdLqnGtbxCZTg6BfSVOdaVvdU+zXQ+ciFVmTqgmrOkmMyq3Z6tAFG+fyUa8XiR6EJuVYY/62xgKOcQWFJQ6MMUIYZIjK6Og7VWb0r7FDwl57Vj3N53RbFNT/c4UBAvTPXFO6stJ5Ok+BPV8bUnV0K27LnpQ0kV7NSRKyQl7WtlRC6gE2ZVeOEXpc0Yk/KGdI/wAJWm7IAAAAeJxtT9lywyAQQ6kxjnvfd5Mf2I/CsJ0wxYbB2Gn/vjB9rV72kLSaFRvxh178jx02OEEDiRYKHbbocYoznOMCl7jCNW5wizvc4wGPeMIzXvCKN7zjAzvsRU/aWjIH562i+eiyOTSU9aBoWHIOU0tuikveFgmbryF8t5S0dUGWklnRtIwDJ0VL9EHbItOz0ZZTS3PUhlsywYck61Ruac8pN5TCsSPrVmerdWbPpiTkpKf5s27Yuhwq46tCFoZZki2BpXdjibXFUycT4o8iN8ZQ75ZXOoqJV8dHSWNYWYhfJs5MYQAA) 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-add-child:before{content:"\\e789"}.icon-switch:before{content:"\\e77c"}.icon-tab:before{content:"\\e77b"}.icon-button:before{content:"\\e77e"}.icon-input:before{content:"\\e77f"}.icon-checkbox:before{content:"\\e780"}.icon-radio:before{content:"\\e781"}.icon-rate:before{content:"\\e782"}.icon-number:before{content:"\\e783"}.icon-upload:before{content:"\\e784"}.icon-cascader:before{content:"\\e785"}.icon-space:before{content:"\\e786"}.icon-color:before{content:"\\e787"}.icon-span:before{content:"\\e788"}.icon-alert:before{content:"\\e78a"}.icon-row:before{content:"\\e78b"}.icon-divider:before{content:"\\e78d"}.icon-select:before{content:"\\e78e"}.icon-transfer:before{content:"\\e78f"}.icon-editor:before{content:"\\e790"}.icon-slider:before{content:"\\e791"}.icon-tree:before{content:"\\e792"}.icon-date:before{content:"\\e793"}.icon-time:before{content:"\\e794"}.icon-delete:before{content:"\\e770"}.icon-copy:before{content:"\\e771"}.icon-import:before{content:"\\e773"}.icon-add:before{content:"\\e774"}.icon-preview:before{content:"\\e776"}.icon-move:before{content:"\\e777"}' )), document.head.appendChild(o) } } catch (e) { console.error("vite-plugin-css-injected-by-js", e) } })(); (function(A, C) { typeof exports == "object" && typeof module < "u" ? C(exports, require("vue"), require( "@form-create/element-ui")) : typeof define == "function" && define.amd ? define(["exports", "vue", "@form-create/element-ui" ], C) : (A = typeof globalThis < "u" ? globalThis : A || self, C(A.FcDesigner = {}, A.Vue, A.formCreate)) })(this, function(exports, vue, formCreate) { "use strict"; const _interopDefaultLegacy = A => A && typeof A == "object" && "default" in A ? A : { default: A }, formCreate__default = _interopDefaultLegacy(formCreate); function form() { return [{ type: "radio", field: "labelPosition", value: "left", title: "\u6807\u7B7E\u4F4D\u7F6E", options: [{ value: "right", label: "right" }, { value: "left", label: "left" }, { value: "top", label: "top" }] }, { type: "radio", field: "size", value: "small", title: "\u8868\u5355\u5C3A\u5BF8", options: [{ value: "large", label: "large" }, { value: "default", label: "default" }, { value: "small", label: "small" }] }, { type: "input", field: "labelWidth", value: "125px", title: "\u6807\u7B7E\u5BBD\u5EA6" }, { type: "switch", field: "hideRequiredAsterisk", value: !1, title: "\u9690\u85CF\u5FC5\u586B\u5B57\u6BB5\u7684\u6807\u7B7E\u65C1\u8FB9\u7684\u7EA2\u8272\u661F\u53F7" }, { type: "switch", field: "showMessage", value: !0, title: "\u663E\u793A\u6821\u9A8C\u9519\u8BEF\u4FE1\u606F" }, { type: "switch", field: "inlineMessage", value: !1, title: "\u4EE5\u884C\u5185\u5F62\u5F0F\u5C55\u793A\u6821\u9A8C\u4FE1\u606F" }, { type: "switch", field: "formCreateSubmitBtn", value: !0, title: "\u662F\u5426\u663E\u793A\u8868\u5355\u63D0\u4EA4\u6309\u94AE" }, { type: "switch", field: "formCreateResetBtn", value: !1, title: "\u662F\u5426\u663E\u793A\u8868\u5355\u91CD\u7F6E\u6309\u94AE" }] } const _export_sfc = (A, C) => { const l = A.__vccOpts || A; for (const [o, t] of C) l[o] = t; return l }, _sfc_main$8 = vue.defineComponent({ name: "IconRefresh" }), _hoisted_1$6 = { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", "data-v-029747aa": "" }, _hoisted_2$4 = vue.createElementVNode("path", { fill: "currentColor", d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z" }, null, -1), _hoisted_3$4 = [_hoisted_2$4]; function _sfc_render$7(A, C, l, o, t, s) { return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$6, _hoisted_3$4) } const IconRefresh = _export_sfc(_sfc_main$8, [ ["render", _sfc_render$7] ]); function field() { return [{ type: "input", field: "field", value: "", title: "\u5B57\u6BB5 ID" }, { type: "input", field: "title", value: "", title: "\u5B57\u6BB5\u540D\u79F0" }, { type: "input", field: "info", value: "", title: "\u63D0\u793A\u4FE1\u606F" }, { type: "Struct", field: "_control", value: [], title: "\u8054\u52A8\u6570\u636E", props: { defaultValue: [], validate(A) { return Array.isArray(A) ? A.length ? !A.some(({ rule: C }) => !Array.isArray(C)) : !0 : !1 } } }, { type: "col", props: { span: 24 }, children: [{ type: "el-button", props: { type: "primary", size: "small" }, inject: !0, on: { click({ $f: A }) { const C = A.activeRule; C && (C.__fc__.updateKey(), C.value = void 0, C.__fc__.$api.sync(C)) } }, native: !0, children: [{ type: "i", class: "fc-icon icon-delete" }, "\u6E05\u7A7A\u503C"] }, { type: "el-button", props: { type: "success", size: "small", icon: vue.markRaw(IconRefresh) }, inject: !0, on: { click({ $f: A }) { const C = A.activeRule; C && (C.__fc__.updateKey(!0), C.__fc__.$api.sync(C)) } }, native: !0, children: ["\u5237\u65B0"] }] }] } function validate() { return [{ type: "validate", field: "validate", value: [] }] } function $set(A, C, l) { A[C] = l } const is = { type(A, C) { return Object.prototype.toString.call(A) === "[object " + C + "]" }, Undef(A) { return A == null }, Element(A) { return typeof A == "object" && A !== null && A.nodeType === 1 && !is.Object(A) }, trueArray(A) { return Array.isArray(A) && A.length > 0 }, Function(A) { const C = this.getType(A); return C === "Function" || C === "AsyncFunction" }, getType(A) { const C = Object.prototype.toString.call(A); return /^\[object (.*)\]$/.exec(C)[1] }, empty(A) { return A == null || Array.isArray(A) && Array.isArray(A) && !A.length ? !0 : typeof A == "string" && !A } }; ["Date", "Object", "String", "Boolean", "Array", "Number"].forEach(A => { is[A] = function(C) { return is.type(C, A) } }); function hasProperty(A, C) { return {}.hasOwnProperty.call(A, C) } function deepExtend(A, C = {}, l) { let o = !1; for (let t in C) if (Object.prototype.hasOwnProperty.call(C, t)) { let s = C[t]; if ((o = Array.isArray(s)) || is.Object(s)) { let d = A[t] === void 0; if (o) o = !1, d && $set(A, t, []); else if (s._clone && l !== void 0) if (l) s = s.getRule(), d && $set(A, t, {}); else { $set(A, t, s._clone()); continue } else d && $set(A, t, {}); A[t] = deepExtend(A[t], s, l) } else $set(A, t, s), is.Undef(s) || (is.Undef(s.__json) || (A[t].__json = s.__json), is.Undef(s .__origin) || (A[t].__origin = s.__origin)) } return l !== void 0 && Array.isArray(A) ? A.filter(t => !t || !t.__ctrl) : A } function deepCopy(A) { return deepExtend({}, { value: A }).value } function lower(A) { return A.replace(A[0], A[0].toLowerCase()) } let id = 0; function uniqueId() { return "F" + Math.random().toString(36).substr(3, 3) + Number(`${Date.now()}${++id}`).toString(36) } function format(A, C, l) { return `[form-create ${A}]: ${C}` + (l ? ` rule: ` + JSON.stringify(l.getRule ? l.getRule() : l) : "") } function err(A, C) { console.error(format("err", A, C)) } const PREFIX = "[[FORM-CREATE-PREFIX-", SUFFIX = "-FORM-CREATE-SUFFIX]]", $T = "$FN:", $TX = "$FNX:", FUNCTION = "function"; function makeFn(fn) { return eval("(" + FUNCTION + "(){return " + fn + " })()") } function parseFn(A, C) { if (A && is.String(A) && A.length > 4) { let l = A.trim(), o = !1; try { if (l.indexOf(SUFFIX) > 0 && l.indexOf(PREFIX) === 0) l = l.replace(SUFFIX, "").replace(PREFIX, ""), o = !0; else if (l.indexOf($T) === 0) l = l.replace($T, ""), o = !0; else { if (l.indexOf($TX) === 0) return l = makeFn("function($inject){" + l.replace($TX, "") + "}"), l .__json = A, l.__inject = !0, l; !C && l.indexOf(FUNCTION) === 0 && l !== FUNCTION && (o = !0) } if (!o) return A; const t = makeFn(l.indexOf(FUNCTION) === -1 && l.indexOf("(") !== 0 ? FUNCTION + " " + l : l); return t.__json = A, t } catch (t) { err(`\u89E3\u6790\u5931\u8D25:${l} err: ${t}`); return } } return A } function makeRequiredRule() { return { type: "Required", field: "formCreate$required", title: "\u662F\u5426\u5FC5\u586B" } } function makeOptionsRule(A, C) { const l = [{ label: "JSON\u6570\u636E", value: 0 }, { label: "\u63A5\u53E3\u6570\u636E", value: 1 }], o = [{ value: 0, rule: [{ type: "Struct", field: "formCreate" + upper(A).replace(".", ">"), props: { defaultValue: [] } }] }, { value: 1, rule: [{ type: "Fetch", field: "formCreateEffect>fetch", props: { to: A } }] }]; return C !== !1 && (l.splice(0, 0, { label: "\u9759\u6001\u6570\u636E", value: 2 }), o.push({ value: 2, rule: [{ type: "TableOptions", field: "formCreate" + upper(A).replace(".", ">"), props: { defaultValue: [] } }] })), { type: "radio", title: "\u9009\u9879\u6570\u636E", field: "_optionType", value: C !== !1 ? 2 : 0, options: l, props: { type: "button" }, control: o } } function upper(A) { return A.replace(A[0], A[0].toLocaleUpperCase()) } const toJSON = function(A) { const C = /object ([a-zA-Z]*)/.exec(Object.prototype.toString.call(A)); return C && _toJSON[C[1].toLowerCase()] ? _toJSON[C[1].toLowerCase()](A) : A }, _toJSON = { object: function(A) { var C = []; for (var l in A) !hasProperty(A, l) || C.push(toJSON(l) + ": " + (A[l] != null ? toJSON(A[l]) : "null")); return `{ ` + C.join(`, `) + ` }` }, array: function(A) { for (var C = 0, l = []; C < A.length; C++) l[C] = A[C] != null ? toJSON(A[C]) : "null"; return "[" + l.join(", ") + "]" }, string: function(A) { for (var C = A.split(""), l = 0; l < C.length; l++) { var o = C[l]; o >= " " ? o === "\\" ? C[l] = "\\\\" : o === '"' && (C[l] = '\\"') : C[l] = o === ` ` ? "\\n" : o === "\r" ? "\\r" : o === " " ? "\\t" : o === "\b" ? "\\b" : o === "\f" ? "\\f" : (o = o.charCodeAt(), "\\u00" + (o > 15 ? 1 : 0) + o % 16) } return '"' + C.join("") + '"' } }, deepParseFn = function(A) { for (let C in A) if (Object.prototype.hasOwnProperty.call(A, C)) { let l = A[C]; (Array.isArray(l) || is.Object(l)) && deepParseFn(l), is.String(l) && (A[C] = parseFn(l)) } return A }, label$n = "\u5355\u9009\u6846", name$o = "radio", radio = { icon: "icon-radio", label: label$n, name: name$o, rule() { return { type: name$o, field: uniqueId(), title: label$n, info: "", effect: { fetch: "" }, props: {}, options: [{ value: "1", label: "\u9009\u98791" }, { value: "2", label: "\u9009\u98792" }] } }, props() { return [makeRequiredRule(), makeOptionsRule("options"), { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528" }, { type: "switch", field: "type", title: "\u6309\u94AE\u5F62\u5F0F", props: { activeValue: "button", inactiveValue: "default" } }, { type: "input", field: "textColor", title: "\u6309\u94AE\u5F62\u5F0F\u7684 Radio \u6FC0\u6D3B\u65F6\u7684\u6587\u672C\u989C\u8272" }, { type: "input", field: "fill", title: "\u6309\u94AE\u5F62\u5F0F\u7684 Radio \u6FC0\u6D3B\u65F6\u7684\u586B\u5145\u8272\u548C\u8FB9\u6846\u8272" }] } }, label$m = "\u591A\u9009\u6846", name$n = "checkbox", checkbox = { icon: "icon-checkbox", label: label$m, name: name$n, rule() { return { type: name$n, field: uniqueId(), title: label$m, info: "", effect: { fetch: "" }, props: {}, options: [{ value: "1", label: "\u9009\u98791" }, { value: "2", label: "\u9009\u98792" }] } }, props() { return [makeRequiredRule(), makeOptionsRule("options"), { type: "switch", field: "type", title: "\u6309\u94AE\u7C7B\u578B", props: { activeValue: "button", inactiveValue: "default" } }, { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528" }, { type: "inputNumber", field: "min", title: "\u53EF\u88AB\u52FE\u9009\u7684 checkbox \u7684\u6700\u5C0F\u6570\u91CF" }, { type: "inputNumber", field: "max", title: "\u53EF\u88AB\u52FE\u9009\u7684 checkbox \u7684\u6700\u5927\u6570\u91CF" }, { type: "input", field: "textColor", title: "\u6309\u94AE\u5F62\u5F0F\u7684 Checkbox \u6FC0\u6D3B\u65F6\u7684\u6587\u672C\u989C\u8272" }, { type: "input", field: "fill", title: "\u6309\u94AE\u5F62\u5F0F\u7684 Checkbox \u6FC0\u6D3B\u65F6\u7684\u586B\u5145\u8272\u548C\u8FB9\u6846\u8272" }] } }, label$l = "\u8F93\u5165\u6846", name$m = "input", input = { icon: "icon-input", label: label$l, name: name$m, rule() { return { type: name$m, field: uniqueId(), title: label$l, info: "", props: {} } }, props() { return [makeRequiredRule(), { type: "select", field: "type", title: "\u7C7B\u578B", options: [{ label: "text", value: "text" }, { label: "textarea", value: "textarea" }, { label: "number", value: "number" }, { label: "password", value: "password" }] }, { type: "inputNumber", field: "maxlength", title: "\u6700\u5927\u8F93\u5165\u957F\u5EA6" }, { type: "inputNumber", field: "minlength", title: "\u6700\u5C0F\u8F93\u5165\u957F\u5EA6" }, { type: "switch", field: "showWordLimit", title: "\u662F\u5426\u663E\u793A\u8F93\u5165\u5B57\u6570\u7EDF\u8BA1" }, { type: "input", field: "placeholder", title: "\u8F93\u5165\u6846\u5360\u4F4D\u6587\u672C" }, { type: "switch", field: "clearable", title: "\u662F\u5426\u53EF\u6E05\u7A7A" }, { type: "switch", field: "showPassword", title: "\u662F\u5426\u663E\u793A\u5207\u6362\u5BC6\u7801\u56FE\u6807" }, { type: "switch", field: "disabled", title: "\u7981\u7528" }, { type: "input", field: "prefixIcon", title: "\u8F93\u5165\u6846\u5934\u90E8\u56FE\u6807" }, { type: "input", field: "suffixIcon", title: "\u8F93\u5165\u6846\u5C3E\u90E8\u56FE\u6807" }, { type: "inputNumber", field: "rows", info: '\u53EA\u5BF9 type="textarea" \u6709\u6548', title: "\u8F93\u5165\u6846\u884C\u6570" }, { type: "select", field: "autocomplete", title: "\u81EA\u52A8\u8865\u5168", options: [{ label: "on", value: "on" }, { label: "off", value: "off" }] }, { type: "switch", field: "readonly", title: "\u662F\u5426\u53EA\u8BFB" }, { type: "select", field: "resize", title: "\u63A7\u5236\u662F\u5426\u80FD\u88AB\u7528\u6237\u7F29\u653E", options: [{ label: "none", value: "none" }, { label: "both", value: "both" }, { label: "horizontal", value: "horizontal" }, { label: "vertical", value: "vertical" }] }, { type: "switch", field: "autofocus", title: "\u81EA\u52A8\u83B7\u53D6\u7126\u70B9" }] } }, label$k = "\u8BA1\u6570\u5668", name$l = "inputNumber", number = { icon: "icon-number", label: label$k, name: name$l, rule() { return { type: name$l, field: uniqueId(), title: label$k, info: "", props: {} } }, props() { return [makeRequiredRule(), { type: "inputNumber", field: "min", title: "\u8BBE\u7F6E\u8BA1\u6570\u5668\u5141\u8BB8\u7684\u6700\u5C0F\u503C" }, { type: "inputNumber", field: "max", title: "\u8BBE\u7F6E\u8BA1\u6570\u5668\u5141\u8BB8\u7684\u6700\u5927\u503C" }, { type: "inputNumber", field: "step", title: "\u8BA1\u6570\u5668\u6B65\u957F" }, { type: "switch", field: "stepStrictly", title: "\u662F\u5426\u53EA\u80FD\u8F93\u5165 step \u7684\u500D\u6570" }, { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528\u8BA1\u6570\u5668" }, { type: "switch", field: "controls", title: "\u662F\u5426\u4F7F\u7528\u63A7\u5236\u6309\u94AE", value: !0 }, { type: "select", field: "controlsPosition", title: "\u63A7\u5236\u6309\u94AE\u4F4D\u7F6E", options: [{ label: "default", value: "" }, { label: "right", value: "right" }] }, { type: "input", field: "placeholder", title: "\u8F93\u5165\u6846\u9ED8\u8BA4 placeholder" }] } }, label$j = "\u9009\u62E9\u5668", name$k = "select", select = { icon: "icon-select", label: label$j, name: name$k, rule() { return { type: name$k, field: uniqueId(), title: label$j, info: "", effect: { fetch: "" }, props: {}, options: [{ value: "1", label: "\u9009\u98791" }, { value: "2", label: "\u9009\u98792" }] } }, props() { return [makeRequiredRule(), makeOptionsRule("options"), { type: "switch", field: "multiple", title: "\u662F\u5426\u591A\u9009" }, { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528" }, { type: "switch", field: "clearable", title: "\u662F\u5426\u53EF\u4EE5\u6E05\u7A7A\u9009\u9879" }, { type: "switch", field: "collapseTags", title: "\u591A\u9009\u65F6\u662F\u5426\u5C06\u9009\u4E2D\u503C\u6309\u6587\u5B57\u7684\u5F62\u5F0F\u5C55\u793A" }, { type: "inputNumber", field: "multipleLimit", title: "\u591A\u9009\u65F6\u7528\u6237\u6700\u591A\u53EF\u4EE5\u9009\u62E9\u7684\u9879\u76EE\u6570\uFF0C\u4E3A 0 \u5219\u4E0D\u9650\u5236" }, { type: "input", field: "autocomplete", title: "autocomplete \u5C5E\u6027" }, { type: "input", field: "placeholder", title: "\u5360\u4F4D\u7B26" }, { type: "switch", field: "filterable", title: "\u662F\u5426\u53EF\u641C\u7D22" }, { type: "switch", field: "allowCreate", title: "\u662F\u5426\u5141\u8BB8\u7528\u6237\u521B\u5EFA\u65B0\u6761\u76EE" }, { type: "input", field: "noMatchText", title: "\u641C\u7D22\u6761\u4EF6\u65E0\u5339\u914D\u65F6\u663E\u793A\u7684\u6587\u5B57" }, { type: "input", field: "noDataText", title: "\u9009\u9879\u4E3A\u7A7A\u65F6\u663E\u793A\u7684\u6587\u5B57" }, { type: "switch", field: "reserveKeyword", title: "\u591A\u9009\u4E14\u53EF\u641C\u7D22\u65F6\uFF0C\u662F\u5426\u5728\u9009\u4E2D\u4E00\u4E2A\u9009\u9879\u540E\u4FDD\u7559\u5F53\u524D\u7684\u641C\u7D22\u5173\u952E\u8BCD" }, { type: "switch", field: "defaultFirstOption", title: "\u5728\u8F93\u5165\u6846\u6309\u4E0B\u56DE\u8F66\uFF0C\u9009\u62E9\u7B2C\u4E00\u4E2A\u5339\u914D\u9879" }, { type: "switch", field: "popperAppendToBody", title: "\u662F\u5426\u5C06\u5F39\u51FA\u6846\u63D2\u5165\u81F3 body \u5143\u7D20", value: !0 }, { type: "switch", field: "automaticDropdown", title: "\u5BF9\u4E8E\u4E0D\u53EF\u641C\u7D22\u7684 Select\uFF0C\u662F\u5426\u5728\u8F93\u5165\u6846\u83B7\u5F97\u7126\u70B9\u540E\u81EA\u52A8\u5F39\u51FA\u9009\u9879\u83DC\u5355" }] } }, label$i = "\u5F00\u5173", name$j = "switch", _switch = { icon: "icon-switch", label: label$i, name: name$j, rule() { return { type: name$j, field: uniqueId(), title: label$i, info: "", props: {} } }, props() { return [makeRequiredRule(), { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528" }, { type: "inputNumber", field: "width", title: "\u5BBD\u5EA6\uFF08px\uFF09" }, { type: "input", field: "activeText", title: "switch \u6253\u5F00\u65F6\u7684\u6587\u5B57\u63CF\u8FF0" }, { type: "input", field: "inactiveText", title: "switch \u5173\u95ED\u65F6\u7684\u6587\u5B57\u63CF\u8FF0" }, { type: "input", field: "activeValue", title: "switch \u6253\u5F00\u65F6\u7684\u503C" }, { type: "input", field: "inactiveValue", title: "switch \u5173\u95ED\u65F6\u7684\u503C" }, { type: "input", field: "activeColor", title: "switch \u6253\u5F00\u65F6\u7684\u80CC\u666F\u8272" }, { type: "input", field: "inactiveColor", title: "switch \u5173\u95ED\u65F6\u7684\u80CC\u666F\u8272" }] } }, label$h = "\u6ED1\u5757", name$i = "slider", slider = { icon: "icon-slider", label: label$h, name: name$i, rule() { return { type: name$i, field: uniqueId(), title: label$h, info: "", props: {} } }, props() { return [makeRequiredRule(), { type: "inputNumber", field: "min", title: "\u6700\u5C0F\u503C" }, { type: "inputNumber", field: "max", title: "\u6700\u5927\u503C" }, { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528" }, { type: "inputNumber", field: "step", title: "\u6B65\u957F" }, { type: "switch", field: "showInput", title: "\u662F\u5426\u663E\u793A\u8F93\u5165\u6846\uFF0C\u4EC5\u5728\u975E\u8303\u56F4\u9009\u62E9\u65F6\u6709\u6548" }, { type: "switch", field: "showInputControls", title: "\u5728\u663E\u793A\u8F93\u5165\u6846\u7684\u60C5\u51B5\u4E0B\uFF0C\u662F\u5426\u663E\u793A\u8F93\u5165\u6846\u7684\u63A7\u5236\u6309\u94AE", value: !0 }, { type: "switch", field: "showStops", title: "\u662F\u5426\u663E\u793A\u95F4\u65AD\u70B9" }, { type: "switch", field: "range", title: "\u662F\u5426\u4E3A\u8303\u56F4\u9009\u62E9" }, { type: "switch", field: "vertical", title: "\u662F\u5426\u7AD6\u5411\u6A21\u5F0F" }, { type: "input", field: "height", title: "Slider \u9AD8\u5EA6\uFF0C\u7AD6\u5411\u6A21\u5F0F\u65F6\u5FC5\u586B" }] } }, label$g = "\u65F6\u95F4\u9009\u62E9\u5668", name$h = "timePicker", time = { icon: "icon-time", label: label$g, name: name$h, rule() { return { type: name$h, field: uniqueId(), title: label$g, info: "", props: {} } }, props() { return [makeRequiredRule(), { type: "Struct", field: "pickerOptions", title: "\u5F53\u524D\u65F6\u95F4\u65E5\u671F\u9009\u62E9\u5668\u7279\u6709\u7684\u9009\u9879", props: { defaultValue: {} } }, { type: "switch", field: "readonly", title: "\u5B8C\u5168\u53EA\u8BFB" }, { type: "switch", field: "disabled", title: "\u7981\u7528" }, { type: "switch", field: "editable", title: "\u6587\u672C\u6846\u53EF\u8F93\u5165", value: !0 }, { type: "switch", field: "clearable", title: "\u662F\u5426\u663E\u793A\u6E05\u9664\u6309\u94AE", value: !0 }, { type: "input", field: "placeholder", title: "\u975E\u8303\u56F4\u9009\u62E9\u65F6\u7684\u5360\u4F4D\u5185\u5BB9" }, { type: "input", field: "startPlaceholder", title: "\u8303\u56F4\u9009\u62E9\u65F6\u5F00\u59CB\u65E5\u671F\u7684\u5360\u4F4D\u5185\u5BB9" }, { type: "input", field: "endPlaceholder", title: "\u8303\u56F4\u9009\u62E9\u65F6\u5F00\u59CB\u65E5\u671F\u7684\u5360\u4F4D\u5185\u5BB9" }, { type: "switch", field: "isRange", title: "\u662F\u5426\u4E3A\u65F6\u95F4\u8303\u56F4\u9009\u62E9" }, { type: "switch", field: "arrowControl", title: "\u662F\u5426\u4F7F\u7528\u7BAD\u5934\u8FDB\u884C\u65F6\u95F4\u9009\u62E9" }, { type: "select", field: "align", title: "\u5BF9\u9F50\u65B9\u5F0F", options: [{ label: "left", value: "left" }, { label: "center", value: "center" }, { label: "right", value: "right" }] }, { type: "input", field: "prefixIcon", title: "\u81EA\u5B9A\u4E49\u5934\u90E8\u56FE\u6807\u7684\u7C7B\u540D" }, { type: "input", field: "clearIcon", title: "\u81EA\u5B9A\u4E49\u6E05\u7A7A\u56FE\u6807\u7684\u7C7B\u540D" }] } }, label$f = "\u65E5\u671F\u9009\u62E9\u5668", name$g = "datePicker", date = { icon: "icon-date", label: label$f, name: name$g, rule() { return { type: name$g, field: uniqueId(), title: label$f, info: "", props: {} } }, props() { return [makeRequiredRule(), { type: "Struct", field: "pickerOptions", title: "\u5F53\u524D\u65F6\u95F4\u65E5\u671F\u9009\u62E9\u5668\u7279\u6709\u7684\u9009\u9879", props: { defaultValue: {} } }, { type: "switch", field: "readonly", title: "\u5B8C\u5168\u53EA\u8BFB" }, { type: "switch", field: "disabled", title: "\u7981\u7528" }, { type: "select", field: "type", title: "\u663E\u793A\u7C7B\u578B", options: [{ 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: "editable", title: "\u6587\u672C\u6846\u53EF\u8F93\u5165", value: !0 }, { type: "switch", field: "clearable", title: "\u662F\u5426\u663E\u793A\u6E05\u9664\u6309\u94AE", value: !0 }, { type: "input", field: "placeholder", title: "\u975E\u8303\u56F4\u9009\u62E9\u65F6\u7684\u5360\u4F4D\u5185\u5BB9" }, { type: "input", field: "startPlaceholder", title: "\u8303\u56F4\u9009\u62E9\u65F6\u5F00\u59CB\u65E5\u671F\u7684\u5360\u4F4D\u5185\u5BB9" }, { type: "input", field: "endPlaceholder", title: "\u8303\u56F4\u9009\u62E9\u65F6\u7ED3\u675F\u65E5\u671F\u7684\u5360\u4F4D\u5185\u5BB9" }, { type: "input", field: "format", title: "\u663E\u793A\u5728\u8F93\u5165\u6846\u4E2D\u7684\u683C\u5F0F" }, { type: "select", field: "align", title: "\u5BF9\u9F50\u65B9\u5F0F", options: [{ label: "left", value: "left" }, { label: "center", value: "center" }, { label: "right", value: "right" }, { label: "left", value: "left" }] }, { type: "input", field: "rangeSeparator", title: "\u9009\u62E9\u8303\u56F4\u65F6\u7684\u5206\u9694\u7B26" }, { type: "switch", field: "unlinkPanels", title: "\u5728\u8303\u56F4\u9009\u62E9\u5668\u91CC\u53D6\u6D88\u4E24\u4E2A\u65E5\u671F\u9762\u677F\u4E4B\u95F4\u7684\u8054\u52A8" }, { type: "input", field: "prefixIcon", title: "\u81EA\u5B9A\u4E49\u5934\u90E8\u56FE\u6807\u7684\u7C7B\u540D" }, { type: "input", field: "clearIcon", title: "\u81EA\u5B9A\u4E49\u6E05\u7A7A\u56FE\u6807\u7684\u7C7B\u540D" }] } }, label$e = "\u8BC4\u5206", name$f = "rate", rate = { icon: "icon-rate", label: label$e, name: name$f, rule() { return { type: name$f, field: uniqueId(), title: label$e, info: "", props: {} } }, props() { return [makeRequiredRule(), { type: "inputNumber", field: "max", title: "\u6700\u5927\u5206\u503C" }, { type: "switch", field: "disabled", title: "\u662F\u5426\u4E3A\u53EA\u8BFB" }, { type: "switch", field: "allowHalf", title: "\u662F\u5426\u5141\u8BB8\u534A\u9009" }, { type: "input", field: "voidColor", title: "\u672A\u9009\u4E2D icon \u7684\u989C\u8272" }, { type: "input", field: "disabledVoidColor", title: "\u53EA\u8BFB\u65F6\u672A\u9009\u4E2D icon \u7684\u989C\u8272" }, { type: "input", field: "voidIconClass", title: "\u672A\u9009\u4E2D icon \u7684\u7C7B\u540D" }, { type: "input", field: "disabledVoidIconClass", title: "\u53EA\u8BFB\u65F6\u672A\u9009\u4E2D icon \u7684\u7C7B\u540D" }, { type: "switch", field: "showScore", title: "\u662F\u5426\u663E\u793A\u5F53\u524D\u5206\u6570\uFF0Cshow-score \u548C show-text \u4E0D\u80FD\u540C\u65F6\u4E3A\u771F" }, { type: "input", field: "textColor", title: "\u8F85\u52A9\u6587\u5B57\u7684\u989C\u8272" }, { type: "input", field: "scoreTemplate", title: "\u5206\u6570\u663E\u793A\u6A21\u677F" }] } }, label$d = "\u989C\u8272\u9009\u62E9\u5668", name$e = "colorPicker", color = { icon: "icon-color", label: label$d, name: name$e, rule() { return { type: name$e, field: uniqueId(), title: label$d, info: "", props: {} } }, props() { return [makeRequiredRule(), { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528" }, { type: "switch", field: "showAlpha", title: "\u662F\u5426\u652F\u6301\u900F\u660E\u5EA6\u9009\u62E9" }, { type: "select", field: "colorFormat", title: "\u989C\u8272\u7684\u683C\u5F0F", options: [{ label: "hsl", value: "hsl" }, { label: "hsv", value: "hsv" }, { label: "hex", value: "hex" }, { label: "rgb", value: "rgb" }] }] } }, label$c = "\u6805\u683C\u5E03\u5C40", name$d = "row", row = { icon: "icon-row", label: label$c, name: name$d, mask: !1, rule() { return { type: "FcRow", props: {}, children: [] } }, children: "col", props() { return [{ type: "inputNumber", field: "gutter", title: "\u6805\u683C\u95F4\u9694" }, { type: "switch", field: "type", title: "flex\u5E03\u5C40\u6A21\u5F0F", props: { activeValue: "flex", inactiveValue: "default" } }, { type: "select", field: "justify", title: "flex \u5E03\u5C40\u4E0B\u7684\u6C34\u5E73\u6392\u5217\u65B9\u5F0F", 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", title: "flex \u5E03\u5C40\u4E0B\u7684\u5782\u76F4\u6392\u5217\u65B9\u5F0F", options: [{ label: "top", value: "top" }, { label: "middle", value: "middle" }, { label: "bottom", value: "bottom" }] }] } }, name$c = "col", col = { name: name$c, drag: !0, dragBtn: !1, inside: !0, mask: !1, rule() { return { type: name$c, props: { span: 12 }, children: [] } }, props() { return [{ type: "slider", field: "span", title: "\u6805\u683C\u5360\u636E\u7684\u5217\u6570", value: 12, props: { min: 0, max: 24 } }, { type: "slider", field: "offset", title: "\u6805\u683C\u5DE6\u4FA7\u7684\u95F4\u9694\u683C\u6570", props: { min: 0, max: 24 } }, { type: "slider", field: "push", title: "\u6805\u683C\u5411\u53F3\u79FB\u52A8\u683C\u6570", props: { min: 0, max: 24 } }, { type: "slider", field: "pull", title: "\u6805\u683C\u5411\u5DE6\u79FB\u52A8\u683C\u6570", props: { min: 0, max: 24 } }] } }, label$b = "\u6807\u7B7E\u9875", name$b = "tab-pane", tabPane = { label: label$b, name: name$b, inside: !0, drag: !0, dragBtn: !1, mask: !1, rule() { return { type: "el-tab-pane", props: { label: "\u65B0\u6807\u7B7E\u9875" }, children: [] } }, props() { return [{ type: "input", field: "label", title: "\u9009\u9879\u5361\u6807\u9898" }, { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528" }, { type: "input", field: "name", title: "\u4E0E\u9009\u9879\u5361\u7ED1\u5B9A\u503C value \u5BF9\u5E94\u7684\u6807\u8BC6\u7B26\uFF0C\u8868\u793A\u9009\u9879\u5361\u522B\u540D" }, { type: "switch", field: "lazy", title: "\u6807\u7B7E\u662F\u5426\u5EF6\u8FDF\u6E32\u67D3" }] } }, label$a = "\u5206\u5272\u7EBF", name$a = "el-divider", divider = { icon: "icon-divider", label: label$a, name: name$a, rule() { return { type: name$a, props: {}, wrap: { show: !1 }, native: !1, children: [""] } }, props() { return [{ type: "select", field: "direction", title: "\u8BBE\u7F6E\u5206\u5272\u7EBF\u65B9\u5411", options: [{ label: "horizontal", value: "horizontal" }, { label: "vertical", value: "vertical" }] }, { type: "input", field: "formCreateChild", title: "\u8BBE\u7F6E\u5206\u5272\u7EBF\u6587\u6848" }, { type: "select", field: "contentPosition", title: "\u8BBE\u7F6E\u5206\u5272\u7EBF\u6587\u6848\u7684\u4F4D\u7F6E", options: [{ label: "left", value: "left" }, { label: "right", value: "right" }, { label: "center", value: "center" }] }] } }, label$9 = "\u7EA7\u8054\u9009\u62E9\u5668", name$9 = "cascader", cascader = { icon: "icon-cascader", label: label$9, name: name$9, rule() { return { type: name$9, field: uniqueId(), title: label$9, info: "", effect: { fetch: "" }, props: { options: [{ value: "zhinan", label: "\u6307\u5357", children: [{ value: "shejiyuanze", label: "\u8BBE\u8BA1\u539F\u5219", children: [{ value: "yizhi", label: "\u4E00\u81F4" }, { value: "fankui", label: "\u53CD\u9988" }, { value: "xiaolv", label: "\u6548\u7387" }, { value: "kekong", label: "\u53EF\u63A7" }] }, { value: "daohang", label: "\u5BFC\u822A", children: [{ value: "cexiangdaohang", label: "\u4FA7\u5411\u5BFC\u822A" }, { value: "dingbudaohang", label: "\u9876\u90E8\u5BFC\u822A" }] }] }, { value: "zujian", label: "\u7EC4\u4EF6", children: [{ value: "basic", label: "Basic", children: [{ value: "layout", label: "Layout \u5E03\u5C40" }, { value: "color", label: "Color \u8272\u5F69" }, { value: "typography", label: "Typography \u5B57\u4F53" }, { value: "icon", label: "Icon \u56FE\u6807" }, { value: "button", label: "Button \u6309\u94AE" }] }, { value: "form", label: "Form", children: [{ value: "radio", label: "Radio \u5355\u9009\u6846" }, { value: "checkbox", label: "Checkbox \u591A\u9009\u6846" }, { value: "input", label: "Input \u8F93\u5165\u6846" }, { value: "input-number", label: "InputNumber \u8BA1\u6570\u5668" }, { value: "select", label: "Select \u9009\u62E9\u5668" }, { value: "cascader", label: "Cascader \u7EA7\u8054\u9009\u62E9\u5668" }, { value: "switch", label: "Switch \u5F00\u5173" }, { value: "slider", label: "Slider \u6ED1\u5757" }, { value: "time-picker", label: "TimePicker \u65F6\u95F4\u9009\u62E9\u5668" }, { value: "date-picker", label: "DatePicker \u65E5\u671F\u9009\u62E9\u5668" }, { value: "datetime-picker", label: "DateTimePicker \u65E5\u671F\u65F6\u95F4\u9009\u62E9\u5668" }, { value: "upload", label: "Upload \u4E0A\u4F20" }, { value: "rate", label: "Rate \u8BC4\u5206" }, { value: "form", label: "Form \u8868\u5355" }] }] }] } } }, props() { return [makeRequiredRule(), makeOptionsRule("props.options", !1), { type: "Object", field: "props", title: "\u914D\u7F6E\u9009\u9879", props: { rule: [{ type: "select", field: "expandTrigger", title: "\u6B21\u7EA7\u83DC\u5355\u7684\u5C55\u5F00\u65B9\u5F0F", options: [{ label: "click", value: "click" }, { label: "hover", value: "hover" }] }, { type: "switch", field: "multiple", title: "\u662F\u5426\u591A\u9009" }, { type: "switch", field: "checkStrictly", title: "\u662F\u5426\u4E25\u683C\u7684\u9075\u5B88\u7236\u5B50\u8282\u70B9\u4E0D\u4E92\u76F8\u5173\u8054" }, { type: "switch", field: "emitPath", title: "\u5728\u9009\u4E2D\u8282\u70B9\u6539\u53D8\u65F6\uFF0C\u662F\u5426\u8FD4\u56DE\u7531\u8BE5\u8282\u70B9\u6240\u5728\u7684\u5404\u7EA7\u83DC\u5355\u7684\u503C\u6240\u7EC4\u6210\u7684\u6570\u7EC4\uFF0C\u82E5\u8BBE\u7F6E false\uFF0C\u5219\u53EA\u8FD4\u56DE\u8BE5\u8282\u70B9\u7684\u503C", value: !0 }, { type: "input", field: "value", title: "\u6307\u5B9A\u9009\u9879\u7684\u503C\u4E3A\u9009\u9879\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027\u503C" }, { type: "input", field: "label", title: "\u6307\u5B9A\u9009\u9879\u6807\u7B7E\u4E3A\u9009\u9879\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027\u503C" }, { type: "input", field: "children", title: "\u6307\u5B9A\u9009\u9879\u7684\u5B50\u9009\u9879\u4E3A\u9009\u9879\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027\u503C" }, { type: "input", field: "disabled", title: "\u6307\u5B9A\u9009\u9879\u7684\u7981\u7528\u4E3A\u9009\u9879\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027\u503C" }, { type: "input", field: "leaf", title: "\u6307\u5B9A\u9009\u9879\u7684\u53F6\u5B50\u8282\u70B9\u7684\u6807\u5FD7\u4F4D\u4E3A\u9009\u9879\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027\u503C" }] } }, { type: "select", field: "size", title: "\u5C3A\u5BF8", options: [{ label: "large", value: "large" }, { label: "default", value: "default" }, { label: "small", value: "small" }] }, { type: "input", field: "placeholder", title: "\u8F93\u5165\u6846\u5360\u4F4D\u6587\u672C" }, { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528" }, { type: "switch", field: "clearable", title: "\u662F\u5426\u652F\u6301\u6E05\u7A7A\u9009\u9879" }, { type: "switch", field: "showAllLevels", title: "\u8F93\u5165\u6846\u4E2D\u662F\u5426\u663E\u793A\u9009\u4E2D\u503C\u7684\u5B8C\u6574\u8DEF\u5F84", value: !0 }, { type: "switch", field: "collapseTags", title: "\u591A\u9009\u6A21\u5F0F\u4E0B\u662F\u5426\u6298\u53E0Tag" }, { type: "input", field: "separator", title: "\u9009\u9879\u5206\u9694\u7B26" }] } }, label$8 = "\u4E0A\u4F20", name$8 = "upload", upload = { icon: "icon-upload", label: label$8, name: name$8, rule() { return { type: name$8, field: uniqueId(), title: label$8, info: "", props: { action: "", onSuccess(A, C) { C.url = A.data.url } } } }, props() { return [makeRequiredRule(), { type: "select", field: "uploadType", title: "\u4E0A\u4F20\u7C7B\u578B", value: "image", options: [{ label: "\u56FE\u7247", value: "image" }, { label: "\u6587\u4EF6", value: "file" }] }, { type: "input", field: "action", title: "\u4E0A\u4F20\u7684\u5730\u5740(\u5FC5\u586B)" }, { type: "Struct", field: "headers", title: "\u8BBE\u7F6E\u4E0A\u4F20\u7684\u8BF7\u6C42\u5934\u90E8", props: { defaultValue: {} } }, { type: "switch", field: "multiple", title: "\u662F\u5426\u652F\u6301\u591A\u9009\u6587\u4EF6" }, { type: "Struct", field: "data", title: "\u4E0A\u4F20\u65F6\u9644\u5E26\u7684\u989D\u5916\u53C2\u6570", props: { defaultValue: {} } }, { type: "input", field: "name", title: "\u4E0A\u4F20\u7684\u6587\u4EF6\u5B57\u6BB5\u540D" }, { type: "switch", field: "withCredentials", title: "\u652F\u6301\u53D1\u9001 cookie \u51ED\u8BC1\u4FE1\u606F" }, { type: "input", field: "accept", title: "\u63A5\u53D7\u4E0A\u4F20\u7684\u6587\u4EF6\u7C7B\u578B\uFF08thumbnail-mode \u6A21\u5F0F\u4E0B\u6B64\u53C2\u6570\u65E0\u6548\uFF09" }, { type: "switch", field: "autoUpload", title: "\u662F\u5426\u5728\u9009\u53D6\u6587\u4EF6\u540E\u7ACB\u5373\u8FDB\u884C\u4E0A\u4F20", value: !0 }, { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528" }, { type: "inputNumber", field: "limit", title: "\u6700\u5927\u5141\u8BB8\u4E0A\u4F20\u4E2A\u6570" }] } }, label$7 = "\u7A7F\u68AD\u6846", name$7 = "el-transfer", generateData = A => { const C = []; for (let l = 1; l <= 15; l++) C.push({ key: l, label: `\u5907\u9009\u9879 ${l}`, disabled: l % 4 === 0 }); return C }, transfer = { icon: "icon-transfer", label: label$7, name: name$7, rule() { return { type: name$7, field: uniqueId(), title: label$7, info: "", props: { data: generateData() } } }, props() { return [{ type: "Struct", field: "data", title: "Transfer \u7684\u6570\u636E\u6E90", props: { defaultValue: [] } }, { type: "switch", field: "filterable", title: "\u662F\u5426\u53EF\u641C\u7D22" }, { type: "input", field: "filterPlaceholder", title: "\u641C\u7D22\u6846\u5360\u4F4D\u7B26" }, { type: "select", field: "targetOrder", title: "\u53F3\u4FA7\u5217\u8868\u5143\u7D20\u7684\u6392\u5E8F\u7B56\u7565", info: "\u82E5\u4E3A original\uFF0C\u5219\u4FDD\u6301\u4E0E\u6570\u636E\u6E90\u76F8\u540C\u7684\u987A\u5E8F\uFF1B\u82E5\u4E3A push\uFF0C\u5219\u65B0\u52A0\u5165\u7684\u5143\u7D20\u6392\u5728\u6700\u540E\uFF1B\u82E5\u4E3A unshift\uFF0C\u5219\u65B0\u52A0\u5165\u7684\u5143\u7D20\u6392\u5728\u6700\u524D", options: [{ label: "original", value: "original" }, { label: "push", value: "push" }, { label: "unshift", value: "unshift" }] }, { type: "Struct", field: "titles", title: "\u81EA\u5B9A\u4E49\u5217\u8868\u6807\u9898", props: { defaultValue: [] } }, { type: "Struct", field: "buttonTexts", title: "\u81EA\u5B9A\u4E49\u6309\u94AE\u6587\u6848", props: { defaultValue: [] } }, { type: "Struct", field: "format", title: "\u5217\u8868\u9876\u90E8\u52FE\u9009\u72B6\u6001\u6587\u6848", props: { defaultValue: {} } }, { type: "Struct", field: "props", title: "\u6570\u636E\u6E90\u7684\u5B57\u6BB5\u522B\u540D", props: { defaultValue: {} } }, { type: "Struct", field: "leftDefaultChecked", title: "\u521D\u59CB\u72B6\u6001\u4E0B\u5DE6\u4FA7\u5217\u8868\u7684\u5DF2\u52FE\u9009\u9879\u7684 key \u6570\u7EC4", props: { defaultValue: [] } }, { type: "Struct", field: "rightDefaultChecked", title: "\u521D\u59CB\u72B6\u6001\u4E0B\u53F3\u4FA7\u5217\u8868\u7684\u5DF2\u52FE\u9009\u9879\u7684 key \u6570\u7EC4", props: { defaultValue: [] } }] } }, label$6 = "\u6811\u5F62\u63A7\u4EF6", name$6 = "tree", tree = { icon: "icon-tree", label: label$6, name: name$6, rule() { return { type: name$6, field: uniqueId(), title: label$6, info: "", effect: { fetch: "" }, props: { props: { label: "label" }, showCheckbox: !0, nodeKey: "id", data: [{ id: 1, label: "\u4E00\u7EA7 1", children: [{ id: 4, label: "\u4E8C\u7EA7 1-1", children: [{ id: 9, label: "\u4E09\u7EA7 1-1-1" }, { id: 10, label: "\u4E09\u7EA7 1-1-2" }] }] }, { id: 2, label: "\u4E00\u7EA7 2", children: [{ id: 5, label: "\u4E8C\u7EA7 2-1" }, { id: 6, label: "\u4E8C\u7EA7 2-2" }] }, { id: 3, label: "\u4E00\u7EA7 3", children: [{ id: 7, label: "\u4E8C\u7EA7 3-1" }, { id: 8, label: "\u4E8C\u7EA7 3-2" }] }] } } }, props() { return [makeRequiredRule(), makeOptionsRule("props.data", !1), { type: "input", field: "emptyText", title: "\u5185\u5BB9\u4E3A\u7A7A\u7684\u65F6\u5019\u5C55\u793A\u7684\u6587\u672C" }, { type: "Struct", field: "props", title: "\u914D\u7F6E\u9009\u9879\uFF0C\u5177\u4F53\u770B\u4E0B\u8868", props: { defaultValue: {} } }, { type: "switch", field: "renderAfterExpand", title: "\u662F\u5426\u5728\u7B2C\u4E00\u6B21\u5C55\u5F00\u67D0\u4E2A\u6811\u8282\u70B9\u540E\u624D\u6E32\u67D3\u5176\u5B50\u8282\u70B9", value: !0 }, { type: "switch", field: "defaultExpandAll", title: "\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\u6240\u6709\u8282\u70B9" }, { type: "switch", field: "expandOnClickNode", title: "\u662F\u5426\u5728\u70B9\u51FB\u8282\u70B9\u7684\u65F6\u5019\u5C55\u5F00\u6216\u8005\u6536\u7F29\u8282\u70B9\uFF0C \u9ED8\u8BA4\u503C\u4E3A true\uFF0C\u5982\u679C\u4E3A false\uFF0C\u5219\u53EA\u6709\u70B9\u7BAD\u5934\u56FE\u6807\u7684\u65F6\u5019\u624D\u4F1A\u5C55\u5F00\u6216\u8005\u6536\u7F29\u8282\u70B9\u3002", value: !0 }, { type: "switch", field: "checkOnClickNode", title: "\u662F\u5426\u5728\u70B9\u51FB\u8282\u70B9\u7684\u65F6\u5019\u9009\u4E2D\u8282\u70B9\uFF0C\u9ED8\u8BA4\u503C\u4E3A false\uFF0C\u5373\u53EA\u6709\u5728\u70B9\u51FB\u590D\u9009\u6846\u65F6\u624D\u4F1A\u9009\u4E2D\u8282\u70B9\u3002" }, { type: "switch", field: "autoExpandParent", title: "\u5C55\u5F00\u5B50\u8282\u70B9\u7684\u65F6\u5019\u662F\u5426\u81EA\u52A8\u5C55\u5F00\u7236\u8282\u70B9", value: !0 }, { type: "switch", field: "checkStrictly", title: "\u5728\u663E\u793A\u590D\u9009\u6846\u7684\u60C5\u51B5\u4E0B\uFF0C\u662F\u5426\u4E25\u683C\u7684\u9075\u5FAA\u7236\u5B50\u4E0D\u4E92\u76F8\u5173\u8054\u7684\u505A\u6CD5\uFF0C\u9ED8\u8BA4\u4E3A false" }, { type: "switch", field: "accordion", title: "\u662F\u5426\u6BCF\u6B21\u53EA\u6253\u5F00\u4E00\u4E2A\u540C\u7EA7\u6811\u8282\u70B9\u5C55\u5F00" }, { type: "inputNumber", field: "indent", title: "\u76F8\u90BB\u7EA7\u8282\u70B9\u95F4\u7684\u6C34\u5E73\u7F29\u8FDB\uFF0C\u5355\u4F4D\u4E3A\u50CF\u7D20" }, { type: "input", field: "iconClass", title: "\u81EA\u5B9A\u4E49\u6811\u8282\u70B9\u7684\u56FE\u6807" }, { type: "input", field: "nodeKey", title: "\u6BCF\u4E2A\u6811\u8282\u70B9\u7528\u6765\u4F5C\u4E3A\u552F\u4E00\u6807\u8BC6\u7684\u5C5E\u6027\uFF0C\u6574\u68F5\u6811\u5E94\u8BE5\u662F\u552F\u4E00\u7684" }] } }, label$5 = "\u63D0\u793A", name$5 = "el-alert", alert = { icon: "icon-alert", label: label$5, name: name$5, rule() { return { type: name$5, props: { title: "\u63D0\u793A", description: "form-create", type: "success", effect: "dark" }, children: [] } }, props() { return [{ type: "input", field: "title", title: "\u6807\u9898" }, { type: "select", field: "type", title: "\u4E3B\u9898", options: [{ label: "success", value: "success" }, { label: "warning", value: "warning" }, { label: "info", value: "info" }, { label: "error", value: "error" }] }, { type: "input", field: "description", title: "\u8F85\u52A9\u6027\u6587\u5B57" }, { type: "switch", field: "closable", title: "\u662F\u5426\u53EF\u5173\u95ED", value: !0 }, { type: "switch", field: "center", title: "\u6587\u5B57\u662F\u5426\u5C45\u4E2D", value: !0 }, { type: "input", field: "closeText", title: "\u5173\u95ED\u6309\u94AE\u81EA\u5B9A\u4E49\u6587\u672C" }, { type: "switch", field: "showIcon", title: "\u662F\u5426\u663E\u793A\u56FE\u6807" }, { type: "select", field: "effect", title: "\u9009\u62E9\u63D0\u4F9B\u7684\u4E3B\u9898", options: [{ label: "light", value: "light" }, { label: "dark", value: "dark" }] }] } }, label$4 = "\u6587\u5B57", name$4 = "span", span = { icon: "icon-span", label: label$4, name: name$4, rule() { return { type: name$4, title: "\u6587\u5B57", native: !1, children: ["\u8FD9\u662F\u4E00\u6BB5\u6587\u5B57"] } }, props() { return [{ type: "input", field: "formCreateTitle", title: "title" }, { type: "input", field: "formCreateChild", title: "\u5185\u5BB9", props: { type: "textarea" } }] } }, label$3 = "\u95F4\u8DDD", name$3 = "div", space = { icon: "icon-space", label: label$3, name: name$3, rule() { return { type: name$3, wrap: { show: !1 }, native: !1, style: { width: "100%", height: "20px" }, children: [] } }, props() { return [{ type: "object", field: "formCreateStyle", native: !0, props: { rule: [{ type: "input", field: "height", title: "height" }] } }] } }, label$2 = "\u6807\u7B7E\u9875", name$2 = "tab", tab = { icon: "icon-tab", label: label$2, name: name$2, children: "tab-pane", mask: !1, rule() { return { type: "el-tabs", style: "width:100%;", children: [] } }, props() { return [{ type: "select", field: "type", title: "\u98CE\u683C\u7C7B\u578B", options: [{ label: "card", value: "card" }, { label: "border-card", value: "border-card" }] }, { type: "switch", field: "closable", title: "\u6807\u7B7E\u662F\u5426\u53EF\u5173\u95ED" }, { type: "select", field: "tabPosition", title: "\u9009\u9879\u5361\u6240\u5728\u4F4D\u7F6E", options: [{ label: "top", value: "top" }, { label: "right", value: "right" }, { label: "left", value: "left" }] }, { type: "switch", field: "stretch", title: "\u6807\u7B7E\u7684\u5BBD\u5EA6\u662F\u5426\u81EA\u6491\u5F00" }] } }, label$1 = "\u6309\u94AE", name$1 = "el-button", button = { icon: "icon-button", label: label$1, name: name$1, mask: !1, rule() { return { type: name$1, props: {}, children: ["\u6309\u94AE"] } }, props() { return [{ type: "input", field: "formCreateChild", title: "\u5185\u5BB9" }, { type: "select", field: "size", title: "\u5C3A\u5BF8", options: [{ label: "large", value: "large" }, { label: "default", value: "default" }, { label: "small", value: "small" }] }, { type: "select", field: "type", title: "\u7C7B\u578B", 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", title: "\u662F\u5426\u6734\u7D20\u6309\u94AE" }, { type: "switch", field: "round", title: "\u662F\u5426\u5706\u89D2\u6309\u94AE" }, { type: "switch", field: "circle", title: "\u662F\u5426\u5706\u5F62\u6309\u94AE" }, { type: "switch", field: "loading", title: "\u662F\u5426\u52A0\u8F7D\u4E2D\u72B6\u6001" }, { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528\u72B6\u6001" }, { type: "input", field: "icon", title: "\u56FE\u6807\u7C7B\u540D" }] } }, label = "\u5BCC\u6587\u672C\u6846", name = "fc-editor", editor = { icon: "icon-editor", label, name, rule() { return { type: name, field: uniqueId(), title: label, info: "", props: {} } }, props() { return [makeRequiredRule(), { type: "switch", field: "disabled", title: "\u662F\u5426\u7981\u7528" }] } }, ruleList = { [radio.name]: radio, [checkbox.name]: checkbox, [input.name]: input, [number.name]: number, [select.name]: select, [_switch.name]: _switch, [slider.name]: slider, [time.name]: time, [date.name]: date, [rate.name]: rate, [color.name]: color, [row.name]: row, [col.name]: col, [tab.name]: tab, [tabPane.name]: tabPane, [divider.name]: divider, [cascader.name]: cascader, [upload.name]: upload, [transfer.name]: transfer, [tree.name]: tree, [alert.name]: alert, [span.name]: span, [space.name]: space, [button.name]: button, [editor.name]: editor }; /**! * Sortable 1.14.0 * @author RubaXa * @author owenm * @license MIT */ function ownKeys$1(A, C) { var l = Object.keys(A); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(A); C && (o = o.filter(function(t) { return Object.getOwnPropertyDescriptor(A, t).enumerable })), l.push.apply(l, o) } return l } function _objectSpread2$1(A) { for (var C = 1; C < arguments.length; C++) { var l = arguments[C] != null ? arguments[C] : {}; C % 2 ? ownKeys$1(Object(l), !0).forEach(function(o) { _defineProperty$1(A, o, l[o]) }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(A, Object.getOwnPropertyDescriptors( l)) : ownKeys$1(Object(l)).forEach(function(o) { Object.defineProperty(A, o, Object.getOwnPropertyDescriptor(l, o)) }) } return A } function _typeof$1(A) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? _typeof$1 = function(C) { return typeof C } : _typeof$1 = function(C) { return C && typeof Symbol == "function" && C.constructor === Symbol && C !== Symbol.prototype ? "symbol" : typeof C }, _typeof$1(A) } function _defineProperty$1(A, C, l) { return C in A ? Object.defineProperty(A, C, { value: l, enumerable: !0, configurable: !0, writable: !0 }) : A[C] = l, A } function _extends$1() { return _extends$1 = Object.assign || function(A) { for (var C = 1; C < arguments.length; C++) { var l = arguments[C]; for (var o in l) Object.prototype.hasOwnProperty.call(l, o) && (A[o] = l[o]) } return A }, _extends$1.apply(this, arguments) } function _objectWithoutPropertiesLoose(A, C) { if (A == null) return {}; var l = {}, o = Object.keys(A), t, s; for (s = 0; s < o.length; s++) t = o[s], !(C.indexOf(t) >= 0) && (l[t] = A[t]); return l } function _objectWithoutProperties(A, C) { if (A == null) return {}; var l = _objectWithoutPropertiesLoose(A, C), o, t; if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(A); for (t = 0; t < s.length; t++) o = s[t], !(C.indexOf(o) >= 0) && (!Object.prototype.propertyIsEnumerable .call(A, o) || (l[o] = A[o])) } return l } var version = "1.14.0"; function userAgent(A) { if (typeof window < "u" && window.navigator) return !!navigator.userAgent.match(A) } var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Edge = userAgent(/Edge/i), FireFox = userAgent(/firefox/i), Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i), IOS = userAgent(/iP(ad|od|hone)/i), ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i), captureMode = { capture: !1, passive: !1 }; function on(A, C, l) { A.addEventListener(C, l, !IE11OrLess && captureMode) } function off(A, C, l) { A.removeEventListener(C, l, !IE11OrLess && captureMode) } function matches(A, C) { if (!!C) { if (C[0] === ">" && (C = C.substring(1)), A) try { if (A.matches) return A.matches(C); if (A.msMatchesSelector) return A.msMatchesSelector(C); if (A.webkitMatchesSelector) return A.webkitMatchesSelector(C) } catch { return !1 } return !1 } } function getParentOrHost(A) { return A.host && A !== document && A.host.nodeType ? A.host : A.parentNode } function closest(A, C, l, o) { if (A) { l = l || document; do { if (C != null && (C[0] === ">" ? A.parentNode === l && matches(A, C) : matches(A, C)) || o && A === l) return A; if (A === l) break } while (A = getParentOrHost(A)) } return null } var R_SPACE = /\s+/g; function toggleClass(A, C, l) { if (A && C) if (A.classList) A.classList[l ? "add" : "remove"](C); else { var o = (" " + A.className + " ").replace(R_SPACE, " ").replace(" " + C + " ", " "); A.className = (o + (l ? " " + C : "")).replace(R_SPACE, " ") } } function css(A, C, l) { var o = A && A.style; if (o) { if (l === void 0) return document.defaultView && document.defaultView.getComputedStyle ? l = document .defaultView.getComputedStyle(A, "") : A.currentStyle && (l = A.currentStyle), C === void 0 ? l : l[C]; !(C in o) && C.indexOf("webkit") === -1 && (C = "-webkit-" + C), o[C] = l + (typeof l == "string" ? "" : "px") } } function matrix(A, C) { var l = ""; if (typeof A == "string") l = A; else do { var o = css(A, "transform"); o && o !== "none" && (l = o + " " + l) } while (!C && (A = A.parentNode)); var t = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix; return t && new t(l) } function find(A, C, l) { if (A) { var o = A.getElementsByTagName(C), t = 0, s = o.length; if (l) for (; t < s; t++) l(o[t], t); return o } return [] } function getWindowScrollingElement() { var A = document.scrollingElement; return A || document.documentElement } function getRect(A, C, l, o, t) { if (!(!A.getBoundingClientRect && A !== window)) { var s, d, u, f, c, m, p; if (A !== window && A.parentNode && A !== getWindowScrollingElement() ? (s = A.getBoundingClientRect(), d = s.top, u = s.left, f = s.bottom, c = s.right, m = s.height, p = s.width) : (d = 0, u = 0, f = window.innerHeight, c = window.innerWidth, m = window.innerHeight, p = window.innerWidth), ( C || l) && A !== window && (t = t || A.parentNode, !IE11OrLess)) do if (t && t.getBoundingClientRect && (css(t, "transform") !== "none" || l && css(t, "position") !== "static")) { var b = t.getBoundingClientRect(); d -= b.top + parseInt(css(t, "border-top-width")), u -= b.left + parseInt(css(t, "border-left-width")), f = d + s.height, c = u + s.width; break } while (t = t.parentNode); if (o && A !== window) { var x = matrix(t || A), g = x && x.a, y = x && x.d; x && (d /= y, u /= g, p /= g, m /= y, f = d + m, c = u + p) } return { top: d, left: u, bottom: f, right: c, width: p, height: m } } } function isScrolledPast(A, C, l) { for (var o = getParentAutoScrollElement(A, !0), t = getRect(A)[C]; o;) { var s = getRect(o)[l], d = void 0; if (l === "top" || l === "left" ? d = t >= s : d = t <= s, !d) return o; if (o === getWindowScrollingElement()) break; o = getParentAutoScrollElement(o, !1) } return !1 } function getChild(A, C, l, o) { for (var t = 0, s = 0, d = A.children; s < d.length;) { if (d[s].style.display !== "none" && d[s] !== Sortable.ghost && (o || d[s] !== Sortable.dragged) && closest(d[s], l.draggable, A, !1)) { if (t === C) return d[s]; t++ } s++ } return null } function lastChild(A, C) { for (var l = A.lastElementChild; l && (l === Sortable.ghost || css(l, "display") === "none" || C && ! matches(l, C));) l = l.previousElementSibling; return l || null } function index$1(A, C) { var l = 0; if (!A || !A.parentNode) return -1; for (; A = A.previousElementSibling;) A.nodeName.toUpperCase() !== "TEMPLATE" && A !== Sortable.clone && (! C || matches(A, C)) && l++; return l } function getRelativeScrollOffset(A) { var C = 0, l = 0, o = getWindowScrollingElement(); if (A) do { var t = matrix(A), s = t.a, d = t.d; C += A.scrollLeft * s, l += A.scrollTop * d } while (A !== o && (A = A.parentNode)); return [C, l] } function indexOfObject(A, C) { for (var l in A) if (!!A.hasOwnProperty(l)) { for (var o in C) if (C.hasOwnProperty(o) && C[o] === A[l][o]) return Number(l) } return -1 } function getParentAutoScrollElement(A, C) { if (!A || !A.getBoundingClientRect) return getWindowScrollingElement(); var l = A, o = !1; do if (l.clientWidth < l.scrollWidth || l.clientHeight < l.scrollHeight) { var t = css(l); if (l.clientWidth < l.scrollWidth && (t.overflowX == "auto" || t.overflowX == "scroll") || l .clientHeight < l.scrollHeight && (t.overflowY == "auto" || t.overflowY == "scroll")) { if (!l.getBoundingClientRect || l === document.body) return getWindowScrollingElement(); if (o || C) return l; o = !0 } } while (l = l.parentNode); return getWindowScrollingElement() } function extend(A, C) { if (A && C) for (var l in C) C.hasOwnProperty(l) && (A[l] = C[l]); return A } function isRectEqual(A, C) { return Math.round(A.top) === Math.round(C.top) && Math.round(A.left) === Math.round(C.left) && Math.round(A .height) === Math.round(C.height) && Math.round(A.width) === Math.round(C.width) } var _throttleTimeout; function throttle(A, C) { return function() { if (!_throttleTimeout) { var l = arguments, o = this; l.length === 1 ? A.call(o, l[0]) : A.apply(o, l), _throttleTimeout = setTimeout(function() { _throttleTimeout = void 0 }, C) } } } function cancelThrottle() { clearTimeout(_throttleTimeout), _throttleTimeout = void 0 } function scrollBy(A, C, l) { A.scrollLeft += C, A.scrollTop += l } function clone(A) { var C = window.Polymer, l = window.jQuery || window.Zepto; return C && C.dom ? C.dom(A).cloneNode(!0) : l ? l(A).clone(!0)[0] : A.cloneNode(!0) } var expando = "Sortable" + new Date().getTime(); function AnimationStateManager() { var A = [], C; return { captureAnimationState: function() { if (A = [], !!this.options.animation) { var o = [].slice.call(this.el.children); o.forEach(function(t) { if (!(css(t, "display") === "none" || t === Sortable.ghost)) { A.push({ target: t, rect: getRect(t) }); var s = _objectSpread2$1({}, A[A.length - 1].rect); if (t.thisAnimationDuration) { var d = matrix(t, !0); d && (s.top -= d.f, s.left -= d.e) } t.fromRect = s } }) } }, addAnimationState: function(o) { A.push(o) }, removeAnimationState: function(o) { A.splice(indexOfObject(A, { target: o }), 1) }, animateAll: function(o) { var t = this; if (!this.options.animation) { clearTimeout(C), typeof o == "function" && o(); return } var s = !1, d = 0; A.forEach(function(u) { var f = 0, c = u.target, m = c.fromRect, p = getRect(c), b = c.prevFromRect, x = c.prevToRect, g = u.rect, y = matrix(c, !0); y && (p.top -= y.f, p.left -= y.e), c.toRect = p, c.thisAnimationDuration && isRectEqual(b, p) && !isRectEqual(m, p) && (g.top - p.top) / (g.left - p .left) === (m.top - p.top) / (m.left - p.left) && (f = calculateRealTime(g, b, x, t.options)), isRectEqual(p, m) || (c.prevFromRect = m, c.prevToRect = p, f || (f = t.options.animation), t.animate(c, g, p, f)), f && (s = !0, d = Math.max(d, f), clearTimeout(c.animationResetTimer), c.animationResetTimer = setTimeout(function() { c.animationTime = 0, c.prevFromRect = null, c.fromRect = null, c .prevToRect = null, c.thisAnimationDuration = null }, f), c.thisAnimationDuration = f) }), clearTimeout(C), s ? C = setTimeout(function() { typeof o == "function" && o() }, d) : typeof o == "function" && o(), A = [] }, animate: function(o, t, s, d) { if (d) { css(o, "transition", ""), css(o, "transform", ""); var u = matrix(this.el), f = u && u.a, c = u && u.d, m = (t.left - s.left) / (f || 1), p = (t.top - s.top) / (c || 1); o.animatingX = !!m, o.animatingY = !!p, css(o, "transform", "translate3d(" + m + "px," + p + "px,0)"), this.forRepaintDummy = repaint(o), css(o, "transition", "transform " + d + "ms" + (this.options.easing ? " " + this.options.easing : "")), css(o, "transform", "translate3d(0,0,0)"), typeof o.animated == "number" && clearTimeout(o.animated), o .animated = setTimeout(function() { css(o, "transition", ""), css(o, "transform", ""), o.animated = !1, o .animatingX = !1, o.animatingY = !1 }, d) } } } } function repaint(A) { return A.offsetWidth } function calculateRealTime(A, C, l, o) { return Math.sqrt(Math.pow(C.top - A.top, 2) + Math.pow(C.left - A.left, 2)) / Math.sqrt(Math.pow(C.top - l .top, 2) + Math.pow(C.left - l.left, 2)) * o.animation } var plugins = [], defaults = { initializeByDefault: !0 }, PluginManager = { mount: function A(C) { for (var l in defaults) defaults.hasOwnProperty(l) && !(l in C) && (C[l] = defaults[l]); plugins.forEach(function(o) { if (o.pluginName === C.pluginName) throw "Sortable: Cannot mount plugin ".concat(C .pluginName, " more than once") }), plugins.push(C) }, pluginEvent: function A(C, l, o) { var t = this; this.eventCanceled = !1, o.cancel = function() { t.eventCanceled = !0 }; var s = C + "Global"; plugins.forEach(function(d) { !l[d.pluginName] || (l[d.pluginName][s] && l[d.pluginName][s](_objectSpread2$1({ sortable: l }, o)), l.options[d.pluginName] && l[d.pluginName][C] && l[d.pluginName][C]( _objectSpread2$1({ sortable: l }, o))) }) }, initializePlugins: function A(C, l, o, t) { plugins.forEach(function(u) { var f = u.pluginName; if (!(!C.options[f] && !u.initializeByDefault)) { var c = new u(C, l, C.options); c.sortable = C, c.options = C.options, C[f] = c, _extends$1(o, c.defaults) } }); for (var s in C.options) if (!!C.options.hasOwnProperty(s)) { var d = this.modifyOption(C, s, C.options[s]); typeof d < "u" && (C.options[s] = d) } }, getEventProperties: function A(C, l) { var o = {}; return plugins.forEach(function(t) { typeof t.eventProperties == "function" && _extends$1(o, t.eventProperties.call(l[t .pluginName], C)) }), o }, modifyOption: function A(C, l, o) { var t; return plugins.forEach(function(s) { !C[s.pluginName] || s.optionListeners && typeof s.optionListeners[l] == "function" && (t = s.optionListeners[l].call(C[s.pluginName], o)) }), t } }; function dispatchEvent(A) { var C = A.sortable, l = A.rootEl, o = A.name, t = A.targetEl, s = A.cloneEl, d = A.toEl, u = A.fromEl, f = A.oldIndex, c = A.newIndex, m = A.oldDraggableIndex, p = A.newDraggableIndex, b = A.originalEvent, x = A.putSortable, g = A.extraEventProperties; if (C = C || l && l[expando], !!C) { var y, S = C.options, w = "on" + o.charAt(0).toUpperCase() + o.substr(1); window.CustomEvent && !IE11OrLess && !Edge ? y = new CustomEvent(o, { bubbles: !0, cancelable: !0 }) : (y = document.createEvent("Event"), y.initEvent(o, !0, !0)), y.to = d || l, y.from = u || l, y .item = t || l, y.clone = s, y.oldIndex = f, y.newIndex = c, y.oldDraggableIndex = m, y .newDraggableIndex = p, y.originalEvent = b, y.pullMode = x ? x.lastPutMode : void 0; var E = _objectSpread2$1(_objectSpread2$1({}, g), PluginManager.getEventProperties(o, C)); for (var I in E) y[I] = E[I]; l && l.dispatchEvent(y), S[w] && S[w].call(C, y) } } var _excluded = ["evt"], pluginEvent = function A(C, l) { var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, t = o.evt, s = _objectWithoutProperties(o, _excluded); PluginManager.pluginEvent.bind(Sortable)(C, l, _objectSpread2$1({ dragEl, parentEl, ghostEl, rootEl, nextEl, lastDownEl, cloneEl, cloneHidden, dragStarted: moved, putSortable, activeSortable: Sortable.active, originalEvent: t, oldIndex, oldDraggableIndex, newIndex, newDraggableIndex, hideGhostForTarget: _hideGhostForTarget, unhideGhostForTarget: _unhideGhostForTarget, cloneNowHidden: function() { cloneHidden = !0 }, cloneNowShown: function() { cloneHidden = !1 }, dispatchSortableEvent: function(u) { _dispatchEvent({ sortable: l, name: u, originalEvent: t }) } }, s)) }; function _dispatchEvent(A) { dispatchEvent(_objectSpread2$1({ putSortable, cloneEl, targetEl: dragEl, rootEl, oldIndex, oldDraggableIndex, newIndex, newDraggableIndex }, A)) } var dragEl, parentEl, ghostEl, rootEl, nextEl, lastDownEl, cloneEl, cloneHidden, oldIndex, newIndex, oldDraggableIndex, newDraggableIndex, activeGroup, putSortable, awaitingDragStarted = !1, ignoreNextClick = !1, sortables = [], tapEvt, touchEvt, lastDx, lastDy, tapDistanceLeft, tapDistanceTop, moved, lastTarget, lastDirection, pastFirstInvertThresh = !1, isCircumstantialInvert = !1, targetMoveDistance, ghostRelativeParent, ghostRelativeParentInitialScroll = [], _silent = !1, savedInputChecked = [], documentExists = typeof document < "u", PositionGhostAbsolutely = IOS, CSSFloatProperty = Edge || IE11OrLess ? "cssFloat" : "float", supportDraggable = documentExists && !ChromeForAndroid && !IOS && "draggable" in document.createElement( "div"), supportCssPointerEvents = function() { if (!!documentExists) { if (IE11OrLess) return !1; var A = document.createElement("x"); return A.style.cssText = "pointer-events:auto", A.style.pointerEvents === "auto" } }(), _detectDirection = function A(C, l) { var o = css(C), t = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o .borderLeftWidth) - parseInt(o.borderRightWidth), s = getChild(C, 0, l), d = getChild(C, 1, l), u = s && css(s), f = d && css(d), c = u && parseInt(u.marginLeft) + parseInt(u.marginRight) + getRect(s).width, m = f && parseInt(f.marginLeft) + parseInt(f.marginRight) + getRect(d).width; if (o.display === "flex") return o.flexDirection === "column" || o.flexDirection === "column-reverse" ? "vertical" : "horizontal"; if (o.display === "grid") return o.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal"; if (s && u.float && u.float !== "none") { var p = u.float === "left" ? "left" : "right"; return d && (f.clear === "both" || f.clear === p) ? "vertical" : "horizontal" } return s && (u.display === "block" || u.display === "flex" || u.display === "table" || u.display === "grid" || c >= t && o[CSSFloatProperty] === "none" || d && o[CSSFloatProperty] === "none" && c + m > t) ? "vertical" : "horizontal" }, _dragElInRowColumn = function A(C, l, o) { var t = o ? C.left : C.top, s = o ? C.right : C.bottom, d = o ? C.width : C.height, u = o ? l.left : l.top, f = o ? l.right : l.bottom, c = o ? l.width : l.height; return t === u || s === f || t + d / 2 === u + c / 2 }, _detectNearestEmptySortable = function A(C, l) { var o; return sortables.some(function(t) { var s = t[expando].options.emptyInsertThreshold; if (!(!s || lastChild(t))) { var d = getRect(t), u = C >= d.left - s && C <= d.right + s, f = l >= d.top - s && l <= d.bottom + s; if (u && f) return o = t } }), o }, _prepareGroup = function A(C) { function l(s, d) { return function(u, f, c, m) { var p = u.options.group.name && f.options.group.name && u.options.group.name === f.options .group.name; if (s == null && (d || p)) return !0; if (s == null || s === !1) return !1; if (d && s === "clone") return s; if (typeof s == "function") return l(s(u, f, c, m), d)(u, f, c, m); var b = (d ? u : f).options.group.name; return s === !0 || typeof s == "string" && s === b || s.join && s.indexOf(b) > -1 } } var o = {}, t = C.group; (!t || _typeof$1(t) != "object") && (t = { name: t }), o.name = t.name, o.checkPull = l(t.pull, !0), o.checkPut = l(t.put), o.revertClone = t.revertClone, C.group = o }, _hideGhostForTarget = function A() { !supportCssPointerEvents && ghostEl && css(ghostEl, "display", "none") }, _unhideGhostForTarget = function A() { !supportCssPointerEvents && ghostEl && css(ghostEl, "display", "") }; documentExists && document.addEventListener("click", function(A) { if (ignoreNextClick) return A.preventDefault(), A.stopPropagation && A.stopPropagation(), A .stopImmediatePropagation && A.stopImmediatePropagation(), ignoreNextClick = !1, !1 }, !0); var nearestEmptyInsertDetectEvent = function A(C) { if (dragEl) { C = C.touches ? C.touches[0] : C; var l = _detectNearestEmptySortable(C.clientX, C.clientY); if (l) { var o = {}; for (var t in C) C.hasOwnProperty(t) && (o[t] = C[t]); o.target = o.rootEl = l, o.preventDefault = void 0, o.stopPropagation = void 0, l[expando] ._onDragOver(o) } } }, _checkOutsideTargetEl = function A(C) { dragEl && dragEl.parentNode[expando]._isOutsideThisEl(C.target) }; function Sortable(A, C) { if (!(A && A.nodeType && A.nodeType === 1)) throw "Sortable: `el` must be an HTMLElement, not ".concat({} .toString.call(A)); this.el = A, this.options = C = _extends$1({}, C), A[expando] = this; var l = { group: null, sort: !0, disabled: !1, store: null, handle: null, draggable: /^[uo]l$/i.test(A.nodeName) ? ">li" : ">*", swapThreshold: 1, invertSwap: !1, invertedSwapThreshold: null, removeCloneOnHide: !0, direction: function() { return _detectDirection(A, this.options) }, ghostClass: "sortable-ghost", chosenClass: "sortable-chosen", dragClass: "sortable-drag", ignore: "a, img", filter: null, preventOnFilter: !0, animation: 0, easing: null, setData: function(d, u) { d.setData("Text", u.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: Sortable.supportPointer !== !1 && "PointerEvent" in window && !Safari, emptyInsertThreshold: 5 }; PluginManager.initializePlugins(this, A, l); for (var o in l) !(o in C) && (C[o] = l[o]); _prepareGroup(C); for (var t in this) t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this)); this.nativeDraggable = C.forceFallback ? !1 : supportDraggable, this.nativeDraggable && (this.options .touchStartThreshold = 1), C.supportPointer ? on(A, "pointerdown", this._onTapStart) : (on(A, "mousedown", this._onTapStart), on(A, "touchstart", this._onTapStart)), this.nativeDraggable && (on( A, "dragover", this), on(A, "dragenter", this)), sortables.push(this.el), C.store && C.store.get && this.sort(C.store.get(this) || []), _extends$1(this, AnimationStateManager()) } Sortable.prototype = { constructor: Sortable, _isOutsideThisEl: function A(C) { !this.el.contains(C) && C !== this.el && (lastTarget = null) }, _getDirection: function A(C, l) { return typeof this.options.direction == "function" ? this.options.direction.call(this, C, l, dragEl) : this.options.direction }, _onTapStart: function A(C) { if (!!C.cancelable) { var l = this, o = this.el, t = this.options, s = t.preventOnFilter, d = C.type, u = C.touches && C.touches[0] || C.pointerType && C.pointerType === "touch" && C, f = (u || C).target, c = C.target.shadowRoot && (C.path && C.path[0] || C.composedPath && C.composedPath()[ 0]) || f, m = t.filter; if (_saveInputCheckedState(o), !dragEl && !(/mousedown|pointerdown/.test(d) && C.button !== 0 || t.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Safari && f && f.tagName.toUpperCase() === "SELECT") && (f = closest(f, t.draggable, o, !1), ! (f && f.animated) && lastDownEl !== f)) { if (oldIndex = index$1(f), oldDraggableIndex = index$1(f, t.draggable), typeof m == "function") { if (m.call(this, C, f, this)) { _dispatchEvent({ sortable: l, rootEl: c, name: "filter", targetEl: f, toEl: o, fromEl: o }), pluginEvent("filter", l, { evt: C }), s && C.cancelable && C.preventDefault(); return } } else if (m && (m = m.split(",").some(function(p) { if (p = closest(c, p.trim(), o, !1), p) return _dispatchEvent({ sortable: l, rootEl: p, name: "filter", targetEl: f, fromEl: o, toEl: o }), pluginEvent("filter", l, { evt: C }), !0 }), m)) { s && C.cancelable && C.preventDefault(); return } t.handle && !closest(c, t.handle, o, !1) || this._prepareDragStart(C, u, f) } } }, _prepareDragStart: function A(C, l, o) { var t = this, s = t.el, d = t.options, u = s.ownerDocument, f; if (o && !dragEl && o.parentNode === s) { var c = getRect(o); if (rootEl = s, dragEl = o, parentEl = dragEl.parentNode, nextEl = dragEl.nextSibling, lastDownEl = o, activeGroup = d.group, Sortable.dragged = dragEl, tapEvt = { target: dragEl, clientX: (l || C).clientX, clientY: (l || C).clientY }, tapDistanceLeft = tapEvt.clientX - c.left, tapDistanceTop = tapEvt.clientY - c.top, this._lastX = (l || C).clientX, this._lastY = (l || C).clientY, dragEl.style[ "will-change"] = "all", f = function() { if (pluginEvent("delayEnded", t, { evt: C }), Sortable.eventCanceled) { t._onDrop(); return } t._disableDelayedDragEvents(), !FireFox && t.nativeDraggable && (dragEl .draggable = !0), t._triggerDragStart(C, l), _dispatchEvent({ sortable: t, name: "choose", originalEvent: C }), toggleClass(dragEl, d.chosenClass, !0) }, d.ignore.split(",").forEach(function(m) { find(dragEl, m.trim(), _disableDraggable) }), on(u, "dragover", nearestEmptyInsertDetectEvent), on(u, "mousemove", nearestEmptyInsertDetectEvent), on(u, "touchmove", nearestEmptyInsertDetectEvent), on(u, "mouseup", t._onDrop), on(u, "touchend", t._onDrop), on(u, "touchcancel", t ._onDrop), FireFox && this.nativeDraggable && (this.options.touchStartThreshold = 4, dragEl.draggable = !0), pluginEvent("delayStart", this, { evt: C }), d.delay && (!d.delayOnTouchOnly || l) && (!this.nativeDraggable || !(Edge || IE11OrLess))) { if (Sortable.eventCanceled) { this._onDrop(); return } on(u, "mouseup", t._disableDelayedDrag), on(u, "touchend", t._disableDelayedDrag), on(u, "touchcancel", t._disableDelayedDrag), on(u, "mousemove", t ._delayedDragTouchMoveHandler), on(u, "touchmove", t ._delayedDragTouchMoveHandler), d.supportPointer && on(u, "pointermove", t ._delayedDragTouchMoveHandler), t._dragStartTimer = setTimeout(f, d.delay) } else f() } }, _delayedDragTouchMoveHandler: function A(C) { var l = C.touches ? C.touches[0] : C; Math.max(Math.abs(l.clientX - this._lastX), Math.abs(l.clientY - this._lastY)) >= Math.floor( this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag() }, _disableDelayedDrag: function A() { dragEl && _disableDraggable(dragEl), clearTimeout(this._dragStartTimer), this ._disableDelayedDragEvents() }, _disableDelayedDragEvents: function A() { var C = this.el.ownerDocument; off(C, "mouseup", this._disableDelayedDrag), off(C, "touchend", this._disableDelayedDrag), off( C, "touchcancel", this._disableDelayedDrag), off(C, "mousemove", this ._delayedDragTouchMoveHandler), off(C, "touchmove", this._delayedDragTouchMoveHandler), off(C, "pointermove", this._delayedDragTouchMoveHandler) }, _triggerDragStart: function A(C, l) { l = l || C.pointerType == "touch" && C, !this.nativeDraggable || l ? this.options .supportPointer ? on(document, "pointermove", this._onTouchMove) : l ? on(document, "touchmove", this._onTouchMove) : on(document, "mousemove", this._onTouchMove) : (on( dragEl, "dragend", this), on(rootEl, "dragstart", this._onDragStart)); try { document.selection ? _nextTick(function() { document.selection.empty() }) : window.getSelection().removeAllRanges() } catch {} }, _dragStarted: function A(C, l) { if (awaitingDragStarted = !1, rootEl && dragEl) { pluginEvent("dragStarted", this, { evt: l }), this.nativeDraggable && on(document, "dragover", _checkOutsideTargetEl); var o = this.options; !C && toggleClass(dragEl, o.dragClass, !1), toggleClass(dragEl, o.ghostClass, !0), Sortable .active = this, C && this._appendGhost(), _dispatchEvent({ sortable: this, name: "start", originalEvent: l }) } else this._nulling() }, _emulateDragOver: function A() { if (touchEvt) { this._lastX = touchEvt.clientX, this._lastY = touchEvt.clientY, _hideGhostForTarget(); for (var C = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY), l = C; C && C .shadowRoot && (C = C.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY), C !== l);) l = C; if (dragEl.parentNode[expando]._isOutsideThisEl(C), l) do { if (l[expando]) { var o = void 0; if (o = l[expando]._onDragOver({ clientX: touchEvt.clientX, clientY: touchEvt.clientY, target: C, rootEl: l }), o && !this.options.dragoverBubble) break } C = l } while (l = l.parentNode); _unhideGhostForTarget() } }, _onTouchMove: function A(C) { if (tapEvt) { var l = this.options, o = l.fallbackTolerance, t = l.fallbackOffset, s = C.touches ? C.touches[0] : C, d = ghostEl && matrix(ghostEl, !0), u = ghostEl && d && d.a, f = ghostEl && d && d.d, c = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset( ghostRelativeParent), m = (s.clientX - tapEvt.clientX + t.x) / (u || 1) + (c ? c[0] - ghostRelativeParentInitialScroll[0] : 0) / (u || 1), p = (s.clientY - tapEvt.clientY + t.y) / (f || 1) + (c ? c[1] - ghostRelativeParentInitialScroll[1] : 0) / (f || 1); if (!Sortable.active && !awaitingDragStarted) { if (o && Math.max(Math.abs(s.clientX - this._lastX), Math.abs(s.clientY - this ._lastY)) < o) return; this._onDragStart(C, !0) } if (ghostEl) { d ? (d.e += m - (lastDx || 0), d.f += p - (lastDy || 0)) : d = { a: 1, b: 0, c: 0, d: 1, e: m, f: p }; var b = "matrix(".concat(d.a, ",").concat(d.b, ",").concat(d.c, ",").concat(d.d, ",") .concat(d.e, ",").concat(d.f, ")"); css(ghostEl, "webkitTransform", b), css(ghostEl, "mozTransform", b), css(ghostEl, "msTransform", b), css(ghostEl, "transform", b), lastDx = m, lastDy = p, touchEvt = s } C.cancelable && C.preventDefault() } }, _appendGhost: function A() { if (!ghostEl) { var C = this.options.fallbackOnBody ? document.body : rootEl, l = getRect(dragEl, !0, PositionGhostAbsolutely, !0, C), o = this.options; if (PositionGhostAbsolutely) { for (ghostRelativeParent = C; css(ghostRelativeParent, "position") === "static" && css( ghostRelativeParent, "transform") === "none" && ghostRelativeParent !== document;) ghostRelativeParent = ghostRelativeParent.parentNode; ghostRelativeParent !== document.body && ghostRelativeParent !== document .documentElement ? (ghostRelativeParent === document && (ghostRelativeParent = getWindowScrollingElement()), l.top += ghostRelativeParent.scrollTop, l .left += ghostRelativeParent.scrollLeft) : ghostRelativeParent = getWindowScrollingElement(), ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent) } ghostEl = dragEl.cloneNode(!0), toggleClass(ghostEl, o.ghostClass, !1), toggleClass(ghostEl, o.fallbackClass, !0), toggleClass(ghostEl, o.dragClass, !0), css(ghostEl, "transition", ""), css(ghostEl, "transform", ""), css(ghostEl, "box-sizing", "border-box"), css(ghostEl, "margin", 0), css(ghostEl, "top", l.top), css(ghostEl, "left", l.left), css(ghostEl, "width", l.width), css(ghostEl, "height", l.height), css(ghostEl, "opacity", "0.8"), css(ghostEl, "position", PositionGhostAbsolutely ? "absolute" : "fixed"), css(ghostEl, "zIndex", "100000"), css(ghostEl, "pointerEvents", "none"), Sortable.ghost = ghostEl, C.appendChild(ghostEl), css( ghostEl, "transform-origin", tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + "% " + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + "%") } }, _onDragStart: function A(C, l) { var o = this, t = C.dataTransfer, s = o.options; if (pluginEvent("dragStart", this, { evt: C }), Sortable.eventCanceled) { this._onDrop(); return } pluginEvent("setupClone", this), Sortable.eventCanceled || (cloneEl = clone(dragEl), cloneEl .draggable = !1, cloneEl.style["will-change"] = "", this._hideClone(), toggleClass( cloneEl, this.options.chosenClass, !1), Sortable.clone = cloneEl), o.cloneId = _nextTick(function() { pluginEvent("clone", o), !Sortable.eventCanceled && (o.options.removeCloneOnHide || rootEl.insertBefore(cloneEl, dragEl), o._hideClone(), _dispatchEvent({ sortable: o, name: "clone" })) }), !l && toggleClass(dragEl, s.dragClass, !0), l ? (ignoreNextClick = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (off(document, "mouseup", o._onDrop), off( document, "touchend", o._onDrop), off(document, "touchcancel", o._onDrop), t && (t .effectAllowed = "move", s.setData && s.setData.call(o, t, dragEl)), on(document, "drop", o), css(dragEl, "transform", "translateZ(0)")), awaitingDragStarted = !0, o ._dragStartId = _nextTick(o._dragStarted.bind(o, l, C)), on(document, "selectstart", o), moved = !0, Safari && css(document.body, "user-select", "none") }, _onDragOver: function A(C) { var l = this.el, o = C.target, t, s, d, u = this.options, f = u.group, c = Sortable.active, m = activeGroup === f, p = u.sort, b = putSortable || c, x, g = this, y = !1; if (_silent) return; function S(J, ee) { pluginEvent(J, g, _objectSpread2$1({ evt: C, isOwner: m, axis: x ? "vertical" : "horizontal", revert: d, dragRect: t, targetRect: s, canSort: p, fromSortable: b, target: o, completed: E, onMove: function(te, ue) { return _onMove(rootEl, l, dragEl, t, te, getRect(te), C, ue) }, changed: I }, ee)) } function w() { S("dragOverAnimationCapture"), g.captureAnimationState(), g !== b && b .captureAnimationState() } function E(J) { return S("dragOverCompleted", { insertion: J }), J && (m ? c._hideClone() : c._showClone(g), g !== b && (toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : c.options.ghostClass, !1), toggleClass(dragEl, u.ghostClass, !0)), putSortable !== g && g !== Sortable .active ? putSortable = g : g === Sortable.active && putSortable && (putSortable = null), b === g && (g._ignoreWhileAnimating = o), g.animateAll(function() { S("dragOverAnimationComplete"), g._ignoreWhileAnimating = null }), g !== b && (b.animateAll(), b._ignoreWhileAnimating = null)), (o === dragEl && ! dragEl.animated || o === l && !o.animated) && (lastTarget = null), !u .dragoverBubble && !C.rootEl && o !== document && (dragEl.parentNode[expando] ._isOutsideThisEl(C.target), !J && nearestEmptyInsertDetectEvent(C)), !u .dragoverBubble && C.stopPropagation && C.stopPropagation(), y = !0 } function I() { newIndex = index$1(dragEl), newDraggableIndex = index$1(dragEl, u.draggable), _dispatchEvent({ sortable: g, name: "change", toEl: l, newIndex, newDraggableIndex, originalEvent: C }) } if (C.preventDefault !== void 0 && C.cancelable && C.preventDefault(), o = closest(o, u .draggable, l, !0), S("dragOver"), Sortable.eventCanceled) return y; if (dragEl.contains(C.target) || o.animated && o.animatingX && o.animatingY || g ._ignoreWhileAnimating === o) return E(!1); if (ignoreNextClick = !1, c && !u.disabled && (m ? p || (d = parentEl !== rootEl) : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, c, dragEl, C)) && f.checkPut(this, c, dragEl, C))) { if (x = this._getDirection(C, o) === "vertical", t = getRect(dragEl), S("dragOverValid"), Sortable.eventCanceled) return y; if (d) return parentEl = rootEl, w(), this._hideClone(), S("revert"), Sortable .eventCanceled || (nextEl ? rootEl.insertBefore(dragEl, nextEl) : rootEl .appendChild(dragEl)), E(!0); var D = lastChild(l, u.draggable); if (!D || _ghostIsLast(C, x, this) && !D.animated) { if (D === dragEl) return E(!1); if (D && l === C.target && (o = D), o && (s = getRect(o)), _onMove(rootEl, l, dragEl, t, o, s, C, !!o) !== !1) return w(), l.appendChild(dragEl), parentEl = l, I(), E(! 0) } else if (D && _ghostIsFirst(C, x, this)) { var R = getChild(l, 0, u, !0); if (R === dragEl) return E(!1); if (o = R, s = getRect(o), _onMove(rootEl, l, dragEl, t, o, s, C, !1) !== !1) return w(), l.insertBefore(dragEl, R), parentEl = l, I(), E(!0) } else if (o.parentNode === l) { s = getRect(o); var L = 0, B, j = dragEl.parentNode !== l, z = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || t, o.animated && o .toRect || s, x), U = x ? "top" : "left", N = isScrolledPast(o, "top", "top") || isScrolledPast(dragEl, "top", "top"), H = N ? N.scrollTop : void 0; lastTarget !== o && (B = s[U], pastFirstInvertThresh = !1, isCircumstantialInvert = ! z && u.invertSwap || j), L = _getSwapDirection(C, o, s, x, z ? 1 : u .swapThreshold, u.invertedSwapThreshold == null ? u.swapThreshold : u .invertedSwapThreshold, isCircumstantialInvert, lastTarget === o); var F; if (L !== 0) { var V = index$1(dragEl); do V -= L, F = parentEl.children[V]; while (F && (css(F, "display") === "none" || F === ghostEl)) } if (L === 0 || F === o) return E(!1); lastTarget = o, lastDirection = L; var M = o.nextElementSibling, k = !1; k = L === 1; var G = _onMove(rootEl, l, dragEl, t, o, s, C, k); if (G !== !1) return (G === 1 || G === -1) && (k = G === 1), _silent = !0, setTimeout( _unsilent, 30), w(), k && !M ? l.appendChild(dragEl) : o.parentNode .insertBefore(dragEl, k ? M : o), N && scrollBy(N, 0, H - N.scrollTop), parentEl = dragEl.parentNode, B !== void 0 && !isCircumstantialInvert && ( targetMoveDistance = Math.abs(B - getRect(o)[U])), I(), E(!0) } if (l.contains(dragEl)) return E(!1) } return !1 }, _ignoreWhileAnimating: null, _offMoveEvents: function A() { off(document, "mousemove", this._onTouchMove), off(document, "touchmove", this._onTouchMove), off(document, "pointermove", this._onTouchMove), off(document, "dragover", nearestEmptyInsertDetectEvent), off(document, "mousemove", nearestEmptyInsertDetectEvent), off(document, "touchmove", nearestEmptyInsertDetectEvent) }, _offUpEvents: function A() { var C = this.el.ownerDocument; off(C, "mouseup", this._onDrop), off(C, "touchend", this._onDrop), off(C, "pointerup", this ._onDrop), off(C, "touchcancel", this._onDrop), off(document, "selectstart", this) }, _onDrop: function A(C) { var l = this.el, o = this.options; if (newIndex = index$1(dragEl), newDraggableIndex = index$1(dragEl, o.draggable), pluginEvent( "drop", this, { evt: C }), parentEl = dragEl && dragEl.parentNode, newIndex = index$1(dragEl), newDraggableIndex = index$1(dragEl, o.draggable), Sortable.eventCanceled) { this._nulling(); return } awaitingDragStarted = !1, isCircumstantialInvert = !1, pastFirstInvertThresh = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), _cancelNextTick(this .cloneId), _cancelNextTick(this._dragStartId), this.nativeDraggable && (off(document, "drop", this), off(l, "dragstart", this._onDragStart)), this._offMoveEvents(), this ._offUpEvents(), Safari && css(document.body, "user-select", ""), css(dragEl, "transform", ""), C && (moved && (C.cancelable && C.preventDefault(), !o.dropBubble && C .stopPropagation()), ghostEl && ghostEl.parentNode && ghostEl.parentNode .removeChild(ghostEl), (rootEl === parentEl || putSortable && putSortable .lastPutMode !== "clone") && cloneEl && cloneEl.parentNode && cloneEl.parentNode .removeChild(cloneEl), dragEl && (this.nativeDraggable && off(dragEl, "dragend", this), _disableDraggable(dragEl), dragEl.style["will-change"] = "", moved && ! awaitingDragStarted && toggleClass(dragEl, putSortable ? putSortable.options .ghostClass : this.options.ghostClass, !1), toggleClass(dragEl, this.options .chosenClass, !1), _dispatchEvent({ sortable: this, name: "unchoose", toEl: parentEl, newIndex: null, newDraggableIndex: null, originalEvent: C }), rootEl !== parentEl ? (newIndex >= 0 && (_dispatchEvent({ rootEl: parentEl, name: "add", toEl: parentEl, fromEl: rootEl, originalEvent: C }), _dispatchEvent({ sortable: this, name: "remove", toEl: parentEl, originalEvent: C }), _dispatchEvent({ rootEl: parentEl, name: "sort", toEl: parentEl, fromEl: rootEl, originalEvent: C }), _dispatchEvent({ sortable: this, name: "sort", toEl: parentEl, originalEvent: C })), putSortable && putSortable.save()) : newIndex !== oldIndex && newIndex >= 0 && (_dispatchEvent({ sortable: this, name: "update", toEl: parentEl, originalEvent: C }), _dispatchEvent({ sortable: this, name: "sort", toEl: parentEl, originalEvent: C })), Sortable.active && ((newIndex == null || newIndex === -1) && (newIndex = oldIndex, newDraggableIndex = oldDraggableIndex), _dispatchEvent({ sortable: this, name: "end", toEl: parentEl, originalEvent: C }), this.save()))), this._nulling() }, _nulling: function A() { pluginEvent("nulling", this), rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null, savedInputChecked.forEach(function(C) { C.checked = !0 }), savedInputChecked.length = lastDx = lastDy = 0 }, handleEvent: function A(C) { switch (C.type) { case "drop": case "dragend": this._onDrop(C); break; case "dragenter": case "dragover": dragEl && (this._onDragOver(C), _globalDragOver(C)); break; case "selectstart": C.preventDefault(); break } }, toArray: function A() { for (var C = [], l, o = this.el.children, t = 0, s = o.length, d = this.options; t < s; t++) l = o[t], closest(l, d.draggable, this.el, !1) && C.push(l.getAttribute(d.dataIdAttr) || _generateId(l)); return C }, sort: function A(C, l) { var o = {}, t = this.el; this.toArray().forEach(function(s, d) { var u = t.children[d]; closest(u, this.options.draggable, t, !1) && (o[s] = u) }, this), l && this.captureAnimationState(), C.forEach(function(s) { o[s] && (t.removeChild(o[s]), t.appendChild(o[s])) }), l && this.animateAll() }, save: function A() { var C = this.options.store; C && C.set && C.set(this) }, closest: function A(C, l) { return closest(C, l || this.options.draggable, this.el, !1) }, option: function A(C, l) { var o = this.options; if (l === void 0) return o[C]; var t = PluginManager.modifyOption(this, C, l); typeof t < "u" ? o[C] = t : o[C] = l, C === "group" && _prepareGroup(o) }, destroy: function A() { pluginEvent("destroy", this); var C = this.el; C[expando] = null, off(C, "mousedown", this._onTapStart), off(C, "touchstart", this ._onTapStart), off(C, "pointerdown", this._onTapStart), this.nativeDraggable && (off(C, "dragover", this), off(C, "dragenter", this)), Array.prototype.forEach.call(C .querySelectorAll("[draggable]"), function(l) { l.removeAttribute("draggable") }), this._onDrop(), this._disableDelayedDragEvents(), sortables.splice(sortables .indexOf(this.el), 1), this.el = C = null }, _hideClone: function A() { if (!cloneHidden) { if (pluginEvent("hideClone", this), Sortable.eventCanceled) return; css(cloneEl, "display", "none"), this.options.removeCloneOnHide && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl), cloneHidden = !0 } }, _showClone: function A(C) { if (C.lastPutMode !== "clone") { this._hideClone(); return } if (cloneHidden) { if (pluginEvent("showClone", this), Sortable.eventCanceled) return; dragEl.parentNode == rootEl && !this.options.group.revertClone ? rootEl.insertBefore( cloneEl, dragEl) : nextEl ? rootEl.insertBefore(cloneEl, nextEl) : rootEl .appendChild(cloneEl), this.options.group.revertClone && this.animate(dragEl, cloneEl), css(cloneEl, "display", ""), cloneHidden = !1 } } }; function _globalDragOver(A) { A.dataTransfer && (A.dataTransfer.dropEffect = "move"), A.cancelable && A.preventDefault() } function _onMove(A, C, l, o, t, s, d, u) { var f, c = A[expando], m = c.options.onMove, p; return window.CustomEvent && !IE11OrLess && !Edge ? f = new CustomEvent("move", { bubbles: !0, cancelable: !0 }) : (f = document.createEvent("Event"), f.initEvent("move", !0, !0)), f.to = C, f.from = A, f.dragged = l, f.draggedRect = o, f.related = t || C, f.relatedRect = s || getRect(C), f.willInsertAfter = u, f .originalEvent = d, A.dispatchEvent(f), m && (p = m.call(c, f, d)), p } function _disableDraggable(A) { A.draggable = !1 } function _unsilent() { _silent = !1 } function _ghostIsFirst(A, C, l) { var o = getRect(getChild(l.el, 0, l.options, !0)), t = 10; return C ? A.clientX < o.left - t || A.clientY < o.top && A.clientX < o.right : A.clientY < o.top - t || A .clientY < o.bottom && A.clientX < o.left } function _ghostIsLast(A, C, l) { var o = getRect(lastChild(l.el, l.options.draggable)), t = 10; return C ? A.clientX > o.right + t || A.clientX <= o.right && A.clientY > o.bottom && A.clientX >= o.left : A.clientX > o.right && A.clientY > o.top || A.clientX <= o.right && A.clientY > o.bottom + t } function _getSwapDirection(A, C, l, o, t, s, d, u) { var f = o ? A.clientY : A.clientX, c = o ? l.height : l.width, m = o ? l.top : l.left, p = o ? l.bottom : l.right, b = !1; if (!d) { if (u && targetMoveDistance < c * t) { if (!pastFirstInvertThresh && (lastDirection === 1 ? f > m + c * s / 2 : f < p - c * s / 2) && ( pastFirstInvertThresh = !0), pastFirstInvertThresh) b = !0; else if (lastDirection === 1 ? f < m + targetMoveDistance : f > p - targetMoveDistance) return - lastDirection } else if (f > m + c * (1 - t) / 2 && f < p - c * (1 - t) / 2) return _getInsertDirection(C) } return b = b || d, b && (f < m + c * s / 2 || f > p - c * s / 2) ? f > m + c / 2 ? 1 : -1 : 0 } function _getInsertDirection(A) { return index$1(dragEl) < index$1(A) ? 1 : -1 } function _generateId(A) { for (var C = A.tagName + A.className + A.src + A.href + A.textContent, l = C.length, o = 0; l--;) o += C .charCodeAt(l); return o.toString(36) } function _saveInputCheckedState(A) { savedInputChecked.length = 0; for (var C = A.getElementsByTagName("input"), l = C.length; l--;) { var o = C[l]; o.checked && savedInputChecked.push(o) } } function _nextTick(A) { return setTimeout(A, 0) } function _cancelNextTick(A) { return clearTimeout(A) } documentExists && on(document, "touchmove", function(A) { (Sortable.active || awaitingDragStarted) && A.cancelable && A.preventDefault() }), Sortable.utils = { on, off, css, find, is: function A(C, l) { return !!closest(C, l, C, !1) }, extend, throttle, closest, toggleClass, clone, index: index$1, nextTick: _nextTick, cancelNextTick: _cancelNextTick, detectDirection: _detectDirection, getChild }, Sortable.get = function(A) { return A[expando] }, Sortable.mount = function() { for (var A = arguments.length, C = new Array(A), l = 0; l < A; l++) C[l] = arguments[l]; C[0].constructor === Array && (C = C[0]), C.forEach(function(o) { if (!o.prototype || !o.prototype.constructor) throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString .call(o)); o.utils && (Sortable.utils = _objectSpread2$1(_objectSpread2$1({}, Sortable.utils), o .utils)), PluginManager.mount(o) }) }, Sortable.create = function(A, C) { return new Sortable(A, C) }, Sortable.version = version; var autoScrolls = [], scrollEl, scrollRootEl, scrolling = !1, lastAutoScrollX, lastAutoScrollY, touchEvt$1, pointerElemChangedInterval; function AutoScrollPlugin() { function A() { this.defaults = { scroll: !0, forceAutoScrollFallback: !1, scrollSensitivity: 30, scrollSpeed: 10, bubbleScroll: !0 }; for (var C in this) C.charAt(0) === "_" && typeof this[C] == "function" && (this[C] = this[C].bind( this)) } return A.prototype = { dragStarted: function(l) { var o = l.originalEvent; this.sortable.nativeDraggable ? on(document, "dragover", this._handleAutoScroll) : this .options.supportPointer ? on(document, "pointermove", this._handleFallbackAutoScroll) : o.touches ? on(document, "touchmove", this._handleFallbackAutoScroll) : on(document, "mousemove", this._handleFallbackAutoScroll) }, dragOverCompleted: function(l) { var o = l.originalEvent; !this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o) }, drop: function() { this.sortable.nativeDraggable ? off(document, "dragover", this._handleAutoScroll) : (off( document, "pointermove", this._handleFallbackAutoScroll), off(document, "touchmove", this._handleFallbackAutoScroll), off(document, "mousemove", this ._handleFallbackAutoScroll)), clearPointerElemChangedInterval(), clearAutoScrolls(), cancelThrottle() }, nulling: function() { touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null, autoScrolls.length = 0 }, _handleFallbackAutoScroll: function(l) { this._handleAutoScroll(l, !0) }, _handleAutoScroll: function(l, o) { var t = this, s = (l.touches ? l.touches[0] : l).clientX, d = (l.touches ? l.touches[0] : l).clientY, u = document.elementFromPoint(s, d); if (touchEvt$1 = l, o || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) { autoScroll(l, this.options, u, o); var f = getParentAutoScrollElement(u, !0); scrolling && (!pointerElemChangedInterval || s !== lastAutoScrollX || d !== lastAutoScrollY) && (pointerElemChangedInterval && clearPointerElemChangedInterval(), pointerElemChangedInterval = setInterval( function() { var c = getParentAutoScrollElement(document.elementFromPoint(s, d), !0); c !== f && (f = c, clearAutoScrolls()), autoScroll(l, t.options, c, o) }, 10), lastAutoScrollX = s, lastAutoScrollY = d) } else { if (!this.options.bubbleScroll || getParentAutoScrollElement(u, !0) === getWindowScrollingElement()) { clearAutoScrolls(); return } autoScroll(l, this.options, getParentAutoScrollElement(u, !1), !1) } } }, _extends$1(A, { pluginName: "scroll", initializeByDefault: !0 }) } function clearAutoScrolls() { autoScrolls.forEach(function(A) { clearInterval(A.pid) }), autoScrolls = [] } function clearPointerElemChangedInterval() { clearInterval(pointerElemChangedInterval) } var autoScroll = throttle(function(A, C, l, o) { if (!!C.scroll) { var t = (A.touches ? A.touches[0] : A).clientX, s = (A.touches ? A.touches[0] : A).clientY, d = C.scrollSensitivity, u = C.scrollSpeed, f = getWindowScrollingElement(), c = !1, m; scrollRootEl !== l && (scrollRootEl = l, clearAutoScrolls(), scrollEl = C.scroll, m = C .scrollFn, scrollEl === !0 && (scrollEl = getParentAutoScrollElement(l, !0))); var p = 0, b = scrollEl; do { var x = b, g = getRect(x), y = g.top, S = g.bottom, w = g.left, E = g.right, I = g.width, D = g.height, R = void 0, L = void 0, B = x.scrollWidth, j = x.scrollHeight, z = css(x), U = x.scrollLeft, N = x.scrollTop; x === f ? (R = I < B && (z.overflowX === "auto" || z.overflowX === "scroll" || z .overflowX === "visible"), L = D < j && (z.overflowY === "auto" || z .overflowY === "scroll" || z.overflowY === "visible")) : (R = I < B && (z .overflowX === "auto" || z.overflowX === "scroll"), L = D < j && (z .overflowY === "auto" || z.overflowY === "scroll")); var H = R && (Math.abs(E - t) <= d && U + I < B) - (Math.abs(w - t) <= d && !!U), F = L && (Math.abs(S - s) <= d && N + D < j) - (Math.abs(y - s) <= d && !!N); if (!autoScrolls[p]) for (var V = 0; V <= p; V++) autoScrolls[V] || (autoScrolls[V] = {}); (autoScrolls[p].vx != H || autoScrolls[p].vy != F || autoScrolls[p].el !== x) && ( autoScrolls[p].el = x, autoScrolls[p].vx = H, autoScrolls[p].vy = F, clearInterval( autoScrolls[p].pid), (H != 0 || F != 0) && (c = !0, autoScrolls[p].pid = setInterval(function() { o && this.layer === 0 && Sortable.active._onTouchMove(touchEvt$1); var M = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * u : 0, k = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * u : 0; typeof m == "function" && m.call(Sortable.dragged.parentNode[expando], k, M, A, touchEvt$1, autoScrolls[this.layer].el) !== "continue" || scrollBy(autoScrolls[this.layer].el, k, M) }.bind({ layer: p }), 24))), p++ } while (C.bubbleScroll && b !== f && (b = getParentAutoScrollElement(b, !1))); scrolling = c } }, 30), drop = function A(C) { var l = C.originalEvent, o = C.putSortable, t = C.dragEl, s = C.activeSortable, d = C.dispatchSortableEvent, u = C.hideGhostForTarget, f = C.unhideGhostForTarget; if (!!l) { var c = o || s; u(); var m = l.changedTouches && l.changedTouches.length ? l.changedTouches[0] : l, p = document.elementFromPoint(m.clientX, m.clientY); f(), c && !c.el.contains(p) && (d("spill"), this.onSpill({ dragEl: t, putSortable: o })) } }; function Revert() {} Revert.prototype = { startIndex: null, dragStart: function A(C) { var l = C.oldDraggableIndex; this.startIndex = l }, onSpill: function A(C) { var l = C.dragEl, o = C.putSortable; this.sortable.captureAnimationState(), o && o.captureAnimationState(); var t = getChild(this.sortable.el, this.startIndex, this.options); t ? this.sortable.el.insertBefore(l, t) : this.sortable.el.appendChild(l), this.sortable .animateAll(), o && o.animateAll() }, drop }, _extends$1(Revert, { pluginName: "revertOnSpill" }); function Remove() {} Remove.prototype = { onSpill: function A(C) { var l = C.dragEl, o = C.putSortable, t = o || this.sortable; t.captureAnimationState(), l.parentNode && l.parentNode.removeChild(l), t.animateAll() }, drop }, _extends$1(Remove, { pluginName: "removeOnSpill" }), Sortable.mount(new AutoScrollPlugin), Sortable.mount(Remove, Revert); function removeNode(A) { A.parentElement !== null && A.parentElement.removeChild(A) } function insertNodeAt(A, C, l) { const o = l === 0 ? A.children[0] : A.children[l - 1].nextSibling; A.insertBefore(C, o) } function getConsole() { return typeof window < "u" ? window.console : global.console } const console$1 = getConsole(); function cached(A) { const C = Object.create(null); return function(o) { return C[o] || (C[o] = A(o)) } } const regex = /-(\w)/g, camelize = cached(A => A.replace(regex, (C, l) => l.toUpperCase())), manageAndEmit$1 = ["Start", "Add", "Remove", "Update", "End"], emit$1 = ["Choose", "Unchoose", "Sort", "Filter", "Clone"], manage$1 = ["Move"], eventHandlerNames = [manage$1, manageAndEmit$1, emit$1].flatMap(A => A).map(A => `on${A}`), events = { manage: manage$1, manageAndEmit: manageAndEmit$1, emit: emit$1 }; function isReadOnly(A) { return eventHandlerNames.indexOf(A) !== -1 } const tags = ["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 isHtmlTag(A) { return tags.includes(A) } function isTransition(A) { return ["transition-group", "TransitionGroup"].includes(A) } function isHtmlAttribute(A) { return ["id", "class", "role", "style"].includes(A) || A.startsWith("data-") || A.startsWith("aria-") || A .startsWith("on") } function project(A) { return A.reduce((C, [l, o]) => (C[l] = o, C), {}) } function getComponentAttributes({ $attrs: A, componentData: C = {} }) { return { ...project(Object.entries(A).filter(([o, t]) => isHtmlAttribute(o))), ...C } } function createSortableOption({ $attrs: A, callBackBuilder: C }) { const l = project(getValidSortableEntries(A)); Object.entries(C).forEach(([t, s]) => { events[t].forEach(d => { l[`on${d}`] = s(d) }) }); const o = `[data-draggable]${l.draggable||""}`; return { ...l, draggable: o } } function getValidSortableEntries(A) { return Object.entries(A).filter(([C, l]) => !isHtmlAttribute(C)).map(([C, l]) => [camelize(C), l]).filter(([ C, l ]) => !isReadOnly(C)) } const getHtmlElementFromNode = ({ el: A }) => A, addContext = (A, C) => A.__draggable_context = C, getContext = A => A.__draggable_context; class ComponentStructure { constructor({ nodes: { header: C, default: l, footer: o }, root: t, realList: s }) { this.defaultNodes = l, this.children = [...C, ...l, ...o], this.externalComponent = t .externalComponent, this.rootTransition = t.transition, this.tag = t.tag, this.realList = s } get _isRootComponent() { return this.externalComponent || this.rootTransition } render(C, l) { const { tag: o, children: t, _isRootComponent: s } = this; return C(o, l, s ? { default: () => t } : t) } updated() { const { defaultNodes: C, realList: l } = this; C.forEach((o, t) => { addContext(getHtmlElementFromNode(o), { element: l[t], index: t }) }) } getUnderlyingVm(C) { return getContext(C) } getVmIndexFromDomIndex(C, l) { const { defaultNodes: o } = this, { length: t } = o, s = l.children, d = s.item(C); if (d === null) return t; const u = getContext(d); if (u) return u.index; if (t === 0) return 0; const f = getHtmlElementFromNode(o[0]), c = [...s].findIndex(m => m === f); return C < c ? 0 : t } } function getSlot(A, C) { const l = A[C]; return l ? l() : [] } function computeNodes({ $slots: A, realList: C, getKey: l }) { const o = C || [], [t, s] = ["header", "footer"].map(f => getSlot(A, f)), { item: d } = A; if (!d) throw new Error("draggable element must have an item slot"); const u = o.flatMap((f, c) => d({ element: f, index: c }).map(m => (m.key = l(f), m.props = { ...m.props || {}, "data-draggable": !0 }, m))); if (u.length !== o.length) throw new Error("Item slot must have only one child"); return { header: t, footer: s, default: u } } function getRootInformation(A) { const C = isTransition(A), l = !isHtmlTag(A) && !C; return { transition: C, externalComponent: l, tag: l ? vue.resolveComponent(A) : C ? vue.TransitionGroup : A } } function computeComponentStructure({ $slots: A, tag: C, realList: l, getKey: o }) { const t = computeNodes({ $slots: A, realList: l, getKey: o }), s = getRootInformation(C); return new ComponentStructure({ nodes: t, root: s, realList: l }) } function emit(A, C) { vue.nextTick(() => this.$emit(A.toLowerCase(), C)) } function manage(A) { return (C, l) => { if (this.realList !== null) return this[`onDrag${A}`](C, l) } } function manageAndEmit(A) { const C = manage.call(this, A); return (l, o) => { C.call(this, l, o), emit.call(this, A, l) } } let draggingElement = null; const props = { list: { type: Array, required: !1, default: null }, modelValue: { type: Array, required: !1, default: null }, itemKey: { type: [String, Function], required: !0 }, clone: { type: Function, default: A => A }, tag: { type: String, default: "div" }, move: { type: Function, default: null }, componentData: { type: Object, required: !1, default: null } }, emits = ["update:modelValue", "change", ...[...events.manageAndEmit, ...events.emit].map(A => A .toLowerCase())], draggableComponent = vue.defineComponent({ name: "draggable", inheritAttrs: !1, props, emits, data() { return { error: !1 } }, render() { try { this.error = !1; const { $slots: A, $attrs: C, tag: l, componentData: o, realList: t, getKey: s } = this, d = computeComponentStructure({ $slots: A, tag: l, realList: t, getKey: s }); this.componentStructure = d; const u = getComponentAttributes({ $attrs: C, componentData: o }); return d.render(vue.h, u) } catch (A) { return this.error = !0, vue.h("pre", { style: { color: "red" } }, A.stack) } }, created() { this.list !== null && this.modelValue !== null && console$1.error( "modelValue and list props are mutually exclusive! Please set one or another.") }, mounted() { if (this.error) return; const { $attrs: A, $el: C, componentStructure: l } = this; l.updated(); const o = createSortableOption({ $attrs: A, callBackBuilder: { manageAndEmit: s => manageAndEmit.call(this, s), emit: s => emit.bind(this, s), manage: s => manage.call(this, s) } }), t = C.nodeType === 1 ? C : C.parentElement; this._sortable = new Sortable(t, o), this.targetDomElement = t, t.__draggable_component__ = this }, updated() { this.componentStructure.updated() }, beforeUnmount() { this._sortable !== void 0 && this._sortable.destroy() }, computed: { realList() { const { list: A } = this; return A || this.modelValue }, getKey() { const { itemKey: A } = this; return typeof A == "function" ? A : C => C[A] } }, watch: { $attrs: { handler(A) { const { _sortable: C } = this; !C || getValidSortableEntries(A).forEach(([l, o]) => { C.option(l, o) }) }, deep: !0 } }, methods: { getUnderlyingVm(A) { return this.componentStructure.getUnderlyingVm(A) || null }, getUnderlyingPotencialDraggableComponent(A) { return A.__draggable_component__ }, emitChanges(A) { vue.nextTick(() => this.$emit("change", A)) }, alterList(A) { if (this.list) { A(this.list); return } const C = [...this.modelValue]; A(C), this.$emit("update:modelValue", C) }, spliceList() { const A = C => C.splice(...arguments); this.alterList(A) }, updatePosition(A, C) { const l = o => o.splice(C, 0, o.splice(A, 1)[0]); this.alterList(l) }, getRelatedContextFromMoveEvent({ to: A, related: C }) { const l = this.getUnderlyingPotencialDraggableComponent(A); if (!l) return { component: l }; const o = l.realList, t = { list: o, component: l }; return A !== C && o ? { ...l.getUnderlyingVm(C) || {}, ...t } : t }, getVmIndexFromDomIndex(A) { return this.componentStructure.getVmIndexFromDomIndex(A, this.targetDomElement) }, onDragStart(A) { this.context = this.getUnderlyingVm(A.item), A.item._underlying_vm_ = this.clone(this .context.element), draggingElement = A.item }, onDragAdd(A) { const C = A.item._underlying_vm_; if (C === void 0) return; removeNode(A.item); const l = this.getVmIndexFromDomIndex(A.newIndex); this.spliceList(l, 0, C); const o = { element: C, newIndex: l }; this.emitChanges({ added: o }) }, onDragRemove(A) { if (insertNodeAt(this.$el, A.item, A.oldIndex), A.pullMode === "clone") { removeNode(A.clone); return } const { index: C, element: l } = this.context; this.spliceList(C, 1); const o = { element: l, oldIndex: C }; this.emitChanges({ removed: o }) }, onDragUpdate(A) { removeNode(A.item), insertNodeAt(A.from, A.item, A.oldIndex); const C = this.context.index, l = this.getVmIndexFromDomIndex(A.newIndex); this.updatePosition(C, l); const o = { element: this.context.element, oldIndex: C, newIndex: l }; this.emitChanges({ moved: o }) }, computeFutureIndex(A, C) { if (!A.element) return 0; const l = [...C.to.children].filter(d => d.style.display !== "none"), o = l.indexOf(C.related), t = A.component.getVmIndexFromDomIndex(o); return l.indexOf(draggingElement) !== -1 || !C.willInsertAfter ? t : t + 1 }, onDragMove(A, C) { const { move: l, realList: o } = this; if (!l || !o) return !0; const t = this.getRelatedContextFromMoveEvent(A), s = this.computeFutureIndex(t, A), d = { ...this.context, futureIndex: s }, u = { ...A, relatedContext: t, draggedContext: d }; return l(u, C) }, onDragEnd() { draggingElement = null } } }); function createMenu() { return [{ name: "main", title: "\u8868\u5355\u7EC4\u4EF6", list: [input, number, radio, checkbox, select, _switch, time, date, slider, rate, color, cascader, upload, transfer, tree, editor ] }, { name: "aide", title: "\u8F85\u52A9\u7EC4\u4EF6", list: [alert, button, span, divider] }, { name: "layout", title: "\u5E03\u5C40\u7EC4\u4EF6", list: [row, tab, space] }] } const viewForm = formCreate__default.default, designerForm = formCreate__default.default.factory(), FcDesigner_vue_vue_type_style_index_0_lang = "", _sfc_main$7 = vue.defineComponent({ name: "FcDesigner", components: { draggable: draggableComponent, DragForm: designerForm.$form(), ViewForm: viewForm.$form() }, props: ["menu", "height", "config", "mask"], setup(A) { const { menu: C, height: l, config: o, mask: t } = vue.toRefs(A), s = vue.getCurrentInstance(); vue.provide("fcx", vue.ref({ active: null })), vue.provide("designer", s.ctx); const d = vue.computed(() => { const c = l.value; return c ? is.Number(c) ? `${c}px` : c : "100%" }), u = vue.reactive({ cacheProps: {}, moveRule: null, addRule: null, added: null, activeTab: "form", activeRule: null, children: vue.ref([]), menuList: C.value || createMenu(), showBaseRule: !1, visible: { preview: !1 }, preview: { state: !1, rule: [], option: {} }, dragForm: vue.ref({ rule: [], api: {} }), form: { rule: form(), option: { form: { labelPosition: "top", size: "small" }, submitBtn: !1 }, value: { form: { inline: !1, hideRequiredAsterisk: !1, labelPosition: "right", size: "small", labelWidth: "125px", formCreateSubmitBtn: !0, formCreateResetBtn: !1 }, submitBtn: !1 } }, baseForm: { rule: field(), api: {}, options: { form: { labelPosition: "top", size: "small" }, submitBtn: !1, mounted: c => { c.activeRule = u.activeRule, c.setValue(c.options.formData || {}) } } }, validateForm: { rule: validate(), api: {}, options: { form: { labelPosition: "top", size: "small" }, submitBtn: !1, mounted: c => { c.activeRule = u.activeRule, c.setValue(c.options.formData || {}) } } }, propsForm: { rule: [], api: {}, options: { form: { labelPosition: "top", size: "small" }, submitBtn: !1, mounted: c => { c.activeRule = u.activeRule, c.setValue(c.options.formData || {}) } } } }); vue.watch(() => u.preview.state, function(c) { c || vue.nextTick(() => { u.preview.rule = u.preview.option = null }) }); const f = { makeChildren(c) { return vue.reactive({ children: c }).children }, addMenu(c) { if (!c.name || !c.list) return; let m = !0; u.menuList.forEach((p, b) => { p.name === c.name && (u.menuList[b] = c, m = !1) }), m && u.menuList.push(c) }, removeMenu(c) { [...u.menuList].forEach((m, p) => { m.name === c && u.menuList.splice(p, 1) }) }, setMenuItem(c, m) { u.menuList.forEach(p => { p.name === c && (p.list = m) }) }, appendMenuItem(c, m) { u.menuList.forEach(p => { p.name === c && p.list.push(m) }) }, removeMenuItem(c) { u.menuList.forEach(m => { let p; is.String(c) ? [...m.list].forEach((b, x) => { b.name === c && m.list.splice(x, 1) }) : (p = m.list.indexOf(c)) > -1 && m.list.splice(p, 1) }) }, addComponent(c) { Array.isArray(c) ? c.forEach(m => { ruleList[m.name] = m }) : ruleList[c.name] = c }, getParent(c) { let m = c.__fc__.parent.rule; const p = m.config; return p && p.config.inside && (c = m, m = m.__fc__.parent.rule), { root: m, parent: c } }, makeDrag(c, m, p, b) { return { type: "DragBox", wrap: { show: !1 }, col: { show: !1 }, inject: !0, props: { rule: { props: { tag: "el-col", group: c === !0 ? "default" : c, ghostClass: "ghost", animation: 150, handle: "._fc-drag-btn", emptyInsertThreshold: 0, direction: "vertical", itemKey: "type" } }, tag: m }, children: p, on: b } }, clearDragRule() { f.setRule([]) }, makeDragRule(c) { return f.makeChildren([f.makeDrag(!0, "draggable", c, { add: (m, p) => f.dragAdd(c, p), end: (m, p) => f.dragEnd(c, p), start: (m, p) => f.dragStart(c, p), unchoose: (m, p) => f.dragUnchoose(c, p) })]) }, previewFc() { u.preview.state = !0, u.preview.rule = f.getRule(), u.preview.option = f.getOption() }, getRule() { return f.parseRule(deepCopy(u.dragForm.api.rule[0].children)) }, getJson() { return designerForm.toJson(f.getRule()) }, getOption() { const c = deepCopy(u.form.value); return c.submitBtn = c.form.formCreateSubmitBtn, c.resetBtn = c.form .formCreateResetBtn, delete c.form.formCreateSubmitBtn, delete c.form .formCreateResetBtn, c }, setRule(c) { u.children = f.makeChildren(f.loadRule(is.String(c) ? designerForm.parseJson(c) : c)), f.clearActiveRule(), u.dragForm.rule = f.makeDragRule(u.children) }, clearActiveRule() { u.activeRule = null, u.activeTab = "form" }, setOption(c) { let m = { ...c }; m.form.formCreateSubmitBtn = !!m.submitBtn, m.form.formCreateResetBtn = !!m .resetBtn, m.submitBtn = !1, delete m.resetBtn, c.form.value = m }, loadRule(c) { const m = []; return c.forEach(p => { if (is.String(p)) return m.push(p); const b = ruleList[p._fc_drag_tag] || ruleList[p.type], x = p.children; if (p.children = [], p.control && (p._control = p.control, delete p .control), b) { if (p = f.makeRule(b, p), x) { let g = p.children[0].children; b.drag && (g = g[0].children), g.push(...f.loadRule(x)) } } else x && (p.children = f.loadRule(x)); m.push(p) }), m }, parseRule(c) { return [...c].reduce((m, p) => is.String(p) ? (m.push(p), m) : p.type === "DragBox" ? (m.push(...f.parseRule(p.children)), m) : p.type === "DragTool" && (p = p.children[0], p.type === "DragBox") ? (m.push(...f .parseRule(p.children)), m) : (p && (p = { ...p }, p.children.length && (p.children = f.parseRule(p.children)), delete p._id, p.config && delete p.config.config, p.effect && ( delete p.effect._fc, delete p.effect._fc_tool), p._control && (p .control = p._control, delete p._control), Object.keys(p) .filter(b => Array.isArray(p[b]) && p[b].length === 0 || is.Object( p[b]) && Object.keys(p[b]).length === 0).forEach(b => { delete p[b] }), m.push(p)), m), []) }, baseChange(c, m, p, b) { u.activeRule && b[u.activeRule._id] === u.activeRule && (u.activeRule[c] = m) }, propRemoveField(c, m, p) { if (u.activeRule && p[u.activeRule._id] === u.activeRule) if (u.dragForm.api.sync(u.activeRule), c.indexOf("formCreate") === 0) { if (c = c.replace("formCreate", ""), !c) return; c = lower(c), c.indexOf("effect") === 0 && c.indexOf(">") > -1 ? delete u .activeRule.effect[c.split(">")[1]] : c.indexOf("props") === 0 && c .indexOf(">") > -1 ? delete u.activeRule.props[c.split(">")[1]] : c === "child" ? delete u.activeRule.children[0] : c && (u.activeRule[c] = void 0) } else delete u.activeRule.props[c] }, propChange(c, m, p, b) { if (u.activeRule && b[u.activeRule._id] === u.activeRule) if (c.indexOf("formCreate") === 0) { if (c = c.replace("formCreate", ""), !c) return; c = lower(c), c.indexOf("effect") === 0 && c.indexOf(">") > -1 ? u .activeRule.effect[c.split(">")[1]] = m : c.indexOf("props") === 0 && c .indexOf(">") > -1 ? u.activeRule.props[c.split(">")[1]] = m : c === "child" ? u.activeRule.children[0] = m : u.activeRule[c] = m } else u.activeRule.props[c] = m }, validateChange(c) { !u.activeRule || u.validateForm.api[u.activeRule._id] !== u.activeRule || (u .activeRule.validate = c.validate || [], u.dragForm.api.refreshValidate(), u .dragForm.api.nextTick(() => { u.dragForm.api.clearValidateState(u.activeRule.field) })) }, toolActive(c) { u.activeRule && (delete u.propsForm.api[u.activeRule._id], delete u.baseForm.api[u .activeRule._id], delete u.validateForm.api[u.activeRule._id]), u .activeRule = c, vue.nextTick(() => { u.activeTab = "props", vue.nextTick(() => { u.propsForm.api[u.activeRule._id] = u.activeRule, u.baseForm .api[u.activeRule._id] = u.activeRule, u.validateForm .api[u.activeRule._id] = u.activeRule }) }), u.cacheProps[c._id] || (u.cacheProps[c._id] = c.config.config.props(c)), u .propsForm.rule = u.cacheProps[c._id]; const m = { ...c.props, formCreateChild: c.children[0] }; Object.keys(c).forEach(p => { ["effect", "config", "payload", "id", "type"].indexOf(p) < 0 && (m[ "formCreate" + upper(p)] = c[p]) }), ["props", "effect"].forEach(p => { c[p] && Object.keys(c[p]).forEach(b => { m["formCreate" + upper(p) + ">" + b] = c[p][b] }) }), u.propsForm.options.formData = m, u.showBaseRule = hasProperty(c, "field") && c.input !== !1 && (!o.value || o.value.showBaseForm !== !1), u .showBaseRule && (u.baseForm.options.formData = { field: c.field, title: c.title || "", info: c.info, _control: c._control }, u.validateForm.options.formData = { validate: c.validate ? [...c.validate] : [] }) }, dragStart(c) { console.log("dragStart"), u.moveRule = c, u.added = !1 }, dragUnchoose(c, m) { console.log("dragUnchoose"), u.addRule = { children: c, oldIndex: m.oldIndex } }, dragAdd(c, m) { console.log("dragAdd"); const p = m.newIndex, b = m.item._underlying_vm_; if (!b || b.__fc__) { if (u.addRule) { const x = u.addRule.children.splice(u.addRule.oldIndex, 1); c.splice(p, 0, x[0]) } } else { const x = f.makeRule(ruleList[b.name]); c.splice(p, 0, x) } u.added = !0 }, dragEnd(c, { newIndex: m, oldIndex: p }) { if (console.log("dragEnd"), !u.added && !(u.moveRule === c && m === p)) { const b = u.moveRule.splice(p, 1); c.splice(m, 0, b[0]) } u.moveRule = null, u.addRule = null, u.added = !1 }, makeRule(c, m) { const p = m || c.rule(); p.config = { config: c }, p.effect || (p.effect = {}), p.effect._fc = !0, p._fc_drag_tag = c.name; let b; if (c.drag && p.children.push(b = f.makeDrag(c.drag, p.type, f.makeChildren([]), { end: (g, y) => f.dragEnd(g.self.children, y), add: (g, y) => f.dragAdd(g.self.children, y), start: (g, y) => f.dragStart(g.self.children, y), unchoose: (g, y) => f.dragUnchoose(g.self.children, y) })), c.children && !m) { const g = f.makeRule(ruleList[c.children]); (b || p).children.push(g) } const x = t.value !== void 0 ? t.value !== !1 : c.mask !== !1; return c.inside ? (p.children = f.makeChildren([{ type: "DragTool", props: { dragBtn: c.dragBtn !== !1, children: c.children, mask: x }, effect: { _fc_tool: !0 }, inject: !0, on: { delete: ({ self: g }) => { const y = f.getParent(g).parent; y.__fc__.rm(), s.emit("delete", y), f .clearActiveRule() }, create: ({ self: g }) => { const y = f.getParent(g); s.emit("create", y.parent), y.root.children.splice(y .root.children.indexOf(y.parent) + 1, 0, f .makeRule(y.parent.config.config)) }, addChild: ({ self: g }) => { const y = f.getParent(g), S = y.parent.config.config, w = ruleList[S.children]; !w || (S.drag ? y.parent.children[0] : y.parent) .children[0].children.push(f.makeRule(w)) }, copy: ({ self: g }) => { const y = f.getParent(g); s.emit("copy", y.parent), y.root.children.splice(y .root.children.indexOf(y.parent) + 1, 0, designerForm.copyRule(y.parent)) }, active: ({ self: g }) => { const y = f.getParent(g); s.emit("active", y.parent), f.toolActive(y.parent) } }, children: p.children }]), p) : { type: "DragTool", props: { dragBtn: c.dragBtn !== !1, children: c.children, mask: x }, effect: { _fc_tool: !0 }, inject: !0, on: { delete: ({ self: g }) => { s.emit("delete", g.children[0]), g.__fc__.rm(), f .clearActiveRule() }, create: ({ self: g }) => { s.emit("create", g.children[0]); const y = f.getParent(g); y.root.children.splice(y.root.children.indexOf(y.parent) + 1, 0, f.makeRule(g.children[0].config.config)) }, addChild: ({ self: g }) => { const y = g.children[0].config.config, S = ruleList[y.children]; !S || (y.drag ? g.children[0] : g).children[0].children.push(f .makeRule(S)) }, copy: ({ self: g }) => { s.emit("copy", g.children[0]); const y = f.getParent(g); y.root.children.splice(y.root.children.indexOf(y.parent) + 1, 0, designerForm.copyRule(y.parent)) }, active: ({ self: g }) => { s.emit("active", g.children[0]), f.toolActive(g.children[0]) } }, children: f.makeChildren([p]) } } }; return u.dragForm.rule = f.makeDragRule(f.makeChildren(u.children)), { ...vue.toRefs(u), ...f, dragHeight: d } }, created() { document.body.ondrop = A => { A.preventDefault(), A.stopPropagation() } } }), _hoisted_1$5 = { class: "_fc-l-title" }, _hoisted_2$3 = { class: "_fc-l-item" }, _hoisted_3$3 = { class: "_fc-l-icon" }, _hoisted_4$2 = { class: "_fc-l-name" }, _hoisted_5$1 = vue.createElementVNode("i", { class: "fc-icon icon-preview" }, null, -1), _hoisted_6$1 = vue.createElementVNode("i", { class: "fc-icon icon-delete" }, null, -1), _hoisted_7$1 = { class: "_fc-m-drag" }; function _sfc_render$6(A, C, l, o, t, s) { const d = vue.resolveComponent("draggable"), u = vue.resolveComponent("el-aside"), f = vue.resolveComponent("el-button"), c = vue.resolveComponent("el-popconfirm"), m = vue.resolveComponent("el-header"), p = vue.resolveComponent("DragForm"), b = vue.resolveComponent("ElMain"), x = vue.resolveComponent("ElContainer"), g = vue.resolveComponent("ElDivider"), y = vue.resolveComponent("ElAside"), S = vue.resolveComponent("ViewForm"), w = vue.resolveComponent("ElDialog"); return vue.openBlock(), vue.createBlock(x, { class: "_fc-designer", style: vue.normalizeStyle("height:" + A.dragHeight) }, { default: vue.withCtx(() => [vue.createVNode(b, null, { default: vue.withCtx(() => [vue.createVNode(x, { style: { height: "100%" } }, { default: vue.withCtx(() => [vue.createVNode(u, { class: "_fc-l", width: "266px" }, { default: vue.withCtx(() => [(vue .openBlock(!0), vue .createElementBlock( vue.Fragment, null, vue .renderList(A .menuList, ( E, I) => (vue.openBlock(), vue .createElementBlock( "div", { key: I, class: "_fc-l-group" }, [vue .createElementVNode( "h4", _hoisted_1$5, vue .toDisplayString( E .title ), 1 ), vue .createVNode( d, { group: { name: "default", pull: "clone", put: ! 1 }, sort: ! 1, itemKey: "name", list: E .list }, { item: vue .withCtx( ({ element: D }) => [ vue .createElementVNode( "div", _hoisted_2$3, [vue.createElementVNode( "div", _hoisted_3$3, [vue.createElementVNode( "i", { class: vue .normalizeClass( ["fc-icon", D .icon || "icon-input" ] ) }, null, 2 )] ), vue .createElementVNode( "span", _hoisted_4$2, vue .toDisplayString( D .label ), 1 ) ] ) ] ), _: 2 }, 1032, [ "list"] ) ])) ), 128))]), _: 1 }), vue.createVNode(x, { class: "_fc-m" }, { default: vue.withCtx(() => [vue .createVNode(m, { class: "_fc-m-tools", height: "45" }, { default: vue .withCtx( () => [vue .renderSlot( A .$slots, "handle" ), vue .createVNode( f, { type: "primary", plain: "", round: "", size: "small", onClick: A .previewFc }, { default: vue .withCtx( () => [ _hoisted_5$1, vue .createTextVNode( " \u9884 \u89C8 " ) ] ), _: 1 }, 8, [ "onClick"] ), vue .createVNode( c, { title: "\u6E05\u7A7A\u540E\u5C06\u4E0D\u80FD\u6062\u590D\uFF0C\u786E\u5B9A\u8981\u6E05\u7A7A\u5417\uFF1F", width: "200px", "confirm-button-text": "\u6E05\u7A7A", "cancel-button-text": "\u53D6\u6D88", onConfirm: A .clearDragRule }, { reference: vue .withCtx( () => [ vue .createVNode( f, { type: "danger", plain: "", round: "", size: "small" }, { default: vue .withCtx( () => [ _hoisted_6$1, vue .createTextVNode( "\u6E05 \u7A7A " ) ] ), _: 1 } ) ] ), _: 1 }, 8, [ "onConfirm"] ) ]), _: 3 }), vue.createVNode(b, { style: { background: "#F5F5F5", padding: "20px" } }, { default: vue .withCtx( () => [vue .createElementVNode( "div", _hoisted_7$1, [vue.createVNode( p, { rule: A .dragForm .rule, option: A .form .value, api: A .dragForm .api, "onUpdate:api": C[ 0 ] || (C[0] = E => A .dragForm .api = E ) }, null, 8, ["rule", "option", "api" ] )] ) ]), _: 1 }) ]), _: 3 }), vue.createVNode(y, { class: "_fc-r", width: "320px" }, { default: vue.withCtx(() => [vue .createVNode(x, { style: { height: "100%" } }, { default: vue .withCtx( () => [vue .createVNode( m, { height: "40px", class: "_fc-r-tabs" }, { default: vue .withCtx( () => [ A .activeRule ? (vue.openBlock(), vue .createElementBlock( "div", { key: 0, class: vue .normalizeClass( ["_fc-r-tab", { active: A .activeTab === "props" }] ), onClick: C[ 1 ] || (C[1] = E => A .activeTab = "props" ) }, "\u7EC4\u4EF6\u914D\u7F6E ", 2 ) ) : vue .createCommentVNode( "", ! 0 ), vue .createElementVNode( "div", { class: vue .normalizeClass( ["_fc-r-tab", { active: A .activeTab === "form" && ! ! A .activeRule }] ), onClick: C[ 2 ] || (C[2] = E => A .activeTab = "form" ) }, "\u8868\u5355\u914D\u7F6E ", 2 ) ] ), _: 1 } ), vue .withDirectives( vue .createVNode( b, null, { default: vue .withCtx( () => [ vue .createVNode( p, { rule: A .form .rule, option: A .form .option, modelValue: A .form .value .form, "onUpdate:modelValue": C[ 3 ] || (C[3] = E => A .form .value .form = E ) }, null, 8, ["rule", "option", "modelValue" ] ) ] ), _: 1 }, 512 ), [ [vue.vShow, A .activeTab === "form" ] ] ), vue .withDirectives( (vue.openBlock(), vue .createBlock( b, { style: { padding: "0 20px" }, key: A .activeRule ? A .activeRule ._id : "" }, { default: vue .withCtx( () => [ vue .createElementVNode( "div", null, [A.showBaseRule ? (vue.openBlock(), vue .createBlock( g, { key: 0 }, { default: vue .withCtx( () => [ vue .createTextVNode( "\u57FA\u7840\u914D\u7F6E" ) ] ), _: 1 } ) ) : vue .createCommentVNode( "", ! 0 ), vue .withDirectives( vue .createVNode( p, { api: A .baseForm .api, "onUpdate:api": C[ 4 ] || (C[4] = E => A .baseForm .api = E ), rule: A .baseForm .rule, option: A .baseForm .options, onChange: A .baseChange }, null, 8, ["api", "rule", "option", "onChange" ] ), [ [vue.vShow, A .showBaseRule ] ] ), vue .createVNode( g, null, { default: vue .withCtx( () => [ vue .createTextVNode( "\u5C5E\u6027\u914D\u7F6E" ) ] ), _: 1 } ), vue .createVNode( p, { api: A .propsForm .api, "onUpdate:api": C[ 5 ] || (C[5] = E => A .propsForm .api = E ), rule: A .propsForm .rule, option: A .propsForm .options, onChange: A .propChange, onRemoveField: A .propRemoveField }, null, 8, ["api", "rule", "option", "onChange", "onRemoveField" ] ), A .showBaseRule ? (vue.openBlock(), vue .createBlock( g, { key: 1 }, { default: vue .withCtx( () => [ vue .createTextVNode( "\u9A8C\u8BC1\u89C4\u5219" ) ] ), _: 1 } ) ) : vue .createCommentVNode( "", ! 0 ), vue .withDirectives( vue .createVNode( p, { api: A .validateForm .api, "onUpdate:api": C[ 6 ] || (C[6] = E => A .validateForm .api = E ), rule: A .validateForm .rule, option: A .validateForm .options, "onUpdate:modelValue": A .validateChange }, null, 8, ["api", "rule", "option", "onUpdate:modelValue" ] ), [ [vue.vShow, A .showBaseRule ] ] ) ] ) ] ), _: 1 } ) ), [ [vue.vShow, A .activeTab === "props" ] ] ) ]), _: 1 }) ]), _: 1 }), vue.createVNode(w, { modelValue: A.preview.state, "onUpdate:modelValue": C[7] || (C[ 7] = E => A.preview.state = E), width: "800px", "append-to-body": "" }, { default: vue.withCtx(() => [A .preview.state ? (vue .openBlock(), vue .createBlock(S, { key: 0, rule: A .preview .rule, option: A .preview .option }, null, 8, [ "rule", "option" ])) : vue .createCommentVNode("", !0) ]), _: 1 }, 8, ["modelValue"])]), _: 3 })]), _: 3 })]), _: 3 }, 8, ["style"]) } const FcDesigner = _export_sfc(_sfc_main$7, [ ["render", _sfc_render$6] ]), DragTool_vue_vue_type_style_index_0_lang = ""; let uni$1 = 1; const _sfc_main$6 = vue.defineComponent({ name: "DragTool", props: ["dragBtn", "children", "unique", "mask"], setup(A) { const { unique: C } = vue.toRefs(A), l = vue.computed(() => C.value || uni$1++), o = vue.inject("fcx"); return { id: l, state: o } }, methods: { active() { this.state.active !== this.id && (this.state.active = this.id, this.$emit("active")) } }, beforeDestroy() { this.state = {} } }), _hoisted_1$4 = { key: 0, class: "drag-mask" }, _hoisted_2$2 = { class: "drag-l" }, _hoisted_3$2 = { key: 0, class: "drag-btn _fc-drag-btn", style: { cursor: "move" } }, _hoisted_4$1 = vue.createElementVNode("i", { class: "fc-icon icon-move" }, null, -1), _hoisted_5 = [_hoisted_4$1], _hoisted_6 = { class: "drag-r" }, _hoisted_7 = vue.createElementVNode("i", { class: "fc-icon icon-add" }, null, -1), _hoisted_8 = [_hoisted_7], _hoisted_9 = vue.createElementVNode("i", { class: "fc-icon icon-copy" }, null, -1), _hoisted_10 = [_hoisted_9], _hoisted_11 = vue.createElementVNode("i", { class: "fc-icon icon-add-child" }, null, -1), _hoisted_12 = [_hoisted_11], _hoisted_13 = vue.createElementVNode("i", { class: "fc-icon icon-delete" }, null, -1), _hoisted_14 = [_hoisted_13]; function _sfc_render$5(A, C, l, o, t, s) { return vue.openBlock(), vue.createElementBlock("div", { class: vue.normalizeClass(["drag-tool", { active: A.state.active === A.id }]), onClick: C[4] || (C[4] = vue.withModifiers((...d) => A.active && A.active(...d), ["stop"])) }, [A.mask ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4)) : vue .createCommentVNode("", !0), vue.createElementVNode("div", _hoisted_2$2, [A.state.active === A .id && A.dragBtn !== !1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, _hoisted_5)) : vue.createCommentVNode("", !0) ]), vue.createElementVNode("div", _hoisted_6, [vue.createElementVNode("div", { class: "drag-btn", onClick: C[0] || (C[0] = d => A.$emit("create")) }, _hoisted_8), vue.createElementVNode("div", { class: "drag-btn", onClick: C[1] || (C[1] = d => A.$emit("copy")) }, _hoisted_10), A.children ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, class: "drag-btn", onClick: C[2] || (C[2] = d => A.$emit("addChild")) }, _hoisted_12)) : vue.createCommentVNode("", !0), vue.createElementVNode("div", { class: "drag-btn drag-btn-danger", onClick: C[3] || (C[3] = d => A.$emit("delete")) }, _hoisted_14)]), vue.renderSlot(A.$slots, "default") ], 2) } const DragTool = _export_sfc(_sfc_main$6, [ ["render", _sfc_render$5] ]), codemirror$1 = ""; var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, codemirror = { exports: {} }, hasRequiredCodemirror; function requireCodemirror() { return hasRequiredCodemirror || (hasRequiredCodemirror = 1, function(A, C) { (function(l, o) { A.exports = o() })(commonjsGlobal, function() { var l = navigator.userAgent, o = navigator.platform, t = /gecko\/\d/i.test(l), s = /MSIE \d/.test(l), d = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(l), u = /Edge\/(\d+)/.exec(l), f = s || d || u, c = f && (s ? document.documentMode || 6 : +(u || d)[1]), m = !u && /WebKit\//.test(l), p = m && /Qt\/\d+\.\d+/.test(l), b = !u && /Chrome\/(\d+)/.exec(l), x = b && +b[1], g = /Opera\//.test(l), y = /Apple Computer/.test(navigator.vendor), S = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(l), w = /PhantomJS/.test(l), E = y && (/Mobile\/\w+/.test(l) || navigator.maxTouchPoints > 2), I = /Android/.test(l), D = E || I || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(l), R = E || /Mac/.test(o), L = /\bCrOS\b/.test(l), B = /win/i.test(o), j = g && l.match(/Version\/(\d*\.\d*)/); j && (j = Number(j[1])), j && j >= 15 && (g = !1, m = !0); var z = R && (p || g && (j == null || j < 12.11)), U = t || f && c >= 9; function N(e) { return new RegExp("(^|\\s)" + e + "(?:$|\\s)\\s*") } var H = function(e, n) { var i = e.className, r = N(n).exec(i); if (r) { var a = i.slice(r.index + r[0].length); e.className = i.slice(0, r.index) + (a ? r[1] + a : "") } }; function F(e) { for (var n = e.childNodes.length; n > 0; --n) e.removeChild(e.firstChild); return e } function V(e, n) { return F(e).appendChild(n) } function M(e, n, i, r) { var a = document.createElement(e); if (i && (a.className = i), r && (a.style.cssText = r), typeof n == "string") a .appendChild(document.createTextNode(n)); else if (n) for (var h = 0; h < n.length; ++h) a.appendChild(n[h]); return a } function k(e, n, i, r) { var a = M(e, n, i, r); return a.setAttribute("role", "presentation"), a } var G; document.createRange ? G = function(e, n, i, r) { var a = document.createRange(); return a.setEnd(r || e, i), a.setStart(e, n), a } : G = function(e, n, i) { var r = document.body.createTextRange(); try { r.moveToElementText(e.parentNode) } catch { return r } return r.collapse(!0), r.moveEnd("character", i), r.moveStart("character", n), r }; function J(e, n) { if (n.nodeType == 3 && (n = n.parentNode), e.contains) return e.contains(n); do if (n.nodeType == 11 && (n = n.host), n == e) return !0; while (n = n .parentNode) } function ee(e) { var n; try { n = e.activeElement } catch { n = e.body || null } for (; n && n.shadowRoot && n.shadowRoot.activeElement;) n = n.shadowRoot .activeElement; return n } function Z(e, n) { var i = e.className; N(n).test(i) || (e.className += (i ? " " : "") + n) } function te(e, n) { for (var i = e.split(" "), r = 0; r < i.length; r++) i[r] && !N(i[r]).test(n) && ( n += " " + i[r]); return n } var ue = function(e) { e.select() }; E ? ue = function(e) { e.selectionStart = 0, e.selectionEnd = e.value.length } : f && (ue = function(e) { try { e.select() } catch {} }); function ge(e) { return e.display.wrapper.ownerDocument } function ve(e) { return ge(e).defaultView } function ce(e) { var n = Array.prototype.slice.call(arguments, 1); return function() { return e.apply(null, n) } } function le(e, n, i) { n || (n = {}); for (var r in e) e.hasOwnProperty(r) && (i !== !1 || !n.hasOwnProperty(r)) && (n[ r] = e[r]); return n } function oe(e, n, i, r, a) { n == null && (n = e.search(/[^\s\u00a0]/), n == -1 && (n = e.length)); for (var h = r || 0, T = a || 0;;) { var P = e.indexOf(" ", h); if (P < 0 || P >= n) return T + (n - h); T += P - h, T += i - T % i, h = P + 1 } } var se = function() { this.id = null, this.f = null, this.time = 0, this.handler = ce(this.onTimeout, this) }; se.prototype.onTimeout = function(e) { e.id = 0, e.time <= +new Date ? e.f() : setTimeout(e.handler, e.time - + new Date) }, se.prototype.set = function(e, n) { this.f = n; var i = +new Date + e; (!this.id || i < this.time) && (clearTimeout(this.id), this.id = setTimeout(this .handler, e), this.time = i) }; function de(e, n) { for (var i = 0; i < e.length; ++i) if (e[i] == n) return i; return -1 } var Le = 50, De = { toString: function() { return "CodeMirror.Pass" } }, Fe = { scroll: !1 }, pt = { origin: "*mouse" }, Pt = { origin: "+move" }; function Je(e, n, i) { for (var r = 0, a = 0;;) { var h = e.indexOf(" ", r); h == -1 && (h = e.length); var T = h - r; if (h == e.length || a + T >= n) return r + Math.min(T, n - a); if (a += h - r, a += i - a % i, r = h + 1, a >= n) return r } } var ft = [""]; function ct(e) { for (; ft.length <= e;) ft.push(Me(ft) + " "); return ft[e] } function Me(e) { return e[e.length - 1] } function gt(e, n) { for (var i = [], r = 0; r < e.length; r++) i[r] = n(e[r], r); return i } function jt(e, n, i) { for (var r = 0, a = i(n); r < e.length && i(e[r]) <= a;) r++; e.splice(r, 0, n) } function At() {} function pn(e, n) { var i; return Object.create ? i = Object.create(e) : (At.prototype = e, i = new At), n && le(n, i), i } var Kt = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; function Nt(e) { return /\w/.test(e) || e > "\x80" && (e.toUpperCase() != e.toLowerCase() || Kt.test( e)) } function Lt(e, n) { return n ? n.source.indexOf("\\w") > -1 && Nt(e) ? !0 : n.test(e) : Nt(e) } function Xt(e) { for (var n in e) if (e.hasOwnProperty(n) && e[n]) return !1; return !0 } var Ot = /[\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 Ht(e) { return e.charCodeAt(0) >= 768 && Ot.test(e) } function nt(e, n, i) { for (; (i < 0 ? n > 0 : n < e.length) && Ht(e.charAt(n));) n += i; return n } function ze(e, n, i) { for (var r = n > i ? -1 : 1;;) { if (n == i) return n; var a = (n + i) / 2, h = r < 0 ? Math.ceil(a) : Math.floor(a); if (h == n) return e(h) ? n : i; e(h) ? i = h : n = h + r } } function wt(e, n, i, r) { if (!e) return r(n, i, "ltr", 0); for (var a = !1, h = 0; h < e.length; ++h) { var T = e[h]; (T.from < i && T.to > n || n == i && T.to == n) && (r(Math.max(T.from, n), Math .min(T.to, i), T.level == 1 ? "rtl" : "ltr", h), a = !0) } a || r(n, i, "ltr") } var He = null; function Ae(e, n, i) { var r; He = null; for (var a = 0; a < e.length; ++a) { var h = e[a]; if (h.from < n && h.to > n) return a; h.to == n && (h.from != h.to && i == "before" ? r = a : He = a), h.from == n && (h.from != h.to && i != "before" ? r = a : He = a) } return r != null ? r : He } var me = function() { var e = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN", n = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"; function i($) { return $ <= 247 ? e.charAt($) : 1424 <= $ && $ <= 1524 ? "R" : 1536 <= $ && $ <= 1785 ? n.charAt($ - 1536) : 1774 <= $ && $ <= 2220 ? "r" : 8192 <= $ && $ <= 8203 ? "w" : $ == 8204 ? "b" : "L" } var r = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/, a = /[stwN]/, h = /[LRr]/, T = /[Lb1n]/, P = /[1n]/; function O($, Y, Q) { this.level = $, this.from = Y, this.to = Q } return function($, Y) { var Q = Y == "ltr" ? "L" : "R"; if ($.length == 0 || Y == "ltr" && !r.test($)) return !1; for (var _ = $.length, q = [], ie = 0; ie < _; ++ie) q.push(i($ .charCodeAt(ie))); for (var ae = 0, fe = Q; ae < _; ++ae) { var he = q[ae]; he == "m" ? q[ae] = fe : fe = he } for (var ye = 0, pe = Q; ye < _; ++ye) { var Ee = q[ye]; Ee == "1" && pe == "r" ? q[ye] = "n" : h.test(Ee) && (pe = Ee, Ee == "r" && (q[ye] = "R")) } for (var Ie = 1, we = q[0]; Ie < _ - 1; ++Ie) { var Be = q[Ie]; Be == "+" && we == "1" && q[Ie + 1] == "1" ? q[Ie] = "1" : Be == "," && we == q[Ie + 1] && (we == "1" || we == "n") && (q[Ie] = we), we = Be } for (var Ye = 0; Ye < _; ++Ye) { var st = q[Ye]; if (st == ",") q[Ye] = "N"; else if (st == "%") { var Xe = void 0; for (Xe = Ye + 1; Xe < _ && q[Xe] == "%"; ++Xe); for (var Mt = Ye && q[Ye - 1] == "!" || Xe < _ && q[Xe] == "1" ? "1" : "N", Ct = Ye; Ct < Xe; ++Ct) q[Ct] = Mt; Ye = Xe - 1 } } for (var et = 0, Tt = Q; et < _; ++et) { var dt = q[et]; Tt == "L" && dt == "1" ? q[et] = "L" : h.test(dt) && (Tt = dt) } for (var it = 0; it < _; ++it) if (a.test(q[it])) { var tt = void 0; for (tt = it + 1; tt < _ && a.test(q[tt]); ++tt); for (var qe = (it ? q[it - 1] : Q) == "L", Dt = (tt < _ ? q[ tt] : Q) == "L", ar = qe == Dt ? qe ? "L" : "R" : Q, Rn = it; Rn < tt; ++Rn) q[Rn] = ar; it = tt - 1 } for (var ht = [], nn, ut = 0; ut < _;) if (T.test(q[ut])) { var fo = ut; for (++ut; ut < _ && T.test(q[ut]); ++ut); ht.push(new O(0, fo, ut)) } else { var hn = ut, $n = ht.length, Un = Y == "rtl" ? 1 : 0; for (++ut; ut < _ && q[ut] != "L"; ++ut); for (var yt = hn; yt < ut;) if (P.test(q[yt])) { hn < yt && (ht.splice($n, 0, new O(1, hn, yt)), $n += Un); var lr = yt; for (++yt; yt < ut && P.test(q[yt]); ++yt); ht.splice($n, 0, new O(2, lr, yt)), $n += Un, hn = yt } else ++yt; hn < ut && ht.splice($n, 0, new O(1, hn, ut)) } return Y == "ltr" && (ht[0].level == 1 && (nn = $.match( /^\s+/)) && (ht[0].from = nn[0].length, ht.unshift(new O(0, 0, nn[0].length))), Me(ht).level == 1 && (nn = $.match( /\s+$/)) && (Me(ht).to -= nn[0].length, ht.push(new O(0, _ - nn[ 0].length, _)))), Y == "rtl" ? ht.reverse() : ht } }(); function Re(e, n) { var i = e.order; return i == null && (i = e.order = me(e.text, n)), i } var xe = [], ne = function(e, n, i) { if (e.addEventListener) e.addEventListener(n, i, !1); else if (e.attachEvent) e.attachEvent("on" + n, i); else { var r = e._handlers || (e._handlers = {}); r[n] = (r[n] || xe).concat(i) } }; function Te(e, n) { return e._handlers && e._handlers[n] || xe } function Se(e, n, i) { if (e.removeEventListener) e.removeEventListener(n, i, !1); else if (e.detachEvent) e.detachEvent("on" + n, i); else { var r = e._handlers, a = r && r[n]; if (a) { var h = de(a, i); h > -1 && (r[n] = a.slice(0, h).concat(a.slice(h + 1))) } } } function be(e, n) { var i = Te(e, n); if (!!i.length) for (var r = Array.prototype.slice.call(arguments, 2), a = 0; a < i.length; ++a) i[a].apply(null, r) } function Oe(e, n, i) { return typeof n == "string" && (n = { type: n, preventDefault: function() { this.defaultPrevented = !0 } }), be(e, i || n.type, e, n), gn(n) || n.codemirrorIgnore } function xt(e) { var n = e._handlers && e._handlers.cursorActivity; if (!!n) for (var i = e.curOp.cursorActivityHandlers || (e.curOp .cursorActivityHandlers = []), r = 0; r < n.length; ++r) de(i, n[r]) == -1 && i.push(n[r]) } function Ke(e, n) { return Te(e, n).length > 0 } function Ge(e) { e.prototype.on = function(n, i) { ne(this, n, i) }, e.prototype.off = function(n, i) { Se(this, n, i) } } function je(e) { e.preventDefault ? e.preventDefault() : e.returnValue = !1 } function $t(e) { e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0 } function gn(e) { return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == !1 } function Wt(e) { je(e), $t(e) } function Et(e) { return e.target || e.srcElement } function sr(e) { var n = e.which; return n == null && (e.button & 1 ? n = 1 : e.button & 2 ? n = 3 : e.button & 4 && ( n = 2)), R && e.ctrlKey && n == 1 && (n = 3), n } var yi = function() { if (f && c < 9) return !1; var e = M("div"); return "draggable" in e || "dragDrop" in e }(), Ut; function Ai(e) { if (Ut == null) { var n = M("span", "\u200B"); V(e, M("span", [n, document.createTextNode("x")])), e.firstChild.offsetHeight != 0 && (Ut = n.offsetWidth <= 1 && n.offsetHeight > 2 && !(f && c < 8)) } var i = Ut ? M("span", "\u200B") : M("span", "\xA0", null, "display: inline-block; width: 1px; margin-right: -1px"); return i.setAttribute("cm-text", ""), i } var zn; function $r(e) { if (zn != null) return zn; var n = V(e, document.createTextNode("A\u062EA")), i = G(n, 0, 1).getBoundingClientRect(), r = G(n, 1, 2).getBoundingClientRect(); return F(e), !i || i.left == i.right ? !1 : zn = r.right - i.right < 3 } var ur = ` b`.split(/\n/).length != 3 ? function(e) { for (var n = 0, i = [], r = e.length; n <= r;) { var a = e.indexOf(` `, n); a == -1 && (a = e.length); var h = e.slice(n, e.charAt(a - 1) == "\r" ? a - 1 : a), T = h.indexOf("\r"); T != -1 ? (i.push(h.slice(0, T)), n += T + 1) : (i.push(h), n = a + 1) } return i } : function(e) { return e.split(/\r\n?|\n/) }, mn = window.getSelection ? function(e) { try { return e.selectionStart != e.selectionEnd } catch { return !1 } } : function(e) { var n; try { n = e.ownerDocument.selection.createRange() } catch {} return !n || n.parentElement() != e ? !1 : n.compareEndPoints("StartToEnd", n) != 0 }, Jt = function() { var e = M("div"); return "oncopy" in e ? !0 : (e.setAttribute("oncopy", "return;"), typeof e .oncopy == "function") }(), Zt = null; function Ur(e) { if (Zt != null) return Zt; var n = V(e, M("span", "x")), i = n.getBoundingClientRect(), r = G(n, 0, 1).getBoundingClientRect(); return Zt = Math.abs(i.left - r.left) > 1 } var Vt = {}, yn = {}; function zr(e, n) { arguments.length > 2 && (n.dependencies = Array.prototype.slice.call(arguments, 2)), Vt[e] = n } function jn(e, n) { yn[e] = n } function It(e) { if (typeof e == "string" && yn.hasOwnProperty(e)) e = yn[e]; else if (e && typeof e.name == "string" && yn.hasOwnProperty(e.name)) { var n = yn[e.name]; typeof n == "string" && (n = { name: n }), e = pn(n, e), e.name = n.name } else { if (typeof e == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(e)) return It( "application/xml"); if (typeof e == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(e)) return It( "application/json") } return typeof e == "string" ? { name: e } : e || { name: "null" } } function rn(e, n) { n = It(n); var i = Vt[n.name]; if (!i) return rn(e, "text/plain"); var r = i(e, n); if (An.hasOwnProperty(n.name)) { var a = An[n.name]; for (var h in a) !a.hasOwnProperty(h) || (r.hasOwnProperty(h) && (r["_" + h] = r[h]), r[h] = a[h]) } if (r.name = n.name, n.helperType && (r.helperType = n.helperType), n.modeProps) for (var T in n.modeProps) r[T] = n.modeProps[T]; return r } var An = {}; function jr(e, n) { var i = An.hasOwnProperty(e) ? An[e] : An[e] = {}; le(n, i) } function an(e, n) { if (n === !0) return n; if (e.copyState) return e.copyState(n); var i = {}; for (var r in n) { var a = n[r]; a instanceof Array && (a = a.concat([])), i[r] = a } return i } function xn(e, n) { for (var i; e.innerMode && (i = e.innerMode(n), !(!i || i.mode == e));) n = i.state, e = i.mode; return i || { mode: e, state: n } } function fr(e, n, i) { return e.startState ? e.startState(n, i) : !0 } var Ze = function(e, n, i) { this.pos = this.start = 0, this.string = e, this.tabSize = n || 8, this .lastColumnPos = this.lastColumnValue = 0, this.lineStart = 0, this .lineOracle = i }; 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 n = this.string.charAt(this.pos), i; if (typeof e == "string" ? i = n == e : i = n && (e.test ? e.test(n) : e(n)), i) return ++this.pos, n }, Ze.prototype.eatWhile = function(e) { for (var n = this.pos; this.eat(e);); return this.pos > n }, 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 n = this.string.indexOf(e, this.pos); if (n > -1) return this.pos = n, !0 }, Ze.prototype.backUp = function(e) { this.pos -= e }, Ze.prototype.column = function() { return this.lastColumnPos < this.start && (this.lastColumnValue = oe(this .string, this.start, this.tabSize, this.lastColumnPos, this .lastColumnValue), this.lastColumnPos = this.start), this .lastColumnValue - (this.lineStart ? oe(this.string, this.lineStart, this .tabSize) : 0) }, Ze.prototype.indentation = function() { return oe(this.string, null, this.tabSize) - (this.lineStart ? oe(this.string, this.lineStart, this.tabSize) : 0) }, Ze.prototype.match = function(e, n, i) { if (typeof e == "string") { var r = function(T) { return i ? T.toLowerCase() : T }, a = this.string.substr(this.pos, e.length); if (r(a) == r(e)) return n !== !1 && (this.pos += e.length), !0 } else { var h = this.string.slice(this.pos).match(e); return h && h.index > 0 ? null : (h && n !== !1 && (this.pos += h[0] .length), h) } }, Ze.prototype.current = function() { return this.string.slice(this.start, this.pos) }, Ze.prototype.hideFirstChars = function(e, n) { this.lineStart += e; try { return n() } finally { this.lineStart -= e } }, Ze.prototype.lookAhead = function(e) { var n = this.lineOracle; return n && n.lookAhead(e) }, Ze.prototype.baseToken = function() { var e = this.lineOracle; return e && e.baseToken(this.pos) }; function Ce(e, n) { if (n -= e.first, n < 0 || n >= e.size) throw new Error("There is no line " + (n + e .first) + " in the document."); for (var i = e; !i.lines;) for (var r = 0;; ++r) { var a = i.children[r], h = a.chunkSize(); if (n < h) { i = a; break } n -= h } return i.lines[n] } function ln(e, n, i) { var r = [], a = n.line; return e.iter(n.line, i.line + 1, function(h) { var T = h.text; a == i.line && (T = T.slice(0, i.ch)), a == n.line && (T = T.slice(n .ch)), r.push(T), ++a }), r } function Wn(e, n, i) { var r = []; return e.iter(n, i, function(a) { r.push(a.text) }), r } function zt(e, n) { var i = n - e.height; if (i) for (var r = e; r; r = r.parent) r.height += i } function We(e) { if (e.parent == null) return null; for (var n = e.parent, i = de(n.lines, e), r = n.parent; r; n = r, r = r.parent) for (var a = 0; r.children[a] != n; ++a) i += r.children[a].chunkSize(); return i + n.first } function qt(e, n) { var i = e.first; e: do { for (var r = 0; r < e.children.length; ++r) { var a = e.children[r], h = a.height; if (n < h) { e = a; continue e } n -= h, i += a.chunkSize() } return i } while (!e.lines); for (var T = 0; T < e.lines.length; ++T) { var P = e.lines[T], O = P.height; if (n < O) break; n -= O } return i + T } function W(e, n) { return n >= e.first && n < e.first + e.size } function K(e, n) { return String(e.lineNumberFormatter(n + e.firstLineNumber)) } function X(e, n, i) { if (i === void 0 && (i = null), !(this instanceof X)) return new X(e, n, i); this.line = e, this.ch = n, this.sticky = i } function re(e, n) { return e.line - n.line || e.ch - n.ch } function Pe(e, n) { return e.sticky == n.sticky && re(e, n) == 0 } function $e(e) { return X(e.line, e.ch) } function Ue(e, n) { return re(e, n) < 0 ? n : e } function rt(e, n) { return re(e, n) < 0 ? e : n } function Ft(e, n) { return Math.max(e.first, Math.min(n, e.first + e.size - 1)) } function Ne(e, n) { if (n.line < e.first) return X(e.first, 0); var i = e.first + e.size - 1; return n.line > i ? X(i, Ce(e, i).text.length) : cl(n, Ce(e, n.line).text.length) } function cl(e, n) { var i = e.ch; return i == null || i > n ? X(e.line, n) : i < 0 ? X(e.line, 0) : e } function vo(e, n) { for (var i = [], r = 0; r < n.length; r++) i[r] = Ne(e, n[r]); return i } var Wr = function(e, n) { this.state = e, this.lookAhead = n }, _t = function(e, n, i, r) { this.state = n, this.doc = e, this.line = i, this.maxLookAhead = r || 0, this .baseTokens = null, this.baseTokenPos = 1 }; _t.prototype.lookAhead = function(e) { var n = this.doc.getLine(this.line + e); return n != null && e > this.maxLookAhead && (this.maxLookAhead = e), n }, _t.prototype.baseToken = function(e) { if (!this.baseTokens) return null; for (; this.baseTokens[this.baseTokenPos] <= e;) this.baseTokenPos += 2; var n = this.baseTokens[this.baseTokenPos + 1]; return { type: n && n.replace(/( |^)overlay .*/, ""), size: this.baseTokens[this.baseTokenPos] - e } }, _t.prototype.nextLine = function() { this.line++, this.maxLookAhead > 0 && this.maxLookAhead-- }, _t.fromSaved = function(e, n, i) { return n instanceof Wr ? new _t(e, an(e.mode, n.state), i, n.lookAhead) : new _t(e, an(e.mode, n), i) }, _t.prototype.save = function(e) { var n = e !== !1 ? an(this.doc.mode, this.state) : this.state; return this.maxLookAhead > 0 ? new Wr(n, this.maxLookAhead) : n }; function ho(e, n, i, r) { var a = [e.state.modeGen], h = {}; xo(e, n.text, e.doc.mode, i, function($, Y) { return a.push($, Y) }, h, r); for (var T = i.state, P = function($) { i.baseTokens = a; var Y = e.state.overlays[$], Q = 1, _ = 0; i.state = !0, xo(e, n.text, Y.mode, i, function(q, ie) { for (var ae = Q; _ < q;) { var fe = a[Q]; fe > q && a.splice(Q, 1, q, a[Q + 1], fe), Q += 2, _ = Math.min(q, fe) } if (!!ie) if (Y.opaque) a.splice(ae, Q - ae, q, "overlay " + ie), Q = ae + 2; else for (; ae < Q; ae += 2) { var he = a[ae + 1]; a[ae + 1] = (he ? he + " " : "") + "overlay " + ie } }, h), i.state = T, i.baseTokens = null, i.baseTokenPos = 1 }, O = 0; O < e.state.overlays.length; ++O) P(O); return { styles: a, classes: h.bgClass || h.textClass ? h : null } } function po(e, n, i) { if (!n.styles || n.styles[0] != e.state.modeGen) { var r = dr(e, We(n)), a = n.text.length > e.options.maxHighlightLength && an(e.doc.mode, r.state), h = ho(e, n, r); a && (r.state = a), n.stateAfter = r.save(!a), n.styles = h.styles, h.classes ? n.styleClasses = h.classes : n.styleClasses && (n.styleClasses = null), i === e.doc.highlightFrontier && (e.doc.modeFrontier = Math.max(e.doc .modeFrontier, ++e.doc.highlightFrontier)) } return n.styles } function dr(e, n, i) { var r = e.doc, a = e.display; if (!r.mode.startState) return new _t(r, !0, n); var h = vl(e, n, i), T = h > r.first && Ce(r, h - 1).stateAfter, P = T ? _t.fromSaved(r, T, h) : new _t(r, fr(r.mode), h); return r.iter(h, n, function(O) { xi(e, O.text, P); var $ = P.line; O.stateAfter = $ == n - 1 || $ % 5 == 0 || $ >= a.viewFrom && $ < a .viewTo ? P.save() : null, P.nextLine() }), i && (r.modeFrontier = P.line), P } function xi(e, n, i, r) { var a = e.doc.mode, h = new Ze(n, e.options.tabSize, i); for (h.start = h.pos = r || 0, n == "" && go(a, i.state); !h.eol();) Ei(a, h, i .state), h.start = h.pos } function go(e, n) { if (e.blankLine) return e.blankLine(n); if (!!e.innerMode) { var i = xn(e, n); if (i.mode.blankLine) return i.mode.blankLine(i.state) } } function Ei(e, n, i, r) { for (var a = 0; a < 10; a++) { r && (r[0] = xn(e, i).mode); var h = e.token(n, i); if (n.pos > n.start) return h } throw new Error("Mode " + e.name + " failed to advance stream.") } var mo = function(e, n, i) { this.start = e.start, this.end = e.pos, this.string = e.current(), this.type = n || null, this.state = i }; function yo(e, n, i, r) { var a = e.doc, h = a.mode, T; n = Ne(a, n); var P = Ce(a, n.line), O = dr(e, n.line, i), $ = new Ze(P.text, e.options.tabSize, O), Y; for (r && (Y = []); (r || $.pos < n.ch) && !$.eol();) $.start = $.pos, T = Ei(h, $, O.state), r && Y .push(new mo($, T, an(a.mode, O.state))); return r ? Y : new mo($, T, O.state) } function Ao(e, n) { if (e) for (;;) { var i = e.match(/(?:^|\s+)line-(background-)?(\S+)/); if (!i) break; e = e.slice(0, i.index) + e.slice(i.index + i[0].length); var r = i[1] ? "bgClass" : "textClass"; n[r] == null ? n[r] = i[2] : new RegExp("(?:^|\\s)" + i[2] + "(?:$|\\s)") .test(n[r]) || (n[r] += " " + i[2]) } return e } function xo(e, n, i, r, a, h, T) { var P = i.flattenSpans; P == null && (P = e.options.flattenSpans); var O = 0, $ = null, Y = new Ze(n, e.options.tabSize, r), Q, _ = e.options.addModeClass && [null]; for (n == "" && Ao(go(i, r.state), h); !Y.eol();) { if (Y.pos > e.options.maxHighlightLength ? (P = !1, T && xi(e, n, r, Y.pos), Y .pos = n.length, Q = null) : Q = Ao(Ei(i, Y, r.state, _), h), _) { var q = _[0].name; q && (Q = "m-" + (Q ? q + " " + Q : q)) } if (!P || $ != Q) { for (; O < Y.start;) O = Math.min(Y.start, O + 5e3), a(O, $); $ = Q } Y.start = Y.pos } for (; O < Y.pos;) { var ie = Math.min(Y.pos, O + 5e3); a(ie, $), O = ie } } function vl(e, n, i) { for (var r, a, h = e.doc, T = i ? -1 : n - (e.doc.mode.innerMode ? 1e3 : 100), P = n; P > T; --P) { if (P <= h.first) return h.first; var O = Ce(h, P - 1), $ = O.stateAfter; if ($ && (!i || P + ($ instanceof Wr ? $.lookAhead : 0) <= h.modeFrontier)) return P; var Y = oe(O.text, null, e.options.tabSize); (a == null || r > Y) && (a = P - 1, r = Y) } return a } function hl(e, n) { if (e.modeFrontier = Math.min(e.modeFrontier, n), !(e.highlightFrontier < n - 10)) { for (var i = e.first, r = n - 1; r > i; r--) { var a = Ce(e, r).stateAfter; if (a && (!(a instanceof Wr) || r + a.lookAhead < n)) { i = r + 1; break } } e.highlightFrontier = Math.min(e.highlightFrontier, i) } } var Eo = !1, sn = !1; function pl() { Eo = !0 } function gl() { sn = !0 } function Vr(e, n, i) { this.marker = e, this.from = n, this.to = i } function cr(e, n) { if (e) for (var i = 0; i < e.length; ++i) { var r = e[i]; if (r.marker == n) return r } } function ml(e, n) { for (var i, r = 0; r < e.length; ++r) e[r] != n && (i || (i = [])).push(e[r]); return i } function yl(e, n, i) { var r = i && window.WeakSet && (i.markedSpans || (i.markedSpans = new WeakSet)); r && e.markedSpans && r.has(e.markedSpans) ? e.markedSpans.push(n) : (e .markedSpans = e.markedSpans ? e.markedSpans.concat([n]) : [n], r && r.add(e .markedSpans)), n.marker.attachLine(e) } function Al(e, n, i) { var r; if (e) for (var a = 0; a < e.length; ++a) { var h = e[a], T = h.marker, P = h.from == null || (T.inclusiveLeft ? h.from <= n : h.from < n); if (P || h.from == n && T.type == "bookmark" && (!i || !h.marker .insertLeft)) { var O = h.to == null || (T.inclusiveRight ? h.to >= n : h.to > n); (r || (r = [])).push(new Vr(T, h.from, O ? null : h.to)) } } return r } function xl(e, n, i) { var r; if (e) for (var a = 0; a < e.length; ++a) { var h = e[a], T = h.marker, P = h.to == null || (T.inclusiveRight ? h.to >= n : h.to > n); if (P || h.from == n && T.type == "bookmark" && (!i || h.marker .insertLeft)) { var O = h.from == null || (T.inclusiveLeft ? h.from <= n : h.from < n); (r || (r = [])).push(new Vr(T, O ? null : h.from - n, h.to == null ? null : h.to - n)) } } return r } function Si(e, n) { if (n.full) return null; var i = W(e, n.from.line) && Ce(e, n.from.line).markedSpans, r = W(e, n.to.line) && Ce(e, n.to.line).markedSpans; if (!i && !r) return null; var a = n.from.ch, h = n.to.ch, T = re(n.from, n.to) == 0, P = Al(i, a, T), O = xl(r, h, T), $ = n.text.length == 1, Y = Me(n.text).length + ($ ? a : 0); if (P) for (var Q = 0; Q < P.length; ++Q) { var _ = P[Q]; if (_.to == null) { var q = cr(O, _.marker); q ? $ && (_.to = q.to == null ? null : q.to + Y) : _.to = a } } if (O) for (var ie = 0; ie < O.length; ++ie) { var ae = O[ie]; if (ae.to != null && (ae.to += Y), ae.from == null) { var fe = cr(P, ae.marker); fe || (ae.from = Y, $ && (P || (P = [])).push(ae)) } else ae.from += Y, $ && (P || (P = [])).push(ae) } P && (P = So(P)), O && O != P && (O = So(O)); var he = [P]; if (!$) { var ye = n.text.length - 2, pe; if (ye > 0 && P) for (var Ee = 0; Ee < P.length; ++Ee) P[Ee].to == null && (pe || (pe = [])) .push(new Vr(P[Ee].marker, null, null)); for (var Ie = 0; Ie < ye; ++Ie) he.push(pe); he.push(O) } return he } function So(e) { for (var n = 0; n < e.length; ++n) { var i = e[n]; i.from != null && i.from == i.to && i.marker.clearWhenEmpty !== !1 && e.splice( n--, 1) } return e.length ? e : null } function El(e, n, i) { var r = null; if (e.iter(n.line, i.line + 1, function(q) { if (q.markedSpans) for (var ie = 0; ie < q.markedSpans.length; ++ie) { var ae = q.markedSpans[ie].marker; ae.readOnly && (!r || de(r, ae) == -1) && (r || (r = [])).push( ae) } }), !r) return null; for (var a = [{ from: n, to: i }], h = 0; h < r.length; ++h) for (var T = r[h], P = T.find(0), O = 0; O < a.length; ++O) { var $ = a[O]; if (!(re($.to, P.from) < 0 || re($.from, P.to) > 0)) { var Y = [O, 1], Q = re($.from, P.from), _ = re($.to, P.to); (Q < 0 || !T.inclusiveLeft && !Q) && Y.push({ from: $.from, to: P.from }), (_ > 0 || !T.inclusiveRight && !_) && Y.push({ from: P.to, to: $.to }), a.splice.apply(a, Y), O += Y.length - 3 } } return a } function bo(e) { var n = e.markedSpans; if (!!n) { for (var i = 0; i < n.length; ++i) n[i].marker.detachLine(e); e.markedSpans = null } } function Co(e, n) { if (!!n) { for (var i = 0; i < n.length; ++i) n[i].marker.attachLine(e); e.markedSpans = n } } function kr(e) { return e.inclusiveLeft ? -1 : 0 } function Yr(e) { return e.inclusiveRight ? 1 : 0 } function bi(e, n) { var i = e.lines.length - n.lines.length; if (i != 0) return i; var r = e.find(), a = n.find(), h = re(r.from, a.from) || kr(e) - kr(n); if (h) return -h; var T = re(r.to, a.to) || Yr(e) - Yr(n); return T || n.id - e.id } function To(e, n) { var i = sn && e.markedSpans, r; if (i) for (var a = void 0, h = 0; h < i.length; ++h) a = i[h], a.marker.collapsed && ( n ? a.from : a.to) == null && (!r || bi(r, a.marker) < 0) && (r = a .marker); return r } function Do(e) { return To(e, !0) } function Gr(e) { return To(e, !1) } function Sl(e, n) { var i = sn && e.markedSpans, r; if (i) for (var a = 0; a < i.length; ++a) { var h = i[a]; h.marker.collapsed && (h.from == null || h.from < n) && (h.to == null || h .to > n) && (!r || bi(r, h.marker) < 0) && (r = h.marker) } return r } function wo(e, n, i, r, a) { var h = Ce(e, n), T = sn && h.markedSpans; if (T) for (var P = 0; P < T.length; ++P) { var O = T[P]; if (!!O.marker.collapsed) { var $ = O.marker.find(0), Y = re($.from, i) || kr(O.marker) - kr(a), Q = re($.to, r) || Yr(O.marker) - Yr(a); if (!(Y >= 0 && Q <= 0 || Y <= 0 && Q >= 0) && (Y <= 0 && (O.marker .inclusiveRight && a.inclusiveLeft ? re($.to, i) >= 0 : re($ .to, i) > 0) || Y >= 0 && (O.marker.inclusiveRight && a .inclusiveLeft ? re($.from, r) <= 0 : re($.from, r) < 0))) return !0 } } } function kt(e) { for (var n; n = Do(e);) e = n.find(-1, !0).line; return e } function bl(e) { for (var n; n = Gr(e);) e = n.find(1, !0).line; return e } function Cl(e) { for (var n, i; n = Gr(e);) e = n.find(1, !0).line, (i || (i = [])).push(e); return i } function Ci(e, n) { var i = Ce(e, n), r = kt(i); return i == r ? n : We(r) } function Io(e, n) { if (n > e.lastLine()) return n; var i = Ce(e, n), r; if (!En(e, i)) return n; for (; r = Gr(i);) i = r.find(1, !0).line; return We(i) + 1 } function En(e, n) { var i = sn && n.markedSpans; if (i) { for (var r = void 0, a = 0; a < i.length; ++a) if (r = i[a], !!r.marker.collapsed) { if (r.from == null) return !0; if (!r.marker.widgetNode && r.from == 0 && r.marker.inclusiveLeft && Ti( e, n, r)) return !0 } } } function Ti(e, n, i) { if (i.to == null) { var r = i.marker.find(1, !0); return Ti(e, r.line, cr(r.line.markedSpans, i.marker)) } if (i.marker.inclusiveRight && i.to == n.text.length) return !0; for (var a = void 0, h = 0; h < n.markedSpans.length; ++h) if (a = n.markedSpans[h], a.marker.collapsed && !a.marker.widgetNode && a .from == i.to && (a.to == null || a.to != i.from) && (a.marker .inclusiveLeft || i.marker.inclusiveRight) && Ti(e, n, a)) return !0 } function un(e) { e = kt(e); for (var n = 0, i = e.parent, r = 0; r < i.lines.length; ++r) { var a = i.lines[r]; if (a == e) break; n += a.height } for (var h = i.parent; h; i = h, h = i.parent) for (var T = 0; T < h.children.length; ++T) { var P = h.children[T]; if (P == i) break; n += P.height } return n } function Qr(e) { if (e.height == 0) return 0; for (var n = e.text.length, i, r = e; i = Do(r);) { var a = i.find(0, !0); r = a.from.line, n += a.from.ch - a.to.ch } for (r = e; i = Gr(r);) { var h = i.find(0, !0); n -= r.text.length - h.from.ch, r = h.to.line, n += r.text.length - h.to.ch } return n } function Di(e) { var n = e.display, i = e.doc; n.maxLine = Ce(i, i.first), n.maxLineLength = Qr(n.maxLine), n.maxLineChanged = !0, i.iter(function(r) { var a = Qr(r); a > n.maxLineLength && (n.maxLineLength = a, n.maxLine = r) }) } var Vn = function(e, n, i) { this.text = e, Co(this, n), this.height = i ? i(this) : 1 }; Vn.prototype.lineNo = function() { return We(this) }, Ge(Vn); function Tl(e, n, i, r) { e.text = n, e.stateAfter && (e.stateAfter = null), e.styles && (e.styles = null), e .order != null && (e.order = null), bo(e), Co(e, i); var a = r ? r(e) : 1; a != e.height && zt(e, a) } function Dl(e) { e.parent = null, bo(e) } var wl = {}, Il = {}; function Ro(e, n) { if (!e || /^\s*$/.test(e)) return null; var i = n.addModeClass ? Il : wl; return i[e] || (i[e] = e.replace(/\S+/g, "cm-$&")) } function Mo(e, n) { var i = k("span", null, null, m ? "padding-right: .1px" : null), r = { pre: k("pre", [i], "CodeMirror-line"), content: i, col: 0, pos: 0, cm: e, trailingSpace: !1, splitSpaces: e.getOption("lineWrapping") }; n.measure = {}; for (var a = 0; a <= (n.rest ? n.rest.length : 0); a++) { var h = a ? n.rest[a - 1] : n.line, T = void 0; r.pos = 0, r.addToken = Ml, $r(e.display.measure) && (T = Re(h, e.doc .direction)) && (r.addToken = Nl(r.addToken, T)), r.map = []; var P = n != e.display.externalMeasured && We(h); Ll(h, r, po(e, h, P)), h.styleClasses && (h.styleClasses.bgClass && (r.bgClass = te(h.styleClasses.bgClass, r.bgClass || "")), h.styleClasses .textClass && (r.textClass = te(h.styleClasses.textClass, r.textClass || ""))), r.map.length == 0 && r.map.push(0, 0, r.content.appendChild( Ai(e.display.measure))), a == 0 ? (n.measure.map = r.map, n.measure .cache = {}) : ((n.measure.maps || (n.measure.maps = [])).push(r.map), ( n.measure.caches || (n.measure.caches = [])).push({})) } if (m) { var O = r.content.lastChild; (/\bcm-tab\b/.test(O.className) || O.querySelector && O.querySelector( ".cm-tab")) && (r.content.className = "cm-tab-wrap-hack") } return be(e, "renderLine", e, n.line, r.pre), r.pre.className && (r.textClass = te(r .pre.className, r.textClass || "")), r } function Rl(e) { var n = M("span", "\u2022", "cm-invalidchar"); return n.title = "\\u" + e.charCodeAt(0).toString(16), n.setAttribute("aria-label", n.title), n } function Ml(e, n, i, r, a, h, T) { if (!!n) { var P = e.splitSpaces ? Pl(n, e.trailingSpace) : n, O = e.cm.state.specialChars, $ = !1, Y; if (!O.test(n)) e.col += n.length, Y = document.createTextNode(P), e.map.push(e .pos, e.pos + n.length, Y), f && c < 9 && ($ = !0), e.pos += n.length; else { Y = document.createDocumentFragment(); for (var Q = 0;;) { O.lastIndex = Q; var _ = O.exec(n), q = _ ? _.index - Q : n.length - Q; if (q) { var ie = document.createTextNode(P.slice(Q, Q + q)); f && c < 9 ? Y.appendChild(M("span", [ie])) : Y.appendChild(ie), e .map.push(e.pos, e.pos + q, ie), e.col += q, e.pos += q } if (!_) break; Q += q + 1; var ae = void 0; if (_[0] == " ") { var fe = e.cm.options.tabSize, he = fe - e.col % fe; ae = Y.appendChild(M("span", ct(he), "cm-tab")), ae.setAttribute( "role", "presentation"), ae.setAttribute("cm-text", " "), e .col += he } else _[0] == "\r" || _[0] == ` ` ? (ae = Y.appendChild(M("span", _[0] == "\r" ? "\u240D" : "\u2424", "cm-invalidchar")), ae.setAttribute("cm-text", _[ 0]), e.col += 1) : (ae = e.cm.options.specialCharPlaceholder(_[ 0]), ae.setAttribute("cm-text", _[0]), f && c < 9 ? Y .appendChild(M("span", [ae])) : Y.appendChild(ae), e.col += 1); e.map.push(e.pos, e.pos + 1, ae), e.pos++ } } if (e.trailingSpace = P.charCodeAt(n.length - 1) == 32, i || r || a || $ || h || T) { var ye = i || ""; r && (ye += r), a && (ye += a); var pe = M("span", [Y], ye, h); if (T) for (var Ee in T) T.hasOwnProperty(Ee) && Ee != "style" && Ee != "class" && pe.setAttribute(Ee, T[Ee]); return e.content.appendChild(pe) } e.content.appendChild(Y) } } function Pl(e, n) { if (e.length > 1 && !/ /.test(e)) return e; for (var i = n, r = "", a = 0; a < e.length; a++) { var h = e.charAt(a); h == " " && i && (a == e.length - 1 || e.charCodeAt(a + 1) == 32) && (h = "\xA0"), r += h, i = h == " " } return r } function Nl(e, n) { return function(i, r, a, h, T, P, O) { a = a ? a + " cm-force-border" : "cm-force-border"; for (var $ = i.pos, Y = $ + r.length;;) { for (var Q = void 0, _ = 0; _ < n.length && (Q = n[_], !(Q.to > $ && Q .from <= $)); _++); if (Q.to >= Y) return e(i, r, a, h, T, P, O); e(i, r.slice(0, Q.to - $), a, h, null, P, O), h = null, r = r.slice(Q .to - $), $ = Q.to } } } function Po(e, n, i, r) { var a = !r && i.widgetNode; a && e.map.push(e.pos, e.pos + n, a), !r && e.cm.display.input .needsContentAttribute && (a || (a = e.content.appendChild(document .createElement("span"))), a.setAttribute("cm-marker", i.id)), a && (e.cm .display.input.setUneditable(a), e.content.appendChild(a)), e.pos += n, e .trailingSpace = !1 } function Ll(e, n, i) { var r = e.markedSpans, a = e.text, h = 0; if (!r) { for (var T = 1; T < i.length; T += 2) n.addToken(n, a.slice(h, h = i[T]), Ro(i[ T + 1], n.cm.options)); return } for (var P = a.length, O = 0, $ = 1, Y = "", Q, _, q = 0, ie, ae, fe, he, ye;;) { if (q == O) { ie = ae = fe = _ = "", ye = null, he = null, q = 1 / 0; for (var pe = [], Ee = void 0, Ie = 0; Ie < r.length; ++Ie) { var we = r[Ie], Be = we.marker; if (Be.type == "bookmark" && we.from == O && Be.widgetNode) pe.push(Be); else if (we.from <= O && (we.to == null || we.to > O || Be.collapsed && we.to == O && we.from == O)) { if (we.to != null && we.to != O && q > we.to && (q = we.to, ae = ""), Be.className && (ie += " " + Be.className), Be.css && (_ = (_ ? _ + ";" : "") + Be.css), Be.startStyle && we.from == O && (fe += " " + Be.startStyle), Be.endStyle && we.to == q && ( Ee || (Ee = [])).push(Be.endStyle, we.to), Be.title && (( ye || (ye = {})).title = Be.title), Be.attributes) for (var Ye in Be.attributes)(ye || (ye = {}))[Ye] = Be .attributes[Ye]; Be.collapsed && (!he || bi(he.marker, Be) < 0) && (he = we) } else we.from > O && q > we.from && (q = we.from) } if (Ee) for (var st = 0; st < Ee.length; st += 2) Ee[st + 1] == q && (ae += " " + Ee[st]); if (!he || he.from == O) for (var Xe = 0; Xe < pe.length; ++Xe) Po(n, 0, pe[Xe]); if (he && (he.from || 0) == O) { if (Po(n, (he.to == null ? P + 1 : he.to) - O, he.marker, he.from == null), he.to == null) return; he.to == O && (he = !1) } } if (O >= P) break; for (var Mt = Math.min(P, q);;) { if (Y) { var Ct = O + Y.length; if (!he) { var et = Ct > Mt ? Y.slice(0, Mt - O) : Y; n.addToken(n, et, Q ? Q + ie : ie, fe, O + et.length == q ? ae : "", _, ye) } if (Ct >= Mt) { Y = Y.slice(Mt - O), O = Mt; break } O = Ct, fe = "" } Y = a.slice(h, h = i[$++]), Q = Ro(i[$++], n.cm.options) } } } function No(e, n, i) { this.line = n, this.rest = Cl(n), this.size = this.rest ? We(Me(this.rest)) - i + 1 : 1, this.node = this.text = null, this.hidden = En(e, n) } function Kr(e, n, i) { for (var r = [], a, h = n; h < i; h = a) { var T = new No(e.doc, Ce(e.doc, h), h); a = h + T.size, r.push(T) } return r } var kn = null; function Ol(e) { kn ? kn.ops.push(e) : e.ownsGroup = kn = { ops: [e], delayedCallbacks: [] } } function Fl(e) { var n = e.delayedCallbacks, i = 0; do { for (; i < n.length; i++) n[i].call(null); for (var r = 0; r < e.ops.length; r++) { var a = e.ops[r]; if (a.cursorActivityHandlers) for (; a.cursorActivityCalled < a.cursorActivityHandlers.length;) a .cursorActivityHandlers[a.cursorActivityCalled++].call(null, a.cm) } } while (i < n.length) } function Bl(e, n) { var i = e.ownsGroup; if (!!i) try { Fl(i) } finally { kn = null, n(i) } } var vr = null; function ot(e, n) { var i = Te(e, n); if (!!i.length) { var r = Array.prototype.slice.call(arguments, 2), a; kn ? a = kn.delayedCallbacks : vr ? a = vr : (a = vr = [], setTimeout(Hl, 0)); for (var h = function(P) { a.push(function() { return i[P].apply(null, r) }) }, T = 0; T < i.length; ++T) h(T) } } function Hl() { var e = vr; vr = null; for (var n = 0; n < e.length; ++n) e[n]() } function Lo(e, n, i, r) { for (var a = 0; a < n.changes.length; a++) { var h = n.changes[a]; h == "text" ? Ul(e, n) : h == "gutter" ? Fo(e, n, i, r) : h == "class" ? wi(e, n) : h == "widget" && zl(e, n, r) } n.changes = null } function hr(e) { return e.node == e.text && (e.node = M("div", null, null, "position: relative"), e .text.parentNode && e.text.parentNode.replaceChild(e.node, e.text), e.node .appendChild(e.text), f && c < 8 && (e.node.style.zIndex = 2)), e.node } function $l(e, n) { var i = n.bgClass ? n.bgClass + " " + (n.line.bgClass || "") : n.line.bgClass; if (i && (i += " CodeMirror-linebackground"), n.background) i ? n.background .className = i : (n.background.parentNode.removeChild(n.background), n .background = null); else if (i) { var r = hr(n); n.background = r.insertBefore(M("div", null, i), r.firstChild), e.display.input .setUneditable(n.background) } } function Oo(e, n) { var i = e.display.externalMeasured; return i && i.line == n.line ? (e.display.externalMeasured = null, n.measure = i .measure, i.built) : Mo(e, n) } function Ul(e, n) { var i = n.text.className, r = Oo(e, n); n.text == n.node && (n.node = r.pre), n.text.parentNode.replaceChild(r.pre, n.text), n.text = r.pre, r.bgClass != n.bgClass || r.textClass != n.textClass ? (n .bgClass = r.bgClass, n.textClass = r.textClass, wi(e, n)) : i && (n.text .className = i) } function wi(e, n) { $l(e, n), n.line.wrapClass ? hr(n).className = n.line.wrapClass : n.node != n .text && (n.node.className = ""); var i = n.textClass ? n.textClass + " " + (n.line.textClass || "") : n.line .textClass; n.text.className = i || "" } function Fo(e, n, i, r) { if (n.gutter && (n.node.removeChild(n.gutter), n.gutter = null), n .gutterBackground && (n.node.removeChild(n.gutterBackground), n .gutterBackground = null), n.line.gutterClass) { var a = hr(n); n.gutterBackground = M("div", null, "CodeMirror-gutter-background " + n.line .gutterClass, "left: " + (e.options.fixedGutter ? r.fixedPos : -r .gutterTotalWidth) + "px; width: " + r.gutterTotalWidth + "px"), e .display.input.setUneditable(n.gutterBackground), a.insertBefore(n .gutterBackground, n.text) } var h = n.line.gutterMarkers; if (e.options.lineNumbers || h) { var T = hr(n), P = n.gutter = M("div", null, "CodeMirror-gutter-wrapper", "left: " + (e .options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) + "px"); if (P.setAttribute("aria-hidden", "true"), e.display.input.setUneditable(P), T .insertBefore(P, n.text), n.line.gutterClass && (P.className += " " + n.line .gutterClass), e.options.lineNumbers && (!h || !h[ "CodeMirror-linenumbers"]) && (n.lineNumber = P.appendChild(M("div", K(e .options, i), "CodeMirror-linenumber CodeMirror-gutter-elt", "left: " + r.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + e.display.lineNumInnerWidth + "px"))), h) for (var O = 0; O < e.display.gutterSpecs.length; ++O) { var $ = e.display.gutterSpecs[O].className, Y = h.hasOwnProperty($) && h[$]; Y && P.appendChild(M("div", [Y], "CodeMirror-gutter-elt", "left: " + r .gutterLeft[$] + "px; width: " + r.gutterWidth[$] + "px")) } } } function zl(e, n, i) { n.alignable && (n.alignable = null); for (var r = N("CodeMirror-linewidget"), a = n.node.firstChild, h = void 0; a; a = h) h = a.nextSibling, r.test(a.className) && n.node.removeChild(a); Bo(e, n, i) } function jl(e, n, i, r) { var a = Oo(e, n); return n.text = n.node = a.pre, a.bgClass && (n.bgClass = a.bgClass), a.textClass && (n.textClass = a.textClass), wi(e, n), Fo(e, n, i, r), Bo(e, n, r), n.node } function Bo(e, n, i) { if (Ho(e, n.line, n, i, !0), n.rest) for (var r = 0; r < n.rest.length; r++) Ho(e, n.rest[r], n, i, !1) } function Ho(e, n, i, r, a) { if (!!n.widgets) for (var h = hr(i), T = 0, P = n.widgets; T < P.length; ++T) { var O = P[T], $ = M("div", [O.node], "CodeMirror-linewidget" + (O.className ? " " + O .className : "")); O.handleMouseEvents || $.setAttribute("cm-ignore-events", "true"), Wl(O, $, i, r), e.display.input.setUneditable($), a && O.above ? h .insertBefore($, i.gutter || i.text) : h.appendChild($), ot(O, "redraw") } } function Wl(e, n, i, r) { if (e.noHScroll) { (i.alignable || (i.alignable = [])).push(n); var a = r.wrapperWidth; n.style.left = r.fixedPos + "px", e.coverGutter || (a -= r.gutterTotalWidth, n .style.paddingLeft = r.gutterTotalWidth + "px"), n.style.width = a + "px" } e.coverGutter && (n.style.zIndex = 5, n.style.position = "relative", e.noHScroll || (n.style.marginLeft = -r.gutterTotalWidth + "px")) } function pr(e) { if (e.height != null) return e.height; var n = e.doc.cm; if (!n) return 0; if (!J(document.body, e.node)) { var i = "position: relative;"; e.coverGutter && (i += "margin-left: -" + n.display.gutters.offsetWidth + "px;"), e.noHScroll && (i += "width: " + n.display.wrapper.clientWidth + "px;"), V(n.display.measure, M("div", [e.node], null, i)) } return e.height = e.node.parentNode.offsetHeight } function dn(e, n) { for (var i = Et(n); i != e.wrapper; i = i.parentNode) if (!i || i.nodeType == 1 && i.getAttribute("cm-ignore-events") == "true" || i .parentNode == e.sizer && i != e.mover) return !0 } function Xr(e) { return e.lineSpace.offsetTop } function Ii(e) { return e.mover.offsetHeight - e.lineSpace.offsetHeight } function $o(e) { if (e.cachedPaddingH) return e.cachedPaddingH; var n = V(e.measure, M("pre", "x", "CodeMirror-line-like")), i = window.getComputedStyle ? window.getComputedStyle(n) : n.currentStyle, r = { left: parseInt(i.paddingLeft), right: parseInt(i.paddingRight) }; return !isNaN(r.left) && !isNaN(r.right) && (e.cachedPaddingH = r), r } function en(e) { return Le - e.display.nativeBarWidth } function Mn(e) { return e.display.scroller.clientWidth - en(e) - e.display.barWidth } function Ri(e) { return e.display.scroller.clientHeight - en(e) - e.display.barHeight } function Vl(e, n, i) { var r = e.options.lineWrapping, a = r && Mn(e); if (!n.measure.heights || r && n.measure.width != a) { var h = n.measure.heights = []; if (r) { n.measure.width = a; for (var T = n.text.firstChild.getClientRects(), P = 0; P < T.length - 1; P++) { var O = T[P], $ = T[P + 1]; Math.abs(O.bottom - $.bottom) > 2 && h.push((O.bottom + $.top) / 2 - i .top) } } h.push(i.bottom - i.top) } } function Uo(e, n, i) { if (e.line == n) return { map: e.measure.map, cache: e.measure.cache }; if (e.rest) { for (var r = 0; r < e.rest.length; r++) if (e.rest[r] == n) return { map: e.measure.maps[r], cache: e.measure.caches[r] }; for (var a = 0; a < e.rest.length; a++) if (We(e.rest[a]) > i) return { map: e.measure.maps[a], cache: e.measure.caches[a], before: !0 } } } function kl(e, n) { n = kt(n); var i = We(n), r = e.display.externalMeasured = new No(e.doc, n, i); r.lineN = i; var a = r.built = Mo(e, r); return r.text = a.pre, V(e.display.lineMeasure, a.pre), r } function zo(e, n, i, r) { return tn(e, Yn(e, n), i, r) } function Mi(e, n) { if (n >= e.display.viewFrom && n < e.display.viewTo) return e.display.view[Ln(e, n)]; var i = e.display.externalMeasured; if (i && n >= i.lineN && n < i.lineN + i.size) return i } function Yn(e, n) { var i = We(n), r = Mi(e, i); r && !r.text ? r = null : r && r.changes && (Lo(e, r, i, Fi(e)), e.curOp .forceUpdate = !0), r || (r = kl(e, n)); var a = Uo(r, n, i); return { line: n, view: r, rect: null, map: a.map, cache: a.cache, before: a.before, hasHeights: !1 } } function tn(e, n, i, r, a) { n.before && (i = -1); var h = i + (r || ""), T; return n.cache.hasOwnProperty(h) ? T = n.cache[h] : (n.rect || (n.rect = n.view.text .getBoundingClientRect()), n.hasHeights || (Vl(e, n.view, n.rect), n .hasHeights = !0), T = Gl(e, n, i, r), T.bogus || (n.cache[h] = T)), { left: T.left, right: T.right, top: a ? T.rtop : T.top, bottom: a ? T.rbottom : T.bottom } } var jo = { left: 0, right: 0, top: 0, bottom: 0 }; function Wo(e, n, i) { for (var r, a, h, T, P, O, $ = 0; $ < e.length; $ += 3) if (P = e[$], O = e[$ + 1], n < P ? (a = 0, h = 1, T = "left") : n < O ? (a = n - P, h = a + 1) : ($ == e.length - 3 || n == O && e[$ + 3] > n) && ( h = O - P, a = h - 1, n >= O && (T = "right")), a != null) { if (r = e[$ + 2], P == O && i == (r.insertLeft ? "left" : "right") && (T = i), i == "left" && a == 0) for (; $ && e[$ - 2] == e[$ - 3] && e[$ - 1].insertLeft;) r = e[($ -= 3) + 2], T = "left"; if (i == "right" && a == O - P) for (; $ < e.length - 3 && e[$ + 3] == e[$ + 4] && !e[$ + 5] .insertLeft;) r = e[($ += 3) + 2], T = "right"; break } return { node: r, start: a, end: h, collapse: T, coverStart: P, coverEnd: O } } function Yl(e, n) { var i = jo; if (n == "left") for (var r = 0; r < e.length && (i = e[r]).left == i.right; r++); else for (var a = e.length - 1; a >= 0 && (i = e[a]).left == i.right; a--); return i } function Gl(e, n, i, r) { var a = Wo(n.map, i, r), h = a.node, T = a.start, P = a.end, O = a.collapse, $; if (h.nodeType == 3) { for (var Y = 0; Y < 4; Y++) { for (; T && Ht(n.line.text.charAt(a.coverStart + T));) --T; for (; a.coverStart + P < a.coverEnd && Ht(n.line.text.charAt(a.coverStart + P));) ++P; if (f && c < 9 && T == 0 && P == a.coverEnd - a.coverStart ? $ = h .parentNode.getBoundingClientRect() : $ = Yl(G(h, T, P) .getClientRects(), r), $.left || $.right || T == 0) break; P = T, T = T - 1, O = "right" } f && c < 11 && ($ = Ql(e.display.measure, $)) } else { T > 0 && (O = r = "right"); var Q; e.options.lineWrapping && (Q = h.getClientRects()).length > 1 ? $ = Q[r == "right" ? Q.length - 1 : 0] : $ = h.getBoundingClientRect() } if (f && c < 9 && !T && (!$ || !$.left && !$.right)) { var _ = h.parentNode.getClientRects()[0]; _ ? $ = { left: _.left, right: _.left + Qn(e.display), top: _.top, bottom: _.bottom } : $ = jo } for (var q = $.top - n.rect.top, ie = $.bottom - n.rect.top, ae = (q + ie) / 2, fe = n.view.measure.heights, he = 0; he < fe.length - 1 && !(ae < fe[he]); he++); var ye = he ? fe[he - 1] : 0, pe = fe[he], Ee = { left: (O == "right" ? $.right : $.left) - n.rect.left, right: (O == "left" ? $.left : $.right) - n.rect.left, top: ye, bottom: pe }; return !$.left && !$.right && (Ee.bogus = !0), e.options .singleCursorHeightPerLine || (Ee.rtop = q, Ee.rbottom = ie), Ee } function Ql(e, n) { if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen .deviceXDPI || !Ur(e)) return n; var i = screen.logicalXDPI / screen.deviceXDPI, r = screen.logicalYDPI / screen.deviceYDPI; return { left: n.left * i, right: n.right * i, top: n.top * r, bottom: n.bottom * r } } function Vo(e) { if (e.measure && (e.measure.cache = {}, e.measure.heights = null, e.rest)) for (var n = 0; n < e.rest.length; n++) e.measure.caches[n] = {} } function ko(e) { e.display.externalMeasure = null, F(e.display.lineMeasure); for (var n = 0; n < e.display.view.length; n++) Vo(e.display.view[n]) } function gr(e) { ko(e), e.display.cachedCharWidth = e.display.cachedTextHeight = e.display .cachedPaddingH = null, e.options.lineWrapping || (e.display.maxLineChanged = ! 0), e.display.lineNumChars = null } function Yo(e) { return b && I ? -(e.body.getBoundingClientRect().left - parseInt(getComputedStyle(e .body).marginLeft)) : e.defaultView.pageXOffset || (e.documentElement || e .body).scrollLeft } function Go(e) { return b && I ? -(e.body.getBoundingClientRect().top - parseInt(getComputedStyle(e .body).marginTop)) : e.defaultView.pageYOffset || (e.documentElement || e .body).scrollTop } function Pi(e) { var n = kt(e), i = n.widgets, r = 0; if (i) for (var a = 0; a < i.length; ++a) i[a].above && (r += pr(i[a])); return r } function Jr(e, n, i, r, a) { if (!a) { var h = Pi(n); i.top += h, i.bottom += h } if (r == "line") return i; r || (r = "local"); var T = un(n); if (r == "local" ? T += Xr(e.display) : T -= e.display.viewOffset, r == "page" || r == "window") { var P = e.display.lineSpace.getBoundingClientRect(); T += P.top + (r == "window" ? 0 : Go(ge(e))); var O = P.left + (r == "window" ? 0 : Yo(ge(e))); i.left += O, i.right += O } return i.top += T, i.bottom += T, i } function Qo(e, n, i) { if (i == "div") return n; var r = n.left, a = n.top; if (i == "page") r -= Yo(ge(e)), a -= Go(ge(e)); else if (i == "local" || !i) { var h = e.display.sizer.getBoundingClientRect(); r += h.left, a += h.top } var T = e.display.lineSpace.getBoundingClientRect(); return { left: r - T.left, top: a - T.top } } function Zr(e, n, i, r, a) { return r || (r = Ce(e.doc, n.line)), Jr(e, r, zo(e, r, n.ch, a), i) } function Yt(e, n, i, r, a, h) { r = r || Ce(e.doc, n.line), a || (a = Yn(e, r)); function T(ie, ae) { var fe = tn(e, a, ie, ae ? "right" : "left", h); return ae ? fe.left = fe.right : fe.right = fe.left, Jr(e, r, fe, i) } var P = Re(r, e.doc.direction), O = n.ch, $ = n.sticky; if (O >= r.text.length ? (O = r.text.length, $ = "before") : O <= 0 && (O = 0, $ = "after"), !P) return T($ == "before" ? O - 1 : O, $ == "before"); function Y(ie, ae, fe) { var he = P[ae], ye = he.level == 1; return T(fe ? ie - 1 : ie, ye != fe) } var Q = Ae(P, O, $), _ = He, q = Y(O, Q, $ == "before"); return _ != null && (q.other = Y(O, _, $ != "before")), q } function Ko(e, n) { var i = 0; n = Ne(e.doc, n), e.options.lineWrapping || (i = Qn(e.display) * n.ch); var r = Ce(e.doc, n.line), a = un(r) + Xr(e.display); return { left: i, right: i, top: a, bottom: a + r.height } } function Ni(e, n, i, r, a) { var h = X(e, n, i); return h.xRel = a, r && (h.outside = r), h } function Li(e, n, i) { var r = e.doc; if (i += e.display.viewOffset, i < 0) return Ni(r.first, 0, null, -1, -1); var a = qt(r, i), h = r.first + r.size - 1; if (a > h) return Ni(r.first + r.size - 1, Ce(r, h).text.length, null, 1, 1); n < 0 && (n = 0); for (var T = Ce(r, a);;) { var P = Kl(e, T, a, n, i), O = Sl(T, P.ch + (P.xRel > 0 || P.outside > 0 ? 1 : 0)); if (!O) return P; var $ = O.find(1); if ($.line == a) return $; T = Ce(r, a = $.line) } } function Xo(e, n, i, r) { r -= Pi(n); var a = n.text.length, h = ze(function(T) { return tn(e, i, T - 1).bottom <= r }, a, 0); return a = ze(function(T) { return tn(e, i, T).top > r }, h, a), { begin: h, end: a } } function Jo(e, n, i, r) { i || (i = Yn(e, n)); var a = Jr(e, n, tn(e, i, r), "line").top; return Xo(e, n, i, a) } function Oi(e, n, i, r) { return e.bottom <= i ? !1 : e.top > i ? !0 : (r ? e.left : e.right) > n } function Kl(e, n, i, r, a) { a -= un(n); var h = Yn(e, n), T = Pi(n), P = 0, O = n.text.length, $ = !0, Y = Re(n, e.doc.direction); if (Y) { var Q = (e.options.lineWrapping ? Jl : Xl)(e, n, i, h, Y, r, a); $ = Q.level != 1, P = $ ? Q.from : Q.to - 1, O = $ ? Q.to : Q.from - 1 } var _ = null, q = null, ie = ze(function(Ie) { var we = tn(e, h, Ie); return we.top += T, we.bottom += T, Oi(we, r, a, !1) ? (we.top <= a && we.left <= r && (_ = Ie, q = we), !0) : !1 }, P, O), ae, fe, he = !1; if (q) { var ye = r - q.left < q.right - r, pe = ye == $; ie = _ + (pe ? 0 : 1), fe = pe ? "after" : "before", ae = ye ? q.left : q.right } else { !$ && (ie == O || ie == P) && ie++, fe = ie == 0 ? "after" : ie == n.text .length ? "before" : tn(e, h, ie - ($ ? 1 : 0)).bottom + T <= a == $ ? "after" : "before"; var Ee = Yt(e, X(i, ie, fe), "line", n, h); ae = Ee.left, he = a < Ee.top ? -1 : a >= Ee.bottom ? 1 : 0 } return ie = nt(n.text, ie, 1), Ni(i, ie, fe, he, r - ae) } function Xl(e, n, i, r, a, h, T) { var P = ze(function(Q) { var _ = a[Q], q = _.level != 1; return Oi(Yt(e, X(i, q ? _.to : _.from, q ? "before" : "after"), "line", n, r), h, T, !0) }, 0, a.length - 1), O = a[P]; if (P > 0) { var $ = O.level != 1, Y = Yt(e, X(i, $ ? O.from : O.to, $ ? "after" : "before"), "line", n, r); Oi(Y, h, T, !0) && Y.top > T && (O = a[P - 1]) } return O } function Jl(e, n, i, r, a, h, T) { var P = Xo(e, n, r, T), O = P.begin, $ = P.end; /\s/.test(n.text.charAt($ - 1)) && $--; for (var Y = null, Q = null, _ = 0; _ < a.length; _++) { var q = a[_]; if (!(q.from >= $ || q.to <= O)) { var ie = q.level != 1, ae = tn(e, r, ie ? Math.min($, q.to) - 1 : Math.max(O, q.from)).right, fe = ae < h ? h - ae + 1e9 : ae - h; (!Y || Q > fe) && (Y = q, Q = fe) } } return Y || (Y = a[a.length - 1]), Y.from < O && (Y = { from: O, to: Y.to, level: Y.level }), Y.to > $ && (Y = { from: Y.from, to: $, level: Y.level }), Y } var Pn; function Gn(e) { if (e.cachedTextHeight != null) return e.cachedTextHeight; if (Pn == null) { Pn = M("pre", null, "CodeMirror-line-like"); for (var n = 0; n < 49; ++n) Pn.appendChild(document.createTextNode("x")), Pn .appendChild(M("br")); Pn.appendChild(document.createTextNode("x")) } V(e.measure, Pn); var i = Pn.offsetHeight / 50; return i > 3 && (e.cachedTextHeight = i), F(e.measure), i || 1 } function Qn(e) { if (e.cachedCharWidth != null) return e.cachedCharWidth; var n = M("span", "xxxxxxxxxx"), i = M("pre", [n], "CodeMirror-line-like"); V(e.measure, i); var r = n.getBoundingClientRect(), a = (r.right - r.left) / 10; return a > 2 && (e.cachedCharWidth = a), a || 10 } function Fi(e) { for (var n = e.display, i = {}, r = {}, a = n.gutters.clientLeft, h = n.gutters .firstChild, T = 0; h; h = h.nextSibling, ++T) { var P = e.display.gutterSpecs[T].className; i[P] = h.offsetLeft + h.clientLeft + a, r[P] = h.clientWidth } return { fixedPos: Bi(n), gutterTotalWidth: n.gutters.offsetWidth, gutterLeft: i, gutterWidth: r, wrapperWidth: n.wrapper.clientWidth } } function Bi(e) { return e.scroller.getBoundingClientRect().left - e.sizer.getBoundingClientRect() .left } function Zo(e) { var n = Gn(e.display), i = e.options.lineWrapping, r = i && Math.max(5, e.display.scroller.clientWidth / Qn(e.display) - 3); return function(a) { if (En(e.doc, a)) return 0; var h = 0; if (a.widgets) for (var T = 0; T < a.widgets.length; T++) a.widgets[T].height && (h += a.widgets[T].height); return i ? h + (Math.ceil(a.text.length / r) || 1) * n : h + n } } function Hi(e) { var n = e.doc, i = Zo(e); n.iter(function(r) { var a = i(r); a != r.height && zt(r, a) }) } function Nn(e, n, i, r) { var a = e.display; if (!i && Et(n).getAttribute("cm-not-content") == "true") return null; var h, T, P = a.lineSpace.getBoundingClientRect(); try { h = n.clientX - P.left, T = n.clientY - P.top } catch { return null } var O = Li(e, h, T), $; if (r && O.xRel > 0 && ($ = Ce(e.doc, O.line).text).length == O.ch) { var Y = oe($, $.length, e.options.tabSize) - $.length; O = X(O.line, Math.max(0, Math.round((h - $o(e.display).left) / Qn(e.display)) - Y)) } return O } function Ln(e, n) { if (n >= e.display.viewTo || (n -= e.display.viewFrom, n < 0)) return null; for (var i = e.display.view, r = 0; r < i.length; r++) if (n -= i[r].size, n < 0) return r } function St(e, n, i, r) { n == null && (n = e.doc.first), i == null && (i = e.doc.first + e.doc.size), r || ( r = 0); var a = e.display; if (r && i < a.viewTo && (a.updateLineNumbers == null || a.updateLineNumbers > n) && (a.updateLineNumbers = n), e.curOp.viewChanged = !0, n >= a.viewTo) sn && Ci(e .doc, n) < a.viewTo && bn(e); else if (i <= a.viewFrom) sn && Io(e.doc, i + r) > a.viewFrom ? bn(e) : (a .viewFrom += r, a.viewTo += r); else if (n <= a.viewFrom && i >= a.viewTo) bn(e); else if (n <= a.viewFrom) { var h = qr(e, i, i + r, 1); h ? (a.view = a.view.slice(h.index), a.viewFrom = h.lineN, a.viewTo += r) : bn( e) } else if (i >= a.viewTo) { var T = qr(e, n, n, -1); T ? (a.view = a.view.slice(0, T.index), a.viewTo = T.lineN) : bn(e) } else { var P = qr(e, n, n, -1), O = qr(e, i, i + r, 1); P && O ? (a.view = a.view.slice(0, P.index).concat(Kr(e, P.lineN, O.lineN)) .concat(a.view.slice(O.index)), a.viewTo += r) : bn(e) } var $ = a.externalMeasured; $ && (i < $.lineN ? $.lineN += r : n < $.lineN + $.size && (a.externalMeasured = null)) } function Sn(e, n, i) { e.curOp.viewChanged = !0; var r = e.display, a = e.display.externalMeasured; if (a && n >= a.lineN && n < a.lineN + a.size && (r.externalMeasured = null), !(n < r.viewFrom || n >= r.viewTo)) { var h = r.view[Ln(e, n)]; if (h.node != null) { var T = h.changes || (h.changes = []); de(T, i) == -1 && T.push(i) } } } function bn(e) { e.display.viewFrom = e.display.viewTo = e.doc.first, e.display.view = [], e.display .viewOffset = 0 } function qr(e, n, i, r) { var a = Ln(e, n), h, T = e.display.view; if (!sn || i == e.doc.first + e.doc.size) return { index: a, lineN: i }; for (var P = e.display.viewFrom, O = 0; O < a; O++) P += T[O].size; if (P != n) { if (r > 0) { if (a == T.length - 1) return null; h = P + T[a].size - n, a++ } else h = P - n; n += h, i += h } for (; Ci(e.doc, i) != i;) { if (a == (r < 0 ? 0 : T.length - 1)) return null; i += r * T[a - (r < 0 ? 1 : 0)].size, a += r } return { index: a, lineN: i } } function Zl(e, n, i) { var r = e.display, a = r.view; a.length == 0 || n >= r.viewTo || i <= r.viewFrom ? (r.view = Kr(e, n, i), r .viewFrom = n) : (r.viewFrom > n ? r.view = Kr(e, n, r.viewFrom).concat(r .view) : r.viewFrom < n && (r.view = r.view.slice(Ln(e, n))), r .viewFrom = n, r.viewTo < i ? r.view = r.view.concat(Kr(e, r.viewTo, i)) : r .viewTo > i && (r.view = r.view.slice(0, Ln(e, i)))), r.viewTo = i } function qo(e) { for (var n = e.display.view, i = 0, r = 0; r < n.length; r++) { var a = n[r]; !a.hidden && (!a.node || a.changes) && ++i } return i } function mr(e) { e.display.input.showSelection(e.display.input.prepareSelection()) } function _o(e, n) { n === void 0 && (n = !0); var i = e.doc, r = {}, a = r.cursors = document.createDocumentFragment(), h = r.selection = document.createDocumentFragment(), T = e.options.$customCursor; T && (n = !0); for (var P = 0; P < i.sel.ranges.length; P++) if (!(!n && P == i.sel.primIndex)) { var O = i.sel.ranges[P]; if (!(O.from().line >= e.display.viewTo || O.to().line < e.display .viewFrom)) { var $ = O.empty(); if (T) { var Y = T(e, O); Y && $i(e, Y, a) } else($ || e.options.showCursorWhenSelecting) && $i(e, O.head, a); $ || ql(e, O, h) } } return r } function $i(e, n, i) { var r = Yt(e, n, "div", null, null, !e.options.singleCursorHeightPerLine), a = i.appendChild(M("div", "\xA0", "CodeMirror-cursor")); if (a.style.left = r.left + "px", a.style.top = r.top + "px", a.style.height = Math .max(0, r.bottom - r.top) * e.options.cursorHeight + "px", /\bcm-fat-cursor\b/ .test(e.getWrapperElement().className)) { var h = Zr(e, n, "div", null, null), T = h.right - h.left; a.style.width = (T > 0 ? T : e.defaultCharWidth()) + "px" } if (r.other) { var P = i.appendChild(M("div", "\xA0", "CodeMirror-cursor CodeMirror-secondarycursor")); P.style.display = "", P.style.left = r.other.left + "px", P.style.top = r.other .top + "px", P.style.height = (r.other.bottom - r.other.top) * .85 + "px" } } function _r(e, n) { return e.top - n.top || e.left - n.left } function ql(e, n, i) { var r = e.display, a = e.doc, h = document.createDocumentFragment(), T = $o(e.display), P = T.left, O = Math.max(r.sizerWidth, Mn(e) - r.sizer.offsetLeft) - T.right, $ = a.direction == "ltr"; function Y(pe, Ee, Ie, we) { Ee < 0 && (Ee = 0), Ee = Math.round(Ee), we = Math.round(we), h.appendChild(M( "div", null, "CodeMirror-selected", "position: absolute; left: " + pe + `px; top: ` + Ee + "px; width: " + (Ie == null ? O - pe : Ie) + `px; height: ` + (we - Ee) + "px")) } function Q(pe, Ee, Ie) { var we = Ce(a, pe), Be = we.text.length, Ye, st; function Xe(et, Tt) { return Zr(e, X(pe, et), "div", we, Tt) } function Mt(et, Tt, dt) { var it = Jo(e, we, null, et), tt = Tt == "ltr" == (dt == "after") ? "left" : "right", qe = dt == "after" ? it.begin : it.end - (/\s/.test(we.text.charAt(it .end - 1)) ? 2 : 1); return Xe(qe, tt)[tt] } var Ct = Re(we, a.direction); return wt(Ct, Ee || 0, Ie == null ? Be : Ie, function(et, Tt, dt, it) { var tt = dt == "ltr", qe = Xe(et, tt ? "left" : "right"), Dt = Xe(Tt - 1, tt ? "right" : "left"), ar = Ee == null && et == 0, Rn = Ie == null && Tt == Be, ht = it == 0, nn = !Ct || it == Ct.length - 1; if (Dt.top - qe.top <= 3) { var ut = ($ ? ar : Rn) && ht, fo = ($ ? Rn : ar) && nn, hn = ut ? P : (tt ? qe : Dt).left, $n = fo ? O : (tt ? Dt : qe).right; Y(hn, qe.top, $n - hn, qe.bottom) } else { var Un, yt, lr, co; tt ? (Un = $ && ar && ht ? P : qe.left, yt = $ ? O : Mt(et, dt, "before"), lr = $ ? P : Mt(Tt, dt, "after"), co = $ && Rn && nn ? O : Dt.right) : (Un = $ ? Mt(et, dt, "before") : P, yt = !$ && ar && ht ? O : qe.right, lr = !$ && Rn && nn ? P : Dt.left, co = $ ? Mt(Tt, dt, "after") : O), Y(Un, qe.top, yt - Un, qe.bottom), qe .bottom < Dt.top && Y(P, qe.bottom, null, Dt.top), Y(lr, Dt .top, co - lr, Dt.bottom) }(!Ye || _r(qe, Ye) < 0) && (Ye = qe), _r(Dt, Ye) < 0 && (Ye = Dt), (!st || _r(qe, st) < 0) && (st = qe), _r(Dt, st) < 0 && (st = Dt) }), { start: Ye, end: st } } var _ = n.from(), q = n.to(); if (_.line == q.line) Q(_.line, _.ch, q.ch); else { var ie = Ce(a, _.line), ae = Ce(a, q.line), fe = kt(ie) == kt(ae), he = Q(_.line, _.ch, fe ? ie.text.length + 1 : null).end, ye = Q(q.line, fe ? 0 : null, q.ch).start; fe && (he.top < ye.top - 2 ? (Y(he.right, he.top, null, he.bottom), Y(P, ye.top, ye.left, ye.bottom)) : Y(he.right, he.top, ye.left - he.right, he .bottom)), he.bottom < ye.top && Y(P, he.bottom, null, ye.top) } i.appendChild(h) } function Ui(e) { if (!!e.state.focused) { var n = e.display; clearInterval(n.blinker); var i = !0; n.cursorDiv.style.visibility = "", e.options.cursorBlinkRate > 0 ? n.blinker = setInterval(function() { e.hasFocus() || Kn(e), n.cursorDiv.style.visibility = (i = !i) ? "" : "hidden" }, e.options.cursorBlinkRate) : e.options.cursorBlinkRate < 0 && (n .cursorDiv.style.visibility = "hidden") } } function ea(e) { e.hasFocus() || (e.display.input.focus(), e.state.focused || ji(e)) } function zi(e) { e.state.delayingBlurEvent = !0, setTimeout(function() { e.state.delayingBlurEvent && (e.state.delayingBlurEvent = !1, e.state .focused && Kn(e)) }, 100) } function ji(e, n) { e.state.delayingBlurEvent && !e.state.draggingText && (e.state.delayingBlurEvent = ! 1), e.options.readOnly != "nocursor" && (e.state.focused || (be(e, "focus", e, n), e.state.focused = !0, Z(e.display.wrapper, "CodeMirror-focused"), !e.curOp && e.display.selForContextMenu != e .doc.sel && (e.display.input.reset(), m && setTimeout(function() { return e.display.input.reset(!0) }, 20)), e.display.input.receivedFocus()), Ui(e)) } function Kn(e, n) { e.state.delayingBlurEvent || (e.state.focused && (be(e, "blur", e, n), e.state .focused = !1, H(e.display.wrapper, "CodeMirror-focused")), clearInterval(e.display.blinker), setTimeout(function() { e.state.focused || (e.display.shift = !1) }, 150)) } function ei(e) { for (var n = e.display, i = n.lineDiv.offsetTop, r = Math.max(0, n.scroller .getBoundingClientRect().top), a = n.lineDiv.getBoundingClientRect() .top, h = 0, T = 0; T < n.view.length; T++) { var P = n.view[T], O = e.options.lineWrapping, $ = void 0, Y = 0; if (!P.hidden) { if (a += P.line.height, f && c < 8) { var Q = P.node.offsetTop + P.node.offsetHeight; $ = Q - i, i = Q } else { var _ = P.node.getBoundingClientRect(); $ = _.bottom - _.top, !O && P.text.firstChild && (Y = P.text.firstChild .getBoundingClientRect().right - _.left - 1) } var q = P.line.height - $; if ((q > .005 || q < -.005) && (a < r && (h -= q), zt(P.line, $), ta(P .line), P.rest)) for (var ie = 0; ie < P.rest.length; ie++) ta(P.rest[ie]); if (Y > e.display.sizerWidth) { var ae = Math.ceil(Y / Qn(e.display)); ae > e.display.maxLineLength && (e.display.maxLineLength = ae, e.display .maxLine = P.line, e.display.maxLineChanged = !0) } } } Math.abs(h) > 2 && (n.scroller.scrollTop += h) } function ta(e) { if (e.widgets) for (var n = 0; n < e.widgets.length; ++n) { var i = e.widgets[n], r = i.node.parentNode; r && (i.height = r.offsetHeight) } } function ti(e, n, i) { var r = i && i.top != null ? Math.max(0, i.top) : e.scroller.scrollTop; r = Math.floor(r - Xr(e)); var a = i && i.bottom != null ? i.bottom : r + e.wrapper.clientHeight, h = qt(n, r), T = qt(n, a); if (i && i.ensure) { var P = i.ensure.from.line, O = i.ensure.to.line; P < h ? (h = P, T = qt(n, un(Ce(n, P)) + e.wrapper.clientHeight)) : Math.min(O, n.lastLine()) >= T && (h = qt(n, un(Ce(n, O)) - e.wrapper.clientHeight), T = O) } return { from: h, to: Math.max(T, h + 1) } } function _l(e, n) { if (!Oe(e, "scrollCursorIntoView")) { var i = e.display, r = i.sizer.getBoundingClientRect(), a = null, h = i.wrapper.ownerDocument; if (n.top + r.top < 0 ? a = !0 : n.bottom + r.top > (h.defaultView .innerHeight || h.documentElement.clientHeight) && (a = !1), a != null && !w) { var T = M("div", "\u200B", null, `position: absolute; top: ` + (n.top - i.viewOffset - Xr(e.display)) + `px; height: ` + (n.bottom - n.top + en(e) + i.barHeight) + `px; left: ` + n.left + "px; width: " + Math.max(2, n.right - n.left) + "px;"); e.display.lineSpace.appendChild(T), T.scrollIntoView(a), e.display.lineSpace .removeChild(T) } } } function es(e, n, i, r) { r == null && (r = 0); var a; !e.options.lineWrapping && n == i && (i = n.sticky == "before" ? X(n.line, n.ch + 1, "before") : n, n = n.ch ? X(n.line, n.sticky == "before" ? n.ch - 1 : n .ch, "after") : n); for (var h = 0; h < 5; h++) { var T = !1, P = Yt(e, n), O = !i || i == n ? P : Yt(e, i); a = { left: Math.min(P.left, O.left), top: Math.min(P.top, O.top) - r, right: Math.max(P.left, O.left), bottom: Math.max(P.bottom, O.bottom) + r }; var $ = Wi(e, a), Y = e.doc.scrollTop, Q = e.doc.scrollLeft; if ($.scrollTop != null && (Ar(e, $.scrollTop), Math.abs(e.doc.scrollTop - Y) > 1 && (T = !0)), $.scrollLeft != null && (On(e, $.scrollLeft), Math.abs(e .doc.scrollLeft - Q) > 1 && (T = !0)), !T) break } return a } function ts(e, n) { var i = Wi(e, n); i.scrollTop != null && Ar(e, i.scrollTop), i.scrollLeft != null && On(e, i .scrollLeft) } function Wi(e, n) { var i = e.display, r = Gn(e.display); n.top < 0 && (n.top = 0); var a = e.curOp && e.curOp.scrollTop != null ? e.curOp.scrollTop : i.scroller .scrollTop, h = Ri(e), T = {}; n.bottom - n.top > h && (n.bottom = n.top + h); var P = e.doc.height + Ii(i), O = n.top < r, $ = n.bottom > P - r; if (n.top < a) T.scrollTop = O ? 0 : n.top; else if (n.bottom > a + h) { var Y = Math.min(n.top, ($ ? P : n.bottom) - h); Y != a && (T.scrollTop = Y) } var Q = e.options.fixedGutter ? 0 : i.gutters.offsetWidth, _ = e.curOp && e.curOp.scrollLeft != null ? e.curOp.scrollLeft : i.scroller .scrollLeft - Q, q = Mn(e) - i.gutters.offsetWidth, ie = n.right - n.left > q; return ie && (n.right = n.left + q), n.left < 10 ? T.scrollLeft = 0 : n.left < _ ? T .scrollLeft = Math.max(0, n.left + Q - (ie ? 0 : 10)) : n.right > q + _ - 3 && ( T.scrollLeft = n.right + (ie ? 0 : 10) - q), T } function Vi(e, n) { n != null && (ni(e), e.curOp.scrollTop = (e.curOp.scrollTop == null ? e.doc .scrollTop : e.curOp.scrollTop) + n) } function Xn(e) { ni(e); var n = e.getCursor(); e.curOp.scrollToPos = { from: n, to: n, margin: e.options.cursorScrollMargin } } function yr(e, n, i) { (n != null || i != null) && ni(e), n != null && (e.curOp.scrollLeft = n), i != null && (e.curOp.scrollTop = i) } function ns(e, n) { ni(e), e.curOp.scrollToPos = n } function ni(e) { var n = e.curOp.scrollToPos; if (n) { e.curOp.scrollToPos = null; var i = Ko(e, n.from), r = Ko(e, n.to); na(e, i, r, n.margin) } } function na(e, n, i, r) { var a = Wi(e, { left: Math.min(n.left, i.left), top: Math.min(n.top, i.top) - r, right: Math.max(n.right, i.right), bottom: Math.max(n.bottom, i.bottom) + r }); yr(e, a.scrollLeft, a.scrollTop) } function Ar(e, n) { Math.abs(e.doc.scrollTop - n) < 2 || (t || Yi(e, { top: n }), ra(e, n, !0), t && Yi(e), Sr(e, 100)) } function ra(e, n, i) { n = Math.max(0, Math.min(e.display.scroller.scrollHeight - e.display.scroller .clientHeight, n)), !(e.display.scroller.scrollTop == n && !i) && (e.doc .scrollTop = n, e.display.scrollbars.setScrollTop(n), e.display.scroller .scrollTop != n && (e.display.scroller.scrollTop = n)) } function On(e, n, i, r) { n = Math.max(0, Math.min(n, e.display.scroller.scrollWidth - e.display.scroller .clientWidth)), !((i ? n == e.doc.scrollLeft : Math.abs(e.doc.scrollLeft - n) < 2) && !r) && (e.doc.scrollLeft = n, sa(e), e.display.scroller .scrollLeft != n && (e.display.scroller.scrollLeft = n), e.display .scrollbars.setScrollLeft(n)) } function xr(e) { var n = e.display, i = n.gutters.offsetWidth, r = Math.round(e.doc.height + Ii(e.display)); return { clientHeight: n.scroller.clientHeight, viewHeight: n.wrapper.clientHeight, scrollWidth: n.scroller.scrollWidth, clientWidth: n.scroller.clientWidth, viewWidth: n.wrapper.clientWidth, barLeft: e.options.fixedGutter ? i : 0, docHeight: r, scrollHeight: r + en(e) + n.barHeight, nativeBarWidth: n.nativeBarWidth, gutterWidth: i } } var Fn = function(e, n, i) { this.cm = i; var r = this.vert = M("div", [M("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"), a = this.horiz = M("div", [M("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); r.tabIndex = a.tabIndex = -1, e(r), e(a), ne(r, "scroll", function() { r.clientHeight && n(r.scrollTop, "vertical") }), ne(a, "scroll", function() { a.clientWidth && n(a.scrollLeft, "horizontal") }), this.checkedZeroWidth = !1, f && c < 8 && (this.horiz.style.minHeight = this.vert.style.minWidth = "18px") }; Fn.prototype.update = function(e) { var n = e.scrollWidth > e.clientWidth + 1, i = e.scrollHeight > e.clientHeight + 1, r = e.nativeBarWidth; if (i) { this.vert.style.display = "block", this.vert.style.bottom = n ? r + "px" : "0"; var a = e.viewHeight - (n ? r : 0); this.vert.firstChild.style.height = Math.max(0, e.scrollHeight - e .clientHeight + a) + "px" } else this.vert.scrollTop = 0, this.vert.style.display = "", this.vert .firstChild.style.height = "0"; if (n) { this.horiz.style.display = "block", this.horiz.style.right = i ? r + "px" : "0", this.horiz.style.left = e.barLeft + "px"; var h = e.viewWidth - e.barLeft - (i ? r : 0); this.horiz.firstChild.style.width = Math.max(0, e.scrollWidth - e .clientWidth + h) + "px" } else this.horiz.style.display = "", this.horiz.firstChild.style.width = "0"; return !this.checkedZeroWidth && e.clientHeight > 0 && (r == 0 && this .zeroWidthHack(), this.checkedZeroWidth = !0), { right: i ? r : 0, bottom: n ? r : 0 } }, Fn.prototype.setScrollLeft = function(e) { this.horiz.scrollLeft != e && (this.horiz.scrollLeft = e), this.disableHoriz && this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz") }, Fn.prototype.setScrollTop = function(e) { this.vert.scrollTop != e && (this.vert.scrollTop = e), this.disableVert && this .enableZeroWidthBar(this.vert, this.disableVert, "vert") }, Fn.prototype.zeroWidthHack = function() { var e = R && !S ? "12px" : "18px"; this.horiz.style.height = this.vert.style.width = e, this.horiz.style .visibility = this.vert.style.visibility = "hidden", this.disableHoriz = new se, this.disableVert = new se }, Fn.prototype.enableZeroWidthBar = function(e, n, i) { e.style.visibility = ""; function r() { var a = e.getBoundingClientRect(), h = i == "vert" ? document.elementFromPoint(a.right - 1, (a.top + a .bottom) / 2) : document.elementFromPoint((a.right + a.left) / 2, a .bottom - 1); h != e ? e.style.visibility = "hidden" : n.set(1e3, r) } n.set(1e3, r) }, Fn.prototype.clear = function() { var e = this.horiz.parentNode; e.removeChild(this.horiz), e.removeChild(this.vert) }; var Er = function() {}; Er.prototype.update = function() { return { bottom: 0, right: 0 } }, Er.prototype.setScrollLeft = function() {}, Er.prototype.setScrollTop = function() {}, Er.prototype.clear = function() {}; function Jn(e, n) { n || (n = xr(e)); var i = e.display.barWidth, r = e.display.barHeight; ia(e, n); for (var a = 0; a < 4 && i != e.display.barWidth || r != e.display.barHeight; a++) i != e.display.barWidth && e.options.lineWrapping && ei(e), ia(e, xr(e)), i = e .display.barWidth, r = e.display.barHeight } function ia(e, n) { var i = e.display, r = i.scrollbars.update(n); i.sizer.style.paddingRight = (i.barWidth = r.right) + "px", i.sizer.style .paddingBottom = (i.barHeight = r.bottom) + "px", i.heightForcer.style .borderBottom = r.bottom + "px solid transparent", r.right && r.bottom ? (i .scrollbarFiller.style.display = "block", i.scrollbarFiller.style.height = r .bottom + "px", i.scrollbarFiller.style.width = r.right + "px") : i .scrollbarFiller.style.display = "", r.bottom && e.options .coverGutterNextToScrollbar && e.options.fixedGutter ? (i.gutterFiller.style .display = "block", i.gutterFiller.style.height = r.bottom + "px", i .gutterFiller.style.width = n.gutterWidth + "px") : i.gutterFiller.style .display = "" } var oa = { native: Fn, null: Er }; function aa(e) { e.display.scrollbars && (e.display.scrollbars.clear(), e.display.scrollbars .addClass && H(e.display.wrapper, e.display.scrollbars.addClass)), e.display .scrollbars = new oa[e.options.scrollbarStyle](function(n) { e.display.wrapper.insertBefore(n, e.display.scrollbarFiller), ne(n, "mousedown", function() { e.state.focused && setTimeout(function() { return e.display.input.focus() }, 0) }), n.setAttribute("cm-not-content", "true") }, function(n, i) { i == "horizontal" ? On(e, n) : Ar(e, n) }, e), e.display.scrollbars.addClass && Z(e.display.wrapper, e.display .scrollbars.addClass) } var rs = 0; function Bn(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: ++rs, markArrays: null }, Ol(e.curOp) } function Hn(e) { var n = e.curOp; n && Bl(n, function(i) { for (var r = 0; r < i.ops.length; r++) i.ops[r].cm.curOp = null; os(i) }) } function os(e) { for (var n = e.ops, i = 0; i < n.length; i++) as(n[i]); for (var r = 0; r < n.length; r++) ls(n[r]); for (var a = 0; a < n.length; a++) ss(n[a]); for (var h = 0; h < n.length; h++) us(n[h]); for (var T = 0; T < n.length; T++) fs(n[T]) } function as(e) { var n = e.cm, i = n.display; cs(n), e.updateMaxLine && Di(n), e.mustUpdate = e.viewChanged || e.forceUpdate || e .scrollTop != null || e.scrollToPos && (e.scrollToPos.from.line < i.viewFrom || e.scrollToPos.to.line >= i.viewTo) || i.maxLineChanged && n.options .lineWrapping, e.update = e.mustUpdate && new ri(n, e.mustUpdate && { top: e.scrollTop, ensure: e.scrollToPos }, e.forceUpdate) } function ls(e) { e.updatedDisplay = e.mustUpdate && ki(e.cm, e.update) } function ss(e) { var n = e.cm, i = n.display; e.updatedDisplay && ei(n), e.barMeasure = xr(n), i.maxLineChanged && !n.options .lineWrapping && (e.adjustWidthTo = zo(n, i.maxLine, i.maxLine.text.length) .left + 3, n.display.sizerWidth = e.adjustWidthTo, e.barMeasure .scrollWidth = Math.max(i.scroller.clientWidth, i.sizer.offsetLeft + e .adjustWidthTo + en(n) + n.display.barWidth), e.maxScrollLeft = Math .max(0, i.sizer.offsetLeft + e.adjustWidthTo - Mn(n))), (e.updatedDisplay || e.selectionChanged) && (e.preparedSelection = i.input.prepareSelection()) } function us(e) { var n = e.cm; e.adjustWidthTo != null && (n.display.sizer.style.minWidth = e.adjustWidthTo + "px", e.maxScrollLeft < n.doc.scrollLeft && On(n, Math.min(n.display.scroller .scrollLeft, e.maxScrollLeft), !0), n.display.maxLineChanged = !1); var i = e.focus && e.focus == ee(ge(n)); e.preparedSelection && n.display.input.showSelection(e.preparedSelection, i), (e .updatedDisplay || e.startHeight != n.doc.height) && Jn(n, e.barMeasure), e .updatedDisplay && Qi(n, e.barMeasure), e.selectionChanged && Ui(n), n.state .focused && e.updateInput && n.display.input.reset(e.typing), i && ea(e.cm) } function fs(e) { var n = e.cm, i = n.display, r = n.doc; if (e.updatedDisplay && la(n, e.update), i.wheelStartX != null && (e.scrollTop != null || e.scrollLeft != null || e.scrollToPos) && (i.wheelStartX = i .wheelStartY = null), e.scrollTop != null && ra(n, e.scrollTop, e .forceScroll), e.scrollLeft != null && On(n, e.scrollLeft, !0, !0), e .scrollToPos) { var a = es(n, Ne(r, e.scrollToPos.from), Ne(r, e.scrollToPos.to), e.scrollToPos .margin); _l(n, a) } var h = e.maybeHiddenMarkers, T = e.maybeUnhiddenMarkers; if (h) for (var P = 0; P < h.length; ++P) h[P].lines.length || be(h[P], "hide"); if (T) for (var O = 0; O < T.length; ++O) T[O].lines.length && be(T[O], "unhide"); i.wrapper.offsetHeight && (r.scrollTop = n.display.scroller.scrollTop), e .changeObjs && be(n, "changes", n, e.changeObjs), e.update && e.update.finish() } function Rt(e, n) { if (e.curOp) return n(); Bn(e); try { return n() } finally { Hn(e) } } function at(e, n) { return function() { if (e.curOp) return n.apply(e, arguments); Bn(e); try { return n.apply(e, arguments) } finally { Hn(e) } } } function mt(e) { return function() { if (this.curOp) return e.apply(this, arguments); Bn(this); try { return e.apply(this, arguments) } finally { Hn(this) } } } function lt(e) { return function() { var n = this.cm; if (!n || n.curOp) return e.apply(this, arguments); Bn(n); try { return e.apply(this, arguments) } finally { Hn(n) } } } function Sr(e, n) { e.doc.highlightFrontier < e.display.viewTo && e.state.highlight.set(n, ce(ds, e)) } function ds(e) { var n = e.doc; if (!(n.highlightFrontier >= e.display.viewTo)) { var i = +new Date + e.options.workTime, r = dr(e, n.highlightFrontier), a = []; n.iter(r.line, Math.min(n.first + n.size, e.display.viewTo + 500), function(h) { if (r.line >= e.display.viewFrom) { var T = h.styles, P = h.text.length > e.options.maxHighlightLength ? an(n .mode, r.state) : null, O = ho(e, h, r, !0); P && (r.state = P), h.styles = O.styles; var $ = h.styleClasses, Y = O.classes; Y ? h.styleClasses = Y : $ && (h.styleClasses = null); for (var Q = !T || T.length != h.styles.length || $ != Y && (! $ || !Y || $.bgClass != Y.bgClass || $.textClass != Y.textClass), _ = 0; !Q && _ < T.length; ++_) Q = T[ _] != h.styles[_]; Q && a.push(r.line), h.stateAfter = r.save(), r.nextLine() } else h.text.length <= e.options.maxHighlightLength && xi(e, h .text, r), h.stateAfter = r.line % 5 == 0 ? r.save() : null, r.nextLine(); if (+new Date > i) return Sr(e, e.options.workDelay), !0 }), n.highlightFrontier = r.line, n.modeFrontier = Math.max(n.modeFrontier, r.line), a.length && Rt(e, function() { for (var h = 0; h < a.length; h++) Sn(e, a[h], "text") }) } } var ri = function(e, n, i) { var r = e.display; this.viewport = n, this.visible = ti(r, e.doc, n), this.editorIsHidden = !r .wrapper.offsetWidth, this.wrapperHeight = r.wrapper.clientHeight, this .wrapperWidth = r.wrapper.clientWidth, this.oldDisplayWidth = Mn(e), this .force = i, this.dims = Fi(e), this.events = [] }; ri.prototype.signal = function(e, n) { Ke(e, n) && this.events.push(arguments) }, ri.prototype.finish = function() { for (var e = 0; e < this.events.length; e++) be.apply(null, this.events[e]) }; function cs(e) { var n = e.display; !n.scrollbarsClipped && n.scroller.offsetWidth && (n.nativeBarWidth = n.scroller .offsetWidth - n.scroller.clientWidth, n.heightForcer.style.height = en(e) + "px", n.sizer.style.marginBottom = -n.nativeBarWidth + "px", n.sizer.style .borderRightWidth = en(e) + "px", n.scrollbarsClipped = !0) } function vs(e) { if (e.hasFocus()) return null; var n = ee(ge(e)); if (!n || !J(e.display.lineDiv, n)) return null; var i = { activeElt: n }; if (window.getSelection) { var r = ve(e).getSelection(); r.anchorNode && r.extend && J(e.display.lineDiv, r.anchorNode) && (i .anchorNode = r.anchorNode, i.anchorOffset = r.anchorOffset, i .focusNode = r.focusNode, i.focusOffset = r.focusOffset) } return i } function hs(e) { if (!(!e || !e.activeElt || e.activeElt == ee(e.activeElt.ownerDocument)) && (e .activeElt.focus(), !/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName) && e .anchorNode && J(document.body, e.anchorNode) && J(document.body, e .focusNode))) { var n = e.activeElt.ownerDocument, i = n.defaultView.getSelection(), r = n.createRange(); r.setEnd(e.anchorNode, e.anchorOffset), r.collapse(!1), i.removeAllRanges(), i .addRange(r), i.extend(e.focusNode, e.focusOffset) } } function ki(e, n) { var i = e.display, r = e.doc; if (n.editorIsHidden) return bn(e), !1; if (!n.force && n.visible.from >= i.viewFrom && n.visible.to <= i.viewTo && (i .updateLineNumbers == null || i.updateLineNumbers >= i.viewTo) && i .renderedView == i.view && qo(e) == 0) return !1; ua(e) && (bn(e), n.dims = Fi(e)); var a = r.first + r.size, h = Math.max(n.visible.from - e.options.viewportMargin, r.first), T = Math.min(a, n.visible.to + e.options.viewportMargin); i.viewFrom < h && h - i.viewFrom < 20 && (h = Math.max(r.first, i.viewFrom)), i .viewTo > T && i.viewTo - T < 20 && (T = Math.min(a, i.viewTo)), sn && (h = Ci(e .doc, h), T = Io(e.doc, T)); var P = h != i.viewFrom || T != i.viewTo || i.lastWrapHeight != n.wrapperHeight || i .lastWrapWidth != n.wrapperWidth; Zl(e, h, T), i.viewOffset = un(Ce(e.doc, i.viewFrom)), e.display.mover.style.top = i .viewOffset + "px"; var O = qo(e); if (!P && O == 0 && !n.force && i.renderedView == i.view && (i.updateLineNumbers == null || i.updateLineNumbers >= i.viewTo)) return !1; var $ = vs(e); return O > 4 && (i.lineDiv.style.display = "none"), ps(e, i.updateLineNumbers, n .dims), O > 4 && (i.lineDiv.style.display = ""), i.renderedView = i.view, hs($), F(i.cursorDiv), F(i.selectionDiv), i.gutters.style.height = i.sizer.style .minHeight = 0, P && (i.lastWrapHeight = n.wrapperHeight, i.lastWrapWidth = n .wrapperWidth, Sr(e, 400)), i.updateLineNumbers = null, !0 } function la(e, n) { for (var i = n.viewport, r = !0;; r = !1) { if (!r || !e.options.lineWrapping || n.oldDisplayWidth == Mn(e)) { if (i && i.top != null && (i = { top: Math.min(e.doc.height + Ii(e.display) - Ri(e), i.top) }), n.visible = ti(e.display, e.doc, i), n.visible.from >= e.display .viewFrom && n.visible.to <= e.display.viewTo) break } else r && (n.visible = ti(e.display, e.doc, i)); if (!ki(e, n)) break; ei(e); var a = xr(e); mr(e), Jn(e, a), Qi(e, a), n.force = !1 } n.signal(e, "update", e), (e.display.viewFrom != e.display.reportedViewFrom || e .display.viewTo != e.display.reportedViewTo) && (n.signal(e, "viewportChange", e, e.display.viewFrom, e.display.viewTo), e.display .reportedViewFrom = e.display.viewFrom, e.display.reportedViewTo = e.display .viewTo) } function Yi(e, n) { var i = new ri(e, n); if (ki(e, i)) { ei(e), la(e, i); var r = xr(e); mr(e), Jn(e, r), Qi(e, r), i.finish() } } function ps(e, n, i) { var r = e.display, a = e.options.lineNumbers, h = r.lineDiv, T = h.firstChild; function P(ie) { var ae = ie.nextSibling; return m && R && e.display.currentWheelTarget == ie ? ie.style.display = "none" : ie.parentNode.removeChild(ie), ae } for (var O = r.view, $ = r.viewFrom, Y = 0; Y < O.length; Y++) { var Q = O[Y]; if (!Q.hidden) if (!Q.node || Q.node.parentNode != h) { var _ = jl(e, Q, $, i); h.insertBefore(_, T) } else { for (; T != Q.node;) T = P(T); var q = a && n != null && n <= $ && Q.lineNumber; Q.changes && (de(Q.changes, "gutter") > -1 && (q = !1), Lo(e, Q, $, i)), q && (F(Q.lineNumber), Q.lineNumber.appendChild(document .createTextNode(K(e.options, $)))), T = Q.node.nextSibling } $ += Q.size } for (; T;) T = P(T) } function Gi(e) { var n = e.gutters.offsetWidth; e.sizer.style.marginLeft = n + "px", ot(e, "gutterChanged", e) } function Qi(e, n) { e.display.sizer.style.minHeight = n.docHeight + "px", e.display.heightForcer.style .top = n.docHeight + "px", e.display.gutters.style.height = n.docHeight + e .display.barHeight + en(e) + "px" } function sa(e) { var n = e.display, i = n.view; if (!(!n.alignWidgets && (!n.gutters.firstChild || !e.options.fixedGutter))) { for (var r = Bi(n) - n.scroller.scrollLeft + e.doc.scrollLeft, a = n.gutters .offsetWidth, h = r + "px", T = 0; T < i.length; T++) if (!i[T].hidden) { e.options.fixedGutter && (i[T].gutter && (i[T].gutter.style.left = h), i[T].gutterBackground && (i[T].gutterBackground.style.left = h)); var P = i[T].alignable; if (P) for (var O = 0; O < P.length; O++) P[O].style.left = h } e.options.fixedGutter && (n.gutters.style.left = r + a + "px") } } function ua(e) { if (!e.options.lineNumbers) return !1; var n = e.doc, i = K(e.options, n.first + n.size - 1), r = e.display; if (i.length != r.lineNumChars) { var a = r.measure.appendChild(M("div", [M("div", i)], "CodeMirror-linenumber CodeMirror-gutter-elt")), h = a.firstChild.offsetWidth, T = a.offsetWidth - h; return r.lineGutter.style.width = "", r.lineNumInnerWidth = Math.max(h, r .lineGutter.offsetWidth - T) + 1, r.lineNumWidth = r.lineNumInnerWidth + T, r.lineNumChars = r.lineNumInnerWidth ? i.length : -1, r.lineGutter.style .width = r.lineNumWidth + "px", Gi(e.display), !0 } return !1 } function Ki(e, n) { for (var i = [], r = !1, a = 0; a < e.length; a++) { var h = e[a], T = null; if (typeof h != "string" && (T = h.style, h = h.className), h == "CodeMirror-linenumbers") if (n) r = !0; else continue; i.push({ className: h, style: T }) } return n && !r && i.push({ className: "CodeMirror-linenumbers", style: null }), i } function fa(e) { var n = e.gutters, i = e.gutterSpecs; F(n), e.lineGutter = null; for (var r = 0; r < i.length; ++r) { var a = i[r], h = a.className, T = a.style, P = n.appendChild(M("div", null, "CodeMirror-gutter " + h)); T && (P.style.cssText = T), h == "CodeMirror-linenumbers" && (e.lineGutter = P, P.style.width = (e.lineNumWidth || 1) + "px") } n.style.display = i.length ? "" : "none", Gi(e) } function br(e) { fa(e.display), St(e), sa(e) } function gs(e, n, i, r) { var a = this; this.input = i, a.scrollbarFiller = M("div", null, "CodeMirror-scrollbar-filler"), a .scrollbarFiller.setAttribute("cm-not-content", "true"), a.gutterFiller = M( "div", null, "CodeMirror-gutter-filler"), a.gutterFiller.setAttribute( "cm-not-content", "true"), a.lineDiv = k("div", null, "CodeMirror-code"), a .selectionDiv = M("div", null, null, "position: relative; z-index: 1"), a .cursorDiv = M("div", null, "CodeMirror-cursors"), a.measure = M("div", null, "CodeMirror-measure"), a.lineMeasure = M("div", null, "CodeMirror-measure"), a.lineSpace = k("div", [a.measure, a.lineMeasure, a.selectionDiv, a.cursorDiv, a .lineDiv ], null, "position: relative; outline: none"); var h = k("div", [a.lineSpace], "CodeMirror-lines"); a.mover = M("div", [h], null, "position: relative"), a.sizer = M("div", [a.mover], "CodeMirror-sizer"), a.sizerWidth = null, a.heightForcer = M("div", null, null, "position: absolute; height: " + Le + "px; width: 1px;"), a.gutters = M("div", null, "CodeMirror-gutters"), a.lineGutter = null, a.scroller = M("div", [a.sizer, a.heightForcer, a.gutters], "CodeMirror-scroll"), a.scroller .setAttribute("tabIndex", "-1"), a.wrapper = M("div", [a.scrollbarFiller, a .gutterFiller, a.scroller ], "CodeMirror"), b && x >= 105 && (a.wrapper.style.clipPath = "inset(0px)"), a .wrapper.setAttribute("translate", "no"), f && c < 8 && (a.gutters.style .zIndex = -1, a.scroller.style.paddingRight = 0), !m && !(t && D) && (a .scroller.draggable = !0), e && (e.appendChild ? e.appendChild(a.wrapper) : e(a.wrapper)), a.viewFrom = a.viewTo = n.first, a.reportedViewFrom = a .reportedViewTo = n.first, a.view = [], a.renderedView = null, a .externalMeasured = null, a.viewOffset = 0, a.lastWrapHeight = a.lastWrapWidth = 0, a.updateLineNumbers = null, a.nativeBarWidth = a.barHeight = a.barWidth = 0, a.scrollbarsClipped = !1, a.lineNumWidth = a.lineNumInnerWidth = a .lineNumChars = null, a.alignWidgets = !1, a.cachedCharWidth = a .cachedTextHeight = a.cachedPaddingH = null, a.maxLine = null, a.maxLineLength = 0, a.maxLineChanged = !1, a.wheelDX = a.wheelDY = a.wheelStartX = a .wheelStartY = null, a.shift = !1, a.selForContextMenu = null, a.activeTouch = null, a.gutterSpecs = Ki(r.gutters, r.lineNumbers), fa(a), i.init(a) } var ii = 0, cn = null; f ? cn = -.53 : t ? cn = 15 : b ? cn = -.7 : y && (cn = -1 / 3); function da(e) { var n = e.wheelDeltaX, i = e.wheelDeltaY; return n == null && e.detail && e.axis == e.HORIZONTAL_AXIS && (n = e.detail), i == null && e.detail && e.axis == e.VERTICAL_AXIS ? i = e.detail : i == null && (i = e.wheelDelta), { x: n, y: i } } function ms(e) { var n = da(e); return n.x *= cn, n.y *= cn, n } function ca(e, n) { b && x == 102 && (e.display.chromeScrollHack == null ? 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 = da(n), r = i.x, a = i.y, h = cn; n.deltaMode === 0 && (r = n.deltaX, a = n.deltaY, h = 1); var T = e.display, P = T.scroller, O = P.scrollWidth > P.clientWidth, $ = P.scrollHeight > P.clientHeight; if (!!(r && O || a && $)) { if (a && R && m) { e: for (var Y = n.target, Q = T.view; Y != P; Y = Y.parentNode) for (var _ = 0; _ < Q.length; _++) if (Q[_].node == Y) { e.display.currentWheelTarget = Y; break e } } if (r && !t && !g && h != null) { a && $ && Ar(e, Math.max(0, P.scrollTop + a * h)), On(e, Math.max(0, P .scrollLeft + r * h)), (!a || a && $) && je(n), T.wheelStartX = null; return } if (a && h != null) { var q = a * h, ie = e.doc.scrollTop, ae = ie + T.wrapper.clientHeight; q < 0 ? ie = Math.max(0, ie + q - 50) : ae = Math.min(e.doc.height, ae + q + 50), Yi(e, { top: ie, bottom: ae }) } ii < 20 && n.deltaMode !== 0 && (T.wheelStartX == null ? (T.wheelStartX = P .scrollLeft, T.wheelStartY = P.scrollTop, T.wheelDX = r, T.wheelDY = a, setTimeout(function() { if (T.wheelStartX != null) { var fe = P.scrollLeft - T.wheelStartX, he = P.scrollTop - T.wheelStartY, ye = he && T.wheelDY && he / T.wheelDY || fe && T .wheelDX && fe / T.wheelDX; T.wheelStartX = T.wheelStartY = null, ye && (cn = (cn * ii + ye) / (ii + 1), ++ii) } }, 200)) : (T.wheelDX += r, T.wheelDY += a)) } } var Bt = function(e, n) { this.ranges = e, this.primIndex = n }; Bt.prototype.primary = function() { return this.ranges[this.primIndex] }, Bt.prototype.equals = function(e) { if (e == this) return !0; if (e.primIndex != this.primIndex || e.ranges.length != this.ranges.length) return !1; for (var n = 0; n < this.ranges.length; n++) { var i = this.ranges[n], r = e.ranges[n]; if (!Pe(i.anchor, r.anchor) || !Pe(i.head, r.head)) return !1 } return !0 }, Bt.prototype.deepCopy = function() { for (var e = [], n = 0; n < this.ranges.length; n++) e[n] = new Ve($e(this .ranges[n].anchor), $e(this.ranges[n].head)); return new Bt(e, this.primIndex) }, Bt.prototype.somethingSelected = function() { for (var e = 0; e < this.ranges.length; e++) if (!this.ranges[e].empty()) return !0; return !1 }, Bt.prototype.contains = function(e, n) { n || (n = e); for (var i = 0; i < this.ranges.length; i++) { var r = this.ranges[i]; if (re(n, r.from()) >= 0 && re(e, r.to()) <= 0) return i } return -1 }; var Ve = function(e, n) { this.anchor = e, this.head = n }; Ve.prototype.from = function() { return rt(this.anchor, this.head) }, Ve.prototype.to = function() { return Ue(this.anchor, this.head) }, Ve.prototype.empty = function() { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch }; function Gt(e, n, i) { var r = e && e.options.selectionsMayTouch, a = n[i]; n.sort(function(_, q) { return re(_.from(), q.from()) }), i = de(n, a); for (var h = 1; h < n.length; h++) { var T = n[h], P = n[h - 1], O = re(P.to(), T.from()); if (r && !T.empty() ? O > 0 : O >= 0) { var $ = rt(P.from(), T.from()), Y = Ue(P.to(), T.to()), Q = P.empty() ? T.from() == T.head : P.from() == P.head; h <= i && --i, n.splice(--h, 2, new Ve(Q ? Y : $, Q ? $ : Y)) } } return new Bt(n, i) } function Cn(e, n) { return new Bt([new Ve(e, n || e)], 0) } function Tn(e) { return e.text ? X(e.from.line + e.text.length - 1, Me(e.text).length + (e.text .length == 1 ? e.from.ch : 0)) : e.to } function va(e, n) { if (re(e, n.from) < 0) return e; if (re(e, n.to) <= 0) return Tn(n); var i = e.line + n.text.length - (n.to.line - n.from.line) - 1, r = e.ch; return e.line == n.to.line && (r += Tn(n).ch - n.to.ch), X(i, r) } function Xi(e, n) { for (var i = [], r = 0; r < e.sel.ranges.length; r++) { var a = e.sel.ranges[r]; i.push(new Ve(va(a.anchor, n), va(a.head, n))) } return Gt(e.cm, i, e.sel.primIndex) } function ha(e, n, i) { return e.line == n.line ? X(i.line, e.ch - n.ch + i.ch) : X(i.line + (e.line - n .line), e.ch) } function ys(e, n, i) { for (var r = [], a = X(e.first, 0), h = a, T = 0; T < n.length; T++) { var P = n[T], O = ha(P.from, a, h), $ = ha(Tn(P), a, h); if (a = P.to, h = $, i == "around") { var Y = e.sel.ranges[T], Q = re(Y.head, Y.anchor) < 0; r[T] = new Ve(Q ? $ : O, Q ? O : $) } else r[T] = new Ve(O, O) } return new Bt(r, e.sel.primIndex) } function Ji(e) { e.doc.mode = rn(e.options, e.doc.modeOption), Cr(e) } function Cr(e) { e.doc.iter(function(n) { n.stateAfter && (n.stateAfter = null), n.styles && (n.styles = null) }), e.doc.modeFrontier = e.doc.highlightFrontier = e.doc.first, Sr(e, 100), e .state.modeGen++, e.curOp && St(e) } function pa(e, n) { return n.from.ch == 0 && n.to.ch == 0 && Me(n.text) == "" && (!e.cm || e.cm.options .wholeLineUpdateBefore) } function Zi(e, n, i, r) { function a(ye) { return i ? i[ye] : null } function h(ye, pe, Ee) { Tl(ye, pe, Ee, r), ot(ye, "change", ye, n) } function T(ye, pe) { for (var Ee = [], Ie = ye; Ie < pe; ++Ie) Ee.push(new Vn($[Ie], a(Ie), r)); return Ee } var P = n.from, O = n.to, $ = n.text, Y = Ce(e, P.line), Q = Ce(e, O.line), _ = Me($), q = a($.length - 1), ie = O.line - P.line; if (n.full) e.insert(0, T(0, $.length)), e.remove($.length, e.size - $.length); else if (pa(e, n)) { var ae = T(0, $.length - 1); h(Q, Q.text, q), ie && e.remove(P.line, ie), ae.length && e.insert(P.line, ae) } else if (Y == Q) if ($.length == 1) h(Y, Y.text.slice(0, P.ch) + _ + Y.text.slice(O.ch), q); else { var fe = T(1, $.length - 1); fe.push(new Vn(_ + Y.text.slice(O.ch), q, r)), h(Y, Y.text.slice(0, P.ch) + $[0], a(0)), e.insert(P.line + 1, fe) } else if ($.length == 1) h(Y, Y.text.slice(0, P.ch) + $[0] + Q.text.slice(O.ch), a( 0)), e.remove(P.line + 1, ie); else { h(Y, Y.text.slice(0, P.ch) + $[0], a(0)), h(Q, _ + Q.text.slice(O.ch), q); var he = T(1, $.length - 1); ie > 1 && e.remove(P.line + 1, ie - 1), e.insert(P.line + 1, he) } ot(e, "change", e, n) } function Dn(e, n, i) { function r(a, h, T) { if (a.linked) for (var P = 0; P < a.linked.length; ++P) { var O = a.linked[P]; if (O.doc != h) { var $ = T && O.sharedHist; i && !$ || (n(O.doc, $), r(O.doc, a, $)) } } } r(e, null, !0) } function ga(e, n) { if (n.cm) throw new Error("This document is already in use."); e.doc = n, n.cm = e, Hi(e), Ji(e), ma(e), e.options.direction = n.direction, e .options.lineWrapping || Di(e), e.options.mode = n.modeOption, St(e) } function ma(e) { (e.doc.direction == "rtl" ? Z : H)(e.display.lineDiv, "CodeMirror-rtl") } function As(e) { Rt(e, function() { ma(e), St(e) }) } function oi(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 qi(e, n) { var i = { from: $e(n.from), to: Tn(n), text: ln(e, n.from, n.to) }; return xa(e, i, n.from.line, n.to.line + 1), Dn(e, function(r) { return xa(r, i, n.from.line, n.to.line + 1) }, !0), i } function ya(e) { for (; e.length;) { var n = Me(e); if (n.ranges) e.pop(); else break } } function xs(e, n) { if (n) return ya(e.done), Me(e.done); if (e.done.length && !Me(e.done).ranges) return Me(e.done); if (e.done.length > 1 && !e.done[e.done.length - 2].ranges) return e.done.pop(), Me( e.done) } function Aa(e, n, i, r) { var a = e.history; a.undone.length = 0; var h = +new Date, T, P; if ((a.lastOp == r || a.lastOrigin == n.origin && n.origin && (n.origin.charAt(0) == "+" && a.lastModTime > h - (e.cm ? e.cm.options.historyEventDelay : 500) || n.origin.charAt(0) == "*")) && (T = xs(a, a.lastOp == r))) P = Me(T .changes), re(n.from, n.to) == 0 && re(n.from, P.to) == 0 ? P.to = Tn(n) : T .changes.push(qi(e, n)); else { var O = Me(a.done); for ((!O || !O.ranges) && ai(e.sel, a.done), T = { changes: [qi(e, n)], generation: a.generation }, a.done.push(T); a.done.length > a.undoDepth;) a.done.shift(), a.done[0] .ranges || a.done.shift() } a.done.push(i), a.generation = ++a.maxGeneration, a.lastModTime = a.lastSelTime = h, a.lastOp = a.lastSelOp = r, a.lastOrigin = a.lastSelOrigin = n.origin, P || be( e, "historyAdded") } function Es(e, n, i, r) { var a = n.charAt(0); return a == "*" || a == "+" && i.ranges.length == r.ranges.length && i .somethingSelected() == r.somethingSelected() && new Date - e.history .lastSelTime <= (e.cm ? e.cm.options.historyEventDelay : 500) } function Ss(e, n, i, r) { var a = e.history, h = r && r.origin; i == a.lastSelOp || h && a.lastSelOrigin == h && (a.lastModTime == a.lastSelTime && a.lastOrigin == h || Es(e, h, Me(a.done), n)) ? a.done[a.done.length - 1] = n : ai(n, a.done), a.lastSelTime = +new Date, a.lastSelOrigin = h, a.lastSelOp = i, r && r.clearRedo !== !1 && ya(a.undone) } function ai(e, n) { var i = Me(n); i && i.ranges && i.equals(e) || n.push(e) } function xa(e, n, i, r) { var a = n["spans_" + e.id], h = 0; e.iter(Math.max(e.first, i), Math.min(e.first + e.size, r), function(T) { T.markedSpans && ((a || (a = n["spans_" + e.id] = {}))[h] = T .markedSpans), ++h }) } function bs(e) { if (!e) return null; for (var n, i = 0; i < e.length; ++i) e[i].marker.explicitlyCleared ? n || (n = e .slice(0, i)) : n && n.push(e[i]); return n ? n.length ? n : null : e } function Cs(e, n) { var i = n["spans_" + e.id]; if (!i) return null; for (var r = [], a = 0; a < n.text.length; ++a) r.push(bs(i[a])); return r } function Ea(e, n) { var i = Cs(e, n), r = Si(e, n); if (!i) return r; if (!r) return i; for (var a = 0; a < i.length; ++a) { var h = i[a], T = r[a]; if (h && T) { e: for (var P = 0; P < T.length; ++P) { for (var O = T[P], $ = 0; $ < h.length; ++$) if (h[$].marker == O.marker) continue e; h.push(O) } } else T && (i[a] = T) } return i } function Zn(e, n, i) { for (var r = [], a = 0; a < e.length; ++a) { var h = e[a]; if (h.ranges) { r.push(i ? Bt.prototype.deepCopy.call(h) : h); continue } var T = h.changes, P = []; r.push({ changes: P }); for (var O = 0; O < T.length; ++O) { var $ = T[O], Y = void 0; if (P.push({ from: $.from, to: $.to, text: $.text }), n) for (var Q in $)(Y = Q.match(/^spans_(\d+)$/)) && de(n, Number(Y[1])) > -1 && (Me(P)[Q] = $[Q], delete $[Q]) } } return r } function _i(e, n, i, r) { if (r) { var a = e.anchor; if (i) { var h = re(n, a) < 0; h != re(i, a) < 0 ? (a = n, n = i) : h != re(n, i) < 0 && (n = i) } return new Ve(a, n) } else return new Ve(i || n, n) } function li(e, n, i, r, a) { a == null && (a = e.cm && (e.cm.display.shift || e.extend)), vt(e, new Bt([_i(e.sel .primary(), n, i, a)], 0), r) } function Sa(e, n, i) { for (var r = [], a = e.cm && (e.cm.display.shift || e.extend), h = 0; h < e.sel .ranges.length; h++) r[h] = _i(e.sel.ranges[h], n[h], null, a); var T = Gt(e.cm, r, e.sel.primIndex); vt(e, T, i) } function eo(e, n, i, r) { var a = e.sel.ranges.slice(0); a[n] = i, vt(e, Gt(e.cm, a, e.sel.primIndex), r) } function ba(e, n, i, r) { vt(e, Cn(n, i), r) } function Ts(e, n, i) { var r = { ranges: n.ranges, update: function(a) { this.ranges = []; for (var h = 0; h < a.length; h++) this.ranges[h] = new Ve(Ne(e, a[ h].anchor), Ne(e, a[h].head)) }, origin: i && i.origin }; return be(e, "beforeSelectionChange", e, r), e.cm && be(e.cm, "beforeSelectionChange", e.cm, r), r.ranges != n.ranges ? Gt(e.cm, r.ranges, r.ranges.length - 1) : n } function Ca(e, n, i) { var r = e.history.done, a = Me(r); a && a.ranges ? (r[r.length - 1] = n, si(e, n, i)) : vt(e, n, i) } function vt(e, n, i) { si(e, n, i), Ss(e, e.sel, e.cm ? e.cm.curOp.id : NaN, i) } function si(e, n, i) { (Ke(e, "beforeSelectionChange") || e.cm && Ke(e.cm, "beforeSelectionChange")) && ( n = Ts(e, n, i)); var r = i && i.bias || (re(n.primary().head, e.sel.primary().head) < 0 ? -1 : 1); Ta(e, wa(e, n, r, !0)), !(i && i.scroll === !1) && e.cm && e.cm.getOption( "readOnly") != "nocursor" && Xn(e.cm) } function Ta(e, n) { n.equals(e.sel) || (e.sel = n, e.cm && (e.cm.curOp.updateInput = 1, e.cm.curOp .selectionChanged = !0, xt(e.cm)), ot(e, "cursorActivity", e)) } function Da(e) { Ta(e, wa(e, e.sel, null, !1)) } function wa(e, n, i, r) { for (var a, h = 0; h < n.ranges.length; h++) { var T = n.ranges[h], P = n.ranges.length == e.sel.ranges.length && e.sel.ranges[h], O = ui(e, T.anchor, P && P.anchor, i, r), $ = T.head == T.anchor ? O : ui(e, T.head, P && P.head, i, r); (a || O != T.anchor || $ != T.head) && (a || (a = n.ranges.slice(0, h)), a[h] = new Ve(O, $)) } return a ? Gt(e.cm, a, n.primIndex) : n } function qn(e, n, i, r, a) { var h = Ce(e, n.line); if (h.markedSpans) for (var T = 0; T < h.markedSpans.length; ++T) { var P = h.markedSpans[T], O = P.marker, $ = "selectLeft" in O ? !O.selectLeft : O.inclusiveLeft, Y = "selectRight" in O ? !O.selectRight : O.inclusiveRight; if ((P.from == null || ($ ? P.from <= n.ch : P.from < n.ch)) && (P.to == null || (Y ? P.to >= n.ch : P.to > n.ch))) { if (a && (be(O, "beforeCursorEnter"), O.explicitlyCleared)) if (h.markedSpans) { --T; continue } else break; if (!O.atomic) continue; if (i) { var Q = O.find(r < 0 ? 1 : -1), _ = void 0; if ((r < 0 ? Y : $) && (Q = Ia(e, Q, -r, Q && Q.line == n.line ? h : null)), Q && Q.line == n.line && (_ = re(Q, i)) && (r < 0 ? _ < 0 : _ > 0)) return qn(e, Q, n, r, a) } var q = O.find(r < 0 ? -1 : 1); return (r < 0 ? $ : Y) && (q = Ia(e, q, r, q.line == n.line ? h : null)), q ? qn(e, q, n, r, a) : null } } return n } function ui(e, n, i, r, a) { var h = r || 1, T = qn(e, n, i, h, a) || !a && qn(e, n, i, h, !0) || qn(e, n, i, -h, a) || !a && qn(e, n, i, -h, !0); return T || (e.cantEdit = !0, X(e.first, 0)) } function Ia(e, n, i, r) { return i < 0 && n.ch == 0 ? n.line > e.first ? Ne(e, X(n.line - 1)) : null : i > 0 && n.ch == (r || Ce(e, n.line)).text.length ? n.line < e.first + e.size - 1 ? X(n.line + 1, 0) : null : new X(n.line, n.ch + i) } function Ra(e) { e.setSelection(X(e.firstLine(), 0), X(e.lastLine()), Fe) } function Ma(e, n, i) { var r = { canceled: !1, from: n.from, to: n.to, text: n.text, origin: n.origin, cancel: function() { return r.canceled = !0 } }; return i && (r.update = function(a, h, T, P) { a && (r.from = Ne(e, a)), h && (r.to = Ne(e, h)), T && (r.text = T), P !== void 0 && (r.origin = P) }), be(e, "beforeChange", e, r), e.cm && be(e.cm, "beforeChange", e.cm, r), r .canceled ? (e.cm && (e.cm.curOp.updateInput = 2), null) : { from: r.from, to: r.to, text: r.text, origin: r.origin } } function _n(e, n, i) { if (e.cm) { if (!e.cm.curOp) return at(e.cm, _n)(e, n, i); if (e.cm.state.suppressEdits) return } if (!((Ke(e, "beforeChange") || e.cm && Ke(e.cm, "beforeChange")) && (n = Ma(e, n, ! 0), !n))) { var r = Eo && !i && El(e, n.from, n.to); if (r) for (var a = r.length - 1; a >= 0; --a) Pa(e, { from: r[a].from, to: r[a].to, text: a ? [""] : n.text, origin: n.origin }); else Pa(e, n) } } function Pa(e, n) { if (!(n.text.length == 1 && n.text[0] == "" && re(n.from, n.to) == 0)) { var i = Xi(e, n); Aa(e, n, i, e.cm ? e.cm.curOp.id : NaN), Tr(e, n, i, Si(e, n)); var r = []; Dn(e, function(a, h) { !h && de(r, a.history) == -1 && (Fa(a.history, n), r.push(a .history)), Tr(a, n, null, Si(a, n)) }) } } function fi(e, n, i) { var r = e.cm && e.cm.state.suppressEdits; if (!(r && !i)) { for (var a = e.history, h, T = e.sel, P = n == "undo" ? a.done : a.undone, O = n == "undo" ? a.undone : a.done, $ = 0; $ < P.length && (h = P[$], !(i ? h.ranges && !h.equals(e.sel) : !h.ranges)); $++); if ($ != P.length) { for (a.lastOrigin = a.lastSelOrigin = null;;) if (h = P.pop(), h.ranges) { if (ai(h, O), i && !h.equals(e.sel)) { vt(e, h, { clearRedo: !1 }); return } T = h } else if (r) { P.push(h); return } else break; var Y = []; ai(T, O), O.push({ changes: Y, generation: a.generation }), a.generation = h.generation || ++a.maxGeneration; for (var Q = Ke(e, "beforeChange") || e.cm && Ke(e.cm, "beforeChange"), _ = function(ae) { var fe = h.changes[ae]; if (fe.origin = n, Q && !Ma(e, fe, !1)) return P.length = 0, {}; Y.push(qi(e, fe)); var he = ae ? Xi(e, fe) : Me(P); Tr(e, fe, he, Ea(e, fe)), !ae && e.cm && e.cm.scrollIntoView({ from: fe.from, to: Tn(fe) }); var ye = []; Dn(e, function(pe, Ee) { !Ee && de(ye, pe.history) == -1 && (Fa(pe.history, fe), ye.push(pe.history)), Tr(pe, fe, null, Ea(pe, fe)) }) }, q = h.changes.length - 1; q >= 0; --q) { var ie = _(q); if (ie) return ie.v } } } } function Na(e, n) { if (n != 0 && (e.first += n, e.sel = new Bt(gt(e.sel.ranges, function(a) { return new Ve(X(a.anchor.line + n, a.anchor.ch), X(a.head.line + n, a.head.ch)) }), e.sel.primIndex), e.cm)) { St(e.cm, e.first, e.first - n, n); for (var i = e.cm.display, r = i.viewFrom; r < i.viewTo; r++) Sn(e.cm, r, "gutter") } } function Tr(e, n, i, r) { if (e.cm && !e.cm.curOp) return at(e.cm, Tr)(e, n, i, r); if (n.to.line < e.first) { Na(e, n.text.length - 1 - (n.to.line - n.from.line)); return } if (!(n.from.line > e.lastLine())) { if (n.from.line < e.first) { var a = n.text.length - 1 - (e.first - n.from.line); Na(e, a), n = { from: X(e.first, 0), to: X(n.to.line + a, n.to.ch), text: [Me(n.text)], origin: n.origin } } var h = e.lastLine(); n.to.line > h && (n = { from: n.from, to: X(h, Ce(e, h).text.length), text: [n.text[0]], origin: n.origin }), n.removed = ln(e, n.from, n.to), i || (i = Xi(e, n)), e.cm ? Ds(e.cm, n, r) : Zi(e, n, r), si(e, i, Fe), e.cantEdit && ui(e, X(e.firstLine(), 0)) && (e.cantEdit = !1) } } function Ds(e, n, i) { var r = e.doc, a = e.display, h = n.from, T = n.to, P = !1, O = h.line; e.options.lineWrapping || (O = We(kt(Ce(r, h.line))), r.iter(O, T.line + 1, function(q) { if (q == a.maxLine) return P = !0, !0 })), r.sel.contains(n.from, n.to) > -1 && xt(e), Zi(r, n, i, Zo(e)), e .options.lineWrapping || (r.iter(O, h.line + n.text.length, function(q) { var ie = Qr(q); ie > a.maxLineLength && (a.maxLine = q, a.maxLineLength = ie, a .maxLineChanged = !0, P = !1) }), P && (e.curOp.updateMaxLine = !0)), hl(r, h.line), Sr(e, 400); var $ = n.text.length - (T.line - h.line) - 1; n.full ? St(e) : h.line == T.line && n.text.length == 1 && !pa(e.doc, n) ? Sn(e, h .line, "text") : St(e, h.line, T.line + 1, $); var Y = Ke(e, "changes"), Q = Ke(e, "change"); if (Q || Y) { var _ = { from: h, to: T, text: n.text, removed: n.removed, origin: n.origin }; Q && ot(e, "change", e, _), Y && (e.curOp.changeObjs || (e.curOp .changeObjs = [])).push(_) } e.display.selForContextMenu = null } function er(e, n, i, r, a) { var h; r || (r = i), re(r, i) < 0 && (h = [r, i], i = h[0], r = h[1]), typeof n == "string" && (n = e.splitLines(n)), _n(e, { from: i, to: r, text: n, origin: a }) } function La(e, n, i, r) { i < e.line ? e.line += r : n < e.line && (e.line = n, e.ch = 0) } function Oa(e, n, i, r) { for (var a = 0; a < e.length; ++a) { var h = e[a], T = !0; if (h.ranges) { h.copied || (h = e[a] = h.deepCopy(), h.copied = !0); for (var P = 0; P < h.ranges.length; P++) La(h.ranges[P].anchor, n, i, r), La(h.ranges[P].head, n, i, r); continue } for (var O = 0; O < h.changes.length; ++O) { var $ = h.changes[O]; if (i < $.from.line) $.from = X($.from.line + r, $.from.ch), $.to = X($.to .line + r, $.to.ch); else if (n <= $.to.line) { T = !1; break } } T || (e.splice(0, a + 1), a = 0) } } function Fa(e, n) { var i = n.from.line, r = n.to.line, a = n.text.length - (r - i) - 1; Oa(e.done, i, r, a), Oa(e.undone, i, r, a) } function Dr(e, n, i, r) { var a = n, h = n; return typeof n == "number" ? h = Ce(e, Ft(e, n)) : a = We(n), a == null ? null : ( r(h, a) && e.cm && Sn(e.cm, a, i), h) } function wr(e) { this.lines = e, this.parent = null; for (var n = 0, i = 0; i < e.length; ++i) e[i].parent = this, n += e[i].height; this.height = n } wr.prototype = { chunkSize: function() { return this.lines.length }, removeInner: function(e, n) { for (var i = e, r = e + n; i < r; ++i) { var a = this.lines[i]; this.height -= a.height, Dl(a), ot(a, "delete") } this.lines.splice(e, n) }, collapse: function(e) { e.push.apply(e, this.lines) }, insertInner: function(e, n, i) { this.height += i, this.lines = this.lines.slice(0, e).concat(n).concat( this.lines.slice(e)); for (var r = 0; r < n.length; ++r) n[r].parent = this }, iterN: function(e, n, i) { for (var r = e + n; e < r; ++e) if (i(this.lines[e])) return !0 } }; function Ir(e) { this.children = e; for (var n = 0, i = 0, r = 0; r < e.length; ++r) { var a = e[r]; n += a.chunkSize(), i += a.height, a.parent = this } this.size = n, this.height = i, this.parent = null } Ir.prototype = { chunkSize: function() { return this.size }, removeInner: function(e, n) { this.size -= n; for (var i = 0; i < this.children.length; ++i) { var r = this.children[i], a = r.chunkSize(); if (e < a) { var h = Math.min(n, a - e), T = r.height; if (r.removeInner(e, h), this.height -= T - r.height, a == h && (this.children.splice(i--, 1), r.parent = null), (n -= h) == 0) break; e = 0 } else e -= a } if (this.size - n < 25 && (this.children.length > 1 || !(this.children[ 0] instanceof wr))) { var P = []; this.collapse(P), this.children = [new wr(P)], this.children[0] .parent = this } }, collapse: function(e) { for (var n = 0; n < this.children.length; ++n) this.children[n] .collapse(e) }, insertInner: function(e, n, i) { this.size += n.length, this.height += i; for (var r = 0; r < this.children.length; ++r) { var a = this.children[r], h = a.chunkSize(); if (e <= h) { if (a.insertInner(e, n, i), a.lines && a.lines.length > 50) { for (var T = a.lines.length % 25 + 25, P = T; P < a.lines .length;) { var O = new wr(a.lines.slice(P, P += 25)); a.height -= O.height, this.children.splice(++r, 0, O), O .parent = this } a.lines = a.lines.slice(0, T), this.maybeSpill() } break } e -= h } }, maybeSpill: function() { if (!(this.children.length <= 10)) { var e = this; do { var n = e.children.splice(e.children.length - 5, 5), i = new Ir(n); if (e.parent) { e.size -= i.size, e.height -= i.height; var a = de(e.parent.children, e); e.parent.children.splice(a + 1, 0, i) } else { var r = new Ir(e.children); r.parent = e, e.children = [r, i], e = r } i.parent = e.parent } while (e.children.length > 10); e.parent.maybeSpill() } }, iterN: function(e, n, i) { for (var r = 0; r < this.children.length; ++r) { var a = this.children[r], h = a.chunkSize(); if (e < h) { var T = Math.min(n, h - e); if (a.iterN(e, T, i)) return !0; if ((n -= T) == 0) break; e = 0 } else e -= h } } }; var Rr = function(e, n, i) { if (i) for (var r in i) i.hasOwnProperty(r) && (this[r] = i[r]); this.doc = e, this.node = n }; Rr.prototype.clear = function() { var e = this.doc.cm, n = this.line.widgets, i = this.line, r = We(i); if (!(r == null || !n)) { for (var a = 0; a < n.length; ++a) n[a] == this && n.splice(a--, 1); n.length || (i.widgets = null); var h = pr(this); zt(i, Math.max(0, i.height - h)), e && (Rt(e, function() { Ba(e, i, -h), Sn(e, r, "widget") }), ot(e, "lineWidgetCleared", e, this, r)) } }, Rr.prototype.changed = function() { var e = this, n = this.height, i = this.doc.cm, r = this.line; this.height = null; var a = pr(this) - n; !a || (En(this.doc, r) || zt(r, r.height + a), i && Rt(i, function() { i.curOp.forceUpdate = !0, Ba(i, r, a), ot(i, "lineWidgetChanged", i, e, We(r)) })) }, Ge(Rr); function Ba(e, n, i) { un(n) < (e.curOp && e.curOp.scrollTop || e.doc.scrollTop) && Vi(e, i) } function ws(e, n, i, r) { var a = new Rr(e, i, r), h = e.cm; return h && a.noHScroll && (h.display.alignWidgets = !0), Dr(e, n, "widget", function(T) { var P = T.widgets || (T.widgets = []); if (a.insertAt == null ? P.push(a) : P.splice(Math.min(P.length, Math .max(0, a.insertAt)), 0, a), a.line = T, h && !En(e, T)) { var O = un(T) < e.scrollTop; zt(T, T.height + pr(a)), O && Vi(h, a.height), h.curOp .forceUpdate = !0 } return !0 }), h && ot(h, "lineWidgetAdded", h, a, typeof n == "number" ? n : We(n)), a } var Ha = 0, wn = function(e, n) { this.lines = [], this.type = n, this.doc = e, this.id = ++Ha }; wn.prototype.clear = function() { if (!this.explicitlyCleared) { var e = this.doc.cm, n = e && !e.curOp; if (n && Bn(e), Ke(this, "clear")) { var i = this.find(); i && ot(this, "clear", i.from, i.to) } for (var r = null, a = null, h = 0; h < this.lines.length; ++h) { var T = this.lines[h], P = cr(T.markedSpans, this); e && !this.collapsed ? Sn(e, We(T), "text") : e && (P.to != null && (a = We(T)), P.from != null && (r = We(T))), T.markedSpans = ml(T .markedSpans, P), P.from == null && this.collapsed && !En(this .doc, T) && e && zt(T, Gn(e.display)) } if (e && this.collapsed && !e.options.lineWrapping) for (var O = 0; O < this.lines.length; ++O) { var $ = kt(this.lines[O]), Y = Qr($); Y > e.display.maxLineLength && (e.display.maxLine = $, e.display .maxLineLength = Y, e.display.maxLineChanged = !0) } r != null && e && this.collapsed && St(e, r, a + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.atomic && this.doc.cantEdit && (this .doc.cantEdit = !1, e && Da(e.doc)), e && ot(e, "markerCleared", e, this, r, a), n && Hn(e), this.parent && this.parent.clear() } }, wn.prototype.find = function(e, n) { e == null && this.type == "bookmark" && (e = 1); for (var i, r, a = 0; a < this.lines.length; ++a) { var h = this.lines[a], T = cr(h.markedSpans, this); if (T.from != null && (i = X(n ? h : We(h), T.from), e == -1)) return i; if (T.to != null && (r = X(n ? h : We(h), T.to), e == 1)) return r } return i && { from: i, to: r } }, wn.prototype.changed = function() { var e = this, n = this.find(-1, !0), i = this, r = this.doc.cm; !n || !r || Rt(r, function() { var a = n.line, h = We(n.line), T = Mi(r, h); if (T && (Vo(T), r.curOp.selectionChanged = r.curOp.forceUpdate = ! 0), r.curOp.updateMaxLine = !0, !En(i.doc, a) && i.height != null) { var P = i.height; i.height = null; var O = pr(i) - P; O && zt(a, a.height + O) } ot(r, "markerChanged", r, e) }) }, wn.prototype.attachLine = function(e) { if (!this.lines.length && this.doc.cm) { var n = this.doc.cm.curOp; (!n.maybeHiddenMarkers || de(n.maybeHiddenMarkers, this) == -1) && (n .maybeUnhiddenMarkers || (n.maybeUnhiddenMarkers = [])).push(this) } this.lines.push(e) }, wn.prototype.detachLine = function(e) { if (this.lines.splice(de(this.lines, e), 1), !this.lines.length && this.doc .cm) { var n = this.doc.cm.curOp; (n.maybeHiddenMarkers || (n.maybeHiddenMarkers = [])).push(this) } }, Ge(wn); function tr(e, n, i, r, a) { if (r && r.shared) return Is(e, n, i, r, a); if (e.cm && !e.cm.curOp) return at(e.cm, tr)(e, n, i, r, a); var h = new wn(e, a), T = re(n, i); if (r && le(r, h, !1), T > 0 || T == 0 && h.clearWhenEmpty !== !1) return h; if (h.replacedWith && (h.collapsed = !0, h.widgetNode = k("span", [h.replacedWith], "CodeMirror-widget"), r.handleMouseEvents || h.widgetNode.setAttribute( "cm-ignore-events", "true"), r.insertLeft && (h.widgetNode .insertLeft = !0)), h.collapsed) { if (wo(e, n.line, n, i, h) || n.line != i.line && wo(e, i.line, n, i, h)) throw new Error( "Inserting collapsed marker partially overlapping an existing one"); gl() } h.addToHistory && Aa(e, { from: n, to: i, origin: "markText" }, e.sel, NaN); var P = n.line, O = e.cm, $; if (e.iter(P, i.line + 1, function(Q) { O && h.collapsed && !O.options.lineWrapping && kt(Q) == O.display .maxLine && ($ = !0), h.collapsed && P != n.line && zt(Q, 0), yl(Q, new Vr(h, P == n.line ? n.ch : null, P == i.line ? i.ch : null), e.cm && e.cm.curOp), ++P }), h.collapsed && e.iter(n.line, i.line + 1, function(Q) { En(e, Q) && zt(Q, 0) }), h.clearOnEnter && ne(h, "beforeCursorEnter", function() { return h.clear() }), h.readOnly && (pl(), (e.history.done.length || e.history.undone.length) && e .clearHistory()), h.collapsed && (h.id = ++Ha, h.atomic = !0), O) { if ($ && (O.curOp.updateMaxLine = !0), h.collapsed) St(O, n.line, i.line + 1); else if (h.className || h.startStyle || h.endStyle || h.css || h.attributes || h .title) for (var Y = n.line; Y <= i.line; Y++) Sn(O, Y, "text"); h.atomic && Da(O.doc), ot(O, "markerAdded", O, h) } return h } var Mr = function(e, n) { this.markers = e, this.primary = n; for (var i = 0; i < e.length; ++i) e[i].parent = this }; Mr.prototype.clear = function() { if (!this.explicitlyCleared) { this.explicitlyCleared = !0; for (var e = 0; e < this.markers.length; ++e) this.markers[e].clear(); ot(this, "clear") } }, Mr.prototype.find = function(e, n) { return this.primary.find(e, n) }, Ge(Mr); function Is(e, n, i, r, a) { r = le(r), r.shared = !1; var h = [tr(e, n, i, r, a)], T = h[0], P = r.widgetNode; return Dn(e, function(O) { P && (r.widgetNode = P.cloneNode(!0)), h.push(tr(O, Ne(O, n), Ne(O, i), r, a)); for (var $ = 0; $ < O.linked.length; ++$) if (O.linked[$].isParent) return; T = Me(h) }), new Mr(h, T) } function $a(e) { return e.findMarks(X(e.first, 0), e.clipPos(X(e.lastLine())), function(n) { return n.parent }) } function Rs(e, n) { for (var i = 0; i < n.length; i++) { var r = n[i], a = r.find(), h = e.clipPos(a.from), T = e.clipPos(a.to); if (re(h, T)) { var P = tr(e, h, T, r.primary, r.primary.type); r.markers.push(P), P.parent = r } } } function Ms(e) { for (var n = function(r) { var a = e[r], h = [a.primary.doc]; Dn(a.primary.doc, function(O) { return h.push(O) }); for (var T = 0; T < a.markers.length; T++) { var P = a.markers[T]; de(h, P.doc) == -1 && (P.parent = null, a.markers.splice(T--, 1)) } }, i = 0; i < e.length; i++) n(i) } var Ps = 0, bt = function(e, n, i, r, a) { if (!(this instanceof bt)) return new bt(e, n, i, r, a); i == null && (i = 0), Ir.call(this, [new wr([new Vn("", null)])]), this.first = i, this.scrollTop = this.scrollLeft = 0, this.cantEdit = !1, this .cleanGeneration = 1, this.modeFrontier = this.highlightFrontier = i; var h = X(i, 0); this.sel = Cn(h), this.history = new oi(null), this.id = ++Ps, this.modeOption = n, this.lineSep = r, this.direction = a == "rtl" ? "rtl" : "ltr", this .extend = !1, typeof e == "string" && (e = this.splitLines(e)), Zi(this, { from: h, to: h, text: e }), vt(this, Cn(h), Fe) }; bt.prototype = pn(Ir.prototype, { constructor: bt, iter: function(e, n, i) { i ? this.iterN(e - this.first, n - e, i) : this.iterN(this.first, this.first + this.size, e) }, insert: function(e, n) { for (var i = 0, r = 0; r < n.length; ++r) i += n[r].height; this.insertInner(e - this.first, n, i) }, remove: function(e, n) { this.removeInner(e - this.first, n) }, getValue: function(e) { var n = Wn(this, this.first, this.first + this.size); return e === !1 ? n : n.join(e || this.lineSeparator()) }, setValue: lt(function(e) { var n = X(this.first, 0), i = this.first + this.size - 1; _n(this, { from: n, to: X(i, Ce(this, i).text.length), text: this.splitLines(e), origin: "setValue", full: !0 }, !0), this.cm && yr(this.cm, 0, 0), vt(this, Cn(n), Fe) }), replaceRange: function(e, n, i, r) { n = Ne(this, n), i = i ? Ne(this, i) : n, er(this, e, n, i, r) }, getRange: function(e, n, i) { var r = ln(this, Ne(this, e), Ne(this, n)); return i === !1 ? r : i === "" ? r.join("") : r.join(i || this .lineSeparator()) }, getLine: function(e) { var n = this.getLineHandle(e); return n && n.text }, getLineHandle: function(e) { if (W(this, e)) return Ce(this, e) }, getLineNumber: function(e) { return We(e) }, getLineHandleVisualStart: function(e) { return typeof e == "number" && (e = Ce(this, e)), kt(e) }, lineCount: function() { return this.size }, firstLine: function() { return this.first }, lastLine: function() { return this.first + this.size - 1 }, clipPos: function(e) { return Ne(this, e) }, getCursor: function(e) { var n = this.sel.primary(), i; return e == null || e == "head" ? i = n.head : e == "anchor" ? i = n .anchor : e == "end" || e == "to" || e === !1 ? i = n.to() : i = n.from(), i }, listSelections: function() { return this.sel.ranges }, somethingSelected: function() { return this.sel.somethingSelected() }, setCursor: lt(function(e, n, i) { ba(this, Ne(this, typeof e == "number" ? X(e, n || 0) : e), null, i) }), setSelection: lt(function(e, n, i) { ba(this, Ne(this, e), Ne(this, n || e), i) }), extendSelection: lt(function(e, n, i) { li(this, Ne(this, e), n && Ne(this, n), i) }), extendSelections: lt(function(e, n) { Sa(this, vo(this, e), n) }), extendSelectionsBy: lt(function(e, n) { var i = gt(this.sel.ranges, e); Sa(this, vo(this, i), n) }), setSelections: lt(function(e, n, i) { if (!!e.length) { for (var r = [], a = 0; a < e.length; a++) r[a] = new Ve(Ne( this, e[a].anchor), Ne(this, e[a].head || e[a] .anchor)); n == null && (n = Math.min(e.length - 1, this.sel .primIndex)), vt(this, Gt(this.cm, r, n), i) } }), addSelection: lt(function(e, n, i) { var r = this.sel.ranges.slice(0); r.push(new Ve(Ne(this, e), Ne(this, n || e))), vt(this, Gt(this .cm, r, r.length - 1), i) }), getSelection: function(e) { for (var n = this.sel.ranges, i, r = 0; r < n.length; r++) { var a = ln(this, n[r].from(), n[r].to()); i = i ? i.concat(a) : a } return e === !1 ? i : i.join(e || this.lineSeparator()) }, getSelections: function(e) { for (var n = [], i = this.sel.ranges, r = 0; r < i.length; r++) { var a = ln(this, i[r].from(), i[r].to()); e !== !1 && (a = a.join(e || this.lineSeparator())), n[r] = a } return n }, replaceSelection: function(e, n, i) { for (var r = [], a = 0; a < this.sel.ranges.length; a++) r[a] = e; this.replaceSelections(r, n, i || "+input") }, replaceSelections: lt(function(e, n, i) { for (var r = [], a = this.sel, h = 0; h < a.ranges .length; h++) { var T = a.ranges[h]; r[h] = { from: T.from(), to: T.to(), text: this.splitLines(e[h]), origin: i } } for (var P = n && n != "end" && ys(this, r, n), O = r.length - 1; O >= 0; O--) _n(this, r[O]); P ? Ca(this, P) : this.cm && Xn(this.cm) }), undo: lt(function() { fi(this, "undo") }), redo: lt(function() { fi(this, "redo") }), undoSelection: lt(function() { fi(this, "undo", !0) }), redoSelection: lt(function() { fi(this, "redo", !0) }), setExtending: function(e) { this.extend = e }, getExtending: function() { return this.extend }, historySize: function() { for (var e = this.history, n = 0, i = 0, r = 0; r < e.done .length; r++) e.done[r].ranges || ++n; for (var a = 0; a < e.undone.length; a++) e.undone[a].ranges || ++i; return { undo: n, redo: i } }, clearHistory: function() { var e = this; this.history = new oi(this.history), Dn(this, function(n) { return n.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: Zn(this.history.done), undone: Zn(this.history.undone) } }, setHistory: function(e) { var n = this.history = new oi(this.history); n.done = Zn(e.done.slice(0), null, !0), n.undone = Zn(e.undone .slice(0), null, !0) }, setGutterMarker: lt(function(e, n, i) { return Dr(this, e, "gutter", function(r) { var a = r.gutterMarkers || (r.gutterMarkers = {}); return a[n] = i, !i && Xt(a) && (r.gutterMarkers = null), !0 }) }), clearGutter: lt(function(e) { var n = this; this.iter(function(i) { i.gutterMarkers && i.gutterMarkers[e] && Dr(n, i, "gutter", function() { return i.gutterMarkers[e] = null, Xt(i .gutterMarkers) && (i .gutterMarkers = null), !0 }) }) }), lineInfo: function(e) { var n; if (typeof e == "number") { if (!W(this, e) || (n = e, e = Ce(this, e), !e)) return null } else if (n = We(e), n == null) return null; return { line: n, handle: e, text: e.text, gutterMarkers: e.gutterMarkers, textClass: e.textClass, bgClass: e.bgClass, wrapClass: e.wrapClass, widgets: e.widgets } }, addLineClass: lt(function(e, n, i) { return Dr(this, e, n == "gutter" ? "gutter" : "class", function( r) { var a = n == "text" ? "textClass" : n == "background" ? "bgClass" : n == "gutter" ? "gutterClass" : "wrapClass"; if (!r[a]) r[a] = i; else { if (N(i).test(r[a])) return !1; r[a] += " " + i } return !0 }) }), removeLineClass: lt(function(e, n, i) { return Dr(this, e, n == "gutter" ? "gutter" : "class", function( r) { var a = n == "text" ? "textClass" : n == "background" ? "bgClass" : n == "gutter" ? "gutterClass" : "wrapClass", h = r[a]; if (h) if (i == null) r[a] = null; else { var T = h.match(N(i)); if (!T) return !1; var P = T.index + T[0].length; r[a] = h.slice(0, T.index) + (!T.index || P == h.length ? "" : " ") + h.slice( P) || null } else return !1; return !0 }) }), addLineWidget: lt(function(e, n, i) { return ws(this, e, n, i) }), removeLineWidget: function(e) { e.clear() }, markText: function(e, n, i) { return tr(this, Ne(this, e), Ne(this, n), i, i && i.type || "range") }, setBookmark: function(e, n) { var i = { replacedWith: n && (n.nodeType == null ? n.widget : n), insertLeft: n && n.insertLeft, clearWhenEmpty: !1, shared: n && n.shared, handleMouseEvents: n && n.handleMouseEvents }; return e = Ne(this, e), tr(this, e, e, i, "bookmark") }, findMarksAt: function(e) { e = Ne(this, e); var n = [], i = Ce(this, e.line).markedSpans; if (i) for (var r = 0; r < i.length; ++r) { var a = i[r]; (a.from == null || a.from <= e.ch) && (a.to == null || a .to >= e.ch) && n.push(a.marker.parent || a.marker) } return n }, findMarks: function(e, n, i) { e = Ne(this, e), n = Ne(this, n); var r = [], a = e.line; return this.iter(e.line, n.line + 1, function(h) { var T = h.markedSpans; if (T) for (var P = 0; P < T.length; P++) { var O = T[P]; !(O.to != null && a == e.line && e.ch >= O.to || O.from == null && a != e.line || O.from != null && a == n.line && O.from >= n.ch) && (! i || i(O.marker)) && r.push(O.marker .parent || O.marker) }++a }), r }, getAllMarks: function() { var e = []; return this.iter(function(n) { var i = n.markedSpans; if (i) for (var r = 0; r < i.length; ++r) i[r].from != null && e.push(i[r].marker) }), e }, posFromIndex: function(e) { var n, i = this.first, r = this.lineSeparator().length; return this.iter(function(a) { var h = a.text.length + r; if (h > e) return n = e, !0; e -= h, ++i }), Ne(this, X(i, n)) }, indexFromPos: function(e) { e = Ne(this, e); var n = e.ch; if (e.line < this.first || e.ch < 0) return 0; var i = this.lineSeparator().length; return this.iter(this.first, e.line, function(r) { n += r.text.length + i }), n }, copy: function(e) { var n = new bt(Wn(this, this.first, this.first + this.size), this .modeOption, this.first, this.lineSep, this.direction); return n.scrollTop = this.scrollTop, n.scrollLeft = this.scrollLeft, n.sel = this.sel, n.extend = !1, e && (n.history.undoDepth = this.history.undoDepth, n.setHistory(this.getHistory())), n }, linkedDoc: function(e) { e || (e = {}); var n = this.first, i = this.first + this.size; e.from != null && e.from > n && (n = e.from), e.to != null && e.to < i && (i = e.to); var r = new bt(Wn(this, n, i), e.mode || this.modeOption, n, this .lineSep, this.direction); return e.sharedHist && (r.history = this.history), (this.linked || ( this.linked = [])).push({ doc: r, sharedHist: e.sharedHist }), r.linked = [{ doc: this, isParent: !0, sharedHist: e.sharedHist }], Rs(r, $a(this)), r }, unlinkDoc: function(e) { if (e instanceof Qe && (e = e.doc), this.linked) for (var n = 0; n < this.linked.length; ++n) { var i = this.linked[n]; if (i.doc == e) { this.linked.splice(n, 1), e.unlinkDoc(this), Ms($a( this)); break } } if (e.history == this.history) { var r = [e.id]; Dn(e, function(a) { return r.push(a.id) }, !0), e.history = new oi(null), e.history.done = Zn(this .history.done, r), e.history.undone = Zn(this.history .undone, r) } }, iterLinkedDocs: function(e) { Dn(this, e) }, getMode: function() { return this.mode }, getEditor: function() { return this.cm }, splitLines: function(e) { return this.lineSep ? e.split(this.lineSep) : ur(e) }, lineSeparator: function() { return this.lineSep || ` ` }, setDirection: lt(function(e) { e != "rtl" && (e = "ltr"), e != this.direction && (this .direction = e, this.iter(function(n) { return n.order = null }), this.cm && As(this.cm)) }) }), bt.prototype.eachLine = bt.prototype.iter; var Ua = 0; function Ns(e) { var n = this; if (za(n), !(Oe(n, e) || dn(n.display, e))) { je(e), f && (Ua = +new Date); var i = Nn(n, e, !0), r = e.dataTransfer.files; if (!(!i || n.isReadOnly())) if (r && r.length && window.FileReader && window.File) for (var a = r.length, h = Array(a), T = 0, P = function() { ++T == a && at(n, function() { i = Ne(n.doc, i); var q = { from: i, to: i, text: n.doc.splitLines(h.filter( function(ie) { return ie != null }).join(n.doc .lineSeparator())), origin: "paste" }; _n(n.doc, q), Ca(n.doc, Cn(Ne(n.doc, i), Ne(n .doc, Tn(q)))) })() }, O = function(q, ie) { if (n.options.allowDropFileTypes && de(n.options .allowDropFileTypes, q.type) == -1) { P(); return } var ae = new FileReader; ae.onerror = function() { return P() }, ae.onload = function() { var fe = ae.result; if (/[\x00-\x08\x0e-\x1f]{2}/.test(fe)) { P(); return } h[ie] = fe, P() }, ae.readAsText(q) }, $ = 0; $ < r.length; $++) O(r[$], $); else { if (n.state.draggingText && n.doc.sel.contains(i) > -1) { n.state.draggingText(e), setTimeout(function() { return n.display.input.focus() }, 20); return } try { var Y = e.dataTransfer.getData("Text"); if (Y) { var Q; if (n.state.draggingText && !n.state.draggingText.copy && (Q = n .listSelections()), si(n.doc, Cn(i, i)), Q) for (var _ = 0; _ < Q.length; ++_) er(n.doc, "", Q[_] .anchor, Q[_].head, "drag"); n.replaceSelection(Y, "around", "paste"), n.display.input .focus() } } catch {} } } } function Ls(e, n) { if (f && (!e.state.draggingText || +new Date - Ua < 100)) { Wt(n); return } if (!(Oe(e, n) || dn(e.display, n)) && (n.dataTransfer.setData("Text", e .getSelection()), n.dataTransfer.effectAllowed = "copyMove", n .dataTransfer.setDragImage && !y)) { var i = M("img", null, null, "position: fixed; left: 0; top: 0;"); i.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", g && (i.width = i.height = 1, e.display.wrapper.appendChild(i), i._top = i .offsetTop), n.dataTransfer.setDragImage(i, 0, 0), g && i.parentNode .removeChild(i) } } function Os(e, n) { var i = Nn(e, n); if (!!i) { var r = document.createDocumentFragment(); $i(e, i, r), e.display.dragCursor || (e.display.dragCursor = M("div", null, "CodeMirror-cursors CodeMirror-dragcursors"), e.display.lineSpace .insertBefore(e.display.dragCursor, e.display.cursorDiv)), V(e.display .dragCursor, r) } } function za(e) { e.display.dragCursor && (e.display.lineSpace.removeChild(e.display.dragCursor), e .display.dragCursor = null) } function ja(e) { if (!!document.getElementsByClassName) { for (var n = document.getElementsByClassName("CodeMirror"), i = [], r = 0; r < n .length; r++) { var a = n[r].CodeMirror; a && i.push(a) } i.length && i[0].operation(function() { for (var h = 0; h < i.length; h++) e(i[h]) }) } } var Wa = !1; function Fs() { Wa || (Bs(), Wa = !0) } function Bs() { var e; ne(window, "resize", function() { e == null && (e = setTimeout(function() { e = null, ja(Hs) }, 100)) }), ne(window, "blur", function() { return ja(Kn) }) } function Hs(e) { var n = e.display; n.cachedCharWidth = n.cachedTextHeight = n.cachedPaddingH = null, n .scrollbarsClipped = !1, e.setSize() } for (var In = { 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" }, Pr = 0; Pr < 10; Pr++) In[Pr + 48] = In[Pr + 96] = String(Pr); for (var di = 65; di <= 90; di++) In[di] = String.fromCharCode(di); for (var Nr = 1; Nr <= 12; Nr++) In[Nr + 111] = In[Nr + 63235] = "F" + Nr; var vn = {}; vn.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" }, vn.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" }, vn.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" }, vn.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"] }, vn.default = R ? vn.macDefault : vn.pcDefault; function $s(e) { var n = e.split(/-(?!$)/); e = n[n.length - 1]; for (var i, r, a, h, T = 0; T < n.length - 1; T++) { var P = n[T]; if (/^(cmd|meta|m)$/i.test(P)) h = !0; else if (/^a(lt)?$/i.test(P)) i = !0; else if (/^(c|ctrl|control)$/i.test(P)) r = !0; else if (/^s(hift)?$/i.test(P)) a = !0; else throw new Error("Unrecognized modifier name: " + P) } return i && (e = "Alt-" + e), r && (e = "Ctrl-" + e), h && (e = "Cmd-" + e), a && ( e = "Shift-" + e), e } function Us(e) { var n = {}; for (var i in e) if (e.hasOwnProperty(i)) { var r = e[i]; if (/^(name|fallthrough|(de|at)tach)$/.test(i)) continue; if (r == "...") { delete e[i]; continue } for (var a = gt(i.split(" "), $s), h = 0; h < a.length; h++) { var T = void 0, P = void 0; h == a.length - 1 ? (P = a.join(" "), T = r) : (P = a.slice(0, h + 1) .join(" "), T = "..."); var O = n[P]; if (!O) n[P] = T; else if (O != T) throw new Error("Inconsistent bindings for " + P) } delete e[i] } for (var $ in n) e[$] = n[$]; return e } function nr(e, n, i, r) { n = ci(n); var a = n.call ? n.call(e, r) : n[e]; if (a === !1) return "nothing"; if (a === "...") return "multi"; if (a != null && i(a)) return "handled"; if (n.fallthrough) { if (Object.prototype.toString.call(n.fallthrough) != "[object Array]") return nr(e, n.fallthrough, i, r); for (var h = 0; h < n.fallthrough.length; h++) { var T = nr(e, n.fallthrough[h], i, r); if (T) return T } } } function Va(e) { var n = typeof e == "string" ? e : In[e.keyCode]; return n == "Ctrl" || n == "Alt" || n == "Shift" || n == "Mod" } function ka(e, n, i) { var r = e; return n.altKey && r != "Alt" && (e = "Alt-" + e), (z ? n.metaKey : n.ctrlKey) && r != "Ctrl" && (e = "Ctrl-" + e), (z ? n.ctrlKey : n.metaKey) && r != "Mod" && ( e = "Cmd-" + e), !i && n.shiftKey && r != "Shift" && (e = "Shift-" + e), e } function Ya(e, n) { if (g && e.keyCode == 34 && e.char) return !1; var i = In[e.keyCode]; return i == null || e.altGraphKey ? !1 : (e.keyCode == 3 && e.code && (i = e.code), ka(i, e, n)) } function ci(e) { return typeof e == "string" ? vn[e] : e } function rr(e, n) { for (var i = e.doc.sel.ranges, r = [], a = 0; a < i.length; a++) { for (var h = n(i[a]); r.length && re(h.from, Me(r).to) <= 0;) { var T = r.pop(); if (re(T.from, h.from) < 0) { h.from = T.from; break } } r.push(h) } Rt(e, function() { for (var P = r.length - 1; P >= 0; P--) er(e.doc, "", r[P].from, r[P] .to, "+delete"); Xn(e) }) } function to(e, n, i) { var r = nt(e.text, n + i, i); return r < 0 || r > e.text.length ? null : r } function no(e, n, i) { var r = to(e, n.ch, i); return r == null ? null : new X(n.line, r, i < 0 ? "after" : "before") } function ro(e, n, i, r, a) { if (e) { n.doc.direction == "rtl" && (a = -a); var h = Re(i, n.doc.direction); if (h) { var T = a < 0 ? Me(h) : h[0], P = a < 0 == (T.level == 1), O = P ? "after" : "before", $; if (T.level > 0 || n.doc.direction == "rtl") { var Y = Yn(n, i); $ = a < 0 ? i.text.length - 1 : 0; var Q = tn(n, Y, $).top; $ = ze(function(_) { return tn(n, Y, _).top == Q }, a < 0 == (T.level == 1) ? T.from : T.to - 1, $), O == "before" && ($ = to(i, $, 1)) } else $ = a < 0 ? T.to : T.from; return new X(r, $, O) } } return new X(r, a < 0 ? i.text.length : 0, a < 0 ? "before" : "after") } function zs(e, n, i, r) { var a = Re(n, e.doc.direction); if (!a) return no(n, i, r); i.ch >= n.text.length ? (i.ch = n.text.length, i.sticky = "before") : i.ch <= 0 && ( i.ch = 0, i.sticky = "after"); var h = Ae(a, i.ch, i.sticky), T = a[h]; if (e.doc.direction == "ltr" && T.level % 2 == 0 && (r > 0 ? T.to > i.ch : T.from < i.ch)) return no(n, i, r); var P = function(he, ye) { return to(n, he instanceof X ? he.ch : he, ye) }, O, $ = function(he) { return e.options.lineWrapping ? (O = O || Yn(e, n), Jo(e, n, O, he)) : { begin: 0, end: n.text.length } }, Y = $(i.sticky == "before" ? P(i, -1) : i.ch); if (e.doc.direction == "rtl" || T.level == 1) { var Q = T.level == 1 == r < 0, _ = P(i, Q ? 1 : -1); if (_ != null && (Q ? _ <= T.to && _ <= Y.end : _ >= T.from && _ >= Y.begin)) { var q = Q ? "before" : "after"; return new X(i.line, _, q) } } var ie = function(he, ye, pe) { for (var Ee = function(Ye, st) { return st ? new X(i.line, P(Ye, 1), "before") : new X(i.line, Ye, "after") }; he >= 0 && he < a.length; he += ye) { var Ie = a[he], we = ye > 0 == (Ie.level != 1), Be = we ? pe.begin : P(pe.end, -1); if (Ie.from <= Be && Be < Ie.to || (Be = we ? Ie.from : P(Ie.to, -1), pe .begin <= Be && Be < pe.end)) return Ee(Be, we) } }, ae = ie(h + r, r, Y); if (ae) return ae; var fe = r > 0 ? Y.end : P(Y.begin, -1); return fe != null && !(r > 0 && fe == n.text.length) && (ae = ie(r > 0 ? 0 : a .length - 1, r, $(fe)), ae) ? ae : null } var Lr = { selectAll: Ra, singleSelection: function(e) { return e.setSelection(e.getCursor("anchor"), e.getCursor("head"), Fe) }, killLine: function(e) { return rr(e, function(n) { if (n.empty()) { var i = Ce(e.doc, n.head.line).text.length; return n.head.ch == i && n.head.line < e.lastLine() ? { from: n.head, to: X(n.head.line + 1, 0) } : { from: n.head, to: X(n.head.line, i) } } else return { from: n.from(), to: n.to() } }) }, deleteLine: function(e) { return rr(e, function(n) { return { from: X(n.from().line, 0), to: Ne(e.doc, X(n.to().line + 1, 0)) } }) }, delLineLeft: function(e) { return rr(e, function(n) { return { from: X(n.from().line, 0), to: n.from() } }) }, delWrappedLineLeft: function(e) { return rr(e, function(n) { var i = e.charCoords(n.head, "div").top + 5, r = e.coordsChar({ left: 0, top: i }, "div"); return { from: r, to: n.from() } }) }, delWrappedLineRight: function(e) { return rr(e, function(n) { var i = e.charCoords(n.head, "div").top + 5, r = e.coordsChar({ left: e.display.lineDiv.offsetWidth + 100, top: i }, "div"); return { from: n.from(), to: r } }) }, 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(X(e.firstLine(), 0)) }, goDocEnd: function(e) { return e.extendSelection(X(e.lastLine())) }, goLineStart: function(e) { return e.extendSelectionsBy(function(n) { return Ga(e, n.head.line) }, { origin: "+move", bias: 1 }) }, goLineStartSmart: function(e) { return e.extendSelectionsBy(function(n) { return Qa(e, n.head) }, { origin: "+move", bias: 1 }) }, goLineEnd: function(e) { return e.extendSelectionsBy(function(n) { return js(e, n.head.line) }, { origin: "+move", bias: -1 }) }, goLineRight: function(e) { return e.extendSelectionsBy(function(n) { var i = e.cursorCoords(n.head, "div").top + 5; return e.coordsChar({ left: e.display.lineDiv.offsetWidth + 100, top: i }, "div") }, Pt) }, goLineLeft: function(e) { return e.extendSelectionsBy(function(n) { var i = e.cursorCoords(n.head, "div").top + 5; return e.coordsChar({ left: 0, top: i }, "div") }, Pt) }, goLineLeftSmart: function(e) { return e.extendSelectionsBy(function(n) { var i = e.cursorCoords(n.head, "div").top + 5, r = e.coordsChar({ left: 0, top: i }, "div"); return r.ch < e.getLine(r.line).search(/\S/) ? Qa(e, n .head) : r }, Pt) }, 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(" ") }, insertSoftTab: function(e) { for (var n = [], i = e.listSelections(), r = e.options.tabSize, a = 0; a < i.length; a++) { var h = i[a].from(), T = oe(e.getLine(h.line), h.ch, r); n.push(ct(r - T % r)) } e.replaceSelections(n) }, defaultTab: function(e) { e.somethingSelected() ? e.indentSelection("add") : e.execCommand( "insertTab") }, transposeChars: function(e) { return Rt(e, function() { for (var n = e.listSelections(), i = [], r = 0; r < n .length; r++) if (!!n[r].empty()) { var a = n[r].head, h = Ce(e.doc, a.line).text; if (h) { if (a.ch == h.length && (a = new X(a.line, a .ch - 1)), a.ch > 0) a = new X(a.line, a .ch + 1), e.replaceRange(h.charAt(a.ch - 1) + h.charAt(a.ch - 2), X(a.line, a .ch - 2), a, "+transpose"); else if (a.line > e.doc.first) { var T = Ce(e.doc, a.line - 1).text; T && (a = new X(a.line, 1), e.replaceRange(h .charAt(0) + e.doc .lineSeparator() + T.charAt(T .length - 1), X(a.line - 1, T.length - 1), a, "+transpose")) } } i.push(new Ve(a, a)) } e.setSelections(i) }) }, newlineAndIndent: function(e) { return Rt(e, function() { for (var n = e.listSelections(), i = n.length - 1; i >= 0; i--) e.replaceRange(e.doc.lineSeparator(), n[i] .anchor, n[i].head, "+input"); n = e.listSelections(); for (var r = 0; r < n.length; r++) e.indentLine(n[r].from() .line, null, !0); Xn(e) }) }, openLine: function(e) { return e.replaceSelection(` `, "start") }, toggleOverwrite: function(e) { return e.toggleOverwrite() } }; function Ga(e, n) { var i = Ce(e.doc, n), r = kt(i); return r != i && (n = We(r)), ro(!0, e, r, n, 1) } function js(e, n) { var i = Ce(e.doc, n), r = bl(i); return r != i && (n = We(r)), ro(!0, e, i, n, -1) } function Qa(e, n) { var i = Ga(e, n.line), r = Ce(e.doc, i.line), a = Re(r, e.doc.direction); if (!a || a[0].level == 0) { var h = Math.max(i.ch, r.text.search(/\S/)), T = n.line == i.line && n.ch <= h && n.ch; return X(i.line, T ? 0 : h, i.sticky) } return i } function vi(e, n, i) { if (typeof n == "string" && (n = Lr[n], !n)) return !1; e.display.input.ensurePolled(); var r = e.display.shift, a = !1; try { e.isReadOnly() && (e.state.suppressEdits = !0), i && (e.display.shift = !1), a = n(e) != De } finally { e.display.shift = r, e.state.suppressEdits = !1 } return a } function Ws(e, n, i) { for (var r = 0; r < e.state.keyMaps.length; r++) { var a = nr(n, e.state.keyMaps[r], i, e); if (a) return a } return e.options.extraKeys && nr(n, e.options.extraKeys, i, e) || nr(n, e.options .keyMap, i, e) } var Vs = new se; function Or(e, n, i, r) { var a = e.state.keySeq; if (a) { if (Va(n)) return "handled"; if (/\'$/.test(n) ? e.state.keySeq = null : Vs.set(50, function() { e.state.keySeq == a && (e.state.keySeq = null, e.display.input .reset()) }), Ka(e, a + " " + n, i, r)) return !0 } return Ka(e, n, i, r) } function Ka(e, n, i, r) { var a = Ws(e, n, r); return a == "multi" && (e.state.keySeq = n), a == "handled" && ot(e, "keyHandled", e, n, i), (a == "handled" || a == "multi") && (je(i), Ui(e)), !!a } function Xa(e, n) { var i = Ya(n, !0); return i ? n.shiftKey && !e.state.keySeq ? Or(e, "Shift-" + i, n, function(r) { return vi(e, r, !0) }) || Or(e, i, n, function(r) { if (typeof r == "string" ? /^go[A-Z]/.test(r) : r.motion) return vi(e, r) }) : Or(e, i, n, function(r) { return vi(e, r) }) : !1 } function ks(e, n, i) { return Or(e, "'" + i + "'", n, function(r) { return vi(e, r, !0) }) } var io = null; function Ja(e) { var n = this; if (!(e.target && e.target != n.display.input.getField()) && (n.curOp.focus = ee(ge( n)), !Oe(n, e))) { f && c < 11 && e.keyCode == 27 && (e.returnValue = !1); var i = e.keyCode; n.display.shift = i == 16 || e.shiftKey; var r = Xa(n, e); g && (io = r ? i : null, !r && i == 88 && !Jt && (R ? e.metaKey : e.ctrlKey) && n.replaceSelection("", null, "cut")), t && !R && !r && i == 46 && e .shiftKey && !e.ctrlKey && document.execCommand && document.execCommand( "cut"), i == 18 && !/\bCodeMirror-crosshair\b/.test(n.display.lineDiv .className) && Ys(n) } } function Ys(e) { var n = e.display.lineDiv; Z(n, "CodeMirror-crosshair"); function i(r) { (r.keyCode == 18 || !r.altKey) && (H(n, "CodeMirror-crosshair"), Se(document, "keyup", i), Se(document, "mouseover", i)) } ne(document, "keyup", i), ne(document, "mouseover", i) } function Za(e) { e.keyCode == 16 && (this.doc.sel.shift = !1), Oe(this, e) } function qa(e) { var n = this; if (!(e.target && e.target != n.display.input.getField()) && !(dn(n.display, e) || Oe(n, e) || e.ctrlKey && !e.altKey || R && e.metaKey)) { var i = e.keyCode, r = e.charCode; if (g && i == io) { io = null, je(e); return } if (!(g && (!e.which || e.which < 10) && Xa(n, e))) { var a = String.fromCharCode(r == null ? i : r); a != "\b" && (ks(n, e, a) || n.display.input.onKeyPress(e)) } } } var Gs = 400, oo = function(e, n, i) { this.time = e, this.pos = n, this.button = i }; oo.prototype.compare = function(e, n, i) { return this.time + Gs > e && re(n, this.pos) == 0 && i == this.button }; var Fr, Br; function Qs(e, n) { var i = +new Date; return Br && Br.compare(i, e, n) ? (Fr = Br = null, "triple") : Fr && Fr.compare(i, e, n) ? (Br = new oo(i, e, n), Fr = null, "double") : (Fr = new oo(i, e, n), Br = null, "single") } function _a(e) { var n = this, i = n.display; if (!(Oe(n, e) || i.activeTouch && i.input.supportsTouch())) { if (i.input.ensurePolled(), i.shift = e.shiftKey, dn(i, e)) { m || (i.scroller.draggable = !1, setTimeout(function() { return i.scroller.draggable = !0 }, 100)); return } if (!ao(n, e)) { var r = Nn(n, e), a = sr(e), h = r ? Qs(r, a) : "single"; ve(n).focus(), a == 1 && n.state.selectingText && n.state.selectingText(e), !(r && Ks(n, a, r, h, e)) && (a == 1 ? r ? Js(n, r, h, e) : Et(e) == i .scroller && je(e) : a == 2 ? (r && li(n.doc, r), setTimeout( function() { return i.input.focus() }, 20)) : a == 3 && (U ? n.display.input.onContextMenu(e) : zi( n))) } } } function Ks(e, n, i, r, a) { var h = "Click"; return r == "double" ? h = "Double" + h : r == "triple" && (h = "Triple" + h), h = ( n == 1 ? "Left" : n == 2 ? "Middle" : "Right") + h, Or(e, ka(h, a), a, function(T) { if (typeof T == "string" && (T = Lr[T]), !T) return !1; var P = !1; try { e.isReadOnly() && (e.state.suppressEdits = !0), P = T(e, i) != De } finally { e.state.suppressEdits = !1 } return P }) } function Xs(e, n, i) { var r = e.getOption("configureMouse"), a = r ? r(e, n, i) : {}; if (a.unit == null) { var h = L ? i.shiftKey && i.metaKey : i.altKey; a.unit = h ? "rectangle" : n == "single" ? "char" : n == "double" ? "word" : "line" } return (a.extend == null || e.doc.extend) && (a.extend = e.doc.extend || i .shiftKey), a.addNew == null && (a.addNew = R ? i.metaKey : i.ctrlKey), a .moveOnDrag == null && (a.moveOnDrag = !(R ? i.altKey : i.ctrlKey)), a } function Js(e, n, i, r) { f ? setTimeout(ce(ea, e), 0) : e.curOp.focus = ee(ge(e)); var a = Xs(e, i, r), h = e.doc.sel, T; e.options.dragDrop && yi && !e.isReadOnly() && i == "single" && (T = h.contains( n)) > -1 && (re((T = h.ranges[T]).from(), n) < 0 || n.xRel > 0) && (re(T.to(), n) > 0 || n.xRel < 0) ? Zs(e, r, n, a) : qs(e, r, n, a) } function Zs(e, n, i, r) { var a = e.display, h = !1, T = at(e, function($) { m && (a.scroller.draggable = !1), e.state.draggingText = !1, e.state .delayingBlurEvent && (e.hasFocus() ? e.state.delayingBlurEvent = ! 1 : zi(e)), Se(a.wrapper.ownerDocument, "mouseup", T), Se(a .wrapper.ownerDocument, "mousemove", P), Se(a.scroller, "dragstart", O), Se(a.scroller, "drop", T), h || (je($), r .addNew || li(e.doc, i, null, null, r.extend), m && !y || f && c == 9 ? setTimeout(function() { a.wrapper.ownerDocument.body.focus({ preventScroll: !0 }), a.input.focus() }, 20) : a.input.focus()) }), P = function($) { h = h || Math.abs(n.clientX - $.clientX) + Math.abs(n.clientY - $ .clientY) >= 10 }, O = function() { return h = !0 }; m && (a.scroller.draggable = !0), e.state.draggingText = T, T.copy = !r.moveOnDrag, ne(a.wrapper.ownerDocument, "mouseup", T), ne(a.wrapper.ownerDocument, "mousemove", P), ne(a.scroller, "dragstart", O), ne(a.scroller, "drop", T), e.state.delayingBlurEvent = !0, setTimeout(function() { return a.input.focus() }, 20), a.scroller.dragDrop && a.scroller.dragDrop() } function el(e, n, i) { if (i == "char") return new Ve(n, n); if (i == "word") return e.findWordAt(n); if (i == "line") return new Ve(X(n.line, 0), Ne(e.doc, X(n.line + 1, 0))); var r = i(e, n); return new Ve(r.from, r.to) } function qs(e, n, i, r) { f && zi(e); var a = e.display, h = e.doc; je(n); var T, P, O = h.sel, $ = O.ranges; if (r.addNew && !r.extend ? (P = h.sel.contains(i), P > -1 ? T = $[P] : T = new Ve( i, i)) : (T = h.sel.primary(), P = h.sel.primIndex), r.unit == "rectangle") r.addNew || (T = new Ve(i, i)), i = Nn(e, n, !0, !0), P = -1; else { var Y = el(e, i, r.unit); r.extend ? T = _i(T, Y.anchor, Y.head, r.extend) : T = Y } r.addNew ? P == -1 ? (P = $.length, vt(h, Gt(e, $.concat([T]), P), { scroll: !1, origin: "*mouse" })) : $.length > 1 && $[P].empty() && r.unit == "char" && !r.extend ? (vt(h, Gt( e, $.slice(0, P).concat($.slice(P + 1)), 0), { scroll: !1, origin: "*mouse" }), O = h.sel) : eo(h, P, T, pt) : (P = 0, vt(h, new Bt([T], 0), pt), O = h.sel); var Q = i; function _(pe) { if (re(Q, pe) != 0) if (Q = pe, r.unit == "rectangle") { for (var Ee = [], Ie = e.options.tabSize, we = oe(Ce(h, i.line).text, i .ch, Ie), Be = oe(Ce(h, pe.line).text, pe.ch, Ie), Ye = Math .min(we, Be), st = Math.max(we, Be), Xe = Math.min(i.line, pe .line), Mt = Math.min(e.lastLine(), Math.max(i.line, pe .line)); Xe <= Mt; Xe++) { var Ct = Ce(h, Xe).text, et = Je(Ct, Ye, Ie); Ye == st ? Ee.push(new Ve(X(Xe, et), X(Xe, et))) : Ct.length > et && Ee.push(new Ve(X(Xe, et), X(Xe, Je(Ct, st, Ie)))) } Ee.length || Ee.push(new Ve(i, i)), vt(h, Gt(e, O.ranges.slice(0, P) .concat(Ee), P), { origin: "*mouse", scroll: !1 }), e.scrollIntoView(pe) } else { var Tt = T, dt = el(e, pe, r.unit), it = Tt.anchor, tt; re(dt.anchor, it) > 0 ? (tt = dt.head, it = rt(Tt.from(), dt.anchor)) : (tt = dt.anchor, it = Ue(Tt.to(), dt.head)); var qe = O.ranges.slice(0); qe[P] = _s(e, new Ve(Ne(h, it), tt)), vt(h, Gt(e, qe, P), pt) } } var q = a.wrapper.getBoundingClientRect(), ie = 0; function ae(pe) { var Ee = ++ie, Ie = Nn(e, pe, !0, r.unit == "rectangle"); if (!!Ie) if (re(Ie, Q) != 0) { e.curOp.focus = ee(ge(e)), _(Ie); var we = ti(a, h); (Ie.line >= we.to || Ie.line < we.from) && setTimeout(at(e, function() { ie == Ee && ae(pe) }), 150) } else { var Be = pe.clientY < q.top ? -20 : pe.clientY > q.bottom ? 20 : 0; Be && setTimeout(at(e, function() { ie == Ee && (a.scroller.scrollTop += Be, ae(pe)) }), 50) } } function fe(pe) { e.state.selectingText = !1, ie = 1 / 0, pe && (je(pe), a.input.focus()), Se(a .wrapper.ownerDocument, "mousemove", he), Se(a.wrapper.ownerDocument, "mouseup", ye), h.history.lastSelOrigin = null } var he = at(e, function(pe) { pe.buttons === 0 || !sr(pe) ? fe(pe) : ae(pe) }), ye = at(e, fe); e.state.selectingText = ye, ne(a.wrapper.ownerDocument, "mousemove", he), ne(a .wrapper.ownerDocument, "mouseup", ye) } function _s(e, n) { var i = n.anchor, r = n.head, a = Ce(e.doc, i.line); if (re(i, r) == 0 && i.sticky == r.sticky) return n; var h = Re(a); if (!h) return n; var T = Ae(h, i.ch, i.sticky), P = h[T]; if (P.from != i.ch && P.to != i.ch) return n; var O = T + (P.from == i.ch == (P.level != 1) ? 0 : 1); if (O == 0 || O == h.length) return n; var $; if (r.line != i.line) $ = (r.line - i.line) * (e.doc.direction == "ltr" ? 1 : -1) > 0; else { var Y = Ae(h, r.ch, r.sticky), Q = Y - T || (r.ch - i.ch) * (P.level == 1 ? -1 : 1); Y == O - 1 || Y == O ? $ = Q < 0 : $ = Q > 0 } var _ = h[O + ($ ? -1 : 0)], q = $ == (_.level == 1), ie = q ? _.from : _.to, ae = q ? "after" : "before"; return i.ch == ie && i.sticky == ae ? n : new Ve(new X(i.line, ie, ae), r) } function tl(e, n, i, r) { var a, h; if (n.touches) a = n.touches[0].clientX, h = n.touches[0].clientY; else try { a = n.clientX, h = n.clientY } catch { return !1 } if (a >= Math.floor(e.display.gutters.getBoundingClientRect().right)) return !1; r && je(n); var T = e.display, P = T.lineDiv.getBoundingClientRect(); if (h > P.bottom || !Ke(e, i)) return gn(n); h -= P.top - T.viewOffset; for (var O = 0; O < e.display.gutterSpecs.length; ++O) { var $ = T.gutters.childNodes[O]; if ($ && $.getBoundingClientRect().right >= a) { var Y = qt(e.doc, h), Q = e.display.gutterSpecs[O]; return be(e, i, e, Y, Q.className, n), gn(n) } } } function ao(e, n) { return tl(e, n, "gutterClick", !0) } function nl(e, n) { dn(e.display, n) || eu(e, n) || Oe(e, n, "contextmenu") || U || e.display.input .onContextMenu(n) } function eu(e, n) { return Ke(e, "gutterContextMenu") ? tl(e, n, "gutterContextMenu", !1) : !1 } function rl(e) { e.display.wrapper.className = e.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + e.options.theme.replace(/(^|\s)\s*/g, " cm-s-"), gr(e) } var ir = { toString: function() { return "CodeMirror.Init" } }, il = {}, hi = {}; function tu(e) { var n = e.optionHandlers; function i(r, a, h, T) { e.defaults[r] = a, h && (n[r] = T ? function(P, O, $) { $ != ir && h(P, O, $) } : h) } e.defineOption = i, e.Init = ir, i("value", "", function(r, a) { return r.setValue(a) }, !0), i("mode", null, function(r, a) { r.doc.modeOption = a, Ji(r) }, !0), i("indentUnit", 2, Ji, !0), i("indentWithTabs", !1), i("smartIndent", ! 0), i("tabSize", 4, function(r) { Cr(r), gr(r), St(r) }, !0), i("lineSeparator", null, function(r, a) { if (r.doc.lineSep = a, !!a) { var h = [], T = r.doc.first; r.doc.iter(function(O) { for (var $ = 0;;) { var Y = O.text.indexOf(a, $); if (Y == -1) break; $ = Y + a.length, h.push(X(T, Y)) } T++ }); for (var P = h.length - 1; P >= 0; P--) er(r.doc, a, h[P], X(h[P] .line, h[P].ch + a.length)) } }), i("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g, function(r, a, h) { r.state.specialChars = new RegExp(a.source + (a.test(" ") ? "" : "| "), "g"), h != ir && r.refresh() }), i("specialCharPlaceholder", Rl, function(r) { return r.refresh() }, !0), i("electricChars", !0), i("inputStyle", D ? "contenteditable" : "textarea", function() { throw new Error( "inputStyle can not (yet) be changed in a running editor") }, !0), i("spellcheck", !1, function(r, a) { return r.getInputField().spellcheck = a }, !0), i("autocorrect", !1, function(r, a) { return r.getInputField().autocorrect = a }, !0), i("autocapitalize", !1, function(r, a) { return r.getInputField().autocapitalize = a }, !0), i("rtlMoveVisually", !B), i("wholeLineUpdateBefore", !0), i("theme", "default", function(r) { rl(r), br(r) }, !0), i("keyMap", "default", function(r, a, h) { var T = ci(a), P = h != ir && ci(h); P && P.detach && P.detach(r, T), T.attach && T.attach(r, P || null) }), i("extraKeys", null), i("configureMouse", null), i("lineWrapping", !1, ru, ! 0), i("gutters", [], function(r, a) { r.display.gutterSpecs = Ki(a, r.options.lineNumbers), br(r) }, !0), i("fixedGutter", !0, function(r, a) { r.display.gutters.style.left = a ? Bi(r.display) + "px" : "0", r .refresh() }, !0), i("coverGutterNextToScrollbar", !1, function(r) { return Jn(r) }, !0), i("scrollbarStyle", "native", function(r) { aa(r), Jn(r), r.display.scrollbars.setScrollTop(r.doc.scrollTop), r .display.scrollbars.setScrollLeft(r.doc.scrollLeft) }, !0), i("lineNumbers", !1, function(r, a) { r.display.gutterSpecs = Ki(r.options.gutters, a), br(r) }, !0), i("firstLineNumber", 1, br, !0), i("lineNumberFormatter", function(r) { return r }, br, !0), i("showCursorWhenSelecting", !1, mr, !0), i( "resetSelectionOnContextMenu", !0), i("lineWiseCopyCut", !0), i( "pasteLinesPerSelection", !0), i("selectionsMayTouch", !1), i("readOnly", ! 1, function(r, a) { a == "nocursor" && (Kn(r), r.display.input.blur()), r.display.input .readOnlyChanged(a) }), i("screenReaderLabel", null, function(r, a) { a = a === "" ? null : a, r.display.input.screenReaderLabelChanged(a) }), i("disableInput", !1, function(r, a) { a || r.display.input.reset() }, !0), i("dragDrop", !0, nu), i("allowDropFileTypes", null), i( "cursorBlinkRate", 530), i("cursorScrollMargin", 0), i("cursorHeight", 1, mr, !0), i("singleCursorHeightPerLine", !0, mr, !0), i("workTime", 100), i( "workDelay", 100), i("flattenSpans", !0, Cr, !0), i("addModeClass", !1, Cr, !0), i("pollInterval", 100), i("undoDepth", 200, function(r, a) { return r.doc.history.undoDepth = a }), i("historyEventDelay", 1250), i("viewportMargin", 10, function(r) { return r.refresh() }, !0), i("maxHighlightLength", 1e4, Cr, !0), i("moveInputWithCursor", !0, function(r, a) { a || r.display.input.resetPosition() }), i("tabindex", null, function(r, a) { return r.display.input.getField().tabIndex = a || "" }), i("autofocus", null), i("direction", "ltr", function(r, a) { return r.doc.setDirection(a) }, !0), i("phrases", null) } function nu(e, n, i) { var r = i && i != ir; if (!n != !r) { var a = e.display.dragFunctions, h = n ? ne : Se; h(e.display.scroller, "dragstart", a.start), h(e.display.scroller, "dragenter", a.enter), h(e.display.scroller, "dragover", a.over), h(e.display .scroller, "dragleave", a.leave), h(e.display.scroller, "drop", a.drop) } } function ru(e) { e.options.lineWrapping ? (Z(e.display.wrapper, "CodeMirror-wrap"), e.display.sizer .style.minWidth = "", e.display.sizerWidth = null) : (H(e.display.wrapper, "CodeMirror-wrap"), Di(e)), Hi(e), St(e), gr(e), setTimeout(function() { return Jn(e) }, 100) } function Qe(e, n) { var i = this; if (!(this instanceof Qe)) return new Qe(e, n); this.options = n = n ? le(n) : {}, le(il, n, !1); var r = n.value; typeof r == "string" ? r = new bt(r, n.mode, null, n.lineSeparator, n.direction) : n .mode && (r.modeOption = n.mode), this.doc = r; var a = new Qe.inputStyles[n.inputStyle](this), h = this.display = new gs(e, r, a, n); h.wrapper.CodeMirror = this, rl(this), n.lineWrapping && (this.display.wrapper .className += " CodeMirror-wrap"), aa(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 se, keySeq: null, specialChars: null }, n.autofocus && !D && h.input.focus(), f && c < 11 && setTimeout(function() { return i.display.input.reset(!0) }, 20), iu(this), Fs(), Bn(this), this.curOp.forceUpdate = !0, ga(this, r), n .autofocus && !D || this.hasFocus() ? setTimeout(function() { i.hasFocus() && !i.state.focused && ji(i) }, 20) : Kn(this); for (var T in hi) hi.hasOwnProperty(T) && hi[T](this, n[T], ir); ua(this), n.finishInit && n.finishInit(this); for (var P = 0; P < lo.length; ++P) lo[P](this); Hn(this), m && n.lineWrapping && getComputedStyle(h.lineDiv).textRendering == "optimizelegibility" && (h.lineDiv.style.textRendering = "auto") } Qe.defaults = il, Qe.optionHandlers = hi; function iu(e) { var n = e.display; ne(n.scroller, "mousedown", at(e, _a)), f && c < 11 ? ne(n.scroller, "dblclick", at( e, function(O) { if (!Oe(e, O)) { var $ = Nn(e, O); if (!(!$ || ao(e, O) || dn(e.display, O))) { je(O); var Y = e.findWordAt($); li(e.doc, Y.anchor, Y.head) } } })) : ne(n.scroller, "dblclick", function(O) { return Oe(e, O) || je(O) }), ne(n.scroller, "contextmenu", function(O) { return nl(e, O) }), ne(n.input.getField(), "contextmenu", function(O) { n.scroller.contains(O.target) || nl(e, O) }); var i, r = { end: 0 }; function a() { n.activeTouch && (i = setTimeout(function() { return n.activeTouch = null }, 1e3), r = n.activeTouch, r.end = +new Date) } function h(O) { if (O.touches.length != 1) return !1; var $ = O.touches[0]; return $.radiusX <= 1 && $.radiusY <= 1 } function T(O, $) { if ($.left == null) return !0; var Y = $.left - O.left, Q = $.top - O.top; return Y * Y + Q * Q > 20 * 20 } ne(n.scroller, "touchstart", function(O) { if (!Oe(e, O) && !h(O) && !ao(e, O)) { n.input.ensurePolled(), clearTimeout(i); var $ = +new Date; n.activeTouch = { start: $, moved: !1, prev: $ - r.end <= 300 ? r : null }, O.touches.length == 1 && (n.activeTouch.left = O.touches[0] .pageX, n.activeTouch.top = O.touches[0].pageY) } }), ne(n.scroller, "touchmove", function() { n.activeTouch && (n.activeTouch.moved = !0) }), ne(n.scroller, "touchend", function(O) { var $ = n.activeTouch; if ($ && !dn(n, O) && $.left != null && !$.moved && new Date - $.start < 300) { var Y = e.coordsChar(n.activeTouch, "page"), Q; !$.prev || T($, $.prev) ? Q = new Ve(Y, Y) : !$.prev.prev || T($, $ .prev.prev) ? Q = e.findWordAt(Y) : Q = new Ve(X(Y.line, 0), Ne(e.doc, X(Y.line + 1, 0))), e.setSelection(Q.anchor, Q .head), e.focus(), je(O) } a() }), ne(n.scroller, "touchcancel", a), ne(n.scroller, "scroll", function() { n.scroller.clientHeight && (Ar(e, n.scroller.scrollTop), On(e, n .scroller.scrollLeft, !0), be(e, "scroll", e)) }), ne(n.scroller, "mousewheel", function(O) { return ca(e, O) }), ne(n.scroller, "DOMMouseScroll", function(O) { return ca(e, O) }), ne(n.wrapper, "scroll", function() { return n.wrapper.scrollTop = n.wrapper.scrollLeft = 0 }), n.dragFunctions = { enter: function(O) { Oe(e, O) || Wt(O) }, over: function(O) { Oe(e, O) || (Os(e, O), Wt(O)) }, start: function(O) { return Ls(e, O) }, drop: at(e, Ns), leave: function(O) { Oe(e, O) || za(e) } }; var P = n.input.getField(); ne(P, "keyup", function(O) { return Za.call(e, O) }), ne(P, "keydown", at(e, Ja)), ne(P, "keypress", at(e, qa)), ne(P, "focus", function(O) { return ji(e, O) }), ne(P, "blur", function(O) { return Kn(e, O) }) } var lo = []; Qe.defineInitHook = function(e) { return lo.push(e) }; function Hr(e, n, i, r) { var a = e.doc, h; i == null && (i = "add"), i == "smart" && (a.mode.indent ? h = dr(e, n).state : i = "prev"); var T = e.options.tabSize, P = Ce(a, n), O = oe(P.text, null, T); P.stateAfter && (P.stateAfter = null); var $ = P.text.match(/^\s*/)[0], Y; if (!r && !/\S/.test(P.text)) Y = 0, i = "not"; else if (i == "smart" && (Y = a.mode.indent(h, P.text.slice($.length), P.text), Y == De || Y > 150)) { if (!r) return; i = "prev" } i == "prev" ? n > a.first ? Y = oe(Ce(a, n - 1).text, null, T) : Y = 0 : i == "add" ? Y = O + e.options.indentUnit : i == "subtract" ? Y = O - e.options .indentUnit : typeof i == "number" && (Y = O + i), Y = Math.max(0, Y); var Q = "", _ = 0; if (e.options.indentWithTabs) for (var q = Math.floor(Y / T); q; --q) _ += T, Q += " "; if (_ < Y && (Q += ct(Y - _)), Q != $) return er(a, Q, X(n, 0), X(n, $.length), "+input"), P.stateAfter = null, !0; for (var ie = 0; ie < a.sel.ranges.length; ie++) { var ae = a.sel.ranges[ie]; if (ae.head.line == n && ae.head.ch < $.length) { var fe = X(n, $.length); eo(a, ie, new Ve(fe, fe)); break } } } var Qt = null; function pi(e) { Qt = e } function so(e, n, i, r, a) { var h = e.doc; e.display.shift = !1, r || (r = h.sel); var T = +new Date - 200, P = a == "paste" || e.state.pasteIncoming > T, O = ur(n), $ = null; if (P && r.ranges.length > 1) if (Qt && Qt.text.join(` `) == n) { if (r.ranges.length % Qt.text.length == 0) { $ = []; for (var Y = 0; Y < Qt.text.length; Y++) $.push(h.splitLines(Qt.text[ Y])) } } else O.length == r.ranges.length && e.options.pasteLinesPerSelection && ($ = gt(O, function(he) { return [he] })); for (var Q = e.curOp.updateInput, _ = r.ranges.length - 1; _ >= 0; _--) { var q = r.ranges[_], ie = q.from(), ae = q.to(); q.empty() && (i && i > 0 ? ie = X(ie.line, ie.ch - i) : e.state.overwrite && ! P ? ae = X(ae.line, Math.min(Ce(h, ae.line).text.length, ae.ch + Me(O) .length)) : P && Qt && Qt.lineWise && Qt.text.join(` `) == O.join(` `) && (ie = ae = X(ie.line, 0))); var fe = { from: ie, to: ae, text: $ ? $[_ % $.length] : O, origin: a || (P ? "paste" : e.state.cutIncoming > T ? "cut" : "+input") }; _n(e.doc, fe), ot(e, "inputRead", e, fe) } n && !P && al(e, n), Xn(e), e.curOp.updateInput < 2 && (e.curOp.updateInput = Q), e .curOp.typing = !0, e.state.pasteIncoming = e.state.cutIncoming = -1 } function ol(e, n) { var i = e.clipboardData && e.clipboardData.getData("Text"); if (i) return e.preventDefault(), !n.isReadOnly() && !n.options.disableInput && n .hasFocus() && Rt(n, function() { return so(n, i, 0, null, "paste") }), !0 } function al(e, n) { if (!(!e.options.electricChars || !e.options.smartIndent)) for (var i = e.doc.sel, r = i.ranges.length - 1; r >= 0; r--) { var a = i.ranges[r]; if (!(a.head.ch > 100 || r && i.ranges[r - 1].head.line == a.head.line)) { var h = e.getModeAt(a.head), T = !1; if (h.electricChars) { for (var P = 0; P < h.electricChars.length; P++) if (n.indexOf(h.electricChars.charAt(P)) > -1) { T = Hr(e, a.head.line, "smart"); break } } else h.electricInput && h.electricInput.test(Ce(e.doc, a.head.line) .text.slice(0, a.head.ch)) && (T = Hr(e, a.head.line, "smart")); T && ot(e, "electricInput", e, a.head.line) } } } function ll(e) { for (var n = [], i = [], r = 0; r < e.doc.sel.ranges.length; r++) { var a = e.doc.sel.ranges[r].head.line, h = { anchor: X(a, 0), head: X(a + 1, 0) }; i.push(h), n.push(e.getRange(h.anchor, h.head)) } return { text: n, ranges: i } } function sl(e, n, i, r) { e.setAttribute("autocorrect", i ? "" : "off"), e.setAttribute("autocapitalize", r ? "" : "off"), e.setAttribute("spellcheck", !!n) } function ul() { var e = M("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none" ), n = M("div", [e], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); return m ? e.style.width = "1000px" : e.setAttribute("wrap", "off"), E && (e.style .border = "1px solid black"), sl(e), n } function ou(e) { var n = e.optionHandlers, i = e.helpers = {}; e.prototype = { constructor: e, focus: function() { ve(this).focus(), this.display.input.focus() }, setOption: function(r, a) { var h = this.options, T = h[r]; h[r] == a && r != "mode" || (h[r] = a, n.hasOwnProperty(r) && at( this, n[r])(this, a, T), be(this, "optionChange", this, r)) }, getOption: function(r) { return this.options[r] }, getDoc: function() { return this.doc }, addKeyMap: function(r, a) { this.state.keyMaps[a ? "push" : "unshift"](ci(r)) }, removeKeyMap: function(r) { for (var a = this.state.keyMaps, h = 0; h < a.length; ++h) if (a[h] == r || a[h].name == r) return a.splice(h, 1), !0 }, addOverlay: mt(function(r, a) { var h = r.token ? r : e.getMode(this.options, r); if (h.startState) throw new Error( "Overlays may not be stateful."); jt(this.state.overlays, { mode: h, modeSpec: r, opaque: a && a.opaque, priority: a && a.priority || 0 }, function(T) { return T.priority }), this.state.modeGen++, St(this) }), removeOverlay: mt(function(r) { for (var a = this.state.overlays, h = 0; h < a.length; ++h) { var T = a[h].modeSpec; if (T == r || typeof r == "string" && T.name == r) { a.splice(h, 1), this.state.modeGen++, St(this); return } } }), indentLine: mt(function(r, a, h) { typeof a != "string" && typeof a != "number" && (a == null ? a = this.options.smartIndent ? "smart" : "prev" : a = a ? "add" : "subtract"), W(this.doc, r) && Hr(this, r, a, h) }), indentSelection: mt(function(r) { for (var a = this.doc.sel.ranges, h = -1, T = 0; T < a .length; T++) { var P = a[T]; if (P.empty()) P.head.line > h && (Hr(this, P.head.line, r, !0), h = P.head.line, T == this.doc.sel .primIndex && Xn(this)); else { var O = P.from(), $ = P.to(), Y = Math.max(h, O.line); h = Math.min(this.lastLine(), $.line - ($.ch ? 0 : 1)) + 1; for (var Q = Y; Q < h; ++Q) Hr(this, Q, r); var _ = this.doc.sel.ranges; O.ch == 0 && a.length == _.length && _[T].from().ch > 0 && eo(this.doc, T, new Ve(O, _[T].to()), Fe) } } }), getTokenAt: function(r, a) { return yo(this, r, a) }, getLineTokens: function(r, a) { return yo(this, X(r), a, !0) }, getTokenTypeAt: function(r) { r = Ne(this.doc, r); var a = po(this, Ce(this.doc, r.line)), h = 0, T = (a.length - 1) / 2, P = r.ch, O; if (P == 0) O = a[2]; else for (;;) { var $ = h + T >> 1; if (($ ? a[$ * 2 - 1] : 0) >= P) T = $; else if (a[$ * 2 + 1] < P) h = $ + 1; else { O = a[$ * 2 + 2]; break } } var Y = O ? O.indexOf("overlay ") : -1; return Y < 0 ? O : Y == 0 ? null : O.slice(0, Y - 1) }, getModeAt: function(r) { var a = this.doc.mode; return a.innerMode ? e.innerMode(a, this.getTokenAt(r).state).mode : a }, getHelper: function(r, a) { return this.getHelpers(r, a)[0] }, getHelpers: function(r, a) { var h = []; if (!i.hasOwnProperty(a)) return h; var T = i[a], P = this.getModeAt(r); if (typeof P[a] == "string") T[P[a]] && h.push(T[P[a]]); else if (P[a]) for (var O = 0; O < P[a].length; O++) { var $ = T[P[a][O]]; $ && h.push($) } else P.helperType && T[P.helperType] ? h.push(T[P .helperType]) : T[P.name] && h.push(T[P.name]); for (var Y = 0; Y < T._global.length; Y++) { var Q = T._global[Y]; Q.pred(P, this) && de(h, Q.val) == -1 && h.push(Q.val) } return h }, getStateAfter: function(r, a) { var h = this.doc; return r = Ft(h, r == null ? h.first + h.size - 1 : r), dr(this, r + 1, a).state }, cursorCoords: function(r, a) { var h, T = this.doc.sel.primary(); return r == null ? h = T.head : typeof r == "object" ? h = Ne(this .doc, r) : h = r ? T.from() : T.to(), Yt(this, h, a || "page") }, charCoords: function(r, a) { return Zr(this, Ne(this.doc, r), a || "page") }, coordsChar: function(r, a) { return r = Qo(this, r, a || "page"), Li(this, r.left, r.top) }, lineAtHeight: function(r, a) { return r = Qo(this, { top: r, left: 0 }, a || "page").top, qt(this.doc, r + this.display.viewOffset) }, heightAtLine: function(r, a, h) { var T = !1, P; if (typeof r == "number") { var O = this.doc.first + this.doc.size - 1; r < this.doc.first ? r = this.doc.first : r > O && (r = O, T = ! 0), P = Ce(this.doc, r) } else P = r; return Jr(this, P, { top: 0, left: 0 }, a || "page", h || T).top + (T ? this.doc.height - un(P) : 0) }, defaultTextHeight: function() { return Gn(this.display) }, defaultCharWidth: function() { return Qn(this.display) }, getViewport: function() { return { from: this.display.viewFrom, to: this.display.viewTo } }, addWidget: function(r, a, h, T, P) { var O = this.display; r = Yt(this, Ne(this.doc, r)); var $ = r.bottom, Y = r.left; if (a.style.position = "absolute", a.setAttribute( "cm-ignore-events", "true"), this.display.input .setUneditable(a), O.sizer.appendChild(a), T == "over") $ = r .top; else if (T == "above" || T == "near") { var Q = Math.max(O.wrapper.clientHeight, this.doc.height), _ = Math.max(O.sizer.clientWidth, O.lineSpace.clientWidth); (T == "above" || r.bottom + a.offsetHeight > Q) && r.top > a .offsetHeight ? $ = r.top - a.offsetHeight : r.bottom + a .offsetHeight <= Q && ($ = r.bottom), Y + a.offsetWidth > _ && (Y = _ - a.offsetWidth) } a.style.top = $ + "px", a.style.left = a.style.right = "", P == "right" ? (Y = O.sizer.clientWidth - a.offsetWidth, a.style .right = "0px") : (P == "left" ? Y = 0 : P == "middle" && ( Y = (O.sizer.clientWidth - a.offsetWidth) / 2), a.style .left = Y + "px"), h && ts(this, { left: Y, top: $, right: Y + a.offsetWidth, bottom: $ + a.offsetHeight }) }, triggerOnKeyDown: mt(Ja), triggerOnKeyPress: mt(qa), triggerOnKeyUp: Za, triggerOnMouseDown: mt(_a), execCommand: function(r) { if (Lr.hasOwnProperty(r)) return Lr[r].call(null, this) }, triggerElectric: mt(function(r) { al(this, r) }), findPosH: function(r, a, h, T) { var P = 1; a < 0 && (P = -1, a = -a); for (var O = Ne(this.doc, r), $ = 0; $ < a && (O = uo(this.doc, O, P, h, T), !O.hitSide); ++$); return O }, moveH: mt(function(r, a) { var h = this; this.extendSelectionsBy(function(T) { return h.display.shift || h.doc.extend || T .empty() ? uo(h.doc, T.head, r, a, h.options .rtlMoveVisually) : r < 0 ? T.from() : T .to() }, Pt) }), deleteH: mt(function(r, a) { var h = this.doc.sel, T = this.doc; h.somethingSelected() ? T.replaceSelection("", null, "+delete") : rr(this, function(P) { var O = uo(T, P.head, r, a, !1); return r < 0 ? { from: O, to: P.head } : { from: P.head, to: O } }) }), findPosV: function(r, a, h, T) { var P = 1, O = T; a < 0 && (P = -1, a = -a); for (var $ = Ne(this.doc, r), Y = 0; Y < a; ++Y) { var Q = Yt(this, $, "div"); if (O == null ? O = Q.left : Q.left = O, $ = fl(this, Q, P, h), $.hitSide) break } return $ }, moveV: mt(function(r, a) { var h = this, T = this.doc, P = [], O = !this.display.shift && !T.extend && T.sel .somethingSelected(); if (T.extendSelectionsBy(function(Y) { if (O) return r < 0 ? Y.from() : Y.to(); var Q = Yt(h, Y.head, "div"); Y.goalColumn != null && (Q.left = Y.goalColumn), P .push(Q.left); var _ = fl(h, Q, r, a); return a == "page" && Y == T.sel.primary() && Vi(h, Zr(h, _, "div").top - Q.top), _ }, Pt), P.length) for (var $ = 0; $ < T.sel.ranges.length; $++) T.sel.ranges[ $].goalColumn = P[$] }), findWordAt: function(r) { var a = this.doc, h = Ce(a, r.line).text, T = r.ch, P = r.ch; if (h) { var O = this.getHelper(r, "wordChars"); (r.sticky == "before" || P == h.length) && T ? --T : ++P; for (var $ = h.charAt(T), Y = Lt($, O) ? function(Q) { return Lt(Q, O) } : /\s/.test($) ? function(Q) { return /\s/.test(Q) } : function(Q) { return !/\s/.test(Q) && !Lt(Q) }; T > 0 && Y(h.charAt(T - 1));) --T; for (; P < h.length && Y(h.charAt(P));) ++P } return new Ve(X(r.line, T), X(r.line, P)) }, toggleOverwrite: function(r) { r != null && r == this.state.overwrite || ((this.state.overwrite = ! this.state.overwrite) ? Z(this.display.cursorDiv, "CodeMirror-overwrite") : H(this.display.cursorDiv, "CodeMirror-overwrite"), be(this, "overwriteToggle", this, this.state.overwrite)) }, hasFocus: function() { return this.display.input.getField() == ee(ge(this)) }, isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) }, scrollTo: mt(function(r, a) { yr(this, r, a) }), getScrollInfo: function() { var r = this.display.scroller; return { left: r.scrollLeft, top: r.scrollTop, height: r.scrollHeight - en(this) - this.display.barHeight, width: r.scrollWidth - en(this) - this.display.barWidth, clientHeight: Ri(this), clientWidth: Mn(this) } }, scrollIntoView: mt(function(r, a) { r == null ? (r = { from: this.doc.sel.primary().head, to: null }, a == null && (a = this.options.cursorScrollMargin)) : typeof r == "number" ? r = { from: X(r, 0), to: null } : r.from == null && (r = { from: r, to: null }), r.to || (r.to = r.from), r.margin = a || 0, r.from .line != null ? ns(this, r) : na(this, r.from, r.to, r .margin) }), setSize: mt(function(r, a) { var h = this, T = function(O) { return typeof O == "number" || /^\d+$/.test(String(O)) ? O + "px" : O }; r != null && (this.display.wrapper.style.width = T(r)), a != null && (this.display.wrapper.style.height = T(a)), this .options.lineWrapping && ko(this); var P = this.display.viewFrom; this.doc.iter(P, this.display.viewTo, function(O) { if (O.widgets) { for (var $ = 0; $ < O.widgets.length; $++) if (O.widgets[$].noHScroll) { Sn(h, P, "widget"); break } }++P }), this.curOp.forceUpdate = !0, be(this, "refresh", this) }), operation: function(r) { return Rt(this, r) }, startOperation: function() { return Bn(this) }, endOperation: function() { return Hn(this) }, refresh: mt(function() { var r = this.display.cachedTextHeight; St(this), this.curOp.forceUpdate = !0, gr(this), yr(this, this .doc.scrollLeft, this.doc.scrollTop), Gi(this.display), (r == null || Math.abs(r - Gn(this.display)) > .5 || this .options.lineWrapping) && Hi(this), be(this, "refresh", this) }), swapDoc: mt(function(r) { var a = this.doc; return a.cm = null, this.state.selectingText && this.state .selectingText(), ga(this, r), gr(this), this.display.input .reset(), yr(this, r.scrollLeft, r.scrollTop), this.curOp .forceScroll = !0, ot(this, "swapDoc", this, a), a }), phrase: function(r) { var a = this.options.phrases; return a && Object.prototype.hasOwnProperty.call(a, r) ? a[r] : r }, 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 } }, Ge(e), e.registerHelper = function(r, a, h) { i.hasOwnProperty(r) || (i[r] = e[r] = { _global: [] }), i[r][a] = h }, e.registerGlobalHelper = function(r, a, h, T) { e.registerHelper(r, a, T), i[r]._global.push({ pred: h, val: T }) } } function uo(e, n, i, r, a) { var h = n, T = i, P = Ce(e, n.line), O = a && e.direction == "rtl" ? -i : i; function $() { var ye = n.line + O; return ye < e.first || ye >= e.first + e.size ? !1 : (n = new X(ye, n.ch, n .sticky), P = Ce(e, ye)) } function Y(ye) { var pe; if (r == "codepoint") { var Ee = P.text.charCodeAt(n.ch + (i > 0 ? 0 : -1)); if (isNaN(Ee)) pe = null; else { var Ie = i > 0 ? Ee >= 55296 && Ee < 56320 : Ee >= 56320 && Ee < 57343; pe = new X(n.line, Math.max(0, Math.min(P.text.length, n.ch + i * (Ie ? 2 : 1))), -i) } } else a ? pe = zs(e.cm, P, n, i) : pe = no(P, n, i); if (pe == null) if (!ye && $()) n = ro(a, e.cm, P, n.line, O); else return !1; else n = pe; return !0 } if (r == "char" || r == "codepoint") Y(); else if (r == "column") Y(!0); else if (r == "word" || r == "group") for (var Q = null, _ = r == "group", q = e.cm && e.cm.getHelper(n, "wordChars"), ie = !0; !(i < 0 && !Y(!ie)); ie = !1) { var ae = P.text.charAt(n.ch) || ` `, fe = Lt(ae, q) ? "w" : _ && ae == ` ` ? "n" : !_ || /\s/.test(ae) ? null : "p"; if (_ && !ie && !fe && (fe = "s"), Q && Q != fe) { i < 0 && (i = 1, Y(), n.sticky = "after"); break } if (fe && (Q = fe), i > 0 && !Y(!ie)) break } var he = ui(e, n, h, T, !0); return Pe(h, he) && (he.hitSide = !0), he } function fl(e, n, i, r) { var a = e.doc, h = n.left, T; if (r == "page") { var P = Math.min(e.display.wrapper.clientHeight, ve(e).innerHeight || a(e) .documentElement.clientHeight), O = Math.max(P - .5 * Gn(e.display), 3); T = (i > 0 ? n.bottom : n.top) + i * O } else r == "line" && (T = i > 0 ? n.bottom + 3 : n.top - 3); for (var $; $ = Li(e, h, T), !!$.outside;) { if (i < 0 ? T <= 0 : T >= a.height) { $.hitSide = !0; break } T += i * 5 } return $ } var ke = function(e) { this.cm = e, this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null, this.polling = new se, this.composing = null, this.gracePeriod = !1, this.readDOMTimeout = null }; ke.prototype.init = function(e) { var n = this, i = this, r = i.cm, a = i.div = e.lineDiv; a.contentEditable = !0, sl(a, r.options.spellcheck, r.options.autocorrect, r .options.autocapitalize); function h(P) { for (var O = P.target; O; O = O.parentNode) { if (O == a) return !0; if (/\bCodeMirror-(?:line)?widget\b/.test(O.className)) break } return !1 } ne(a, "paste", function(P) { !h(P) || Oe(r, P) || ol(P, r) || c <= 11 && setTimeout(at(r, function() { return n.updateFromDOM() }), 20) }), ne(a, "compositionstart", function(P) { n.composing = { data: P.data, done: !1 } }), ne(a, "compositionupdate", function(P) { n.composing || (n.composing = { data: P.data, done: !1 }) }), ne(a, "compositionend", function(P) { n.composing && (P.data != n.composing.data && n.readFromDOMSoon(), n .composing.done = !0) }), ne(a, "touchstart", function() { return i.forceCompositionEnd() }), ne(a, "input", function() { n.composing || n.readFromDOMSoon() }); function T(P) { if (!(!h(P) || Oe(r, P))) { if (r.somethingSelected()) pi({ lineWise: !1, text: r.getSelections() }), P.type == "cut" && r.replaceSelection("", null, "cut"); else if (r.options.lineWiseCopyCut) { var O = ll(r); pi({ lineWise: !0, text: O.text }), P.type == "cut" && r.operation(function() { r.setSelections(O.ranges, 0, Fe), r.replaceSelection("", null, "cut") }) } else return; if (P.clipboardData) { P.clipboardData.clearData(); var $ = Qt.text.join(` `); if (P.clipboardData.setData("Text", $), P.clipboardData.getData( "Text") == $) { P.preventDefault(); return } } var Y = ul(), Q = Y.firstChild; r.display.lineSpace.insertBefore(Y, r.display.lineSpace.firstChild), Q .value = Qt.text.join(` `); var _ = ee(a.ownerDocument); ue(Q), setTimeout(function() { r.display.lineSpace.removeChild(Y), _.focus(), _ == a && i .showPrimarySelection() }, 50) } } ne(a, "copy", T), ne(a, "cut", T) }, ke.prototype.screenReaderLabelChanged = function(e) { e ? this.div.setAttribute("aria-label", e) : this.div.removeAttribute( "aria-label") }, ke.prototype.prepareSelection = function() { var e = _o(this.cm, !1); return e.focus = ee(this.div.ownerDocument) == this.div, e }, ke.prototype.showSelection = function(e, n) { !e || !this.cm.display.view.length || ((e.focus || n) && this .showPrimarySelection(), this.showMultipleSelections(e)) }, ke.prototype.getSelection = function() { return this.cm.display.wrapper.ownerDocument.getSelection() }, ke.prototype.showPrimarySelection = function() { var e = this.getSelection(), n = this.cm, i = n.doc.sel.primary(), r = i.from(), a = i.to(); if (n.display.viewTo == n.display.viewFrom || r.line >= n.display.viewTo || a .line < n.display.viewFrom) { e.removeAllRanges(); return } var h = gi(n, e.anchorNode, e.anchorOffset), T = gi(n, e.focusNode, e.focusOffset); if (!(h && !h.bad && T && !T.bad && re(rt(h, T), r) == 0 && re(Ue(h, T), a) == 0)) { var P = n.display.view, O = r.line >= n.display.viewFrom && dl(n, r) || { node: P[0].measure.map[2], offset: 0 }, $ = a.line < n.display.viewTo && dl(n, a); if (!$) { var Y = P[P.length - 1].measure, Q = Y.maps ? Y.maps[Y.maps.length - 1] : Y.map; $ = { node: Q[Q.length - 1], offset: Q[Q.length - 2] - Q[Q.length - 3] } } if (!O || !$) { e.removeAllRanges(); return } var _ = e.rangeCount && e.getRangeAt(0), q; try { q = G(O.node, O.offset, $.offset, $.node) } catch {} q && (!t && n.state.focused ? (e.collapse(O.node, O.offset), q.collapsed || (e.removeAllRanges(), e.addRange(q))) : (e.removeAllRanges(), e .addRange(q)), _ && e.anchorNode == null ? e.addRange(_) : t && this.startGracePeriod()), this.rememberSelection() } }, ke.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) }, ke.prototype.showMultipleSelections = function(e) { V(this.cm.display.cursorDiv, e.cursors), V(this.cm.display.selectionDiv, e .selection) }, ke.prototype.rememberSelection = function() { var e = this.getSelection(); this.lastAnchorNode = e.anchorNode, this.lastAnchorOffset = e.anchorOffset, this .lastFocusNode = e.focusNode, this.lastFocusOffset = e.focusOffset }, ke.prototype.selectionInEditor = function() { var e = this.getSelection(); if (!e.rangeCount) return !1; var n = e.getRangeAt(0).commonAncestorContainer; return J(this.div, n) }, ke.prototype.focus = function() { this.cm.options.readOnly != "nocursor" && ((!this.selectionInEditor() || ee(this .div.ownerDocument) != this.div) && this.showSelection(this .prepareSelection(), !0), this.div.focus()) }, ke.prototype.blur = function() { this.div.blur() }, ke.prototype.getField = function() { return this.div }, ke.prototype.supportsTouch = function() { return !0 }, ke.prototype.receivedFocus = function() { var e = this, n = this; this.selectionInEditor() ? setTimeout(function() { return e.pollSelection() }, 20) : Rt(this.cm, function() { return n.cm.curOp.selectionChanged = !0 }); function i() { n.cm.state.focused && (n.pollSelection(), n.polling.set(n.cm.options .pollInterval, i)) } this.polling.set(this.cm.options.pollInterval, i) }, ke.prototype.selectionChanged = function() { var e = this.getSelection(); return e.anchorNode != this.lastAnchorNode || e.anchorOffset != this .lastAnchorOffset || e.focusNode != this.lastFocusNode || e.focusOffset != this.lastFocusOffset }, ke.prototype.pollSelection = function() { if (!(this.readDOMTimeout != null || this.gracePeriod || !this .selectionChanged())) { var e = this.getSelection(), n = this.cm; if (I && b && this.cm.display.gutterSpecs.length && au(e.anchorNode)) { this.cm.triggerOnKeyDown({ type: "keydown", keyCode: 8, preventDefault: Math.abs }), this.blur(), this.focus(); return } if (!this.composing) { this.rememberSelection(); var i = gi(n, e.anchorNode, e.anchorOffset), r = gi(n, e.focusNode, e.focusOffset); i && r && Rt(n, function() { vt(n.doc, Cn(i, r), Fe), (i.bad || r.bad) && (n.curOp .selectionChanged = !0) }) } } }, ke.prototype.pollContent = function() { this.readDOMTimeout != null && (clearTimeout(this.readDOMTimeout), this .readDOMTimeout = null); var e = this.cm, n = e.display, i = e.doc.sel.primary(), r = i.from(), a = i.to(); if (r.ch == 0 && r.line > e.firstLine() && (r = X(r.line - 1, Ce(e.doc, r.line - 1).length)), a.ch == Ce(e.doc, a.line).text.length && a.line < e .lastLine() && (a = X(a.line + 1, 0)), r.line < n.viewFrom || a.line > n .viewTo - 1) return !1; var h, T, P; r.line == n.viewFrom || (h = Ln(e, r.line)) == 0 ? (T = We(n.view[0].line), P = n.view[0].node) : (T = We(n.view[h].line), P = n.view[h - 1].node .nextSibling); var O = Ln(e, a.line), $, Y; if (O == n.view.length - 1 ? ($ = n.viewTo - 1, Y = n.lineDiv.lastChild) : ($ = We(n.view[O + 1].line) - 1, Y = n.view[O + 1].node.previousSibling), !P) return !1; for (var Q = e.doc.splitLines(lu(e, P, Y, T, $)), _ = ln(e.doc, X(T, 0), X($, Ce(e.doc, $).text.length)); Q.length > 1 && _.length > 1;) if (Me(Q) == Me(_)) Q.pop(), _.pop(), $--; else if (Q[0] == _[0]) Q.shift(), _.shift(), T++; else break; for (var q = 0, ie = 0, ae = Q[0], fe = _[0], he = Math.min(ae.length, fe .length); q < he && ae.charCodeAt(q) == fe.charCodeAt(q);) ++q; for (var ye = Me(Q), pe = Me(_), Ee = Math.min(ye.length - (Q.length == 1 ? q : 0), pe.length - (_.length == 1 ? q : 0)); ie < Ee && ye.charCodeAt(ye .length - ie - 1) == pe.charCodeAt(pe.length - ie - 1);) ++ie; if (Q.length == 1 && _.length == 1 && T == r.line) for (; q && q > r.ch && ye.charCodeAt(ye.length - ie - 1) == pe.charCodeAt( pe.length - ie - 1);) q--, ie++; Q[Q.length - 1] = ye.slice(0, ye.length - ie).replace(/^\u200b+/, ""), Q[0] = Q[ 0].slice(q).replace(/\u200b+$/, ""); var Ie = X(T, q), we = X($, _.length ? Me(_).length - ie : 0); if (Q.length > 1 || Q[0] || re(Ie, we)) return er(e.doc, Q, Ie, we, "+input"), ! 0 }, ke.prototype.ensurePolled = function() { this.forceCompositionEnd() }, ke.prototype.reset = function() { this.forceCompositionEnd() }, ke.prototype.forceCompositionEnd = function() { !this.composing || (clearTimeout(this.readDOMTimeout), this.composing = null, this.updateFromDOM(), this.div.blur(), this.div.focus()) }, ke.prototype.readFromDOMSoon = function() { var e = this; this.readDOMTimeout == null && (this.readDOMTimeout = setTimeout(function() { if (e.readDOMTimeout = null, e.composing) if (e.composing.done) e.composing = null; else return; e.updateFromDOM() }, 80)) }, ke.prototype.updateFromDOM = function() { var e = this; (this.cm.isReadOnly() || !this.pollContent()) && Rt(this.cm, function() { return St(e.cm) }) }, ke.prototype.setUneditable = function(e) { e.contentEditable = "false" }, ke.prototype.onKeyPress = function(e) { e.charCode == 0 || this.composing || (e.preventDefault(), this.cm .isReadOnly() || at(this.cm, so)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0)) }, ke.prototype.readOnlyChanged = function(e) { this.div.contentEditable = String(e != "nocursor") }, ke.prototype.onContextMenu = function() {}, ke.prototype.resetPosition = function() {}, ke.prototype.needsContentAttribute = !0; function dl(e, n) { var i = Mi(e, n.line); if (!i || i.hidden) return null; var r = Ce(e.doc, n.line), a = Uo(i, r, n.line), h = Re(r, e.doc.direction), T = "left"; if (h) { var P = Ae(h, n.ch); T = P % 2 ? "right" : "left" } var O = Wo(a.map, n.ch, T); return O.offset = O.collapse == "right" ? O.end : O.start, O } function au(e) { for (var n = e; n; n = n.parentNode) if (/CodeMirror-gutter-wrapper/.test(n.className)) return !0; return !1 } function or(e, n) { return n && (e.bad = !0), e } function lu(e, n, i, r, a) { var h = "", T = !1, P = e.doc.lineSeparator(), O = !1; function $(q) { return function(ie) { return ie.id == q } } function Y() { T && (h += P, O && (h += P), T = O = !1) } function Q(q) { q && (Y(), h += q) } function _(q) { if (q.nodeType == 1) { var ie = q.getAttribute("cm-text"); if (ie) { Q(ie); return } var ae = q.getAttribute("cm-marker"), fe; if (ae) { var he = e.findMarks(X(r, 0), X(a + 1, 0), $(+ae)); he.length && (fe = he[0].find(0)) && Q(ln(e.doc, fe.from, fe.to).join( P)); return } if (q.getAttribute("contenteditable") == "false") return; var ye = /^(pre|div|p|li|table|br)$/i.test(q.nodeName); if (!/^br$/i.test(q.nodeName) && q.textContent.length == 0) return; ye && Y(); for (var pe = 0; pe < q.childNodes.length; pe++) _(q.childNodes[pe]); /^(pre|p)$/i.test(q.nodeName) && (O = !0), ye && (T = !0) } else q.nodeType == 3 && Q(q.nodeValue.replace(/\u200b/g, "").replace( /\u00a0/g, " ")) } for (; _(n), n != i;) n = n.nextSibling, O = !1; return h } function gi(e, n, i) { var r; if (n == e.display.lineDiv) { if (r = e.display.lineDiv.childNodes[i], !r) return or(e.clipPos(X(e.display .viewTo - 1)), !0); n = null, i = 0 } else for (r = n;; r = r.parentNode) { if (!r || r == e.display.lineDiv) return null; if (r.parentNode && r.parentNode == e.display.lineDiv) break } for (var a = 0; a < e.display.view.length; a++) { var h = e.display.view[a]; if (h.node == r) return su(h, n, i) } } function su(e, n, i) { var r = e.text.firstChild, a = !1; if (!n || !J(r, n)) return or(X(We(e.line), 0), !0); if (n == r && (a = !0, n = r.childNodes[i], i = 0, !n)) { var h = e.rest ? Me(e.rest) : e.line; return or(X(We(h), h.text.length), a) } var T = n.nodeType == 3 ? n : null, P = n; for (!T && n.childNodes.length == 1 && n.firstChild.nodeType == 3 && (T = n .firstChild, i && (i = T.nodeValue.length)); P.parentNode != r;) P = P .parentNode; var O = e.measure, $ = O.maps; function Y(fe, he, ye) { for (var pe = -1; pe < ($ ? $.length : 0); pe++) for (var Ee = pe < 0 ? O.map : $[pe], Ie = 0; Ie < Ee.length; Ie += 3) { var we = Ee[Ie + 2]; if (we == fe || we == he) { var Be = We(pe < 0 ? e.line : e.rest[pe]), Ye = Ee[Ie] + ye; return (ye < 0 || we != fe) && (Ye = Ee[Ie + (ye ? 1 : 0)]), X(Be, Ye) } } } var Q = Y(T, P, i); if (Q) return or(Q, a); for (var _ = P.nextSibling, q = T ? T.nodeValue.length - i : 0; _; _ = _ .nextSibling) { if (Q = Y(_, _.firstChild, 0), Q) return or(X(Q.line, Q.ch - q), a); q += _.textContent.length } for (var ie = P.previousSibling, ae = i; ie; ie = ie.previousSibling) { if (Q = Y(ie, ie.firstChild, -1), Q) return or(X(Q.line, Q.ch + ae), a); ae += ie.textContent.length } } var _e = function(e) { this.cm = e, this.prevInput = "", this.pollingFast = !1, this.polling = new se, this.hasSelection = !1, this.composing = null, this.resetting = !1 }; _e.prototype.init = function(e) { var n = this, i = this, r = this.cm; this.createField(e); var a = this.textarea; e.wrapper.insertBefore(this.wrapper, e.wrapper.firstChild), E && (a.style .width = "0px"), ne(a, "input", function() { f && c >= 9 && n.hasSelection && (n.hasSelection = null), i.poll() }), ne(a, "paste", function(T) { Oe(r, T) || ol(T, r) || (r.state.pasteIncoming = +new Date, i .fastPoll()) }); function h(T) { if (!Oe(r, T)) { if (r.somethingSelected()) pi({ lineWise: !1, text: r.getSelections() }); else if (r.options.lineWiseCopyCut) { var P = ll(r); pi({ lineWise: !0, text: P.text }), T.type == "cut" ? r.setSelections(P.ranges, null, Fe) : (i .prevInput = "", a.value = P.text.join(` `), ue(a)) } else return; T.type == "cut" && (r.state.cutIncoming = +new Date) } } ne(a, "cut", h), ne(a, "copy", h), ne(e.scroller, "paste", function(T) { if (!(dn(e, T) || Oe(r, T))) { if (!a.dispatchEvent) { r.state.pasteIncoming = +new Date, i.focus(); return } var P = new Event("paste"); P.clipboardData = T.clipboardData, a.dispatchEvent(P) } }), ne(e.lineSpace, "selectstart", function(T) { dn(e, T) || je(T) }), ne(a, "compositionstart", function() { var T = r.getCursor("from"); i.composing && i.composing.range.clear(), i.composing = { start: T, range: r.markText(T, r.getCursor("to"), { className: "CodeMirror-composing" }) } }), ne(a, "compositionend", function() { i.composing && (i.poll(), i.composing.range.clear(), i.composing = null) }) }, _e.prototype.createField = function(e) { this.wrapper = ul(), this.textarea = this.wrapper.firstChild }, _e.prototype.screenReaderLabelChanged = function(e) { e ? this.textarea.setAttribute("aria-label", e) : this.textarea.removeAttribute( "aria-label") }, _e.prototype.prepareSelection = function() { var e = this.cm, n = e.display, i = e.doc, r = _o(e); if (e.options.moveInputWithCursor) { var a = Yt(e, i.sel.primary().head, "div"), h = n.wrapper.getBoundingClientRect(), T = n.lineDiv.getBoundingClientRect(); r.teTop = Math.max(0, Math.min(n.wrapper.clientHeight - 10, a.top + T.top - h.top)), r.teLeft = Math.max(0, Math.min(n.wrapper.clientWidth - 10, a.left + T.left - h.left)) } return r }, _e.prototype.showSelection = function(e) { var n = this.cm, i = n.display; V(i.cursorDiv, e.cursors), V(i.selectionDiv, e.selection), e.teTop != null && ( this.wrapper.style.top = e.teTop + "px", this.wrapper.style.left = e .teLeft + "px") }, _e.prototype.reset = function(e) { if (!(this.contextMenuPending || this.composing && e)) { var n = this.cm; if (this.resetting = !0, n.somethingSelected()) { this.prevInput = ""; var i = n.getSelection(); this.textarea.value = i, n.state.focused && ue(this.textarea), f && c >= 9 && (this.hasSelection = i) } else e || (this.prevInput = this.textarea.value = "", f && c >= 9 && (this .hasSelection = null)); this.resetting = !1 } }, _e.prototype.getField = function() { return this.textarea }, _e.prototype.supportsTouch = function() { return !1 }, _e.prototype.focus = function() { if (this.cm.options.readOnly != "nocursor" && (!D || ee(this.textarea .ownerDocument) != this.textarea)) try { this.textarea.focus() } catch {} }, _e.prototype.blur = function() { this.textarea.blur() }, _e.prototype.resetPosition = function() { this.wrapper.style.top = this.wrapper.style.left = 0 }, _e.prototype.receivedFocus = function() { this.slowPoll() }, _e.prototype.slowPoll = function() { var e = this; this.pollingFast || this.polling.set(this.cm.options.pollInterval, function() { e.poll(), e.cm.state.focused && e.slowPoll() }) }, _e.prototype.fastPoll = function() { var e = !1, n = this; n.pollingFast = !0; function i() { var r = n.poll(); !r && !e ? (e = !0, n.polling.set(60, i)) : (n.pollingFast = !1, n .slowPoll()) } n.polling.set(20, i) }, _e.prototype.poll = function() { var e = this, n = this.cm, i = this.textarea, r = this.prevInput; if (this.contextMenuPending || this.resetting || !n.state.focused || mn(i) && ! r && !this.composing || n.isReadOnly() || n.options.disableInput || n.state .keySeq) return !1; var a = i.value; if (a == r && !n.somethingSelected()) return !1; if (f && c >= 9 && this.hasSelection === a || R && /[\uf700-\uf7ff]/.test(a)) return n.display.input.reset(), !1; if (n.doc.sel == n.display.selForContextMenu) { var h = a.charCodeAt(0); if (h == 8203 && !r && (r = "\u200B"), h == 8666) return this.reset(), this .cm.execCommand("undo") } for (var T = 0, P = Math.min(r.length, a.length); T < P && r.charCodeAt(T) == a .charCodeAt(T);) ++T; return Rt(n, function() { so(n, a.slice(T), r.length - T, null, e.composing ? "*compose" : null), a.length > 1e3 || a.indexOf(` `) > -1 ? i.value = e.prevInput = "" : e.prevInput = a, e.composing && (e.composing.range.clear(), e.composing.range = n.markText(e.composing.start, n.getCursor("to"), { className: "CodeMirror-composing" })) }), !0 }, _e.prototype.ensurePolled = function() { this.pollingFast && this.poll() && (this.pollingFast = !1) }, _e.prototype.onKeyPress = function() { f && c >= 9 && (this.hasSelection = null), this.fastPoll() }, _e.prototype.onContextMenu = function(e) { var n = this, i = n.cm, r = i.display, a = n.textarea; n.contextMenuPending && n.contextMenuPending(); var h = Nn(i, e), T = r.scroller.scrollTop; if (!h || g) return; var P = i.options.resetSelectionOnContextMenu; P && i.doc.sel.contains(h) == -1 && at(i, vt)(i.doc, Cn(h), Fe); var O = a.style.cssText, $ = n.wrapper.style.cssText, Y = n.wrapper.offsetParent.getBoundingClientRect(); n.wrapper.style.cssText = "position: static", a.style.cssText = `position: absolute; width: 30px; height: 30px; top: ` + (e.clientY - Y.top - 5) + "px; left: " + (e.clientX - Y.left - 5) + `px; z-index: 1000; background: ` + (f ? "rgba(255, 255, 255, .05)" : "transparent") + `; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`; var Q; m && (Q = a.ownerDocument.defaultView.scrollY), r.input.focus(), m && a .ownerDocument.defaultView.scrollTo(null, Q), r.input.reset(), i .somethingSelected() || (a.value = n.prevInput = " "), n .contextMenuPending = q, r.selForContextMenu = i.doc.sel, clearTimeout(r .detectingSelectAll); function _() { if (a.selectionStart != null) { var ae = i.somethingSelected(), fe = "\u200B" + (ae ? a.value : ""); a.value = "\u21DA", a.value = fe, n.prevInput = ae ? "" : "\u200B", a .selectionStart = 1, a.selectionEnd = fe.length, r .selForContextMenu = i.doc.sel } } function q() { if (n.contextMenuPending == q && (n.contextMenuPending = !1, n.wrapper.style .cssText = $, a.style.cssText = O, f && c < 9 && r.scrollbars .setScrollTop(r.scroller.scrollTop = T), a.selectionStart != null )) { (!f || f && c < 9) && _(); var ae = 0, fe = function() { r.selForContextMenu == i.doc.sel && a.selectionStart == 0 && a .selectionEnd > 0 && n.prevInput == "\u200B" ? at(i, Ra)( i) : ae++ < 10 ? r.detectingSelectAll = setTimeout(fe, 500) : (r.selForContextMenu = null, r.input.reset()) }; r.detectingSelectAll = setTimeout(fe, 200) } } if (f && c >= 9 && _(), U) { Wt(e); var ie = function() { Se(window, "mouseup", ie), setTimeout(q, 20) }; ne(window, "mouseup", ie) } else setTimeout(q, 50) }, _e.prototype.readOnlyChanged = function(e) { e || this.reset(), this.textarea.disabled = e == "nocursor", this.textarea .readOnly = !!e }, _e.prototype.setUneditable = function() {}, _e.prototype .needsContentAttribute = !1; function uu(e, n) { if (n = n ? le(n) : {}, n.value = e.value, !n.tabindex && e.tabIndex && (n .tabindex = e.tabIndex), !n.placeholder && e.placeholder && (n.placeholder = e.placeholder), n.autofocus == null) { var i = ee(e.ownerDocument); n.autofocus = i == e || e.getAttribute("autofocus") != null && i == document .body } function r() { e.value = P.getValue() } var a; if (e.form && (ne(e.form, "submit", r), !n.leaveSubmitMethodAlone)) { var h = e.form; a = h.submit; try { var T = h.submit = function() { r(), h.submit = a, h.submit(), h.submit = T } } catch {} } n.finishInit = function(O) { O.save = r, O.getTextArea = function() { return e }, O.toTextArea = function() { O.toTextArea = isNaN, r(), e.parentNode.removeChild(O .getWrapperElement()), e.style.display = "", e.form && (Se(e .form, "submit", r), !n.leaveSubmitMethodAlone && typeof e.form.submit == "function" && (e.form.submit = a)) } }, e.style.display = "none"; var P = Qe(function(O) { return e.parentNode.insertBefore(O, e.nextSibling) }, n); return P } function fu(e) { e.off = Se, e.on = ne, e.wheelEventPixels = ms, e.Doc = bt, e.splitLines = ur, e .countColumn = oe, e.findColumn = Je, e.isWordChar = Nt, e.Pass = De, e.signal = be, e.Line = Vn, e.changeEnd = Tn, e.scrollbarModel = oa, e.Pos = X, e.cmpPos = re, e.modes = Vt, e.mimeModes = yn, e.resolveMode = It, e.getMode = rn, e .modeExtensions = An, e.extendMode = jr, e.copyState = an, e.startState = fr, e .innerMode = xn, e.commands = Lr, e.keyMap = vn, e.keyName = Ya, e .isModifierKey = Va, e.lookupKey = nr, e.normalizeKeyMap = Us, e.StringStream = Ze, e.SharedTextMarker = Mr, e.TextMarker = wn, e.LineWidget = Rr, e .e_preventDefault = je, e.e_stopPropagation = $t, e.e_stop = Wt, e.addClass = Z, e.contains = J, e.rmClass = H, e.keyNames = In } tu(Qe), ou(Qe); var du = "iter insert remove copy getEditor constructor".split(" "); for (var mi in bt.prototype) bt.prototype.hasOwnProperty(mi) && de(du, mi) < 0 && (Qe .prototype[mi] = function(e) { return function() { return e.apply(this.doc, arguments) } }(bt.prototype[mi])); return Ge(bt), Qe.inputStyles = { textarea: _e, contenteditable: ke }, Qe.defineMode = function(e) { !Qe.defaults.mode && e != "null" && (Qe.defaults.mode = e), zr.apply(this, arguments) }, Qe.defineMIME = jn, Qe.defineMode("null", function() { return { token: function(e) { return e.skipToEnd() } } }), Qe.defineMIME("text/plain", "null"), Qe.defineExtension = function(e, n) { Qe.prototype[e] = n }, Qe.defineDocExtension = function(e, n) { bt.prototype[e] = n }, Qe.fromTextArea = uu, fu(Qe), Qe.version = "5.65.9", Qe }) }(codemirror)), codemirror.exports } var codemirrorExports = requireCodemirror(); (function(A, C) { (function(l) { l(requireCodemirror()) })(function(l) { l.defineMode("javascript", function(o, t) { var s = o.indentUnit, d = t.statementIndent, u = t.jsonld, f = t.json || u, c = t.trackScope !== !1, m = t.typescript, p = t.wordCharacters || /[\w$\xa1-\uffff]/, b = function() { function W(rt) { return { type: rt, style: "keyword" } } var K = W("keyword a"), X = W("keyword b"), re = W("keyword c"), Pe = W("keyword d"), $e = W("operator"), Ue = { type: "atom", style: "atom" }; return { if: W("if"), while: K, with: K, else: X, do: X, try: X, finally: X, return: Pe, break: Pe, continue: Pe, new: W("new"), delete: re, void: re, throw: re, debugger: W("debugger"), var: W("var"), const: W("var"), let: W("var"), function: W("function"), catch: W("catch"), for: W("for"), switch: W("switch"), case: W("case"), default: W("default"), in: $e, typeof: $e, instanceof: $e, true: Ue, false: Ue, null: Ue, undefined: Ue, NaN: Ue, Infinity: Ue, this: W("this"), class: W("class"), super: W("atom"), yield: re, export: W("export"), import: W("import"), extends: re, await: re } }(), x = /[+\-*&%=<>!?|~^@]/, g = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; function y(W) { for (var K = !1, X, re = !1; (X = W.next()) != null;) { if (!K) { if (X == "/" && !re) return; X == "[" ? re = !0 : re && X == "]" && (re = !1) } K = !K && X == "\\" } } var S, w; function E(W, K, X) { return S = W, w = X, K } function I(W, K) { var X = W.next(); if (X == '"' || X == "'") return K.tokenize = D(X), K.tokenize(W, K); if (X == "." && W.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) return E("number", "number"); if (X == "." && W.match("..")) return E("spread", "meta"); if (/[\[\]{}\(\),;\:\.]/.test(X)) return E(X); if (X == "=" && W.eat(">")) return E("=>", "operator"); if (X == "0" && W.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) return E( "number", "number"); if (/\d/.test(X)) return W.match( /^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/), E("number", "number"); if (X == "/") return W.eat("*") ? (K.tokenize = R, R(W, K)) : W.eat("/") ? (W .skipToEnd(), E("comment", "comment")) : qt(W, K, 1) ? (y(W), W .match(/^\b(([gimyus])(?![gimyus]*\2))+\b/), E("regexp", "string-2") ) : (W.eat("="), E("operator", "operator", W.current())); if (X == "`") return K.tokenize = L, L(W, K); if (X == "#" && W.peek() == "!") return W.skipToEnd(), E("meta", "meta"); if (X == "#" && W.eatWhile(p)) return E("variable", "property"); if (X == "<" && W.match("!--") || X == "-" && W.match("->") && !/\S/.test(W .string.slice(0, W.start))) return W.skipToEnd(), E("comment", "comment"); if (x.test(X)) return (X != ">" || !K.lexical || K.lexical.type != ">") && (W .eat("=") ? (X == "!" || X == "=") && W.eat("=") : /[<>*+\-|&?]/ .test(X) && (W.eat(X), X == ">" && W.eat(X))), X == "?" && W.eat( ".") ? E(".") : E("operator", "operator", W.current()); if (p.test(X)) { W.eatWhile(p); var re = W.current(); if (K.lastType != ".") { if (b.propertyIsEnumerable(re)) { var Pe = b[re]; return E(Pe.type, Pe.style, re) } if (re == "async" && W.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, !1)) return E("async", "keyword", re) } return E("variable", "variable", re) } } function D(W) { return function(K, X) { var re = !1, Pe; if (u && K.peek() == "@" && K.match(g)) return X.tokenize = I, E( "jsonld-keyword", "meta"); for (; (Pe = K.next()) != null && !(Pe == W && !re);) re = !re && Pe == "\\"; return re || (X.tokenize = I), E("string", "string") } } function R(W, K) { for (var X = !1, re; re = W.next();) { if (re == "/" && X) { K.tokenize = I; break } X = re == "*" } return E("comment", "comment") } function L(W, K) { for (var X = !1, re; (re = W.next()) != null;) { if (!X && (re == "`" || re == "$" && W.eat("{"))) { K.tokenize = I; break } X = !X && re == "\\" } return E("quasi", "string-2", W.current()) } var B = "([{}])"; function j(W, K) { K.fatArrowAt && (K.fatArrowAt = null); var X = W.string.indexOf("=>", W.start); if (!(X < 0)) { if (m) { var re = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(W.string .slice(W.start, X)); re && (X = re.index) } for (var Pe = 0, $e = !1, Ue = X - 1; Ue >= 0; --Ue) { var rt = W.string.charAt(Ue), Ft = B.indexOf(rt); if (Ft >= 0 && Ft < 3) { if (!Pe) { ++Ue; break } if (--Pe == 0) { rt == "(" && ($e = !0); break } } else if (Ft >= 3 && Ft < 6) ++Pe; else if (p.test(rt)) $e = !0; else if (/["'\/`]/.test(rt)) for (;; --Ue) { if (Ue == 0) return; var Ne = W.string.charAt(Ue - 1); if (Ne == rt && W.string.charAt(Ue - 2) != "\\") { Ue--; break } } else if ($e && !Pe) { ++Ue; break } } $e && !Pe && (K.fatArrowAt = Ue) } } var z = { atom: !0, number: !0, variable: !0, string: !0, regexp: !0, this: !0, import: !0, "jsonld-keyword": !0 }; function U(W, K, X, re, Pe, $e) { this.indented = W, this.column = K, this.type = X, this.prev = Pe, this.info = $e, re != null && (this.align = re) } function N(W, K) { if (!c) return !1; for (var X = W.localVars; X; X = X.next) if (X.name == K) return !0; for (var re = W.context; re; re = re.prev) for (var X = re.vars; X; X = X.next) if (X.name == K) return !0 } function H(W, K, X, re, Pe) { var $e = W.cc; for (F.state = W, F.stream = Pe, F.marked = null, F.cc = $e, F.style = K, W .lexical.hasOwnProperty("align") || (W.lexical.align = !0);;) { var Ue = $e.length ? $e.pop() : f ? De : de; if (Ue(X, re)) { for (; $e.length && $e[$e.length - 1].lex;) $e.pop()(); return F.marked ? F.marked : X == "variable" && N(W, re) ? "variable-2" : K } } } var F = { state: null, column: null, marked: null, cc: null }; function V() { for (var W = arguments.length - 1; W >= 0; W--) F.cc.push(arguments[W]) } function M() { return V.apply(null, arguments), !0 } function k(W, K) { for (var X = K; X; X = X.next) if (X.name == W) return !0; return !1 } function G(W) { var K = F.state; if (F.marked = "def", !!c) { if (K.context) { if (K.lexical.info == "var" && K.context && K.context.block) { var X = J(W, K.context); if (X != null) { K.context = X; return } } else if (!k(W, K.localVars)) { K.localVars = new te(W, K.localVars); return } } t.globalVars && !k(W, K.globalVars) && (K.globalVars = new te(W, K .globalVars)) } } function J(W, K) { if (K) if (K.block) { var X = J(W, K.prev); return X ? X == K.prev ? K : new Z(X, K.vars, !0) : null } else return k(W, K.vars) ? K : new Z(K.prev, new te(W, K.vars), !1); else return null } function ee(W) { return W == "public" || W == "private" || W == "protected" || W == "abstract" || W == "readonly" } function Z(W, K, X) { this.prev = W, this.vars = K, this.block = X } function te(W, K) { this.name = W, this.next = K } var ue = new te("this", new te("arguments", null)); function ge() { F.state.context = new Z(F.state.context, F.state.localVars, !1), F.state .localVars = ue } function ve() { F.state.context = new Z(F.state.context, F.state.localVars, !0), F.state .localVars = null } ge.lex = ve.lex = !0; function ce() { F.state.localVars = F.state.context.vars, F.state.context = F.state.context.prev } ce.lex = !0; function le(W, K) { var X = function() { var re = F.state, Pe = re.indented; if (re.lexical.type == "stat") Pe = re.lexical.indented; else for (var $e = re.lexical; $e && $e.type == ")" && $e.align; $e = $e .prev) Pe = $e.indented; re.lexical = new U(Pe, F.stream.column(), W, null, re.lexical, K) }; return X.lex = !0, X } function oe() { var W = F.state; W.lexical.prev && (W.lexical.type == ")" && (W.indented = W.lexical.indented), W .lexical = W.lexical.prev) } oe.lex = !0; function se(W) { function K(X) { return X == W ? M() : W == ";" || X == "}" || X == ")" || X == "]" ? V() : M(K) } return K } function de(W, K) { return W == "var" ? M(le("vardef", K), Wt, se(";"), oe) : W == "keyword a" ? M( le("form"), pt, de, oe) : W == "keyword b" ? M(le("form"), de, oe) : W == "keyword d" ? F.stream.match(/^\s*$/, !1) ? M() : M(le("stat"), Je, se( ";"), oe) : W == "debugger" ? M(se(";")) : W == "{" ? M(le("}"), ve, He, oe, ce) : W == ";" ? M() : W == "if" ? (F.state.lexical.info == "else" && F.state.cc[F.state.cc.length - 1] == oe && F.state.cc.pop()(), M(le("form"), pt, de, oe, zn)) : W == "function" ? M(Jt) : W == "for" ? M(le("form"), ve, $r, de, ce, oe) : W == "class" || m && K == "interface" ? (F.marked = "keyword", M(le("form", W == "class" ? W : K), zr, oe)) : W == "variable" ? m && K == "declare" ? (F.marked = "keyword", M(de)) : m && ( K == "module" || K == "enum" || K == "type") && F.stream.match(/^\s*\w/, !1) ? (F.marked = "keyword", K == "enum" ? M(Wn) : K == "type" ? M(Ur, se("operator"), ne, se(";")) : M(le("form"), Et, se("{"), le("}"), He, oe, oe)) : m && K == "namespace" ? (F.marked = "keyword", M(le( "form"), De, de, oe)) : m && K == "abstract" ? (F.marked = "keyword", M( de)) : M(le("stat"), Lt) : W == "switch" ? M(le("form"), pt, se("{"), le("}", "switch"), ve, He, oe, oe, ce) : W == "case" ? M(De, se(":")) : W == "default" ? M(se(":")) : W == "catch" ? M(le("form"), ge, Le, de, oe, ce) : W == "export" ? M(le("stat"), An, oe) : W == "import" ? M(le( "stat"), an, oe) : W == "async" ? M(de) : K == "@" ? M(De, de) : V(le( "stat"), De, se(";"), oe) } function Le(W) { if (W == "(") return M(Vt, se(")")) } function De(W, K) { return Pt(W, K, !1) } function Fe(W, K) { return Pt(W, K, !0) } function pt(W) { return W != "(" ? V() : M(le(")"), Je, se(")"), oe) } function Pt(W, K, X) { if (F.state.fatArrowAt == F.stream.start) { var re = X ? At : jt; if (W == "(") return M(ge, le(")"), ze(Vt, ")"), oe, se("=>"), re, ce); if (W == "variable") return V(ge, Et, se("=>"), re, ce) } var Pe = X ? ct : ft; return z.hasOwnProperty(W) ? M(Pe) : W == "function" ? M(Jt, Pe) : W == "class" || m && K == "interface" ? (F.marked = "keyword", M(le("form"), yn, oe)) : W == "keyword c" || W == "async" ? M(X ? Fe : De) : W == "(" ? M( le(")"), Je, se(")"), oe, Pe) : W == "operator" || W == "spread" ? M(X ? Fe : De) : W == "[" ? M(le("]"), ln, oe, Pe) : W == "{" ? wt(Ot, "}", null, Pe) : W == "quasi" ? V(Me, Pe) : W == "new" ? M(pn(X)) : M() } function Je(W) { return W.match(/[;\}\)\],]/) ? V() : V(De) } function ft(W, K) { return W == "," ? M(Je) : ct(W, K, !1) } function ct(W, K, X) { var re = X == !1 ? ft : ct, Pe = X == !1 ? De : Fe; if (W == "=>") return M(ge, X ? At : jt, ce); if (W == "operator") return /\+\+|--/.test(K) || m && K == "!" ? M(re) : m && K == "<" && F.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, !1) ? M(le(">"), ze(ne, ">"), oe, re) : K == "?" ? M(De, se(":"), Pe) : M(Pe); if (W == "quasi") return V(Me, re); if (W != ";") { if (W == "(") return wt(Fe, ")", "call", re); if (W == ".") return M(Xt, re); if (W == "[") return M(le("]"), Je, se("]"), oe, re); if (m && K == "as") return F.marked = "keyword", M(ne, re); if (W == "regexp") return F.state.lastType = F.marked = "operator", F.stream .backUp(F.stream.pos - F.stream.start - 1), M(Pe) } } function Me(W, K) { return W != "quasi" ? V() : K.slice(K.length - 2) != "${" ? M(Me) : M(Je, gt) } function gt(W) { if (W == "}") return F.marked = "string-2", F.state.tokenize = L, M(Me) } function jt(W) { return j(F.stream, F.state), V(W == "{" ? de : De) } function At(W) { return j(F.stream, F.state), V(W == "{" ? de : Fe) } function pn(W) { return function(K) { return K == "." ? M(W ? Nt : Kt) : K == "variable" && m ? M(je, W ? ct : ft) : V(W ? Fe : De) } } function Kt(W, K) { if (K == "target") return F.marked = "keyword", M(ft) } function Nt(W, K) { if (K == "target") return F.marked = "keyword", M(ct) } function Lt(W) { return W == ":" ? M(oe, de) : V(ft, se(";"), oe) } function Xt(W) { if (W == "variable") return F.marked = "property", M() } function Ot(W, K) { if (W == "async") return F.marked = "property", M(Ot); if (W == "variable" || F.style == "keyword") { if (F.marked = "property", K == "get" || K == "set") return M(Ht); var X; return m && F.state.fatArrowAt == F.stream.start && (X = F.stream.match( /^\s*:\s*/, !1)) && (F.state.fatArrowAt = F.stream.pos + X[0] .length), M(nt) } else { if (W == "number" || W == "string") return F.marked = u ? "property" : F .style + " property", M(nt); if (W == "jsonld-keyword") return M(nt); if (m && ee(K)) return F.marked = "keyword", M(Ot); if (W == "[") return M(De, Ae, se("]"), nt); if (W == "spread") return M(Fe, nt); if (K == "*") return F.marked = "keyword", M(Ot); if (W == ":") return V(nt) } } function Ht(W) { return W != "variable" ? V(nt) : (F.marked = "property", M(Jt)) } function nt(W) { if (W == ":") return M(Fe); if (W == "(") return V(Jt) } function ze(W, K, X) { function re(Pe, $e) { if (X ? X.indexOf(Pe) > -1 : Pe == ",") { var Ue = F.state.lexical; return Ue.info == "call" && (Ue.pos = (Ue.pos || 0) + 1), M(function(rt, Ft) { return rt == K || Ft == K ? V() : V(W) }, re) } return Pe == K || $e == K ? M() : X && X.indexOf(";") > -1 ? V(W) : M(se(K)) } return function(Pe, $e) { return Pe == K || $e == K ? M() : V(W, re) } } function wt(W, K, X) { for (var re = 3; re < arguments.length; re++) F.cc.push(arguments[re]); return M(le(K, X), ze(W, K), oe) } function He(W) { return W == "}" ? M() : V(de, He) } function Ae(W, K) { if (m) { if (W == ":") return M(ne); if (K == "?") return M(Ae) } } function me(W, K) { if (m && (W == ":" || K == "in")) return M(ne) } function Re(W) { if (m && W == ":") return F.stream.match(/^\s*\w+\s+is\b/, !1) ? M(De, xe, ne) : M(ne) } function xe(W, K) { if (K == "is") return F.marked = "keyword", M() } function ne(W, K) { if (K == "keyof" || K == "typeof" || K == "infer" || K == "readonly") return F .marked = "keyword", M(K == "typeof" ? Fe : ne); if (W == "variable" || K == "void") return F.marked = "type", M(Ge); if (K == "|" || K == "&") return M(ne); if (W == "string" || W == "number" || W == "atom") return M(Ge); if (W == "[") return M(le("]"), ze(ne, "]", ","), oe, Ge); if (W == "{") return M(le("}"), Se, oe, Ge); if (W == "(") return M(ze(Ke, ")"), Te, Ge); if (W == "<") return M(ze(ne, ">"), ne); if (W == "quasi") return V(Oe, Ge) } function Te(W) { if (W == "=>") return M(ne) } function Se(W) { return W.match(/[\}\)\]]/) ? M() : W == "," || W == ";" ? M(Se) : V(be, Se) } function be(W, K) { if (W == "variable" || F.style == "keyword") return F.marked = "property", M( be); if (K == "?" || W == "number" || W == "string") return M(be); if (W == ":") return M(ne); if (W == "[") return M(se("variable"), me, se("]"), be); if (W == "(") return V(Zt, be); if (!W.match(/[;\}\)\],]/)) return M() } function Oe(W, K) { return W != "quasi" ? V() : K.slice(K.length - 2) != "${" ? M(Oe) : M(ne, xt) } function xt(W) { if (W == "}") return F.marked = "string-2", F.state.tokenize = L, M(Oe) } function Ke(W, K) { return W == "variable" && F.stream.match(/^\s*[?:]/, !1) || K == "?" ? M(Ke) : W == ":" ? M(ne) : W == "spread" ? M(Ke) : V(ne) } function Ge(W, K) { if (K == "<") return M(le(">"), ze(ne, ">"), oe, Ge); if (K == "|" || W == "." || K == "&") return M(ne); if (W == "[") return M(ne, se("]"), Ge); if (K == "extends" || K == "implements") return F.marked = "keyword", M(ne); if (K == "?") return M(ne, se(":"), ne) } function je(W, K) { if (K == "<") return M(le(">"), ze(ne, ">"), oe, Ge) } function $t() { return V(ne, gn) } function gn(W, K) { if (K == "=") return M(ne) } function Wt(W, K) { return K == "enum" ? (F.marked = "keyword", M(Wn)) : V(Et, Ae, Ut, Ai) } function Et(W, K) { if (m && ee(K)) return F.marked = "keyword", M(Et); if (W == "variable") return G(K), M(); if (W == "spread") return M(Et); if (W == "[") return wt(yi, "]"); if (W == "{") return wt(sr, "}") } function sr(W, K) { return W == "variable" && !F.stream.match(/^\s*:/, !1) ? (G(K), M(Ut)) : (W == "variable" && (F.marked = "property"), W == "spread" ? M(Et) : W == "}" ? V() : W == "[" ? M(De, se("]"), se(":"), sr) : M(se(":"), Et, Ut)) } function yi() { return V(Et, Ut) } function Ut(W, K) { if (K == "=") return M(Fe) } function Ai(W) { if (W == ",") return M(Wt) } function zn(W, K) { if (W == "keyword b" && K == "else") return M(le("form", "else"), de, oe) } function $r(W, K) { if (K == "await") return M($r); if (W == "(") return M(le(")"), ur, oe) } function ur(W) { return W == "var" ? M(Wt, mn) : W == "variable" ? M(mn) : V(mn) } function mn(W, K) { return W == ")" ? M() : W == ";" ? M(mn) : K == "in" || K == "of" ? (F.marked = "keyword", M(De, mn)) : V(De, mn) } function Jt(W, K) { if (K == "*") return F.marked = "keyword", M(Jt); if (W == "variable") return G(K), M(Jt); if (W == "(") return M(ge, le(")"), ze(Vt, ")"), oe, Re, de, ce); if (m && K == "<") return M(le(">"), ze($t, ">"), oe, Jt) } function Zt(W, K) { if (K == "*") return F.marked = "keyword", M(Zt); if (W == "variable") return G(K), M(Zt); if (W == "(") return M(ge, le(")"), ze(Vt, ")"), oe, Re, ce); if (m && K == "<") return M(le(">"), ze($t, ">"), oe, Zt) } function Ur(W, K) { if (W == "keyword" || W == "variable") return F.marked = "type", M(Ur); if (K == "<") return M(le(">"), ze($t, ">"), oe) } function Vt(W, K) { return K == "@" && M(De, Vt), W == "spread" ? M(Vt) : m && ee(K) ? (F.marked = "keyword", M(Vt)) : m && W == "this" ? M(Ae, Ut) : V(Et, Ae, Ut) } function yn(W, K) { return W == "variable" ? zr(W, K) : jn(W, K) } function zr(W, K) { if (W == "variable") return G(K), M(jn) } function jn(W, K) { if (K == "<") return M(le(">"), ze($t, ">"), oe, jn); if (K == "extends" || K == "implements" || m && W == ",") return K == "implements" && (F.marked = "keyword"), M(m ? ne : De, jn); if (W == "{") return M(le("}"), It, oe) } function It(W, K) { if (W == "async" || W == "variable" && (K == "static" || K == "get" || K == "set" || m && ee(K)) && F.stream.match(/^\s+[\w$\xa1-\uffff]/, !1)) return F.marked = "keyword", M(It); if (W == "variable" || F.style == "keyword") return F.marked = "property", M(rn, It); if (W == "number" || W == "string") return M(rn, It); if (W == "[") return M(De, Ae, se("]"), rn, It); if (K == "*") return F.marked = "keyword", M(It); if (m && W == "(") return V(Zt, It); if (W == ";" || W == ",") return M(It); if (W == "}") return M(); if (K == "@") return M(De, It) } function rn(W, K) { if (K == "!" || K == "?") return M(rn); if (W == ":") return M(ne, Ut); if (K == "=") return M(Fe); var X = F.state.lexical.prev, re = X && X.info == "interface"; return V(re ? Zt : Jt) } function An(W, K) { return K == "*" ? (F.marked = "keyword", M(Ce, se(";"))) : K == "default" ? (F .marked = "keyword", M(De, se(";"))) : W == "{" ? M(ze(jr, "}"), Ce, se( ";")) : V(de) } function jr(W, K) { if (K == "as") return F.marked = "keyword", M(se("variable")); if (W == "variable") return V(Fe, jr) } function an(W) { return W == "string" ? M() : W == "(" ? V(De) : W == "." ? V(ft) : V(xn, fr, Ce) } function xn(W, K) { return W == "{" ? wt(xn, "}") : (W == "variable" && G(K), K == "*" && (F .marked = "keyword"), M(Ze)) } function fr(W) { if (W == ",") return M(xn, fr) } function Ze(W, K) { if (K == "as") return F.marked = "keyword", M(xn) } function Ce(W, K) { if (K == "from") return F.marked = "keyword", M(De) } function ln(W) { return W == "]" ? M() : V(ze(Fe, "]")) } function Wn() { return V(le("form"), Et, se("{"), le("}"), ze(zt, "}"), oe, oe) } function zt() { return V(Et, Ut) } function We(W, K) { return W.lastType == "operator" || W.lastType == "," || x.test(K.charAt(0)) || /[,.]/.test(K.charAt(0)) } function qt(W, K, X) { return K.tokenize == I && /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/ .test(K.lastType) || K.lastType == "quasi" && /\{\s*$/.test(W.string.slice( 0, W.pos - (X || 0))) } return { startState: function(W) { var K = { tokenize: I, lastType: "sof", cc: [], lexical: new U((W || 0) - s, 0, "block", !1), localVars: t.localVars, context: t.localVars && new Z(null, null, !1), indented: W || 0 }; return t.globalVars && typeof t.globalVars == "object" && (K .globalVars = t.globalVars), K }, token: function(W, K) { if (W.sol() && (K.lexical.hasOwnProperty("align") || (K.lexical .align = !1), K.indented = W.indentation(), j(W, K)), K .tokenize != R && W.eatSpace()) return null; var X = K.tokenize(W, K); return S == "comment" ? X : (K.lastType = S == "operator" && (w == "++" || w == "--") ? "incdec" : S, H(K, X, S, w, W)) }, indent: function(W, K) { if (W.tokenize == R || W.tokenize == L) return l.Pass; if (W.tokenize != I) return 0; var X = K && K.charAt(0), re = W.lexical, Pe; if (!/^\s*else\b/.test(K)) for (var $e = W.cc.length - 1; $e >= 0; --$e) { var Ue = W.cc[$e]; if (Ue == oe) re = re.prev; else if (Ue != zn && Ue != ce) break } for (; (re.type == "stat" || re.type == "form") && (X == "}" || (Pe = W.cc[ W.cc.length - 1]) && (Pe == ft || Pe == ct) && ! /^[,\.=+\-*:?[\(]/.test(K));) re = re.prev; d && re.type == ")" && re.prev.type == "stat" && (re = re.prev); var rt = re.type, Ft = X == rt; return rt == "vardef" ? re.indented + (W.lastType == "operator" || W .lastType == "," ? re.info.length + 1 : 0) : rt == "form" && X == "{" ? re.indented : rt == "form" ? re.indented + s : rt == "stat" ? re.indented + (We(W, K) ? d || s : 0) : re.info == "switch" && !Ft && t.doubleIndentSwitch != !1 ? re.indented + ( /^(?:case|default)\b/.test(K) ? s : 2 * s) : re.align ? re .column + (Ft ? 0 : 1) : re.indented + (Ft ? 0 : s) }, electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, blockCommentStart: f ? null : "/*", blockCommentEnd: f ? null : "*/", blockCommentContinue: f ? null : " * ", lineComment: f ? null : "//", fold: "brace", closeBrackets: "()[]{}''\"\"``", helperType: f ? "json" : "javascript", jsonldMode: u, jsonMode: f, expressionAllowed: qt, skipExpression: function(W) { H(W, "atom", "atom", "true", new l.StringStream("", 2, null)) } } }), l.registerHelper("wordChars", "javascript", /[\w$]/), l.defineMIME("text/javascript", "javascript"), l.defineMIME("text/ecmascript", "javascript"), l.defineMIME( "application/javascript", "javascript"), l.defineMIME("application/x-javascript", "javascript"), l.defineMIME("application/ecmascript", "javascript"), l.defineMIME( "application/json", { name: "javascript", json: !0 }), l.defineMIME("application/x-json", { name: "javascript", json: !0 }), l.defineMIME("application/manifest+json", { name: "javascript", json: !0 }), l.defineMIME("application/ld+json", { name: "javascript", jsonld: !0 }), l.defineMIME("text/typescript", { name: "javascript", typescript: !0 }), l.defineMIME("application/typescript", { name: "javascript", typescript: !0 }) }) })(); const Struct_vue_vue_type_style_index_0_lang = "", _sfc_main$5 = vue.defineComponent({ name: "Struct", props: { modelValue: [Object, Array], title: { type: String, default: "\u7F16\u8F91\u6570\u636E" }, defaultValue: { require: !1 }, validate: Function }, data() { return { editor: null, visible: !1, err: !1, oldVal: null } }, watch: { modelValue() { this.load() }, visible(A) { A ? this.load() : this.err = !1 } }, methods: { load() { const A = toJSON(this.modelValue ? deepParseFn(deepCopy(this.modelValue)) : this .defaultValue); this.oldVal = A, this.$nextTick(() => { this.editor = codemirrorExports(this.$refs.editor, { lineNumbers: !0, mode: "javascript", gutters: ["CodeMirror-lint-markers"], lint: !0, line: !0, tabSize: 2, lineWrapping: !0, value: A || "" }) }) }, onOk() { if (this.err) return; const str = this.editor.getValue(); let val; try { val = eval("(function (){return " + str + "}())") } catch (A) { this.err = ` (${A})`; return } if (this.validate && this.validate(val) === !1) { this.err = !0; return } this.visible = !1, toJSON(val) !== this.oldVal && this.$emit("update:modelValue", val) } } }), _hoisted_1$3 = { class: "_fc_struct" }, _hoisted_2$1 = { key: 0, ref: "editor" }, _hoisted_3$1 = { slot: "footer", class: "dialog-footer" }, _hoisted_4 = { key: 0, class: "_fc_err" }; function _sfc_render$4(A, C, l, o, t, s) { const d = vue.resolveComponent("ElButton"), u = vue.resolveComponent("ElDialog"); return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [vue.createVNode(d, { onClick: C[0] || (C[0] = f => A.visible = !0), style: { width: "100%" } }, { default: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(A.title), 1)]), _: 1 }), vue.createVNode(u, { title: A.title, modelValue: A.visible, "onUpdate:modelValue": C[2] || (C[2] = f => A.visible = f), "close-on-click-modal": !1, "append-to-body": "" }, { default: vue.withCtx(() => [A.visible ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, null, 512)) : vue.createCommentVNode("", !0), vue .createElementVNode("span", _hoisted_3$1, [A.err ? (vue.openBlock(), vue .createElementBlock("span", _hoisted_4, " \u8F93\u5165\u5185\u5BB9\u683C\u5F0F\u6709\u8BEF" + vue .toDisplayString(A.err !== !0 ? A.err : ""), 1)) : vue .createCommentVNode("", !0), vue.createVNode(d, { onClick: C[1] || (C[1] = f => A.visible = !1), size: "small" }, { default: vue.withCtx(() => [vue.createTextVNode( "\u53D6 \u6D88")]), _: 1 }), vue.createVNode(d, { type: "primary", onClick: A.onOk, size: "small" }, { default: vue.withCtx(() => [vue.createTextVNode( "\u786E \u5B9A")]), _: 1 }, 8, ["onClick"]) ]) ]), _: 1 }, 8, ["title", "modelValue"])]) } const Struct = _export_sfc(_sfc_main$5, [ ["render", _sfc_render$4] ]); function debounce(A, C) { var l = null; return function(...o) { l !== null && clearTimeout(l), l = setTimeout(() => A.call(this, ...o), C) } } const Fetch_vue_vue_type_style_index_0_lang = "", _sfc_main$4 = vue.defineComponent({ name: "Fetch", props: { modelValue: [Object, String], to: String }, components: { DragForm: designerForm.$form() }, computed: { formValue() { const A = this.modelValue; return A ? is.String(A) ? { action: A } : !A._parse && A.parse ? { ...A, _parse: "" + A.parse } : is.Function(A._parse) ? { ...A, _parse: "" + A._parse } : A : {} } }, data() { return { api: {}, fetch: {}, option: { form: { labelPosition: "right", size: "small", labelWidth: "90px" }, submitBtn: !1 }, rule: [{ type: "input", field: "action", title: "\u63A5\u53E3: ", validate: [{ required: !0, message: "\u8BF7\u6570\u636E\u63A5\u53E3" }] }, { type: "select", field: "method", title: "\u8BF7\u6C42\u65B9\u5F0F: ", value: "GET", options: [{ label: "GET", value: "GET" }, { label: "POST", value: "POST" }], control: [{ value: "POST", rule: [{ type: "select", field: "dataType", title: "\u63D0\u4EA4\u65B9\u5F0F: ", value: "FormData", options: [{ label: "FormData", value: "FormData" }, { label: "JSON", value: "JSON" }] }] }] }, { type: "Struct", field: "data", title: "\u9644\u5E26\u6570\u636E: ", value: {}, props: { defaultValue: {} } }, { type: "Struct", field: "headers", title: "header\u4FE1\u606F: ", value: {}, props: { defaultValue: {} } }, { type: "input", field: "_parse", title: "\u89E3\u6790\u51FD\u6570", info: "\u89E3\u6790\u63A5\u53E3\u6570\u636E\uFF0C\u8FD4\u56DE\u7EC4\u4EF6\u6240\u9700\u7684\u6570\u636E\u7ED3\u6784", value: `function (res){ return res.data; }`, props: { type: "textarea", rows: 8 }, validate: [{ validator: (A, C, l) => { if (!C) return l(); try { this.parseFn(C) } catch { return l(!1) } l() }, message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u89E3\u6790\u51FD\u6570" }] }] } }, methods: { parseFn(v) { return eval(`(function () { return ${v} })()`) }, _input() { this.api.submit(A => { A.to = this.to || "options", A._parse && (A.parse = this.parseFn(A._parse)), this.$emit("update:modelValue", A) }) }, input: debounce(function() { this._input() }, 1e3) }, mounted() { this._input() } }), _hoisted_1$2 = { class: "_fc_fetch" }; function _sfc_render$3(A, C, l, o, t, s) { const d = vue.resolveComponent("DragForm"); return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [vue.createVNode(d, { api: A.api, "onUpdate:api": C[0] || (C[0] = u => A.api = u), modelValue: A.formValue, rule: A.rule, option: A.option, onChange: A.input }, null, 8, ["api", "modelValue", "rule", "option", "onChange"])]) } const Fetch = _export_sfc(_sfc_main$4, [ ["render", _sfc_render$3] ]), Validate_vue_vue_type_style_index_0_lang = "", _sfc_main$3 = vue.defineComponent({ name: "Validate", inject: ["designer"], props: { modelValue: Array }, components: { DragForm: designerForm.$form() }, watch: { modelValue(A) { this.formValue = this.parseValue(A) } }, data() { return { formValue: {}, option: { form: { labelPosition: "top", size: "small", labelWidth: "90px" }, submitBtn: !1, formData: this.parseValue(this.modelValue) }, rule: [{ type: "select", field: "type", value: "", title: "\u5B57\u6BB5\u7C7B\u578B", options: [{ value: "", label: "\u8BF7\u9009\u62E9" }, { value: "string", label: "String" }, { value: "array", label: "Array" }, { value: "number", label: "Number" }, { value: "integer", label: "Integer" }, { value: "float", label: "Float" }, { value: "object", label: "Object" }, { value: "date", label: "Date" }, { value: "url", label: "url" }, { value: "hex", label: "hex" }, { value: "email", label: "email" }], control: [{ handle: A => !!A, rule: [{ type: "group", field: "validate", props: { expand: 1, rule: [{ type: "select", title: "\u89E6\u53D1\u65B9\u5F0F", field: "trigger", value: "change", options: [{ label: "change", value: "change" }, { label: "submit", value: "submit" }, { label: "blur", value: "blur" }] }, { type: "select", title: "\u9A8C\u8BC1\u65B9\u5F0F", field: "mode", options: [{ value: "required", label: "\u5FC5\u586B" }, { value: "pattern", label: "\u6B63\u5219\u8868\u8FBE\u5F0F" }, { value: "min", label: "\u6700\u5C0F\u503C" }, { value: "max", label: "\u6700\u5927\u503C" }, { value: "len", label: "\u957F\u5EA6" }], value: "required", control: [{ value: "required", rule: [{ type: "hidden", field: "required", value: !0 }] }, { value: "pattern", rule: [{ type: "input", field: "pattern", title: "\u6B63\u5219\u8868\u8FBE\u5F0F" }] }, { value: "min", rule: [{ type: "inputNumber", field: "min", title: "\u6700\u5C0F\u503C" }] }, { value: "max", rule: [{ type: "inputNumber", field: "max", title: "\u6700\u5927\u503C" }] }, { value: "len", rule: [{ type: "inputNumber", field: "len", title: "\u957F\u5EA6" }] }] }, { type: "input", title: "\u9519\u8BEF\u4FE1\u606F", field: "message", value: "", children: [{ type: "span", slot: "append", inject: !0, class: "append-msg", on: { click: A => { if (this .designer .activeRule ) { let C = "\u8BF7\u8F93\u5165"; A.api.form .mode !== "required" && (C += "\u6B63\u786E\u7684" ), C += this .designer .activeRule .title, A.api .setValue( "message", C) } } }, children: [ "\u81EA\u52A8\u83B7\u53D6" ] }] }] }, value: [] }] }] }] } }, methods: { onInput: function(A) { let C = []; const { validate: l, type: o } = A; o && (!l || !l.length) || (o && (l.forEach(t => { t.type = o }), C = [...l]), this.$emit("update:modelValue", C)) }, parseValue(A) { let C = { validate: A ? [...A] : [], type: A.length ? A[0].type : void 0 }; return C.validate.forEach(l => { l.mode || Object.keys(l).forEach(o => { ["message", "type", "trigger", "mode"].indexOf(o) < 0 && (l.mode = o) }) }), C } } }); function _sfc_render$2(A, C, l, o, t, s) { const d = vue.resolveComponent("DragForm"); return vue.openBlock(), vue.createBlock(d, { class: "_fc-validate", rule: A.rule, option: A.option, modelValue: A.formValue, "onUpdate:modelValue": A.onInput }, null, 8, ["rule", "option", "modelValue", "onUpdate:modelValue"]) } const Validate = _export_sfc(_sfc_main$3, [ ["render", _sfc_render$2] ]), _sfc_main$2 = vue.defineComponent({ name: "DragBox", props: ["rule", "tag", "formCreateInject"], render(A) { const C = { ...A.$props.rule.props, ...A.$attrs }; let l = C.tag + "-drag drag-box"; Object.keys(A.$slots).length || (l += " " + C.tag + "-holder"), C.class = l, C.modelValue = [... this.$props.formCreateInject.children ]; const o = {}; return A.$slots.default && A.$slots.default().forEach(s => { s.key && (o[s.key] = s) }), vue.h(vue.resolveComponent("draggable"), C, { item: ({ element: t }) => vue.h("div", {}, o[t.__fc__.key + "fc"]) }) } }), Required_vue_vue_type_style_index_0_lang = "", _sfc_main$1 = vue.defineComponent({ name: "Required", props: { modelValue: {} }, watch: { required() { this.update() }, requiredMsg() { this.update() }, modelValue(A) { const C = is.String(A); this.required = A === void 0 ? !1 : C ? !0 : !!A, this.requiredMsg = C ? A : "" } }, data() { const A = is.String(this.modelValue); return { required: this.modelValue === void 0 ? !1 : A ? !0 : !!this.modelValue, requiredMsg: A ? this.modelValue : "" } }, methods: { update() { let A; this.required === !1 ? A = !1 : A = this.requiredMsg, this.$emit("update:modelValue", A) } } }), _hoisted_1$1 = { class: "_fc-required" }; function _sfc_render$1(A, C, l, o, t, s) { const d = vue.resolveComponent("ElSwitch"), u = vue.resolveComponent("ElInput"); return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [vue.createVNode(d, { modelValue: A.required, "onUpdate:modelValue": C[0] || (C[0] = f => A.required = f) }, null, 8, ["modelValue"]), A.required ? (vue.openBlock(), vue.createBlock(u, { key: 0, modelValue: A.requiredMsg, "onUpdate:modelValue": C[1] || (C[1] = f => A.requiredMsg = f), placeholder: "\u8BF7\u8F93\u5165\u63D0\u793A\u8BED" }, null, 8, ["modelValue"])) : vue.createCommentVNode("", !0)]) } const Required = _export_sfc(_sfc_main$1, [ ["render", _sfc_render$1] ]), TableOptions_vue_vue_type_style_index_0_scoped_0238cdc7_lang = "", _sfc_main = vue.defineComponent({ name: "TableOptions", inheritAttrs: !1, props: { modelValue: [Object, Array, String] }, data() { return { column: [{ label: "label", key: "label" }, { label: "value", key: "value" }] } }, created() { Array.isArray(this.modelValue) || this.$emit("input", []) }, methods: { onInput(A) { A.label && A.value && this.input() }, input() { this.$emit("update:modelValue", this.modelValue) }, add() { this.modelValue.push(this.column.reduce((A, C) => (A[C.key] = "", A), {})) }, del(A) { this.modelValue.splice(A, 1), this.input(this.modelValue) } } }), _withScopeId = A => (vue.pushScopeId("data-v-0238cdc7"), A = A(), vue.popScopeId(), A), _hoisted_1 = { class: "_fc_table_opt" }, _hoisted_2 = ["onClick"], _hoisted_3 = _withScopeId(() => vue.createElementVNode("i", { class: "fc-icon icon-add" }, null, -1)); function _sfc_render(A, C, l, o, t, s) { const d = vue.resolveComponent("el-input"), u = vue.resolveComponent("el-table-column"), f = vue.resolveComponent("el-table"), c = vue.resolveComponent("el-button"); return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [vue.createVNode(f, { data: A.modelValue, border: "", size: "small", style: { width: "100%" } }, { default: vue.withCtx(() => [(vue.openBlock(!0), vue.createElementBlock(vue.Fragment, null, vue.renderList(A.column, (m, p) => (vue.openBlock(), vue .createBlock(u, { key: m.label + p, label: m.label }, { default: vue.withCtx(b => [vue.createVNode(d, { size: "small", modelValue: b.row[m.key] || "", "onOnUpdate:modelValue": x => (b .row[m.key] = x, A .onInput(b.row)) }, null, 8, ["modelValue", "onOnUpdate:modelValue" ])]), _: 2 }, 1032, ["label"]))), 128)), vue.createVNode(u, { "min-width": "35", align: "center", fixed: "right", label: "\u64CD\u4F5C" }, { default: vue.withCtx(m => [vue.createElementVNode("i", { class: "fc-icon icon-delete", onClick: p => A.del(m.$index) }, null, 8, _hoisted_2)]), _: 1 })]), _: 1 }, 8, ["data"]), vue.createVNode(c, { link: "", type: "primary", onClick: A.add }, { default: vue.withCtx(() => [_hoisted_3, vue.createTextVNode(" \u6DFB\u52A0 ")]), _: 1 }, 8, ["onClick"])]) } const TableOptions = _export_sfc(_sfc_main, [ ["render", _sfc_render], ["__scopeId", "data-v-0238cdc7"] ]); /*! * @form-create/component-wangeditor v3.1.2 * (c) 2018-2022 xaboy * Github https://github.com/xaboy/form-create with wangeditor * Released under the MIT License. */ function ownKeys(A, C) { var l = Object.keys(A); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(A); C && (o = o.filter(function(t) { return Object.getOwnPropertyDescriptor(A, t).enumerable })), l.push.apply(l, o) } return l } function _objectSpread2(A) { for (var C = 1; C < arguments.length; C++) { var l = arguments[C] != null ? arguments[C] : {}; C % 2 ? ownKeys(Object(l), !0).forEach(function(o) { _defineProperty(A, o, l[o]) }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(A, Object.getOwnPropertyDescriptors( l)) : ownKeys(Object(l)).forEach(function(o) { Object.defineProperty(A, o, Object.getOwnPropertyDescriptor(l, o)) }) } return A } function _typeof(A) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? _typeof = function(C) { return typeof C } : _typeof = function(C) { return C && typeof Symbol == "function" && C.constructor === Symbol && C !== Symbol.prototype ? "symbol" : typeof C }, _typeof(A) } function _defineProperty(A, C, l) { return C in A ? Object.defineProperty(A, C, { value: l, enumerable: !0, configurable: !0, writable: !0 }) : A[C] = l, A } function getDefaultExportFromCjs(A) { return A && A.__esModule && Object.prototype.hasOwnProperty.call(A, "default") ? A.default : A } var wangEditor = { exports: {} }; (function(A, C) { (function(o, t) { A.exports = t() })(window, function() { return function(l) { var o = {}; function t(s) { if (o[s]) return o[s].exports; var d = o[s] = { i: s, l: !1, exports: {} }; return l[s].call(d.exports, d, d.exports, t), d.l = !0, d.exports } return t.m = l, t.c = o, t.d = function(s, d, u) { t.o(s, d) || Object.defineProperty(s, d, { enumerable: !0, get: u }) }, t.r = function(s) { typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(s, Symbol .toStringTag, { value: "Module" }), Object.defineProperty(s, "__esModule", { value: !0 }) }, t.t = function(s, d) { if (d & 1 && (s = t(s)), d & 8 || d & 4 && _typeof(s) === "object" && s && s .__esModule) return s; var u = Object.create(null); if (t.r(u), Object.defineProperty(u, "default", { enumerable: !0, value: s }), d & 2 && typeof s != "string") for (var f in s) t.d(u, f, function(c) { return s[c] }.bind(null, f)); return u }, t.n = function(s) { var d = s && s.__esModule ? function() { return s.default } : function() { return s }; return t.d(d, "a", d), d }, t.o = function(s, d) { return Object.prototype.hasOwnProperty.call(s, d) }, t.p = "", t(t.s = 141) }([function(l, o) { function t(s) { return s && s.__esModule ? s : { default: s } } l.exports = t }, function(l, o, t) { l.exports = t(142) }, function(l, o, t) { t.r(o), t.d(o, "__extends", function() { return d }), t.d(o, "__assign", function() { return u }), t.d(o, "__rest", function() { return f }), t.d(o, "__decorate", function() { return c }), t.d(o, "__param", function() { return m }), t.d(o, "__metadata", function() { return p }), t.d(o, "__awaiter", function() { return b }), t.d(o, "__generator", function() { return x }), t.d(o, "__createBinding", function() { return g }), t.d(o, "__exportStar", function() { return y }), t.d(o, "__values", function() { return S }), t.d(o, "__read", function() { return w }), t.d(o, "__spread", function() { return E }), t.d(o, "__spreadArrays", function() { return I }), t.d(o, "__spreadArray", function() { return D }), t.d(o, "__await", function() { return R }), t.d(o, "__asyncGenerator", function() { return L }), t.d(o, "__asyncDelegator", function() { return B }), t.d(o, "__asyncValues", function() { return j }), t.d(o, "__makeTemplateObject", function() { return z }), t.d(o, "__importStar", function() { return N }), t.d(o, "__importDefault", function() { return H }), t.d(o, "__classPrivateFieldGet", function() { return F }), t.d(o, "__classPrivateFieldSet", function() { return V }); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var s = function(k, G) { return s = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(J, ee) { J.__proto__ = ee } || function(J, ee) { for (var Z in ee) Object.prototype.hasOwnProperty.call(ee, Z) && (J[Z] = ee[Z]) }, s(k, G) }; function d(M, k) { if (typeof k != "function" && k !== null) throw new TypeError( "Class extends value " + String(k) + " is not a constructor or null"); s(M, k); function G() { this.constructor = M } M.prototype = k === null ? Object.create(k) : (G.prototype = k.prototype, new G) } var u = function() { return u = Object.assign || function(G) { for (var J, ee = 1, Z = arguments.length; ee < Z; ee++) { J = arguments[ee]; for (var te in J) Object.prototype.hasOwnProperty.call(J, te) && (G[te] = J[te]) } return G }, u.apply(this, arguments) }; function f(M, k) { var G = {}; for (var J in M) Object.prototype.hasOwnProperty.call(M, J) && k.indexOf( J) < 0 && (G[J] = M[J]); if (M != null && typeof Object.getOwnPropertySymbols == "function") for (var ee = 0, J = Object.getOwnPropertySymbols(M); ee < J .length; ee++) k.indexOf(J[ee]) < 0 && Object.prototype .propertyIsEnumerable.call(M, J[ee]) && (G[J[ee]] = M[J[ee]]); return G } function c(M, k, G, J) { var ee = arguments.length, Z = ee < 3 ? k : J === null ? J = Object.getOwnPropertyDescriptor(k, G) : J, te; if ((typeof Reflect > "u" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate == "function") Z = Reflect.decorate(M, k, G, J); else for (var ue = M.length - 1; ue >= 0; ue--)(te = M[ue]) && (Z = (ee < 3 ? te(Z) : ee > 3 ? te(k, G, Z) : te(k, G)) || Z); return ee > 3 && Z && Object.defineProperty(k, G, Z), Z } function m(M, k) { return function(G, J) { k(G, J, M) } } function p(M, k) { if ((typeof Reflect > "u" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata == "function") return Reflect.metadata(M, k) } function b(M, k, G, J) { function ee(Z) { return Z instanceof G ? Z : new G(function(te) { te(Z) }) } return new(G || (G = Promise))(function(Z, te) { function ue(ce) { try { ve(J.next(ce)) } catch (le) { te(le) } } function ge(ce) { try { ve(J.throw(ce)) } catch (le) { te(le) } } function ve(ce) { ce.done ? Z(ce.value) : ee(ce.value).then(ue, ge) } ve((J = J.apply(M, k || [])).next()) }) } function x(M, k) { var G = { label: 0, sent: function() { if (Z[0] & 1) throw Z[1]; return Z[1] }, trys: [], ops: [] }, J, ee, Z, te; return te = { next: ue(0), throw: ue(1), return: ue(2) }, typeof Symbol == "function" && (te[Symbol.iterator] = function() { return this }), te; function ue(ve) { return function(ce) { return ge([ve, ce]) } } function ge(ve) { if (J) throw new TypeError("Generator is already executing."); for (; G;) try { if (J = 1, ee && (Z = ve[0] & 2 ? ee.return : ve[0] ? ee .throw || ((Z = ee.return) && Z.call(ee), 0) : ee.next ) && !(Z = Z.call(ee, ve[1])).done) return Z; switch (ee = 0, Z && (ve = [ve[0] & 2, Z.value]), ve[0]) { case 0: case 1: Z = ve; break; case 4: return G.label++, { value: ve[1], done: !1 }; case 5: G.label++, ee = ve[1], ve = [0]; continue; case 7: ve = G.ops.pop(), G.trys.pop(); continue; default: if (Z = G.trys, !(Z = Z.length > 0 && Z[Z.length - 1]) && (ve[0] === 6 || ve[0] === 2)) { G = 0; continue } if (ve[0] === 3 && (!Z || ve[1] > Z[0] && ve[1] < Z[ 3])) { G.label = ve[1]; break } if (ve[0] === 6 && G.label < Z[1]) { G.label = Z[1], Z = ve; break } if (Z && G.label < Z[2]) { G.label = Z[2], G.ops.push(ve); break } Z[2] && G.ops.pop(), G.trys.pop(); continue } ve = k.call(M, G) } catch (ce) { ve = [6, ce], ee = 0 } finally { J = Z = 0 } if (ve[0] & 5) throw ve[1]; return { value: ve[0] ? ve[1] : void 0, done: !0 } } } var g = Object.create ? function(M, k, G, J) { J === void 0 && (J = G), Object.defineProperty(M, J, { enumerable: !0, get: function() { return k[G] } }) } : function(M, k, G, J) { J === void 0 && (J = G), M[J] = k[G] }; function y(M, k) { for (var G in M) G !== "default" && !Object.prototype.hasOwnProperty.call(k, G) && g(k, M, G) } function S(M) { var k = typeof Symbol == "function" && Symbol.iterator, G = k && M[k], J = 0; if (G) return G.call(M); if (M && typeof M.length == "number") return { next: function() { return M && J >= M.length && (M = void 0), { value: M && M[J++], done: !M } } }; throw new TypeError(k ? "Object is not iterable." : "Symbol.iterator is not defined.") } function w(M, k) { var G = typeof Symbol == "function" && M[Symbol.iterator]; if (!G) return M; var J = G.call(M), ee, Z = [], te; try { for (; (k === void 0 || k-- > 0) && !(ee = J.next()).done;) Z.push(ee .value) } catch (ue) { te = { error: ue } } finally { try { ee && !ee.done && (G = J.return) && G.call(J) } finally { if (te) throw te.error } } return Z } function E() { for (var M = [], k = 0; k < arguments.length; k++) M = M.concat(w(arguments[ k])); return M } function I() { for (var M = 0, k = 0, G = arguments.length; k < G; k++) M += arguments[k] .length; for (var J = Array(M), ee = 0, k = 0; k < G; k++) for (var Z = arguments[k], te = 0, ue = Z.length; te < ue; te++, ee++) J[ee] = Z[te]; return J } function D(M, k) { for (var G = 0, J = k.length, ee = M.length; G < J; G++, ee++) M[ee] = k[G]; return M } function R(M) { return this instanceof R ? (this.v = M, this) : new R(M) } function L(M, k, G) { if (!Symbol.asyncIterator) throw new TypeError( "Symbol.asyncIterator is not defined."); var J = G.apply(M, k || []), ee, Z = []; return ee = {}, te("next"), te("throw"), te("return"), ee[Symbol .asyncIterator] = function() { return this }, ee; function te(oe) { J[oe] && (ee[oe] = function(se) { return new Promise(function(de, Le) { Z.push([oe, se, de, Le]) > 1 || ue(oe, se) }) }) } function ue(oe, se) { try { ge(J[oe](se)) } catch (de) { le(Z[0][3], de) } } function ge(oe) { oe.value instanceof R ? Promise.resolve(oe.value.v).then(ve, ce) : le(Z[ 0][2], oe) } function ve(oe) { ue("next", oe) } function ce(oe) { ue("throw", oe) } function le(oe, se) { oe(se), Z.shift(), Z.length && ue(Z[0][0], Z[0][1]) } } function B(M) { var k, G; return k = {}, J("next"), J("throw", function(ee) { throw ee }), J("return"), k[Symbol.iterator] = function() { return this }, k; function J(ee, Z) { k[ee] = M[ee] ? function(te) { return (G = !G) ? { value: R(M[ee](te)), done: ee === "return" } : Z ? Z(te) : te } : Z } } function j(M) { if (!Symbol.asyncIterator) throw new TypeError( "Symbol.asyncIterator is not defined."); var k = M[Symbol.asyncIterator], G; return k ? k.call(M) : (M = typeof S == "function" ? S(M) : M[Symbol .iterator](), G = {}, J("next"), J("throw"), J("return"), G[ Symbol.asyncIterator] = function() { return this }, G); function J(Z) { G[Z] = M[Z] && function(te) { return new Promise(function(ue, ge) { te = M[Z](te), ee(ue, ge, te.done, te.value) }) } } function ee(Z, te, ue, ge) { Promise.resolve(ge).then(function(ve) { Z({ value: ve, done: ue }) }, te) } } function z(M, k) { return Object.defineProperty ? Object.defineProperty(M, "raw", { value: k }) : M.raw = k, M } var U = Object.create ? function(M, k) { Object.defineProperty(M, "default", { enumerable: !0, value: k }) } : function(M, k) { M.default = k }; function N(M) { if (M && M.__esModule) return M; var k = {}; if (M != null) for (var G in M) G !== "default" && Object.prototype.hasOwnProperty .call(M, G) && g(k, M, G); return U(k, M), k } function H(M) { return M && M.__esModule ? M : { default: M } } function F(M, k) { if (!k.has(M)) throw new TypeError( "attempted to get private field on non-instance"); return k.get(M) } function V(M, k, G) { if (!k.has(M)) throw new TypeError( "attempted to set private field on non-instance"); return k.set(M, G), G } }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(89)), f = s(t(4)), c = s(t(26)), m = s(t(17)), p = s(t(120)), b = s(t(27)), x = s(t(91)), g = s(t(70)), y = s(t(44)), S = s(t(57)); (0, d.default)(o, "__esModule", { value: !0 }), o.DomElement = void 0; var w = t(2), E = t(6), I = []; function D(U) { var N = document.createElement("div"); N.innerHTML = U; var H = N.children; return E.toArray(H) } function R(U) { return U ? U instanceof HTMLCollection || U instanceof NodeList : !1 } function L(U) { var N = document.querySelectorAll(U); return E.toArray(N) } function B(U) { var N = [], H = []; return (0, u.default)(U) ? N = U : N = U.split(";"), (0, f.default)(N).call( N, function(F) { var V, M = (0, c.default)(V = F.split(":")).call(V, function( k) { return (0, m.default)(k).call(k) }); M.length === 2 && H.push(M[0] + ":" + M[1]) }), H } var j = function() { function U(N) { if (this.elems = [], this.length = this.elems.length, this .dataSource = new p.default, !!N) { if (N instanceof U) return N; var H = [], F = N instanceof Node ? N.nodeType : -1; if (this.selector = N, F === 1 || F === 9) H = [N]; else if (R(N)) H = E.toArray(N); else if (N instanceof Array) H = N; else if (typeof N == "string") { var V, M = (0, m.default)(V = N.replace(`/ /mg`, "")).call(V); (0, b.default)(M).call(M, "<") === 0 ? H = D(M) : H = L(M) } var k = H.length; if (!k) return this; for (var G = 0; G < k; G++) this.elems.push(H[G]); this.length = k } } return (0, d.default)(U.prototype, "id", { get: function() { return this.elems[0].id }, enumerable: !1, configurable: !0 }), U.prototype.forEach = function(N) { for (var H = 0; H < this.length; H++) { var F = this.elems[H], V = N.call(F, F, H); if (V === !1) break } return this }, U.prototype.clone = function(N) { var H; N === void 0 && (N = !1); var F = []; return (0, f.default)(H = this.elems).call(H, function(V) { F.push(V.cloneNode(!!N)) }), z(F) }, U.prototype.get = function(N) { N === void 0 && (N = 0); var H = this.length; return N >= H && (N = N % H), z(this.elems[N]) }, U.prototype.first = function() { return this.get(0) }, U.prototype.last = function() { var N = this.length; return this.get(N - 1) }, U.prototype.on = function(N, H, F) { var V; return N ? (typeof H == "function" && (F = H, H = ""), (0, f .default)(V = this).call(V, function(M) { if (!H) { M.addEventListener(N, F); return } var k = function(J) { var ee = J.target; ee.matches(H) && F.call(ee, J) }; M.addEventListener(N, k), I.push({ elem: M, selector: H, fn: F, agentFn: k }) })) : this }, U.prototype.off = function(N, H, F) { var V; return N ? (typeof H == "function" && (F = H, H = ""), (0, f .default)(V = this).call(V, function(M) { if (H) { for (var k = -1, G = 0; G < I.length; G++) { var J = I[G]; if (J.selector === H && J.fn === F && J .elem === M) { k = G; break } } if (k !== -1) { var ee = (0, x.default)(I).call(I, k, 1)[0].agentFn; M.removeEventListener(N, ee) } } else M.removeEventListener(N, F) })) : this }, U.prototype.attr = function(N, H) { var F; return H == null ? this.elems[0].getAttribute(N) || "" : (0, f .default)(F = this).call(F, function(V) { V.setAttribute(N, H) }) }, U.prototype.removeAttr = function(N) { var H; (0, f.default)(H = this).call(H, function(F) { F.removeAttribute(N) }) }, U.prototype.addClass = function(N) { var H; return N ? (0, f.default)(H = this).call(H, function(F) { if (F.className) { var V = F.className.split(/\s/); V = (0, g.default)(V).call(V, function(M) { return !!(0, m.default)(M).call(M) }), (0, b.default)(V).call(V, N) < 0 && V .push(N), F.className = V.join(" ") } else F.className = N }) : this }, U.prototype.removeClass = function(N) { var H; return N ? (0, f.default)(H = this).call(H, function(F) { if (!!F.className) { var V = F.className.split(/\s/); V = (0, g.default)(V).call(V, function(M) { return M = (0, m.default)(M).call( M), !(!M || M === N) }), F.className = V.join(" ") } }) : this }, U.prototype.hasClass = function(N) { if (!N) return !1; var H = this.elems[0]; if (!H.className) return !1; var F = H.className.split(/\s/); return (0, y.default)(F).call(F, N) }, U.prototype.css = function(N, H) { var F, V; return H == "" ? V = "" : V = N + ":" + H + ";", (0, f.default)( F = this).call(F, function(M) { var k, G = (0, m.default)(k = M.getAttribute( "style") || "").call(k); if (G) { var J = B(G); J = (0, c.default)(J).call(J, function(ee) { return (0, b.default)(ee).call(ee, N) === 0 ? V : ee }), V != "" && (0, b.default)(J).call(J, V) < 0 && J.push(V), V == "" && (J = B(J)), M.setAttribute("style", J.join("; ")) } else M.setAttribute("style", V) }) }, U.prototype.getBoundingClientRect = function() { var N = this.elems[0]; return N.getBoundingClientRect() }, U.prototype.show = function() { return this.css("display", "block") }, U.prototype.hide = function() { return this.css("display", "none") }, U.prototype.children = function() { var N = this.elems[0]; return N ? z(N.children) : null }, U.prototype.childNodes = function() { var N = this.elems[0]; return N ? z(N.childNodes) : null }, U.prototype.replaceChildAll = function(N) { for (var H = this.getNode(), F = this.elems[0]; F .hasChildNodes();) H.firstChild && F.removeChild(H .firstChild); this.append(N) }, U.prototype.append = function(N) { var H; return (0, f.default)(H = this).call(H, function(F) { (0, f.default)(N).call(N, function(V) { F.appendChild(V) }) }) }, U.prototype.remove = function() { var N; return (0, f.default)(N = this).call(N, function(H) { if (H.remove) H.remove(); else { var F = H.parentElement; F && F.removeChild(H) } }) }, U.prototype.isContain = function(N) { var H = this.elems[0], F = N.elems[0]; return H.contains(F) }, U.prototype.getNodeName = function() { var N = this.elems[0]; return N.nodeName }, U.prototype.getNode = function(N) { N === void 0 && (N = 0); var H; return H = this.elems[N], H }, U.prototype.find = function(N) { var H = this.elems[0]; return z(H.querySelectorAll(N)) }, U.prototype.text = function(N) { if (N) { var F; return (0, f.default)(F = this).call(F, function(V) { V.innerHTML = N }) } else { var H = this.elems[0]; return H.innerHTML.replace(/<[^>]+>/g, function() { return "" }) } }, U.prototype.html = function(N) { var H = this.elems[0]; return N ? (H.innerHTML = N, this) : H.innerHTML }, U.prototype.val = function() { var N, H = this.elems[0]; return (0, m.default)(N = H.value).call(N) }, U.prototype.focus = function() { var N; return (0, f.default)(N = this).call(N, function(H) { H.focus() }) }, U.prototype.prev = function() { var N = this.elems[0]; return z(N.previousElementSibling) }, U.prototype.next = function() { var N = this.elems[0]; return z(N.nextElementSibling) }, U.prototype.getNextSibling = function() { var N = this.elems[0]; return z(N.nextSibling) }, U.prototype.parent = function() { var N = this.elems[0]; return z(N.parentElement) }, U.prototype.parentUntil = function(N, H) { var F = H || this.elems[0]; if (F.nodeName === "BODY") return null; var V = F.parentElement; return V === null ? null : V.matches(N) ? z(V) : this .parentUntil(N, V) }, U.prototype.parentUntilEditor = function(N, H, F) { var V = F || this.elems[0]; if (z(V).equal(H.$textContainerElem) || z(V).equal(H .$toolbarElem)) return null; var M = V.parentElement; return M === null ? null : M.matches(N) ? z(M) : this .parentUntilEditor(N, H, M) }, U.prototype.equal = function(N) { return N instanceof U ? this.elems[0] === N.elems[0] : N instanceof HTMLElement ? this.elems[0] === N : !1 }, U.prototype.insertBefore = function(N) { var H, F = z(N), V = F.elems[0]; return V ? (0, f.default)(H = this).call(H, function(M) { var k = V.parentNode; k == null || k.insertBefore(M, V) }) : this }, U.prototype.insertAfter = function(N) { var H, F = z(N), V = F.elems[0], M = V && V.nextSibling; return V ? (0, f.default)(H = this).call(H, function(k) { var G = V.parentNode; M ? G.insertBefore(k, M) : G.appendChild(k) }) : this }, U.prototype.data = function(N, H) { if (H != null) this.dataSource.set(N, H); else return this.dataSource.get(N) }, U.prototype.getNodeTop = function(N) { if (this.length < 1) return this; var H = this.parent(); return N.$textElem.equal(this) || N.$textElem.equal(H) ? this : (H.prior = this, H.getNodeTop(N)) }, U.prototype.getOffsetData = function() { var N = this.elems[0]; return { top: N.offsetTop, left: N.offsetLeft, width: N.offsetWidth, height: N.offsetHeight, parent: N.offsetParent } }, U.prototype.scrollTop = function(N) { var H = this.elems[0]; H.scrollTo({ top: N }) }, U }(); o.DomElement = j; function z() { for (var U = [], N = 0; N < arguments.length; N++) U[N] = arguments[N]; return new((0, S.default)(j).apply(j, w.__spreadArrays([void 0], U))) } o.default = z }, function(l, o, t) { l.exports = t(180) }, function(l, o, t) { var s = t(8), d = t(71).f, u = t(100), f = t(9), c = t(39), m = t(19), p = t(16), b = function(g) { var y = function(w, E, I) { if (this instanceof g) { switch (arguments.length) { case 0: return new g; case 1: return new g(w); case 2: return new g(w, E) } return new g(w, E, I) } return g.apply(this, arguments) }; return y.prototype = g.prototype, y }; l.exports = function(x, g) { var y = x.target, S = x.global, w = x.stat, E = x.proto, I = S ? s : w ? s[y] : (s[y] || {}).prototype, D = S ? f : f[y] || (f[y] = {}), R = D.prototype, L, B, j, z, U, N, H, F, V; for (z in g) L = u(S ? z : y + (w ? "." : "#") + z, x.forced), B = !L && I && p(I, z), N = D[z], B && (x.noTargetGet ? (V = d(I, z), H = V && V.value) : H = I[z]), U = B && H ? H : g[z], !(B && _typeof( N) === _typeof(U)) && (x.bind && B ? F = c(U, s) : x.wrap && B ? F = b(U) : E && typeof U == "function" ? F = c(Function.call, U) : F = U, (x.sham || U && U.sham || N && N.sham) && m(F, "sham", !0), D[z] = F, E && (j = y + "Prototype", p(f, j) || m(f, j, {}), f[j][z] = U, x.real && R && !R[z] && m(R, z, U) )) } }, function(l, o, t) { var s = t(0), d = s(t(92)), u = s(t(1)), f = s(t(256)), c = s(t(45)), m = s(t(46)), p = s(t(89)), b = s(t(26)); (0, u.default)(o, "__esModule", { value: !0 }), o.hexToRgb = o.getRandomCode = o.toArray = o.deepClone = o.isFunction = o .debounce = o.throttle = o.arrForEach = o.forEach = o.replaceSpecialSymbol = o.replaceHtmlSymbol = o.getRandom = o.UA = void 0; var x = t(2), g = function() { function N() { this._ua = navigator.userAgent; var H = this._ua.match(/(Edge?)\/(\d+)/); this.isOldEdge = !!(H && H[1] == "Edge" && (0, f.default)(H[2]) < 19), this.isFirefox = !!(/Firefox\/\d+/.test(this._ua) && ! /Seamonkey\/\d+/.test(this._ua)) } return N.prototype.isIE = function() { return "ActiveXObject" in window }, N.prototype.isWebkit = function() { return /webkit/i.test(this._ua) }, N }(); o.UA = new g; function y(N) { var H; return N === void 0 && (N = ""), N + (0, c.default)(H = Math.random() .toString()).call(H, 2) } o.getRandom = y; function S(N) { return N.replace(//gm, ">").replace(/"/gm, """).replace(/(\r\n|\r|\n)/g, "
") } o.replaceHtmlSymbol = S; function w(N) { return N.replace(/</gm, "<").replace(/>/gm, ">").replace(/"/gm, '"') } o.replaceSpecialSymbol = w; function E(N, H) { for (var F in N) if (Object.prototype.hasOwnProperty.call(N, F)) { var V = H(F, N[F]); if (V === !1) break } } o.forEach = E; function I(N, H) { var F, V, M, k = N.length || 0; for (F = 0; F < k && (V = N[F], M = H.call(N, V, F), M !== !1); F++); } o.arrForEach = I; function D(N, H) { H === void 0 && (H = 200); var F = !1; return function() { for (var V = this, M = [], k = 0; k < arguments.length; k++) M[k] = arguments[k]; F || (F = !0, (0, m.default)(function() { F = !1, N.call.apply(N, x.__spreadArrays([V], M)) }, H)) } } o.throttle = D; function R(N, H) { H === void 0 && (H = 200); var F = 0; return function() { for (var V = this, M = [], k = 0; k < arguments.length; k++) M[k] = arguments[k]; F && window.clearTimeout(F), F = (0, m.default)(function() { F = 0, N.call.apply(N, x.__spreadArrays([V], M)) }, H) } } o.debounce = R; function L(N) { return typeof N == "function" } o.isFunction = L; function B(N) { if ((0, d.default)(N) !== "object" || typeof N == "function" || N === null) return N; var H; (0, p.default)(N) && (H = []), (0, p.default)(N) || (H = {}); for (var F in N) Object.prototype.hasOwnProperty.call(N, F) && (H[F] = B(N[ F])); return H } o.deepClone = B; function j(N) { return (0, c.default)(Array.prototype).call(N) } o.toArray = j; function z() { var N; return (0, c.default)(N = Math.random().toString(36)).call(N, -5) } o.getRandomCode = z; function U(N) { var H = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N); if (H == null) return null; var F = (0, b.default)(H).call(H, function(G) { return (0, f.default)(G, 16) }), V = F[1], M = F[2], k = F[3]; return "rgb(" + V + ", " + M + ", " + k + ")" } o.hexToRgb = U }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.EMPTY_P_REGEX = o.EMPTY_P_LAST_REGEX = o.EMPTY_P = o.urlRegex = o .EMPTY_FN = void 0; function u() {} o.EMPTY_FN = u, o.urlRegex = /^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-.,@?^=%&:/~+#]*[\w\-@?^=%&/~+#])?/, o.EMPTY_P = '


', o.EMPTY_P_LAST_REGEX = /

<\/p>$/gim, o.EMPTY_P_REGEX = /

/gim }, function(l, o, t) { (function(s) { var d = function(f) { return f && f.Math == Math && f }; l.exports = d((typeof globalThis > "u" ? "undefined" : _typeof( globalThis)) == "object" && globalThis) || d((typeof window > "u" ? "undefined" : _typeof(window)) == "object" && window) || d((typeof self > "u" ? "undefined" : _typeof(self)) == "object" && self) || d(_typeof(s) == "object" && s) || Function( "return this")() }).call(this, t(145)) }, function(l, o) { l.exports = {} }, function(l, o, t) { var s = t(8), d = t(74), u = t(16), f = t(64), c = t(76), m = t(105), p = d("wks"), b = s.Symbol, x = m ? b : b && b.withoutSetter || f; l.exports = function(g) { return u(p, g) || (c && u(b, g) ? p[g] = b[g] : p[g] = x("Symbol." + g)), p[g] } }, function(l, o) { l.exports = function(t) { try { return !!t() } catch { return !0 } } }, function(l, o, t) { var s = t(9), d = t(16), u = t(93), f = t(18).f; l.exports = function(c) { var m = s.Symbol || (s.Symbol = {}); d(m, c) || f(m, c, { value: u.f(c) }) } }, function(l, o) { l.exports = function(t) { return _typeof(t) === "object" ? t !== null : typeof t == "function" } }, function(l, o, t) { var s = t(11); l.exports = !s(function() { return Object.defineProperty({}, 1, { get: function() { return 7 } })[1] != 7 }) }, function(l, o, t) { var s = t(9); l.exports = function(d) { return s[d + "Prototype"] } }, function(l, o) { var t = {}.hasOwnProperty; l.exports = function(s, d) { return t.call(s, d) } }, function(l, o, t) { l.exports = t(192) }, function(l, o, t) { var s = t(14), d = t(99), u = t(25), f = t(60), c = Object.defineProperty; o.f = s ? c : function(p, b, x) { if (u(p), b = f(b, !0), u(x), d) try { return c(p, b, x) } catch {} if ("get" in x || "set" in x) throw TypeError( "Accessors not supported"); return "value" in x && (p[b] = x.value), p } }, function(l, o, t) { var s = t(14), d = t(18), u = t(48); l.exports = s ? function(f, c, m) { return d.f(f, c, u(1, m)) } : function(f, c, m) { return f[c] = m, f } }, function(l, o, t) { var s = function() { var I; return function() { return typeof I > "u" && (I = Boolean(window && document && document.all && !window.atob)), I } }(), d = function() { var I = {}; return function(R) { if (typeof I[R] > "u") { var L = document.querySelector(R); if (window.HTMLIFrameElement && L instanceof window .HTMLIFrameElement) try { L = L.contentDocument.head } catch { L = null } I[R] = L } return I[R] } }(), u = []; function f(E) { for (var I = -1, D = 0; D < u.length; D++) if (u[D].identifier === E) { I = D; break } return I } function c(E, I) { for (var D = {}, R = [], L = 0; L < E.length; L++) { var B = E[L], j = I.base ? B[0] + I.base : B[0], z = D[j] || 0, U = "".concat(j, " ").concat(z); D[j] = z + 1; var N = f(U), H = { css: B[1], media: B[2], sourceMap: B[3] }; N !== -1 ? (u[N].references++, u[N].updater(H)) : u.push({ identifier: U, updater: w(H, I), references: 1 }), R.push(U) } return R } function m(E) { var I = document.createElement("style"), D = E.attributes || {}; if (typeof D.nonce > "u") { var R = t.nc; R && (D.nonce = R) } if (Object.keys(D).forEach(function(B) { I.setAttribute(B, D[B]) }), typeof E.insert == "function") E.insert(I); else { var L = d(E.insert || "head"); if (!L) throw new Error( "Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid." ); L.appendChild(I) } return I } function p(E) { if (E.parentNode === null) return !1; E.parentNode.removeChild(E) } var b = function() { var I = []; return function(R, L) { return I[R] = L, I.filter(Boolean).join(` `) } }(); function x(E, I, D, R) { var L = D ? "" : R.media ? "@media ".concat(R.media, " {").concat(R.css, "}") : R.css; if (E.styleSheet) E.styleSheet.cssText = b(I, L); else { var B = document.createTextNode(L), j = E.childNodes; j[I] && E.removeChild(j[I]), j.length ? E.insertBefore(B, j[I]) : E .appendChild(B) } } function g(E, I, D) { var R = D.css, L = D.media, B = D.sourceMap; if (L ? E.setAttribute("media", L) : E.removeAttribute("media"), B && typeof btoa < "u" && (R += ` /*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(B)))), " */")), E.styleSheet) E.styleSheet.cssText = R; else { for (; E.firstChild;) E.removeChild(E.firstChild); E.appendChild(document.createTextNode(R)) } } var y = null, S = 0; function w(E, I) { var D, R, L; if (I.singleton) { var B = S++; D = y || (y = m(I)), R = x.bind(null, D, B, !1), L = x.bind(null, D, B, !0) } else D = m(I), R = g.bind(null, D, I), L = function() { p(D) }; return R(E), function(z) { if (z) { if (z.css === E.css && z.media === E.media && z.sourceMap === E .sourceMap) return; R(E = z) } else L() } } l.exports = function(E, I) { I = I || {}, !I.singleton && typeof I.singleton != "boolean" && (I .singleton = s()), E = E || []; var D = c(E, I); return function(L) { if (L = L || [], Object.prototype.toString.call(L) === "[object Array]") { for (var B = 0; B < D.length; B++) { var j = D[B], z = f(j); u[z].references-- } for (var U = c(L, I), N = 0; N < D.length; N++) { var H = D[N], F = f(H); u[F].references === 0 && (u[F].updater(), u.splice(F, 1)) } D = U } } } }, function(l, o, t) { l.exports = function(u) { var f = []; return f.toString = function() { return this.map(function(m) { var p = s(m, u); return m[2] ? "@media ".concat(m[2], " {").concat(p, "}") : p }).join("") }, f.i = function(c, m, p) { typeof c == "string" && (c = [ [null, c, ""] ]); var b = {}; if (p) for (var x = 0; x < this.length; x++) { var g = this[x][0]; g != null && (b[g] = !0) } for (var y = 0; y < c.length; y++) { var S = [].concat(c[y]); p && b[S[0]] || (m && (S[2] ? S[2] = "".concat(m, " and ") .concat(S[2]) : S[2] = m), f.push(S)) } }, f }; function s(u, f) { var c = u[1] || "", m = u[3]; if (!m) return c; if (f && typeof btoa == "function") { var p = d(m), b = m.sources.map(function(x) { return "/*# sourceURL=".concat(m.sourceRoot || "").concat(x, " */") }); return [c].concat(b).concat([p]).join(` `) } return [c].join(` `) } function d(u) { var f = btoa(unescape(encodeURIComponent(JSON.stringify(u)))), c = "sourceMappingURL=data:application/json;charset=utf-8;base64," .concat(f); return "/*# ".concat(c, " */") } }, function(l, o, t) { var s = t(14), d = t(11), u = t(16), f = Object.defineProperty, c = {}, m = function(b) { throw b }; l.exports = function(p, b) { if (u(c, p)) return c[p]; b || (b = {}); var x = [][p], g = u(b, "ACCESSORS") ? b.ACCESSORS : !1, y = u(b, 0) ? b[0] : m, S = u(b, 1) ? b[1] : void 0; return c[p] = !!x && !d(function() { if (g && !s) return !0; var w = { length: -1 }; g ? f(w, 1, { enumerable: !0, get: m }) : w[1] = 1, x.call(w, y, S) }) } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(95)), c = function(m) { u.__extends(p, m); function p(b, x) { return m.call(this, b, x) || this } return p }(f.default); o.default = c }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)), f = s(t(46)); (0, d.default)(o, "__esModule", { value: !0 }); var c = t(2), m = c.__importDefault(t(3)), p = c.__importDefault(t(95)), b = c.__importDefault(t(133)), x = function(g) { c.__extends(y, g); function y(S, w, E) { var I = g.call(this, S, w) || this; E.title = w.i18next.t("menus.dropListMenu." + E.title); var D = w.config.lang === "zh-CN" ? "" : "w-e-drop-list-tl"; if (D !== "" && E.type === "list") { var R; (0, u.default)(R = E.list).call(R, function(B) { var j = B.$elem, z = m.default(j.children()); if (z.length > 0) { var U = z == null ? void 0 : z.getNodeName(); U && U === "I" && j.addClass(D) } }) } var L = new b.default(I, E); return I.dropList = L, S.on("click", function() { var B; w.selection.getRange() != null && (S.css("z-index", w .zIndex.get("menu")), (0, u.default)(B = w .txt.eventHooks.dropListMenuHoverEvents) .call(B, function(j) { return j() }), L.show()) }).on("mouseleave", function() { S.css("z-index", "auto"), L.hideTimeoutId = (0, f .default)(function() { L.hide() }) }), I } return y }(p.default); o.default = x }, function(l, o, t) { var s = t(13); l.exports = function(d) { if (!s(d)) throw TypeError(String(d) + " is not an object"); return d } }, function(l, o, t) { l.exports = t(188) }, function(l, o, t) { l.exports = t(201) }, function(l, o, t) { var s = t(72), d = t(49); l.exports = function(u) { return s(d(u)) } }, function(l, o, t) { var s = t(49); l.exports = function(d) { return Object(s(d)) } }, function(l, o, t) { var s = t(39), d = t(72), u = t(29), f = t(34), c = t(88), m = [].push, p = function(x) { var g = x == 1, y = x == 2, S = x == 3, w = x == 4, E = x == 6, I = x == 5 || E; return function(D, R, L, B) { for (var j = u(D), z = d(j), U = s(R, L, 3), N = f(z.length), H = 0, F = B || c, V = g ? F(D, N) : y ? F(D, 0) : void 0, M, k; N > H; H++) if ((I || H in z) && (M = z[H], k = U(M, H, j), x)) { if (g) V[H] = k; else if (k) switch (x) { case 3: return !0; case 5: return M; case 6: return H; case 2: m.call(V, M) } else if (w) return !1 } return E ? -1 : S || w ? w : V } }; l.exports = { forEach: p(0), map: p(1), filter: p(2), some: p(3), every: p(4), find: p(5), findIndex: p(6) } }, function(l, o, t) { l.exports = t(283) }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)), f = s(t(31)), c = s(t(131)); (0, d.default)(o, "__esModule", { value: !0 }); var m = t(2), p = m.__importDefault(t(3)), b = t(7), x = function() { function g(y, S) { this.menu = y, this.conf = S, this.$container = p.default( '

'); var w = y.editor; w.txt.eventHooks.clickEvents.push(g.hideCurAllPanels), w.txt .eventHooks.toolbarClickEvents.push(g.hideCurAllPanels), w.txt .eventHooks.dropListMenuHoverEvents.push(g.hideCurAllPanels) } return g.prototype.create = function() { var y = this, S = this.menu; if (!g.createdMenus.has(S)) { var w = this.conf, E = this.$container, I = w.width || 300, D = S.editor.$toolbarElem.getBoundingClientRect(), R = S.$elem.getBoundingClientRect(), L = D.height + D.top - R.top, B = (D.width - I) / 2 + D.left - R.left, j = 300; Math.abs(B) > j && (R.left < document.documentElement .clientWidth / 2 ? B = -R.width / 2 : B = -I + R .width / 2), E.css("width", I + "px").css( "margin-top", L + "px").css("margin-left", B + "px") .css("z-index", S.editor.zIndex.get("panel")); var z = p.default( ''); E.append(z), z.on("click", function() { y.remove() }); var U = p.default(''), N = p.default( '
'); E.append(U).append(N); var H = w.height; H && N.css("height", H + "px").css("overflow-y", "auto"); var F = w.tabs || [], V = [], M = []; (0, u.default)(F).call(F, function(G, J) { if (!!G) { var ee = G.title || "", Z = G.tpl || "", te = p.default('
  • ' + ee + "
  • "); U.append(te); var ue = p.default(Z); N.append(ue), V.push(te), M.push(ue), J === 0 ? (te.data("active", !0), te.addClass( "w-e-active")) : ue.hide(), te.on( "click", function() { te.data("active") || ((0, u .default)(V).call(V, function(ge) { ge.data("active", !1), ge .removeClass( "w-e-active" ) }), (0, u.default)( M).call(M, function( ge) { ge.hide() }), te.data("active", ! 0), te.addClass( "w-e-active"), ue .show()) }) } }), E.on("click", function(G) { G.stopPropagation() }), S.$elem.append(E), (0, u.default)(F).call(F, function(G, J) { if (!!G) { var ee = G.events || []; (0, u.default)(ee).call(ee, function(Z) { var te, ue = Z.selector, ge = Z.type, ve = Z.fn || b.EMPTY_FN, ce = M[J], le = (te = Z.bindEnter) !== null && te !== void 0 ? te : !1, oe = function(de) { return m.__awaiter(y, void 0, void 0, function() { var Le; return m .__generator( this, function( De ) { switch ( De .label ) { case 0: return de .stopPropagation(), [4, ve( de)]; case 1: return Le = De .sent(), Le && this .remove(), [ 2] } }) }) }; (0, f.default)(ce).call(ce, ue) .on(ge, oe), le && ge === "click" && ce.on("keyup", function(se) { se.keyCode == 13 && oe(se) }) }) } }); var k = (0, f.default)(E).call(E, "input[type=text],textarea"); k.length && k.get(0).focus(), g.hideCurAllPanels(), S .setPanel(this), g.createdMenus.add(S) } }, g.prototype.remove = function() { var y = this.menu, S = this.$container; S && S.remove(), g.createdMenus.delete(y) }, g.hideCurAllPanels = function() { var y; g.createdMenus.size !== 0 && (0, u.default)(y = g.createdMenus) .call(y, function(S) { var w = S.panel; w && w.remove() }) }, g.createdMenus = new c.default, g }(); o.default = x }, function(l, o) { var t = {}.toString; l.exports = function(s) { return t.call(s).slice(8, -1) } }, function(l, o, t) { var s = t(62), d = Math.min; l.exports = function(u) { return u > 0 ? d(s(u), 9007199254740991) : 0 } }, function(l, o, t) { var s = t(9), d = t(8), u = function(c) { return typeof c == "function" ? c : void 0 }; l.exports = function(f, c) { return arguments.length < 2 ? u(s[f]) || u(d[f]) : s[f] && s[f][c] || d[ f] && d[f][c] } }, function(l, o, t) { var s = t(81), d = t(18).f, u = t(19), f = t(16), c = t(170), m = t(10), p = m("toStringTag"); l.exports = function(b, x, g, y) { if (b) { var S = g ? b : b.prototype; f(S, p) || d(S, p, { configurable: !0, value: x }), y && !s && u(S, "toString", c) } } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(95)), c = function(m) { u.__extends(p, m); function p(b, x) { return m.call(this, b, x) || this } return p.prototype.setPanel = function(b) { this.panel = b }, p }(f.default); o.default = c }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)), f = s(t(57)); (0, d.default)(o, "__esModule", { value: !0 }); var c = t(2), m = c.__importDefault(t(3)), p = function() { function b(x, g, y) { this.editor = x, this.$targetElem = g, this.conf = y, this._show = ! 1, this._isInsertTextContainer = !1; var S = m.default("
    "); S.addClass("w-e-tooltip"), this.$container = S } return b.prototype.getPositionData = function() { var x = this.$container, g = 0, y = 0, S = 20, w = document.documentElement.scrollTop, E = this.$targetElem.getBoundingClientRect(), I = this.editor.$textElem.getBoundingClientRect(), D = this.$targetElem.getOffsetData(), R = m.default(D.parent), L = this.editor.$textElem.elems[0].scrollTop; if (this._isInsertTextContainer = R.equal(this.editor .$textContainerElem), this._isInsertTextContainer) { var B = R.getBoundingClientRect().height, j = D.top, z = D.left, U = D.height, N = j - L; N > S + 5 ? (g = N - S - 15, x.addClass("w-e-tooltip-up")) : N + U + S < B ? (g = N + U + 10, x.addClass( "w-e-tooltip-down")) : (g = (N > 0 ? N : 0) + S + 10, x.addClass("w-e-tooltip-down")), z < 0 ? y = 0 : y = z } else E.top < S || E.top - I.top < S ? (g = E.bottom + w + 5, x .addClass("w-e-tooltip-down")) : (g = E.top + w - S - 15, x.addClass("w-e-tooltip-up")), E.left < 0 ? y = 0 : y = E.left; return { top: g, left: y } }, b.prototype.appendMenus = function() { var x = this, g = this.conf, y = this.editor, S = this.$targetElem, w = this.$container; (0, u.default)(g).call(g, function(E, I) { var D = E.$elem, R = m.default("
    "); R.addClass("w-e-tooltip-item-wrapper "), R.append( D), w.append(R), D.on("click", function(L) { L.preventDefault(); var B = E.onClick(y, S); B && x.remove() }) }) }, b.prototype.create = function() { var x, g, y = this.editor, S = this.$container; this.appendMenus(); var w = this.getPositionData(), E = w.top, I = w.left; S.css("top", E + "px"), S.css("left", I + "px"), S.css( "z-index", y.zIndex.get("tooltip")), this ._isInsertTextContainer ? this.editor.$textContainerElem .append(S) : m.default("body").append(S), this._show = !0, y .beforeDestroy((0, f.default)(x = this.remove).call(x, this)), y.txt.eventHooks.onBlurEvents.push((0, f .default)(g = this.remove).call(g, this)) }, b.prototype.remove = function() { this.$container.remove(), this._show = !1 }, (0, d.default)(b.prototype, "isShow", { get: function() { return this._show }, enumerable: !1, configurable: !0 }), b }(); o.default = p }, function(l, o, t) { var s = t(40); l.exports = function(d, u, f) { if (s(d), u === void 0) return d; switch (f) { case 0: return function() { return d.call(u) }; case 1: return function(c) { return d.call(u, c) }; case 2: return function(c, m) { return d.call(u, c, m) }; case 3: return function(c, m, p) { return d.call(u, c, m, p) } } return function() { return d.apply(u, arguments) } } }, function(l, o) { l.exports = function(t) { if (typeof t != "function") throw TypeError(String(t) + " is not a function"); return t } }, function(l, o, t) { var s = t(165), d = t(8), u = t(13), f = t(19), c = t(16), m = t(63), p = t(51), b = d.WeakMap, x, g, y, S = function(j) { return y(j) ? g(j) : x(j, {}) }, w = function(j) { return function(z) { var U; if (!u(z) || (U = g(z)).type !== j) throw TypeError( "Incompatible receiver, " + j + " required"); return U } }; if (s) { var E = new b, I = E.get, D = E.has, R = E.set; x = function(j, z) { return R.call(E, j, z), z }, g = function(j) { return I.call(E, j) || {} }, y = function(j) { return D.call(E, j) } } else { var L = m("state"); p[L] = !0, x = function(j, z) { return f(j, L, z), z }, g = function(j) { return c(j, L) ? j[L] : {} }, y = function(j) { return c(j, L) } } l.exports = { set: x, get: g, has: y, enforce: S, getterFor: w } }, function(l, o) { l.exports = !0 }, function(l, o) { l.exports = {} }, function(l, o, t) { l.exports = t(213) }, function(l, o, t) { l.exports = t(261) }, function(l, o, t) { l.exports = t(265) }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }), o.createElementFragment = o.createDocumentFragment = o.createElement = o .insertBefore = o.getEndPoint = o.getStartPoint = o.updateRange = o .filterSelectionNodes = void 0; var f = t(2), c = t(137), m = f.__importDefault(t(3)); function p(I) { var D = []; return (0, u.default)(I).call(I, function(R) { var L = R.getNodeName(); if (L !== c.ListType.OrderedList && L !== c.ListType .UnorderedList) D.push(R); else if (R.prior) D.push(R.prior); else { var B = R.children(); B == null || (0, u.default)(B).call(B, function(j) { D.push(m.default(j)) }) } }), D } o.filterSelectionNodes = p; function b(I, D, R) { var L = I.selection, B = document.createRange(); D.length > 1 ? (B.setStart(D.elems[0], 0), B.setEnd(D.elems[D.length - 1], D .elems[D.length - 1].childNodes.length)) : B.selectNodeContents(D .elems[0]), R && B.collapse(!1), L.saveRange(B), L .restoreSelection() } o.updateRange = b; function x(I) { var D; return I.prior ? I.prior : m.default((D = I.children()) === null || D === void 0 ? void 0 : D.elems[0]) } o.getStartPoint = x; function g(I) { var D; return I.prior ? I.prior : m.default((D = I.children()) === null || D === void 0 ? void 0 : D.last().elems[0]) } o.getEndPoint = g; function y(I, D, R) { R === void 0 && (R = null), I.parent().elems[0].insertBefore(D, R) } o.insertBefore = y; function S(I) { return document.createElement(I) } o.createElement = S; function w() { return document.createDocumentFragment() } o.createDocumentFragment = w; function E(I, D, R) { return R === void 0 && (R = "li"), (0, u.default)(I).call(I, function(L) { var B = S(R); B.innerHTML = L.html(), D.appendChild(B), L.remove() }), D } o.createElementFragment = E }, function(l, o) { l.exports = function(t, s) { return { enumerable: !(t & 1), configurable: !(t & 2), writable: !(t & 4), value: s } } }, function(l, o) { l.exports = function(t) { if (t == null) throw TypeError("Can't call method on " + t); return t } }, function(l, o, t) { var s = t(164).charAt, d = t(41), u = t(75), f = "String Iterator", c = d.set, m = d.getterFor(f); u(String, "String", function(p) { c(this, { type: f, string: String(p), index: 0 }) }, function() { var b = m(this), x = b.string, g = b.index, y; return g >= x.length ? { value: void 0, done: !0 } : (y = s(x, g), b.index += y.length, { value: y, done: !1 }) }) }, function(l, o) { l.exports = {} }, function(l, o, t) { var s = t(106), d = t(80); l.exports = Object.keys || function(f) { return s(f, d) } }, function(l, o, t) { var s = t(19); l.exports = function(d, u, f, c) { c && c.enumerable ? d[u] = f : s(d, u, f) } }, function(l, o, t) { t(173); var s = t(174), d = t(8), u = t(65), f = t(19), c = t(43), m = t(10), p = m("toStringTag"); for (var b in s) { var x = d[b], g = x && x.prototype; g && u(g) !== p && f(g, p, b), c[b] = c.Array } }, function(l, o, t) { var s = t(33); l.exports = Array.isArray || function(u) { return s(u) == "Array" } }, function(l, o, t) { var s = t(11), d = t(10), u = t(86), f = d("species"); l.exports = function(c) { return u >= 51 || !s(function() { var m = [], p = m.constructor = {}; return p[f] = function() { return { foo: 1 } }, m[c](Boolean).foo !== 1 }) } }, function(l, o, t) { l.exports = t(222) }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.ListHandle = void 0; var u = t(2), f = u.__importDefault(t(373)), c = function() { function m(p) { this.options = p, this.selectionRangeElem = new f.default } return m }(); o.ListHandle = c }, function(l, o, t) { var s = {}.propertyIsEnumerable, d = Object.getOwnPropertyDescriptor, u = d && !s.call({ 1: 2 }, 1); o.f = u ? function(c) { var m = d(this, c); return !!m && m.enumerable } : s }, function(l, o, t) { var s = t(13); l.exports = function(d, u) { if (!s(d)) return d; var f, c; if (u && typeof(f = d.toString) == "function" && !s(c = f.call(d)) || typeof(f = d.valueOf) == "function" && !s(c = f.call(d)) || !u && typeof(f = d.toString) == "function" && !s(c = f.call(d))) return c; throw TypeError("Can't convert object to primitive value") } }, function(l, o) {}, function(l, o) { var t = Math.ceil, s = Math.floor; l.exports = function(d) { return isNaN(d = +d) ? 0 : (d > 0 ? s : t)(d) } }, function(l, o, t) { var s = t(74), d = t(64), u = s("keys"); l.exports = function(f) { return u[f] || (u[f] = d(f)) } }, function(l, o) { var t = 0, s = Math.random(); l.exports = function(d) { return "Symbol(" + String(d === void 0 ? "" : d) + ")_" + (++t + s) .toString(36) } }, function(l, o, t) { var s = t(81), d = t(33), u = t(10), f = u("toStringTag"), c = d(function() { return arguments }()) == "Arguments", m = function(b, x) { try { return b[x] } catch {} }; l.exports = s ? d : function(p) { var b, x, g; return p === void 0 ? "Undefined" : p === null ? "Null" : typeof(x = m( b = Object(p), f)) == "string" ? x : c ? d(b) : (g = d(b)) == "Object" && typeof b.callee == "function" ? "Arguments" : g } }, function(l, o, t) { var s = t(25), d = t(111), u = t(34), f = t(39), c = t(112), m = t(113), p = function(g, y) { this.stopped = g, this.result = y }, b = l.exports = function(x, g, y, S, w) { var E = f(g, y, S ? 2 : 1), I, D, R, L, B, j, z; if (w) I = x; else { if (D = c(x), typeof D != "function") throw TypeError( "Target is not iterable"); if (d(D)) { for (R = 0, L = u(x.length); L > R; R++) if (B = S ? E(s(z = x[R])[0], z[1]) : E(x[R]), B && B instanceof p) return B; return new p(!1) } I = D.call(x) } for (j = I.next; !(z = j.call(I)).done;) if (B = m(I, E, z.value, S), _typeof(B) == "object" && B && B instanceof p) return B; return new p(!1) }; b.stop = function(x) { return new p(!0, x) } }, function(l, o, t) { var s = t(11); l.exports = function(d, u) { var f = [][d]; return !!f && s(function() { f.call(null, u || function() { throw 1 }, 1) }) } }, function(l, o) { l.exports = ` \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF` }, function(l, o, t) { var s = t(60), d = t(18), u = t(48); l.exports = function(f, c, m) { var p = s(c); p in f ? d.f(f, p, u(0, m)) : f[p] = m } }, function(l, o, t) { l.exports = t(209) }, function(l, o, t) { var s = t(14), d = t(59), u = t(48), f = t(28), c = t(60), m = t(16), p = t(99), b = Object.getOwnPropertyDescriptor; o.f = s ? b : function(g, y) { if (g = f(g), y = c(y, !0), p) try { return b(g, y) } catch {} if (m(g, y)) return u(!d.f.call(g, y), g[y]) } }, function(l, o, t) { var s = t(11), d = t(33), u = "".split; l.exports = s(function() { return !Object("z").propertyIsEnumerable(0) }) ? function(f) { return d(f) == "String" ? u.call(f, "") : Object(f) } : Object }, function(l, o, t) { var s = t(8), d = t(13), u = s.document, f = d(u) && d(u.createElement); l.exports = function(c) { return f ? u.createElement(c) : {} } }, function(l, o, t) { var s = t(42), d = t(102); (l.exports = function(u, f) { return d[u] || (d[u] = f !== void 0 ? f : {}) })("versions", []).push({ version: "3.6.4", mode: s ? "pure" : "global", copyright: "\xA9 2020 Denis Pushkarev (zloirock.ru)" }) }, function(l, o, t) { var s = t(5), d = t(167), u = t(104), f = t(171), c = t(36), m = t(19), p = t(53), b = t(10), x = t(42), g = t(43), y = t(103), S = y.IteratorPrototype, w = y.BUGGY_SAFARI_ITERATORS, E = b("iterator"), I = "keys", D = "values", R = "entries", L = function() { return this }; l.exports = function(B, j, z, U, N, H, F) { d(z, j, U); var V = function(ce) { if (ce === N && ee) return ee; if (!w && ce in G) return G[ce]; switch (ce) { case I: return function() { return new z(this, ce) }; case D: return function() { return new z(this, ce) }; case R: return function() { return new z(this, ce) } } return function() { return new z(this) } }, M = j + " Iterator", k = !1, G = B.prototype, J = G[E] || G["@@iterator"] || N && G[N], ee = !w && J || V(N), Z = j == "Array" && G.entries || J, te, ue, ge; if (Z && (te = u(Z.call(new B)), S !== Object.prototype && te.next && (! x && u(te) !== S && (f ? f(te, S) : typeof te[E] != "function" && m(te, E, L)), c(te, M, !0, !0), x && (g[ M] = L))), N == D && J && J.name !== D && (k = !0, ee = function() { return J.call(this) }), (!x || F) && G[E] !== ee && m(G, E, ee), g[j] = ee, N) if (ue = { values: V(D), keys: H ? ee : V(I), entries: V(R) }, F) for (ge in ue)(w || k || !(ge in G)) && p(G, ge, ue[ge]); else s({ target: j, proto: !0, forced: w || k }, ue); return ue } }, function(l, o, t) { var s = t(11); l.exports = !!Object.getOwnPropertySymbols && !s(function() { return !String(Symbol()) }) }, function(l, o, t) { var s = t(25), d = t(169), u = t(80), f = t(51), c = t(107), m = t(73), p = t(63), b = ">", x = "<", g = "prototype", y = "script", S = p("IE_PROTO"), w = function() {}, E = function(j) { return x + y + b + j + x + "/" + y + b }, I = function(j) { j.write(E("")), j.close(); var z = j.parentWindow.Object; return j = null, z }, D = function() { var j = m("iframe"), z = "java" + y + ":", U; return j.style.display = "none", c.appendChild(j), j.src = String(z), U = j.contentWindow.document, U.open(), U.write(E( "document.F=Object")), U.close(), U.F }, R, L = function() { try { R = document.domain && new ActiveXObject("htmlfile") } catch {} L = R ? I(R) : D(); for (var j = u.length; j--;) delete L[g][u[j]]; return L() }; f[S] = !0, l.exports = Object.create || function(j, z) { var U; return j !== null ? (w[g] = s(j), U = new w, w[g] = null, U[S] = j) : U = L(), z === void 0 ? U : d(U, z) } }, function(l, o, t) { var s = t(28), d = t(34), u = t(79), f = function(m) { return function(p, b, x) { var g = s(p), y = d(g.length), S = u(x, y), w; if (m && b != b) { for (; y > S;) if (w = g[S++], w != w) return !0 } else for (; y > S; S++) if ((m || S in g) && g[S] === b) return m || S || 0; return !m && -1 } }; l.exports = { includes: f(!0), indexOf: f(!1) } }, function(l, o, t) { var s = t(62), d = Math.max, u = Math.min; l.exports = function(f, c) { var m = s(f); return m < 0 ? d(m + c, 0) : u(m, c) } }, function(l, o) { l.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf" ] }, function(l, o, t) { var s = t(10), d = s("toStringTag"), u = {}; u[d] = "z", l.exports = String(u) === "[object z]" }, function(l, o) { l.exports = function() {} }, function(l, o) { l.exports = function(t, s, d) { if (!(t instanceof s)) throw TypeError("Incorrect " + (d ? d + " " : "") + "invocation"); return t } }, function(l, o, t) { var s = t(35); l.exports = s("navigator", "userAgent") || "" }, function(l, o, t) { var s = t(40), d = function(f) { var c, m; this.promise = new f(function(p, b) { if (c !== void 0 || m !== void 0) throw TypeError( "Bad Promise constructor"); c = p, m = b }), this.resolve = s(c), this.reject = s(m) }; l.exports.f = function(u) { return new d(u) } }, function(l, o, t) { var s = t(8), d = t(84), u = s.process, f = u && u.versions, c = f && f.v8, m, p; c ? (m = c.split("."), p = m[0] + m[1]) : d && (m = d.match(/Edge\/(\d+)/), (! m || m[1] >= 74) && (m = d.match(/Chrome\/(\d+)/), m && (p = m[1]))), l .exports = p && +p }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = t(6), p = f.__importDefault(t(267)), b = f.__importDefault(t(280)), x = f.__importDefault(t(281)), g = f.__importDefault(t(282)), y = f.__importDefault(t(301)), S = f.__importStar(t(416)), w = f.__importDefault(t(417)), E = f.__importDefault(t(418)), I = f.__importDefault(t(419)), D = f.__importStar(t(420)), R = f.__importDefault(t(423)), L = f.__importDefault(t(424)), B = f.__importDefault(t(425)), j = f.__importDefault(t(427)), z = f.__importDefault(t(437)), U = f.__importDefault(t(440)), N = f.__importStar(t(441)), H = f.__importDefault(t(23)), F = f.__importDefault(t(133)), V = f.__importDefault(t(24)), M = f.__importDefault(t(32)), k = f.__importDefault(t(37)), G = f.__importDefault(t(38)), J = 1, ee = function() { function Z(te, ue) { this.pluginsFunctionList = {}, this.beforeDestroyHooks = [], this .id = "wangEditor-" + J++, this.toolbarSelector = te, this .textSelector = ue, S.selectorValidator(this), this.config = m .deepClone(p.default), this.$toolbarElem = c.default( "
    "), this.$textContainerElem = c.default( "
    "), this.$textElem = c.default("
    "), this.toolbarElemId = "", this.textElemId = "", this.isFocus = ! 1, this.isComposing = !1, this.isCompatibleMode = !1, this .selection = new b.default(this), this.cmd = new x.default( this), this.txt = new g.default(this), this.menus = new y .default(this), this.zIndex = new L.default, this.change = new B .default(this), this.history = new j.default(this), this .onSelectionChange = new U.default(this); var ge = z.default(this), ve = ge.disable, ce = ge.enable; this.disable = ve, this.enable = ce, this.isEnable = !0 } return Z.prototype.initSelection = function(te) { w.default(this, te) }, Z.prototype.create = function() { this.zIndex.init(this), this.isCompatibleMode = this.config .compatibleMode(), this.isCompatibleMode || (this.config .onchangeTimeout = 30), I.default(this), S.default( this), this.txt.init(), this.menus.init(), D.default(this), this.initSelection(!0), E.default(this), this.change .observe(), this.history.observe(), N.default(this) }, Z.prototype.beforeDestroy = function(te) { return this.beforeDestroyHooks.push(te), this }, Z.prototype.destroy = function() { var te, ue = this; (0, u.default)(te = this.beforeDestroyHooks).call(te, function( ge) { return ge.call(ue) }), this.$toolbarElem.remove(), this.$textContainerElem .remove() }, Z.prototype.fullScreen = function() { D.setFullScreen(this) }, Z.prototype.unFullScreen = function() { D.setUnFullScreen(this) }, Z.prototype.scrollToHead = function(te) { R.default(this, te) }, Z.registerMenu = function(te, ue) { !ue || typeof ue != "function" || (Z .globalCustomMenuConstructorList[te] = ue) }, Z.prototype.registerPlugin = function(te, ue) { N.registerPlugin(te, ue, this.pluginsFunctionList) }, Z.registerPlugin = function(te, ue) { N.registerPlugin(te, ue, Z.globalPluginsFunctionList) }, Z.$ = c.default, Z.BtnMenu = H.default, Z.DropList = F.default, Z .DropListMenu = V.default, Z.Panel = M.default, Z.PanelMenu = k .default, Z.Tooltip = G.default, Z .globalCustomMenuConstructorList = {}, Z .globalPluginsFunctionList = {}, Z }(); o.default = ee }, function(l, o, t) { var s = t(13), d = t(55), u = t(10), f = u("species"); l.exports = function(c, m) { var p; return d(c) && (p = c.constructor, typeof p == "function" && (p === Array || d(p.prototype)) ? p = void 0 : s(p) && (p = p[f], p === null && (p = void 0))), new(p === void 0 ? Array : p)( m === 0 ? 0 : m) } }, function(l, o, t) { l.exports = t(185) }, function(l, o, t) { var s = t(49), d = t(68), u = "[" + d + "]", f = RegExp("^" + u + u + "*"), c = RegExp(u + u + "*$"), m = function(b) { return function(x) { var g = String(s(x)); return b & 1 && (g = g.replace(f, "")), b & 2 && (g = g.replace( c, "")), g } }; l.exports = { start: m(1), end: m(2), trim: m(3) } }, function(l, o, t) { l.exports = t(205) }, function(l, o, t) { var s = t(227), d = t(230); function u(f) { return typeof d == "function" && typeof s == "symbol" ? l.exports = u = function(m) { return typeof m } : l.exports = u = function(m) { return m && typeof d == "function" && m.constructor === d && m !== d .prototype ? "symbol" : typeof m }, u(f) } l.exports = u }, function(l, o, t) { var s = t(10); o.f = s }, function(l, o, t) { l.exports = t(306) }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(32)), m = function() { function p(b, x) { var g = this; this.$elem = b, this.editor = x, this._active = !1, b.on("click", function(y) { var S; c.default.hideCurAllPanels(), (0, u.default)(S = x.txt .eventHooks.menuClickEvents).call(S, function( w) { return w() }), y.stopPropagation(), x.selection.getRange() != null && g.clickHandler(y) }) } return p.prototype.clickHandler = function(b) {}, p.prototype.active = function() { this._active = !0, this.$elem.addClass("w-e-active") }, p.prototype.unActive = function() { this._active = !1, this.$elem.removeClass("w-e-active") }, (0, d.default)(p.prototype, "isActive", { get: function() { return this._active }, enumerable: !1, configurable: !0 }), p }(); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(57)), f = s(t(4)), c = s(t(27)); (0, d.default)(o, "__esModule", { value: !0 }); var m = t(2), p = t(6), b = m.__importDefault(t(135)), x = m.__importDefault(t(136)), g = function() { function y(S) { this.editor = S } return y.prototype.insertImg = function(S, w, E) { var I = this.editor, D = I.config, R = "validate.", L = function(N, H) { return H === void 0 && (H = R), I.i18next.t(H + N) }, B = w ? 'alt="' + w + '" ' : "", j = E ? 'data-href="' + encodeURIComponent(E) + '" ' : ""; I.cmd.do("insertHTML", ''), D .linkImgCallback(S, w, E); var z = document.createElement("img"); z.onload = function() { z = null }, z.onerror = function() { D.customAlert(L("\u63D2\u5165\u56FE\u7247\u9519\u8BEF"), "error", "wangEditor: " + L( "\u63D2\u5165\u56FE\u7247\u9519\u8BEF") + "\uFF0C" + L("\u56FE\u7247\u94FE\u63A5") + ' "' + S + '"\uFF0C' + L( "\u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25")), z = null }, z.onabort = function() { return z = null }, z.src = S }, y.prototype.uploadImg = function(S) { var w = this; if (!!S.length) { var E = this.editor, I = E.config, D = "validate.", R = function(oe) { return E.i18next.t(D + oe) }, L = I.uploadImgServer, B = I.uploadImgShowBase64, j = I.uploadImgMaxSize, z = j / 1024 / 1024, U = I.uploadImgMaxLength, N = I.uploadFileName, H = I.uploadImgParams, F = I.uploadImgParamsWithUrl, V = I.uploadImgHeaders, M = I.uploadImgHooks, k = I.uploadImgTimeout, G = I.withCredentials, J = I.customUploadImg; if (!(!J && !L && !B)) { var ee = [], Z = []; if (p.arrForEach(S, function(le) { if (!!le) { var oe = le.name || le.type.replace("/", "."), se = le.size; if (!(!oe || !se)) { var de = E.config.uploadImgAccept .join("|"), Le = ".(" + de + ")$", De = new RegExp(Le, "i"); if (De.test(oe) === !1) { Z.push("\u3010" + oe + "\u3011" + R( "\u4E0D\u662F\u56FE\u7247" )); return } if (j < se) { Z.push("\u3010" + oe + "\u3011" + R( "\u5927\u4E8E") + " " + z + "M"); return } ee.push(le) } } }), Z.length) { I.customAlert(R( "\u56FE\u7247\u9A8C\u8BC1\u672A\u901A\u8FC7" ) + `: ` + Z.join(` `), "warning"); return } if (ee.length === 0) { I.customAlert(R( "\u4F20\u5165\u7684\u6587\u4EF6\u4E0D\u5408\u6CD5" ), "warning"); return } if (ee.length > U) { I.customAlert(R( "\u4E00\u6B21\u6700\u591A\u4E0A\u4F20" ) + U + R("\u5F20\u56FE\u7247"), "warning"); return } if (J && typeof J == "function") { var te; J(ee, (0, u.default)(te = this.insertImg).call(te, this)); return } var ue = new FormData; if ((0, f.default)(ee).call(ee, function(le, oe) { var se = N || le.name; ee.length > 1 && (se = se + (oe + 1)), ue .append(se, le) }), L) { var ge = L.split("#"); L = ge[0]; var ve = ge[1] || ""; (0, f.default)(p).call(p, H, function(le, oe) { F && ((0, c.default)(L).call(L, "?") > 0 ? L += "&" : L += "?", L = L + le + "=" + oe), ue.append(le, oe) }), ve && (L += "#" + ve); var ce = b.default(L, { timeout: k, formData: ue, headers: V, withCredentials: !!G, beforeSend: function(oe) { if (M.before) return M.before( oe, E, ee) }, onTimeout: function(oe) { I.customAlert(R( "\u4E0A\u4F20\u56FE\u7247\u8D85\u65F6" ), "error"), M .timeout && M.timeout(oe, E) }, onProgress: function(oe, se) { var de = new x.default(E); se.lengthComputable && (oe = se .loaded / se.total, de .show(oe)) }, onError: function(oe) { I.customAlert(R( "\u4E0A\u4F20\u56FE\u7247\u9519\u8BEF" ), "error", R( "\u4E0A\u4F20\u56FE\u7247\u9519\u8BEF" ) + "\uFF0C" + R( "\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001" ) + ": " + oe .status), M.error && M .error(oe, E) }, onFail: function(oe, se) { I.customAlert(R( "\u4E0A\u4F20\u56FE\u7247\u5931\u8D25" ), "error", R( "\u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF" ) + ("\uFF0C" + R( "\u8FD4\u56DE\u7ED3\u679C" ) + ": ") + se), M .fail && M.fail(oe, E, se) }, onSuccess: function(oe, se) { if (M.customInsert) { var de; M.customInsert((0, u .default)(de = w .insertImg) .call(de, w), se, E); return } if (se.errno != "0") { I.customAlert(R( "\u4E0A\u4F20\u56FE\u7247\u5931\u8D25" ), "error", R( "\u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF" ) + "\uFF0C" + R( "\u8FD4\u56DE\u7ED3\u679C") + " errno=" + se.errno ), M.fail && M.fail( oe, E, se); return } var Le = se.data; (0, f.default)(Le).call(Le, function(De) { typeof De == "string" ? w .insertImg(De) : w.insertImg(De .url, De .alt, De .href) }), M.success && M .success(oe, E, se) } }); typeof ce == "string" && I.customAlert(ce, "error"); return } B && p.arrForEach(S, function(le) { var oe = w, se = new FileReader; se.readAsDataURL(le), se.onload = function() { if (!!this.result) { var de = this.result.toString(); oe.insertImg(de, de) } } }) } } }, y }(); o.default = g }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(410)), f = s(t(4)), c = s(t(45)); (0, d.default)(o, "__esModule", { value: !0 }), o.dealTextNode = o.isAllTodo = o.isTodo = o.getCursorNextNode = void 0; function m(y) { return y.length ? y.attr("class") === "w-e-todo" : !1 } o.isTodo = m; function p(y) { var S = y.selection.getSelectionRangeTopNodes(); if (S.length !== 0) return (0, u.default)(S).call(S, function(w) { return m(w) }) } o.isAllTodo = p; function b(y, S, w) { var E; if (!!y.hasChildNodes()) { var I = y.cloneNode(), D = !1; S.nodeValue === "" && (D = !0); var R = []; return (0, f.default)(E = y.childNodes).call(E, function(L) { if (!x(L, S) && D && (I.appendChild(L.cloneNode(!0)), L .nodeName !== "BR" && R.push(L)), x(L, S)) { if (L.nodeType === 1) { var B = b(L, S, w); B && B.textContent !== "" && (I == null || I .appendChild(B)) } if (L.nodeType === 3 && S.isEqualNode(L)) { var j = g(L, w); I.textContent = j } D = !0 } }), (0, f.default)(R).call(R, function(L) { var B = L; B.remove() }), I } } o.getCursorNextNode = b; function x(y, S) { return y.nodeType === 3 ? y.nodeValue === S.nodeValue : y.contains(S) } function g(y, S, w) { w === void 0 && (w = !0); var E = y.nodeValue, I = E == null ? void 0 : (0, c.default)(E).call(E, 0, S); if (E = E == null ? void 0 : (0, c.default)(E).call(E, S), !w) { var D = E; E = I, I = D } return y.nodeValue = I, E } o.dealTextNode = g }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(430), f = function() { function c(m) { this.maxSize = m, this.isRe = !1, this.data = new u.CeilStack(m), this.revokeData = new u.CeilStack(m) } return (0, d.default)(c.prototype, "size", { get: function() { return [this.data.size, this.revokeData.size] }, enumerable: !1, configurable: !0 }), c.prototype.resetMaxSize = function(m) { this.data.resetMax(m), this.revokeData.resetMax(m) }, c.prototype.save = function(m) { return this.isRe && (this.revokeData.clear(), this.isRe = !1), this.data.instack(m), this }, c.prototype.revoke = function(m) { !this.isRe && (this.isRe = !0); var p = this.data.outstack(); return p ? (this.revokeData.instack(p), m(p), !0) : !1 }, c.prototype.restore = function(m) { !this.isRe && (this.isRe = !0); var p = this.revokeData.outstack(); return p ? (this.data.instack(p), m(p), !0) : !1 }, c }(); o.default = f }, function(l, o, t) { var s = t(14), d = t(11), u = t(73); l.exports = !s && !d(function() { return Object.defineProperty(u("div"), "a", { get: function() { return 7 } }).a != 7 }) }, function(l, o, t) { var s = t(11), d = /#|\.prototype\./, u = function(x, g) { var y = c[f(x)]; return y == p ? !0 : y == m ? !1 : typeof g == "function" ? s(g) : !!g }, f = u.normalize = function(b) { return String(b).replace(d, ".").toLowerCase() }, c = u.data = {}, m = u.NATIVE = "N", p = u.POLYFILL = "P"; l.exports = u }, function(l, o, t) { var s = t(102), d = Function.toString; typeof s.inspectSource != "function" && (s.inspectSource = function(u) { return d.call(u) }), l.exports = s.inspectSource }, function(l, o, t) { var s = t(8), d = t(166), u = "__core-js_shared__", f = s[u] || d(u, {}); l.exports = f }, function(l, o, t) { var s = t(104), d = t(19), u = t(16), f = t(10), c = t(42), m = f("iterator"), p = !1, b = function() { return this }, x, g, y; [].keys && (y = [].keys(), "next" in y ? (g = s(s(y)), g !== Object.prototype && (x = g)) : p = !0), x == null && (x = {}), !c && !u(x, m) && d(x, m, b), l.exports = { IteratorPrototype: x, BUGGY_SAFARI_ITERATORS: p } }, function(l, o, t) { var s = t(16), d = t(29), u = t(63), f = t(168), c = u("IE_PROTO"), m = Object.prototype; l.exports = f ? Object.getPrototypeOf : function(p) { return p = d(p), s(p, c) ? p[c] : typeof p.constructor == "function" && p instanceof p.constructor ? p.constructor.prototype : p instanceof Object ? m : null } }, function(l, o, t) { var s = t(76); l.exports = s && !Symbol.sham && _typeof(Symbol.iterator) == "symbol" }, function(l, o, t) { var s = t(16), d = t(28), u = t(78).indexOf, f = t(51); l.exports = function(c, m) { var p = d(c), b = 0, x = [], g; for (g in p) !s(f, g) && s(p, g) && x.push(g); for (; m.length > b;) s(p, g = m[b++]) && (~u(x, g) || x.push(g)); return x } }, function(l, o, t) { var s = t(35); l.exports = s("document", "documentElement") }, function(l, o, t) { var s = t(8); l.exports = s.Promise }, function(l, o, t) { var s = t(53); l.exports = function(d, u, f) { for (var c in u) f && f.unsafe && d[c] ? d[c] = u[c] : s(d, c, u[c], f); return d } }, function(l, o, t) { var s = t(35), d = t(18), u = t(10), f = t(14), c = u("species"); l.exports = function(m) { var p = s(m), b = d.f; f && p && !p[c] && b(p, c, { configurable: !0, get: function() { return this } }) } }, function(l, o, t) { var s = t(10), d = t(43), u = s("iterator"), f = Array.prototype; l.exports = function(c) { return c !== void 0 && (d.Array === c || f[u] === c) } }, function(l, o, t) { var s = t(65), d = t(43), u = t(10), f = u("iterator"); l.exports = function(c) { if (c != null) return c[f] || c["@@iterator"] || d[s(c)] } }, function(l, o, t) { var s = t(25); l.exports = function(d, u, f, c) { try { return c ? u(s(f)[0], f[1]) : u(f) } catch (p) { var m = d.return; throw m !== void 0 && s(m.call(d)), p } } }, function(l, o, t) { var s = t(10), d = s("iterator"), u = !1; try { var f = 0, c = { next: function() { return { done: !!f++ } }, return: function() { u = !0 } }; c[d] = function() { return this }, Array.from(c, function() { throw 2 }) } catch {} l.exports = function(m, p) { if (!p && !u) return !1; var b = !1; try { var x = {}; x[d] = function() { return { next: function() { return { done: b = !0 } } } }, m(x) } catch {} return b } }, function(l, o, t) { var s = t(25), d = t(40), u = t(10), f = u("species"); l.exports = function(c, m) { var p = s(c).constructor, b; return p === void 0 || (b = s(p)[f]) == null ? m : d(b) } }, function(l, o, t) { var s = t(8), d = t(11), u = t(33), f = t(39), c = t(107), m = t(73), p = t(117), b = s.location, x = s.setImmediate, g = s.clearImmediate, y = s.process, S = s.MessageChannel, w = s.Dispatch, E = 0, I = {}, D = "onreadystatechange", R, L, B, j = function(F) { if (I.hasOwnProperty(F)) { var V = I[F]; delete I[F], V() } }, z = function(F) { return function() { j(F) } }, U = function(F) { j(F.data) }, N = function(F) { s.postMessage(F + "", b.protocol + "//" + b.host) }; (!x || !g) && (x = function(F) { for (var V = [], M = 1; arguments.length > M;) V.push(arguments[M++]); return I[++E] = function() { (typeof F == "function" ? F : Function(F)).apply(void 0, V) }, R(E), E }, g = function(F) { delete I[F] }, u(y) == "process" ? R = function(F) { y.nextTick(z(F)) } : w && w.now ? R = function(F) { w.now(z(F)) } : S && !p ? (L = new S, B = L.port2, L.port1.onmessage = U, R = f(B .postMessage, B, 1)) : s.addEventListener && typeof postMessage == "function" && !s.importScripts && !d(N) && b.protocol !== "file:" ? (R = N, s.addEventListener("message", U, !1)) : D in m("script") ? R = function( F) { c.appendChild(m("script"))[D] = function() { c.removeChild(this), j(F) } } : R = function(F) { setTimeout(z(F), 0) }), l.exports = { set: x, clear: g } }, function(l, o, t) { var s = t(84); l.exports = /(iphone|ipod|ipad).*applewebkit/i.test(s) }, function(l, o, t) { var s = t(25), d = t(13), u = t(85); l.exports = function(f, c) { if (s(f), d(c) && c.constructor === f) return c; var m = u.f(f), p = m.resolve; return p(c), m.promise } }, function(l, o) { l.exports = function(t) { try { return { error: !1, value: t() } } catch (s) { return { error: !0, value: s } } } }, function(l, o, t) { l.exports = t(197) }, function(l, o, t) { var s = t(5), d = t(8), u = t(122), f = t(11), c = t(19), m = t(66), p = t(83), b = t(13), x = t(36), g = t(18).f, y = t(30).forEach, S = t(14), w = t(41), E = w.set, I = w.getterFor; l.exports = function(D, R, L) { var B = D.indexOf("Map") !== -1, j = D.indexOf("Weak") !== -1, z = B ? "set" : "add", U = d[D], N = U && U.prototype, H = {}, F; if (!S || typeof U != "function" || !(j || N.forEach && !f(function() { new U().entries().next() }))) F = L.getConstructor(R, D, B, z), u.REQUIRED = !0; else { F = R(function(M, k) { E(p(M, F, D), { type: D, collection: new U }), k != null && m(k, M[z], M, B) }); var V = I(D); y(["add", "clear", "delete", "forEach", "get", "has", "set", "keys", "values", "entries" ], function(M) { var k = M == "add" || M == "set"; M in N && !(j && M == "clear") && c(F.prototype, M, function(G, J) { var ee = V(this).collection; if (!k && j && !b(G)) return M == "get" ? void 0 : !1; var Z = ee[M](G === 0 ? 0 : G, J); return k ? this : Z }) }), j || g(F.prototype, "size", { configurable: !0, get: function() { return V(this).collection.size } }) } return x(F, D, !1, !0), H[D] = F, s({ global: !0, forced: !0 }, H), j || L.setStrong(F, D, B), F } }, function(l, o, t) { var s = t(51), d = t(13), u = t(16), f = t(18).f, c = t(64), m = t(200), p = c("meta"), b = 0, x = Object.isExtensible || function() { return !0 }, g = function(D) { f(D, p, { value: { objectID: "O" + ++b, weakData: {} } }) }, y = function(D, R) { if (!d(D)) return _typeof(D) == "symbol" ? D : (typeof D == "string" ? "S" : "P") + D; if (!u(D, p)) { if (!x(D)) return "F"; if (!R) return "E"; g(D) } return D[p].objectID }, S = function(D, R) { if (!u(D, p)) { if (!x(D)) return !0; if (!R) return !1; g(D) } return D[p].weakData }, w = function(D) { return m && E.REQUIRED && x(D) && !u(D, p) && g(D), D }, E = l.exports = { REQUIRED: !1, fastKey: y, getWeakData: S, onFreeze: w }; s[p] = !0 }, function(l, o, t) { var s = t(18).f, d = t(77), u = t(109), f = t(39), c = t(83), m = t(66), p = t(75), b = t(110), x = t(14), g = t(122).fastKey, y = t(41), S = y.set, w = y.getterFor; l.exports = { getConstructor: function(I, D, R, L) { var B = I(function(N, H) { c(N, B, D), S(N, { type: D, index: d(null), first: void 0, last: void 0, size: 0 }), x || (N.size = 0), H != null && m(H, N[L], N, R) }), j = w(D), z = function(H, F, V) { var M = j(H), k = U(H, F), G, J; return k ? k.value = V : (M.last = k = { index: J = g(F, !0), key: F, value: V, previous: G = M.last, next: void 0, removed: !1 }, M.first || (M.first = k), G && (G.next = k), x ? M.size++ : H.size++, J !== "F" && (M.index[ J] = k)), H }, U = function(H, F) { var V = j(H), M = g(F), k; if (M !== "F") return V.index[M]; for (k = V.first; k; k = k.next) if (k.key == F) return k }; return u(B.prototype, { clear: function() { for (var H = this, F = j(H), V = F.index, M = F.first; M;) M.removed = !0, M .previous && (M.previous = M.previous .next = void 0), delete V[M.index], M = M.next; F.first = F.last = void 0, x ? F.size = 0 : H.size = 0 }, delete: function(H) { var F = this, V = j(F), M = U(F, H); if (M) { var k = M.next, G = M.previous; delete V.index[M.index], M.removed = !0, G && (G.next = k), k && (k .previous = G), V.first == M && (V.first = k), V.last == M && (V .last = G), x ? V.size-- : F .size-- } return !!M }, forEach: function(H) { for (var F = j(this), V = f(H, arguments .length > 1 ? arguments[1] : void 0, 3), M; M = M ? M.next : F .first;) for (V(M.value, M.key, this); M && M .removed;) M = M.previous }, has: function(H) { return !!U(this, H) } }), u(B.prototype, R ? { get: function(H) { var F = U(this, H); return F && F.value }, set: function(H, F) { return z(this, H === 0 ? 0 : H, F) } } : { add: function(H) { return z(this, H = H === 0 ? 0 : H, H) } }), x && s(B.prototype, "size", { get: function() { return j(this).size } }), B }, setStrong: function(I, D, R) { var L = D + " Iterator", B = w(D), j = w(L); p(I, D, function(z, U) { S(this, { type: L, target: z, state: B(z), kind: U, last: void 0 }) }, function() { for (var z = j(this), U = z.kind, N = z.last; N && N .removed;) N = N.previous; return !z.target || !(z.last = N = N ? N.next : z .state.first) ? (z.target = void 0, { value: void 0, done: !0 }) : U == "keys" ? { value: N.key, done: !1 } : U == "values" ? { value: N.value, done: !1 } : { value: [N.key, N.value], done: !1 } }, R ? "entries" : "values", !R, !0), b(D) } } }, function(l, o, t) { var s = t(12); s("iterator") }, function(l, o, t) { var s = t(106), d = t(80), u = d.concat("length", "prototype"); o.f = Object.getOwnPropertyNames || function(c) { return s(c, u) } }, function(l, o) { o.f = Object.getOwnPropertySymbols }, function(l, o, t) { l.exports = t(268) }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.default = { zIndex: 1e4 } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.default = { focus: !0, height: 300, placeholder: "\u8BF7\u8F93\u5165\u6B63\u6587", zIndexFullScreen: 10002, showFullScreen: !0 } }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }), o.getPasteImgs = o.getPasteHtml = o.getPasteText = void 0; var f = t(2), c = t(6), m = f.__importDefault(t(292)); function p(g) { var y = g.clipboardData, S = ""; return y == null ? S = window.clipboardData && window.clipboardData.getData( "text") : S = y.getData("text/plain"), c.replaceHtmlSymbol(S) } o.getPasteText = p; function b(g, y, S) { y === void 0 && (y = !0), S === void 0 && (S = !1); var w = g.clipboardData, E = ""; if (w && (E = w.getData("text/html")), !E) { var I = p(g); if (!I) return ""; E = "

    " + I + "

    " } return E = E.replace(/<(\d)/gm, function(D, R) { return "<" + R }), E = E.replace(/<(\/?meta.*?)>/gim, ""), E = m.default(E, y, S), E } o.getPasteHtml = b; function x(g) { var y, S = [], w = p(g); if (w) return S; var E = (y = g.clipboardData) === null || y === void 0 ? void 0 : y.items; return E && (0, u.default)(c).call(c, E, function(I, D) { var R = D.type; /image/i.test(R) && S.push(D.getAsFile()) }), S } o.getPasteImgs = x }, function(l, o, t) { l.exports = t(294) }, function(l, o, t) { l.exports = t(310) }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)), f = s(t(46)); (0, d.default)(o, "__esModule", { value: !0 }); var c = t(2), m = c.__importDefault(t(3)), p = t(7), b = function() { function x(g, y) { var S = this; this.hideTimeoutId = 0, this.menu = g, this.conf = y; var w = m.default('
    '), E = m.default("

    " + y.title + "

    "); E.addClass("w-e-dp-title"), w.append(E); var I = y.list || [], D = y.type || "list", R = y.clickHandler || p.EMPTY_FN, L = m.default(''); (0, u.default)(I).call(I, function(B) { var j = B.$elem, z = B.value, U = m.default('
  • '); j && (U.append(j), L.append(U), U.on("click", function( N) { R(z), N.stopPropagation(), S .hideTimeoutId = (0, f.default)( function() { S.hide() }) })) }), w.append(L), w.on("mouseleave", function() { S.hideTimeoutId = (0, f.default)(function() { S.hide() }) }), this.$container = w, this.rendered = !1, this._show = !1 } return x.prototype.show = function() { this.hideTimeoutId && clearTimeout(this.hideTimeoutId); var g = this.menu, y = g.$elem, S = this.$container; if (!this._show) { if (this.rendered) S.show(); else { var w = y.getBoundingClientRect().height || 0, E = this.conf.width || 100; S.css("margin-top", w + "px").css("width", E + "px"), y .append(S), this.rendered = !0 } this._show = !0 } }, x.prototype.hide = function() { var g = this.$container; !this._show || (g.hide(), this._show = !1) }, (0, d.default)(x.prototype, "isShow", { get: function() { return this._show }, enumerable: !1, configurable: !0 }), x }(); o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); function u(f) { var c = f.selection.getSelectionContainerElem(); return c != null && c.length ? c.getNodeName() === "A" : !1 } o.default = u }, function(l, o, t) { var s = t(0), d = s(t(92)), u = s(t(1)), f = s(t(4)); (0, u.default)(o, "__esModule", { value: !0 }); var c = t(6); function m(p, b) { var x = new XMLHttpRequest; if (x.open("POST", p), x.timeout = b.timeout || 10 * 1e3, x.ontimeout = function() { console.error("wangEditor - \u8BF7\u6C42\u8D85\u65F6"), b .onTimeout && b.onTimeout(x) }, x.upload && (x.upload.onprogress = function(y) { var S = y.loaded / y.total; b.onProgress && b.onProgress(S, y) }), b.headers && (0, f.default)(c).call(c, b.headers, function(y, S) { x.setRequestHeader(y, S) }), x.withCredentials = !!b.withCredentials, b.beforeSend) { var g = b.beforeSend(x); if (g && (0, d.default)(g) === "object" && g.prevent) return g.msg } return x.onreadystatechange = function() { if (x.readyState === 4) { var y = x.status; if (!(y < 200) && !(y >= 300 && y < 400)) { if (y >= 400) { console.error( "wangEditor - XHR \u62A5\u9519\uFF0C\u72B6\u6001\u7801 " + y), b.onError && b.onError(x); return } var S = x.responseText, w; if ((0, d.default)(S) !== "object") try { w = JSON.parse(S) } catch { console.error( "wangEditor - \u8FD4\u56DE\u7ED3\u679C\u4E0D\u662F JSON \u683C\u5F0F", S), b.onFail && b.onFail(x, S); return } else w = S; b.onSuccess(x, w) } } }, x.send(b.formData || null), x } o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(342)), f = s(t(46)); (0, d.default)(o, "__esModule", { value: !0 }); var c = t(2), m = c.__importDefault(t(3)), p = function() { function b(x) { this.editor = x, this.$textContainer = x.$textContainerElem, this .$bar = m.default('
    '), this .isShow = !1, this.time = 0, this.timeoutId = 0 } return b.prototype.show = function(x) { var g = this; if (!this.isShow) { this.isShow = !0; var y = this.$bar, S = this.$textContainer; S.append(y), (0, u.default)() - this.time > 100 && x <= 1 && (y.css("width", x * 100 + "%"), this.time = (0, u .default)()); var w = this.timeoutId; w && clearTimeout(w), this.timeoutId = (0, f.default)( function() { g.hide() }, 500) } }, b.prototype.hide = function() { var x = this.$bar; x.remove(), this.isShow = !1, this.time = 0, this.timeoutId = 0 }, b }(); o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.ListType = void 0; var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(24)), m = t(47), p = u.__importStar(t(371)), b; (function(g) { g.OrderedList = "OL", g.UnorderedList = "UL" })(b = o.ListType || (o.ListType = {})); var x = function(g) { u.__extends(y, g); function y(S) { var w = this, E = f.default(`
    `), I = { width: 130, title: "\u5E8F\u5217", type: "list", list: [{ $elem: f.default(`

    ` + S.i18next.t("menus.dropListMenu.list.\u65E0\u5E8F\u5217\u8868") + `

    `), value: b.UnorderedList }, { $elem: f.default(`

    ` + S.i18next.t("menus.dropListMenu.list.\u6709\u5E8F\u5217\u8868") + `

    `), value: b.OrderedList }], clickHandler: function(R) { w.command(R) } }; return w = g.call(this, E, S, I) || this, w } return y.prototype.command = function(S) { var w = this.editor, E = w.selection.getSelectionContainerElem(); E !== void 0 && (this.handleSelectionRangeNodes(S), this .tryChangeActive()) }, y.prototype.validator = function(S, w, E) { return !(!S.length || !w.length || E.equal(S) || E.equal(w)) }, y.prototype.handleSelectionRangeNodes = function(S) { var w = this.editor, E = w.selection, I = S.toLowerCase(), D = E.getSelectionContainerElem(), R = E.getSelectionStartElem().getNodeTop(w), L = E.getSelectionEndElem().getNodeTop(w); if (!!this.validator(R, L, w.$textElem)) { var B = E.getRange(), j = B == null ? void 0 : B.collapsed; w.$textElem.equal(D) || (D = D.getNodeTop(w)); var z = { editor: w, listType: S, listTarget: I, $selectionElem: D, $startElem: R, $endElem: L }, U; this.isOrderElem(D) ? U = p.ClassType.Wrap : this .isOrderElem(R) && this.isOrderElem(L) ? U = p.ClassType .Join : this.isOrderElem(R) ? U = p.ClassType .StartJoin : this.isOrderElem(L) ? U = p.ClassType .EndJoin : U = p.ClassType.Other; var N = new p.default(p.createListHandle(U, z, B)); m.updateRange(w, N.getSelectionRangeElem(), !!j) } }, y.prototype.isOrderElem = function(S) { var w = S.getNodeName(); return w === b.OrderedList || w === b.UnorderedList }, y.prototype.tryChangeActive = function() {}, y }(c.default); o.default = x }, function(l, o, t) { l.exports = t(395) }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); function u(f) { var c = f.selection.getSelectionContainerElem(); return c != null && c.length ? !!(c.getNodeName() == "CODE" || c .getNodeName() == "PRE" || c.parent().getNodeName() == "CODE" || c .parent().getNodeName() == "PRE" || /hljs/.test(c.parent().attr( "class"))) : !1 } o.default = u }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(31)); (0, d.default)(o, "__esModule", { value: !0 }), o.todo = void 0; var f = t(2), c = f.__importDefault(t(3)), m = function() { function b(x) { var g; this.template = '

    ', this.checked = !1, this.$todo = c.default(this.template), this .$child = (g = x == null ? void 0 : x.childNodes()) === null || g === void 0 ? void 0 : g.clone(!0) } return b.prototype.init = function() { var x = this.$child, g = this.getInputContainer(); x && x.insertAfter(g) }, b.prototype.getInput = function() { var x = this.$todo, g = (0, u.default)(x).call(x, "input"); return g }, b.prototype.getInputContainer = function() { var x = this.getInput().parent(); return x }, b.prototype.getTodo = function() { return this.$todo }, b }(); o.todo = m; function p(b) { var x = new m(b); return x.init(), x } o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2); t(146), t(148), t(152), t(154), t(156), t(158), t(160); var f = u.__importDefault(t(87)); u.__exportStar(t(442), o); try {} catch { throw new Error( "\u8BF7\u5728\u6D4F\u89C8\u5668\u73AF\u5883\u4E0B\u8FD0\u884C") } o.default = f.default }, function(l, o, t) { var s = t(143); l.exports = s }, function(l, o, t) { t(144); var s = t(9), d = s.Object, u = l.exports = function(c, m, p) { return d.defineProperty(c, m, p) }; d.defineProperty.sham && (u.sham = !0) }, function(l, o, t) { var s = t(5), d = t(14), u = t(18); s({ target: "Object", stat: !0, forced: !d, sham: !d }, { defineProperty: u.f }) }, function(l, o) { var t; t = function() { return this }(); try { t = t || new Function("return this")() } catch { (typeof window > "u" ? "undefined" : _typeof(window)) === "object" && (t = window) } l.exports = t }, function(l, o, t) { var s = t(20), d = t(147); d = d.__esModule ? d.default : d, typeof d == "string" && (d = [ [l.i, d, ""] ]); var u = {}; u.insert = "head", u.singleton = !1, s(d, u), l.exports = d.locals || {} }, function(l, o, t) { var s = t(21); o = s(!1), o.push([l.i, `.w-e-toolbar, .w-e-text-container, .w-e-menu-panel { padding: 0; margin: 0; box-sizing: border-box; background-color: #fff; /*\u8868\u60C5\u83DC\u5355\u6837\u5F0F*/ /*\u5206\u5272\u7EBF\u6837\u5F0F*/ } .w-e-toolbar h1, .w-e-text-container h1, .w-e-menu-panel h1 { font-size: 32px !important; } .w-e-toolbar h2, .w-e-text-container h2, .w-e-menu-panel h2 { font-size: 24px !important; } .w-e-toolbar h3, .w-e-text-container h3, .w-e-menu-panel h3 { font-size: 18.72px !important; } .w-e-toolbar h4, .w-e-text-container h4, .w-e-menu-panel h4 { font-size: 16px !important; } .w-e-toolbar h5, .w-e-text-container h5, .w-e-menu-panel h5 { font-size: 13.28px !important; } .w-e-toolbar p, .w-e-text-container p, .w-e-menu-panel p { font-size: 16px !important; } .w-e-toolbar .eleImg, .w-e-text-container .eleImg, .w-e-menu-panel .eleImg { cursor: pointer; display: inline-block; font-size: 18px; padding: 0 3px; } .w-e-toolbar *, .w-e-text-container *, .w-e-menu-panel * { padding: 0; margin: 0; box-sizing: border-box; } .w-e-toolbar hr, .w-e-text-container hr, .w-e-menu-panel hr { cursor: pointer; display: block; height: 0px; border: 0; border-top: 3px solid #ccc; margin: 20px 0; } .w-e-clear-fix:after { content: ""; display: table; clear: both; } .w-e-drop-list-item { position: relative; top: 1px; padding-right: 7px; color: #333 !important; } .w-e-drop-list-tl { padding-left: 10px; text-align: left; } `, ""]), l.exports = o }, function(l, o, t) { var s = t(20), d = t(149); d = d.__esModule ? d.default : d, typeof d == "string" && (d = [ [l.i, d, ""] ]); var u = {}; u.insert = "head", u.singleton = !1, s(d, u), l.exports = d.locals || {} }, function(l, o, t) { var s = t(21), d = t(150), u = t(151); o = s(!1); var f = d(u); o.push([l.i, `@font-face { font-family: 'w-e-icon'; src: url(` + f + `) format('truetype'); font-weight: normal; font-style: normal; } [class^="w-e-icon-"], [class*=" w-e-icon-"] { /* use !important to prevent issues with browser extensions that change fonts */ font-family: 'w-e-icon' !important; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .w-e-icon-close:before { content: "\\f00d"; } .w-e-icon-upload2:before { content: "\\e9c6"; } .w-e-icon-trash-o:before { content: "\\f014"; } .w-e-icon-header:before { content: "\\f1dc"; } .w-e-icon-pencil2:before { content: "\\e906"; } .w-e-icon-paint-brush:before { content: "\\f1fc"; } .w-e-icon-image:before { content: "\\e90d"; } .w-e-icon-play:before { content: "\\e912"; } .w-e-icon-location:before { content: "\\e947"; } .w-e-icon-undo:before { content: "\\e965"; } .w-e-icon-redo:before { content: "\\e966"; } .w-e-icon-quotes-left:before { content: "\\e977"; } .w-e-icon-list-numbered:before { content: "\\e9b9"; } .w-e-icon-list2:before { content: "\\e9bb"; } .w-e-icon-link:before { content: "\\e9cb"; } .w-e-icon-happy:before { content: "\\e9df"; } .w-e-icon-bold:before { content: "\\ea62"; } .w-e-icon-underline:before { content: "\\ea63"; } .w-e-icon-italic:before { content: "\\ea64"; } .w-e-icon-strikethrough:before { content: "\\ea65"; } .w-e-icon-table2:before { content: "\\ea71"; } .w-e-icon-paragraph-left:before { content: "\\ea77"; } .w-e-icon-paragraph-center:before { content: "\\ea78"; } .w-e-icon-paragraph-right:before { content: "\\ea79"; } .w-e-icon-paragraph-justify:before { content: "\\ea7a"; } .w-e-icon-terminal:before { content: "\\f120"; } .w-e-icon-page-break:before { content: "\\ea68"; } .w-e-icon-cancel-circle:before { content: "\\ea0d"; } .w-e-icon-font:before { content: "\\ea5c"; } .w-e-icon-text-heigh:before { content: "\\ea5f"; } .w-e-icon-paint-format:before { content: "\\e90c"; } .w-e-icon-indent-increase:before { content: "\\ea7b"; } .w-e-icon-indent-decrease:before { content: "\\ea7c"; } .w-e-icon-row-height:before { content: "\\e9be"; } .w-e-icon-fullscreen_exit:before { content: "\\e900"; } .w-e-icon-fullscreen:before { content: "\\e901"; } .w-e-icon-split-line:before { content: "\\ea0b"; } .w-e-icon-checkbox-checked:before { content: "\\ea52"; } `, ""]), l.exports = o }, function(l, o, t) { l.exports = function(s, d) { return d || (d = {}), s = s && s.__esModule ? s.default : s, typeof s != "string" ? s : (/^['"].*['"]$/.test(s) && (s = s.slice(1, -1)), d .hash && (s += d.hash), /["'() \t\n]/.test(s) || d.needQuotes ? '"'.concat(s.replace(/"/g, '\\"').replace(/\n/g, "\\n"), '"') : s) } }, function(l, o, t) { t.r(o), o.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(l, o, t) { var s = t(20), d = t(153); d = d.__esModule ? d.default : d, typeof d == "string" && (d = [ [l.i, d, ""] ]); var u = {}; u.insert = "head", u.singleton = !1, s(d, u), l.exports = d.locals || {} }, function(l, o, t) { var s = t(21); o = s(!1), o.push([l.i, `.w-e-toolbar { display: flex; padding: 0 6px; flex-wrap: wrap; position: relative; /* \u5355\u4E2A\u83DC\u5355 */ } .w-e-toolbar .w-e-menu { position: relative; display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; text-align: center; cursor: pointer; } .w-e-toolbar .w-e-menu i { color: #999; } .w-e-toolbar .w-e-menu:hover { background-color: #F6F6F6; } .w-e-toolbar .w-e-menu:hover i { color: #333; } .w-e-toolbar .w-e-active i { color: #1e88e5; } .w-e-toolbar .w-e-active:hover i { color: #1e88e5; } .w-e-menu-tooltip { position: absolute; display: flex; color: #f1f1f1; background-color: rgba(0, 0, 0, 0.75); box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15); border-radius: 4px; padding: 4px 5px 6px; justify-content: center; align-items: center; } .w-e-menu-tooltip-up::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid rgba(0, 0, 0, 0); border-top-color: rgba(0, 0, 0, 0.73); } .w-e-menu-tooltip-down::after { content: ""; position: absolute; bottom: 100%; left: 50%; margin-left: -5px; border: 5px solid rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0.73); } .w-e-menu-tooltip-item-wrapper { font-size: 14px; margin: 0 5px; } `, ""]), l.exports = o }, function(l, o, t) { var s = t(20), d = t(155); d = d.__esModule ? d.default : d, typeof d == "string" && (d = [ [l.i, d, ""] ]); var u = {}; u.insert = "head", u.singleton = !1, s(d, u), l.exports = d.locals || {} }, function(l, o, t) { var s = t(21); o = s(!1), o.push([l.i, `.w-e-text-container { position: relative; height: 100%; } .w-e-text-container .w-e-progress { position: absolute; background-color: #1e88e5; top: 0; left: 0; height: 1px; } .w-e-text-container .placeholder { color: #D4D4D4; position: absolute; font-size: 11pt; line-height: 22px; left: 10px; top: 10px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; z-index: -1; } .w-e-text { padding: 0 10px; overflow-y: auto; } .w-e-text p, .w-e-text h1, .w-e-text h2, .w-e-text h3, .w-e-text h4, .w-e-text h5, .w-e-text table, .w-e-text pre { margin: 10px 0; line-height: 1.5; } .w-e-text ul, .w-e-text ol { margin: 10px 0 10px 20px; } .w-e-text blockquote { display: block; border-left: 8px solid #d0e5f2; padding: 5px 10px; margin: 10px 0; line-height: 1.4; font-size: 100%; background-color: #f1f1f1; } .w-e-text code { display: inline-block; background-color: #f1f1f1; border-radius: 3px; padding: 3px 5px; margin: 0 3px; } .w-e-text pre code { display: block; } .w-e-text table { border-top: 1px solid #ccc; border-left: 1px solid #ccc; } .w-e-text table td, .w-e-text table th { border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; padding: 3px 5px; min-height: 30px; height: 30px; } .w-e-text table th { border-bottom: 2px solid #ccc; text-align: center; background-color: #f1f1f1; } .w-e-text:focus { outline: none; } .w-e-text img { cursor: pointer; } .w-e-text img:hover { box-shadow: 0 0 5px #333; } .w-e-text .w-e-todo { margin: 0 0 0 20px; } .w-e-text .w-e-todo li { list-style: none; font-size: 1em; } .w-e-text .w-e-todo li span:nth-child(1) { position: relative; left: -18px; } .w-e-text .w-e-todo li span:nth-child(1) input { position: absolute; margin-right: 3px; } .w-e-text .w-e-todo li span:nth-child(1) input[type=checkbox] { top: 50%; margin-top: -6px; } .w-e-tooltip { position: absolute; display: flex; color: #f1f1f1; background-color: rgba(0, 0, 0, 0.75); box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15); border-radius: 4px; padding: 4px 5px 6px; justify-content: center; align-items: center; } .w-e-tooltip-up::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid rgba(0, 0, 0, 0); border-top-color: rgba(0, 0, 0, 0.73); } .w-e-tooltip-down::after { content: ""; position: absolute; bottom: 100%; left: 50%; margin-left: -5px; border: 5px solid rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0.73); } .w-e-tooltip-item-wrapper { cursor: pointer; font-size: 14px; margin: 0 5px; } .w-e-tooltip-item-wrapper:hover { color: #ccc; text-decoration: underline; } `, ""]), l.exports = o }, function(l, o, t) { var s = t(20), d = t(157); d = d.__esModule ? d.default : d, typeof d == "string" && (d = [ [l.i, d, ""] ]); var u = {}; u.insert = "head", u.singleton = !1, s(d, u), l.exports = d.locals || {} }, function(l, o, t) { var s = t(21); o = s(!1), o.push([l.i, `.w-e-menu .w-e-panel-container { position: absolute; top: 0; left: 50%; border: 1px solid #ccc; border-top: 0; box-shadow: 1px 1px 2px #ccc; color: #333; background-color: #fff; text-align: left; /* \u4E3A emotion panel \u5B9A\u5236\u7684\u6837\u5F0F */ /* \u4E0A\u4F20\u56FE\u7247\u3001\u4E0A\u4F20\u89C6\u9891\u7684 panel \u5B9A\u5236\u6837\u5F0F */ } .w-e-menu .w-e-panel-container .w-e-panel-close { position: absolute; right: 0; top: 0; padding: 5px; margin: 2px 5px 0 0; cursor: pointer; color: #999; } .w-e-menu .w-e-panel-container .w-e-panel-close:hover { color: #333; } .w-e-menu .w-e-panel-container .w-e-panel-tab-title { list-style: none; display: flex; font-size: 14px; margin: 2px 10px 0 10px; border-bottom: 1px solid #f1f1f1; } .w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-item { padding: 3px 5px; color: #999; cursor: pointer; margin: 0 3px; position: relative; top: 1px; } .w-e-menu .w-e-panel-container .w-e-panel-tab-title .w-e-active { color: #333; border-bottom: 1px solid #333; cursor: default; font-weight: 700; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content { padding: 10px 15px 10px 15px; font-size: 16px; /* \u8F93\u5165\u6846\u7684\u6837\u5F0F */ /* \u6309\u94AE\u7684\u6837\u5F0F */ } .w-e-menu .w-e-panel-container .w-e-panel-tab-content input:focus, .w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus, .w-e-menu .w-e-panel-container .w-e-panel-tab-content button:focus { outline: none; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea { width: 100%; border: 1px solid #ccc; padding: 5px; margin-top: 10px; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content textarea:focus { border-color: #1e88e5; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text] { border: none; border-bottom: 1px solid #ccc; font-size: 14px; height: 20px; color: #333; text-align: left; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].small { width: 30px; text-align: center; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text].block { display: block; width: 100%; margin: 10px 0; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { border-bottom: 2px solid #1e88e5; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { font-size: 14px; color: #1e88e5; border: none; padding: 5px 10px; background-color: #fff; cursor: pointer; border-radius: 3px; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { float: left; margin-right: 10px; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { float: right; margin-left: 10px; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { color: #999; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { color: #c24f4a; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { background-color: #f1f1f1; } .w-e-menu .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { content: ""; display: table; clear: both; } .w-e-menu .w-e-panel-container .w-e-emoticon-container .w-e-item { cursor: pointer; font-size: 18px; padding: 0 3px; display: inline-block; } .w-e-menu .w-e-panel-container .w-e-up-img-container, .w-e-menu .w-e-panel-container .w-e-up-video-container { text-align: center; } .w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn, .w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn { display: inline-block; color: #999; cursor: pointer; font-size: 60px; line-height: 1; } .w-e-menu .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover, .w-e-menu .w-e-panel-container .w-e-up-video-container .w-e-up-btn:hover { color: #333; } `, ""]), l.exports = o }, function(l, o, t) { var s = t(20), d = t(159); d = d.__esModule ? d.default : d, typeof d == "string" && (d = [ [l.i, d, ""] ]); var u = {}; u.insert = "head", u.singleton = !1, s(d, u), l.exports = d.locals || {} }, function(l, o, t) { var s = t(21); o = s(!1), o.push([l.i, `.w-e-toolbar .w-e-droplist { position: absolute; left: 0; top: 0; background-color: #fff; border: 1px solid #f1f1f1; border-right-color: #ccc; border-bottom-color: #ccc; } .w-e-toolbar .w-e-droplist .w-e-dp-title { text-align: center; color: #999; line-height: 2; border-bottom: 1px solid #f1f1f1; font-size: 13px; } .w-e-toolbar .w-e-droplist ul.w-e-list { list-style: none; line-height: 1; } .w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item { color: #333; padding: 5px 0; } .w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover { background-color: #f1f1f1; } .w-e-toolbar .w-e-droplist ul.w-e-block { list-style: none; text-align: left; padding: 5px; } .w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item { display: inline-block; padding: 3px 5px; } .w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover { background-color: #f1f1f1; } `, ""]), l.exports = o }, function(l, o, t) { var s = t(0), d = s(t(161)); Element.prototype.matches || (Element.prototype.matches = function(u) { var f = this.ownerDocument.querySelectorAll(u), c = f.length; for (c; c >= 0 && f.item(c) !== this; c--); return c > -1 }), d.default || (window.Promise = d.default) }, function(l, o, t) { l.exports = t(162) }, function(l, o, t) { var s = t(163); l.exports = s }, function(l, o, t) { t(61), t(50), t(54), t(175), t(178), t(179); var s = t(9); l.exports = s.Promise }, function(l, o, t) { var s = t(62), d = t(49), u = function(c) { return function(m, p) { var b = String(d(m)), x = s(p), g = b.length, y, S; return x < 0 || x >= g ? c ? "" : void 0 : (y = b.charCodeAt(x), y < 55296 || y > 56319 || x + 1 === g || (S = b .charCodeAt(x + 1)) < 56320 || S > 57343 ? c ? b .charAt(x) : y : c ? b.slice(x, x + 2) : (y - 55296 << 10) + (S - 56320) + 65536) } }; l.exports = { codeAt: u(!1), charAt: u(!0) } }, function(l, o, t) { var s = t(8), d = t(101), u = s.WeakMap; l.exports = typeof u == "function" && /native code/.test(d(u)) }, function(l, o, t) { var s = t(8), d = t(19); l.exports = function(u, f) { try { d(s, u, f) } catch { s[u] = f } return f } }, function(l, o, t) { var s = t(103).IteratorPrototype, d = t(77), u = t(48), f = t(36), c = t(43), m = function() { return this }; l.exports = function(p, b, x) { var g = b + " Iterator"; return p.prototype = d(s, { next: u(1, x) }), f(p, g, !1, !0), c[g] = m, p } }, function(l, o, t) { var s = t(11); l.exports = !s(function() { function d() {} return d.prototype.constructor = null, Object.getPrototypeOf( new d) !== d.prototype }) }, function(l, o, t) { var s = t(14), d = t(18), u = t(25), f = t(52); l.exports = s ? Object.defineProperties : function(m, p) { u(m); for (var b = f(p), x = b.length, g = 0, y; x > g;) d.f(m, y = b[g++], p[ y]); return m } }, function(l, o, t) { var s = t(81), d = t(65); l.exports = s ? {}.toString : function() { return "[object " + d(this) + "]" } }, function(l, o, t) { var s = t(25), d = t(172); l.exports = Object.setPrototypeOf || ("__proto__" in {} ? function() { var u = !1, f = {}, c; try { c = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set, c.call(f, []), u = f instanceof Array } catch {} return function(p, b) { return s(p), d(b), u ? c.call(p, b) : p.__proto__ = b, p } }() : void 0) }, function(l, o, t) { var s = t(13); l.exports = function(d) { if (!s(d) && d !== null) throw TypeError("Can't set " + String(d) + " as a prototype"); return d } }, function(l, o, t) { var s = t(28), d = t(82), u = t(43), f = t(41), c = t(75), m = "Array Iterator", p = f.set, b = f.getterFor(m); l.exports = c(Array, "Array", function(x, g) { p(this, { type: m, target: s(x), index: 0, kind: g }) }, function() { var x = b(this), g = x.target, y = x.kind, S = x.index++; return !g || S >= g.length ? (x.target = void 0, { value: void 0, done: !0 }) : y == "keys" ? { value: S, done: !1 } : y == "values" ? { value: g[S], done: !1 } : { value: [S, g[S]], done: !1 } }, "values"), u.Arguments = u.Array, d("keys"), d("values"), d("entries") }, function(l, o) { l.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(l, o, t) { var s = t(5), d = t(42), u = t(8), f = t(35), c = t(108), m = t(53), p = t(109), b = t(36), x = t(110), g = t(13), y = t(40), S = t(83), w = t(33), E = t(101), I = t(66), D = t(114), R = t(115), L = t(116).set, B = t(176), j = t(118), z = t(177), U = t(85), N = t(119), H = t(41), F = t(100), V = t(10), M = t(86), k = V("species"), G = "Promise", J = H.get, ee = H.set, Z = H.getterFor(G), te = c, ue = u.TypeError, ge = u.document, ve = u.process, ce = f("fetch"), le = U.f, oe = le, se = w(ve) == "process", de = !!(ge && ge.createEvent && u.dispatchEvent), Le = "unhandledrejection", De = "rejectionhandled", Fe = 0, pt = 1, Pt = 2, Je = 1, ft = 2, ct, Me, gt, jt, At = F(G, function() { var He = E(te) !== String(te); if (!He && (M === 66 || !se && typeof PromiseRejectionEvent != "function") || d && !te.prototype.finally) return !0; if (M >= 51 && /native code/.test(te)) return !1; var Ae = te.resolve(1), me = function(ne) { ne(function() {}, function() {}) }, Re = Ae.constructor = {}; return Re[k] = me, !(Ae.then(function() {}) instanceof me) }), pn = At || !D(function(He) { te.all(He).catch(function() {}) }), Kt = function(Ae) { var me; return g(Ae) && typeof(me = Ae.then) == "function" ? me : !1 }, Nt = function(Ae, me, Re) { if (!me.notified) { me.notified = !0; var xe = me.reactions; B(function() { for (var ne = me.value, Te = me.state == pt, Se = 0; xe .length > Se;) { var be = xe[Se++], Oe = Te ? be.ok : be.fail, xt = be.resolve, Ke = be.reject, Ge = be.domain, je, $t, gn; try { Oe ? (Te || (me.rejection === ft && Ht(Ae, me), me.rejection = Je), Oe === !0 ? je = ne : (Ge && Ge.enter(), je = Oe(ne), Ge && (Ge.exit(), gn = !0)), je === be.promise ? Ke(ue( "Promise-chain cycle")) : ($t = Kt( je)) ? $t.call(je, xt, Ke) : xt(je) ) : Ke(ne) } catch (Wt) { Ge && !gn && Ge.exit(), Ke(Wt) } } me.reactions = [], me.notified = !1, Re && !me .rejection && Xt(Ae, me) }) } }, Lt = function(Ae, me, Re) { var xe, ne; de ? (xe = ge.createEvent("Event"), xe.promise = me, xe.reason = Re, xe .initEvent(Ae, !1, !0), u.dispatchEvent(xe)) : xe = { promise: me, reason: Re }, (ne = u["on" + Ae]) ? ne(xe) : Ae === Le && z( "Unhandled promise rejection", Re) }, Xt = function(Ae, me) { L.call(u, function() { var Re = me.value, xe = Ot(me), ne; if (xe && (ne = N(function() { se ? ve.emit("unhandledRejection", Re, Ae) : Lt(Le, Ae, Re) }), me.rejection = se || Ot(me) ? ft : Je, ne.error)) throw ne.value }) }, Ot = function(Ae) { return Ae.rejection !== Je && !Ae.parent }, Ht = function(Ae, me) { L.call(u, function() { se ? ve.emit("rejectionHandled", Ae) : Lt(De, Ae, me.value) }) }, nt = function(Ae, me, Re, xe) { return function(ne) { Ae(me, Re, ne, xe) } }, ze = function(Ae, me, Re, xe) { me.done || (me.done = !0, xe && (me = xe), me.value = Re, me.state = Pt, Nt(Ae, me, !0)) }, wt = function He(Ae, me, Re, xe) { if (!me.done) { me.done = !0, xe && (me = xe); try { if (Ae === Re) throw ue("Promise can't be resolved itself"); var ne = Kt(Re); ne ? B(function() { var Te = { done: !1 }; try { ne.call(Re, nt(He, Ae, Te, me), nt(ze, Ae, Te, me)) } catch (Se) { ze(Ae, Te, Se, me) } }) : (me.value = Re, me.state = pt, Nt(Ae, me, !1)) } catch (Te) { ze(Ae, { done: !1 }, Te, me) } } }; At && (te = function(Ae) { S(this, te, G), y(Ae), ct.call(this); var me = J(this); try { Ae(nt(wt, this, me), nt(ze, this, me)) } catch (Re) { ze(this, me, Re) } }, ct = function(Ae) { ee(this, { type: G, done: !1, notified: !1, parent: !1, reactions: [], rejection: !1, state: Fe, value: void 0 }) }, ct.prototype = p(te.prototype, { then: function(Ae, me) { var Re = Z(this), xe = le(R(this, te)); return xe.ok = typeof Ae == "function" ? Ae : !0, xe .fail = typeof me == "function" && me, xe.domain = se ? ve.domain : void 0, Re.parent = !0, Re .reactions.push(xe), Re.state != Fe && Nt(this, Re, !1), xe.promise }, catch: function(Ae) { return this.then(void 0, Ae) } }), Me = function() { var Ae = new ct, me = J(Ae); this.promise = Ae, this.resolve = nt(wt, Ae, me), this.reject = nt( ze, Ae, me) }, U.f = le = function(Ae) { return Ae === te || Ae === gt ? new Me(Ae) : oe(Ae) }, !d && typeof c == "function" && (jt = c.prototype.then, m(c .prototype, "then", function(Ae, me) { var Re = this; return new te(function(xe, ne) { jt.call(Re, xe, ne) }).then(Ae, me) }, { unsafe: !0 }), typeof ce == "function" && s({ global: !0, enumerable: !0, forced: !0 }, { fetch: function(Ae) { return j(te, ce.apply(u, arguments)) } }))), s({ global: !0, wrap: !0, forced: At }, { Promise: te }), b(te, G, !1, !0), x(G), gt = f(G), s({ target: G, stat: !0, forced: At }, { reject: function(Ae) { var me = le(this); return me.reject.call(void 0, Ae), me.promise } }), s({ target: G, stat: !0, forced: d || At }, { resolve: function(Ae) { return j(d && this === gt ? te : this, Ae) } }), s({ target: G, stat: !0, forced: pn }, { all: function(Ae) { var me = this, Re = le(me), xe = Re.resolve, ne = Re.reject, Te = N(function() { var Se = y(me.resolve), be = [], Oe = 0, xt = 1; I(Ae, function(Ke) { var Ge = Oe++, je = !1; be.push(void 0), xt++, Se.call(me, Ke).then(function($t) { je || (je = !0, be[Ge] = $t, --xt || xe( be)) }, ne) }), --xt || xe(be) }); return Te.error && ne(Te.value), Re.promise }, race: function(Ae) { var me = this, Re = le(me), xe = Re.reject, ne = N(function() { var Te = y(me.resolve); I(Ae, function(Se) { Te.call(me, Se).then(Re.resolve, xe) }) }); return ne.error && xe(ne.value), Re.promise } }) }, function(l, o, t) { var s = t(8), d = t(71).f, u = t(33), f = t(116).set, c = t(117), m = s.MutationObserver || s.WebKitMutationObserver, p = s.process, b = s.Promise, x = u(p) == "process", g = d(s, "queueMicrotask"), y = g && g.value, S, w, E, I, D, R, L, B; y || (S = function() { var z, U; for (x && (z = p.domain) && z.exit(); w;) { U = w.fn, w = w.next; try { U() } catch (N) { throw w ? I() : E = void 0, N } } E = void 0, z && z.enter() }, x ? I = function() { p.nextTick(S) } : m && !c ? (D = !0, R = document.createTextNode(""), new m(S) .observe(R, { characterData: !0 }), I = function() { R.data = D = !D }) : b && b.resolve ? (L = b.resolve(void 0), B = L.then, I = function() { B.call(L, S) }) : I = function() { f.call(s, S) }), l.exports = y || function(j) { var z = { fn: j, next: void 0 }; E && (E.next = z), w || (w = z, I()), E = z } }, function(l, o, t) { var s = t(8); l.exports = function(d, u) { var f = s.console; f && f.error && (arguments.length === 1 ? f.error(d) : f.error(d, u)) } }, function(l, o, t) { var s = t(5), d = t(40), u = t(85), f = t(119), c = t(66); s({ target: "Promise", stat: !0 }, { allSettled: function(p) { var b = this, x = u.f(b), g = x.resolve, y = x.reject, S = f(function() { var w = d(b.resolve), E = [], I = 0, D = 1; c(p, function(R) { var L = I++, B = !1; E.push(void 0), D++, w.call(b, R) .then(function(j) { B || (B = !0, E[L] = { status: "fulfilled", value: j }, --D || g(E)) }, function(j) { B || (B = !0, E[L] = { status: "rejected", reason: j }, --D || g(E)) }) }), --D || g(E) }); return S.error && y(S.value), x.promise } }) }, function(l, o, t) { var s = t(5), d = t(42), u = t(108), f = t(11), c = t(35), m = t(115), p = t(118), b = t(53), x = !!u && f(function() { u.prototype.finally.call({ then: function() {} }, function() {}) }); s({ target: "Promise", proto: !0, real: !0, forced: x }, { finally: function(y) { var S = m(this, c("Promise")), w = typeof y == "function"; return this.then(w ? function(E) { return p(S, y()).then(function() { return E }) } : y, w ? function(E) { return p(S, y()).then(function() { throw E }) } : y) } }), !d && typeof u == "function" && !u.prototype.finally && b(u.prototype, "finally", c("Promise").prototype.finally) }, function(l, o, t) { t(54); var s = t(181), d = t(65), u = Array.prototype, f = { DOMTokenList: !0, NodeList: !0 }; l.exports = function(c) { var m = c.forEach; return c === u || c instanceof Array && m === u.forEach || f .hasOwnProperty(d(c)) ? s : m } }, function(l, o, t) { var s = t(182); l.exports = s }, function(l, o, t) { t(183); var s = t(15); l.exports = s("Array").forEach }, function(l, o, t) { var s = t(5), d = t(184); s({ target: "Array", proto: !0, forced: [].forEach != d }, { forEach: d }) }, function(l, o, t) { var s = t(30).forEach, d = t(67), u = t(22), f = d("forEach"), c = u("forEach"); l.exports = !f || !c ? function(p) { return s(this, p, arguments.length > 1 ? arguments[1] : void 0) } : [].forEach }, function(l, o, t) { var s = t(186); l.exports = s }, function(l, o, t) { t(187); var s = t(9); l.exports = s.Array.isArray }, function(l, o, t) { var s = t(5), d = t(55); s({ target: "Array", stat: !0 }, { isArray: d }) }, function(l, o, t) { var s = t(189); l.exports = s }, function(l, o, t) { var s = t(190), d = Array.prototype; l.exports = function(u) { var f = u.map; return u === d || u instanceof Array && f === d.map ? s : f } }, function(l, o, t) { t(191); var s = t(15); l.exports = s("Array").map }, function(l, o, t) { var s = t(5), d = t(30).map, u = t(56), f = t(22), c = u("map"), m = f("map"); s({ target: "Array", proto: !0, forced: !c || !m }, { map: function(b) { return d(this, b, arguments.length > 1 ? arguments[1] : void 0) } }) }, function(l, o, t) { var s = t(193); l.exports = s }, function(l, o, t) { var s = t(194), d = String.prototype; l.exports = function(u) { var f = u.trim; return typeof u == "string" || u === d || u instanceof String && f === d .trim ? s : f } }, function(l, o, t) { t(195); var s = t(15); l.exports = s("String").trim }, function(l, o, t) { var s = t(5), d = t(90).trim, u = t(196); s({ target: "String", proto: !0, forced: u("trim") }, { trim: function() { return d(this) } }) }, function(l, o, t) { var s = t(11), d = t(68), u = "\u200B\x85\u180E"; l.exports = function(f) { return s(function() { return !!d[f]() || u[f]() != u || d[f].name !== f }) } }, function(l, o, t) { var s = t(198); l.exports = s }, function(l, o, t) { t(199), t(61), t(50), t(54); var s = t(9); l.exports = s.Map }, function(l, o, t) { var s = t(121), d = t(123); l.exports = s("Map", function(u) { return function() { return u(this, arguments.length ? arguments[0] : void 0) } }, d) }, function(l, o, t) { var s = t(11); l.exports = !s(function() { return Object.isExtensible(Object.preventExtensions({})) }) }, function(l, o, t) { var s = t(202); l.exports = s }, function(l, o, t) { var s = t(203), d = Array.prototype; l.exports = function(u) { var f = u.indexOf; return u === d || u instanceof Array && f === d.indexOf ? s : f } }, function(l, o, t) { t(204); var s = t(15); l.exports = s("Array").indexOf }, function(l, o, t) { var s = t(5), d = t(78).indexOf, u = t(67), f = t(22), c = [].indexOf, m = !!c && 1 / [1].indexOf(1, -0) < 0, p = u("indexOf"), b = f("indexOf", { ACCESSORS: !0, 1: 0 }); s({ target: "Array", proto: !0, forced: m || !p || !b }, { indexOf: function(g) { return m ? c.apply(this, arguments) || 0 : d(this, g, arguments.length > 1 ? arguments[1] : void 0) } }) }, function(l, o, t) { var s = t(206); l.exports = s }, function(l, o, t) { var s = t(207), d = Array.prototype; l.exports = function(u) { var f = u.splice; return u === d || u instanceof Array && f === d.splice ? s : f } }, function(l, o, t) { t(208); var s = t(15); l.exports = s("Array").splice }, function(l, o, t) { var s = t(5), d = t(79), u = t(62), f = t(34), c = t(29), m = t(88), p = t(69), b = t(56), x = t(22), g = b("splice"), y = x("splice", { ACCESSORS: !0, 0: 0, 1: 2 }), S = Math.max, w = Math.min, E = 9007199254740991, I = "Maximum allowed length exceeded"; s({ target: "Array", proto: !0, forced: !g || !y }, { splice: function(R, L) { var B = c(this), j = f(B.length), z = d(R, j), U = arguments.length, N, H, F, V, M, k; if (U === 0 ? N = H = 0 : U === 1 ? (N = 0, H = j - z) : ( N = U - 2, H = w(S(u(L), 0), j - z)), j + N - H > E) throw TypeError(I); for (F = m(B, H), V = 0; V < H; V++) M = z + V, M in B && p( F, V, B[M]); if (F.length = H, N < H) { for (V = z; V < j - H; V++) M = V + H, k = V + N, M in B ? B[k] = B[M] : delete B[k]; for (V = j; V > j - H + N; V--) delete B[V - 1] } else if (N > H) for (V = j - H; V > z; V--) M = V + H - 1, k = V + N - 1, M in B ? B[k] = B[M] : delete B[k]; for (V = 0; V < N; V++) B[V + z] = arguments[V + 2]; return B.length = j - H + N, F } }) }, function(l, o, t) { var s = t(210); l.exports = s }, function(l, o, t) { var s = t(211), d = Array.prototype; l.exports = function(u) { var f = u.filter; return u === d || u instanceof Array && f === d.filter ? s : f } }, function(l, o, t) { t(212); var s = t(15); l.exports = s("Array").filter }, function(l, o, t) { var s = t(5), d = t(30).filter, u = t(56), f = t(22), c = u("filter"), m = f("filter"); s({ target: "Array", proto: !0, forced: !c || !m }, { filter: function(b) { return d(this, b, arguments.length > 1 ? arguments[1] : void 0) } }) }, function(l, o, t) { var s = t(214); l.exports = s }, function(l, o, t) { var s = t(215), d = t(217), u = Array.prototype, f = String.prototype; l.exports = function(c) { var m = c.includes; return c === u || c instanceof Array && m === u.includes ? s : typeof c == "string" || c === f || c instanceof String && m === f .includes ? d : m } }, function(l, o, t) { t(216); var s = t(15); l.exports = s("Array").includes }, function(l, o, t) { var s = t(5), d = t(78).includes, u = t(82), f = t(22), c = f("indexOf", { ACCESSORS: !0, 1: 0 }); s({ target: "Array", proto: !0, forced: !c }, { includes: function(p) { return d(this, p, arguments.length > 1 ? arguments[1] : void 0) } }), u("includes") }, function(l, o, t) { t(218); var s = t(15); l.exports = s("String").includes }, function(l, o, t) { var s = t(5), d = t(219), u = t(49), f = t(221); s({ target: "String", proto: !0, forced: !f("includes") }, { includes: function(m) { return !!~String(u(this)).indexOf(d(m), arguments.length > 1 ? arguments[1] : void 0) } }) }, function(l, o, t) { var s = t(220); l.exports = function(d) { if (s(d)) throw TypeError( "The method doesn't accept regular expressions"); return d } }, function(l, o, t) { var s = t(13), d = t(33), u = t(10), f = u("match"); l.exports = function(c) { var m; return s(c) && ((m = c[f]) !== void 0 ? !!m : d(c) == "RegExp") } }, function(l, o, t) { var s = t(10), d = s("match"); l.exports = function(u) { var f = /./; try { "/./" [u](f) } catch { try { return f[d] = !1, "/./" [u](f) } catch {} } return !1 } }, function(l, o, t) { var s = t(223); l.exports = s }, function(l, o, t) { var s = t(224), d = Function.prototype; l.exports = function(u) { var f = u.bind; return u === d || u instanceof Function && f === d.bind ? s : f } }, function(l, o, t) { t(225); var s = t(15); l.exports = s("Function").bind }, function(l, o, t) { var s = t(5), d = t(226); s({ target: "Function", proto: !0 }, { bind: d }) }, function(l, o, t) { var s = t(40), d = t(13), u = [].slice, f = {}, c = function(p, b, x) { if (!(b in f)) { for (var g = [], y = 0; y < b; y++) g[y] = "a[" + y + "]"; f[b] = Function("C,a", "return new C(" + g.join(",") + ")") } return f[b](p, x) }; l.exports = Function.bind || function(p) { var b = s(this), x = u.call(arguments, 1), g = function() { var S = x.concat(u.call(arguments)); return this instanceof g ? c(b, S.length, S) : b.apply(p, S) }; return d(b.prototype) && (g.prototype = b.prototype), g } }, function(l, o, t) { l.exports = t(228) }, function(l, o, t) { var s = t(229); l.exports = s }, function(l, o, t) { t(124), t(50), t(54); var s = t(93); l.exports = s.f("iterator") }, function(l, o, t) { l.exports = t(231) }, function(l, o, t) { var s = t(232); t(251), t(252), t(253), t(254), t(255), l.exports = s }, function(l, o, t) { t(233), t(61), t(234), t(236), t(237), t(238), t(239), t(124), t(240), t(241), t(242), t(243), t(244), t(245), t(246), t(247), t(248), t(249), t(250); var s = t(9); l.exports = s.Symbol }, function(l, o, t) { var s = t(5), d = t(11), u = t(55), f = t(13), c = t(29), m = t(34), p = t(69), b = t(88), x = t(56), g = t(10), y = t(86), S = g("isConcatSpreadable"), w = 9007199254740991, E = "Maximum allowed index exceeded", I = y >= 51 || !d(function() { var B = []; return B[S] = !1, B.concat()[0] !== B }), D = x("concat"), R = function(j) { if (!f(j)) return !1; var z = j[S]; return z !== void 0 ? !!z : u(j) }, L = !I || !D; s({ target: "Array", proto: !0, forced: L }, { concat: function(j) { var z = c(this), U = b(z, 0), N = 0, H, F, V, M, k; for (H = -1, V = arguments.length; H < V; H++) if (k = H === -1 ? z : arguments[H], R(k)) { if (M = m(k.length), N + M > w) throw TypeError(E); for (F = 0; F < M; F++, N++) F in k && p(U, N, k[F]) } else { if (N >= w) throw TypeError(E); p(U, N++, k) } return U.length = N, U } }) }, function(l, o, t) { var s = t(5), d = t(8), u = t(35), f = t(42), c = t(14), m = t(76), p = t(105), b = t(11), x = t(16), g = t(55), y = t(13), S = t(25), w = t(29), E = t(28), I = t(60), D = t(48), R = t(77), L = t(52), B = t(125), j = t(235), z = t(126), U = t(71), N = t(18), H = t(59), F = t(19), V = t(53), M = t(74), k = t(63), G = t(51), J = t(64), ee = t(10), Z = t(93), te = t(12), ue = t(36), ge = t(41), ve = t(30).forEach, ce = k("hidden"), le = "Symbol", oe = "prototype", se = ee("toPrimitive"), de = ge.set, Le = ge.getterFor(le), De = Object[oe], Fe = d.Symbol, pt = u("JSON", "stringify"), Pt = U.f, Je = N.f, ft = j.f, ct = H.f, Me = M("symbols"), gt = M("op-symbols"), jt = M("string-to-symbol-registry"), At = M("symbol-to-string-registry"), pn = M("wks"), Kt = d.QObject, Nt = !Kt || !Kt[oe] || !Kt[oe].findChild, Lt = c && b(function() { return R(Je({}, "a", { get: function() { return Je(this, "a", { value: 7 }).a } })).a != 7 }) ? function(xe, ne, Te) { var Se = Pt(De, ne); Se && delete De[ne], Je(xe, ne, Te), Se && xe !== De && Je(De, ne, Se) } : Je, Xt = function(ne, Te) { var Se = Me[ne] = R(Fe[oe]); return de(Se, { type: le, tag: ne, description: Te }), c || (Se.description = Te), Se }, Ot = p ? function(xe) { return _typeof(xe) == "symbol" } : function(xe) { return Object(xe) instanceof Fe }, Ht = function(ne, Te, Se) { ne === De && Ht(gt, Te, Se), S(ne); var be = I(Te, !0); return S(Se), x(Me, be) ? (Se.enumerable ? (x(ne, ce) && ne[ce][be] && ( ne[ce][be] = !1), Se = R(Se, { enumerable: D(0, !1) })) : (x(ne, ce) || Je(ne, ce, D(1, {})), ne[ce][be] = !0), Lt( ne, be, Se)) : Je(ne, be, Se) }, nt = function(ne, Te) { S(ne); var Se = E(Te), be = L(Se).concat(me(Se)); return ve(be, function(Oe) { (!c || wt.call(Se, Oe)) && Ht(ne, Oe, Se[Oe]) }), ne }, ze = function(ne, Te) { return Te === void 0 ? R(ne) : nt(R(ne), Te) }, wt = function(ne) { var Te = I(ne, !0), Se = ct.call(this, Te); return this === De && x(Me, Te) && !x(gt, Te) ? !1 : Se || !x(this, Te) || !x(Me, Te) || x(this, ce) && this[ce][Te] ? Se : !0 }, He = function(ne, Te) { var Se = E(ne), be = I(Te, !0); if (!(Se === De && x(Me, be) && !x(gt, be))) { var Oe = Pt(Se, be); return Oe && x(Me, be) && !(x(Se, ce) && Se[ce][be]) && (Oe .enumerable = !0), Oe } }, Ae = function(ne) { var Te = ft(E(ne)), Se = []; return ve(Te, function(be) { !x(Me, be) && !x(G, be) && Se.push(be) }), Se }, me = function(ne) { var Te = ne === De, Se = ft(Te ? gt : E(ne)), be = []; return ve(Se, function(Oe) { x(Me, Oe) && (!Te || x(De, Oe)) && be.push(Me[Oe]) }), be }; if (m || (Fe = function() { if (this instanceof Fe) throw TypeError( "Symbol is not a constructor"); var ne = !arguments.length || arguments[0] === void 0 ? void 0 : String(arguments[0]), Te = J(ne), Se = function be(Oe) { this === De && be.call(gt, Oe), x(this, ce) && x(this[ce], Te) && (this[ce][Te] = !1), Lt(this, Te, D(1, Oe)) }; return c && Nt && Lt(De, Te, { configurable: !0, set: Se }), Xt(Te, ne) }, V(Fe[oe], "toString", function() { return Le(this).tag }), V(Fe, "withoutSetter", function(xe) { return Xt(J(xe), xe) }), H.f = wt, N.f = Ht, U.f = He, B.f = j.f = Ae, z.f = me, Z.f = function(xe) { return Xt(ee(xe), xe) }, c && (Je(Fe[oe], "description", { configurable: !0, get: function() { return Le(this).description } }), f || V(De, "propertyIsEnumerable", wt, { unsafe: !0 }))), s({ global: !0, wrap: !0, forced: !m, sham: !m }, { Symbol: Fe }), ve(L(pn), function(xe) { te(xe) }), s({ target: le, stat: !0, forced: !m }, { for: function(ne) { var Te = String(ne); if (x(jt, Te)) return jt[Te]; var Se = Fe(Te); return jt[Te] = Se, At[Se] = Te, Se }, keyFor: function(ne) { if (!Ot(ne)) throw TypeError(ne + " is not a symbol"); if (x(At, ne)) return At[ne] }, useSetter: function() { Nt = !0 }, useSimple: function() { Nt = !1 } }), s({ target: "Object", stat: !0, forced: !m, sham: !c }, { create: ze, defineProperty: Ht, defineProperties: nt, getOwnPropertyDescriptor: He }), s({ target: "Object", stat: !0, forced: !m }, { getOwnPropertyNames: Ae, getOwnPropertySymbols: me }), s({ target: "Object", stat: !0, forced: b(function() { z.f(1) }) }, { getOwnPropertySymbols: function(ne) { return z.f(w(ne)) } }), pt) { var Re = !m || b(function() { var xe = Fe(); return pt([xe]) != "[null]" || pt({ a: xe }) != "{}" || pt(Object(xe)) != "{}" }); s({ target: "JSON", stat: !0, forced: Re }, { stringify: function(ne, Te, Se) { for (var be = [ne], Oe = 1, xt; arguments.length > Oe;) be.push(arguments[Oe++]); if (xt = Te, !(!y(Te) && ne === void 0 || Ot(ne))) return g(Te) || (Te = function(Ge, je) { if (typeof xt == "function" && (je = xt .call(this, Ge, je)), !Ot(je)) return je }), be[1] = Te, pt.apply(null, be) } }) } Fe[oe][se] || F(Fe[oe], se, Fe[oe].valueOf), ue(Fe, le), G[ce] = !0 }, function(l, o, t) { var s = t(28), d = t(125).f, u = {}.toString, f = (typeof window > "u" ? "undefined" : _typeof(window)) == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [], c = function(p) { try { return d(p) } catch { return f.slice() } }; l.exports.f = function(p) { return f && u.call(p) == "[object Window]" ? c(p) : d(s(p)) } }, function(l, o, t) { var s = t(12); s("asyncIterator") }, function(l, o) {}, function(l, o, t) { var s = t(12); s("hasInstance") }, function(l, o, t) { var s = t(12); s("isConcatSpreadable") }, function(l, o, t) { var s = t(12); s("match") }, function(l, o, t) { var s = t(12); s("matchAll") }, function(l, o, t) { var s = t(12); s("replace") }, function(l, o, t) { var s = t(12); s("search") }, function(l, o, t) { var s = t(12); s("species") }, function(l, o, t) { var s = t(12); s("split") }, function(l, o, t) { var s = t(12); s("toPrimitive") }, function(l, o, t) { var s = t(12); s("toStringTag") }, function(l, o, t) { var s = t(12); s("unscopables") }, function(l, o, t) { var s = t(36); s(Math, "Math", !0) }, function(l, o, t) { var s = t(8), d = t(36); d(s.JSON, "JSON", !0) }, function(l, o, t) { var s = t(12); s("asyncDispose") }, function(l, o, t) { var s = t(12); s("dispose") }, function(l, o, t) { var s = t(12); s("observable") }, function(l, o, t) { var s = t(12); s("patternMatch") }, function(l, o, t) { var s = t(12); s("replaceAll") }, function(l, o, t) { l.exports = t(257) }, function(l, o, t) { var s = t(258); l.exports = s }, function(l, o, t) { t(259); var s = t(9); l.exports = s.parseInt }, function(l, o, t) { var s = t(5), d = t(260); s({ global: !0, forced: parseInt != d }, { parseInt: d }) }, function(l, o, t) { var s = t(8), d = t(90).trim, u = t(68), f = s.parseInt, c = /^[+-]?0[Xx]/, m = f(u + "08") !== 8 || f(u + "0x16") !== 22; l.exports = m ? function(b, x) { var g = d(String(b)); return f(g, x >>> 0 || (c.test(g) ? 16 : 10)) } : f }, function(l, o, t) { var s = t(262); l.exports = s }, function(l, o, t) { var s = t(263), d = Array.prototype; l.exports = function(u) { var f = u.slice; return u === d || u instanceof Array && f === d.slice ? s : f } }, function(l, o, t) { t(264); var s = t(15); l.exports = s("Array").slice }, function(l, o, t) { var s = t(5), d = t(13), u = t(55), f = t(79), c = t(34), m = t(28), p = t(69), b = t(10), x = t(56), g = t(22), y = x("slice"), S = g("slice", { ACCESSORS: !0, 0: 0, 1: 2 }), w = b("species"), E = [].slice, I = Math.max; s({ target: "Array", proto: !0, forced: !y || !S }, { slice: function(R, L) { var B = m(this), j = c(B.length), z = f(R, j), U = f(L === void 0 ? j : L, j), N, H, F; if (u(B) && (N = B.constructor, typeof N == "function" && ( N === Array || u(N.prototype)) ? N = void 0 : d( N) && (N = N[w], N === null && (N = void 0)), N === Array || N === void 0)) return E.call(B, z, U); for (H = new(N === void 0 ? Array : N)(I(U - z, 0)), F = 0; z < U; z++, F++) z in B && p(H, F, B[z]); return H.length = F, H } }) }, function(l, o, t) { t(266); var s = t(9); l.exports = s.setTimeout }, function(l, o, t) { var s = t(5), d = t(8), u = t(84), f = [].slice, c = /MSIE .\./.test(u), m = function(b) { return function(x, g) { var y = arguments.length > 2, S = y ? f.call(arguments, 2) : void 0; return b(y ? function() { (typeof x == "function" ? x : Function(x)).apply( this, S) } : x, g) } }; s({ global: !0, bind: !0, forced: c }, { setTimeout: m(d.setTimeout), setInterval: m(d.setInterval) }) }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(127)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(272)), m = f.__importDefault(t(273)), p = f.__importDefault(t(128)), b = f.__importDefault(t(274)), x = f.__importDefault(t(275)), g = f.__importDefault(t(276)), y = f.__importDefault(t(129)), S = f.__importDefault(t(277)), w = f.__importDefault(t(278)), E = f.__importDefault(t(279)), I = (0, u.default)({}, c.default, m.default, p.default, x.default, b .default, g.default, y.default, S.default, w.default, E.default, { linkCheck: function(R, L) { return !0 } }); o.default = I }, function(l, o, t) { var s = t(269); l.exports = s }, function(l, o, t) { t(270); var s = t(9); l.exports = s.Object.assign }, function(l, o, t) { var s = t(5), d = t(271); s({ target: "Object", stat: !0, forced: Object.assign !== d }, { assign: d }) }, function(l, o, t) { var s = t(14), d = t(11), u = t(52), f = t(126), c = t(59), m = t(29), p = t(72), b = Object.assign, x = Object.defineProperty; l.exports = !b || d(function() { if (s && b({ b: 1 }, b(x({}, "a", { enumerable: !0, get: function() { x(this, "b", { value: 3, enumerable: !1 }) } }), { b: 2 })).b !== 1) return !0; var g = {}, y = {}, S = Symbol(), w = "abcdefghijklmnopqrst"; return g[S] = 7, w.split("").forEach(function(E) { y[E] = E }), b({}, g)[S] != 7 || u(b({}, y)).join("") != w }) ? function(y, S) { for (var w = m(y), E = arguments.length, I = 1, D = f.f, R = c.f; E > I;) for (var L = p(arguments[I++]), B = D ? u(L).concat(D(L)) : u(L), j = B.length, z = 0, U; j > z;) U = B[z++], (!s || R.call(L, U)) && (w[U] = L[U]); return w } : b }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.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: ["\u9ED1\u4F53", "\u4EFF\u5B8B", "\u6977\u4F53", "\u6807\u6977\u4F53", "\u534E\u6587\u4EFF\u5B8B", "\u534E\u6587\u6977\u4F53", "\u5B8B\u4F53", "\u5FAE\u8F6F\u96C5\u9ED1", "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: "\u3000\u3000\u3000\u3000", emotions: [{ title: "\u8868\u60C5", type: "emoji", content: "\u{1F600} \u{1F603} \u{1F604} \u{1F601} \u{1F606} \u{1F605} \u{1F602} \u{1F923} \u{1F60A} \u{1F607} \u{1F642} \u{1F643} \u{1F609} \u{1F60C} \u{1F60D} \u{1F618} \u{1F617} \u{1F619} \u{1F61A} \u{1F60B} \u{1F61B} \u{1F61D} \u{1F61C} \u{1F913} \u{1F60E} \u{1F60F} \u{1F612} \u{1F61E} \u{1F614} \u{1F61F} \u{1F615} \u{1F641} \u{1F623} \u{1F616} \u{1F62B} \u{1F629} \u{1F622} \u{1F62D} \u{1F624} \u{1F620} \u{1F621} \u{1F633} \u{1F631} \u{1F628} \u{1F917} \u{1F914} \u{1F636} \u{1F611} \u{1F62C} \u{1F644} \u{1F62F} \u{1F634} \u{1F637} \u{1F911} \u{1F608} \u{1F921} \u{1F4A9} \u{1F47B} \u{1F480} \u{1F440} \u{1F463}" .split(/\s/) }, { title: "\u624B\u52BF", type: "emoji", content: "\u{1F450} \u{1F64C} \u{1F44F} \u{1F91D} \u{1F44D} \u{1F44E} \u{1F44A} \u270A \u{1F91B} \u{1F91C} \u{1F91E} \u270C\uFE0F \u{1F918} \u{1F44C} \u{1F448} \u{1F449} \u{1F446} \u{1F447} \u261D\uFE0F \u270B \u{1F91A} \u{1F590} \u{1F596} \u{1F44B} \u{1F919} \u{1F4AA} \u{1F595} \u270D\uFE0F \u{1F64F}" .split(/\s/) }], lineHeights: ["1", "1.15", "1.6", "2", "2.5", "3"], undoLimit: 20, indentation: "2em", showMenuTooltips: !0, menuTooltipPosition: "up" } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(7); function f(c, m, p) { window.alert(c), p && console.error("wangEditor: " + p) } o.default = { onchangeTimeout: 200, onchange: null, onfocus: u.EMPTY_FN, onblur: u.EMPTY_FN, onCatalogChange: null, customAlert: f } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.default = { pasteFilterStyle: !0, pasteIgnoreImg: !1, pasteTextHandle: function(f) { return f } } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.default = { styleWithCSS: !1 } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(7); o.default = { linkImgCheck: function(c, m, p) { return !0 }, showLinkImg: !0, showLinkImgAlt: !0, showLinkImgHref: !0, linkImgCallback: u.EMPTY_FN, uploadImgAccept: ["jpg", "jpeg", "png", "gif", "bmp"], uploadImgServer: "", uploadImgShowBase64: !1, uploadImgMaxSize: 5 * 1024 * 1024, uploadImgMaxLength: 100, uploadFileName: "", uploadImgParams: {}, uploadImgParamsWithUrl: !1, uploadImgHeaders: {}, uploadImgHooks: {}, uploadImgTimeout: 10 * 1e3, withCredentials: !1, customUploadImg: null, uploadImgFromMedia: null } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.default = { lang: "zh-CN", languages: { "zh-CN": { wangEditor: { \u91CD\u7F6E: "\u91CD\u7F6E", \u63D2\u5165: "\u63D2\u5165", \u9ED8\u8BA4: "\u9ED8\u8BA4", \u521B\u5EFA: "\u521B\u5EFA", \u4FEE\u6539: "\u4FEE\u6539", \u5982: "\u5982", \u8BF7\u8F93\u5165\u6B63\u6587: "\u8BF7\u8F93\u5165\u6B63\u6587", menus: { title: { \u6807\u9898: "\u6807\u9898", \u52A0\u7C97: "\u52A0\u7C97", \u5B57\u53F7: "\u5B57\u53F7", \u5B57\u4F53: "\u5B57\u4F53", \u659C\u4F53: "\u659C\u4F53", \u4E0B\u5212\u7EBF: "\u4E0B\u5212\u7EBF", \u5220\u9664\u7EBF: "\u5220\u9664\u7EBF", \u7F29\u8FDB: "\u7F29\u8FDB", \u884C\u9AD8: "\u884C\u9AD8", \u6587\u5B57\u989C\u8272: "\u6587\u5B57\u989C\u8272", \u80CC\u666F\u8272: "\u80CC\u666F\u8272", \u94FE\u63A5: "\u94FE\u63A5", \u5E8F\u5217: "\u5E8F\u5217", \u5BF9\u9F50: "\u5BF9\u9F50", \u5F15\u7528: "\u5F15\u7528", \u8868\u60C5: "\u8868\u60C5", \u56FE\u7247: "\u56FE\u7247", \u89C6\u9891: "\u89C6\u9891", \u8868\u683C: "\u8868\u683C", \u4EE3\u7801: "\u4EE3\u7801", \u5206\u5272\u7EBF: "\u5206\u5272\u7EBF", \u6062\u590D: "\u6062\u590D", \u64A4\u9500: "\u64A4\u9500", \u5168\u5C4F: "\u5168\u5C4F", \u53D6\u6D88\u5168\u5C4F: "\u53D6\u6D88\u5168\u5C4F", \u5F85\u529E\u4E8B\u9879: "\u5F85\u529E\u4E8B\u9879" }, dropListMenu: { \u8BBE\u7F6E\u6807\u9898: "\u8BBE\u7F6E\u6807\u9898", \u80CC\u666F\u989C\u8272: "\u80CC\u666F\u989C\u8272", \u6587\u5B57\u989C\u8272: "\u6587\u5B57\u989C\u8272", \u8BBE\u7F6E\u5B57\u53F7: "\u8BBE\u7F6E\u5B57\u53F7", \u8BBE\u7F6E\u5B57\u4F53: "\u8BBE\u7F6E\u5B57\u4F53", \u8BBE\u7F6E\u7F29\u8FDB: "\u8BBE\u7F6E\u7F29\u8FDB", \u5BF9\u9F50\u65B9\u5F0F: "\u5BF9\u9F50\u65B9\u5F0F", \u8BBE\u7F6E\u884C\u9AD8: "\u8BBE\u7F6E\u884C\u9AD8", \u5E8F\u5217: "\u5E8F\u5217", head: { \u6B63\u6587: "\u6B63\u6587" }, indent: { \u589E\u52A0\u7F29\u8FDB: "\u589E\u52A0\u7F29\u8FDB", \u51CF\u5C11\u7F29\u8FDB: "\u51CF\u5C11\u7F29\u8FDB" }, justify: { \u9760\u5DE6: "\u9760\u5DE6", \u5C45\u4E2D: "\u5C45\u4E2D", \u9760\u53F3: "\u9760\u53F3", \u4E24\u7AEF: "\u4E24\u7AEF" }, list: { \u65E0\u5E8F\u5217\u8868: "\u65E0\u5E8F\u5217\u8868", \u6709\u5E8F\u5217\u8868: "\u6709\u5E8F\u5217\u8868" } }, panelMenus: { emoticon: { \u9ED8\u8BA4: "\u9ED8\u8BA4", \u65B0\u6D6A: "\u65B0\u6D6A", emoji: "emoji", \u624B\u52BF: "\u624B\u52BF" }, image: { \u4E0A\u4F20\u56FE\u7247: "\u4E0A\u4F20\u56FE\u7247", \u7F51\u7EDC\u56FE\u7247: "\u7F51\u7EDC\u56FE\u7247", \u56FE\u7247\u5730\u5740: "\u56FE\u7247\u5730\u5740", \u56FE\u7247\u6587\u5B57\u8BF4\u660E: "\u56FE\u7247\u6587\u5B57\u8BF4\u660E", \u8DF3\u8F6C\u94FE\u63A5: "\u8DF3\u8F6C\u94FE\u63A5" }, link: { \u94FE\u63A5: "\u94FE\u63A5", \u94FE\u63A5\u6587\u5B57: "\u94FE\u63A5\u6587\u5B57", \u53D6\u6D88\u94FE\u63A5: "\u53D6\u6D88\u94FE\u63A5", \u67E5\u770B\u94FE\u63A5: "\u67E5\u770B\u94FE\u63A5" }, video: { \u63D2\u5165\u89C6\u9891: "\u63D2\u5165\u89C6\u9891", \u4E0A\u4F20\u89C6\u9891: "\u4E0A\u4F20\u89C6\u9891" }, table: { \u884C: "\u884C", \u5217: "\u5217", \u7684: "\u7684", \u8868\u683C: "\u8868\u683C", \u6DFB\u52A0\u884C: "\u6DFB\u52A0\u884C", \u5220\u9664\u884C: "\u5220\u9664\u884C", \u6DFB\u52A0\u5217: "\u6DFB\u52A0\u5217", \u5220\u9664\u5217: "\u5220\u9664\u5217", \u8BBE\u7F6E\u8868\u5934: "\u8BBE\u7F6E\u8868\u5934", \u53D6\u6D88\u8868\u5934: "\u53D6\u6D88\u8868\u5934", \u63D2\u5165\u8868\u683C: "\u63D2\u5165\u8868\u683C", \u5220\u9664\u8868\u683C: "\u5220\u9664\u8868\u683C" }, code: { \u5220\u9664\u4EE3\u7801: "\u5220\u9664\u4EE3\u7801", \u4FEE\u6539\u4EE3\u7801: "\u4FEE\u6539\u4EE3\u7801", \u63D2\u5165\u4EE3\u7801: "\u63D2\u5165\u4EE3\u7801" } } }, validate: { \u5F20\u56FE\u7247: "\u5F20\u56FE\u7247", \u5927\u4E8E: "\u5927\u4E8E", \u56FE\u7247\u94FE\u63A5: "\u56FE\u7247\u94FE\u63A5", \u4E0D\u662F\u56FE\u7247: "\u4E0D\u662F\u56FE\u7247", \u8FD4\u56DE\u7ED3\u679C: "\u8FD4\u56DE\u7ED3\u679C", \u4E0A\u4F20\u56FE\u7247\u8D85\u65F6: "\u4E0A\u4F20\u56FE\u7247\u8D85\u65F6", \u4E0A\u4F20\u56FE\u7247\u9519\u8BEF: "\u4E0A\u4F20\u56FE\u7247\u9519\u8BEF", \u4E0A\u4F20\u56FE\u7247\u5931\u8D25: "\u4E0A\u4F20\u56FE\u7247\u5931\u8D25", \u63D2\u5165\u56FE\u7247\u9519\u8BEF: "\u63D2\u5165\u56FE\u7247\u9519\u8BEF", \u4E00\u6B21\u6700\u591A\u4E0A\u4F20: "\u4E00\u6B21\u6700\u591A\u4E0A\u4F20", \u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25: "\u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25", \u56FE\u7247\u9A8C\u8BC1\u672A\u901A\u8FC7: "\u56FE\u7247\u9A8C\u8BC1\u672A\u901A\u8FC7", \u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001: "\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001", \u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF: "\u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF", \u8BF7\u66FF\u6362\u4E3A\u652F\u6301\u7684\u56FE\u7247\u7C7B\u578B: "\u8BF7\u66FF\u6362\u4E3A\u652F\u6301\u7684\u56FE\u7247\u7C7B\u578B", \u60A8\u63D2\u5165\u7684\u7F51\u7EDC\u56FE\u7247\u65E0\u6CD5\u8BC6\u522B: "\u60A8\u63D2\u5165\u7684\u7F51\u7EDC\u56FE\u7247\u65E0\u6CD5\u8BC6\u522B", \u60A8\u521A\u624D\u63D2\u5165\u7684\u56FE\u7247\u94FE\u63A5\u672A\u901A\u8FC7\u7F16\u8F91\u5668\u6821\u9A8C: "\u60A8\u521A\u624D\u63D2\u5165\u7684\u56FE\u7247\u94FE\u63A5\u672A\u901A\u8FC7\u7F16\u8F91\u5668\u6821\u9A8C", \u63D2\u5165\u89C6\u9891\u9519\u8BEF: "\u63D2\u5165\u89C6\u9891\u9519\u8BEF", \u89C6\u9891\u94FE\u63A5: "\u89C6\u9891\u94FE\u63A5", \u4E0D\u662F\u89C6\u9891: "\u4E0D\u662F\u89C6\u9891", \u89C6\u9891\u9A8C\u8BC1\u672A\u901A\u8FC7: "\u89C6\u9891\u9A8C\u8BC1\u672A\u901A\u8FC7", \u4E2A\u89C6\u9891: "\u4E2A\u89C6\u9891", \u4E0A\u4F20\u89C6\u9891\u8D85\u65F6: "\u4E0A\u4F20\u89C6\u9891\u8D85\u65F6", \u4E0A\u4F20\u89C6\u9891\u9519\u8BEF: "\u4E0A\u4F20\u89C6\u9891\u9519\u8BEF", \u4E0A\u4F20\u89C6\u9891\u5931\u8D25: "\u4E0A\u4F20\u89C6\u9891\u5931\u8D25", \u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF: "\u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF" } } }, en: { wangEditor: { \u91CD\u7F6E: "reset", \u63D2\u5165: "insert", \u9ED8\u8BA4: "default", \u521B\u5EFA: "create", \u4FEE\u6539: "edit", \u5982: "like", \u8BF7\u8F93\u5165\u6B63\u6587: "please enter the text", menus: { title: { \u6807\u9898: "head", \u52A0\u7C97: "bold", \u5B57\u53F7: "font size", \u5B57\u4F53: "font family", \u659C\u4F53: "italic", \u4E0B\u5212\u7EBF: "underline", \u5220\u9664\u7EBF: "strikethrough", \u7F29\u8FDB: "indent", \u884C\u9AD8: "line heihgt", \u6587\u5B57\u989C\u8272: "font color", \u80CC\u666F\u8272: "background", \u94FE\u63A5: "link", \u5E8F\u5217: "numbered list", \u5BF9\u9F50: "align", \u5F15\u7528: "quote", \u8868\u60C5: "emoticons", \u56FE\u7247: "image", \u89C6\u9891: "media", \u8868\u683C: "table", \u4EE3\u7801: "code", \u5206\u5272\u7EBF: "split line", \u6062\u590D: "undo", \u64A4\u9500: "redo", \u5168\u5C4F: "fullscreen", \u53D6\u6D88\u5168\u5C4F: "cancel fullscreen", \u5F85\u529E\u4E8B\u9879: "todo" }, dropListMenu: { \u8BBE\u7F6E\u6807\u9898: "title", \u80CC\u666F\u989C\u8272: "background", \u6587\u5B57\u989C\u8272: "font color", \u8BBE\u7F6E\u5B57\u53F7: "font size", \u8BBE\u7F6E\u5B57\u4F53: "font family", \u8BBE\u7F6E\u7F29\u8FDB: "indent", \u5BF9\u9F50\u65B9\u5F0F: "align", \u8BBE\u7F6E\u884C\u9AD8: "line heihgt", \u5E8F\u5217: "list", head: { \u6B63\u6587: "text" }, indent: { \u589E\u52A0\u7F29\u8FDB: "indent", \u51CF\u5C11\u7F29\u8FDB: "outdent" }, justify: { \u9760\u5DE6: "left", \u5C45\u4E2D: "center", \u9760\u53F3: "right", \u4E24\u7AEF: "justify" }, list: { \u65E0\u5E8F\u5217\u8868: "unordered", \u6709\u5E8F\u5217\u8868: "ordered" } }, panelMenus: { emoticon: { \u8868\u60C5: "emoji", \u624B\u52BF: "gesture" }, image: { \u4E0A\u4F20\u56FE\u7247: "upload image", \u7F51\u7EDC\u56FE\u7247: "network image", \u56FE\u7247\u5730\u5740: "image link", \u56FE\u7247\u6587\u5B57\u8BF4\u660E: "image alt", \u8DF3\u8F6C\u94FE\u63A5: "hyperlink" }, link: { \u94FE\u63A5: "link", \u94FE\u63A5\u6587\u5B57: "link text", \u53D6\u6D88\u94FE\u63A5: "unlink", \u67E5\u770B\u94FE\u63A5: "view links" }, video: { \u63D2\u5165\u89C6\u9891: "insert video", \u4E0A\u4F20\u89C6\u9891: "upload local video" }, table: { \u884C: "rows", \u5217: "columns", \u7684: " ", \u8868\u683C: "table", \u6DFB\u52A0\u884C: "insert row", \u5220\u9664\u884C: "delete row", \u6DFB\u52A0\u5217: "insert column", \u5220\u9664\u5217: "delete column", \u8BBE\u7F6E\u8868\u5934: "set header", \u53D6\u6D88\u8868\u5934: "cancel header", \u63D2\u5165\u8868\u683C: "insert table", \u5220\u9664\u8868\u683C: "delete table" }, code: { \u5220\u9664\u4EE3\u7801: "delete code", \u4FEE\u6539\u4EE3\u7801: "edit code", \u63D2\u5165\u4EE3\u7801: "insert code" } } }, validate: { \u5F20\u56FE\u7247: "images", \u5927\u4E8E: "greater than", \u56FE\u7247\u94FE\u63A5: "image link", \u4E0D\u662F\u56FE\u7247: "is not image", \u8FD4\u56DE\u7ED3\u679C: "return results", \u4E0A\u4F20\u56FE\u7247\u8D85\u65F6: "upload image timeout", \u4E0A\u4F20\u56FE\u7247\u9519\u8BEF: "upload image error", \u4E0A\u4F20\u56FE\u7247\u5931\u8D25: "upload image failed", \u63D2\u5165\u56FE\u7247\u9519\u8BEF: "insert image error", \u4E00\u6B21\u6700\u591A\u4E0A\u4F20: "once most at upload", \u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25: "download link failed", \u56FE\u7247\u9A8C\u8BC1\u672A\u901A\u8FC7: "image validate failed", \u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001: "server return status", \u4E0A\u4F20\u56FE\u7247\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF: "upload image return results error", \u8BF7\u66FF\u6362\u4E3A\u652F\u6301\u7684\u56FE\u7247\u7C7B\u578B: "please replace with a supported image type", \u60A8\u63D2\u5165\u7684\u7F51\u7EDC\u56FE\u7247\u65E0\u6CD5\u8BC6\u522B: "the network picture you inserted is not recognized", \u60A8\u521A\u624D\u63D2\u5165\u7684\u56FE\u7247\u94FE\u63A5\u672A\u901A\u8FC7\u7F16\u8F91\u5668\u6821\u9A8C: "the image link you just inserted did not pass the editor verification", \u63D2\u5165\u89C6\u9891\u9519\u8BEF: "insert video error", \u89C6\u9891\u94FE\u63A5: "video link", \u4E0D\u662F\u89C6\u9891: "is not video", \u89C6\u9891\u9A8C\u8BC1\u672A\u901A\u8FC7: "video validate failed", \u4E2A\u89C6\u9891: "videos", \u4E0A\u4F20\u89C6\u9891\u8D85\u65F6: "upload video timeout", \u4E0A\u4F20\u89C6\u9891\u9519\u8BEF: "upload video error", \u4E0A\u4F20\u89C6\u9891\u5931\u8D25: "upload video failed", \u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF: "upload video return results error" } } } } } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(6); function f() { return !!(u.UA.isIE() || u.UA.isOldEdge) } o.default = { compatibleMode: f, historyMaxSize: 30 } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(7); o.default = { onlineVideoCheck: function(c) { return !0 }, onlineVideoCallback: u.EMPTY_FN, showLinkVideo: !0, uploadVideoAccept: ["mp4"], uploadVideoServer: "", uploadVideoMaxSize: 1 * 1024 * 1024 * 1024, uploadVideoName: "", uploadVideoParams: {}, uploadVideoParamsWithUrl: !1, uploadVideoHeaders: {}, uploadVideoHooks: {}, uploadVideoTimeout: 1e3 * 60 * 60 * 2, withVideoCredentials: !1, customUploadVideo: null, customInsertVideo: null } }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(17)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = t(6), p = t(7), b = function() { function x(g) { this._currentRange = null, this.editor = g } return x.prototype.getRange = function() { return this._currentRange }, x.prototype.saveRange = function(g) { if (g) { this._currentRange = g; return } var y = window.getSelection(); if (y.rangeCount !== 0) { var S = y.getRangeAt(0), w = this.getSelectionContainerElem(S); if (!!(w != null && w.length) && !(w.attr( "contenteditable") === "false" || w.parentUntil( "[contenteditable=false]"))) { var E = this.editor, I = E.$textElem; if (I.isContain(w)) { if (I.elems[0] === w.elems[0]) { var D; if ((0, u.default)(D = I.html()).call(D) === p .EMPTY_P) { var R = I.children(), L = R == null ? void 0 : R.last(); E.selection.createRangeByElem(L, !0, !0), E .selection.restoreSelection() } } this._currentRange = S } } } }, x.prototype.collapseRange = function(g) { g === void 0 && (g = !1); var y = this._currentRange; y && y.collapse(g) }, x.prototype.getSelectionText = function() { var g = this._currentRange; return g ? g.toString() : "" }, x.prototype.getSelectionContainerElem = function(g) { var y; y = g || this._currentRange; var S; if (y) return S = y.commonAncestorContainer, c.default(S .nodeType === 1 ? S : S.parentNode) }, x.prototype.getSelectionStartElem = function(g) { var y; y = g || this._currentRange; var S; if (y) return S = y.startContainer, c.default(S.nodeType === 1 ? S : S.parentNode) }, x.prototype.getSelectionEndElem = function(g) { var y; y = g || this._currentRange; var S; if (y) return S = y.endContainer, c.default(S.nodeType === 1 ? S : S.parentNode) }, x.prototype.isSelectionEmpty = function() { var g = this._currentRange; return !!(g && g.startContainer && g.startContainer === g .endContainer && g.startOffset === g.endOffset) }, x.prototype.restoreSelection = function() { var g = window.getSelection(), y = this._currentRange; g && y && (g.removeAllRanges(), g.addRange(y)) }, x.prototype.createEmptyRange = function() { var g = this.editor, y = this.getRange(), S; if (!!y && !!this.isSelectionEmpty()) try { m.UA.isWebkit() ? (g.cmd.do("insertHTML", "​"), y .setEnd(y.endContainer, y.endOffset + 1), this .saveRange(y)) : (S = c.default( ""), g.cmd.do( "insertElem", S), this.createRangeByElem(S, !0)) } catch {} }, x.prototype.createRangeByElems = function(g, y) { var S = window.getSelection ? window.getSelection() : document .getSelection(); S == null || S.removeAllRanges(); var w = document.createRange(); w.setStart(g, 0), w.setEnd(y, y.childNodes.length || 1), this .saveRange(w), this.restoreSelection() }, x.prototype.createRangeByElem = function(g, y, S) { if (!!g.length) { var w = g.elems[0], E = document.createRange(); S ? E.selectNodeContents(w) : E.selectNode(w), y != null && (E.collapse(y), y || (this.saveRange(E), this.editor .selection.moveCursor(w))), this.saveRange(E) } }, x.prototype.getSelectionRangeTopNodes = function() { var g, y, S, w = (g = this.getSelectionStartElem()) === null || g === void 0 ? void 0 : g.getNodeTop(this.editor), E = (y = this.getSelectionEndElem()) === null || y === void 0 ? void 0 : y.getNodeTop(this.editor); return S = this.recordSelectionNodes(c.default(w), c.default( E)), S }, x.prototype.moveCursor = function(g, y) { var S, w = this.getRange(), E = g.nodeType === 3 ? (S = g.nodeValue) === null || S === void 0 ? void 0 : S.length : g.childNodes.length; (m.UA.isFirefox || m.UA.isIE()) && E !== 0 && (g.nodeType === 3 || g.childNodes[E - 1].nodeName === "BR") && (E = E - 1); var I = y != null ? y : E; !w || g && (w.setStart(g, I), w.setEnd(g, I), this .restoreSelection()) }, x.prototype.getCursorPos = function() { var g = window.getSelection(); return g == null ? void 0 : g.anchorOffset }, x.prototype.clearWindowSelectionRange = function() { var g = window.getSelection(); g && g.removeAllRanges() }, x.prototype.recordSelectionNodes = function(g, y) { var S = [], w = !0; try { for (var E = g, I = this.editor.$textElem; w;) { var D = E == null ? void 0 : E.getNodeTop(this.editor); D.getNodeName() === "BODY" && (w = !1), D.length > 0 && (S.push(c.default(E)), (y == null ? void 0 : y .equal(D)) || I.equal(D) ? w = !1 : E = D .getNextSibling()) } } catch { w = !1 } return S }, x.prototype.setRangeToElem = function(g) { var y = this.getRange(); y == null || y.setStart(g, 0), y == null || y.setEnd(g, 0) }, x }(); o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(3)), c = function() { function m(p) { this.editor = p } return m.prototype.do = function(p, b) { var x = this.editor; x.config.styleWithCSS && document.execCommand("styleWithCSS", ! 1, "true"); var g = x.selection; if (!!g.getRange()) { switch (g.restoreSelection(), p) { case "insertHTML": this.insertHTML(b); break; case "insertElem": this.insertElem(b); break; default: this.execCommand(p, b); break } x.menus.changeActive(), g.saveRange(), g.restoreSelection() } }, m.prototype.insertHTML = function(p) { var b = this.editor, x = b.selection.getRange(); if (x != null) { if (this.queryCommandSupported("insertHTML")) this .execCommand("insertHTML", p); else if (x.insertNode) { if (x.deleteContents(), f.default(p).elems.length > 0) x .insertNode(f.default(p).elems[0]); else { var g = document.createElement("p"); g.appendChild(document.createTextNode(p)), x .insertNode(g) } b.selection.collapseRange() } } }, m.prototype.insertElem = function(p) { var b = this.editor, x = b.selection.getRange(); x != null && x.insertNode && (x.deleteContents(), x.insertNode(p .elems[0])) }, m.prototype.execCommand = function(p, b) { document.execCommand(p, !1, b) }, m.prototype.queryCommandValue = function(p) { return document.queryCommandValue(p) }, m.prototype.queryCommandState = function(p) { return document.queryCommandState(p) }, m.prototype.queryCommandSupported = function(p) { return document.queryCommandSupported(p) }, m }(); o.default = c }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(31)), f = s(t(4)), c = s(t(17)), m = s(t(27)), p = s(t(46)); (0, d.default)(o, "__esModule", { value: !0 }); var b = t(2), x = b.__importDefault(t(3)), g = b.__importDefault(t(287)), y = t(6), S = b.__importDefault(t(299)), w = b.__importDefault(t(300)), E = t(7), I = function() { function D(R) { this.editor = R, 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 D.prototype.init = function() { this._saveRange(), this._bindEventHooks(), g.default(this) }, D.prototype.togglePlaceholder = function() { var R, L = this.html(), B = (0, u.default)(R = this.editor.$textContainerElem).call( R, ".placeholder"); B.hide(), !this.editor.isComposing && (!L || L === " ") && B .show() }, D.prototype.clear = function() { this.html(E.EMPTY_P) }, D.prototype.html = function(R) { var L = this.editor, B = L.$textElem; if (R == null) { var j = B.html(); j = j.replace(/\u200b/gm, ""), j = j.replace(/

    <\/p>/gim, ""), j = j.replace(E.EMPTY_P_LAST_REGEX, ""), j = j .replace(E.EMPTY_P_REGEX, "

    "); var z = j.match(/<(img|br|hr|input)[^>]*>/gi); return z !== null && (0, f.default)(z).call(z, function(U) { U.match(/\/>/) || (j = j.replace(U, U.substring( 0, U.length - 1) + "/>")) }), j } R = (0, c.default)(R).call(R), R === "" && (R = E.EMPTY_P), (0, m.default)(R).call(R, "<") !== 0 && (R = "

    " + R + "

    "), B.html(R), L.initSelection() }, D.prototype.setJSON = function(R) { var L = w.default(R).children(), B = this.editor, j = B.$textElem; !L || j.replaceChildAll(L) }, D.prototype.getJSON = function() { var R = this.editor, L = R.$textElem; return S.default(L) }, D.prototype.text = function(R) { var L = this.editor, B = L.$textElem; if (R == null) { var j = B.text(); return j = j.replace(/\u200b/gm, ""), j } B.text("

    " + R + "

    "), L.initSelection() }, D.prototype.append = function(R) { var L = this.editor; (0, m.default)(R).call(R, "<") !== 0 && (R = "

    " + R + "

    "), this.html(this.html() + R), L.initSelection() }, D.prototype._saveRange = function() { var R = this.editor, L = R.$textElem, B = x.default(document); function j() { R.selection.saveRange(), R.menus.changeActive() } L.on("keyup", j); function z() { j(), L.off("click", z) } L.on("click", z); function U() { j(), B.off("mouseup", U) } function N() { B.on("mouseup", U), L.off("mouseleave", N) } L.on("mousedown", function() { L.on("mouseleave", N) }), L.on("mouseup", function(H) { L.off("mouseleave", N), (0, p.default)(function() { var F = R.selection, V = F.getRange(); V !== null && j() }, 0) }) }, D.prototype._bindEventHooks = function() { var R = this.editor, L = R.$textElem, B = this.eventHooks; L.on("click", function(z) { var U = B.clickEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) }), L.on("keyup", function(z) { if (z.keyCode === 13) { var U = B.enterUpEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) } }), L.on("keyup", function(z) { var U = B.keyupEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) }), L.on("keydown", function(z) { var U = B.keydownEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) }), L.on("keyup", function(z) { if (!(z.keyCode !== 8 && z.keyCode !== 46)) { var U = B.deleteUpEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) } }), L.on("keydown", function(z) { if (!(z.keyCode !== 8 && z.keyCode !== 46)) { var U = B.deleteDownEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) } }), L.on("paste", function(z) { if (!y.UA.isIE()) { z.preventDefault(); var U = B.pasteEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) } }), L.on("keydown", function(z) { (R.isFocus || R.isCompatibleMode) && (z.ctrlKey || z .metaKey) && z.keyCode === 90 && (z .preventDefault(), z.shiftKey ? R.history .restore() : R.history.revoke()) }), L.on("keyup", function(z) { if (z.keyCode === 9) { z.preventDefault(); var U = B.tabUpEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) } }), L.on("keydown", function(z) { if (z.keyCode === 9) { z.preventDefault(); var U = B.tabDownEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) } }), L.on("scroll", y.throttle(function(z) { var U = B.textScrollEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) }, 100)); function j(z) { z.preventDefault() } x.default(document).on("dragleave", j).on("drop", j).on( "dragenter", j).on("dragover", j), R.beforeDestroy( function() { x.default(document).off("dragleave", j).off("drop", j).off("dragenter", j).off("dragover", j) }), L.on("drop", function(z) { z.preventDefault(); var U = B.dropEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) }), L.on("click", function(z) { var U = null, N = z.target, H = x.default(N); if (H.getNodeName() === "A") U = H; else { var F = H.parentUntil("a"); F != null && (U = F) } if (!!U) { var V = B.linkClickEvents; (0, f.default)(V).call(V, function(M) { return M(U) }) } }), L.on("click", function(z) { var U = null, N = z.target, H = x.default(N); if (H.getNodeName() === "IMG" && !H.elems[0] .getAttribute("data-emoji") && (z .stopPropagation(), U = H), !!U) { var F = B.imgClickEvents; (0, f.default)(F).call(F, function(V) { return V(U) }) } }), L.on("click", function(z) { var U = null, N = z.target, H = x.default(N); if (H.getNodeName() === "PRE") U = H; else { var F = H.parentUntil("pre"); F !== null && (U = F) } if (!!U) { var V = B.codeClickEvents; (0, f.default)(V).call(V, function(M) { return M(U) }) } }), L.on("click", function(z) { var U = null, N = z.target, H = x.default(N); if (H.getNodeName() === "HR" && (U = H), !!U) { R.selection.createRangeByElem(U), R.selection .restoreSelection(); var F = B.splitLineEvents; (0, f.default)(F).call(F, function(V) { return V(U) }) } }), R.$toolbarElem.on("click", function(z) { var U = B.toolbarClickEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) }), R.$textContainerElem.on("mousedown", function(z) { var U = z.target, N = x.default(U); if (N.hasClass("w-e-img-drag-rb")) { var H = B.imgDragBarMouseDownEvents; (0, f.default)(H).call(H, function(F) { return F() }) } }), L.on("click", function(z) { var U = null, N = z.target; if (U = x.default(N).parentUntilEditor("TABLE", R, N), !!U) { var H = B.tableClickEvents; (0, f.default)(H).call(H, function(F) { return F(U, z) }) } }), L.on("keydown", function(z) { if (z.keyCode === 13) { var U = B.enterDownEvents; (0, f.default)(U).call(U, function(N) { return N(z) }) } }), L.on("click", function(z) { var U = null, N = z.target, H = x.default(N); if (H.getNodeName() === "VIDEO" && (z .stopPropagation(), U = H), !!U) { var F = B.videoClickEvents; (0, f.default)(F).call(F, function(V) { return V(U) }) } }) }, D }(); o.default = I }, function(l, o, t) { var s = t(284); l.exports = s }, function(l, o, t) { var s = t(285), d = Array.prototype; l.exports = function(u) { var f = u.find; return u === d || u instanceof Array && f === d.find ? s : f } }, function(l, o, t) { t(286); var s = t(15); l.exports = s("Array").find }, function(l, o, t) { var s = t(5), d = t(30).find, u = t(82), f = t(22), c = "find", m = !0, p = f(c); c in [] && Array(1)[c](function() { m = !1 }), s({ target: "Array", proto: !0, forced: m || !p }, { find: function(x) { return d(this, x, arguments.length > 1 ? arguments[1] : void 0) } }), u(c) }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(288)), c = u.__importStar(t(289)), m = u.__importDefault(t(290)), p = u.__importDefault(t(291)), b = u.__importDefault(t(298)); function x(g) { var y = g.editor, S = g.eventHooks; f.default(y, S.enterUpEvents, S.enterDownEvents), c.default(y, S .deleteUpEvents, S.deleteDownEvents), c.cutToKeepP(y, S .keyupEvents), m.default(y, S.tabDownEvents), p.default(y, S .pasteEvents), b.default(y, S.imgClickEvents) } o.default = x }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(27)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = t(7), m = f.__importDefault(t(3)); function p(b, x, g) { function y(E) { var I, D = m.default(c.EMPTY_P); if (D.insertBefore(E), (0, u.default)(I = E.html()).call(I, "= 0) { D.remove(); return } b.selection.createRangeByElem(D, !0, !0), b.selection .restoreSelection(), E.remove() } function S() { var E = b.$textElem, I = b.selection.getSelectionContainerElem(), D = I.parent(); if (D.html() === "
    ") { y(D); return } if (I.getNodeName() === "FONT" && I.text() === "" && I.attr("face") === "monospace") { y(D); return } if (!!D.equal(E)) { var R = I.getNodeName(); R === "P" && I.attr("data-we-empty-p") === null || I.text() || y(I) } } x.push(S); function w(E) { var I; b.selection.saveRange((I = getSelection()) === null || I === void 0 ? void 0 : I.getRangeAt(0)); var D = b.selection.getSelectionContainerElem(); D.id === b.textElemId && (E.preventDefault(), b.cmd.do("insertHTML", "


    ")) } g.push(w) } o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(17)), f = s(t(44)); (0, d.default)(o, "__esModule", { value: !0 }), o.cutToKeepP = void 0; var c = t(2), m = t(7), p = c.__importDefault(t(3)); function b(g, y, S) { function w() { var I = g.$textElem, D = g.$textElem.html(), R = g.$textElem.text(), L = (0, u.default)(D).call(D), B = ["


    ", "
    ", '

    ', m .EMPTY_P]; /^\s*$/.test(R) && (!L || (0, f.default)(B).call(B, L)) && (I.html(m .EMPTY_P), g.selection.createRangeByElem(I, !1, !0), g .selection.restoreSelection(), g.selection.moveCursor(I .getNode(), 0)) } y.push(w); function E(I) { var D, R = g.$textElem, L = (0, u.default)(D = R.html().toLowerCase()).call(D); if (L === m.EMPTY_P) { I.preventDefault(); return } } S.push(E) } function x(g, y) { function S(w) { var E; if (w.keyCode === 88) { var I = g.$textElem, D = (0, u.default)(E = I.html().toLowerCase()).call(E); if (!D || D === "
    ") { var R = p.default(m.EMPTY_P); I.html(" "), I.append(R), g.selection.createRangeByElem(R, !1, ! 0), g.selection.restoreSelection(), g.selection .moveCursor(R.getNode(), 0) } } } y.push(S) } o.cutToKeepP = x, o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); function u(f, c) { function m() { if (!!f.cmd.queryCommandSupported("insertHTML")) { var p = f.selection.getSelectionContainerElem(); if (!!p) { var b = p.parent(), x = p.getNodeName(), g = b.getNodeName(); x == "CODE" || g === "CODE" || g === "PRE" || /hljs/.test(g) ? f .cmd.do("insertHTML", f.config.languageTab) : f.cmd.do( "insertHTML", "    ") } } } c.push(m) } o.default = u }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(17)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(130), c = t(6), m = t(7); function p(S) { var w, E = (0, u.default)(w = S.replace(/
    /gim, "

    ").replace( /<\/div>/gim, "

    ")).call(w), I = document.createElement("div"); return I.innerHTML = E, I.innerHTML.replace(/

    <\/p>/gim, "") } function b(S) { var w = S.replace(/
    |/gm, ` `).replace(/<[^>]+>/gm, ""); return w } function x(S) { var w; if (S === "") return !1; var E = document.createElement("div"); return E.innerHTML = S, ((w = E.firstChild) === null || w === void 0 ? void 0 : w.nodeName) === "P" } function g(S) { if (!(S != null && S.length)) return !1; var w = S.elems[0]; return w.nodeName === "P" && w.innerHTML === "
    " } function y(S, w) { function E(I) { var D = S.config, R = D.pasteFilterStyle, L = D.pasteIgnoreImg, B = D.pasteTextHandle, j = f.getPasteHtml(I, R, L), z = f.getPasteText(I); z = z.replace(/\n/gm, "
    "); var U = S.selection.getSelectionContainerElem(); if (!!U) { var N = U == null ? void 0 : U.getNodeName(), H = U == null ? void 0 : U.getNodeTop(S), F = ""; if (H.elems[0] && (F = H == null ? void 0 : H.getNodeName()), N === "CODE" || F === "PRE") { B && c.isFunction(B) && (z = "" + (B(z) || "")), S.cmd.do( "insertHTML", b(z)); return } if (m.urlRegex.test(z) && R) { B && c.isFunction(B) && (z = "" + (B(z) || "")); var V = m.urlRegex.exec(z)[0], M = z.replace(m.urlRegex, ""); return S.cmd.do("insertHTML", '' + V + "" + M) } if (!!j) try { B && c.isFunction(B) && (j = "" + (B(j) || "")); var k = /[\.\#\@]?\w+[ ]+\{[^}]*\}/.test(j); if (k && R) S.cmd.do("insertHTML", "" + p(z)); else { var G = p(j); if (x(G)) { var J = S.$textElem; if (S.cmd.do("insertHTML", G), J.equal(U)) { S.selection.createEmptyRange(); return } g(H) && H.remove() } else { var ee = /^]*src=['"]([^'"]+)[^>]*>$/g; ee.test(G) || S.cmd.do("insertHTML", G) } } } catch { B && c.isFunction(B) && (z = "" + (B(z) || "")), S.cmd.do( "insertHTML", "" + p(z)) } } } w.push(E) } o.default = y }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(17)), f = s(t(4)), c = s(t(44)); (0, d.default)(o, "__esModule", { value: !0 }); var m = t(2), p = t(293), b = m.__importDefault(t(297)); function x(E) { var I = /.*?<\/span>/gi, D = /(.*?)<\/span>/; return E.replace(I, function(R) { var L = R.match(D); return L == null ? "" : L[1] }) } function g(E, I) { var D; return E = (0, u.default)(D = E.toLowerCase()).call(D), !!(p.IGNORE_TAGS .has(E) || I && E === "img") } function y(E, I) { var D = ""; D = "<" + E; var R = []; (0, f.default)(I).call(I, function(B) { R.push(B.name + '="' + B.value + '"') }), R.length > 0 && (D = D + " " + R.join(" ")); var L = p.EMPTY_TAGS.has(E); return D = D + (L ? "/" : "") + ">", D } function S(E) { return "" } function w(E, I, D) { I === void 0 && (I = !0), D === void 0 && (D = !1); var R = [], L = ""; function B(N) { N = (0, u.default)(N).call(N), N && (p.EMPTY_TAGS.has(N) || (L = N)) } function j() { L = "" } var z = new b.default; z.parse(E, { startElement: function(H, F) { if (B(H), !g(H, D)) { var V = p.NECESSARY_ATTRS.get(H) || [], M = []; (0, f.default)(F).call(F, function(G) { var J = G.name; if (J === "style") { I || M.push(G); return }(0, c.default)(V).call(V, J) !== !1 && M.push(G) }); var k = y(H, M); R.push(k) } }, characters: function(H) { !H || g(L, D) || R.push(H) }, endElement: function(H) { if (!g(H, D)) { var F = S(H); R.push(F), j() } }, comment: function(H) { B(H) } }); var U = R.join(""); return U = x(U), U } o.default = w }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(131)), f = s(t(120)); (0, d.default)(o, "__esModule", { value: !0 }), o.TOP_LEVEL_TAGS = o.EMPTY_TAGS = o.NECESSARY_ATTRS = o.IGNORE_TAGS = void 0, o.IGNORE_TAGS = new u.default(["doctype", "!doctype", "html", "head", "meta", "body", "script", "style", "link", "frame", "iframe", "title", "svg", "center", "o:p" ]), o.NECESSARY_ATTRS = new f.default([ ["img", ["src", "alt"]], ["a", ["href", "target"]], ["td", ["colspan", "rowspan"]], ["th", ["colspan", "rowspan"]] ]), o.EMPTY_TAGS = new u.default(["area", "base", "basefont", "br", "col", "hr", "img", "input", "isindex", "embed" ]), o.TOP_LEVEL_TAGS = new u.default(["h1", "h2", "h3", "h4", "h5", "p", "ul", "ol", "table", "blockquote", "pre", "hr", "form" ]) }, function(l, o, t) { var s = t(295); l.exports = s }, function(l, o, t) { t(296), t(61), t(50), t(54); var s = t(9); l.exports = s.Set }, function(l, o, t) { var s = t(121), d = t(123); l.exports = s("Set", function(u) { return function() { return u(this, arguments.length ? arguments[0] : void 0) } }, d) }, function(l, o) { function t() {} t.prototype = { handler: null, startTagRe: /^<([^>\s\/]+)((\s+[^=>\s]+(\s*=\s*((\"[^"]*\")|(\'[^']*\')|[^>\s]+))?)*)\s*\/?\s*>/m, endTagRe: /^<\/([^>\s]+)[^>]*>/m, attrRe: /([^=\s]+)(\s*=\s*((\"([^"]*)\")|(\'([^']*)\')|[^>\s]+))?/gm, parse: function(d, u) { u && (this.contentHandler = u); for (var f, c, m, p = !1, b = this; d.length > 0;) d.substring( 0, 4) == ""), m != -1 ? (this .contentHandler.comment(d.substring(4, m)), d = d .substring(m + 3), p = !1) : p = !0) : d.substring(0, 2) == " 0 && p(y.children, S.getRootNode()) } S && g.appendChild(S) }), m.default(g) } o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(89)), f = s(t(70)), c = s(t(44)), m = s(t(302)), p = s(t(4)), b = s(t(94)), x = s(t(132)), g = s(t(46)), y = s(t(57)); (0, d.default)(o, "__esModule", { value: !0 }); var S = t(2), w = S.__importDefault(t(87)), E = S.__importDefault(t(314)), I = S.__importDefault(t(3)), D = function() { function R(L) { this.editor = L, this.menuList = [], this.constructorList = E .default } return R.prototype.extend = function(L, B) { !B || typeof B != "function" || (this.constructorList[L] = B) }, R.prototype.init = function() { var L, B, j = this, z = this.editor.config, U = z.excludeMenus; (0, u.default)(U) === !1 && (U = []), z.menus = (0, f.default)( L = z.menus).call(L, function(J) { return (0, c.default)(U).call(U, J) === !1 }); var N = (0, m.default)(w.default .globalCustomMenuConstructorList); N = (0, f.default)(N).call(N, function(J) { return (0, c.default)(U).call(U, J) }), (0, p.default)(N).call(N, function(J) { delete w.default.globalCustomMenuConstructorList[J] }), (0, p.default)(B = z.menus).call(B, function(J) { var ee = j.constructorList[J]; j._initMenuList(J, ee) }); for (var H = 0, F = (0, b.default)(w.default .globalCustomMenuConstructorList); H < F.length; H++) { var V = F[H], M = V[0], k = V[1], G = k; this._initMenuList(M, G) } this._addToToolbar(), z.showMenuTooltips && this ._bindMenuTooltips() }, R.prototype._initMenuList = function(L, B) { var j; if (!(B == null || typeof B != "function")) if ((0, x.default)(j = this.menuList).call(j, function(U) { return U.key === L })) console.warn( "\u83DC\u5355\u540D\u79F0\u91CD\u590D:" + L); else { var z = new B(this.editor); z.key = L, this.menuList.push(z) } }, R.prototype._bindMenuTooltips = function() { var L = this.editor, B = L.$toolbarElem, j = L.config, z = j.menuTooltipPosition, U = I.default( '

    `); U.css("visibility", "hidden"), B.append(U), U.css("z-index", L .zIndex.get("tooltip")); var N = 0; function H() { N && clearTimeout(N) } function F() { H(), U.css("visibility", "hidden") } B.on("mouseover", function(V) { var M = V.target, k = I.default(M), G, J; if (k.isContain(B)) { F(); return } if (k.parentUntil(".w-e-droplist") != null) F(); else if (k.attr("data-title")) G = k.attr( "data-title"), J = k; else { var ee = k.parentUntil(".w-e-menu"); ee != null && (G = ee.attr("data-title"), J = ee) } if (G && J) { H(); var Z = J.getOffsetData(); U.text(L.i18next.t("menus.title." + G)); var te = U.getOffsetData(), ue = Z.left + Z.width / 2 - te.width / 2; U.css("left", ue + "px"), z === "up" ? U.css( "top", Z.top - te.height - 8 + "px") : z === "down" && U.css("top", Z.top + Z .height + 8 + "px"), N = (0, g.default)( function() { U.css("visibility", "visible") }, 200) } else F() }).on("mouseleave", function() { F() }) }, R.prototype._addToToolbar = function() { var L, B = this.editor, j = B.$toolbarElem; (0, p.default)(L = this.menuList).call(L, function(z) { var U = z.$elem; U && j.append(U) }) }, R.prototype.menuFind = function(L) { for (var B = this.menuList, j = 0, z = B.length; j < z; j++) if (B[j].key === L) return B[j]; return B[0] }, R.prototype.changeActive = function() { var L; (0, p.default)(L = this.menuList).call(L, function(B) { var j; (0, g.default)((0, y.default)(j = B.tryChangeActive) .call(j, B), 100) }) }, R }(); o.default = D }, function(l, o, t) { l.exports = t(303) }, function(l, o, t) { var s = t(304); l.exports = s }, function(l, o, t) { t(305); var s = t(9); l.exports = s.Object.keys }, function(l, o, t) { var s = t(5), d = t(29), u = t(52), f = t(11), c = f(function() { u(1) }); s({ target: "Object", stat: !0, forced: c }, { keys: function(p) { return u(d(p)) } }) }, function(l, o, t) { var s = t(307); l.exports = s }, function(l, o, t) { t(308); var s = t(9); l.exports = s.Object.entries }, function(l, o, t) { var s = t(5), d = t(309).entries; s({ target: "Object", stat: !0 }, { entries: function(f) { return d(f) } }) }, function(l, o, t) { var s = t(14), d = t(52), u = t(28), f = t(59).f, c = function(p) { return function(b) { for (var x = u(b), g = d(x), y = g.length, S = 0, w = [], E; y > S;) E = g[S++], (!s || f.call(x, E)) && w.push(p ? [E, x[ E]] : x[E]); return w } }; l.exports = { entries: c(!0), values: c(!1) } }, function(l, o, t) { var s = t(311); l.exports = s }, function(l, o, t) { var s = t(312), d = Array.prototype; l.exports = function(u) { var f = u.some; return u === d || u instanceof Array && f === d.some ? s : f } }, function(l, o, t) { t(313); var s = t(15); l.exports = s("Array").some }, function(l, o, t) { var s = t(5), d = t(30).some, u = t(67), f = t(22), c = u("some"), m = f("some"); s({ target: "Array", proto: !0, forced: !c || !m }, { some: function(b) { return d(this, b, arguments.length > 1 ? arguments[1] : void 0) } }) }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(315)), c = u.__importDefault(t(316)), m = u.__importDefault(t(321)), p = u.__importDefault(t(326)), b = u.__importDefault(t(327)), x = u.__importDefault(t(328)), g = u.__importDefault(t(329)), y = u.__importDefault(t(331)), S = u.__importDefault(t(333)), w = u.__importDefault(t(334)), E = u.__importDefault(t(337)), I = u.__importDefault(t(338)), D = u.__importDefault(t(339)), R = u.__importDefault(t(350)), L = u.__importDefault(t(365)), B = u.__importDefault(t(369)), j = u.__importDefault(t(137)), z = u.__importDefault(t(378)), U = u.__importDefault(t(380)), N = u.__importDefault(t(381)), H = u.__importDefault(t(382)), F = u.__importDefault(t(401)), V = u.__importDefault(t(406)), M = u.__importDefault(t(409)); o.default = { bold: f.default, head: c.default, italic: p.default, link: m.default, underline: b.default, strikeThrough: x.default, fontName: g.default, fontSize: y.default, justify: S.default, quote: w.default, backColor: E.default, foreColor: I.default, video: D.default, image: R.default, indent: L.default, emoticon: B.default, list: j.default, lineHeight: z.default, undo: U.default, redo: N.default, table: H.default, code: F.default, splitLine: V.default, todo: M.default } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(23)), c = u.__importDefault(t(3)), m = function(p) { u.__extends(b, p); function b(x) { var g = this, y = c.default(`
    `); return g = p.call(this, y, x) || this, g } return b.prototype.clickHandler = function() { var x = this.editor, g = x.selection.isSelectionEmpty(); g && x.selection.createEmptyRange(), x.cmd.do("bold"), g && (x .selection.collapseRange(), x.selection .restoreSelection()) }, b.prototype.tryChangeActive = function() { var x = this.editor; x.cmd.queryCommandState("bold") ? this.active() : this .unActive() }, b }(f.default); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(27)), f = s(t(31)), c = s(t(4)), m = s(t(317)), p = s(t(44)); (0, d.default)(o, "__esModule", { value: !0 }); var b = t(2), x = b.__importDefault(t(24)), g = b.__importDefault(t(3)), y = t(6), S = t(7), w = function(E) { b.__extends(I, E); function I(D) { var R = this, L = g.default( '
    ' ), B = { width: 100, title: "\u8BBE\u7F6E\u6807\u9898", type: "list", list: [{ $elem: g.default("

    H1

    "), value: "

    " }, { $elem: g.default("

    H2

    "), value: "

    " }, { $elem: g.default("

    H3

    "), value: "

    " }, { $elem: g.default("

    H4

    "), value: "

    " }, { $elem: g.default("

    H5
    "), value: "
    " }, { $elem: g.default("

    " + D.i18next.t( "menus.dropListMenu.head.\u6B63\u6587" ) + "

    "), value: "

    " }], clickHandler: function(U) { R.command(U) } }; R = E.call(this, L, D, B) || this; var j = D.config.onCatalogChange; return j && (R.oldCatalogs = [], R.addListenerCatalog(), R .getCatalogs()), R } return I.prototype.command = function(D) { var R = this.editor, L = R.selection.getSelectionContainerElem(); if (L && R.$textElem.equal(L)) this.setMultilineHead(D); else { var B; if ((0, u.default)(B = ["OL", "UL", "LI", "TABLE", "TH", "TR", "CODE", "HR" ]).call(B, g.default(L).getNodeName()) > -1) return; R.cmd.do("formatBlock", D) } D !== "

    " && this.addUidForSelectionElem() }, I.prototype.addUidForSelectionElem = function() { var D = this.editor, R = D.selection.getSelectionContainerElem(), L = y.getRandomCode(); g.default(R).attr("id", L) }, I.prototype.addListenerCatalog = function() { var D = this, R = this.editor; R.txt.eventHooks.changeEvents.push(function() { D.getCatalogs() }) }, I.prototype.getCatalogs = function() { var D = this.editor, R = this.editor.$textElem, L = D.config.onCatalogChange, B = (0, f.default)(R).call(R, "h1,h2,h3,h4,h5"), j = []; (0, c.default)(B).call(B, function(z, U) { var N = g.default(z), H = N.attr("id"), F = N.getNodeName(), V = N.text(); H || (H = y.getRandomCode(), N.attr("id", H)), V && j.push({ tag: F, id: H, text: V }) }), (0, m.default)(this.oldCatalogs) !== (0, m.default)( j) && (this.oldCatalogs = j, L && L(j)) }, I.prototype.setMultilineHead = function(D) { var R = this, L, B, j = this.editor, z = j.selection, U = (L = z.getSelectionContainerElem()) === null || L === void 0 ? void 0 : L.elems[0], N = ["IMG", "VIDEO", "TABLE", "TH", "TR", "UL", "OL", "PRE", "HR", "BLOCKQUOTE" ], H = g.default(z.getSelectionStartElem()), F = g.default(z.getSelectionEndElem()); F.elems[0].outerHTML === g.default(S.EMPTY_P).elems[0] .outerHTML && !F.elems[0].nextSibling && (F = F.prev()); var V = []; V.push(H.getNodeTop(j)); var M = [], k = (B = z.getRange()) === null || B === void 0 ? void 0 : B .commonAncestorContainer.childNodes; k == null || (0, c.default)(k).call(k, function(ee, Z) { ee === V[0].getNode() && M.push(Z), ee === F .getNodeTop(j).getNode() && M.push(Z) }); for (var G = 0; V[G].getNode() !== F.getNodeTop(j).getNode();) { if (!V[G].elems[0]) return; var J = g.default(V[G].next().getNode()); V.push(J), G++ } V == null || (0, c.default)(V).call(V, function(ee, Z) { if (!R.hasTag(ee, N)) { var te = g.default(D), ue = ee.parent().getNode(); te.html("" + ee.html()), ue.insertBefore(te .getNode(), ee.getNode()), ee.remove() } }), z.createRangeByElems(U.children[M[0]], U.children[M[1]]) }, I.prototype.hasTag = function(D, R) { var L = this, B; if (!D) return !1; if ((0, p.default)(R).call(R, D == null ? void 0 : D .getNodeName())) return !0; var j = !1; return (B = D.children()) === null || B === void 0 || (0, c .default)(B).call(B, function(z) { j = L.hasTag(g.default(z), R) }), j }, I.prototype.tryChangeActive = function() { var D = this.editor, R = /^h/i, L = D.cmd.queryCommandValue("formatBlock"); R.test(L) ? this.active() : this.unActive() }, I }(x.default); o.default = w }, function(l, o, t) { l.exports = t(318) }, function(l, o, t) { var s = t(319); l.exports = s }, function(l, o, t) { t(320); var s = t(9); s.JSON || (s.JSON = { stringify: JSON.stringify }), l.exports = function(u, f, c) { return s.JSON.stringify.apply(null, arguments) } }, function(l, o, t) { var s = t(5), d = t(35), u = t(11), f = d("JSON", "stringify"), c = /[\uD800-\uDFFF]/g, m = /^[\uD800-\uDBFF]$/, p = /^[\uDC00-\uDFFF]$/, b = function(y, S, w) { var E = w.charAt(S - 1), I = w.charAt(S + 1); return m.test(y) && !p.test(I) || p.test(y) && !m.test(E) ? "\\u" + y .charCodeAt(0).toString(16) : y }, x = u(function() { return f("\uDF06\uD834") !== '"\\udf06\\ud834"' || f("\uDEAD") !== '"\\udead"' }); f && s({ target: "JSON", stat: !0, forced: x }, { stringify: function(y, S, w) { var E = f.apply(null, arguments); return typeof E == "string" ? E.replace(c, b) : E } }) }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(17)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(37)), m = f.__importDefault(t(3)), p = f.__importDefault(t(322)), b = f.__importDefault(t(134)), x = f.__importDefault(t(32)), g = f.__importDefault(t(324)), y = t(7), S = function(w) { f.__extends(E, w); function E(I) { var D = this, R = m.default( '

    ' ); return D = w.call(this, R, I) || this, g.default(I), D } return E.prototype.clickHandler = function() { var I = this.editor, D, R = I.selection.getSelectionContainerElem(), L = I.$textElem, B = L.html(), j = (0, u.default)(B).call(B); if (j === y.EMPTY_P) { var z = L.children(); I.selection.createRangeByElem(z, !0, !0), R = I.selection .getSelectionContainerElem() } if (!(R && I.$textElem.equal(R))) if (this.isActive) { if (D = I.selection.getSelectionContainerElem(), !D) return; this.createPanel(D.text(), D.attr("href")) } else I.selection.isSelectionEmpty() ? this.createPanel("", "") : this.createPanel(I.selection .getSelectionText(), "") }, E.prototype.createPanel = function(I, D) { var R = p.default(this.editor, I, D), L = new x.default(this, R); L.create() }, E.prototype.tryChangeActive = function() { var I = this.editor; b.default(I) ? this.active() : this.unActive() }, E }(c.default); o.default = S }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(17)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = t(6), m = f.__importDefault(t(3)), p = f.__importDefault(t(134)), b = t(323); function x(g, y, S) { var w = c.getRandom("input-link"), E = c.getRandom("input-text"), I = c.getRandom("btn-ok"), D = c.getRandom("btn-del"), R = p.default(g) ? "inline-block" : "none", L; function B() { if (!!p.default(g)) { var H = g.selection.getSelectionContainerElem(); !H || (g.selection.createRangeByElem(H), g.selection .restoreSelection(), L = H) } } function j(H, F) { var V = new RegExp(/(<\/*ul>)|(<\/*li>)|(<\/*ol>)/g); H = H.replace(V, ""), p.default(g) && B(), g.cmd.do("insertHTML", '' + H + "") } function z() { if (!!p.default(g)) { B(); var H = L.text(); g.cmd.do("insertHTML", "" + H + "") } } function U(H, F) { var V = g.config.linkCheck(H, F); if (V !== void 0) { if (V === !0) return !0; g.config.customAlert(V, "warning") } return !1 } var N = { width: 300, height: 0, tabs: [{ title: g.i18next.t( "menus.panelMenus.link.\u94FE\u63A5"), tpl: `
    `, events: [{ selector: "#" + I, type: "click", fn: function() { var F, V, M, k; g.selection.restoreSelection(); var G = g.selection .getSelectionRangeTopNodes()[0] .getNode(), J = window.getSelection(), ee = m.default("#" + w), Z = m.default("#" + E), te = (0, u.default)(F = ee .val()).call(F), ue = (0, u.default)(V = Z.val()) .call(V), ge = ""; J && !(J != null && J .isCollapsed) && (ge = (M = b .insertHtml(J, G)) === null || M === void 0 ? void 0 : (0, u.default)(M) .call(M)); var ve = ge == null ? void 0 : ge .replace(/<.*?>/g, ""), ce = (k = ve == null ? void 0 : ve.length) !== null && k !== void 0 ? k : 0; if (ce <= ue.length) { var le = ue.substring(0, ce), oe = ue.substring(ce); ve === le && (ue = ge + oe) } if (!!te && (ue || (ue = te), !!U( ue, te))) return j(ue, te), !0 }, bindEnter: !0 }, { selector: "#" + D, type: "click", fn: function() { return z(), !0 } }] }] }; return N } o.default = x }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }), o.insertHtml = o.createPartHtml = o.makeHtmlString = o.getTopNode = void 0; function f(g, y) { var S = g, w = g; do { if (S.textContent === y) break; w = S, S.parentNode && (S = S == null ? void 0 : S.parentNode) } while ((S == null ? void 0 : S.nodeName) !== "P"); return w } o.getTopNode = f; function c(g, y) { var S = g.nodeName, w = ""; if (g.nodeType === 3 || /^(h|H)[1-6]$/.test(S)) return y; if (g.nodeType === 1) { var E = g.getAttribute("style"), I = g.getAttribute("face"), D = g.getAttribute("color"); E && (w = w + (' style="' + E + '"')), I && (w = w + (' face="' + I + '"')), D && (w = w + (' color="' + D + '"')) } return S = S.toLowerCase(), "<" + S + w + ">" + y + "" } o.makeHtmlString = c; function m(g, y, S, w) { var E, I = (E = y.textContent) === null || E === void 0 ? void 0 : E .substring(S, w), D = y, R = ""; do R = c(D, I != null ? I : ""), I = R, D = D == null ? void 0 : D .parentElement; while (D && D.textContent !== g); return R } o.createPartHtml = m; function p(g, y) { var S, w, E, I, D, R = g.anchorNode, L = g.focusNode, B = g.anchorOffset, j = g.focusOffset, z = (S = y.textContent) !== null && S !== void 0 ? S : "", U = b(y), N = "", H = "", F = "", V = "", M = R, k = L, G = R; if (R != null && R.isEqualNode(L != null ? L : null)) { var J = m(z, R, B, j); return J = x(U, J), J } for (R && (H = m(z, R, B != null ? B : 0)), L && (V = m(z, L, 0, j)), R && ( M = f(R, z)), L && (k = f(L, z)), G = (w = M == null ? void 0 : M .nextSibling) !== null && w !== void 0 ? w : R; !(G != null && G .isEqualNode(k != null ? k : null));) { var ee = G == null ? void 0 : G.nodeName; if (ee === "#text") F = F + (G == null ? void 0 : G.textContent); else { var Z = (I = (E = G == null ? void 0 : G.firstChild) === null || E === void 0 ? void 0 : E.parentElement) === null || I === void 0 ? void 0 : I.innerHTML; G && (F = F + c(G, Z != null ? Z : "")) } var te = (D = G == null ? void 0 : G.nextSibling) !== null && D !== void 0 ? D : G; if (te === G) break; G = te } return N = "" + H + F + V, N = x(U, N), N } o.insertHtml = p; function b(g) { for (var y, S = (y = g.textContent) !== null && y !== void 0 ? y : "", w = []; (g == null ? void 0 : g.textContent) === S;) g.nodeName !== "P" && g .nodeName !== "TABLE" && w.push(g), g = g.childNodes[0]; return w } function x(g, y) { return (0, u.default)(g).call(g, function(S) { y = c(S, y) }), y } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(325)); function c(m) { f.default(m) } o.default = c }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(38)); function m(b) { var x; function g(S) { var w = [{ $elem: f.default("" + b.i18next.t( "menus.panelMenus.link.\u67E5\u770B\u94FE\u63A5" ) + ""), onClick: function(I, D) { var R = D.attr("href"); return window.open(R, "_target"), !0 } }, { $elem: f.default("" + b.i18next.t( "menus.panelMenus.link.\u53D6\u6D88\u94FE\u63A5" ) + ""), onClick: function(I, D) { var R, L; I.selection.createRangeByElem(D), I.selection .restoreSelection(); var B = D.childNodes(); if ((B == null ? void 0 : B.getNodeName()) === "IMG") { var j = (L = (R = I.selection .getSelectionContainerElem()) === null || R === void 0 ? void 0 : R .children()) === null || L === void 0 ? void 0 : L.elems[0].children[0]; I.cmd.do("insertHTML", `") } else { var z = D.text(); I.cmd.do("insertHTML", "" + z + "") } return !0 } }]; x = new c.default(b, S, w), x.create() } function y() { x && (x.remove(), x = null) } return { showLinkTooltip: g, hideLinkTooltip: y } } function p(b) { var x = m(b), g = x.showLinkTooltip, y = x.hideLinkTooltip; b.txt.eventHooks.linkClickEvents.push(g), b.txt.eventHooks.clickEvents.push( y), b.txt.eventHooks.keyupEvents.push(y), b.txt.eventHooks .toolbarClickEvents.push(y), b.txt.eventHooks.menuClickEvents.push(y), b .txt.eventHooks.textScrollEvents.push(y) } o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(23)), c = u.__importDefault(t(3)), m = function(p) { u.__extends(b, p); function b(x) { var g = this, y = c.default(`
    `); return g = p.call(this, y, x) || this, g } return b.prototype.clickHandler = function() { var x = this.editor, g = x.selection.isSelectionEmpty(); g && x.selection.createEmptyRange(), x.cmd.do("italic"), g && (x .selection.collapseRange(), x.selection .restoreSelection()) }, b.prototype.tryChangeActive = function() { var x = this.editor; x.cmd.queryCommandState("italic") ? this.active() : this .unActive() }, b }(f.default); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(23)), c = u.__importDefault(t(3)), m = function(p) { u.__extends(b, p); function b(x) { var g = this, y = c.default(`
    `); return g = p.call(this, y, x) || this, g } return b.prototype.clickHandler = function() { var x = this.editor, g = x.selection.isSelectionEmpty(); g && x.selection.createEmptyRange(), x.cmd.do("underline"), g && (x.selection.collapseRange(), x.selection .restoreSelection()) }, b.prototype.tryChangeActive = function() { var x = this.editor; x.cmd.queryCommandState("underline") ? this.active() : this .unActive() }, b }(f.default); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(23)), c = u.__importDefault(t(3)), m = function(p) { u.__extends(b, p); function b(x) { var g = this, y = c.default(`
    `); return g = p.call(this, y, x) || this, g } return b.prototype.clickHandler = function() { var x = this.editor, g = x.selection.isSelectionEmpty(); g && x.selection.createEmptyRange(), x.cmd.do("strikeThrough"), g && (x.selection.collapseRange(), x.selection .restoreSelection()) }, b.prototype.tryChangeActive = function() { var x = this.editor; x.cmd.queryCommandState("strikeThrough") ? this.active() : this .unActive() }, b }(f.default); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(24)), c = u.__importDefault(t(3)), m = u.__importDefault(t(330)), p = function(b) { u.__extends(x, b); function x(g) { var y = this, S = c.default(`
    `), w = new m.default(g.config.fontNames), E = { width: 100, title: "\u8BBE\u7F6E\u5B57\u4F53", type: "list", list: w.getItemList(), clickHandler: function(D) { y.command(D) } }; return y = b.call(this, S, g, E) || this, y } return x.prototype.command = function(g) { var y, S = this.editor, w = S.selection.isSelectionEmpty(), E = (y = S.selection.getSelectionContainerElem()) === null || y === void 0 ? void 0 : y.elems[0]; if (E != null) { var I = (E == null ? void 0 : E.nodeName.toLowerCase()) !== "p", D = (E == null ? void 0 : E.getAttribute("face")) === g; if (w) { if (I && !D) { var R = S.selection.getSelectionRangeTopNodes(); S.selection.createRangeByElem(R[0]), S.selection .moveCursor(R[0].elems[0]) } S.selection.setRangeToElem(E), S.selection .createEmptyRange() } S.cmd.do("fontName", g), w && (S.selection.collapseRange(), S.selection.restoreSelection()) } }, x.prototype.tryChangeActive = function() {}, x }(f.default); o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = function() { function p(b) { var x = this; this.itemList = [], (0, u.default)(b).call(b, function(g) { var y = typeof g == "string" ? g : g.value, S = typeof g == "string" ? g : g.name; x.itemList.push({ $elem: c.default(`

    ` + S + "

    "), value: S }) }) } return p.prototype.getItemList = function() { return this.itemList }, p }(); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(24)), c = u.__importDefault(t(3)), m = u.__importDefault(t(332)), p = function(b) { u.__extends(x, b); function x(g) { var y = this, S = c.default(`
    `), w = new m.default(g.config.fontSizes), E = { width: 160, title: "\u8BBE\u7F6E\u5B57\u53F7", type: "list", list: w.getItemList(), clickHandler: function(D) { y.command(D) } }; return y = b.call(this, S, g, E) || this, y } return x.prototype.command = function(g) { var y, S = this.editor, w = S.selection.isSelectionEmpty(), E = (y = S.selection.getSelectionContainerElem()) === null || y === void 0 ? void 0 : y.elems[0]; E != null && (S.cmd.do("fontSize", g), w && (S.selection .collapseRange(), S.selection.restoreSelection())) }, x.prototype.tryChangeActive = function() {}, x }(f.default); o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(3)), c = function() { function m(p) { this.itemList = []; for (var b in p) { var x = p[b]; this.itemList.push({ $elem: f.default('

    ' + x.name + "

    "), value: x.value }) } } return m.prototype.getItemList = function() { return this.itemList }, m }(); o.default = c }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)), f = s(t(27)); (0, d.default)(o, "__esModule", { value: !0 }); var c = t(2), m = c.__importDefault(t(24)), p = c.__importDefault(t(3)), b = ["LI"], x = ["UL", "BLOCKQUOTE"], g = function(y) { c.__extends(S, y); function S(w) { var E = this, I = p.default( '
    ' ), D = { width: 100, title: "\u5BF9\u9F50\u65B9\u5F0F", type: "list", list: [{ $elem: p.default(`

    ` + w.i18next.t("menus.dropListMenu.justify.\u9760\u5DE6") + `

    `), value: "left" }, { $elem: p.default(`

    ` + w.i18next.t("menus.dropListMenu.justify.\u5C45\u4E2D") + `

    `), value: "center" }, { $elem: p.default(`

    ` + w.i18next.t("menus.dropListMenu.justify.\u9760\u53F3") + `

    `), value: "right" }, { $elem: p.default(`

    ` + w.i18next.t("menus.dropListMenu.justify.\u4E24\u7AEF") + `

    `), value: "justify" }], clickHandler: function(L) { E.command(L) } }; return E = y.call(this, I, w, D) || this, E } return S.prototype.command = function(w) { var E = this.editor, I = E.selection, D = I.getSelectionContainerElem(); I.saveRange(); var R = E.selection.getSelectionRangeTopNodes(); if (D != null && D.length) if (this.isSpecialNode(D, R[0]) || this.isSpecialTopNode(R[ 0])) { var L = this.getSpecialNodeUntilTop(D, R[0]); if (L == null) return; p.default(L).css("text-align", w) } else(0, u.default)(R).call(R, function(B) { B.css("text-align", w) }); I.restoreSelection() }, S.prototype.getSpecialNodeUntilTop = function(w, E) { for (var I = w.elems[0], D = E.elems[0]; I != null;) { if ((0, f.default)(b).call(b, I == null ? void 0 : I .nodeName) !== -1 || I.parentNode === D) return I; I = I.parentNode } return I }, S.prototype.isSpecialNode = function(w, E) { var I = this.getSpecialNodeUntilTop(w, E); return I == null ? !1 : (0, f.default)(b).call(b, I .nodeName) !== -1 }, S.prototype.isSpecialTopNode = function(w) { var E; return w == null ? !1 : (0, f.default)(x).call(x, (E = w.elems[ 0]) === null || E === void 0 ? void 0 : E.nodeName) !== -1 }, S.prototype.tryChangeActive = function() {}, S }(m.default); o.default = g }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = f.__importDefault(t(23)), p = f.__importDefault(t(335)), b = f.__importDefault(t(336)), x = t(7), g = function(y) { f.__extends(S, y); function S(w) { var E = this, I = c.default(`
    `); return E = y.call(this, I, w) || this, p.default(w), E } return S.prototype.clickHandler = function() { var w, E, I = this.editor, D = I.selection.isSelectionEmpty(), R = I.selection.getSelectionRangeTopNodes(), L = R[R.length - 1], B = this.getTopNodeName(); if (B === "BLOCKQUOTE") { var j = c.default(L.childNodes()), z = j.length, U = L; (0, u.default)(j).call(j, function(V) { var M = c.default(V); M.insertAfter(U), U = M }), L.remove(), I.selection.moveCursor(j.elems[z - 1]), this.tryChangeActive() } else { var N = b.default(R); if (I.$textElem.equal(L)) { var H = (w = I.selection .getSelectionContainerElem()) === null || w === void 0 ? void 0 : w.elems[0]; I.selection.createRangeByElems(H.children[0], H .children[0]), R = I.selection .getSelectionRangeTopNodes(), N = b.default(R), L .append(N) } else N.insertAfter(L); this.delSelectNode(R); var F = (E = N.childNodes()) === null || E === void 0 ? void 0 : E.last().getNode(); if (F == null) return; F.textContent ? I.selection.moveCursor(F) : I.selection .moveCursor(F, 0), this.tryChangeActive(), c.default(x .EMPTY_P).insertAfter(N); return } D && (I.selection.collapseRange(), I.selection .restoreSelection()) }, S.prototype.tryChangeActive = function() { var w, E = this.editor, I = (w = E.selection.getSelectionRangeTopNodes()[0]) === null || w === void 0 ? void 0 : w.getNodeName(); I === "BLOCKQUOTE" ? this.active() : this.unActive() }, S.prototype.getTopNodeName = function() { var w = this.editor, E = w.selection.getSelectionRangeTopNodes()[0], I = E == null ? void 0 : E.getNodeName(); return I }, S.prototype.delSelectNode = function(w) { (0, u.default)(w).call(w, function(E) { E.remove() }) }, S }(m.default); o.default = g }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = t(7), c = u.__importDefault(t(3)); function m(p) { function b(x) { var g, y = p.selection.getSelectionContainerElem(), S = p.selection.getSelectionRangeTopNodes()[0]; if ((S == null ? void 0 : S.getNodeName()) === "BLOCKQUOTE") { if (y.getNodeName() === "BLOCKQUOTE") { var w = (g = y.childNodes()) === null || g === void 0 ? void 0 : g.getNode(); p.selection.moveCursor(w) } if (y.text() === "") { x.preventDefault(), y.remove(); var E = c.default(f.EMPTY_P); E.insertAfter(S), p.selection.moveCursor(E.getNode(), 0) } S.text() === "" && S.remove() } } p.txt.eventHooks.enterDownEvents.push(b) } o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)); function m(p) { var b = c.default("
    "); return (0, u.default)(p).call(p, function(x) { b.append(x.clone(!0)) }), b } o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(26)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(24)), m = f.__importDefault(t(3)), p = t(6), b = function(x) { f.__extends(g, x); function g(y) { var S, w = this, E = m.default(`
    `), I = { width: 120, title: "\u80CC\u666F\u989C\u8272", type: "inline-block", list: (0, u.default)(S = y.config.colors).call(S, function( D) { return { $elem: m.default('' ), value: D } }), clickHandler: function(R) { w.command(R) } }; return w = x.call(this, E, y, I) || this, w } return g.prototype.command = function(y) { var S, w = this.editor, E = w.selection.isSelectionEmpty(), I = (S = w.selection.getSelectionContainerElem()) === null || S === void 0 ? void 0 : S.elems[0]; if (I != null) { var D = (I == null ? void 0 : I.nodeName.toLowerCase()) !== "p", R = I == null ? void 0 : I.style.backgroundColor, L = p.hexToRgb(y) === R; if (E) { if (D && !L) { var B = w.selection.getSelectionRangeTopNodes(); w.selection.createRangeByElem(B[0]), w.selection .moveCursor(B[0].elems[0]) } w.selection.createEmptyRange() } w.cmd.do("backColor", y), E && (w.selection.collapseRange(), w.selection.restoreSelection()) } }, g.prototype.tryChangeActive = function() {}, g }(c.default); o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(26)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(24)), m = f.__importDefault(t(3)), p = function(b) { f.__extends(x, b); function x(g) { var y, S = this, w = m.default(`
    `), E = { width: 120, title: "\u6587\u5B57\u989C\u8272", type: "inline-block", list: (0, u.default)(y = g.config.colors).call(y, function( I) { return { $elem: m.default(''), value: I } }), clickHandler: function(D) { S.command(D) } }; return S = b.call(this, w, g, E) || this, S } return x.prototype.command = function(g) { var y, S = this.editor, w = S.selection.isSelectionEmpty(), E = (y = S.selection.getSelectionContainerElem()) === null || y === void 0 ? void 0 : y.elems[0]; if (E != null) { var I = S.selection.getSelectionText(); if (E.nodeName === "A" && E.textContent === I) { var D = m.default("").getNode(); E.appendChild(D) } S.cmd.do("foreColor", g), w && (S.selection.collapseRange(), S.selection.restoreSelection()) } }, x.prototype.tryChangeActive = function() {}, x }(c.default); o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(32)), m = u.__importDefault(t(37)), p = u.__importDefault(t(340)), b = u.__importDefault(t(346)), x = function(g) { u.__extends(y, g); function y(S) { var w = this, E = f.default(`
    `); return w = g.call(this, E, S) || this, b.default(S), w } return y.prototype.clickHandler = function() { this.createPanel("") }, y.prototype.createPanel = function(S) { var w = p.default(this.editor, S), E = new c.default(this, w); E.create() }, y.prototype.tryChangeActive = function() {}, y }(m.default); o.default = x }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(17)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = t(6), m = f.__importDefault(t(3)), p = f.__importDefault(t(341)), b = t(7); function x(g, y) { var S = g.config, w = new p.default(g), E = c.getRandom("input-iframe"), I = c.getRandom("btn-ok"), D = c.getRandom("input-upload"), R = c.getRandom("btn-local-ok"); function L(U) { g.cmd.do("insertHTML", U + b.EMPTY_P), g.config.onlineVideoCallback(U) } function B(U) { var N = g.config.onlineVideoCheck(U); return N === !0 ? !0 : (typeof N == "string" && g.config.customAlert(N, "error"), !1) } var j = [{ title: g.i18next.t( "menus.panelMenus.video.\u4E0A\u4F20\u89C6\u9891"), tpl: `
    `, events: [{ selector: "#" + R, type: "click", fn: function() { var N = m.default("#" + D), H = N.elems[0]; if (H) H.click(); else return !0 } }, { selector: "#" + D, type: "change", fn: function() { var N = m.default("#" + D), H = N.elems[0]; if (!H) return !0; var F = H.files; return F.length && w.uploadVideo(F), !0 } }] }, { title: g.i18next.t( "menus.panelMenus.video.\u63D2\u5165\u89C6\u9891"), tpl: `
    "/>
    `, events: [{ selector: "#" + I, type: "click", fn: function() { var N, H = m.default("#" + E), F = (0, u.default)(N = H.val()).call(N); if (!!F && !!B(F)) return L(F), !0 }, bindEnter: !0 }] }], z = { width: 300, height: 0, tabs: [] }; return window.FileReader && (S.uploadVideoServer || S.customUploadVideo) && z.tabs.push(j[0]), S.showLinkVideo && z.tabs.push(j[1]), z } o.default = x }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(132)), f = s(t(57)), c = s(t(4)), m = s(t(27)); (0, d.default)(o, "__esModule", { value: !0 }); var p = t(2), b = t(6), x = p.__importDefault(t(135)), g = p.__importDefault(t(136)), y = t(7), S = t(6), w = function() { function E(I) { this.editor = I } return E.prototype.uploadVideo = function(I) { var D = this; if (!!I.length) { var R = this.editor, L = R.config, B = "validate.", j = function(de) { return R.i18next.t(B + de) }, z = L.uploadVideoServer, U = L.uploadVideoMaxSize, N = U / 1024, H = L.uploadVideoName, F = L.uploadVideoParams, V = L.uploadVideoParamsWithUrl, M = L.uploadVideoHeaders, k = L.uploadVideoHooks, G = L.uploadVideoTimeout, J = L.withVideoCredentials, ee = L.customUploadVideo, Z = L.uploadVideoAccept, te = [], ue = []; if (b.arrForEach(I, function(se) { var de = se.name, Le = se.size / 1024 / 1024; if (!(!de || !Le)) { if (!(Z instanceof Array)) { ue.push("\u3010" + Z + "\u3011" + j( "uploadVideoAccept \u4E0D\u662FArray" )); return } if (!(0, u.default)(Z).call(Z, function( De) { return De === de.split(".")[de .split(".").length - 1] })) { ue.push("\u3010" + de + "\u3011" + j( "\u4E0D\u662F\u89C6\u9891")); return } if (N < Le) { ue.push("\u3010" + de + "\u3011" + j( "\u5927\u4E8E") + " " + N + "M"); return } te.push(se) } }), ue.length) { L.customAlert(j( "\u89C6\u9891\u9A8C\u8BC1\u672A\u901A\u8FC7" ) + `: ` + ue.join(` `), "warning"); return } if (te.length === 0) { L.customAlert(j( "\u4F20\u5165\u7684\u6587\u4EF6\u4E0D\u5408\u6CD5" ), "warning"); return } if (ee && typeof ee == "function") { var ge; ee(te, (0, f.default)(ge = this.insertVideo).call(ge, this)); return } var ve = new FormData; if ((0, c.default)(te).call(te, function(se, de) { var Le = H || se.name; te.length > 1 && (Le = Le + (de + 1)), ve .append(Le, se) }), z) { var ce = z.split("#"); z = ce[0]; var le = ce[1] || ""; (0, c.default)(b).call(b, F, function(se, de) { V && ((0, m.default)(z).call(z, "?") > 0 ? z += "&" : z += "?", z = z + se + "=" + de), ve.append(se, de) }), le && (z += "#" + le); var oe = x.default(z, { timeout: G, formData: ve, headers: M, withCredentials: !!J, beforeSend: function(de) { if (k.before) return k.before(de, R, te) }, onTimeout: function(de) { L.customAlert(j( "\u4E0A\u4F20\u89C6\u9891\u8D85\u65F6" ), "error"), k.timeout && k .timeout(de, R) }, onProgress: function(de, Le) { var De = new g.default(R); Le.lengthComputable && (de = Le .loaded / Le.total, De.show( de)) }, onError: function(de) { L.customAlert(j( "\u4E0A\u4F20\u89C6\u9891\u9519\u8BEF" ), "error", j( "\u4E0A\u4F20\u89C6\u9891\u9519\u8BEF" ) + "\uFF0C" + j( "\u670D\u52A1\u5668\u8FD4\u56DE\u72B6\u6001" ) + ": " + de.status), k .error && k.error(de, R) }, onFail: function(de, Le) { L.customAlert(j( "\u4E0A\u4F20\u89C6\u9891\u5931\u8D25" ), "error", j( "\u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF" ) + ("\uFF0C" + j( "\u8FD4\u56DE\u7ED3\u679C" ) + ": ") + Le), k.fail && k .fail(de, R, Le) }, onSuccess: function(de, Le) { if (k.customInsert) { var De; k.customInsert((0, f.default)( De = D.insertVideo) .call(De, D), Le, R); return } if (Le.errno != "0") { L.customAlert(j( "\u4E0A\u4F20\u89C6\u9891\u5931\u8D25" ), "error", j( "\u4E0A\u4F20\u89C6\u9891\u8FD4\u56DE\u7ED3\u679C\u9519\u8BEF" ) + "\uFF0C" + j( "\u8FD4\u56DE\u7ED3\u679C" ) + " errno=" + Le .errno), k.fail && k .fail(de, R, Le); return } var Fe = Le.data; D.insertVideo(Fe.url), k.success && k.success(de, R, Le) } }); typeof oe == "string" && L.customAlert(oe, "error") } } }, E.prototype.insertVideo = function(I) { var D = this.editor, R = D.config, L = "validate.", B = function(U, N) { return N === void 0 && (N = L), D.i18next.t(N + U) }; if (!R.customInsertVideo) S.UA.isFirefox ? D.cmd.do( "insertHTML", '

    ' ) : D.cmd.do("insertHTML", '' + y.EMPTY_P); else { R.customInsertVideo(I); return } var j = document.createElement("video"); j.onload = function() { j = null }, j.onerror = function() { R.customAlert(B("\u63D2\u5165\u89C6\u9891\u9519\u8BEF"), "error", "wangEditor: " + B( "\u63D2\u5165\u89C6\u9891\u9519\u8BEF") + "\uFF0C" + B("\u89C6\u9891\u94FE\u63A5") + ' "' + I + '"\uFF0C' + B( "\u4E0B\u8F7D\u94FE\u63A5\u5931\u8D25")), j = null }, j.onabort = function() { return j = null }, j.src = I }, E }(); o.default = w }, function(l, o, t) { l.exports = t(343) }, function(l, o, t) { var s = t(344); l.exports = s }, function(l, o, t) { t(345); var s = t(9); l.exports = s.Date.now }, function(l, o, t) { var s = t(5); s({ target: "Date", stat: !0 }, { now: function() { return new Date().getTime() } }) }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(347)), c = u.__importDefault(t(349)); function m(p) { f.default(p), c.default(p) } o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.createShowHideFn = void 0; var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(38)), m = u.__importDefault(t(348)); function p(x) { var g, y = function(I, D) { return D === void 0 && (D = ""), x.i18next.t(D + I) }; function S(E) { var I = [{ $elem: f.default(""), onClick: function(R, L) { return L.remove(), !0 } }, { $elem: f.default("100%"), onClick: function(R, L) { return L.attr("width", "100%"), L.removeAttr( "height"), !0 } }, { $elem: f.default("50%"), onClick: function(R, L) { return L.attr("width", "50%"), L.removeAttr( "height"), !0 } }, { $elem: f.default("30%"), onClick: function(R, L) { return L.attr("width", "30%"), L.removeAttr( "height"), !0 } }, { $elem: f.default("" + y("\u91CD\u7F6E") + ""), onClick: function(R, L) { return L.removeAttr("width"), L.removeAttr( "height"), !0 } }, { $elem: f.default("" + y( "menus.justify.\u9760\u5DE6") + ""), onClick: function(R, L) { return m.default(L, "left"), !0 } }, { $elem: f.default("" + y( "menus.justify.\u5C45\u4E2D") + ""), onClick: function(R, L) { return m.default(L, "center"), !0 } }, { $elem: f.default("" + y( "menus.justify.\u9760\u53F3") + ""), onClick: function(R, L) { return m.default(L, "right"), !0 } }]; g = new c.default(x, E, I), g.create() } function w() { g && (g.remove(), g = null) } return { showVideoTooltip: S, hideVideoTooltip: w } } o.createShowHideFn = p; function b(x) { var g = p(x), y = g.showVideoTooltip, S = g.hideVideoTooltip; x.txt.eventHooks.videoClickEvents.push(y), x.txt.eventHooks.clickEvents .push(S), x.txt.eventHooks.keyupEvents.push(S), x.txt.eventHooks .toolbarClickEvents.push(S), x.txt.eventHooks.menuClickEvents.push(S), x .txt.eventHooks.textScrollEvents.push(S), x.txt.eventHooks.changeEvents .push(S) } o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(44)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)); function m(b, x) { var g = ["P"], y = p(b, g); y && c.default(y).css("text-align", x) } o.default = m; function p(b, x) { for (var g, y = b.elems[0]; y != null;) { if ((0, u.default)(x).call(x, y == null ? void 0 : y.nodeName)) return y; if (((g = y == null ? void 0 : y.parentNode) === null || g === void 0 ? void 0 : g.nodeName) === "BODY") return null; y = y.parentNode } return y } }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(6); function f(c) { if (!!u.UA.isFirefox) { var m = c.txt, p = c.selection, b = m.eventHooks.keydownEvents; b.push(function(x) { var g = p.getSelectionContainerElem(); if (g) { var y = g.getNodeTop(c), S = y.length && y.prev().length ? y.prev() : null; S && S.attr("data-we-video-p") && p.getCursorPos() === 0 && x.keyCode === 8 && S.remove() } }) } } o.default = f }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(26)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = t(7), m = f.__importDefault(t(3)), p = f.__importDefault(t(32)), b = f.__importDefault(t(37)), x = f.__importDefault(t(351)), g = f.__importDefault(t(364)), y = function(S) { f.__extends(w, S); function w(E) { var I = this, D = m.default( '
    ' ), R = g.default(E); if (R.onlyUploadConf) { var L; D = R.onlyUploadConf.$elem, (0, u.default)(L = R.onlyUploadConf .events).call(L, function(B) { var j = B.type, z = B.fn || c.EMPTY_FN; D.on(j, function(U) { U.stopPropagation(), z(U) }) }) } return I = S.call(this, D, E) || this, I.imgPanelConfig = R, x .default(E), I } return w.prototype.clickHandler = function() { this.imgPanelConfig.onlyUploadConf || this.createPanel() }, w.prototype.createPanel = function() { var E = this.imgPanelConfig, I = new p.default(this, E); this.setPanel(I), I.create() }, w.prototype.tryChangeActive = function() {}, w }(b.default); o.default = y }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(352)), c = u.__importDefault(t(353)), m = u.__importDefault(t(354)), p = u.__importDefault(t(362)), b = u.__importDefault(t(363)); function x(g) { f.default(g), c.default(g), m.default(g), p.default(g), b.default(g) } o.default = x }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = t(130), c = u.__importDefault(t(96)); function m(g, y) { var S = g.config, w = S.pasteFilterStyle, E = S.pasteIgnoreImg, I = f.getPasteHtml(y, w, E); if (I) return !0; var D = f.getPasteText(y); return !!D } function p(g, y) { for (var S, w = ((S = y.clipboardData) === null || S === void 0 ? void 0 : S .types) || [], E = 0; E < w.length; E++) { var I = w[E]; if (I === "Files") return !0 } return !1 } function b(g, y) { if (!(!p(y, g) && m(y, g))) { var S = f.getPasteImgs(g); if (!!S.length) { var w = new c.default(y); w.uploadImg(S) } } } function x(g) { g.txt.eventHooks.pasteEvents.unshift(function(y) { b(y, g) }) } o.default = x }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(96)); function c(m) { function p(b) { var x = b.dataTransfer && b.dataTransfer.files; if (!(!x || !x.length)) { var g = new f.default(m); g.uploadImg(x) } } m.txt.eventHooks.dropEvents.push(p) } o.default = c }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(31)), f = s(t(355)); (0, d.default)(o, "__esModule", { value: !0 }), o.createShowHideFn = void 0; var c = t(2), m = c.__importDefault(t(3)); t(360); var p = t(6); function b(w, E, I, D, R) { w.attr("style", "width:" + E + "px; height:" + I + "px; left:" + D + "px; top:" + R + "px;") } function x(w, E) { var I = m.default(`
    `); return I.hide(), E.append(I), I } function g(w, E, I) { var D = w.getBoundingClientRect(), R = I.getBoundingClientRect(), L = R.width.toFixed(2), B = R.height.toFixed(2); (0, u.default)(E).call(E, ".w-e-img-drag-show-size").text(L + "px * " + B + "px"), b(E, (0, f.default)(L), (0, f.default)(B), R.left - D.left, R .top - D.top), E.show() } function y(w) { var E = w.$textContainerElem, I, D = x(w, E); function R(j, z) { j.on("click", function(U) { U.stopPropagation() }), j.on("mousedown", ".w-e-img-drag-rb", function(U) { if (U.preventDefault(), !I) return; var N = U.clientX, H = U.clientY, F = z.getBoundingClientRect(), V = I.getBoundingClientRect(), M = V.width, k = V.height, G = V.left - F.left, J = V.top - F.top, ee = M / k, Z = M, te = k, ue = m.default(document); function ge() { ue.off("mousemove", ve), ue.off("mouseup", ce) } function ve(le) { le.stopPropagation(), le.preventDefault(), Z = M + (le .clientX - N), te = k + (le.clientY - H), Z / te != ee && (te = Z / ee), Z = (0, f.default)(Z .toFixed(2)), te = (0, f.default)(te.toFixed( 2)), (0, u.default)(j).call(j, ".w-e-img-drag-show-size").text(Z.toFixed(2) .replace(".00", "") + "px * " + te.toFixed(2) .replace(".00", "") + "px"), b(j, Z, te, G, J) } ue.on("mousemove", ve); function ce() { I.attr("width", Z + ""), I.attr("height", te + ""); var le = I.getBoundingClientRect(); b(j, Z, te, le.left - F.left, le.top - F.top), ge() } ue.on("mouseup", ce), ue.on("mouseleave", ge) }) } function L(j) { if (p.UA.isIE()) return !1; j && (I = j, g(E, D, I)) } function B() { (0, u.default)(E).call(E, ".w-e-img-drag-mask").hide() } return R(D, E), m.default(document).on("click", B), w.beforeDestroy( function() { m.default(document).off("click", B) }), { showDrag: L, hideDrag: B } } o.createShowHideFn = y; function S(w) { var E = y(w), I = E.showDrag, D = E.hideDrag; w.txt.eventHooks.imgClickEvents.push(I), w.txt.eventHooks.textScrollEvents .push(D), w.txt.eventHooks.keyupEvents.push(D), w.txt.eventHooks .toolbarClickEvents.push(D), w.txt.eventHooks.menuClickEvents.push(D), w .txt.eventHooks.changeEvents.push(D) } o.default = S }, function(l, o, t) { l.exports = t(356) }, function(l, o, t) { var s = t(357); l.exports = s }, function(l, o, t) { t(358); var s = t(9); l.exports = s.parseFloat }, function(l, o, t) { var s = t(5), d = t(359); s({ global: !0, forced: parseFloat != d }, { parseFloat: d }) }, function(l, o, t) { var s = t(8), d = t(90).trim, u = t(68), f = s.parseFloat, c = 1 / f(u + "-0") !== -1 / 0; l.exports = c ? function(p) { var b = d(String(p)), x = f(b); return x === 0 && b.charAt(0) == "-" ? -0 : x } : f }, function(l, o, t) { var s = t(20), d = t(361); d = d.__esModule ? d.default : d, typeof d == "string" && (d = [ [l.i, d, ""] ]); var u = {}; u.insert = "head", u.singleton = !1, s(d, u), l.exports = d.locals || {} }, function(l, o, t) { var s = t(21); o = s(!1), o.push([l.i, `.w-e-text-container { overflow: hidden; } .w-e-img-drag-mask { position: absolute; z-index: 1; border: 1px dashed #ccc; box-sizing: border-box; } .w-e-img-drag-mask .w-e-img-drag-rb { position: absolute; right: -5px; bottom: -5px; width: 16px; height: 16px; border-radius: 50%; background: #ccc; cursor: se-resize; } .w-e-img-drag-mask .w-e-img-drag-show-size { min-width: 110px; height: 22px; line-height: 22px; font-size: 14px; color: #999; position: absolute; left: 0; top: 0; background-color: #999; color: #fff; border-radius: 2px; padding: 0 5px; } `, ""]), l.exports = o }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.createShowHideFn = void 0; var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(38)); function m(b) { var x, g = function(E, I) { return I === void 0 && (I = ""), b.i18next.t(I + E) }; function y(w) { var E = [{ $elem: f.default(""), onClick: function(D, R) { return D.selection.createRangeByElem(R), D.selection .restoreSelection(), D.cmd.do("delete"), !0 } }, { $elem: f.default("30%"), onClick: function(D, R) { return R.attr("width", "30%"), R.removeAttr( "height"), !0 } }, { $elem: f.default("50%"), onClick: function(D, R) { return R.attr("width", "50%"), R.removeAttr( "height"), !0 } }, { $elem: f.default("100%"), onClick: function(D, R) { return R.attr("width", "100%"), R.removeAttr( "height"), !0 } }]; E.push({ $elem: f.default("" + g("\u91CD\u7F6E") + ""), onClick: function(D, R) { return R.removeAttr("width"), R.removeAttr( "height"), !0 } }), w.attr("data-href") && E.push({ $elem: f.default("" + g("\u67E5\u770B\u94FE\u63A5") + ""), onClick: function(D, R) { var L = R.attr("data-href"); return L && (L = decodeURIComponent(L), window.open( L, "_target")), !0 } }), x = new c.default(b, w, E), x.create() } function S() { x && (x.remove(), x = null) } return { showImgTooltip: y, hideImgTooltip: S } } o.createShowHideFn = m; function p(b) { var x = m(b), g = x.showImgTooltip, y = x.hideImgTooltip; b.txt.eventHooks.imgClickEvents.push(g), b.txt.eventHooks.clickEvents.push( y), b.txt.eventHooks.keyupEvents.push(y), b.txt.eventHooks .toolbarClickEvents.push(y), b.txt.eventHooks.menuClickEvents.push(y), b .txt.eventHooks.textScrollEvents.push(y), b.txt.eventHooks .imgDragBarMouseDownEvents.push(y), b.txt.eventHooks.changeEvents.push( y) } o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); function u(f) { var c = f.txt, m = f.selection, p = c.eventHooks.keydownEvents; p.push(function(b) { var x = m.getSelectionContainerElem(), g = m.getRange(); if (!(!g || !x || b.keyCode !== 8 || !m.isSelectionEmpty())) { var y = g.startContainer, S = g.startOffset, w = null; if (S === 0) for (; y !== x.elems[0] && x.elems[0].contains(y) && y .parentNode && !w;) { if (y.previousSibling) { w = y.previousSibling; break } y = y.parentNode } else y.nodeType !== 3 && (w = y.childNodes[S - 1]); if (!!w) { for (var E = w; E.childNodes.length;) E = E.childNodes[E .childNodes.length - 1]; E instanceof HTMLElement && E.tagName === "IMG" && (E .remove(), b.preventDefault()) } } }) } o.default = u }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(26)), f = s(t(17)); (0, d.default)(o, "__esModule", { value: !0 }); var c = t(2), m = c.__importDefault(t(3)), p = t(6), b = c.__importDefault(t(96)); function x(g) { var y, S = g.config, w = new b.default(g), E = p.getRandom("up-trigger-id"), I = p.getRandom("up-file-id"), D = p.getRandom("input-link-url"), R = p.getRandom("input-link-url-alt"), L = p.getRandom("input-link-url-href"), B = p.getRandom("btn-link"), j = "menus.panelMenus.image.", z = function(ee, Z) { return Z === void 0 && (Z = j), g.i18next.t(Z + ee) }; function U(J, ee, Z) { var te = S.linkImgCheck(J); return te === !0 ? !0 : (typeof te == "string" && S.customAlert(te, "error"), !1) } var N = S.uploadImgMaxLength === 1 ? "" : 'multiple="multiple"', H = (0, u.default)(y = S.uploadImgAccept).call(y, function(J) { return "image/" + J }).join(","), F = function(ee, Z, te) { return '
    ` }, V = [{ selector: "#" + E, type: "click", fn: function() { var ee = S.uploadImgFromMedia; if (ee && typeof ee == "function") return ee(), !0; var Z = m.default("#" + I), te = Z.elems[0]; if (te) te.click(); else return !0 } }, { selector: "#" + I, type: "change", fn: function() { var ee = m.default("#" + I), Z = ee.elems[0]; if (!Z) return !0; var te = Z.files; return te != null && te.length && w.uploadImg(te), Z && (Z.value = ""), !0 } }], M = [`']; S.showLinkImgAlt && M.push(` '), S.showLinkImgHref && M.push(` '); var k = [{ title: z("\u4E0A\u4F20\u56FE\u7247"), tpl: F("w-e-up-img-container", "w-e-icon-upload2", ""), events: V }, { title: z("\u7F51\u7EDC\u56FE\u7247"), tpl: `
    ` + M.join("") + `
    `, events: [{ selector: "#" + B, type: "click", fn: function() { var ee, Z = m.default("#" + D), te = (0, f.default)(ee = Z.val()).call( ee); if (!!te) { var ue; if (S.showLinkImgAlt) { var ge; ue = (0, f.default)(ge = m.default( "#" + R).val()).call(ge) } var ve; if (S.showLinkImgHref) { var ce; ve = (0, f.default)(ce = m.default( "#" + L).val()).call(ce) } if (!!U(te)) return w.insertImg(te, ue, ve), !0 } }, bindEnter: !0 }] }], G = { width: 300, height: 0, tabs: [], onlyUploadConf: { $elem: m.default(F("w-e-menu", "w-e-icon-image", "\u56FE\u7247")), events: V } }; return window.FileReader && (S.uploadImgShowBase64 || S.uploadImgServer || S .customUploadImg || S.uploadImgFromMedia) && G.tabs.push(k[0]), S .showLinkImg && (G.tabs.push(k[1]), G.onlyUploadConf = void 0), G } o.default = x }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = f.__importDefault(t(24)), p = f.__importDefault(t(366)), b = function(x) { f.__extends(g, x); function g(y) { var S = this, w = c.default(`
    `), E = { width: 130, title: "\u8BBE\u7F6E\u7F29\u8FDB", type: "list", list: [{ $elem: c.default(`

    ` + y.i18next.t("menus.dropListMenu.indent.\u589E\u52A0\u7F29\u8FDB") + `

    `), value: "increase" }, { $elem: c.default(`

    ` + y.i18next.t("menus.dropListMenu.indent.\u51CF\u5C11\u7F29\u8FDB") + `

    `), value: "decrease" }], clickHandler: function(D) { S.command(D) } }; return S = x.call(this, w, y, E) || this, S } return g.prototype.command = function(y) { var S = this.editor, w = S.selection.getSelectionContainerElem(); if (w && S.$textElem.equal(w)) { var E = S.selection.getSelectionRangeTopNodes(); E.length > 0 && (0, u.default)(E).call(E, function(I) { p.default(c.default(I), y, S) }) } else w && w.length > 0 && (0, u.default)(w).call(w, function( I) { p.default(c.default(I), y, S) }); S.selection.restoreSelection(), this.tryChangeActive() }, g.prototype.tryChangeActive = function() { var y = this.editor, S = y.selection.getSelectionStartElem(), w = c.default(S).getNodeTop(y); w.length <= 0 || (w.elems[0].style.paddingLeft != "" ? this .active() : this.unActive()) }, g }(m.default); o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(45)), f = s(t(17)); (0, d.default)(o, "__esModule", { value: !0 }); var c = t(2), m = c.__importDefault(t(367)), p = c.__importDefault(t(368)), b = /^(\d+)(\w+)$/, x = /^(\d+)%$/; function g(S) { var w = S.config.indentation; if (typeof w == "string") { if (b.test(w)) { var E, I = (0, u.default)(E = (0, f.default)(w).call(w).match(b)) .call(E, 1, 3), D = I[0], R = I[1]; return { value: Number(D), unit: R } } else if (x.test(w)) return { value: Number((0, f.default)(w).call(w).match(x)[1]), unit: "%" } } else if (w.value !== void 0 && w.unit) return w; return { value: 2, unit: "em" } } function y(S, w, E) { var I = S.getNodeTop(E), D = /^(P|H[0-9]*)$/; D.test(I.getNodeName()) && (w === "increase" ? m.default(I, g(E)) : w === "decrease" && p.default(I, g(E))) } o.default = y }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(45)); (0, d.default)(o, "__esModule", { value: !0 }); function f(c, m) { var p = c.elems[0]; if (p.style.paddingLeft === "") c.css("padding-left", m.value + m.unit); else { var b = p.style.paddingLeft, x = (0, u.default)(b).call(b, 0, b.length - m.unit.length), g = Number(x) + m.value; c.css("padding-left", "" + g + m.unit) } } o.default = f }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(45)); (0, d.default)(o, "__esModule", { value: !0 }); function f(c, m) { var p = c.elems[0]; if (p.style.paddingLeft !== "") { var b = p.style.paddingLeft, x = (0, u.default)(b).call(b, 0, b.length - m.unit.length), g = Number(x) - m.value; g > 0 ? c.css("padding-left", "" + g + m.unit) : c.css("padding-left", "") } } o.default = f }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(37)), m = u.__importDefault(t(32)), p = u.__importDefault(t(370)), b = function(x) { u.__extends(g, x); function g(y) { var S = this, w = f.default(`

    `); return S = x.call(this, w, y) || this, S } return g.prototype.createPanel = function() { var y = p.default(this.editor), S = new m.default(this, y); S.create() }, g.prototype.clickHandler = function() { this.createPanel() }, g.prototype.tryChangeActive = function() {}, g }(c.default); o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(26)), f = s(t(70)), c = s(t(17)); (0, d.default)(o, "__esModule", { value: !0 }); var m = t(2), p = m.__importDefault(t(3)); function b(x) { var g = x.config.emotions; function y(E) { var I = []; if (E.type == "image") { var D; I = (0, u.default)(D = E.content).call(D, function(L) { return typeof L == "string" ? "" : ' [' + L.alt + `] ` }), I = (0, f.default)(I).call(I, function(L) { return L !== "" }) } else { var R; I = (0, u.default)(R = E.content).call(R, function(L) { return '' + L + "" }) } return I.join("").replace(/ /g, "") } var S = (0, u.default)(g).call(g, function(E) { return { title: x.i18next.t("menus.panelMenus.emoticon." + E.title), tpl: "
    " + y(E) + "
    ", events: [{ selector: ".eleImg", type: "click", fn: function(D) { var R = p.default(D.target), L = R.getNodeName(), B; if (L === "IMG") { var j; B = (0, c.default)(j = R.parent() .html()).call(j) } else B = "" + R.html() + ""; return x.cmd.do("insertHTML", B), !0 } }] } }), w = { width: 300, height: 230, tabs: S }; return w } o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.createListHandle = o.ClassType = void 0; var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(372)), m = u.__importDefault(t(374)), p = u.__importDefault(t(375)), b = u.__importDefault(t(376)), x = u.__importDefault(t(377)), g; (function(E) { E.Wrap = "WrapListHandle", E.Join = "JoinListHandle", E.StartJoin = "StartJoinListHandle", E.EndJoin = "EndJoinListHandle", E.Other = "OtherListHandle" })(g = o.ClassType || (o.ClassType = {})); var y = { WrapListHandle: c.default, JoinListHandle: m.default, StartJoinListHandle: p.default, EndJoinListHandle: b.default, OtherListHandle: x.default }; function S(E, I, D) { if (E === g.Other && D === void 0) throw new Error( "other \u7C7B\u9700\u8981\u4F20\u5165 range"); return E !== g.Other ? new y[E](I) : new y[E](I, D) } o.createListHandle = S; var w = function() { function E(I) { this.handle = I, this.handle.exec() } return E.prototype.getSelectionRangeElem = function() { return f.default(this.handle.selectionRangeElem.get()) }, E }(); o.default = w }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = t(58), p = t(47), b = function(x) { f.__extends(g, x); function g(y) { return x.call(this, y) || this } return g.prototype.exec = function() { var y = this.options, S = y.listType, w = y.listTarget, E = y.$selectionElem, I = y.$startElem, D = y.$endElem, R, L = [], B = E == null ? void 0 : E.getNodeName(), j = I.prior, z = D.prior; if (!I.prior && !D.prior || !(j != null && j.prev().length) && ! (z != null && z.next().length)) { var U; (0, u.default)(U = E == null ? void 0 : E.children()).call( U, function(G) { L.push(c.default(G)) }), B === S ? R = p.createElementFragment(L, p .createDocumentFragment(), "p") : (R = p .createElement(w), (0, u.default)(L).call(L, function(G) { R.appendChild(G.elems[0]) })), this.selectionRangeElem.set(R), p .insertBefore(E, R, E.elems[0]), E.remove() } else { for (var N = j; N.length;) L.push(N), z != null && z.equal( N) ? N = c.default(void 0) : N = N.next(); var H = j.prev(), F = z.next(); if (B === S ? R = p.createElementFragment(L, p .createDocumentFragment(), "p") : (R = p .createElement(w), (0, u.default)(L).call(L, function(G) { R.append(G.elems[0]) })), H.length && F.length) { for (var V = []; F.length;) V.push(F), F = F.next(); var M = p.createElement(B); (0, u.default)(V).call(V, function(G) { M.append(G.elems[0]) }), c.default(M).insertAfter(E), this .selectionRangeElem.set(R); var k = E.next(); k.length ? p.insertBefore(E, R, k.elems[0]) : E.parent() .elems[0].append(R) } else if (!H.length) this.selectionRangeElem.set(R), p .insertBefore(E, R, E.elems[0]); else { this.selectionRangeElem.set(R); var k = E.next(); k.length ? p.insertBefore(E, R, k.elems[0]) : E.parent() .elems[0].append(R) } } }, g }(m.ListHandle); o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = function() { function c() { this._element = null } return c.prototype.set = function(m) { if (m instanceof DocumentFragment) { var p, b = []; (0, u.default)(p = m.childNodes).call(p, function(x) { b.push(x) }), m = b } this._element = m }, c.prototype.get = function() { return this._element }, c.prototype.clear = function() { this._element = null }, c }(); o.default = f }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = t(58), p = t(47), b = function(x) { f.__extends(g, x); function g(y) { return x.call(this, y) || this } return g.prototype.exec = function() { var y, S, w, E, I, D, R, L = this.options, B = L.editor, j = L.listType, z = L.listTarget, U = L.$startElem, N = L.$endElem, H, F = B.selection.getSelectionRangeTopNodes(), V = U == null ? void 0 : U.getNodeName(), M = N == null ? void 0 : N.getNodeName(); if (V === M) if (F.length > 2) if (F.shift(), F.pop(), H = p.createElementFragment(p .filterSelectionNodes(F), p .createDocumentFragment()), V === j)(y = N .children()) === null || y === void 0 || (0, u .default)(y).call(y, function(le) { H.append(le) }), N.remove(), this.selectionRangeElem.set(H), U .elems[0].append(H); else { for (var k = document.createDocumentFragment(), G = document.createDocumentFragment(), J = p .getStartPoint(U); J.length;) { var ee = J.elems[0]; J = J.next(), k.append(ee) } for (var Z = p.getEndPoint(N), te = []; Z.length;) te.unshift(Z.elems[0]), Z = Z.prev(); (0, u.default)(te).call(te, function(le) { G.append(le) }); var ue = p.createElement(z); ue.append(k), ue.append(H), ue.append(G), H = ue, this.selectionRangeElem.set(H), c.default(ue) .insertAfter(U), !(!((S = U.children()) === null || S === void 0) && S.length) && U .remove(), !(!((w = N.children()) === null || w === void 0) && w.length) && N.remove() } else { F.length = 0; for (var J = p.getStartPoint(U); J.length;) F.push(J), J = J .next(); for (var Z = p.getEndPoint(N), te = []; Z.length;) te .unshift(Z), Z = Z.prev(); F.push.apply(F, te), V === j ? (H = p.createElementFragment( F, p.createDocumentFragment(), "p"), this .selectionRangeElem.set(H), p.insertBefore(U, H, N .elems[0])) : (H = p.createElement(z), (0, u .default)(F).call(F, function(de) { H.append(de.elems[0]) }), this.selectionRangeElem.set(H), c.default(H) .insertAfter(U)), !(!((E = U.children()) === null || E === void 0) && E.length) && N.remove(), !(!((I = N .children()) === null || I === void 0) && I .length) && N.remove() } else { for (var ge = [], Z = p.getEndPoint(N); Z.length;) ge .unshift(Z), Z = Z.prev(); for (var ve = [], J = p.getStartPoint(U); J.length;) ve .push(J), J = J.next(); if (H = p.createDocumentFragment(), F.shift(), F.pop(), (0, u.default)(ve).call(ve, function(se) { return H.append(se.elems[0]) }), H = p.createElementFragment(p.filterSelectionNodes( F), H), (0, u.default)(ge).call(ge, function(se) { return H.append(se.elems[0]) }), this.selectionRangeElem.set(H), V === j) U.elems[0] .append(H), !(!((D = N.children()) === null || D === void 0) && D.length) && N.remove(); else if (!((R = N.children()) === null || R === void 0) && R .length) { var ce = N.children(); p.insertBefore(ce, H, ce.elems[0]) } else N.elems[0].append(H) } }, g }(m.ListHandle); o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = t(58), p = t(47), b = function(x) { f.__extends(g, x); function g(y) { return x.call(this, y) || this } return g.prototype.exec = function() { var y, S = this.options, w = S.editor, E = S.listType, I = S.listTarget, D = S.$startElem, R, L = w.selection.getSelectionRangeTopNodes(), B = D == null ? void 0 : D.getNodeName(); L.shift(); for (var j = [], z = p.getStartPoint(D); z.length;) j.push(z), z = z.next(); B === E ? (R = p.createDocumentFragment(), (0, u.default)(j) .call(j, function(U) { return R.append(U.elems[0]) }), R = p.createElementFragment(p.filterSelectionNodes( L), R), this.selectionRangeElem.set(R), D.elems[0] .append(R)) : (R = p.createElement(I), (0, u.default)(j) .call(j, function(U) { return R.append(U.elems[0]) }), R = p.createElementFragment(p.filterSelectionNodes( L), R), this.selectionRangeElem.set(R), c.default(R) .insertAfter(D), !(!((y = D.children()) === null || y === void 0) && y.length) && D.remove()) }, g }(m.ListHandle); o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = t(58), p = t(47), b = function(x) { f.__extends(g, x); function g(y) { return x.call(this, y) || this } return g.prototype.exec = function() { var y, S, w = this.options, E = w.editor, I = w.listType, D = w.listTarget, R = w.$endElem, L, B = E.selection.getSelectionRangeTopNodes(), j = R == null ? void 0 : R.getNodeName(); B.pop(); for (var z = [], U = p.getEndPoint(R); U.length;) z.unshift(U), U = U.prev(); if (j === I) if (L = p.createElementFragment(p.filterSelectionNodes(B), p .createDocumentFragment()), (0, u.default)(z).call( z, function(F) { return L.append(F.elems[0]) }), this.selectionRangeElem.set(L), !((y = R .children()) === null || y === void 0) && y .length) { var N = R.children(); p.insertBefore(N, L, N.elems[0]) } else R.elems[0].append(L); else { var H = p.filterSelectionNodes(B); H.push.apply(H, z), L = p.createElementFragment(H, p .createElement(D)), this.selectionRangeElem.set(L), c.default(L).insertBefore(R), !(!((S = R.children()) === null || S === void 0) && S.length) && R.remove() } }, g }(m.ListHandle); o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = t(58), c = t(47), m = function(p) { u.__extends(b, p); function b(x, g) { var y = p.call(this, x) || this; return y.range = g, y } return b.prototype.exec = function() { var x = this.options, g = x.editor, y = x.listTarget, S = g.selection.getSelectionRangeTopNodes(), w = c.createElementFragment(c.filterSelectionNodes(S), c .createElement(y)); this.selectionRangeElem.set(w), this.range.insertNode(w) }, b }(f.ListHandle); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)), f = s(t(27)); (0, d.default)(o, "__esModule", { value: !0 }); var c = t(2), m = c.__importDefault(t(24)), p = c.__importDefault(t(3)), b = c.__importDefault(t(379)), x = t(6), g = function(y) { c.__extends(S, y); function S(w) { var E = this, I = p.default(`
    `), D = new b.default(w, w.config.lineHeights), R = { width: 100, title: "\u8BBE\u7F6E\u884C\u9AD8", type: "list", list: D.getItemList(), clickHandler: function(B) { w.selection.saveRange(), E.command(B) } }; return E = y.call(this, I, w, R) || this, E } return S.prototype.command = function(w) { var E = this, I, D = window.getSelection ? window.getSelection() : document.getSelection(), R = ["P"], L = this.editor, B = ""; L.selection.restoreSelection(); var j = p.default(L.selection.getSelectionContainerElem()); if (!!(j != null && j.length)) { var z = p.default(L.selection.getSelectionContainerElem()), U = p.default(L.selection.getSelectionStartElem()) .elems[0], N = "", H = [], F = ""; if (j && L.$textElem.equal(j)) { var V = x.UA.isIE(), M = [], k = [], G = [], J = p.default(L.selection.getSelectionStartElem()), ee = p.default(L.selection.getSelectionEndElem()), Z = (I = L.selection.getRange()) === null || I === void 0 ? void 0 : I.commonAncestorContainer .childNodes; k.push(this.getDom(J.elems[0])), Z == null || (0, u .default)(Z).call(Z, function(ce, le) { ce === E.getDom(J.elems[0]) && M.push(le), ce === E.getDom(ee.elems[0]) && M.push( le) }); var te = 0, ue = void 0; for (G.push(this.getDom(J.elems[0])); k[te] !== this .getDom(ee.elems[0]);) ue = p.default(k[te] .nextElementSibling).elems[0], (0, f.default)(R) .call(R, p.default(ue).getNodeName()) !== -1 && G .push(ue), k.push(ue), te++; if (p.default(k[0]).getNodeName() !== "P") { te = 0; for (var ge = 0; ge < k.length; ge++) if (p.default(k[ge]).getNodeName() === "P") { te = ge; break } if (te === 0) return; for (var ve = 0; ve !== te;) k.shift(), ve++ } this.setRange(k[0], k[k.length - 1]), (0, u.default)(k) .call(k, function(ce) { N = ce.getAttribute("style"), H = N ? N .split(";") : [], F = E.styleProcessing( H), p.default(ce).getNodeName() === "P" && w && (F += w ? "line-height:" + w + ";" : ""), V ? p.default(ce) .css("line-height", w) : B += "<" + p .default(ce).getNodeName() .toLowerCase() + ' style="' + F + '">' + ce .innerHTML + "" }), B && this.action(B, L), U = z.elems[0], this .setRange(U.children[M[0]], U.children[M[1]]); return } if (U = this.getDom(U), (0, f.default)(R).call(R, p.default( U).getNodeName()) !== -1) { if (N = U.getAttribute("style"), H = N ? N.split(";") : [], D == null || D.selectAllChildren(U), L.selection .saveRange(), !w) { N && (F = this.styleProcessing(H), F === "" ? B = "<" + p.default(U).getNodeName() .toLowerCase() + ">" + U.innerHTML + "" : B = "<" + p.default(U).getNodeName() .toLowerCase() + ' style="' + F + '">' + U .innerHTML + "", this .action(B, L)); return } N ? F = this.styleProcessing(H) + ("line-height:" + w + ";") : F = "line-height:" + w + ";", B = "<" + p .default(U).getNodeName().toLowerCase() + ' style="' + F + '">' + U.innerHTML + "", p .default(U).getNodeName() === "BLOCKQUOTE" || x.UA .isIE() ? p.default(U).css("line-height", w) : this .action(B, L) } } }, S.prototype.getDom = function(w) { var E = p.default(w).elems[0]; if (!E.parentNode) return E; function I(D, R) { var L = p.default(D.parentNode); return R.$textElem.equal(L) ? D : I(L.elems[0], R) } return E = I(E, this.editor), E }, S.prototype.action = function(w, E) { E.cmd.do("insertHTML", w) }, S.prototype.styleProcessing = function(w) { var E = ""; return (0, u.default)(w).call(w, function(I) { I !== "" && (0, f.default)(I).call(I, "line-height") === -1 && (E = E + I + ";") }), E }, S.prototype.setRange = function(w, E) { var I = this.editor, D = window.getSelection ? window.getSelection() : document .getSelection(); D == null || D.removeAllRanges(); var R = document.createRange(), L = w, B = E; R.setStart(L, 0), R.setEnd(B, 1), D == null || D.addRange(R), I .selection.saveRange(), D == null || D.removeAllRanges(), I .selection.restoreSelection() }, S.prototype.tryChangeActive = function() { var w = this.editor, E = w.selection.getSelectionContainerElem(); if (!(E && w.$textElem.equal(E))) { var I = p.default(w.selection.getSelectionStartElem()); if (I.length !== 0) { I = this.getDom(I.elems[0]); var D = I.getAttribute("style") ? I.getAttribute( "style") : ""; D && (0, f.default)(D).call(D, "line-height") !== -1 ? this.active() : this.unActive() } } }, S }(m.default); o.default = g }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = function() { function p(b, x) { var g = this; this.itemList = [{ $elem: c.default("" + b.i18next.t( "\u9ED8\u8BA4") + ""), value: "" }], (0, u.default)(x).call(x, function(y) { g.itemList.push({ $elem: c.default("" + y + ""), value: y }) }) } return p.prototype.getItemList = function() { return this.itemList }, p }(); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(23)), m = function(p) { u.__extends(b, p); function b(x) { var g = this, y = f.default(`
    `); return g = p.call(this, y, x) || this, g } return b.prototype.clickHandler = function() { var x = this.editor; x.history.revoke(); var g = x.$textElem.children(); if (!!(g != null && g.length)) { var y = g.last(); x.selection.createRangeByElem(y, !1, !0), x.selection .restoreSelection() } }, b.prototype.tryChangeActive = function() { this.editor.isCompatibleMode || (this.editor.history.size[0] ? this.active() : this.unActive()) }, b }(c.default); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(23)), m = function(p) { u.__extends(b, p); function b(x) { var g = this, y = f.default(`
    `); return g = p.call(this, y, x) || this, g } return b.prototype.clickHandler = function() { var x = this.editor; x.history.restore(); var g = x.$textElem.children(); if (!!(g != null && g.length)) { var y = g.last(); x.selection.createRangeByElem(y, !1, !0), x.selection .restoreSelection() } }, b.prototype.tryChangeActive = function() { this.editor.isCompatibleMode || (this.editor.history.size[1] ? this.active() : this.unActive()) }, b }(c.default); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(37)), c = u.__importDefault(t(3)), m = u.__importDefault(t(383)), p = u.__importDefault(t(32)), b = u.__importDefault(t(392)), x = function(g) { u.__extends(y, g); function y(S) { var w = this, E = c.default( '
    ' ); return w = g.call(this, E, S) || this, b.default(S), w } return y.prototype.clickHandler = function() { this.createPanel() }, y.prototype.createPanel = function() { var S = m.default(this.editor), w = new p.default(this, S); w.create() }, y.prototype.tryChangeActive = function() {}, y }(f.default); o.default = x }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(384)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = t(6), m = f.__importDefault(t(3)); t(389); var p = f.__importDefault(t(391)); function b(g) { return g > 0 && (0, u.default)(g) } function x(g) { var y = new p.default(g), S = c.getRandom("w-col-id"), w = c.getRandom("w-row-id"), E = c.getRandom("btn-link"), I = "menus.panelMenus.table.", D = function(j) { return g.i18next.t(j) }, R = [{ title: D(I + "\u63D2\u5165\u8868\u683C"), tpl: `
    ` + D("\u521B\u5EFA") + ` ` + D(I + "\u884C") + ` ` + (D(I + "\u5217") + D(I + "\u7684") + D(I + "\u8868\u683C")) + `
    `, events: [{ selector: "#" + E, type: "click", fn: function() { var j = Number(m.default("#" + S).val()), z = Number(m.default("#" + w).val()); return b(z) && b(j) ? (y.createAction(z, j), !0) : (g.config.customAlert( "\u8868\u683C\u884C\u5217\u8BF7\u8F93\u5165\u6B63\u6574\u6570", "warning"), !1) }, bindEnter: !0 }] }], L = { width: 330, height: 0, tabs: [] }; return L.tabs.push(R[0]), L } o.default = x }, function(l, o, t) { l.exports = t(385) }, function(l, o, t) { var s = t(386); l.exports = s }, function(l, o, t) { t(387); var s = t(9); l.exports = s.Number.isInteger }, function(l, o, t) { var s = t(5), d = t(388); s({ target: "Number", stat: !0 }, { isInteger: d }) }, function(l, o, t) { var s = t(13), d = Math.floor; l.exports = function(f) { return !s(f) && isFinite(f) && d(f) === f } }, function(l, o, t) { var s = t(20), d = t(390); d = d.__esModule ? d.default : d, typeof d == "string" && (d = [ [l.i, d, ""] ]); var u = {}; u.insert = "head", u.singleton = !1, s(d, u), l.exports = d.locals || {} }, function(l, o, t) { var s = t(21); o = s(!1), o.push([l.i, `.w-e-table { display: flex; } .w-e-table .w-e-table-input { width: 40px; text-align: center!important; margin: 0 5px; } `, ""]), l.exports = o }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = t(7), c = u.__importDefault(t(3)), m = function() { function p(b) { this.editor = b } return p.prototype.createAction = function(b, x) { var g = this.editor, y = c.default(g.selection.getSelectionContainerElem()), S = c.default(y.elems[0]).parentUntilEditor("UL", g), w = c.default(y.elems[0]).parentUntilEditor("OL", g); if (!(S || w)) { var E = this.createTableHtml(b, x); g.cmd.do("insertHTML", E) } }, p.prototype.createTableHtml = function(b, x) { for (var g = "", y = "", S = 0; S < b; S++) { y = ""; for (var w = 0; w < x; w++) S === 0 ? y = y + "" : y = y + ""; g = g + "" + y + "" } var E = '' + g + ("
    " + f.EMPTY_P); return E }, p }(); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(393)), c = t(400); function m(p) { f.default(p), c.bindEventKeyboardEvent(p), c.bindClickEvent(p) } o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(38)), m = u.__importDefault(t(394)), p = u.__importDefault(t(399)), b = t(7); function x(w) { var E; function I(R) { var L = new p.default(w), B = "menus.panelMenus.table.", j = function(N, H) { return H === void 0 && (H = B), w.i18next.t(H + N) }, z = [{ $elem: f.default("" + j("\u5220\u9664\u8868\u683C") + ""), onClick: function(N, H) { return N.selection.createRangeByElem(H), N.selection .restoreSelection(), N.cmd.do("insertHTML", b .EMPTY_P), !0 } }, { $elem: f.default("" + j("\u6DFB\u52A0\u884C") + ""), onClick: function(N, H) { var F = g(N); if (F) return !0; var V = f.default(N.selection .getSelectionStartElem()), M = L.getRowNode(V.elems[0]); if (!M) return !0; var k = Number(L.getCurrentRowIndex(H.elems[0], M)), G = L.getTableHtml(H.elems[0]), J = L.getTableHtml(m.default.ProcessingRow(f .default(G), k).elems[0]); return J = S(H, J), N.selection.createRangeByElem( H), N.selection.restoreSelection(), N.cmd.do( "insertHTML", J), !0 } }, { $elem: f.default("" + j("\u5220\u9664\u884C") + ""), onClick: function(N, H) { var F = g(N); if (F) return !0; var V = f.default(N.selection .getSelectionStartElem()), M = L.getRowNode(V.elems[0]); if (!M) return !0; var k = Number(L.getCurrentRowIndex(H.elems[0], M)), G = L.getTableHtml(H.elems[0]), J = m.default.DeleteRow(f.default(G), k).elems[ 0].children[0].children.length, ee = ""; return N.selection.createRangeByElem(H), N.selection .restoreSelection(), J === 0 ? ee = b.EMPTY_P : ee = L.getTableHtml(m.default.DeleteRow(f .default(G), k).elems[0]), ee = S(H, ee), N .cmd.do("insertHTML", ee), !0 } }, { $elem: f.default("" + j("\u6DFB\u52A0\u5217") + ""), onClick: function(N, H) { var F = g(N); if (F) return !0; var V = f.default(N.selection .getSelectionStartElem()), M = L.getCurrentColIndex(V.elems[0]), k = L.getTableHtml(H.elems[0]), G = L.getTableHtml(m.default.ProcessingCol(f .default(k), M).elems[0]); return G = S(H, G), N.selection.createRangeByElem( H), N.selection.restoreSelection(), N.cmd.do( "insertHTML", G), !0 } }, { $elem: f.default("" + j("\u5220\u9664\u5217") + ""), onClick: function(N, H) { var F = g(N); if (F) return !0; var V = f.default(N.selection .getSelectionStartElem()), M = L.getCurrentColIndex(V.elems[0]), k = L.getTableHtml(H.elems[0]), G = m.default.DeleteCol(f.default(k), M), J = G.elems[0].children[0].children[0].children .length, ee = ""; return N.selection.createRangeByElem(H), N.selection .restoreSelection(), J === 0 ? ee = b.EMPTY_P : ee = L.getTableHtml(G.elems[0]), ee = S(H, ee), N.cmd.do("insertHTML", ee), !0 } }, { $elem: f.default("" + j("\u8BBE\u7F6E\u8868\u5934") + ""), onClick: function(N, H) { var F = g(N); if (F) return !0; var V = f.default(N.selection .getSelectionStartElem()), M = L.getRowNode(V.elems[0]); if (!M) return !0; var k = Number(L.getCurrentRowIndex(H.elems[0], M)); k !== 0 && (k = 0); var G = L.getTableHtml(H.elems[0]), J = L.getTableHtml(m.default.setTheHeader(f .default(G), k, "th").elems[0]); return J = S(H, J), N.selection.createRangeByElem( H), N.selection.restoreSelection(), N.cmd.do( "insertHTML", J), !0 } }, { $elem: f.default("" + j("\u53D6\u6D88\u8868\u5934") + ""), onClick: function(N, H) { var F = f.default(N.selection .getSelectionStartElem()), V = L.getRowNode(F.elems[0]); if (!V) return !0; var M = Number(L.getCurrentRowIndex(H.elems[0], V)); M !== 0 && (M = 0); var k = L.getTableHtml(H.elems[0]), G = L.getTableHtml(m.default.setTheHeader(f .default(k), M, "td").elems[0]); return G = S(H, G), N.selection.createRangeByElem( H), N.selection.restoreSelection(), N.cmd.do( "insertHTML", G), !0 } }]; E = new c.default(w, R, z), E.create() } function D() { E && (E.remove(), E = null) } return { showTableTooltip: I, hideTableTooltip: D } } function g(w) { var E = w.selection.getSelectionStartElem(), I = w.selection.getSelectionEndElem(); return (E == null ? void 0 : E.elems[0]) !== (I == null ? void 0 : I.elems[ 0]) } function y(w) { var E = x(w), I = E.showTableTooltip, D = E.hideTableTooltip; w.txt.eventHooks.tableClickEvents.push(I), w.txt.eventHooks.clickEvents .push(D), w.txt.eventHooks.keyupEvents.push(D), w.txt.eventHooks .toolbarClickEvents.push(D), w.txt.eventHooks.menuClickEvents.push(D), w .txt.eventHooks.textScrollEvents.push(D) } o.default = y; function S(w, E) { var I = w.elems[0].nextSibling; return (!I || I.innerHTML === "
    ") && (E += "" + b.EMPTY_P), E } }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(45)), f = s(t(91)), c = s(t(4)), m = s(t(138)); (0, d.default)(o, "__esModule", { value: !0 }); var p = t(2), b = p.__importDefault(t(3)); function x(D, R) { for (var L = I(D), B = (0, u.default)(Array.prototype).apply(L.children), j = B[0].children.length, z = document.createElement("tr"), U = 0; U < j; U++) { var N = document.createElement("td"); z.appendChild(N) } return (0, f.default)(B).call(B, R + 1, 0, z), E(L, B), b.default(L .parentNode) } function g(D, R) { for (var L = I(D), B = (0, u.default)(Array.prototype).apply(L.children), j = function(N) { var H, F = []; for ((0, c.default)(H = (0, m.default)(B[N].children)).call(H, function(k) { F.push(k) }); B[N].children.length !== 0;) B[N].removeChild(B[N] .children[0]); var V = b.default(F[0]).getNodeName() !== "TH" ? document .createElement("td") : document.createElement("th"); (0, f.default)(F).call(F, R + 1, 0, V); for (var M = 0; M < F.length; M++) B[N].appendChild(F[M]) }, z = 0; z < B.length; z++) j(z); return E(L, B), b.default(L.parentNode) } function y(D, R) { var L = I(D), B = (0, u.default)(Array.prototype).apply(L.children); return (0, f.default)(B).call(B, R, 1), E(L, B), b.default(L.parentNode) } function S(D, R) { for (var L = I(D), B = (0, u.default)(Array.prototype).apply(L.children), j = function(N) { var H, F = []; for ((0, c.default)(H = (0, m.default)(B[N].children)).call(H, function(M) { F.push(M) }); B[N].children.length !== 0;) B[N].removeChild(B[N] .children[0]); (0, f.default)(F).call(F, R, 1); for (var V = 0; V < F.length; V++) B[N].appendChild(F[V]) }, z = 0; z < B.length; z++) j(z); return E(L, B), b.default(L.parentNode) } function w(D, R, L) { for (var B = I(D), j = (0, u.default)(Array.prototype).apply(B.children), z = j[R].children, U = document.createElement("tr"), N = function( V) { var M, k = document.createElement(L), G = z[V]; (0, c.default)(M = (0, m.default)(G.childNodes)).call(M, function(J) { k.appendChild(J) }), U.appendChild(k) }, H = 0; H < z.length; H++) N(H); return (0, f.default)(j).call(j, R, 1, U), E(B, j), b.default(B.parentNode) } function E(D, R) { for (; D.children.length !== 0;) D.removeChild(D.children[0]); for (var L = 0; L < R.length; L++) D.appendChild(R[L]) } function I(D) { var R = D.elems[0].children[0]; return R.nodeName === "COLGROUP" && (R = D.elems[0].children[D.elems[0] .children.length - 1]), R } o.default = { ProcessingRow: x, ProcessingCol: g, DeleteRow: y, DeleteCol: S, setTheHeader: w } }, function(l, o, t) { var s = t(396); l.exports = s }, function(l, o, t) { t(50), t(397); var s = t(9); l.exports = s.Array.from }, function(l, o, t) { var s = t(5), d = t(398), u = t(114), f = !u(function(c) { Array.from(c) }); s({ target: "Array", stat: !0, forced: f }, { from: d }) }, function(l, o, t) { var s = t(39), d = t(29), u = t(113), f = t(111), c = t(34), m = t(69), p = t(112); l.exports = function(x) { var g = d(x), y = typeof this == "function" ? this : Array, S = arguments.length, w = S > 1 ? arguments[1] : void 0, E = w !== void 0, I = p(g), D = 0, R, L, B, j, z, U; if (E && (w = s(w, S > 2 ? arguments[2] : void 0, 2)), I != null && !( y == Array && f(I))) for (j = I.call(g), z = j.next, L = new y; !(B = z.call(j)) .done; D++) U = E ? u(j, w, [B.value, D], !0) : B.value, m(L, D, U); else for (R = c(g.length), L = new y(R); R > D; D++) U = E ? w(g[D], D) : g[D], m(L, D, U); return L.length = D, L } }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)), f = s(t(138)); (0, d.default)(o, "__esModule", { value: !0 }); var c = t(2), m = c.__importDefault(t(3)), p = function() { function b(x) { this.editor = x } return b.prototype.getRowNode = function(x) { var g, y = m.default(x).elems[0]; return y.parentNode && (y = (g = m.default(y).parentUntil("TR", y)) === null || g === void 0 ? void 0 : g.elems[0]), y }, b.prototype.getCurrentRowIndex = function(x, g) { var y, S = 0, w = x.children[0]; return w.nodeName === "COLGROUP" && (w = x.children[x.children .length - 1]), (0, u.default)(y = (0, f.default)(w .children)).call(y, function(E, I) { E === g && (S = I) }), S }, b.prototype.getCurrentColIndex = function(x) { var g, y, S = 0, w = m.default(x).getNodeName() === "TD" || m.default(x) .getNodeName() === "TH" ? x : (y = m.default(x).parentUntil( "TD", x)) === null || y === void 0 ? void 0 : y.elems[ 0], E = m.default(w).parent(); return (0, u.default)(g = (0, f.default)(E.elems[0].children)) .call(g, function(I, D) { I === w && (S = D) }), S }, b.prototype.getTableHtml = function(x) { var g = '' + m.default(x).html() + "
    "; return g }, b }(); o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.bindEventKeyboardEvent = o.bindClickEvent = void 0; var u = t(2), f = u.__importDefault(t(3)); function c(b) { if (!b.length) return !1; var x = b.elems[0]; return x.nodeName === "P" && x.innerHTML === "
    " } function m(b) { function x(g, y) { if (y.detail >= 3) { var S = window.getSelection(); if (S) { var w = S.focusNode, E = S.anchorNode, I = f.default(E == null ? void 0 : E.parentElement); if (!g.isContain(f.default(w))) { var D = I.elems[0].tagName === "TD" ? I : I .parentUntilEditor("td", b); if (D) { var R = b.selection.getRange(); R == null || R.setEnd(D.elems[0], D.elems[0].childNodes .length), b.selection.restoreSelection() } } } } } b.txt.eventHooks.tableClickEvents.push(x) } o.bindClickEvent = m; function p(b) { var x = b.txt, g = b.selection, y = x.eventHooks.keydownEvents; y.push(function(S) { b.selection.saveRange(); var w = g.getSelectionContainerElem(); if (w) { var E = w.getNodeTop(b), I = E.length && E.prev().length ? E.prev() : null; if (I && I.getNodeName() === "TABLE" && g .isSelectionEmpty() && g.getCursorPos() === 0 && S .keyCode === 8) { var D = E.next(), R = !!D.length; R && c(E) && (E.remove(), b.selection.setRangeToElem(D .elems[0])), S.preventDefault() } } }) } o.bindEventKeyboardEvent = p }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(26)); (0, d.default)(o, "__esModule", { value: !0 }), o.formatCodeHtml = void 0; var f = t(2), c = f.__importDefault(t(37)), m = f.__importDefault(t(3)), p = t(6), b = f.__importDefault(t(402)), x = f.__importDefault(t(139)), g = f.__importDefault(t(32)), y = f.__importDefault(t(403)); function S(E, I) { if (!I) return I; return I = R(I), I = D(I), I = p.replaceSpecialSymbol(I), I; function D(L) { var B = L.match(//g); return B === null || (0, u.default)(B).call(B, function(j) { L = L.replace(j, j.replace(/<\/code>/g, ` `).replace(/
    /g, "")) }), L } function R(L) { var B, j = L.match(//gm); if (!j || !j.length) return L; for (var z = (0, u.default)(B = p.deepClone(j)).call(B, function(N) { return N = N.replace(/]+>/, ""), N .replace(/<\/span>/, "") }), U = 0; U < j.length; U++) L = L.replace(j[U], z[U]); return R(L) } } o.formatCodeHtml = S; var w = function(E) { f.__extends(I, E); function I(D) { var R = this, L = m.default( '
    ' ); return R = E.call(this, L, D) || this, y.default(D), R } return I.prototype.insertLineCode = function(D) { var R = this.editor, L = m.default("" + D + ""); R.cmd.do("insertElem", L), R.selection.createRangeByElem(L, !1), R.selection.restoreSelection() }, I.prototype.clickHandler = function() { var D = this.editor, R = D.selection.getSelectionText(); this.isActive || (D.selection.isSelectionEmpty() ? this .createPanel("", "") : this.insertLineCode(R)) }, I.prototype.createPanel = function(D, R) { var L = b.default(this.editor, D, R), B = new g.default(this, L); B.create() }, I.prototype.tryChangeActive = function() { var D = this.editor; x.default(D) ? this.active() : this.unActive() }, I }(c.default); o.default = w }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(26)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = t(6), m = f.__importDefault(t(3)), p = f.__importDefault(t(139)), b = t(7); function x(g, y, S) { var w, E = c.getRandom("input-iframe"), I = c.getRandom("select"), D = c.getRandom("btn-ok"); function R(z) { var U, N = p.default(g); N && L(); var H = (U = g.selection.getSelectionStartElem()) === null || U === void 0 ? void 0 : U.elems[0].innerHTML; H && g.cmd.do("insertHTML", b.EMPTY_P), g.cmd.do("insertHTML", z); var F = g.selection.getSelectionStartElem(), V = F == null ? void 0 : F.getNodeTop(g); (V == null ? void 0 : V.getNextSibling().elems.length) === 0 && m .default(b.EMPTY_P).insertAfter(V) } function L() { if (!!p.default(g)) { var z = g.selection.getSelectionStartElem(), U = z == null ? void 0 : z.getNodeTop(g); !U || (g.selection.createRangeByElem(U), g.selection .restoreSelection()) } } var B = function(U) { return g.i18next.t(U) }, j = { width: 500, height: 0, tabs: [{ title: B( "menus.panelMenus.code.\u63D2\u5165\u4EE3\u7801" ), tpl: `
    `, events: [{ selector: "#" + D, type: "click", fn: function() { var U, N, H = document .getElementById(E), F = m.default("#" + I), V = F.val(), M = H.value; if (g.highlight ? U = g.highlight .highlightAuto(M).value : U = "" + M + "", !!M) return p.default(g) ? !1 : (N = '
    ' + U +
    												"
    ", R(N), ! 0) } }] }] }; return j } o.default = x }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(404)), c = u.__importDefault(t(405)); function m(p) { f.default(p), c.default(p) } o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.createShowHideFn = void 0; var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(38)); function m(b) { var x; function g(S) { var w = "menus.panelMenus.code.", E = function(R, L) { return L === void 0 && (L = w), b.i18next.t(L + R) }, I = [{ $elem: f.default("" + E("\u5220\u9664\u4EE3\u7801") + ""), onClick: function(R, L) { return L.remove(), !0 } }]; x = new c.default(b, S, I), x.create() } function y() { x && (x.remove(), x = null) } return { showCodeTooltip: g, hideCodeTooltip: y } } o.createShowHideFn = m; function p(b) { var x = m(b), g = x.showCodeTooltip, y = x.hideCodeTooltip; b.txt.eventHooks.codeClickEvents.push(g), b.txt.eventHooks.clickEvents.push( y), b.txt.eventHooks.toolbarClickEvents.push(y), b.txt.eventHooks .menuClickEvents.push(y), b.txt.eventHooks.textScrollEvents.push(y) } o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = t(7), c = u.__importDefault(t(3)); function m(p) { var b = p.$textElem, x = p.selection, g = p.txt, y = g.eventHooks.keydownEvents; y.push(function(S) { var w; if (S.keyCode === 40) { var E = x.getSelectionContainerElem(), I = (w = b.children()) === null || w === void 0 ? void 0 : w.last(); if ((E == null ? void 0 : E.elems[0].tagName) === "XMP" && ( I == null ? void 0 : I.elems[0].tagName) === "PRE") { var D = c.default(f.EMPTY_P); b.append(D) } } }), y.push(function(S) { p.selection.saveRange(); var w = x.getSelectionContainerElem(); if (w) { var E = w.getNodeTop(p), I = E == null ? void 0 : E.prev(), D = E == null ? void 0 : E.getNextSibling(); if (I.length && (I == null ? void 0 : I.getNodeName()) === "PRE" && D.length === 0 && x.getCursorPos() === 0 && S .keyCode === 8) { var R = c.default(f.EMPTY_P); b.append(R) } } }) } o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(23)), c = u.__importDefault(t(3)), m = u.__importDefault(t(407)), p = t(6), b = t(7), x = function(g) { u.__extends(y, g); function y(S) { var w = this, E = c.default( '
    ' ); return w = g.call(this, E, S) || this, m.default(S), w } return y.prototype.clickHandler = function() { var S = this.editor, w = S.selection.getRange(), E = S.selection.getSelectionContainerElem(); if (!!(E != null && E.length)) { var I = c.default(E.elems[0]), D = I.parentUntil("TABLE", E.elems[0]), R = I.children(); I.getNodeName() !== "CODE" && (D && c.default(D.elems[0]) .getNodeName() === "TABLE" || R && R.length !== 0 && c.default(R.elems[0]).getNodeName() === "IMG" && !( w != null && w.collapsed) || this .createSplitLine()) } }, y.prototype.createSplitLine = function() { var S = "
    " + b.EMPTY_P; p.UA.isFirefox && (S = "

    "), this.editor.cmd.do( "insertHTML", S) }, y.prototype.tryChangeActive = function() {}, y }(f.default); o.default = x }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(408)); function c(m) { f.default(m) } o.default = c }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(3)), c = u.__importDefault(t(38)); function m(b) { var x; function g(S) { var w = [{ $elem: f.default("" + b.i18next.t( "menus.panelMenus.\u5220\u9664") + ""), onClick: function(I, D) { return I.selection.createRangeByElem(D), I.selection .restoreSelection(), I.cmd.do("delete"), !0 } }]; x = new c.default(b, S, w), x.create() } function y() { x && (x.remove(), x = null) } return { showSplitLineTooltip: g, hideSplitLineTooltip: y } } function p(b) { var x = m(b), g = x.showSplitLineTooltip, y = x.hideSplitLineTooltip; b.txt.eventHooks.splitLineEvents.push(g), b.txt.eventHooks.clickEvents.push( y), b.txt.eventHooks.keyupEvents.push(y), b.txt.eventHooks .toolbarClickEvents.push(y), b.txt.eventHooks.menuClickEvents.push(y), b .txt.eventHooks.textScrollEvents.push(y) } o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = f.__importDefault(t(23)), p = t(97), b = f.__importDefault(t(415)), x = f.__importDefault(t(140)), g = function(y) { f.__extends(S, y); function S(w) { var E = this, I = c.default(`
    `); return E = y.call(this, I, w) || this, b.default(w), E } return S.prototype.clickHandler = function() { var w = this.editor; p.isAllTodo(w) ? (this.cancelTodo(), this.tryChangeActive()) : this.setTodo() }, S.prototype.tryChangeActive = function() { p.isAllTodo(this.editor) ? this.active() : this.unActive() }, S.prototype.setTodo = function() { var w = this.editor, E = w.selection.getSelectionRangeTopNodes(); (0, u.default)(E).call(E, function(I) { var D, R = I == null ? void 0 : I.getNodeName(); if (R === "P") { var L = x.default(I), B = L.getTodo(), j = (D = B.children()) === null || D === void 0 ? void 0 : D.getNode(); B.insertAfter(I), w.selection.moveCursor(j), I .remove() } }), this.tryChangeActive() }, S.prototype.cancelTodo = function() { var w = this.editor, E = w.selection.getSelectionRangeTopNodes(); (0, u.default)(E).call(E, function(I) { var D, R, L, B = (R = (D = I.childNodes()) === null || D === void 0 ? void 0 : D .childNodes()) === null || R === void 0 ? void 0 : R.clone(!0), j = c.default("

    "); j.append(B), j.insertAfter(I), (L = j .childNodes()) === null || L === void 0 || L.get(0) .remove(), w.selection.moveCursor(j.getNode()), I.remove() }) }, S }(m.default); o.default = g }, function(l, o, t) { l.exports = t(411) }, function(l, o, t) { var s = t(412); l.exports = s }, function(l, o, t) { var s = t(413), d = Array.prototype; l.exports = function(u) { var f = u.every; return u === d || u instanceof Array && f === d.every ? s : f } }, function(l, o, t) { t(414); var s = t(15); l.exports = s("Array").every }, function(l, o, t) { var s = t(5), d = t(30).every, u = t(67), f = t(22), c = u("every"), m = f("every"); s({ target: "Array", proto: !0, forced: !c || !m }, { every: function(b) { return d(this, b, arguments.length > 1 ? arguments[1] : void 0) } }) }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)), m = t(97), p = f.__importDefault(t(140)), b = t(97), x = t(7); function g(y) { function S(D) { var R, L; if (m.isAllTodo(y)) { D.preventDefault(); var B = y.selection, j = B.getSelectionRangeTopNodes()[0], z = (R = j.childNodes()) === null || R === void 0 ? void 0 : R .get(0), U = (L = window.getSelection()) === null || L === void 0 ? void 0 : L.anchorNode, N = B.getRange(); if (!(N != null && N.collapsed)) { var H = N == null ? void 0 : N.commonAncestorContainer .childNodes, F = N == null ? void 0 : N.startContainer, V = N == null ? void 0 : N.endContainer, M = N == null ? void 0 : N.startOffset, k = N == null ? void 0 : N.endOffset, G = 0, J = 0, ee = []; H == null || (0, u.default)(H).call(H, function(de, Le) { de.contains(F) && (G = Le), de.contains(V) && (J = Le) }), J - G > 1 && (H == null || (0, u.default)(H).call(H, function(de, Le) { Le <= G || Le >= J || ee.push(de) }), (0, u.default)(ee).call(ee, function(de) { de.remove() })), b.dealTextNode(F, M), b.dealTextNode(V, k, !1), y .selection.moveCursor(V, 0) } if (j.text() === "") { var Z = c.default(x.EMPTY_P); Z.insertAfter(j), B.moveCursor(Z.getNode()), j.remove(); return } var te = B.getCursorPos(), ue = m.getCursorNextNode(z == null ? void 0 : z.getNode(), U, te), ge = p.default(c.default(ue)), ve = ge.getInputContainer(), ce = ve.parent().getNode(), le = ge.getTodo(), oe = ve.getNode().nextSibling; if ((z == null ? void 0 : z.text()) === "" && (z == null || z .append(c.default("
    "))), le.insertAfter(j), !oe || ( oe == null ? void 0 : oe.textContent) === "") { if ((oe == null ? void 0 : oe.nodeName) !== "BR") { var se = c.default("
    "); se.insertAfter(ve) } B.moveCursor(ce, 1) } else B.moveCursor(ce) } } function w(D) { var R, L; if (m.isAllTodo(y)) { var B = y.selection, j = B.getSelectionRangeTopNodes()[0], z = (R = j.childNodes()) === null || R === void 0 ? void 0 : R .getNode(), U = c.default("

    "), N = U.getNode(), H = (L = window.getSelection()) === null || L === void 0 ? void 0 : L.anchorNode, F = B.getCursorPos(), V = H.previousSibling; if (j.text() === "") { D.preventDefault(); var M = c.default(x.EMPTY_P); M.insertAfter(j), j.remove(), B.moveCursor(M.getNode(), 0); return } if ((V == null ? void 0 : V.nodeName) === "SPAN" && V.childNodes[0] .nodeName === "INPUT" && F === 0) { var k; D.preventDefault(), z == null || (0, u.default)(k = z .childNodes).call(k, function(G, J) { J !== 0 && N.appendChild(G.cloneNode(!0)) }), U.insertAfter(j), j.remove() } } } function E() { var D = y.selection, R = D.getSelectionRangeTopNodes()[0]; R && b.isTodo(R) && R.text() === "" && (c.default(x.EMPTY_P) .insertAfter(R), R.remove()) } function I(D) { D && D.target instanceof HTMLInputElement && D.target.type === "checkbox" && (D.target.checked ? D.target.setAttribute("checked", "true") : D.target.removeAttribute("checked")) } y.txt.eventHooks.enterDownEvents.push(S), y.txt.eventHooks.deleteUpEvents .push(E), y.txt.eventHooks.deleteDownEvents.push(w), y.txt.eventHooks .clickEvents.push(I) } o.default = g }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.selectorValidator = void 0; var u = t(2), f = u.__importDefault(t(3)), c = t(6), m = t(7), p = u.__importDefault(t(129)), b = { border: "1px solid #c9d8db", toolbarBgColor: "#FFF", toolbarBottomBorder: "1px solid #EEE" }; function x(y) { var S = y.toolbarSelector, w = f.default(S), E = y.textSelector, I = y.config, D = I.height, R = y.i18next, L = f.default("
    "), B = f.default("
    "), j, z, U = null; E == null ? (z = w.children(), w.append(L).append(B), L.css( "background-color", b.toolbarBgColor).css("border", b.border) .css("border-bottom", b.toolbarBottomBorder), B.css("border", b .border).css("border-top", "none").css("height", D + "px")) : (w .append(L), U = f.default(E).children(), f.default(E).append(B), z = B.children()), j = f.default("
    "), j.attr( "contenteditable", "true").css("width", "100%").css("height", "100%"); var N, H = y.config.placeholder; H !== p.default.placeholder ? N = f.default("
    " + H + "
    ") : N = f .default("
    " + R.t(H) + "
    "), N.addClass("placeholder"), z && z .length ? (j.append(z), N.hide()) : j.append(f.default(m.EMPTY_P)), U && U.length && (j.append(U), N.hide()), B.append(j), B.append(N), L .addClass("w-e-toolbar").css("z-index", y.zIndex.get("toolbar")), B .addClass("w-e-text-container"), B.css("z-index", y.zIndex.get()), j .addClass("w-e-text"); var F = c.getRandom("toolbar-elem"); L.attr("id", F); var V = c.getRandom("text-elem"); j.attr("id", V); var M = B.getBoundingClientRect().height, k = j.getBoundingClientRect().height; M !== k && j.css("min-height", M + "px"), y.$toolbarElem = L, y .$textContainerElem = B, y.$textElem = j, y.toolbarElemId = F, y .textElemId = V } o.default = x; function g(y) { var S = "data-we-id", w = /^wangEditor-\d+$/, E = y.textSelector, I = y.toolbarSelector, D = { bar: f.default("
    "), text: f.default("
    ") }; if (I == null) throw new Error( "\u9519\u8BEF\uFF1A\u521D\u59CB\u5316\u7F16\u8F91\u5668\u65F6\u5019\u672A\u4F20\u5165\u4EFB\u4F55\u53C2\u6570\uFF0C\u8BF7\u67E5\u9605\u6587\u6863" ); if (D.bar = f.default(I), !D.bar.elems.length) throw new Error( "\u65E0\u6548\u7684\u8282\u70B9\u9009\u62E9\u5668\uFF1A" + I); if (w.test(D.bar.attr(S))) throw new Error( "\u521D\u59CB\u5316\u8282\u70B9\u5DF2\u5B58\u5728\u7F16\u8F91\u5668\u5B9E\u4F8B\uFF0C\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\u7F16\u8F91\u5668" ); if (E) { if (D.text = f.default(E), !D.text.elems.length) throw new Error( "\u65E0\u6548\u7684\u8282\u70B9\u9009\u62E9\u5668\uFF1A" + E ); if (w.test(D.text.attr(S))) throw new Error( "\u521D\u59CB\u5316\u8282\u70B9\u5DF2\u5B58\u5728\u7F16\u8F91\u5668\u5B9E\u4F8B\uFF0C\u65E0\u6CD5\u91CD\u590D\u521B\u5EFA\u7F16\u8F91\u5668" ) } D.bar.attr(S, y.id), D.text.attr(S, y.id), y.beforeDestroy(function() { D.bar.removeAttr(S), D.text.removeAttr(S) }) } o.selectorValidator = g }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(3)), c = t(7); function m(p, b) { var x = p.$textElem, g = x.children(); if (!g || !g.length) { x.append(f.default(c.EMPTY_P)), m(p); return } var y = g.last(); if (b) { var S = y.html().toLowerCase(), w = y.getNodeName(); if (S !== "
    " && S !== "
    " || w !== "P") { x.append(f.default(c.EMPTY_P)), m(p); return } } p.selection.createRangeByElem(y, !1, !0), p.config.focus ? p.selection .restoreSelection() : p.selection.clearWindowSelectionRange() } o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)); function m(S) { p(S), b(S), x(S) } function p(S) { S.txt.eventHooks.changeEvents.push(function() { var w = S.config.onchange; if (w) { var E = S.txt.html() || ""; S.isFocus = !0, w(E) } S.txt.togglePlaceholder() }) } function b(S) { S.isFocus = !1; function w(E) { var I = E.target, D = c.default(I), R = S.$textElem, L = S.$toolbarElem, B = R.isContain(D), j = L.isContain(D), z = L.elems[0] == E.target; if (B) S.isFocus || y(S), S.isFocus = !0; else { if (j && !z || !S.isFocus) return; g(S), S.isFocus = !1 } } document.activeElement === S.$textElem.elems[0] && S.config.focus && (y(S), S.isFocus = !0), c.default(document).on("click", w), S .beforeDestroy(function() { c.default(document).off("click", w) }) } function x(S) { S.$textElem.on("compositionstart", function() { S.isComposing = !0, S.txt.togglePlaceholder() }).on("compositionend", function() { S.isComposing = !1, S.txt.togglePlaceholder() }) } function g(S) { var w, E = S.config, I = E.onblur, D = S.txt.html() || ""; (0, u.default)(w = S.txt.eventHooks.onBlurEvents).call(w, function(R) { return R() }), I(D) } function y(S) { var w = S.config, E = w.onfocus, I = S.txt.html() || ""; E(I) } o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); function u(f) { var c = f.config, m = c.lang, p = c.languages; if (f.i18next != null) { try { f.i18next.init({ ns: "wangEditor", lng: m, defaultNS: "wangEditor", resources: p }) } catch (b) { throw new Error("i18next:" + b) } return } f.i18next = { t: function(x) { var g = x.split("."); return g[g.length - 1] } } } o.default = u }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(31)); (0, d.default)(o, "__esModule", { value: !0 }), o.setUnFullScreen = o.setFullScreen = void 0; var f = t(2), c = f.__importDefault(t(3)); t(421); var m = "w-e-icon-fullscreen", p = "w-e-icon-fullscreen_exit", b = "w-e-full-screen-editor"; o.setFullScreen = function(g) { var y = c.default(g.toolbarSelector), S = g.$textContainerElem, w = g.$toolbarElem, E = (0, u.default)(w).call(w, "i." + m), I = g.config; E.removeClass(m), E.addClass(p), y.addClass(b), y.css("z-index", I .zIndexFullScreen); var D = w.getBoundingClientRect(); S.css("height", "calc(100% - " + D.height + "px)") }, o.setUnFullScreen = function(g) { var y = c.default(g.toolbarSelector), S = g.$textContainerElem, w = g.$toolbarElem, E = (0, u.default)(w).call(w, "i." + p), I = g.config; E.removeClass(p), E.addClass(m), y.removeClass(b), y.css("z-index", "auto"), S.css("height", I.height + "px") }; var x = function(y) { if (!y.textSelector && !!y.config.showFullScreen) { var S = y.$toolbarElem, w = c.default(`
    `); w.on("click", function(E) { var I, D = (0, u.default)(I = c.default(E .currentTarget)).call(I, "i"); D.hasClass(m) ? (w.attr("data-title", "\u53D6\u6D88\u5168\u5C4F"), o .setFullScreen(y)) : (w.attr("data-title", "\u5168\u5C4F"), o.setUnFullScreen(y)) }), S.append(w) } }; o.default = x }, function(l, o, t) { var s = t(20), d = t(422); d = d.__esModule ? d.default : d, typeof d == "string" && (d = [ [l.i, d, ""] ]); var u = {}; u.insert = "head", u.singleton = !1, s(d, u), l.exports = d.locals || {} }, function(l, o, t) { var s = t(21); o = s(!1), o.push([l.i, `.w-e-full-screen-editor { position: fixed; width: 100%!important; height: 100%!important; left: 0; top: 0; } `, ""]), l.exports = o }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(31)); (0, d.default)(o, "__esModule", { value: !0 }); var f = function(m, p) { var b, x = m.isEnable ? m.$textElem : (0, u.default)(b = m .$textContainerElem).call(b, ".w-e-content-mantle"), g = (0, u.default)(x).call(x, "[id='" + p + "']"), y = g.getOffsetData().top; x.scrollTop(y) }; o.default = f }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(128)), c = { menu: 2, panel: 2, toolbar: 1, tooltip: 1, textContainer: 1 }, m = function() { function p() { this.tier = c, this.baseZIndex = f.default.zIndex } return p.prototype.get = function(b) { return b && this.tier[b] ? this.baseZIndex + this.tier[b] : this .baseZIndex }, p.prototype.init = function(b) { this.baseZIndex == f.default.zIndex && (this.baseZIndex = b .config.zIndex) }, p }(); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(70)), f = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }); var c = t(2), m = c.__importDefault(t(426)), p = t(6), b = t(7); function x(y, S) { return (0, u.default)(y).call(y, function(w) { var E = w.type, I = w.target, D = w.attributeName; return E != "attributes" || E == "attributes" && (D == "contenteditable" || I != S) }) } var g = function(y) { c.__extends(S, y); function S(w) { var E = y.call(this, function(I, D) { var R; if (I = x(I, D.target), (R = E.data).push.apply(R, I), w .isCompatibleMode) E.asyncSave(); else if (!w.isComposing) return E.asyncSave() }) || this; return E.editor = w, E.data = [], E.asyncSave = b.EMPTY_FN, E } return S.prototype.save = function() { this.data.length && (this.editor.history.save(this.data), this .data.length = 0, this.emit()) }, S.prototype.emit = function() { var w; (0, f.default)(w = this.editor.txt.eventHooks.changeEvents).call (w, function(E) { return E() }) }, S.prototype.observe = function() { var w = this; y.prototype.observe.call(this, this.editor.$textElem.elems[0]); var E = this.editor.config.onchangeTimeout; this.asyncSave = p.debounce(function() { w.save() }, E), this.editor.isCompatibleMode || this.editor.$textElem .on("compositionend", function() { w.asyncSave() }) }, S }(m.default); o.default = g }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = function() { function f(c, m) { var p = this; this.options = { subtree: !0, childList: !0, attributes: !0, attributeOldValue: !0, characterData: !0, characterDataOldValue: !0 }, this.callback = function(b) { c(b, p) }, this.observer = new MutationObserver(this.callback), m && ( this.options = m) } return (0, d.default)(f.prototype, "target", { get: function() { return this.node }, enumerable: !1, configurable: !0 }), f.prototype.observe = function(c) { this.node instanceof Node || (this.node = c, this.connect()) }, f.prototype.connect = function() { if (this.node) return this.observer.observe(this.node, this .options), this; throw new Error( "\u8FD8\u672A\u521D\u59CB\u5316\u7ED1\u5B9A\uFF0C\u8BF7\u60A8\u5148\u7ED1\u5B9A\u6709\u6548\u7684 Node \u8282\u70B9" ) }, f.prototype.disconnect = function() { var c = this.observer.takeRecords(); c.length && this.callback(c), this.observer.disconnect() }, f }(); o.default = u }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(428)), c = u.__importDefault(t(435)), m = u.__importDefault(t(436)), p = function() { function b(x) { this.editor = x, this.content = new f.default(x), this.scroll = new c.default(x), this.range = new m.default(x) } return (0, d.default)(b.prototype, "size", { get: function() { return this.scroll.size }, enumerable: !1, configurable: !0 }), b.prototype.observe = function() { this.content.observe(), this.scroll.observe(), !this.editor .isCompatibleMode && this.range.observe() }, b.prototype.save = function(x) { x.length && (this.content.save(x), this.scroll.save(), !this .editor.isCompatibleMode && this.range.save()) }, b.prototype.revoke = function() { this.editor.change.disconnect(); var x = this.content.revoke(); x && (this.scroll.revoke(), this.editor.isCompatibleMode || ( this.range.revoke(), this.editor.$textElem.focus())), this.editor.change.connect(), x && this.editor.change.emit() }, b.prototype.restore = function() { this.editor.change.disconnect(); var x = this.content.restore(); x && (this.scroll.restore(), this.editor.isCompatibleMode || ( this.range.restore(), this.editor.$textElem.focus() )), this.editor.change.connect(), x && this.editor .change.emit() }, b }(); o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(429)), c = u.__importDefault(t(433)), m = function() { function p(b) { this.editor = b } return p.prototype.observe = function() { this.editor.isCompatibleMode ? this.cache = new c.default(this .editor) : this.cache = new f.default(this.editor), this .cache.observe() }, p.prototype.save = function(b) { this.editor.isCompatibleMode ? this.cache.save() : this.cache .compile(b) }, p.prototype.revoke = function() { var b; return (b = this.cache) === null || b === void 0 ? void 0 : b .revoke() }, p.prototype.restore = function() { var b; return (b = this.cache) === null || b === void 0 ? void 0 : b .restore() }, p }(); o.default = m }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(98)), c = u.__importDefault(t(431)), m = t(432), p = function(b) { u.__extends(x, b); function x(g) { var y = b.call(this, g.config.historyMaxSize) || this; return y.editor = g, y } return x.prototype.observe = function() { this.resetMaxSize(this.editor.config.historyMaxSize) }, x.prototype.compile = function(g) { return this.save(c.default(g)), this }, x.prototype.revoke = function() { return b.prototype.revoke.call(this, function(g) { m.revoke(g) }) }, x.prototype.restore = function() { return b.prototype.restore.call(this, function(g) { m.restore(g) }) }, x }(f.default); o.default = p }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }), o.CeilStack = void 0; var u = function() { function f(c) { c === void 0 && (c = 0), this.data = [], this.max = 0, this .reset = !1, c = Math.abs(c), c && (this.max = c) } return f.prototype.resetMax = function(c) { c = Math.abs(c), !this.reset && !isNaN(c) && (this.max = c, this .reset = !0) }, (0, d.default)(f.prototype, "size", { get: function() { return this.data.length }, enumerable: !1, configurable: !0 }), f.prototype.instack = function(c) { return this.data.unshift(c), this.max && this.size > this.max && (this.data.length = this.max), this }, f.prototype.outstack = function() { return this.data.shift() }, f.prototype.clear = function() { return this.data.length = 0, this }, f }(); o.CeilStack = u }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)), f = s(t(27)); (0, d.default)(o, "__esModule", { value: !0 }), o.compliePosition = o.complieNodes = o.compileValue = o.compileType = void 0; var c = t(6); function m(w) { switch (w) { case "childList": return "node"; case "attributes": return "attr"; default: return "text" } } o.compileType = m; function p(w) { switch (w.type) { case "attributes": return w.target.getAttribute(w.attributeName) || ""; case "characterData": return w.target.textContent; default: return "" } } o.compileValue = p; function b(w) { var E = {}; return w.addedNodes.length && (E.add = c.toArray(w.addedNodes)), w .removedNodes.length && (E.remove = c.toArray(w.removedNodes)), E } o.complieNodes = b; function x(w) { var E; return w.previousSibling ? E = { type: "before", target: w.previousSibling } : w.nextSibling ? E = { type: "after", target: w.nextSibling } : E = { type: "parent", target: w.target }, E } o.compliePosition = x; var g = ["UL", "OL", "H1", "H2", "H3", "H4", "H5", "H6"]; function y(w) { var E = [], I = !1, D = []; return (0, u.default)(w).call(w, function(R, L) { var B = { type: m(R.type), target: R.target, attr: R.attributeName || "", value: p(R) || "", oldValue: R.oldValue || "", nodes: b(R), position: x(R) }; if (E.push(B), !!c.UA.isFirefox) { if (I && R.addedNodes.length && R.addedNodes[0].nodeType == 1) { var j = R.addedNodes[0], z = { type: "node", target: j, attr: "", value: "", oldValue: "", nodes: { add: [I] }, position: { type: "parent", target: j } }; (0, f.default)(g).call(g, j.nodeName) != -1 ? (z.nodes .add = c.toArray(j.childNodes), E.push(z)) : I .nodeType == 3 ? (S(j, D) && (z.nodes.add = c .toArray(j.childNodes)), E.push(z)) : (0, f .default)(g).call(g, R.target.nodeName) == -1 && S(j, D) && (z.nodes.add = c.toArray(j.childNodes), E .push(z)) } B.type == "node" && R.removedNodes.length == 1 ? (I = R .removedNodes[0], D.push(I)) : (I = !1, D.length = 0) } }), E } o.default = y; function S(w, E) { for (var I = 0, D = E.length - 1; D > 0 && w.contains(E[D]); D--) I++; return I } }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(4)), f = s(t(94)); (0, d.default)(o, "__esModule", { value: !0 }), o.restore = o.revoke = void 0; function c(D, R) { var L = D.position.target; switch (D.position.type) { case "before": L.nextSibling ? (L = L.nextSibling, (0, u.default)(R).call(R, function(B) { D.target.insertBefore(B, L) })) : (0, u.default)(R).call(R, function(B) { D.target.appendChild(B) }); break; case "after": (0, u.default)(R).call(R, function(B) { D.target.insertBefore(B, L) }); break; default: (0, u.default)(R).call(R, function(B) { L.appendChild(B) }); break } } function m(D) { for (var R = 0, L = (0, f.default)(D.nodes); R < L.length; R++) { var B = L[R], j = B[0], z = B[1]; switch (j) { case "add": (0, u.default)(z).call(z, function(U) { D.target.removeChild(U) }); break; default: { c(D, z); break } } } } function p(D) { var R = D.target; D.oldValue == null ? R.removeAttribute(D.attr) : R.setAttribute(D.attr, D .oldValue) } function b(D) { D.target.textContent = D.oldValue } var x = { node: m, text: b, attr: p }; function g(D) { for (var R = D.length - 1; R > -1; R--) { var L = D[R]; x[L.type](L) } } o.revoke = g; function y(D) { for (var R = 0, L = (0, f.default)(D.nodes); R < L.length; R++) { var B = L[R], j = B[0], z = B[1]; switch (j) { case "add": { c(D, z); break } default: { (0, u.default)(z).call(z, function(U) { U.parentNode.removeChild(U) }); break } } } } function S(D) { D.target.textContent = D.value } function w(D) { D.target.setAttribute(D.attr, D.value) } var E = { node: y, text: S, attr: w }; function I(D) { for (var R = 0, L = D; R < L.length; R++) { var B = L[R]; E[B.type](B) } } o.restore = I }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(434), f = function() { function c(m) { this.editor = m, this.data = new u.TailChain } return c.prototype.observe = function() { this.data.resetMax(this.editor.config.historyMaxSize), this.data .insertLast(this.editor.$textElem.html()) }, c.prototype.save = function() { return this.data.insertLast(this.editor.$textElem.html()), this }, c.prototype.revoke = function() { var m = this.data.prev(); return m ? (this.editor.$textElem.html(m), !0) : !1 }, c.prototype.restore = function() { var m = this.data.next(); return m ? (this.editor.$textElem.html(m), !0) : !1 }, c }(); o.default = f }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(91)); (0, d.default)(o, "__esModule", { value: !0 }), o.TailChain = void 0; var f = function() { function c() { this.data = [], this.max = 0, this.point = 0, this.isRe = !1 } return c.prototype.resetMax = function(m) { m = Math.abs(m), m && (this.max = m) }, (0, d.default)(c.prototype, "size", { get: function() { return this.data.length }, enumerable: !1, configurable: !0 }), c.prototype.insertLast = function(m) { if (this.isRe) { var p; (0, u.default)(p = this.data).call(p, this.point + 1), this .isRe = !1 } for (this.data.push(m); this.max && this.size > this.max;) this .data.shift(); return this.point = this.size - 1, this }, c.prototype.current = function() { return this.data[this.point] }, c.prototype.prev = function() { if (!this.isRe && (this.isRe = !0), this.point--, this.point < 0) { this.point = 0; return } return this.current() }, c.prototype.next = function() { if (!this.isRe && (this.isRe = !0), this.point++, this.point >= this.size) { this.point = this.size - 1; return } return this.current() }, c }(); o.TailChain = f }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(98)), c = function(m) { u.__extends(p, m); function p(b) { var x = m.call(this, b.config.historyMaxSize) || this; return x.editor = b, x.last = 0, x.target = b.$textElem.elems[0], x } return p.prototype.observe = function() { var b = this; this.target = this.editor.$textElem.elems[0], this.editor .$textElem.on("scroll", function() { b.last = b.target.scrollTop }), this.resetMaxSize(this.editor.config.historyMaxSize) }, p.prototype.save = function() { return m.prototype.save.call(this, [this.last, this.target .scrollTop ]), this }, p.prototype.revoke = function() { var b = this; return m.prototype.revoke.call(this, function(x) { b.target.scrollTop = x[0] }) }, p.prototype.restore = function() { var b = this; return m.prototype.restore.call(this, function(x) { b.target.scrollTop = x[1] }) }, p }(f.default); o.default = c }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = t(2), f = u.__importDefault(t(98)), c = u.__importDefault(t(3)), m = t(6); function p(x) { return { start: [x.startContainer, x.startOffset], end: [x.endContainer, x.endOffset], root: x.commonAncestorContainer, collapsed: x.collapsed } } var b = function(x) { u.__extends(g, x); function g(y) { var S = x.call(this, y.config.historyMaxSize) || this; return S.editor = y, S.lastRange = p(document.createRange()), S .root = y.$textElem.elems[0], S.updateLastRange = m.debounce( function() { S.lastRange = p(S.rangeHandle) }, y.config.onchangeTimeout), S } return (0, d.default)(g.prototype, "rangeHandle", { get: function() { var S = document.getSelection(); return S && S.rangeCount ? S.getRangeAt(0) : document.createRange() }, enumerable: !1, configurable: !0 }), g.prototype.observe = function() { var y = this; this.root = this.editor.$textElem.elems[0], this.resetMaxSize( this.editor.config.historyMaxSize); function S() { var E = y.rangeHandle; (y.root === E.commonAncestorContainer || y.root.contains(E .commonAncestorContainer)) && (y.editor.isComposing || y .updateLastRange()) } function w(E) { (E.key == "Backspace" || E.key == "Delete") && y .updateLastRange() } c.default(document).on("selectionchange", S), this.editor .beforeDestroy(function() { c.default(document).off("selectionchange", S) }), y.editor.$textElem.on("keydown", w) }, g.prototype.save = function() { var y = p(this.rangeHandle); return x.prototype.save.call(this, [this.lastRange, y]), this .lastRange = y, this }, g.prototype.set = function(y) { try { if (y) { var S = this.rangeHandle; return S.setStart.apply(S, y.start), S.setEnd.apply(S, y .end), this.editor.menus.changeActive(), !0 } } catch { return !1 } return !1 }, g.prototype.revoke = function() { var y = this; return x.prototype.revoke.call(this, function(S) { y.set(S[0]) }) }, g.prototype.restore = function() { var y = this; return x.prototype.restore.call(this, function(S) { y.set(S[1]) }) }, g }(f.default); o.default = b }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(31)); (0, d.default)(o, "__esModule", { value: !0 }); var f = t(2), c = f.__importDefault(t(3)); t(438); function m(p) { var b = !1, x, g; p.txt.eventHooks.changeEvents.push(function() { b && (0, u.default)(x).call(x, ".w-e-content-preview").html(p .$textElem.html()) }); function y() { if (!b) { p.$textElem.hide(); var w = p.zIndex.get("textContainer"), E = p.txt.html(); x = c.default('
    ` + E + `
    `), p.$textContainerElem.append(x); var I = p.zIndex.get("menu"); g = c.default('
    '), p.$toolbarElem.append(g), b = !0, p .isEnable = !1 } } function S() { !b || (x.remove(), g.remove(), p.$textElem.show(), b = !1, p .isEnable = !0) } return { disable: y, enable: S } } o.default = m }, function(l, o, t) { var s = t(20), d = t(439); d = d.__esModule ? d.default : d, typeof d == "string" && (d = [ [l.i, d, ""] ]); var u = {}; u.insert = "head", u.singleton = !1, s(d, u), l.exports = d.locals || {} }, function(l, o, t) { var s = t(21); o = s(!1), o.push([l.i, `.w-e-content-mantle { width: 100%; height: 100%; overflow-y: auto; } .w-e-content-mantle .w-e-content-preview { width: 100%; min-height: 100%; padding: 0 10px; line-height: 1.5; } .w-e-content-mantle .w-e-content-preview img { cursor: default; } .w-e-content-mantle .w-e-content-preview img:hover { box-shadow: none; } .w-e-menue-mantle { position: absolute; height: 100%; width: 100%; top: 0; left: 0; } `, ""]), l.exports = o }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }); var u = function() { function f(c) { var m = this; this.editor = c; var p = function() { var x = document.activeElement; x === c.$textElem.elems[0] && m.emit() }; window.document.addEventListener("selectionchange", p), this.editor .beforeDestroy(function() { window.document.removeEventListener("selectionchange", p) }) } return f.prototype.emit = function() { var c, m = this.editor.config.onSelectionChange; if (m) { var p = this.editor.selection; p.saveRange(), p.isSelectionEmpty() || m({ text: p.getSelectionText(), html: (c = p.getSelectionContainerElem()) === null || c === void 0 ? void 0 : c.elems[0] .innerHTML, selection: p }) } }, f }(); o.default = u }, function(l, o, t) { var s = t(0), d = s(t(1)), u = s(t(127)), f = s(t(94)), c = s(t(4)); (0, d.default)(o, "__esModule", { value: !0 }), o.registerPlugin = void 0; var m = t(2), p = m.__importDefault(t(87)), b = t(6); function x(y, S, w) { if (!y) throw new TypeError("name is not define"); if (!S) throw new TypeError("options is not define"); if (!S.intention) throw new TypeError("options.intention is not define"); if (S.intention && typeof S.intention != "function") throw new TypeError( "options.intention is not function"); w[y] && console.warn("plugin " + y + " \u5DF2\u5B58\u5728\uFF0C\u5DF2\u8986\u76D6\u3002"), w[y] = S } o.registerPlugin = x; function g(y) { var S = (0, u.default)({}, b.deepClone(p.default.globalPluginsFunctionList), b.deepClone(y.pluginsFunctionList)), w = (0, f.default)(S); (0, c.default)(w).call(w, function(E) { var I = E[0], D = E[1]; console.info("plugin " + I + " initializing"); var R = D.intention, L = D.config; R(y, L), console.info("plugin " + I + " initialization complete") }) } o.default = g }, function(l, o, t) { var s = t(0), d = s(t(1)); (0, d.default)(o, "__esModule", { value: !0 }) }]).default }) })(wangEditor); var WangEditor = getDefaultExportFromCjs(wangEditor.exports), NAME = "fcEditor", uni = 1, _extends = Object.assign || function(A) { for (var C, l = 1; l < arguments.length; l++) for (var o in C = arguments[l], C) Object.prototype.hasOwnProperty.call(C, o) && (A[o] = C[o]); return A }, FcEditor = vue.defineComponent({ name: NAME, props: { modelValue: String, init: Function, disabled: Boolean, config: Object }, inheritAttrs: !1, emits: ["update:modelValue"], data: function A() { return { editor: {}, uni: uni++ } }, watch: { disabled: function A() { this.enable() }, modelValue: function A(C) { C !== this.editor.txt.html() && this.editor.txt.html(C) } }, methods: { enable: function A() { this.disabled ? this.editor.disable() : this.editor.enable() }, result: function A() { this.$emit("update:modelValue", this.editor.txt.html()) } }, mounted: function A() { var C = this; this.$nextTick(function() { C.editor = new WangEditor("#editor".concat(C.uni)), C.editor.config.zIndex = 2, C.config && _extends(C.editor.config, C.config), C.init && C.init(C.editor), C.editor.create(), C.enable(), C.editor.txt.html(C.modelValue) }) }, render: function A() { var C = _objectSpread2({}, this.$attrs); return delete C.id, vue.createVNode("div", vue.mergeProps(C, { onInput: this.result, id: "editor".concat(this.uni), style: "line-height: normal;" }), null) }, beforeDestroy: function A() { this.editor && this.editor.destroy(), this.editor = null } }); const index = ""; designerForm.component("draggable", draggableComponent), designerForm.component("DragTool", DragTool), designerForm.component("DragBox", _sfc_main$2), designerForm.component("Validate", Validate), designerForm .component("Struct", Struct), designerForm.component("Fetch", Fetch), designerForm.component("Required", Required), designerForm.component("TableOptions", TableOptions), designerForm.component("FcEditor", FcEditor), viewForm.component("FcEditor", FcEditor), designerForm.register("_fc", { init(A, C) { C._id = uniqueId(), A.repeat && (C.field = uniqueId()), A.value && (C.effect._fc = !1) } }), designerForm.register("_fc_tool", { init(A, C) { C.props.unique = uniqueId() } }); const install = function(A) { A.component("FcDesigner", FcDesigner) }; FcDesigner.install = install, FcDesigner.makeOptionsRule = makeOptionsRule, exports.default = FcDesigner, exports.designerForm = designerForm, exports.formCreate = viewForm, exports.install = install, Object .defineProperties(exports, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } }) });